# Drawstep engine · Replacements · `preventDamage` > Prevent damage — e.g. “prevent all damage that would be dealt to ~”. 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/replacements#preventDamage ## Where it goes A replacement ability: `{ "kind": "replacement", "replacement": { "replaces": "preventDamage", … } }`. Printed words that point here (search aliases): prevent all damage that would be dealt. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `amount` | `ValueDef` | no | How many / how much (integer or ValueDef) | | `combatOnly` | `boolean` | no | Only combat damage | | `applyTo` | `TargetDef` | no | What the replacement watches (default the source itself; `mode: "all"` + filter for a group, a player selector for player events) | | `fromFilter` | `ObjectFilter` | no | Only damage from sources matching this filter | ## Minimal form ```json {"replaces":"preventDamage"} ``` The engine reads that minimal form as: “prevent all damage that would be dealt to ~”. ## Related - [Replacements](https://drawstep.xyz/wiki/mtg/replacements.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