# Drawstep engine · Statics & layers · `abilityCostModifier` > Ability cost modifier — Activated abilities of the affected objects cost a signed generic amount more/less (CR 602.2b, 601.2f). 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/statics#abilityCostModifier ## Where it goes The `effect` of a static ability (or one of its `effects`): `{ "kind": "static", "effect": { "type": "abilityCostModifier", … } }`. Applied continuously through the layer system. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `to` | `TargetDef` | yes | What it applies to (TargetDef) | | `amount` | `ValueDef` | yes | How many / how much (integer or ValueDef) | ## Minimal form ```json {"type":"abilityCostModifier","to":{"of":"object","mode":"self"},"amount":1} ``` The engine reads that minimal form as: “activated abilities of ~ cost {1} more to activate”. ## Stock examples - **Creature Ability Discount** — “Activated abilities of artifacts you control cost {X} less to activate, where X is the number of creatures you control.” ```json {"type":"abilityCostModifier","to":{"of":"object","mode":"all","filter":{"types":["Artifact"],"controller":"you"}},"amount":{"kind":"math","op":"*","a":-1,"b":{"kind":"count","filter":{"types":["Creature"],"controller":"you"}}}} ``` - **Sam, Loyal Attendant** — “Activated abilities of Foods you control cost {1} less to activate.” ```json {"type":"abilityCostModifier","to":{"of":"object","mode":"all","filter":{"subtypes":["Food"],"controller":"you"}},"amount":-1} ``` - **Oppressive Rays** — “Activated abilities of enchanted creature cost {3} more to activate.” ```json {"type":"abilityCostModifier","to":{"of":"object","mode":"host"},"amount":3} ``` ## Related - [Statics & layers](https://drawstep.xyz/wiki/mtg/statics.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 - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive