magarena/release/Magarena/scripts/Auramancer.groovy

30 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-25 20:19:42 -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_ENCHANTMENT_CARD_FROM_GRAVEYARD
),
new MagicGraveyardTargetPicker(false),
this,
2013-05-25 20:19:42 -07:00
"PN may\$ return target enchantment 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-25 20:19:42 -07:00
}
]