Menu

Submission for Qumulox

59

Config

name=Qumulox
image=http://mtgimage.com/card/qumulox.jpg
value=2.500
rarity=U
type=Creature
subtype=Beast
cost={6}{U}{U}
pt=5/4
ability=Flying
timing=main
requires_groovy_code
oracle=Affinity for artifacts. 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.ARTIFACT_YOU_CONTROL).size();
            final int cost= Math.max(0,6-n)
            return cost==0 ?
                [new MagicPayManaCostEvent(source,"{U}{U}")]:
                [new MagicPayManaCostEvent(source,"{"+cost.toString()+"}{U}{U}")];
        }
    }
]
Pushed