magarena/release/Magarena/scripts/Visions_of_Beyond.groovy

22 lines
766 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
2013-06-15 07:27:32 -07:00
cardOnStack,
this,
"Draw a card. If a graveyard has twenty or more cards in it, " +
"draw three cards instead."
);
2013-04-12 19:58:51 -07:00
}
@Override
2013-06-15 03:20:38 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int amount = (
game.getPlayer(0).getGraveyard().size() >= 20 ||
game.getPlayer(1).getGraveyard().size() >= 20
) ? 3 : 1;
2013-04-12 19:58:51 -07:00
game.doAction(new MagicDrawAction(event.getPlayer(),amount));
}
}
]