magarena/release/Magarena/scripts/Remand.groovy

23 lines
921 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\$. If you do, return that spell card to its owner's hand. Draw a card."
);
}
@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.OwnersHand));
game.doAction(new MagicDrawAction(event.getPlayer()));
}
});
}
}
]