Menu

Submission for Garruk Relentless

181a

Config

name=Garruk Relentless
image=http://mtgimage.com/card/garruk%20relentless.jpg
value=2.500
rarity=M
type=Planeswalker
subtype=Garruk
cost={3}{G}
ability=loyalty 3
transform=Garruk, the Veil-Cursed
timing=main
requires_groovy_code
oracle=When Garruk Relentless has two or fewer loyalty counters on him, transform him. 0: Garruk Relentless deals 3 damage to target creature. That creature deals damage equal to its power to him. 0: Put a 2/2 green Wolf creature token onto the battlefield.

Script

def EFFECT = MagicRuleEventAction.create("Transform SN."); 

[
    new MagicStatic(MagicLayer.Game) {
        @Override
        public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return source.getCounters(MagicCounterType.Loyalty) <= 2;
        }
        @Override
        public void modGame(final MagicPermanent source, final MagicGame game) {
            game.doAction(new MagicPutStateTriggerOnStackAction(
                 EFFECT.getEvent(source)
            ));               
        }
    },
    new MagicPlaneswalkerActivation(0) {
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE,
                this,
                "SN deals 3 damage to target creature. That creature deals damage equal to its power to him."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicDealDamageAction(event.getSource(),it,3));
                game.doAction(new MagicDealDamageAction(it,event.getPermanent(),it.getPower()));
            });
        }
    },
    new MagicPlaneswalkerActivation(0) {
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
             return new MagicEvent(
                source,
                this,
                "Put a 2/2 green Wolf creature token onto the battlefield."
            );
       }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicPlayTokenAction(event.getPlayer(),TokenCardDefinitions.get("2/2 green Wolf creature token")));
        }
    }
]
Pushed