# Drawstep engine · Effects · `delayedTrigger` > Delayed trigger — Set up a delayed triggered ability (CR 603.7): "at the beginning of the next end step, …", "when that creature dies this turn, …", "whenever that creature is dealt damage this turn, …". 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#delayedTrigger ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "delayedTrigger", … }`. Steps resolve in order. Printed words that point here (search aliases): at the beginning of the next end step at the beginning of your next main phase delayed. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `stepPlayer` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | CR 603.7d: snapshot whose next step to wait for on creation, independently of the ability controller (for example owner for Phytotitan) | | `nextTurn` | `boolean` | no | Wait for a subsequent turn (CR 603.7); combined with trigger.by: you, the specified step on your next turn | | `trigger` | `TriggerDef` | yes | The TriggerDef: which event, whose, which object | | `effects` | `EffectDef[]` | yes | The effects, resolved in order (EffectDef[]) | | `about` | `TargetDef` | no | The object(s) or player the delayed trigger is about, fixed once as it is created (CR 603.7c): mode chosen = a target of this spell / ability ("Choose target creature. Whenever that creature …"), affected = what the previous effect applied to ("~ deals 3 damage to target creature. When that creature dies this turn, …"). The ability then triggers only for those objects (a new object after a zone change no longer counts, CR 400.7; dies / leaves look back). Inside `effects`, mode about / triggering refer to it | | `duration` | `Duration` | no | How long it waits: endOfTurn = "this turn", endOfCombat = "this combat", untilYourNextTurn. Without one it triggers once, the next time the event happens (CR 603.7b); with one it triggers every time ("whenever") until then | | `once` | `boolean` | no | With a duration: trigger only once even so ("when that creature dies this turn", "when you next cast a spell this turn") | | `optional` | `boolean` | no | "You may" — asked as the delayed trigger resolves | ## Minimal form ```json {"effect":"delayedTrigger","trigger":{"event":"enters","filter":{"self":true}},"effects":[]} ``` The engine reads that minimal form as: “When ~ enters, ”. ## Stock examples - **Shift Witness** — “” ```json {"effect":"delayedTrigger","trigger":{"event":"endStep","by":"any"},"effects":[{"effect":"transform","convert":true}]} ``` - **Duration Conduit** — “” ```json {"effect":"delayedTrigger","trigger":{"event":"mainPhase","by":"you"},"effects":[{"effect":"addMana","who":"you","mana":"{R}"}],"duration":"endOfTurn","once":true} ``` - **Think Later** — “Draw a card at the beginning of the next turn's upkeep.” ```json {"effect":"delayedTrigger","trigger":{"event":"upkeep","by":"any"},"effects":[{"effect":"drawCards","who":"you","amount":1}]} ``` ## 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) - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the steps a nested `effects` / `then` list may contain - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive