Menu

Submission for Red Elemental Blast

131

Config

name=Red Elemental Blast
image=http://mtgimage.com/card/red%20elemental%20blast.jpg
value=2.500
rarity=C
type=Instant
cost={R}
timing=counter
requires_groovy_code
oracle=Choose one — • Counter target blue spell. • Destroy target blue permanent.

Script

def EFFECT1 = MagicRuleEventAction.create("Counter target blue spell.");

def EFFECT2 = MagicRuleEventAction.create("Destroy target blue permanent.");

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicOrChoice(
                    MagicTargetChoice.Negative("target blue spell"),
                    MagicTargetChoice.Negative("target blue permanent")
                ),
                this,
                "Choose one\$ - counter target blue spell; " +
                "or destroy target blue permanent."
            );
        }
        @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()));
            }
        }
    }
]
Pushed