Menu

Submission for Azorius Ploy

106

Config

name=Azorius Ploy
image=http://mtgimage.com/card/azorius%20ploy.jpg
value=2.500
rarity=U
type=Instant
cost={1}{W}{W}{U}
timing=block
requires_groovy_code
oracle=Prevent all combat damage target creature would deal this turn. Prevent all combat damage that would be dealt to target creature this turn.

Script

[
    new MagicSpellCardEvent() {

        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.TARGET_CREATURE,
                this,
                "Prevent all combat damage that would be dealt to and dealt by target creature\$ this turn."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicAddTurnTriggerAction(
                    it,
                    MagicIfDamageWouldBeDealtTrigger.PreventCombatDamageDealtToDealtBy
                ));
            });
        }
    }
]
Pushed