magarena/release/Magarena/scripts/Venser__Shaper_Savant.groovy

33 lines
1.4 KiB
Groovy
Raw Normal View History

2013-05-27 07:35:23 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
2012-06-17 05:19:08 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
return new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_SPELL_OR_PERMANENT,
MagicBounceTargetPicker.getInstance(),
this,
2013-05-27 07:35:23 -07:00
"Return target spell or permanent\$ to its owner's hand."
);
2012-06-17 05:19:08 -07:00
}
@Override
2013-05-27 07:35:23 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
public void doAction(final MagicCardOnStack cardOnStack) {
game.doAction(new MagicRemoveItemFromStackAction(cardOnStack));
game.doAction(new MagicMoveCardAction(
cardOnStack.getCard(),
MagicLocationType.Stack,
MagicLocationType.OwnersHand
));
}
});
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent perm) {
game.doAction(new MagicRemoveFromPlayAction(perm,MagicLocationType.OwnersHand));
}
2012-06-17 05:19:08 -07:00
});
}
2013-05-27 07:35:23 -07:00
}
]