13 lines
458 B
Groovy
13 lines
458 B
Groovy
[
|
|
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
if (damage.getSource() == permanent.getEnchantedCreature()) {
|
|
// Replacement effect. Generates no event or action.
|
|
damage.prevent();
|
|
}
|
|
return MagicEvent.NONE;
|
|
}
|
|
}
|
|
]
|