magarena/release/Magarena/scripts/Mind_Games.groovy

27 lines
1.0 KiB
Groovy
Raw Normal View History

2013-05-26 04:55:45 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_ARTIFACT_OR_CREATURE_OR_LAND,
2013-06-22 01:49:43 -07:00
MagicTapTargetPicker.Tap,
2013-05-26 04:55:45 -07:00
this,
"Tap target artifact, creature, or land\$. " +
"If the buyback cost was payed, return SN to its owner's hand as it resolves."
2013-05-26 04:55:45 -07:00
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
final MagicPermanent permanent ->
game.doAction(new MagicTapAction(permanent,true));
if (event.isBuyback()) {
game.doAction(new MagicChangeCardDestinationAction(event.getCardOnStack(), MagicLocationType.OwnersHand));
2013-05-26 04:55:45 -07:00
}
});
}
}
]