Menu

Submission for Nettling Curse

48

Config

name=Nettling Curse
image=http://mtgimage.com/card/nettling%20curse.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={2}{B}
timing=aura
enchant=can't block,neg creature
requires_groovy_code=Nettling Curse;Contaminated Bond
oracle=Enchant creature. Whenever enchanted creature attacks or blocks, its controller loses 3 life. {1}{R}: Enchanted creature attacks this turn if able.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.MustAttack),
        "Attack"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source, "{1}{R}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                source.getEnchantedPermanent(),
                this,
                "RN attacks this turn if able."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicGainAbilityAction(event.getRefPermanent(),MagicAbility.AttacksEachTurnIfAble));
        }
    }
]
Pushed