magarena/release/Magarena/scripts/Phantom_Nomad.groovy

21 lines
630 B
Groovy
Raw Normal View History

2013-10-01 22:45:40 -07:00
[
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicDamage damage) {
if (damage.getTarget() == permanent) {
// Prevention effect.
damage.prevent();
game.doAction(new MagicChangeCountersAction(
permanent,
MagicCounterType.PlusOne,
-1,
true
));
}
return MagicEvent.NONE;
}
}
]