# Drawstep engine · Conditions · `compare` > Compare — e.g. “1 is at least 1”. 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#compare ## Where it goes A condition: `{ "kind": "compare", … }` — 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`. Printed words that point here (search aliases): if greater than at least equal threshold. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `a` | `ValueDef` | yes | The first operand | | `op` | `">=" \| "<=" \| "==" \| "!=" \| ">" \| "<"` | yes | Comparison of `a` with `b` | | `b` | `ValueDef` | yes | The second operand | ## Minimal form ```json {"kind":"compare","a":1,"op":">=","b":1} ``` The engine reads that minimal form as: “1 is at least 1”. ## Stock examples - **Humming-** — “Whenever you attack with two or more creatures,” ```json {"kind":"compare","a":{"kind":"count","filter":{"controller":"you","attacking":true}},"op":">=","b":2} ``` - **Enchantment Condition Study** — “” ```json {"kind":"compare","a":{"kind":"count","filter":{"types":["Enchantment"]}},"op":">=","b":1} ``` - **Graveyard Condition Study** — “” ```json {"kind":"compare","a":{"kind":"count","zone":"graveyard","player":"you"},"op":">=","b":8} ``` ## 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