magarena/release/Magarena/scripts/Dissipate.groovy

23 lines
892 B
Groovy
Raw Normal View History

2013-05-17 23:13:24 -07:00
[
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 that spell is countered this way, exile it instead of putting it into its owner's graveyard."
);
}
@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, MagicLocationType.Exile));
}
});
}
}
]