magarena/release/Magarena/scripts/Rotcrown_Ghoul.groovy

24 lines
783 B
Groovy

[
new MagicWhenDiesTrigger() {
@Override
public MagicEvent getEvent(final MagicPermanent permanent) {
return new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_PLAYER,
this,
"Target player\$ puts the top five cards of " +
"his or her library into his or her graveyard."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer targetPlayer) {
game.doAction(new MagicMillLibraryAction(targetPlayer,5));
}
});
}
}
]