Menu

Submission for Phyrexian Infiltrator

116

Config

name=Phyrexian Infiltrator
image=http://mtgimage.com/card/phyrexian%20infiltrator.jpg
value=2.500
rarity=R
type=Creature
subtype=Minion
cost={2}{B}
pt=2/2
timing=main
requires_groovy_code
oracle={2}{U}{U}: Exchange control of Phyrexian Infiltrator and target creature.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Control"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{2}{U}{U}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE,
                MagicDefaultTargetPicker.create(),
                this,
                "PN exchanges control of SN and target creature\$."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicGainControlAction(event.getPlayer(),it));
                game.doAction(new MagicGainControlAction(it.getController(),event.getPermanent()));
            });
        }
    }
]
Pushed