# Drawstep engine · Abilities · `loyalty` > Loyalty — e.g. “+1: (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#loyalty ## Where it goes One entry of `abilities[]`: `{ "kind": "loyalty", … }`. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | no | Printed name. On an ability: its ability word ("Hellfire Retribution"), shown in the English rendering, on the stack and in the log | | `loyaltyCost` | `number \| "-X"` | yes | +N / −N / 0, or "-X" (X chosen on activation) | | `effects` | `EffectDef[]` | yes | The effects, resolved in order (EffectDef[]) | | `modes` | `object[]` | no | Modal choices: each `{ label, effects, cost? }`; `chooseMin` / `chooseMax` bound how many are picked | | `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":"loyalty","loyaltyCost":1,"effects":[],"distinctModeTargets":"player"} ``` The engine reads that minimal form as: “+1: (no effects)”. ## Stock examples - **Loyal Walker Witness** — “+1: You gain 1 life.” ```json {"kind":"loyalty","loyaltyCost":1,"effects":[{"effect":"gainLife","who":"you","amount":1}]} ``` - **Theorist's Proxy** — “When this creature enters, empower Jace 3.” ```json {"kind":"loyalty","loyaltyCost":-1,"effects":[{"effect":"surveil","who":"you","amount":1}]} ``` - **Source Walker** — “0: If you control the planeswalker this ability came from, draw a card.” ```json {"kind":"loyalty","loyaltyCost":0,"effects":[{"effect":"if","condition":{"kind":"controlsSourcePlaneswalker"},"then":[{"effect":"drawCards","who":"you","amount":1}]}]} ``` ## 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