Menu

Submission for

Comment

Based on Unstable Mutation

Config

name=Essence Flare
image=http://mtgimage.com/card/essence%20flare.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={U}
ability=Enchanted creature gets +2/+0.
enchant=pump,creature
timing=enchantment
requires_groovy_code
oracle=Enchant creature. Enchanted creature gets +2/+0. At the beginning of the upkeep of enchanted creature's controller, put a -0/-1 counter on that creature.

Script

[
    new MagicAtUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
            final MagicPermanent enchanted = permanent.getEnchantedPermanent();
            return permanent.isController(upkeepPlayer) && enchanted.isValid() ?
                new MagicEvent(
                    permanent,
                    this,
                    "PN puts a -0/-1 counter on creature enchanted by SN."
                ):
                MagicEvent.NONE;
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPermanent permanent=event.getPermanent();
            final MagicPermanent enchanted=permanent.getEnchantedPermanent();
            if (enchanted.isValid()) {
                game.doAction(new MagicChangeCountersAction(enchanted,MagicCounterType.MinusOne,1));
            }
        }
    }
]
Pushed