# Drawstep engine · Values · `cardTypesIn` > Card types in — Number of distinct card types among cards in a zone (delirium). 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#cardTypesIn ## Where it goes A number: `{ "kind": "cardTypesIn", … }` wherever a ValueDef is accepted (`amount`, `power`, `max`, `count` …); a plain integer is also a ValueDef. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `zone` | `"battlefield" \| "hand" \| "graveyard" \| "library" \| "exile" \| "stack" \| "command"` | yes | A zone name (battlefield, hand, graveyard, library, exile, stack, command) | | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | Which player(s) — a player selector (default `you`) | ## Minimal form ```json {"kind":"cardTypesIn","zone":"battlefield"} ``` The engine reads that minimal form as: “the number of card types among cards on the battlefield”. ## Stock examples - **Types Values** — “You gain life equal to the number of card types among cards in your graveyard.” ```json {"kind":"cardTypesIn","zone":"graveyard","who":"you"} ``` - **Scavenger Study** — “Scavenger Study's power is equal to 1 plus the number of card types among cards in your opponents' graveyards.” ```json {"kind":"cardTypesIn","zone":"graveyard","who":"eachOpponent"} ``` - **Nethergoyf** — “Nethergoyf's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1.” ```json {"kind":"cardTypesIn","zone":"graveyard","who":"you"} ``` ## 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