Menu

Submission for Rainbow Crow

69

Comment

Adapted from Spiritmonger, switching {G} for {1}

Config

name=Rainbow Crow
image=http://mtgimage.com/card/rainbow%20crow.jpg
value=2.500
rarity=U
type=Creature
subtype=Bird
cost={3}{U}
pt=2/2
ability=Flying
timing=main
requires_groovy_code
oracle=Flying. {1}: Rainbow Crow becomes the color of your choice until end of turn.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump,1),
        "Color"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{1}"),
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicColorChoice.RED_WHITE_BLUE_INSTANCE,
                this,
                "SN becomes the color\$ of PN's choice until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPermanent permanent = event.getPermanent();
            final MagicColor color = event.getChosenColor();
            game.doAction(new MagicAddStaticAction(permanent,
                new MagicStatic(MagicLayer.Color,MagicStatic.UntilEOT) {
                @Override
                public int getColorFlags(final MagicPermanent perm, final int flags) {
                    return color.getMask();
                }
            }));
        }
    }
]
Pushed