# Drawstep engine · Statics & layers · `cantBeTargeted` > Cant be targeted — CR 115.1, 115.1c: selected objects cannot be targeted by matching spells or abilities, including cards in graveyards. 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/statics#cantBeTargeted ## Where it goes The `effect` of a static ability (or one of its `effects`): `{ "kind": "static", "effect": { "type": "cantBeTargeted", … } }`. Applied continuously through the layer system. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `to` | `TargetDef` | yes | What it applies to (TargetDef) | | `by` | `"spells" \| "abilities" \| "spellsOrAbilities"` | yes | Which stack objects can't target it: spells, abilities, or both | | `from` | `ObjectFilter` | no | Spell or ability source qualities; last known information applies (CR 113.7a, 608.2h) | | `controller` | `"you" \| "opponent" \| "any" \| "notYou"` | no | Stack controller relative to the restriction controller, independently of source control | ## Minimal form ```json {"type":"cantBeTargeted","to":{"of":"object","mode":"self"},"by":"spells"} ``` The engine reads that minimal form as: “~ can't be the target of spells”. ## Stock examples - **Dense Foliage Witness** — “Creatures can't be the targets of spells.” ```json {"type":"cantBeTargeted","to":{"of":"object","mode":"all","filter":{"types":["Creature"]}},"by":"spells"} ``` - **Ground Seal Witness** — “Cards in graveyards can't be the targets of spells or abilities.” ```json {"type":"cantBeTargeted","to":{"of":"object","mode":"all","zone":"graveyard"},"by":"spellsOrAbilities"} ``` - **Ability Ward Witness** — “This creature can't be the target of abilities your opponents control.” ```json {"type":"cantBeTargeted","to":{"of":"object","mode":"self"},"by":"abilities","controller":"opponent"} ``` ## Related - [Statics & layers](https://drawstep.xyz/wiki/mtg/statics.md) — the whole topic - [Filters & targets](https://drawstep.xyz/wiki/mtg/targets.md) — how `target` / `filter` select objects and players (selection algebra) - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive