Menu

Submission for Avatar of Woe

128

Config

name=Avatar of Woe
image=http://mtgimage.com/card/avatar%20of%20woe.jpg
value=2.500
rarity=R
type=Creature
subtype=Avatar
cost={6}{B}{B}
pt=6/5
ability=Fear;\
{T}: Destroy target creature. It can't be regenerated.
timing=main
requires_groovy_code
oracle=If there are ten or more creature cards total in all graveyards, Avatar of Woe costs {6} less to cast. Fear. {T}: Destroy target creature. It can't be regenerated.

Script

def TEN_CREATURES_IN_GRAVEYARDS_CONDITION = new MagicCondition() {
    public boolean accept(final MagicSource source) {
        final int number = source.getGame().filterCards(source.getController(),MagicTargetFilterFactory.CREATURE_CARD_FROM_ALL_GRAVEYARDS).size();
        return number >= 10;
    }
};

[
     new MagicCardActivation(
        [TEN_CREATURES_IN_GRAVEYARDS_CONDITION, MagicCondition.CARD_CONDITION],
        new MagicActivationHints(MagicTiming.Main, true),
        "-Cost"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
            return [new MagicPayManaCostEvent(source,"{B}{B}")];
        }
    }
]
Pushed