Menu

Submission for Wall of Shards

23

Config

name=Wall of Shards
image=http://mtgimage.com/card/wall%20of%20shards.jpg
value=2.500
rarity=U
type=Snow,Creature
subtype=Wall
cost={1}{W}
pt=1/8
ability=Defender; flying
timing=main
requires_groovy_code
oracle=Defender, flying. Cumulative upkeepā€”An opponent gains 1 life.

Script

[
    new MagicAtYourUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
            game.doAction(new MagicChangeCountersAction(
                permanent,
                MagicCounterType.Age,
                1
            ));
            return new MagicEvent(
                permanent,
                new MagicMayChoice("Pay cumulative upkeep?"),
                this,
                "PN may\$ have opponent gain 1 life for each Age counter on SN. " +
                "If he or she doesn't, sacrifice SN."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()) {
                game.doAction(new MagicChangeLifeAction(
                    event.getPlayer().getOpponent(), 
                    event.getPermanent().getCounters(MagicCounterType.Age)
                ));
            } else {
                game.doAction(new MagicSacrificeAction(event.getPermanent()));
            }
        }
    }
]
Pushed