Menu

Submission for Tangle Golem

151

Config

name=Tangle Golem
image=http://mtgimage.com/card/tangle%20golem.jpg
value=2.500
rarity=C
type=Artifact,Creature
subtype=Golem
cost={7}
pt=5/4
timing=main
requires_groovy_code
oracle=Affinity for Forests

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.FOREST_YOU_CONTROL).size();
            final int cost= Math.max(0,7-n)
            return cost==0 ?
                [new MagicPayManaCostEvent(source,"{0}")]:
                [new MagicPayManaCostEvent(source,"{"+cost.toString()+"}")];
        }
    }
]
Pushed