# Drawstep engine · Effects · `vote` > Vote — Each player votes; winner = most-voted option(s) run once, each = run once per vote (CR 701.38). 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#vote ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "vote", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `options` | `({ label: string; effects: EffectDef[] })[]` | yes | Named options; empty when players vote for a player (forPlayer) or an object (forObject) | | `tally` | `"winner" \| "each"` | no | winner: most-voted option(s) run once; each: run once per vote with current bound to the voter, an option's votes in APNAP order; afterwards the union of the votes' selections is the affected selection (CR 701.38, 101.4, 608.2c) | | `tieOption` | `number` | no | CR 701.38: designated winner when the vote is tied | | `extraVotes` | `ValueDef` | no | Extra votes the controller gets | | `secret` | `boolean` | no | CR 701.38a, 101.4: each player secretly votes, then all votes are revealed together | | `forPlayer` | `{ otherThanVoter?: boolean }` | no | CR 701.38a: players vote for a player; read the votes each player received with the value votes (player) | | `forObject` | `TargetDef` | no | CR 701.38a, 608.2c: players vote for one of these objects; the object(s) with the most votes or tied for most become the affected selection | ## Minimal form ```json {"effect":"vote","options":[]} ``` The engine reads that minimal form as: “starting with you, each player votes for ”. ## Stock examples - **Dilemma Witness** — “Starting with you, each player votes for strength or pain. For each strength vote, you gain 3 life. For each pain vote, each opponent loses 1 life.” ```json {"effect":"vote","options":[{"label":"strength","effects":[{"effect":"gainLife","amount":3}]},{"label":"pain","effects":[{"effect":"loseLife","who":"eachOpponent","amount":1}]}],"tally":"each"} ``` - **Council Witness** — “Starting with you, each player votes for strength or wisdom. If strength gets more votes, you gain 3 life. If wisdom gets more votes or the vote is tied, draw a card.” ```json {"effect":"vote","options":[{"label":"strength","effects":[{"effect":"gainLife","amount":3}]},{"label":"wisdom","effects":[{"effect":"drawCards","amount":1}]}],"tieOption":1} ``` - **Custodi Squire** — “When this creature enters, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.” ```json {"effect":"vote","options":[],"forObject":{"of":"object","mode":"all","zone":"graveyard","filter":{"anyTypes":["Artifact","Creature","Enchantment"],"owner":"you"}}} ``` ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [Filters & targets](https://drawstep.xyz/wiki/mtg/targets.md) — how `target` / `filter` select objects and players (selection algebra) - [Values](https://drawstep.xyz/wiki/mtg/values.md) — every number kind an `amount` accepts - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the steps a nested `effects` / `then` list may contain - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive