Menu

Submission for Nyx Infusion

77

Config

name=Nyx Infusion
image=http://mtgimage.com/card/nyx%20infusion.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={2}{B}
enchant=pump,creature
timing=aura
requires_groovy_code
oracle=Enchant creature. Enchanted creature gets +2/+2 as long as it's an enchantment. Otherwise, it gets -2/-2.

Script

[
    new MagicStatic(MagicLayer.ModPT) {
        @Override
        public void modPowerToughness(final MagicPermanent source, final MagicPermanent permanent, final MagicPowerToughness pt) {
            if (permanent.hasType(MagicType.Enchantment)) {
                pt.add(2, 2);
            } else {
                pt.add(-2, -2);
            }
        }
        @Override
        public boolean accept(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return MagicStatic.acceptLinked(game, source, target);
        }
    }
]
Pushed