Menu

Submission for Phyrexian Soulgorger

141

Config

name=Phyrexian Soulgorger
image=http://mtgimage.com/card/phyrexian%20soulgorger.jpg
value=2.500
rarity=R
type=Snow,Artifact,Creature
subtype=Construct
cost={3}
pt=8/8
timing=main
requires_groovy_code
oracle=Cumulative upkeep—Sacrifice a creature.

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\$ sacrifice a creature 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.addEvent(new MagicRepeatedPermanentsEvent(
                    event.getSource(),
                    MagicTargetChoice.SACRIFICE_CREATURE,
                    event.getPermanent().getCounters(MagicCounterType.Age),
                    MagicChainEventFactory.Sac
                ));
            } else {
                game.doAction(new MagicSacrificeAction(event.getPermanent()));
            }
        }
    }
]
Pushed