13 lines
475 B
Groovy
13 lines
475 B
Groovy
[
|
|
new MagicIfDamageWouldBeDealtTrigger(5) {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
if (damage.getTarget().isCreature() && damage.getTarget().hasSubType(MagicSubType.Cleric) && permanent.isFriend(damage.getTarget())) {
|
|
// Prevention effect.
|
|
damage.prevent(1);
|
|
}
|
|
return MagicEvent.NONE;
|
|
}
|
|
}
|
|
]
|