Menu

Submission for Mortal Wound

113

Config

name=Mortal Wound
image=http://mtgimage.com/card/mortal%20wound.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={G}
timing=aura
enchant=can't block,neg creature
requires_groovy_code
oracle=Enchant creature. When enchanted creature is dealt damage, destroy it.

Script

[
    new MagicWhenDamageIsDealtTrigger() {
        @Override
        public MagicEvent executeTrigger(
                final MagicGame game,
                final MagicPermanent permanent,
                final MagicDamage damage) {
            final MagicPermanent enchanted = permanent.getEnchantedPermanent();
            return damage.getTarget() == enchanted ?
                new MagicEvent(
                    permanent,
                    this,
                    "Destroy the creature enchanted by SN."
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicDestroyAction(event.getPermanent().getEnchantedPermanent()));
        }
    }
]
Pushed