Menu

Submission for Quiet Disrepair

75

Config

name=Quiet Disrepair
image=http://mtgimage.com/card/quiet%20disrepair.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={1}{G}
timing=aura
enchant=destroy,neg artifact or enchantment
requires_groovy_code
oracle=Enchant artifact or enchantment. At the beginning of your upkeep, choose one — • Destroy enchanted permanent. • You gain 2 life.

Script

def EFFECT2 = MagicRuleEventAction.create("You gain 2 life.");

[
    new MagicAtYourUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
            return new MagicEvent(
                permanent,
                new MagicOrChoice(
                    MagicTargetChoice.NONE,
                    MagicTargetChoice.NONE
                ),
                this,
                "Choose one\$ - destroy enchanted permanent; " +
                "or you gain 2 life.\$"
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isMode(1)) {
                game.doAction(new MagicDestroyAction(event.getPermanent().getEnchantedPermanent()));
            } else if (event.isMode(2)) {
                game.addEvent(EFFECT2.getEvent(event.getSource()));
            }
        }
    }
]
Pushed