Menu

Submission for Aboroth

59

Config

name=Aboroth
image=http://mtgimage.com/card/aboroth.jpg
value=2.500
rarity=R
type=Creature
subtype=Elemental
cost={4}{G}{G}
pt=9/9
timing=main
requires_groovy_code
oracle=Cumulative upkeepā€”Put a -1/-1 counter on Aboroth.

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\$ put a -1/-1 counter on SN for each Age counter on it. " +
                " If he or she doesn't, sacrifice SN."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()) {
                game.doAction(new MagicChangeCountersAction(
                    event.getPermanent(),
                    MagicCounterType.MinusOne,
                    event.getPermanent().getCounters(MagicCounterType.Age)
                ));
            } else {
                game.doAction(new MagicSacrificeAction(event.getPermanent()));
            }
        }
    }
]
Pushed