magarena/release/Magarena/scripts/Empyrial_Archangel.groovy

13 lines
457 B
Groovy

[
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.REPLACE_DAMAGE) {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
if (permanent.isController(damage.getTarget())) {
// Replacement effect. Generates no event or action.
damage.setTarget(permanent);
}
return MagicEvent.NONE;
}
}
]