# Drawstep engine wiki — Layouts & multi-face cards > Transform, modal DFCs, adventures, split cards, Sagas, Classes, levelers, meld, prepare, dungeons and the Un-set layouts. Engine: Magic: The Gathering (`mtg`). Page: https://drawstep.xyz/wiki/mtg/layouts · Raw Markdown: https://drawstep.xyz/wiki/mtg/layouts.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. ## Layouts and other definitions Layouts (`layout`): - `normal` — A single-faced card. - `transform` — Double-faced card that transforms; `faces[0]` front, `faces[1]` back. - `modal_dfc` — Modal double-faced card: cast either face. - `adventure` — Creature with an Adventure half in `faces[1]`. - `split` — Two halves in `faces`, each castable (fuse / aftermath via keyword abilities). - `flip` — Kamigawa flip card; the flipped half is `faces[1]`. - `saga` — Saga enchantment with `chapter` triggers. - `token` — A token definition that `createToken` can reference by `tokenDefId`. - `class` — Class enchantment with `classLevels[]`. - `leveler` — Level-up creature with `levels[]` bands and a `levelUp` keyword ability. - `meld` — Meld half with `meld: { partner, into }`. - `emblem` — An emblem definition (command zone). - `prepare` — Prepare creature; `faces[1]` is the attached spell. - `dungeon` — A dungeon with `rooms[]`. - `host` — Unstable host creature with a `banner` ability. - `augment` — Unstable augment card with an `augment` block. - `stickers` — Unfinity sticker sheet (`stickers`). **ClassLevelDef** | Field | Type | Required | Description | |---|---|---|---| | `level` | `number` | yes | The level this entry grants (2, 3, …) | | `cost` | `{ oneOf?: CostDef[]; chooseX?: object; mana?: string; ownManaCost?: boolean; genericAmount?: ValueDef; tapSelf?: boolean; untapSelf?: boolean; unattachSelf?: boolean; payLife?: ValueDef; getPoison?: ValueDef; othersGainLife?: object; draw?: ValueDef; addMana?: string; opponentCreatesToken?: object; opponentCounter?: object; damageFromSource?: ValueDef; sacrificeSelf?: boolean; sacrificeTogether?: ObjectFilter[]; sacrifice?: TargetDef; returnToHand?: TargetDef; discard?: ValueDef; discardRandom?: boolean; reveal?: ObjectFilter; revealCards?: object; discardHand?: boolean; discardSelf?: boolean; addCountersSelf?: object; removeCounters?: object; mill?: ValueDef; exertSelf?: boolean; revealSelf?: boolean; revealChoice?: boolean \| string; tapOthers?: object; untapOthers?: object; exileSelfFromGraveyard?: boolean; exileGraveyard?: boolean; exileTop?: ValueDef; payCounters?: object; exileOthers?: object; moveCards?: object; exileSelf?: boolean; collectEvidence?: ValueDef; forage?: boolean; behold?: string; returnUnblockedAttacker?: boolean; discardMatching?: ObjectFilter; linkedToGraveyard?: ObjectFilter; blight?: ValueDef; waterbend?: boolean; xManaColor?: "W" \| "U" \| "B" \| "R" \| "G"; manaColor?: "W" \| "U" \| "B" \| "R" \| "G" \| "chosen" }` | yes | Cost to gain this level (sorcery speed, from the previous level) | | `abilities` | `AbilityDef[]` | no | Abilities (AbilityDef[]), the same shapes as a card's own | | `keywords` | `string[]` | no | Plain keyword strings granted at this level | **LevelBandDef** | Field | Type | Required | Description | |---|---|---|---| | `min` | `number` | yes | Minimum number of selections / required amount | | `max` | `number` | no | Omit for "LEVEL N+" | | `power` | `number \| string` | no | Power (a number, or a string such as "*" for characteristic-defining values) | | `toughness` | `number \| string` | no | Toughness (a number, or a string such as "*" for characteristic-defining values) | | `types` | `string[]` | no | Types the object has in this band (station: ["Artifact", "Creature"]) | | `keywords` | `string[]` | no | Plain keyword strings granted at this level | | `keywordAbilities` | `KeywordAbilityDef[]` | no | Parametrised keyword abilities granted at this level | | `abilities` | `AbilityDef[]` | no | Abilities (AbilityDef[]), the same shapes as a card's own | **MeldDef** | Field | Type | Required | Description | |---|---|---|---| | `partner` | `string` | yes | Name of the card this melds with | | `into` | `string` | yes | Library id of the melded card definition | **DungeonRoomDef** | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | yes | Printed name. On an ability: its ability word ("Hellfire Retribution"), shown in the English rendering, on the stack and in the log | | `effects` | `EffectDef[]` | yes | The effects, resolved in order (EffectDef[]) | | `next` | `number[]` | yes | Indices of the rooms reachable from this one (empty = final room) | **AugmentDef** | Field | Type | Required | Description | |---|---|---|---| | `cost` | `{ oneOf?: CostDef[]; chooseX?: object; mana?: string; ownManaCost?: boolean; genericAmount?: ValueDef; tapSelf?: boolean; untapSelf?: boolean; unattachSelf?: boolean; payLife?: ValueDef; getPoison?: ValueDef; othersGainLife?: object; draw?: ValueDef; addMana?: string; opponentCreatesToken?: object; opponentCounter?: object; damageFromSource?: ValueDef; sacrificeSelf?: boolean; sacrificeTogether?: ObjectFilter[]; sacrifice?: TargetDef; returnToHand?: TargetDef; discard?: ValueDef; discardRandom?: boolean; reveal?: ObjectFilter; revealCards?: object; discardHand?: boolean; discardSelf?: boolean; addCountersSelf?: object; removeCounters?: object; mill?: ValueDef; exertSelf?: boolean; revealSelf?: boolean; revealChoice?: boolean \| string; tapOthers?: object; untapOthers?: object; exileSelfFromGraveyard?: boolean; exileGraveyard?: boolean; exileTop?: ValueDef; payCounters?: object; exileOthers?: object; moveCards?: object; exileSelf?: boolean; collectEvidence?: ValueDef; forage?: boolean; behold?: string; returnUnblockedAttacker?: boolean; discardMatching?: ObjectFilter; linkedToGraveyard?: ObjectFilter; blight?: ValueDef; waterbend?: boolean; xManaColor?: "W" \| "U" \| "B" \| "R" \| "G"; manaColor?: "W" \| "U" \| "B" \| "R" \| "G" \| "chosen" }` | yes | Augment cost (paid from hand, reveal; sorcery speed) | | `head` | `{ kind: "triggered"; trigger: TriggerDef; optional?: boolean } \| { kind: "activated"; cost: CostDef; timing?: "instant" \| "sorcery" }` | yes | The head that replaces the host's "When this creature enters," banner | | `power` | `number` | yes | Power modifier ("+1") | | `toughness` | `number` | yes | Toughness modifier ("+2") | | `instantSpeed` | `boolean` | no | The augment can be combined at instant speed | **StickerSheetDef** | Field | Type | Required | Description | |---|---|---|---| | `names` | `string[]` | yes | Name sticker words | | `artCount` | `number` | yes | Number of art stickers | | `abilities` | `({ cost: number; text: string; keywords?: string[]; keywordAbilities?: KeywordAbilityDef[]; abilities?: AbilityDef[] })[]` | yes | The sheet's ability stickers: each with its ticket cost, its text and the keywords / abilities it grants | | `pt` | `({ cost: number; power: number; toughness: number })[]` | yes | Power/toughness stickers: each `{ cost, power, toughness }` | **TokenSpec** (inline in `createToken.token`) | Field | Type | Required | Description | |---|---|---|---| **ChoiceSpec** (`chooseAsEnters[]`) | Field | Type | Required | Description | |---|---|---|---| | `who` | `"eachPlayer"` | no | CR 101.4, 614.12: each player publicly chooses a named option in APNAP order. A choseOption condition with who reads that player's answer for this source | | `opponentsOnly` | `boolean` | no | Choose an opponent of the ability controller (CR 102.2, 608.2d) | | `kind` | `"option" \| "creatureType" \| "color" \| "cardName" \| "basicLandType" \| "landType" \| "cardType" \| "landNonland" \| "oddEven" \| "number" \| "player"` | yes | CR 608.2d: option selects one of the explicit named options; collect retains each player's answer | | `from` | `ObjectFilter` | no | Choose only colors of matching objects (CR 105.1, 608.2d) | | `zone` | `"battlefield" \| "hand" \| "graveyard" \| "library" \| "exile" \| "stack" \| "command"` | no | Zone containing the color sources; defaults to battlefield (CR 400.1) | | `excludePreviouslyChosen` | `boolean` | no | Exclude earlier values chosen by this source object; reset on zone changes (CR 608.2d, 400.7) | | `options` | `string[]` | no | Explicit legal values, such as a printed list of card names (CR 608.2d) | | `exclude` | `string[]` | no | Forbidden choice values; colors use W/U/B/R/G codes (CR 608.2d) | | `filter` | `{ types?: string[]; notTypes?: string[]; anyTypes?: string[] }` | no | Printed card-type restrictions on a card name (CR 201.4a) | | `key` | `string` | no | Storage key when several choices share a kind | | `secret` | `boolean` | no | CR 101.4, 607.2d: the choice is made without showing it to the other players; a revealChoice cost makes it public (Emissary of Grudges, Guardian Archon) | | `beforeGame` | `"commander"` | no | "If ~ is your commander, choose a color before the game begins." (CR 903.3, 103.6): made as the game begins, before the opening hands, for a commander (Clara Oswald); stored like an as-enters choice | | `label` | `string` | no | Label shown for this choice | | `min` | `number` | no | Minimum number of selections / required amount | | `max` | `number` | no | Maximum number of selections |