# Drawstep engine wiki — Translating a card step by step > The method: split the Oracle text, pick ability kinds, map clauses to blocks, targets vs. choices, durations, validate, playtest. Engine: Magic: The Gathering (`mtg`). Page: https://drawstep.xyz/wiki/mtg/translating · Raw Markdown: https://drawstep.xyz/wiki/mtg/translating.md · Complete AI pack (every topic in one document, with the output contract and worked examples): https://drawstep.xyz/wiki/drawstep-mtg-ai-pack.md. This page is generated from Drawstep's card schema; field names and discriminators are exact. A card definition is one JSON object; anything the vocabulary cannot express goes verbatim into `unparsed` instead of being approximated. ## Translating a card step by step 1. **Fill in the characteristics first.** `name`, `manaCost`, `colors`, `supertypes` / `types` / `subtypes`, `power` / `toughness`, `loyalty` or `defense`, and the printed `text`. These drive casting, legality and rendering without any ability. 2. **Split the rules text into abilities.** Each paragraph (line) of Oracle text is one ability; keyword lines ("Flying, trample") are split on commas. Reminder text in parentheses is dropped. In the Studio, paste the text into **Rules text** to get one to-do chip per line. 3. **Classify each line.** - Plain keyword → a string in `keywords` (`"Flying"`, `"First strike"`, `"Can't be blocked"`). - Keyword with a parameter (cycling {2}, kicker, ward, enchant, protection, flashback, …) → `keywordAbilities`. - "When / Whenever / At the beginning of" → `triggered` (pick the `event`, then `by` / `filter` / `condition`). - "[cost]: [effect]" → `activated` (`cost` parts; `timing: "sorcery"` for "Activate only as a sorcery"). - "+N / −N:" on a planeswalker → `loyalty`. - A sentence describing an ongoing state ("Creatures you control get +1/+1", "~ can't be countered", "You have hexproof") → `static`. - "enters tapped / with counters", "if ~ would …, instead" → `replacement`. - The spell's own text on an instant or sorcery → one `spell` ability. 4. **Map clauses to blocks.** Inside an ability, each verb phrase is one effect, in printed order: "Draw a card, then discard a card" → `drawCards` then `discard`. Search the palette by verb ("destroy", "exile", "return") or noun ("token", "counter"). "If … , …" wraps effects in `if`; "You may …" in `optional`; "You may pay … If you do" in `mayPay`; "unless … pays" in `unlessPays`. 5. **Targets vs. choices.** The word "target" means a TargetDef with `mode: "chosen"` — chosen when the spell/ability goes on the stack, re-checked on resolution. "Choose a …", "a creature card from your graveyard", "up to one other …" without "target" → `mode: "choose"`. "Each / all" → `mode: "all"`. The card itself → `mode: "self"`; what it is attached to → `mode: "host"`. Add `min` / `max` for "up to two", "any number of". 6. **Numbers and values.** Literal numbers are integers. "X" → `{ "kind": "var", "name": "X" }`. "equal to the number of creatures you control" → `{ "kind": "count", "filter": {…} }`. "its power" (of the affected object) → `{ "kind": "affected", "property": "power" }`; "~'s power" → `{ "kind": "sourcePower" }`. Devotion, domain, storm, turn history, hand size, life totals and arithmetic all have value kinds — never bake a derived number into a constant. 7. **Durations.** "until end of turn" is the default for layer-affecting one-shots; write `"permanent"` when the text has no duration ("becomes a Forest" with no "until"), `"untilYourNextTurn"`, `"endOfCombat"`, `"untilSourceLeaves"` for "for as long as ~ remains on the battlefield". Continuous abilities of permanents are statics, never one-shots with a duration. 8. **Filters say exactly what the text says.** "nonland permanent" → `{ notTypes: ["Land"] }`; "creature or planeswalker" → `{ anyTypes: ["Creature", "Planeswalker"] }`; "another creature you control" → `{ types: ["Creature"], controller: "you", other: true }`; "with power 4 or greater" → `minPower: 4`. Do not widen a filter to make it easier to express. 9. **Validate.** The Studio validates on every change with the engine's own gate (`validateCard`); errors are shown by path and link to the block that owns them. Warnings (an Aura without `enchant`, a Saga without chapter triggers) do not block saving but almost always mean something is missing. 10. **Read it back.** Turn on **Explain** to read the JSON as English and compare it with the printed text, line by line. Choose **Playtest**, build a position where the effect should apply, and choose **Play position**. Cast the card and check its targets and the resulting board. Record a checkpoint for the outcome you expect. 11. **Name the abilities that are printed with a word.** A custom ability word ("Hellfire Retribution — When …") goes into the ability's `name`; the stack, the game log and the English rendering use it. 12. **Climb down the honesty ladder for the rest.** A clause with clear timing but an action the vocabulary lacks becomes a `{ "effect": "tableRuling", "text": "…" }` step inside the otherwise automated ability; a deck-construction / format sentence becomes a standalone `tableRuling` ability with `onDemand: true`; only text with no capturable timing stays verbatim in `unparsed[]` (the Rules text panel does this for you). Never approximate. See **Custom mechanics**.