Menu

Submission for Midnight Charm

74

Config

name=Midnight Charm
image=http://mtgimage.com/card/midnight%20charm.jpg
value=2.500
rarity=C
type=Instant
cost={B}
timing=removal
requires_groovy_code
oracle=Choose one — • Midnight Charm deals 1 damage to target creature and you gain 1 life. • Target creature gains first strike until end of turn. • Tap target creature.

Script

def EFFECT1 = MagicRuleEventAction.create("SN deals 1 damage to target creature.~You gain 1 life.");

def EFFECT2 = MagicRuleEventAction.create("Target creature gains first strike until end of turn.");

def EFFECT3 = MagicRuleEventAction.create("Tap target creature.");

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicOrChoice(
                    MagicTargetChoice.NEG_TARGET_CREATURE,
                    MagicTargetChoice.POS_TARGET_CREATURE,
                    MagicTargetChoice.NEG_TARGET_CREATURE
                ),
                this,
                "Choose one\$ - SN deals 1 damage to target creature and you gain 1 life; " +
                "or target creature gains first strike until end of turn; " +
                "or tap target creature." 
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isMode(1)) {
                game.addEvent(EFFECT1.getEvent(event.getSource()));
            } else if (event.isMode(2)) {
                game.addEvent(EFFECT2.getEvent(event.getSource()));
            } else if (event.isMode(3)) {
                game.addEvent(EFFECT3.getEvent(event.getSource()));
            }
        }
    }
]
Pushed