26 lines
909 B
Groovy
26 lines
909 B
Groovy
[
|
|
new MagicSpellCardEvent() {
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
MagicTargetChoice.NEG_TARGET_SPELL,
|
|
this,
|
|
"Counter target spell\$ if its controller is poisoned."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(
|
|
final MagicGame game,
|
|
final MagicEvent event) {
|
|
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
|
|
public void doAction(final MagicCardOnStack targetSpell) {
|
|
if (targetSpell.getController().getPoison() > 0) {
|
|
game.doAction(new MagicCounterItemOnStackAction(targetSpell));
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|