magarena/release/Magarena/scripts/Spell_Pierce.groovy

22 lines
844 B
Groovy
Raw Normal View History

2013-04-01 06:48:11 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_NONCREATURE_SPELL,
this,
2013-04-01 07:28:22 -07:00
"Counter target noncreature spell\$ unless its controller pays {2}."
2013-04-01 06:48:11 -07:00
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
public void doAction(final MagicCardOnStack targetSpell) {
game.addEvent(new MagicCounterUnlessEvent(event.getSource(),targetSpell,MagicManaCost.create("{2}")));
}
});
}
}
]