magarena/release/Magarena/scripts/Fog_Bank.groovy

14 lines
510 B
Groovy
Raw Normal View History

2013-08-27 22:40:13 -07:00
[
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
if (damage.isCombat() &&
(damage.getTarget() == permanent || damage.getSource() == permanent)) {
// Replacement effect. Generates no event or action.
damage.prevent();
}
return MagicEvent.NONE;
}
}
]