- Improved shouldPumpCard for triggers.

This commit is contained in:
Sloth
2013-05-06 09:12:06 +00:00
parent 75951e89ad
commit 7891d7d6ff
2 changed files with 13 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ ManaCost:3 R
Types:Creature Goblin Shaman
PT:2/2
T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigPump | TriggerDescription$ At the beginning of combat on your turn, you may have target creature get +2/+0 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 2
SVar:TrigPump:AB$ Pump | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 2
SVar:Picture:http://www.wizards.com/global/images/magic/general/battle_rattle_shaman.jpg
Oracle:At the beginning of combat on your turn, you may have target creature get +2/+0 until end of turn.
SetInfo:ROE Common

View File

@@ -408,6 +408,18 @@ public abstract class PumpAiBase extends SpellAbilityAi {
return true;
}
if (sa.isTrigger() && phase.getPhase().isBefore(PhaseType.COMBAT_DECLARE_ATTACKERS)) {
if (phase.isPlayerTurn(ai)) {
if (CombatUtil.canAttack(c)) {
return true;
}
} else {
if (CombatUtil.canBlock(c)) {
return true;
}
}
}
// is the creature blocking and unable to destroy the attacker
// or would be destroyed itself?
if (phase.is(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY) && c.isBlocking()) {