Menu

Submission for Marshmist Titan

76

Config

name=Marshmist Titan
image=http://mtgimage.com/card/marshmist%20titan.jpg
value=2.500
rarity=C
type=Creature
subtype=Giant
cost={6}{B}
pt=4/5
timing=main
requires_groovy_code
oracle=Marshmist Titan costs {X} less to cast, where X is your devotion to black.

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