magarena/release/Magarena/scripts/Goldenglow_Moth.groovy

28 lines
907 B
Groovy

[
new MagicWhenBlocksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (creature == permanent) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.GAIN_LIFE,
3,
MagicSimpleMayChoice.DEFAULT_YES
),
this,
"PN may\$ gain 4 life."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),4));
}
}
}
]