2013-07-23 00:53:05 -07:00
|
|
|
[
|
2013-09-13 18:15:21 -07:00
|
|
|
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.REPLACE_DAMAGE) {
|
2013-07-23 00:53:05 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
|
|
if (permanent.isController(damage.getTarget()) && permanent.getEnchantedCreature().isValid()) {
|
|
|
|
// Replacement effect. Generates no event or action.
|
|
|
|
damage.setTarget(permanent.getEnchantedCreature());
|
|
|
|
}
|
|
|
|
return MagicEvent.NONE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|