# Drawstep engine · Keyword abilities & simple keywords · `affinity` > Affinity — Affinity for [text] (CR 702.41): costs {1} less for each permanent you control matching the filter. 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/keywords#affinity ## Where it goes One entry of `keywordAbilities[]`: `{ "keyword": "affinity", … }`. Plain keywords with no parameter are strings in `keywords[]`. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `filter` | `ObjectFilter` | yes | Which objects (ObjectFilter; set fields AND together) | ## Minimal form ```json {"keyword":"affinity","filter":{"types":["Creature"]}} ``` The engine reads that minimal form as: “Affinity for creatures”. ## Stock examples - **Sojourner's Companion** — “Artifact landcycling {2}” ```json {"keyword":"affinity","filter":{"types":["Artifact"]}} ``` - **Frogmite** — “Affinity for artifacts (This spell costs {1} less to cast for each artifact you control.)” ```json {"keyword":"affinity","filter":{"types":["Artifact"]}} ``` - **Sami, Wildcat Captain** — “Spells you cast have affinity for artifacts.” ```json {"keyword":"affinity","filter":{"types":["Artifact"]}} ``` ## Related - [Keyword abilities & simple keywords](https://drawstep.xyz/wiki/mtg/keywords.md) — the whole topic - [Filters & targets](https://drawstep.xyz/wiki/mtg/targets.md) — how `target` / `filter` select objects and players (selection algebra) - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive