Menu

Submission for Molten Birth

147

Config

name=Molten Birth
image=http://magiccards.info/scans/en/m14/147.jpg
value=2.500
rarity=U
type=Sorcery
cost={1}{R}{R}
timing=main
requires_groovy_code
oracle=Put two 1/1 red Elemental creature tokens onto the battlefield. Then flip a coin. If you win the flip, return Molten Birth to its owner's hand.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicCoinFlipChoice(),
                this,
                "PN puts two 1/1 red Elemental creature tokens onto the battlefield. "+
                "Then PN flips a coin.\$ If PN wins the flip, return SN to its owner's hand."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new PlayTokensAction(
                event.getPlayer(), 
                TokenCardDefinitions.get("1/1 red Elemental creature token"),
                2
            ));
            final Boolean heads = event.isMode(1) 
            game.addEvent(new MagicCoinFlipEvent(
                event.getSource(),
                heads,
                event.getPlayer(),
                new ChangeCardDestinationAction(event.getCardOnStack(), MagicLocationType.OwnersHand),
                null
            ));
        }
    }
]
Pushed