- AI Improvements of AF Pump.

This commit is contained in:
Sloth
2012-03-04 14:10:20 +00:00
parent f10ad52948
commit bcf91bb1cf
2 changed files with 16 additions and 2 deletions

View File

@@ -1,18 +1,26 @@
Changeling Changeling
Convoke
Deathtouch Deathtouch
Defender Defender
Delve
Double Strike Double Strike
Fear Fear
First Strike First Strike
Flash Flash
Flying Flying
Haste Haste
Hexproof
Horsemanship Horsemanship
Infect Infect
Intimidate Intimidate
Lifelink Lifelink
Phasing
Reach Reach
Rebound
Shadow
Shroud Shroud
Split Second
Trample Trample
Unblockable
Vigilance Vigilance
Wither Wither

View File

@@ -315,10 +315,16 @@ public class AbilityFactoryPump {
} }
} else if (keyword.startsWith("Rampage")) { } else if (keyword.startsWith("Rampage")) {
if (ph.isPlayerTurn(human) || !CombatUtil.canAttack(card) || !CombatUtil.canBeBlocked(card) if (ph.isPlayerTurn(human) || !CombatUtil.canAttack(card) || !CombatUtil.canBeBlocked(card)
|| ph.isAfter(Constant.Phase.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY) || ph.isAfter(Constant.Phase.COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY)
|| (AllZoneUtil.getCreaturesInPlay(human).size() < 2)) { || (AllZoneUtil.getCreaturesInPlay(human).size() < 2)) {
return false; return false;
} }
} else if (keyword.startsWith("Flanking")) {
if (ph.isPlayerTurn(human) || !CombatUtil.canAttack(card) || !CombatUtil.canBeBlocked(card)
|| ph.isAfter(Constant.Phase.COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY)
|| AllZoneUtil.getCreaturesInPlay(human).getNotKeyword("Flanking").size() < 1) {
return false;
}
} else if (keyword.equals("Infect")) { } else if (keyword.equals("Infect")) {
if (card.getNetCombatDamage() <= 0) { if (card.getNetCombatDamage() <= 0) {
return false; return false;
@@ -421,7 +427,7 @@ public class AbilityFactoryPump {
} }
// is the creature unblocked and the spell will pump its power? // is the creature unblocked and the spell will pump its power?
if (phase.isAfter(Constant.Phase.COMBAT_DECLARE_BLOCKERS) if (phase.is(Constant.Phase.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)
&& AllZone.getCombat().isAttacking(c) && AllZone.getCombat().isUnblocked(c) && (attack > 0)) { && AllZone.getCombat().isAttacking(c) && AllZone.getCombat().isUnblocked(c) && (attack > 0)) {
return true; return true;
} }