Menu

Submission for Spire Golem

16

Config

name=Spire Golem
image=http://mtgimage.com/card/spire%20golem.jpg
value=2.500
rarity=C
type=Artifact,Creature
subtype=Golem
cost={6}
pt=2/4
ability=Flying
timing=main
requires_groovy_code
oracle=Affinity for Islands. Flying

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