Menu

Submission for

Comment

tested in magarena 1.43

Config

name=Warren Weirding
url=http://magiccards.info/mt/en/82.html
image=http://magiccards.info/scans/en/mt/82.jpg
value=4.045
removal=2
rarity=C
type=Tribal,Sorcery
subtype=Goblin
cost={1}{B}
timing=main
requires_groovy_code

Script

def action = {
    final MagicGame game, final MagicEvent event ->
    event.processTargetPermanent(game,new MagicPermanentAction() {
        public void doAction(final MagicPermanent permanent) {
            game.doAction(new MagicSacrificeAction(permanent));
            if(permanent.hasSubType(MagicSubType.Goblin)){
				for (int i = 0; i < 2; i++) {
					final MagicPlayTokenAction act = new MagicPlayTokenAction(
						event.getPlayer(),
						TokenCardDefinitions.get("1/1 black Goblin Rogue creature token")
					);
					game.doAction(act);
					final MagicPermanent token = act.getPermanent();
					game.doAction(new MagicGainAbilityAction( token, MagicAbility.Haste ));
				}
			}
        }
    });
} as MagicEventAction

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.TARGET_PLAYER,
                this,
                "Target player\$ sacrifices a creature. " +
                "If a Goblin is sacrificed this way, that player puts two 1/1 black Goblin Rogue creature tokens onto the battlefield, " + 
				"and those tokens gain haste until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game, {
                final MagicPlayer player ->
                game.addEvent(new MagicEvent(
                    event.getSource(),
                    player,
                    MagicTargetChoice.SACRIFICE_CREATURE,
                    MagicSacrificeTargetPicker.create(),
                    action,
                    "Choose a creature to sacrifice\$."
                ));
            } as MagicPlayerAction);
        }
    }
]
Pushed