Menu

Submission for Kamahl's Sledge

102

Config

name=Kamahl's Sledge
image=http://mtgimage.com/card/kamahl%27s%20sledge.jpg
value=2.500
rarity=C
type=Sorcery
cost={5}{R}{R}
timing=main
requires_groovy_code
oracle=Kamahl's Sledge deals 4 damage to target creature. Threshold — If seven or more cards are in your graveyard, instead Kamahl's Sledge deals 4 damage to that creature and 4 damage to that creature's controller.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.NEG_TARGET_CREATURE,
                this,
                "SN deals 4 damage to target creature\$. " +
                "If seven or more cards are in your graveyard, SN deals 4 damage to that creature's controller as well."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicDealDamageAction(event.getSource(),it,4));
                if (MagicCondition.THRESHOLD_CONDITION.accept(event.getSource())) {
                    game.doAction(new MagicDealDamageAction(event.getSource(),it.getController(),4));
                }
            });
        }
    }
]
Pushed