Menu

Submission for Avatar of Might

251

Config

name=Avatar of Might
image=http://mtgimage.com/card/avatar%20of%20might.jpg
value=2.500
rarity=R
type=Creature
subtype=Avatar
cost={6}{G}{G}
pt=8/8
ability=Trample
timing=main
requires_groovy_code
oracle=If an opponent controls at least four more creatures than you, Avatar of Might costs {6} less to cast. Trample

Script

def FOUR_MORE_CREATURES_CONDITION = new MagicCondition() {
    public boolean accept(final MagicSource source) {
        return source.getOpponent().getNrOfPermanents(MagicType.Creature) >= source.getController().getNrOfPermanents(MagicType.Creature) + 4;
    }
};

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

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