# Drawstep engine · Effects · `preventDamage` > Prevent damage — Prevent the next N (or all) damage that would be dealt to the target this turn (CR 615.7). Engine: Magic: The Gathering (`mtg`). This is one primitive of the Drawstep card vocabulary; field names and the discriminator are exact. Wiki page: https://drawstep.xyz/wiki/mtg/effects#preventDamage ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "preventDamage", … }`. Steps resolve in order. Printed words that point here (search aliases): prevent damage fog all combat that would be dealt this turn. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `target` | `TargetDef` | yes | What it acts on (TargetDef) | | `amount` | `ValueDef` | no | How many / how much (integer or ValueDef) | | `combatOnly` | `boolean` | no | Only combat damage | | `divided` | `boolean` | no | CR 601.2d, 615.7: the amount is divided among the targets as they are chosen (each at least 1); each target gets a shield of its share ("prevent the next 5 damage that would be dealt this turn to any number of targets, divided as you choose") | ## Minimal form ```json {"effect":"preventDamage","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"]}}} ``` The engine reads that minimal form as: “prevent all damage that would be dealt to target creature this turn”. ## Stock examples - **Embolden** — “Prevent the next 4 damage that would be dealt this turn to any number of targets, divided as you choose.” ```json {"effect":"preventDamage","target":{"of":"any","mode":"chosen","max":"any"},"amount":4,"divided":true} ``` - **Angel of Salvation** — “When this creature enters, prevent the next 5 damage that would be dealt this turn to any number of targets, divided as you choose.” ```json {"effect":"preventDamage","target":{"of":"any","mode":"chosen","max":"any"},"amount":5,"divided":true} ``` - **Serra's Hymn** — “Sacrifice this enchantment: Prevent the next X damage that would be dealt this turn to any number of targets, divided as you choose, where X is the number of verse counters on this enchantment.” ```json {"effect":"preventDamage","target":{"of":"any","mode":"chosen","max":"any"},"amount":{"kind":"countersOnSource","counter":"verse"},"divided":true} ``` ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [Filters & targets](https://drawstep.xyz/wiki/mtg/targets.md) — how `target` / `filter` select objects and players (selection algebra) - [Values](https://drawstep.xyz/wiki/mtg/values.md) — every number kind an `amount` accepts - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive