magarena/release/Magarena/scripts/Kavu_Predator.groovy

25 lines
830 B
Groovy
Raw Normal View History

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