13 lines
457 B
Groovy
13 lines
457 B
Groovy
[
|
|
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
if (permanent.isEnemy(damage.getSource()) && permanent.isController(damage.getTarget())) {
|
|
// Prevention effect.
|
|
damage.prevent(1);
|
|
}
|
|
return MagicEvent.NONE;
|
|
}
|
|
}
|
|
]
|