magarena/release/Magarena/scripts/Eternal_Witness.groovy

29 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-19 22:31:47 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
return new MagicEvent(
permanent,
new MagicMayChoice(
MagicTargetChoice.TARGET_CARD_FROM_GRAVEYARD
),
new MagicGraveyardTargetPicker(false),
this,
2013-05-19 22:31:47 -07:00
"PN may\$ return target card\$ from " +
2013-04-12 19:32:25 -07:00
"his or her graveyard to his or her hand."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard card) {
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.Graveyard));
game.doAction(new MagicMoveCardAction(card,MagicLocationType.Graveyard,MagicLocationType.OwnersHand));
}
});
}
}
2013-05-19 22:31:47 -07:00
}
]