Menu

Submission for Goblin Warrens

123

Config

name=Goblin Warrens
image=http://mtgimage.com/card/goblin%20warrens.jpg
value=2.500
rarity=R
type=Enchantment
cost={2}{R}
timing=main
requires_groovy_code
oracle={2}{R}, Sacrifice two Goblins: Put three 1/1 red Goblin creature tokens onto the battlefield.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Token),
        "Tokens"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{2}{R}"),
                new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_GOBLIN),
		new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_GOBLIN)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "Put 3 1/1 red Goblin creature tokens onto the battlefield."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
                game.doAction(new MagicPlayTokensAction(
                event.getPlayer(),
                TokenCardDefinitions.get("1/1 red Goblin creature token"),
                3
            ));
        }
    }
]
Pushed