Menu

Submission for Walking Wall

172

Config

name=Walking Wall
image=http://magiccards.info/scans/en/med/172.jpg
value=2.567
rarity=U
type=Artifact,Creature
subtype=Wall
cost={4}
pt=0/6
ability=Defender
timing=main
requires_groovy_code
oracle=Defender. {3}: Walking Wall 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 can attack this turn as though it didn't have defender."
            );
        }

        @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