Menu

Submission for Fortify

19

Config

name=Fortify
image=http://mtgimage.com/card/fortify.jpg
value=2.500
rarity=C
type=Instant
cost={2}{W}
timing=pump
requires_groovy_code
oracle=Choose one — • Creatures you control get +2/+0 until end of turn. • Creatures you control get +0/+2 until end of turn.

Script

def EFFECT1 = MagicRuleEventAction.create("Creatures you control get +2/+0 until end of turn.");

def EFFECT2 = MagicRuleEventAction.create("Creatures you control get +0/+2 until end of turn.");

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicOrChoice(
                    MagicChoice.NONE,
                    MagicChoice.NONE
                ),
                this,
                "Choose one\$ - creatures you control get +2/+0 until end of turn.; " +
                "or creatures you control get +0/+2 until end of turn."
            );
        }
        @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