Menu

Submission for Elder Spawn

52

Comment

With help from Melvin and Shawnie.

Config

name=Elder Spawn
image=http://mtgimage.com/card/elder%20spawn.jpg
value=2.500
rarity=R
type=Creature
subtype=Spawn
cost={4}{U}{U}{U}
pt=6/6
ability=SN can't be blocked by red creatures.
timing=main
requires_groovy_code
oracle=At the beginning of your upkeep, unless you sacrifice an Island, sacrifice Elder Spawn and it deals 6 damage to you. Elder Spawn can't be blocked by red creatures.

Script

[
    new MagicAtUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
            return permanent.isController(upkeepPlayer) ?
                new MagicEvent(
                    permanent,
                    new MagicMayChoice("Sacrifice an island?"),
                    this,
                    "PN may\$ sacrifice an island. If PN doesn't, sacrifice SN and it deals 6 damage to you."
                ):
                MagicEvent.NONE;
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.getPlayer().controlsPermanent(MagicSubType.Island) && event.isYes()) {
                game.addEvent(new MagicSacrificePermanentEvent(event.getPermanent(),event.getPlayer(),new MagicTargetChoice("an Island to sacrifice")));
            } else {
                game.doAction(new MagicSacrificeAction(event.getPermanent()));
			final MagicDamage damage = new MagicDamage(event.getSource(),event.getPlayer(),6);
                game.doAction(new MagicDealDamageAction(damage));
            }
        }
    }
]
Pushed