magarena/release/Magarena/scripts/Arctic_Nishoba.groovy

23 lines
794 B
Groovy

[
new MagicWhenLeavesPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicRemoveFromPlayAction act) {
return act.isPermanent(permanent) ?
new MagicEvent(
permanent,
this,
"PN gains 2 life for each age counter on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int amount = event.getPermanent().getCounters(MagicCounterType.Charge) * 2;
game.doAction(new MagicChangeLifeAction(
event.getPlayer(),
amount
));
}
}
]