Menu

Submission for Trolls of Tel-Jilad

136

Comment

Script of "Jhoira's Toolbox" used as template

Config

name=Trolls of Tel-Jilad
url=http://magiccards.info/mi/en/136.html
image=http://mtgimage.com/card/trolls%20of%20Tel-Jilad.jpg
value=2.914
rarity=U
type=Creature
subtype=Troll,Shaman
cost={5}{G}{G}
pt=5/6
timing=main
requires_groovy_code

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Regen"
    ) {

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.POS_TARGET_GREEN_CREATURE,
                MagicRegenerateTargetPicker.create(),
                this,
                "Regenerate target green creature\$."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                final MagicPermanent creature ->
                game.doAction(new MagicRegenerateAction(creature));
            });
        }
    }
]
Pushed