Menu

Submission for Izzet Charm

21

Config

name=Izzet Charm
image=http://mtgimage.com/card/izzet%20charm.jpg
value=2.500
rarity=U
type=Instant
cost={U}{R}
timing=counter
requires_groovy_code
oracle=Choose one — • Counter target noncreature spell unless its controller pays {2}. • Izzet Charm deals 2 damage to target creature. • Draw two cards, then discard two cards.

Script

def EFFECT1 = MagicRuleEventAction.create("Counter target noncreature spell unless its controller pays {2}.");

def EFFECT2 = MagicRuleEventAction.create("SN deals 2 damage to target creature.");

def EFFECT3 = MagicRuleEventAction.create("Draw two cards, then discard two cards.");

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicOrChoice(
                    MagicTargetChoice.Negative("target noncreature spell"),
                    MagicTargetChoice.NEG_TARGET_CREATURE,
                    MagicTargetChoice.NONE
                ),
                this,
                "Choose one\$ - counter target noncreature spell unless its controller pays {2}; " +
                "or SN deals 2 damage to target creature; " +
                "or draw two cards, then discard two cards." 
            );
        }
        @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