magarena/release/Magarena/scripts/Geist_Snatch.groovy

27 lines
1.0 KiB
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_CREATURE_SPELL,
this,
"Counter target creature spell\$. Put a 1/1 blue " +
"Spirit creature token with flying onto the battlefield."
);
}
@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 MagicPlayTokenAction(
event.getPlayer(),
TokenCardDefinitions.get("Spirit1 Blue")
));
}
});
}
}
]