Menu

Submission for Thran Forge

159

Config

name=Thran Forge
image=http://mtgimage.com/card/thran%20forge.jpg
value=2.500
rarity=U
type=Artifact
cost={3}
timing=main
requires_groovy_code
oracle={2}: Until end of turn, target nonartifact creature gets +1/+0 and becomes an artifact in addition to its other types.

Script

def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
    @Override
    public int getTypeFlags(final MagicPermanent permanent,final int flags) {
        return flags|MagicType.Artifact.getMask();
    }
};

def choice = new MagicTargetChoice("target nonartifact creature");
                

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Pump"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicPayManaCostEvent(source,"{2}")];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                choice,
                MagicPumpTargetPicker.create(),
                this,
                "Until end of turn target nonartifact creature\$ gets +1/+0 and becomes an artifact in addition to its other types."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicAddStaticAction(it, ST));
                game.doAction(new MagicChangeTurnPTAction(it,1,0));
            });
        }
    }
]
Pushed