# Drawstep engine · Conditions · `phase` > Phase — The current step/phase. beforeAttackers ends when the declare attackers step begins; combatBeforeBlockers is restricted to combat before the declare blockers step; combatAfterBlockers requires blockers to have been declared this combat (CR 500.1, 508.1, 509.1). beforeCombatDamage ("Cast this spell only before the combat damage step") is the beginning phase, precombat main phase or combat before the combat damage step, while no combat damage step has begun this turn (CR 510). 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/conditions#phase ## Where it goes A condition: `{ "kind": "phase", … }` — in an `if` effect, a trigger's `condition` (intervening if), a static's `condition` ("as long as"), an activated ability's `onlyIf`, a replacement's `unless`. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `is` | `"upkeep" \| "draw" \| "untap" \| "precombatMain" \| "postcombatMain" \| "main" \| "combat" \| "beforeAttackers" \| "combatBeforeBlockers" \| "combatAfterBlockers" \| "declareAttackers" \| "declareBlockers" \| "en …` | yes | The current phase or step | ## Minimal form ```json {"kind":"phase","is":"upkeep"} ``` The engine reads that minimal form as: “it's your upkeep”. ## Stock examples - **Mandate of Peace** — “Cast this spell only during combat.” ```json {"kind":"phase","is":"combat"} ``` - **Late Combat** — “Cast this spell only during combat after blockers are declared.” ```json {"kind":"phase","is":"combatAfterBlockers"} ``` - **Early Combat** — “Cast this spell only during combat before blockers are declared.” ```json {"kind":"phase","is":"combatBeforeBlockers"} ``` ## Related - [Conditions](https://drawstep.xyz/wiki/mtg/conditions.md) — the whole topic - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive