- 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
Convoke
Deathtouch
Defender
Delve
Double Strike
Fear
First Strike
Flash
Flying
Haste
Hexproof
Horsemanship
Infect
Intimidate
Lifelink
Phasing
Reach
Rebound
Shadow
Shroud
Split Second
Trample
Unblockable
Vigilance
Wither

View File

@@ -315,10 +315,16 @@ public class AbilityFactoryPump {
}
} else if (keyword.startsWith("Rampage")) {
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)) {
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")) {
if (card.getNetCombatDamage() <= 0) {
return false;
@@ -421,7 +427,7 @@ public class AbilityFactoryPump {
}
// 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)) {
return true;
}