magarena/release/Magarena/scripts/Dreadwaters.groovy

25 lines
996 B
Groovy
Raw Normal View History

2013-05-18 18:33:35 -07:00
[
new MagicSpellCardEvent() {
@Override
2013-06-15 18:11:36 -07:00
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
2013-05-18 18:33:35 -07:00
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_PLAYER,
this,
"Target player\$ puts the top X cards of his or her library into " +
"his or her graveyard, where X is the number of lands you control."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer target) {
final MagicPlayer player = event.getPlayer();
final int amount = player.getNrOfPermanents(MagicType.Land);
2013-05-18 18:33:35 -07:00
game.doAction(new MagicMillLibraryAction(target,amount));
}
});
}
}
]