Menu

Submission for Soulcatchers' Aerie

25

Config

name=Soulcatchers' Aerie
image=http://mtgimage.com/card/soulcatchers%27%20aerie.jpg
value=2.500
rarity=U
type=Enchantment
cost={1}{W}
timing=enchantment
requires_groovy_code
oracle=Whenever a Bird is put into your graveyard from the battlefield, put a feather counter on Soulcatchers' Aerie. Bird creatures get +1/+1 for each feather counter on Soulcatchers' Aerie.

Script

[
    new MagicWhenOtherDiesTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
            return (otherPermanent.isNonToken() &&
                    otherPermanent.hasSubType(MagicSubType.Bird) && 
                    otherPermanent.getCard().isFriend(permanent)) ?
                new MagicEvent(
                    permanent,
                    this,
                    "Put a feather counter on SN."
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.Feather,1));        }
    },   
    new MagicStatic(
        MagicLayer.ModPT,
        MagicTargetFilterFactory.CREATURE
    ) {
        @Override
        public void modPowerToughness(
                final MagicPermanent source,
                final MagicPermanent permanent,
                final MagicPowerToughness pt) {
            final int amount = source.getCounters(MagicCounterType.Feather);
            pt.add(amount,amount);
        }
        @Override
        public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return target.hasSubType(MagicSubType.Bird);
        }
    }
]
Pushed