Menu

Submission for Emberwilde Djinn

172

Config

name=Emberwilde Djinn
image=http://magiccards.info/scans/en/mr/172.jpg
value=2.500
rarity=R
type=Creature
subtype=Djinn
cost={2}{R}{R}
pt=5/4
ability=Flying
timing=main
requires_groovy_code
oracle=Flying. At the beginning of each player's upkeep, that player may pay {R}{R} or 2 life. If he or she does, the player gains control of Emberwilde Djinn.

Script

[
    new MagicAtUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer upkeepPlayer) {
            return permanent.isController(upkeepPlayer) == false ?
                new MagicEvent(
                    permanent,
                    upkeepPlayer,
                    new MagicMayChoice(
                        "Pay {R}{R}?",
                        new MagicPayManaCostChoice(MagicManaCost.create("{R}{R}"))
                    ),
                    this,
                    "PN may\$ pay {R}{R}\$ to gain control of SN."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game,final MagicEvent event) {
            if (event.isYes()) {
                game.doAction(new MagicGainControlAction(event.getPlayer(),event.getPermanent()));
            }
        }
    }
]
Pushed