# Drawstep engine · Effects · `winGame` > Win game — e.g. “you win the game”. 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/effects#winGame ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "winGame", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `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 {"effect":"winGame"} ``` The engine reads that minimal form as: “you win the game”. ## Stock examples - **Mechanized Production** — “At the beginning of your upkeep, create a token that's a copy of enchanted artifact. Then if you control eight or more artifacts with the same name as one another, you win the game.” ```json {"effect":"winGame","who":"you"} ``` - **Halo Fountain** — “{W}{W}{W}{W}{W}, {T}, Untap fifteen tapped creatures you control: You win the game.” ```json {"effect":"winGame","who":"you"} ``` ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive