Menu

Submission for Spikeshot Elder

104

Config

name=Spikeshot Elder
image=http://mtgimage.com/card/spikeshot%20elder.jpg
value=2.500
rarity=R
type=Creature
subtype=Goblin,Shaman
cost={R}
pt=1/1
timing=main
requires_groovy_code
oracle={1}{R}{R}: Spikeshot Elder deals damage equal to its power to target creature or player.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Damage"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{1}{R}{R}")
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
                new MagicDamageTargetPicker(source.getPower()),
                this,
                "SN deals damage equal to its power to target creature or player\$."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTarget(game, {
                final MagicPermanent permanent=event.getPermanent();
                game.doAction(new MagicDealDamageAction(
                    permanent,
                    it,
                    permanent.getPower()
                ));
            });
        }
    }
]
Pushed