magarena/release/Magarena/scripts/Kavu_Predator.groovy

25 lines
830 B
Groovy

[
new MagicWhenLifeIsGainedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicLifeChangeTriggerData lifeChange) {
return permanent.isOpponent(lifeChange.player) ?
new MagicEvent(
permanent,
lifeChange.amount,
this,
"Put RN +1/+1 counters on SN."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.PlusOne,
event.getRefInt(),
true
));
}
}
]