Menu

Submission for Luminous Wake

35

Config

name=Luminous Wake
image=http://mtgimage.com/card/luminous%20wake.jpg
value=2.500
rarity=U
type=Enchantment
subtype=Aura
cost={2}{W}
timing=aura
enchant=can't attack or block,creature
requires_groovy_code
oracle=Enchant creature. Whenever enchanted creature attacks or blocks, you gain 4 life.

Script

[
    new MagicWhenAttacksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
            final MagicPermanent enchantedPermanent = permanent.getEnchantedPermanent();
            return creature == enchantedPermanent ?
                new MagicEvent(
                    permanent,
                    permanent.getController(),
                    this,
                    "PN gains 4 life."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicChangeLifeAction(event.getPlayer(),4));
        }
    },
    new MagicWhenBlocksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
            final MagicPermanent enchantedPermanent = permanent.getEnchantedPermanent();
            return creature == enchantedPermanent ?
                new MagicEvent(
                    permanent,
                    permanent.getController(),
                    this,
                    "PN gains 4 life."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicChangeLifeAction(event.getPlayer(),4));
        }
    }
]
Pushed