magarena/release/Magarena/scripts/Lord_of_the_Undead.groovy

31 lines
1.2 KiB
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.FirstMain),
"Return"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostTapEvent(source,"{1}{B}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_ZOMBIE_CARD_FROM_GRAVEYARD,
MagicGraveyardTargetPicker.ReturnToHand,
this,
"Return target Zombie card\$ from your graveyard to your hand."
);
}
@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));
}
});
}
}
]