Menu

Submission for Belbe's Armor

126

Config

name=Belbe's Armor
image=http://mtgimage.com/card/belbe%27s%20armor.jpg
value=2.500
rarity=U
type=Artifact
cost={3}
timing=main
requires_groovy_code
oracle={X}, {T}: Target creature gets -X/+X until end of turn.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Pump"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicTapEvent(source), new MagicPayManaCostEvent(source,"{X}")];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            final int amount = payedCost.getX();
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_CREATURE,
                new MagicWeakenTargetPicker(-amount,amount),
                amount,
                this,
                "Target creature\$ gets -RN/+RN until end of turn."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int amount=event.getRefInt();
            event.processTargetPermanent(game, {
                game.doAction(new MagicChangeTurnPTAction(it,-amount,+amount));
            });
        }
    }
]
Pushed