Menu

Submission for Oxidda Golem

46

Config

name=Oxidda Golem
image=http://mtgimage.com/card/oxidda%20golem.jpg
value=2.500
rarity=C
type=Artifact,Creature
subtype=Golem
cost={6}
pt=3/2
ability=Haste
timing=main
requires_groovy_code
oracle=Affinity for Mountains. Haste

Script

[
     new MagicCardActivation(
        [MagicCondition.CARD_CONDITION],
        new MagicActivationHints(MagicTiming.Main, true),
        "Cast"
    ) {
        @Override
        public void change(final MagicCardDefinition cdef) {
            cdef.setCardAct(this);
        }

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
            final MagicGame game = source.getGame();
            final int n = game.filterPermanents(source.getController(),MagicTargetFilterFactory.MOUNTAIN_YOU_CONTROL).size();
            final int cost= Math.max(0,6-n)
            return cost==0 ?
                [new MagicPayManaCostEvent(source,"{0}")]:
                [new MagicPayManaCostEvent(source,"{"+cost.toString()+"}")];
        }
    }
]
Pushed