Menu

Submission for Flash Flood

35

Config

name=Flash Flood
image=http://mtgimage.com/card/flash%20flood.jpg
value=2.500
rarity=C
type=Instant
cost={U}
timing=removal
requires_groovy_code
oracle=Choose one — • Destroy target red permanent. • Return target Mountain to its owner's hand.

Script

def EFFECT1 = MagicRuleEventAction.create("Destroy target red permanent.");

def EFFECT2 = MagicRuleEventAction.create("Return target mountain to its owner's hand.");

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicOrChoice(
                    MagicTargetChoice.Negative("target red permanent"),
                    MagicTargetChoice.Negative("target Mountain")
                ),
                this,
                "Choose one\$ - destroy target red permanent; " +
                "or return target Mountain to its owner's hand."
            );
        }
        @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