Menu

Submission for Crater's Claws

106

Config

name=Crater's Claws
image=http://magiccards.info/scans/en/ktk/106.jpg
value=2.500
rarity=R
type=Sorcery
cost={X}{R}
timing=main
requires_groovy_code
oracle=Crater's Claws deals X damage to target creature or player.\nFerocious — Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                NEG_TARGET_CREATURE_OR_PLAYER,
                this,
                "SN deals X damage to target creature or player. " +
                "SN deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int amount = event.getCardOnStack().getX();
            event.processTarget(game, {
                if (event.getPlayer().controlsPermanent(CREATURE_POWER_4_OR_MORE)) {

                    game.doAction(new DealDamageAction(event.getSource(),it,amount + 2));
                } else {
                    game.doAction(new DealDamageAction(event.getSource(),it,amount));
                }
            });
        }
    }
]
Pushed