magarena/release/Magarena/scripts/Mystic_Snake.groovy

23 lines
795 B
Groovy
Raw Normal View History

2013-04-01 06:39:22 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
return new MagicEvent(
permanent,
player,
MagicTargetChoice.TARGET_SPELL,
this,
2013-04-01 07:28:22 -07:00
"Counter target spell\$."
2013-04-01 06:39:22 -07:00
);
}
@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));
}
});
}
}
]