# Drawstep engine · Values · `manaSpent` > Mana spent — Mana spent to cast the source spell: total, number of colors (converge), or of one color (adamant); `from` restricts to mana from matching producers (CR 106.3). 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/values#manaSpent ## Where it goes A number: `{ "kind": "manaSpent", … }` wherever a ValueDef is accepted (`amount`, `power`, `max`, `count` …); a plain integer is also a ValueDef. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `of` | `"total" \| "colors" \| "color"` | no | Total mana spent, the number of colors spent, or the amount of one `color` | | `color` | `string` | no | A color (W / U / B / R / G) | | `from` | `{ types?: string[]; subtypes?: string[]; supertypes?: string[] }` | no | CR 106.3: count only mana produced by a source with all the given types/subtypes/supertypes, as it existed when it produced the mana ("for each mana from a Treasure spent to cast it", Marut) | | `thisTurn` | `boolean` | no | Total mana spent by the controller to cast spells this turn | ## Minimal form ```json {"kind":"manaSpent"} ``` The engine reads that minimal form as: “the amount of mana spent to cast ~”. ## Stock examples - **Adamant Test** — “You gain 1 life. If at least three red mana was spent to cast this spell, you gain 4 life instead.” ```json {"kind":"manaSpent","of":"color","color":"R"} ``` - **Spent Colors** — “Draw X cards, then you gain X life, where X is the number of colors of mana spent to cast this spell.” ```json {"kind":"manaSpent","of":"colors"} ``` - **Marut** — “When this creature enters, if mana from a Treasure was spent to cast it, create a Treasure token for each mana from a Treasure spent to cast it.” ```json {"kind":"manaSpent","from":{"subtypes":["Treasure"]}} ``` ## Related - [Values](https://drawstep.xyz/wiki/mtg/values.md) — the whole topic - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive