# Drawstep engine wiki — Common mistakes > What goes wrong most often when converting cards, and how to spot it in the Explain view. Engine: Magic: The Gathering (`mtg`). Page: https://drawstep.xyz/wiki/mtg/mistakes · Raw Markdown: https://drawstep.xyz/wiki/mtg/mistakes.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. ## Common mistakes - **Using "all" when the text says "target".** `mode: "all"` never prompts and can't be responded to with a different target; "target creature" must be `mode: "chosen"` (the default). - **Using "chosen" for resolution-time choices.** "Return a creature card from your graveyard to your hand" does not target: use `mode: "choose"` with `zone: "graveyard"`. - **Declaring a combination unsupported.** "Exile a card at random from an opponent's hand" is not a missing primitive: `exile` takes any TargetDef, and `mode: "random"` × `zone: "hand"` × `player: "target"` + `playerTarget` compose like every other selection (see the selection algebra under **Filters & targets**). Build the combination and validate it before saying the engine cannot do something. - **Calling a conditional discount impossible.** "If ~ is cast during an opponent's combat phase, you may reduce its cost by {1} for each attacking creature; it returns to your hand at the next end step when cast this way" is an `alternativeCost` keyword: `{ keyword: "alternativeCost", cost: {}, manaCostLess: { kind: "count", filter: { types: ["Creature"], attacking: true } }, condition: { kind: "all", conditions: [{ kind: "not", condition: { kind: "isYourTurn" } }, { kind: "phase", is: "combat" }] } }` — the mana cost is reduced as it is cast (generic mana only) — and the rider is an enters trigger with `condition: { kind: "castWith", alternative: "alternativeCost" }` creating a `delayedTrigger` at the next `endStep` that moves it to `hand`. A permanent discount is a `costModifier` static with `filter: { self: true }`. - **A modal trigger without `effects`.** A `triggered` ability's `effects` is required even when everything happens in `modes`: write `"effects": []`. The gate refuses the card with "abilities.N.effects — Required" (on a multi-face card, "faces.0.abilities.N.effects"). - **Forgetting `filter.self` on "when ~ enters".** `{ event: "enters" }` alone triggers for *every* object entering; add `filter: { self: true }`. - **Forgetting `by: "you"` on turn-based triggers.** "At the beginning of your upkeep" is `{ event: "upkeep", by: "you" }`; without `by` the engine treats it as each player's upkeep. - **Writing a static as a one-shot.** "Creatures you control get +1/+1" is a `static` `modifyPT`, not a `spell` effect with `duration: "permanent"`. - **Splitting one layered ability into several statics.** Humility-style text (lose abilities *and* set P/T) must be one static with two `effects`, or the parts can separate under CR 613.6. - **Splitting one simultaneous action into several effects.** "Deals 1 damage to each opponent and each creature they control", "destroy target artifact and target enchantment", "put a +1/+1 counter and a lifelink counter on it" and "you and that player each create three tokens" are each **one** event: use one effect with a compound target (`anyOf`, several target slots on the same effect, or a combined filter), never two effects in sequence. Two effects make two events, so lifelink gains twice, enrage and "one or more" triggers fire twice, and a regeneration shield or indestructible granted by the first part changes the second. Printed "then" / separate sentences *are* sequential and stay separate effects. - **"If you do" / "when you do" on the action, not the answer.** "You may sacrifice a creature. If you do, …" gates on the sacrifice actually happening (`optional` + `ifYouDo`), not on the player answering yes; with nothing to sacrifice, the rest doesn't happen. - **Widening a filter.** "Nonbasic land" is `{ types: ["Land"], notSupertypes: ["Basic"] }`, not `{ types: ["Land"] }`. The engine enforces what you wrote. - **Leaving `who` to default on opponent effects.** "Each opponent loses 2 life" needs `who: "eachOpponent"`; the default is you. - **Hard-coding derived numbers.** "Draw cards equal to the number of Elves you control" must be a `count` value, never a constant guessed from the test board. - **Keywords as text.** "Flying" belongs in `keywords`, not in a `grantKeyword` static on itself, and not only in `text` (which is display only). - **Auras without `enchant`, Equipment without `equip`,** Sagas without `chapter` triggers, planeswalkers without `loyalty`: the lint warnings say so — fix them before saving. - **Dumping a clause into `unparsed` when its timing is clear.** "When this enters, attach an Aura from your hand at no cost" has a trigger the engine can run; if the action really were inexpressible it would be a `tableRuling` *effect* inside that trigger, not an `unparsed` line. `unparsed` is for text with no capturable timing at all. - **Pausing play for a format rule.** "You may have cards of any color in a deck with ~ as commander" is a deck-construction sentence: a standalone `tableRuling` with `onDemand: true`, never a step that interrupts casting. - **Dropping the ability word.** "Totality — Remove all counters …" keeps `name: "Totality"` on the ability so the stack and the log can name it. - **The card acting where the text names someone else.** "When a creature deals combat damage to ~, it deals that much damage to itself" — the *creature* deals the damage. `dealDamage` is dealt by the card unless `from` says otherwise: `from: { of: "object", mode: "triggeringOther" }` (the trigger's other object, named on the trigger with `other: { types: ["Creature"] }`), and the recipient is `target: { of: "object", mode: "triggeringOther" }` too. The engine's reading "it deals that much damage to itself" with the card as "it" is a different card — the Studio's read-back resolves each side's pronouns before comparing them. - **A step trigger for an event.** "When declaring ~ as an attacker" / "whenever ~ attacks" is `{ event: "attacks", filter: { self: true } }` — not `declareAttackersStep` or `beginCombat` (those fire with no attack at all) and not `youAttack` (you attacking with anything). - **"That much damage" as excess.** `triggerAmount` is the damage the trigger saw; `excessDamageThisWay` is only the part beyond lethal. - **A mode where the `of` goes.** `target: { of: "triggeringOther" }` is wrong twice over: `of` says *what kind of thing* is selected (object / player / spell / any) and `mode` says *which one* — `{ of: "object", mode: "triggeringOther" }`. - **Text where a structure belongs.** An ability is an object `{ kind: … }`, an effect an object `{ effect: … }`, a token a complete object; a sentence, or the JSON of one as a *string*, is refused by the gate with the string shown back. - **Rewording `text` to satisfy the gate.** The printed text is the card as the player has it. When the engine's reading differs, change the abilities; the Studio notices when the text changes between attempts. - **The token's text on the creating card.** "Create a 1/1 red Devil creature token with 'When this creature dies, it deals 1 damage to any target'" is one `createToken` whose `token.abilities` holds the dies trigger — not a second ability of the card that creates it. A `tokenDefId` alone (`{ "name": "Devil", "tokenDefId": "devil" }`) reads back as "a Devil token" and fails the comparison: write the inline spec in full and add the link on top (see **Tokens**). - **A token card with a mana cost.** A token card is `layout: "token"` with no `manaCost`; its `id` is the lower-case name and the server renames it to `custom::` on save, re-pointing the `tokenDefId` of the cards that name it. - **Inventing a native id.** `{ "effect": "native", "id": "magic.myNewThing" }` is rejected on save and at the deal: only the ids the server registers exist (the `native` page of each kind lists them with their params). A clause nothing implements is a `tableRuling` step, never a made-up native. - **Approximating.** If a clause cannot be expressed, climb the honesty ladder (tableRuling step → on-demand ruling → `unparsed`) and move on. A partially enforced card is honest; a wrong card is not.