magarena/release/Magarena/scripts/Corrupted_Resolve.groovy

24 lines
876 B
Groovy
Raw Normal View History

2013-05-17 21:17:17 -07:00
[
new MagicSpellCardEvent() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
2013-05-17 21:17:17 -07:00
cardOnStack,
MagicTargetChoice.NEG_TARGET_SPELL,
this,
"Counter target spell\$ if its controller is poisoned."
);
2013-04-12 19:32:25 -07:00
}
@Override
2013-06-15 03:02:45 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
public void doAction(final MagicCardOnStack targetSpell) {
if (targetSpell.getController().getPoison() > 0) {
game.doAction(new MagicCounterItemOnStackAction(targetSpell));
}
}
});
}
2013-05-17 21:17:17 -07:00
}
]