magarena/release/Magarena/scripts/Reclaim.groovy

28 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-19 00:49:04 -07:00
[
new MagicSpellCardEvent() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_CARD_FROM_GRAVEYARD,
new MagicGraveyardTargetPicker(false),
this,
2013-05-19 00:49:04 -07:00
"Put target card\$ from your graveyard on top of your library."
2013-04-12 19:32:25 -07:00
);
}
@Override
2013-05-19 00:49:04 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard targetCard) {
game.doAction(new MagicRemoveCardAction(targetCard,MagicLocationType.Graveyard));
game.doAction(new MagicMoveCardAction(
targetCard,
MagicLocationType.Graveyard,
MagicLocationType.TopOfOwnersLibrary
));
}
});
}
2013-05-19 00:49:04 -07:00
}
]