magarena/release/Magarena/scripts/Judge_of_Currents.groovy

28 lines
990 B
Groovy
Raw Normal View History

2013-05-17 23:12:37 -07:00
[
new MagicWhenBecomesTappedTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent tapped) {
return (tapped.isFriend(permanent) &&
tapped.isCreature() &&
tapped.hasSubType(MagicSubType.Merfolk)) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.GAIN_LIFE,
1,
2013-05-17 23:12:37 -07:00
MagicSimpleMayChoice.DEFAULT_YES
),
2013-04-12 19:32:25 -07:00
this,
2013-05-17 23:12:37 -07:00
"PN may\$ gain 1 life."
2013-04-12 19:32:25 -07:00
) :
MagicEvent.NONE;
}
@Override
2013-05-17 23:12:37 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
if (event.isYes()) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
}
}
2013-05-17 23:12:37 -07:00
}
]