# Drawstep engine · Effects · `if` > If — Conditional instructions (CR 608.2). Kicker/additional/alternative cost choices determine branch-specific targets during casting (CR 601.2c); identical targets in alternatives share a slot. 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#if ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "if", … }`. Steps resolve in order. Printed words that point here (search aliases): if then otherwise conditional. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `condition` | `ConditionDef` | yes | A ConditionDef that must hold | | `then` | `EffectDef[]` | yes | Effects that follow ("then …", "if you do …") | | `else` | `EffectDef[]` | no | Effects run when the condition / choice / payment fails ("otherwise …", "if you don't …") | ## Minimal form ```json {"effect":"if","condition":{"kind":"isYourTurn"},"then":[]} ``` The engine reads that minimal form as: “if it's your turn, ”. ## Stock examples - **Exploration Insight** — “” ```json {"effect":"if","condition":{"kind":"compare","a":{"kind":"thisTurn","event":"permanentsExplored","who":"you"},"op":">=","b":1},"then":[{"effect":"drawCards","amount":2}],"else":[{"effect":"drawCards","amount":1}]} ``` - **Exile Insight** — “” ```json {"effect":"if","condition":{"kind":"castFrom","zone":"exile"},"then":[{"effect":"drawCards","amount":2}],"else":[{"effect":"drawCards","amount":1}]} ``` - **Conditional Dismissal** — “” ```json {"effect":"if","condition":{"kind":"kicked"},"then":[{"effect":"phaseOut","target":{"of":"object","mode":"all","filter":{"types":["Creature"]},"player":"target","playerTarget":{"of":"player","mode":"chosen"}}}],"else":[{"effect":"phaseOut","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"]}}}]} ``` ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [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