Menu

Submission for Ancestral Vengeance

61

Config

name=Ancestral Vengeance
image=http://mtgimage.com/card/ancestral%20vengeance.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={B}{B}
timing=aura
enchant=weaken,neg creature
requires_groovy_code
oracle=Enchant creature. When Ancestral Vengeance enters the battlefield, put a +1/+1 counter on target creature you control. Enchanted creature gets -1/-1.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
                this,
                "Put a +1/+1 counter on target creature\$ you control."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicChangeCountersAction(it,MagicCounterType.PlusOne,1));
            });
        }
    },
    new MagicStatic(MagicLayer.ModPT) {
        @Override
        public void modPowerToughness(final MagicPermanent source, final MagicPermanent permanent, final MagicPowerToughness pt) {
            pt.add(-1, -1);
        }
        @Override
        public boolean accept(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return MagicStatic.acceptLinked(game, source, target);
        }
    }
]
Pushed