Menu

Submission for Spikeshot Goblin

108

Config

name=Spikeshot Goblin
image=http://mtgimage.com/card/spikeshot%20goblin.jpg
value=2.500
rarity=C
type=Creature
subtype=Goblin,Shaman
cost={2}{R}
pt=1/2
timing=main
requires_groovy_code
oracle={R}, {T}: Spikeshot Goblin 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,"{R}"),
                new MagicTapEvent(source)
            ];
        }

        @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