Menu

Submission for Blasphemous Act

120

Config

name=Blasphemous Act
image=http://mtgimage.com/card/blasphemous%20act.jpg
value=2.500
rarity=R
type=Sorcery
cost={8}{R}
effect=SN deals 13 damage to each creature.
timing=main
requires_groovy_code
oracle=Blasphemous Act costs {1} less to cast for each creature on the battlefield. Blasphemous Act deals 13 damage to each creature.

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