Menu

Submission for Mobile Fort

303

Config

name=Mobile Fort
image=http://magiccards.info/scans/en/us/303.jpg
value=3.422
rarity=U
type=Artifact,Creature
subtype=Wall
cost={4}
pt=0/6
ability=Defender
timing=main
requires_groovy_code
oracle=Defender. {3}: Mobile Fort gets +3/-1 until end of turn and can attack this turn as though it didn't have defender. Activate this ability only once each turn.

Script

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

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "SN gets +3/-1 until end of turn. SN loses defender until end of turn."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicChangeTurnPTAction(event.getPermanent,3,-1));
            game.doAction(MagicChangeStateAction.Set(event.getPermanent(),MagicPermanentState.CanAttackWithDefender));
        }
    }
]
Pushed