Menu

Submission for Sphere of Purity

26

Config

name=Sphere of Purity
image=http://mtgimage.com/card/sphere%20of%20purity.jpg
value=2.500
rarity=C
type=Enchantment
cost={3}{W}
timing=enchantment
requires_groovy_code
oracle=If an artifact would deal damage to you, prevent 1 of that damage.

Script

[
    new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            if (permanent.isController(damage.getTarget()) && damage.getSource().hasType(MagicType.Artifact)) {
                // Prevention effect.
                damage.prevent(1);
            }
            return MagicEvent.NONE;
        }
    }
]
Pushed