# Drawstep engine · Conditions · `opponentComparison` > Opponent comparison — CR 109.5, 608.2h: compare this quantity evaluated for you against the same quantity for an opponent, or every opponent if each is true; never pool opponents' quantities. 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/conditions#opponentComparison ## Where it goes A condition: `{ "kind": "opponentComparison", … }` — in an `if` effect, a trigger's `condition` (intervening if), a static's `condition` ("as long as"), an activated ability's `onlyIf`, a replacement's `unless`. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `value` | `ValueDef` | yes | The value to store or compare | | `op` | `">" \| "<" \| ">=" \| "<=" \| "=="` | yes | Comparison between your value and the opponent's | | `each` | `boolean` | no | Compare with each opponent individually rather than any one of them | | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | The players compared against (default: your opponents); triggeringPlayer for "that player controls more lands than you" | | `subject` | `"you" \| "opponent"` | no | Whose quantity is on the left of the comparison (default you) | | `difference` | `number` | no | The gap compared: (subject's ? other side's) op difference; default 0 ("an opponent has at least 5 more life than you": subject opponent, op >=, difference 5) | ## Minimal form ```json {"kind":"opponentComparison","value":1,"op":">"} ``` The engine reads that minimal form as: “you have more permanents than an opponent”. ## Stock examples - **Okina Nightwatch** — “As long as you have more cards in hand than each opponent, this creature gets +3/+3.” ```json {"kind":"opponentComparison","value":{"kind":"handSize"},"op":">","each":true} ``` - **Land Compare** — “When this artifact enters, if an opponent controls more lands than you, you gain 4 life.” ```json {"kind":"opponentComparison","value":{"kind":"count","filter":{"types":["Land"]},"player":"you"},"op":"<"} ``` - **Hand Compare** — “When this artifact enters, if you have more cards in hand than each opponent, you gain 3 life.” ```json {"kind":"opponentComparison","value":{"kind":"handSize"},"op":">","each":true} ``` ## Related - [Conditions](https://drawstep.xyz/wiki/mtg/conditions.md) — the whole topic - [Values](https://drawstep.xyz/wiki/mtg/values.md) — every number kind an `amount` accepts - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive