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
2013-06-19 07:23:35 -07:00
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
2013-04-12 19:32:25 -07:00
return new MagicEvent(
permanent,
new MagicMayChoice(
MagicTargetChoice.TARGET_ENCHANTMENT_CARD_FROM_GRAVEYARD
),
MagicGraveyardTargetPicker.ReturnToHand,
2013-04-12 19:32:25 -07:00
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."
);
}
2013-06-23 18:29:26 -07:00
2013-04-12 19:32:25 -07:00
@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
}
]