magarena/release/Magarena/scripts/Vessel_of_Endless_Rest.groovy

32 lines
1.2 KiB
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer player) {
return new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_CARD_FROM_ALL_GRAVEYARDS,
new MagicGraveyardTargetPicker(true),
this,
"Put target card\$ from a graveyard " +
"on the bottom of its owner's library."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
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.BottomOfOwnersLibrary
));
}
});
}
}
]