Menu

Submission for Mirror Wall

47

Comment

Fixing

Config

name=Mirror Wall
image=http://magiccards.info/scans/en/ju/47.jpg
value=2.481
rarity=C
type=Creature
subtype=Wall
cost={3}{U}
pt=3/4
ability=Defender
timing=main
requires_groovy_code
oracle=Defender. {W}: Mirror Wall can attack this turn as though it didn't have defender.

Script

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

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "SN can attack this turn as though it didn't have defender."
            );
        }

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