Menu

Submission for Goblin Tinkerer

180

Config

name=Goblin Tinkerer
image=http://magiccards.info/scans/en/mr/180.jpg
value=2.500
rarity=C
type=Creature
subtype=Goblin,Artificer
cost={1}{R}
pt=1/2
timing=main
requires_groovy_code
oracle={R}, {T}: Destroy target artifact. That artifact deals damage equal to its converted mana cost to Goblin Tinkerer.

Script

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

        @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_ARTIFACT,
                this,
                "Destroy target artifact\$. That artifact deals damage equal to its converted mana cost to SN."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicDestroyAction(it));
                game.doAction(new MagicDealDamageAction(it,event.getPermanent(),it.getConvertedCost()));
            });
        }
    }
]
Pushed