magarena/release/Magarena/scripts/Emmara_Tandris.groovy

15 lines
497 B
Groovy
Raw Normal View History

2013-10-08 23:11:40 -07:00
[
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicDamage damage) {
final MagicTarget target = damage.getTarget();
if (target.isCreature() &&
target.isToken() &&
target.isFriend(permanent)) {
damage.prevent();
}
return MagicEvent.NONE;
}
}
]