magarena/release/Magarena/scripts/Fallowsage.groovy

26 lines
869 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
new MagicWhenBecomesTappedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent tapped) {
return permanent == tapped ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.DRAW_CARDS,
1,
MagicSimpleMayChoice.DEFAULT_NONE
),
this,
"PN may\$ draw a card."
) :
MagicEvent.NONE;
}
@Override
2013-06-15 03:02:45 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:58:51 -07:00
if (event.isYes()) {
game.doAction(new MagicDrawAction(event.getPlayer()));
2013-04-12 19:58:51 -07:00
}
}
}
]