Menu

Submission for Abzan Runemark

3

Config

name=Abzan Runemark
image=http://mtgimage.com/card/abzan%20runemark.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={2}{W}
timing=aura
enchant=pump,pos creature
requires_groovy_code
oracle=Enchant creature. Enchanted creature gets +2/+2. Enchanted creature has vigilance as long as you control a black or green permanent.

Script

[
    new MagicStatic(MagicLayer.Ability) {
        @Override
        public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
            permanent.addAbility(MagicAbility.Vigilance, flags);
        }
        @Override
        public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return source.getController().controlsPermanent(MagicColor.Black) ||
            source.getController().controlsPermanent(MagicColor.Green) &&
            MagicStatic.acceptLinked(game, source, target);
        }
    },
    new MagicStatic(MagicLayer.ModPT) {
        @Override
        public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
            pt.add(2, 2);
        }
        public boolean accept(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return MagicStatic.acceptLinked(game, source, target);
        }
    }
]
Pushed