magarena/release/Magarena/scripts/Howling_Mine.groovy

21 lines
680 B
Groovy

[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isUntapped() ?
new MagicEvent(
permanent,
upkeepPlayer,
this,
"PN draws a card."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game,final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
game.doAction(new MagicDrawAction(player,1));
}
}
]