# Drawstep engine · Abilities · `spell` > Spell — e.g. “(no effects)”. 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/abilities#spell ## Where it goes One entry of `abilities[]`: `{ "kind": "spell", … }`. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | no | Printed ability word / name of this ability ("Hellfire Retribution", "Totality"): the English rendering, the stack and the game log use it (": Hellfire Retribution") | | `xManaColor` | `"W" \| "U" \| "B" \| "R" \| "G"` | no | CR 107.3: "Spend only black mana on X" — each {X} in the spell's mana cost is paid with this colour | | `onlyIf` | `ConditionDef` | no | CR 601.3, 601.2e: cast this spell only when this condition holds, including free casts and zone permissions | | `stackRules` | `({ condition?: ConditionDef; rules: ("cantCounter" \| "cantPreventDamage" \| "cantCopy" \| "splitSecond")[] })[]` | no | CR 112.1, 615.12, 702.61, 707.10: the spell itself has these rules while on the stack. Each copy uses its own controller, X and additional costs. Conditions are checked when the rule would apply | | `effects` | `EffectDef[]` | no | The effects, resolved in order (EffectDef[]) | | `modes` | `object[]` | no | Modal choices: each `{ label, effects, weight?, cost? }` (spree modes carry their `cost`) | | `chooseMin` | `number` | no | Minimum number of modes chosen (default 1; 0 for "choose any number") | | `chooseMax` | `ValueDef` | no | CR 700.2a, 107.3: maximum modes, including X announced for the spell | | `chooseAtRandom` | `boolean` | no | CR 700.2a: choose the announced modes using the seeded RNG before targets | | `repeatModes` | `boolean` | no | CR 700.2d: allow repeated modes, each with independent targets announced before resolution | | `modeBudget` | `{ amount: number; exact?: boolean; symbol?: "pawprint" }` | no | CR 700.2i: maximum (or exact) total weight of the modes announced before targets | | `chooseIf` | `{ condition: ConditionDef; min: number; max?: number }` | no | "Choose one. If , (you may) choose both / any number instead": mode bounds that apply when the condition holds as the modes are chosen (CR 601.4) | | `distinctModeTargets` | `"player"` | no | CR 601.2c, 700.2: "Each mode must target a different player." — no two chosen modes may target the same player; each mode's player target is announced from the players no earlier mode targets (checked as the targets are chosen, CR 601.2c) | ## Minimal form ```json {"kind":"spell","distinctModeTargets":"player"} ``` The engine reads that minimal form as: “(no effects)”. ## Stock examples - **Iteration 71 Adventurer** — “” ```json {"kind":"spell","effects":[{"effect":"gainLife","amount":1}]} ``` - **Modal Counter Witness // Modal Land Witness** — “” ```json {"kind":"spell","effects":[{"effect":"gainLife","amount":2}]} ``` - **Bonecrusher Giant** — “Stomp {1}{R} — Instant — Adventure: Stomp deals 2 damage to any target.” ```json {"kind":"spell","effects":[{"effect":"dealDamage","target":{"of":"any","mode":"chosen"},"amount":2}]} ``` ## Related - [Abilities](https://drawstep.xyz/wiki/mtg/abilities.md) — the whole topic - [Values](https://drawstep.xyz/wiki/mtg/values.md) — every number kind an `amount` accepts - [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