Menu

Submission for Fylamarid

64

Comment

Used ExileTargetPicker because it seems to be the one used for generic situations...

Config

name=Fylamarid
image=http://mtgimage.com/card/fylamarid.jpg
value=2.500
rarity=U
type=Creature
subtype=Squid,Beast
cost={1}{U}{U}
pt=1/3
ability=Flying;\
        SN can't be blocked by blue creatures.
timing=main
requires_groovy_code
oracle=Flying. Fylamarid can't be blocked by blue creatures. {U}: Target creature becomes blue until end of turn.

Script

def BLUE = new MagicStatic(MagicLayer.Color,MagicStatic.UntilEOT) {
    @Override
    public int getColorFlags(final MagicPermanent permanent,final int flags) {
        return MagicColor.Blue.getMask();
    }
};
[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Blue"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{U}"),
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_CREATURE,
                MagicExileTargetPicker.create(),
                this,
                "Target creature\$ becomes blue until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicAddStaticAction(it,BLUE));
            });
        }
    }
]
Pushed