Menu

Submission for Spirit Cairn

48

Config

name=Spirit Cairn
image=http://mtgimage.com/card/spirit%20cairn.jpg
value=2.500
rarity=U
type=Enchantment
cost={2}{W}
timing=enchantment
requires_groovy_code
oracle=Whenever a player discards a card, you may pay {W}. If you do, put a 1/1 white Spirit creature token with flying onto the battlefield.

Script

[
    new MagicWhenDiscardedTrigger() {
        @Override
        public MagicEvent getEvent(final MagicPermanent permanent,final MagicCard card) {
            return new MagicEvent(
                permanent,
                new MagicMayChoice(
                    new MagicPayManaCostChoice(MagicManaCost.create("{W}"))
                    ),
                this,
                "PN may\$ pay {W}. If PN does, put a 1/1 white Spirit creature token with flying onto the battlefield."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()) {
                game.doAction(new MagicPlayTokenAction(
                    event.getPlayer(),
                    TokenCardDefinitions.get("1/1 white Spirit creature token with flying")
                ));
            }
        }
    }
]
Pushed