Menu

Submission for Valorous Stance

28

Config

name=Valorous Stance
image=http://mtgimage.com/card/valorous%20stance.jpg
value=2.500
rarity=U
type=Instant
cost={1}{W}
timing=removal
requires_groovy_code
oracle=Choose one — • Target creature gains indestructible until end of turn. • Destroy target creature with toughness 4 or greater.

Script

def EFFECT1 = MagicRuleEventAction.create("Target creature gains indestructible until end of turn.");

def EFFECT2 = MagicRuleEventAction.create("Destroy target creature with toughness 4 or greater.");

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicOrChoice(
                    MagicTargetChoice.Positive("target creature"),
                    MagicTargetChoice.Negative("target creature with toughness 4 or greater")
                ),
                this,
                "Choose one\$ - target creature gains indestructible until end of turn; " +
                "or destroy target creature with toughness 4 or greater."
            );
        }
        @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