Menu

Submission for Aven Liberator

4

Config

name=Aven Liberator
image=http://magiccards.info/scans/en/sc/4.jpg
value=2.500
rarity=C
type=Creature
subtype=Bird,Soldier
cost={2}{W}{W}
pt=2/3
ability=Flying;\
Morph {3}{W}
timing=main
oracle=Flying. Morph {3}{W}. When Aven Liberator is turned face up, target creature you control gains protection from the color of your choice until end of turn.

Script

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

[
    new MagicWhenSelfTurnedFaceUpTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent faceUp) {
            return new MagicEvent(
                permanent,
                MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
                this,
                "Target creature you control\$ gains protection from the color of your choice until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.addEvent(new MagicEvent(
                    event.getSource(),
                    event.getPlayer(),
                    MagicColorChoice.ALL_INSTANCE,
                    it,
                    action,
                    "Chosen color\$."
                ));
            });
        }
    }
]
Pushed