Menu

Submission for Knight Of Dawn

26

Config

 name=Knight of Dawn
image=http://mtgimage.com/card/knight%20of%20dawn.jpg
value=2.500
rarity=U
type=Creature
subtype=Human,Knight
cost={1}{W}{W}
pt=2/2
ability=First strike
timing=main
requires_groovy_code
oracle=First strike. {W}{W}: Knight of Dawn gains protection from the color of your choice until end of turn.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Protection"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicPayManaCostEvent(source,"{W}{W}")];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicColorChoice.ALL_INSTANCE,
                this,
                "SN gains protection from the color\$ of your choice until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicGainAbilityAction(
                event.getPermanent(),
                event.getChosenColor().getProtectionAbility()
            ));
        }
    }
]
Pushed