26 lines
1.1 KiB
Groovy
26 lines
1.1 KiB
Groovy
[
|
|
new MagicAtUpkeepTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
|
|
return permanent.isController(upkeepPlayer) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.TARGET_SPIRIT_CARD_FROM_GRAVEYARD,
|
|
MagicGraveyardTargetPicker.ReturnToHand,
|
|
this,
|
|
"Return target Spirit card\$ from your graveyard to your hand."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
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));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|