magarena/release/Magarena/scripts/Punish_Ignorance.groovy

24 lines
975 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\$. Its controller loses 3 life and PN gains 3 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
public void doAction(final MagicCardOnStack targetSpell) {
game.doAction(new MagicCounterItemOnStackAction(targetSpell));
game.doAction(new MagicChangeLifeAction(targetSpell.getController(),-3));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),3));
}
});
}
}
]