Menu

Submission for Pale Wayfarer

17

Config

name=Pale Wayfarer
image=http://magiccards.info/scans/en/shm/17.jpg
value=2.500
rarity=U
type=Creature
subtype=Spirit,Giant
cost={5}{W}{W}
pt=4/4
timing=main
requires_groovy_code
oracle={2}{W}{W}, {Q}: Target creature gains protection from the color of its controller's choice until end of turn.

Script

def action = {
    final MagicGame game, final MagicEvent event ->
    game.doAction(new MagicGainAbilityAction(
        event.getRefPermanent(),
        event.getChosenColor().getProtectionAbility()
    ));
}

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Protection"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                    new MagicPayManaCostEvent(source,"{2}{W}{W}"),
                    new MagicUntapEvent(source)
                ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.POS_TARGET_CREATURE,
                this,
                "Target creature\$ gains protection from the color of its controller's choice until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.addEvent(new MagicEvent(
                    event.getSource(),
                    it.getController(),
                    MagicColorChoice.ALL_INSTANCE,
                    it,
                    action,
                    "Chosen color\$."
                ));
            });
        }
    }
]
Pushed