magarena/release/Magarena/scripts/Reminisce.groovy

33 lines
1.3 KiB
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_PLAYER,
this,
"Target player\$ shuffles his or her graveyard into his or her library."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
final MagicCardList graveyard = new MagicCardList(player.getGraveyard());
for (final MagicCard card : graveyard) {
game.doAction(new MagicRemoveCardAction(
card,
MagicLocationType.Graveyard
));
game.doAction(new MagicMoveCardAction(
card,
MagicLocationType.Graveyard,
MagicLocationType.OwnersLibrary
));
}
}
});
}
}
]