Menu

Submission for Jwari Shapeshifter

32

Config

name=Jwari Shapeshifter
image=http://mtgimage.com/card/jwari%20shapeshifter.jpg
value=3.676
rarity=R
type=Creature
subtype=Shapeshifter,Ally
cost={1}{U}
pt=0/0
timing=main
requires_groovy_code
oracle=You may have Jwari Shapeshifter enter the battlefield as a copy of any Ally creature on the battlefield.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                new MagicMayChoice(new MagicTargetChoice("an Ally creature")),
                MagicCopyPermanentPicker.create(),
                this,
                "You may\$ have SN enter the battlefield as a copy of any Ally creature\$ on the battlefield."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()) {
                event.processTargetPermanent(game, {
                    final MagicPermanent chosen ->
                    game.doAction(new MagicEnterAsCopyAction(event.getCardOnStack(), chosen))
                });
            } else {
                game.logAppendMessage(event.getPlayer(), "Put ${event.getCardOnStack()} onto the battlefield.");
                game.doAction(new MagicPlayCardFromStackAction(
                    event.getCardOnStack()
                ));
            }
        }
    }
]
Pushed