> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/configs/triggers.md).

# Power Triggers

A trigger is an `on-...` section inside a mob power. It decides when the power runs and creates the context consumed by Power Conditions, Power Modifiers, and Abilities.

```yaml
on-attack:
  conditions: {}
  modifiers: {}
  abilities: {}
```

EnchantedMobs registers **18 built-in triggers**.

## Reference pages

* [Tick and Lifecycle Triggers](/configs/triggers/lifecycle.md)
* [Combat, Damage, and Death Triggers](/configs/triggers/combat.md)
* [Projectile and Ranged Triggers](/configs/triggers/projectiles.md)
* [Block and Interaction Triggers](/configs/triggers/blocks-interactions.md)
* [Item, Enchanting, and Equipment Triggers](/configs/triggers/items-equipment.md)
* [Movement and Input Triggers](/configs/triggers/movement-input.md)
* [Effects, Air, Food, and Experience Triggers](/configs/triggers/player-state.md)
* [Fishing and Trading Triggers](/configs/triggers/fishing-trading.md)
* [Targeting and Special-Entity Triggers](/configs/triggers/targeting-special.md)

## Common context

| Context    | Meaning                                                                         |
| ---------- | ------------------------------------------------------------------------------- |
| `OWNER`    | The powered mob that owns the power.                                            |
| `SOURCE`   | Entity responsible for the current action.                                      |
| `SKILL`    | Direct carrier or intermediate entity such as a projectile or exploding entity. |
| `TARGET`   | Final affected or inspected entity.                                             |
| `LOCATION` | Main event location.                                                            |
| `EVENT`    | Underlying Bukkit/Paper event.                                                  |
| `TICK`     | Runtime tick for periodic triggers.                                             |

Missing or incompatible context causes dependent conditions, modifiers, or abilities to fail or skip safely.

## Numeric trigger context

Numeric trigger extras are available to context-aware string and mathematical fields as `{key_name}` placeholders. For example, compatible damage triggers provide `{original_damage}`, ranged triggers may provide `{bow_force}`, and targeting contexts may provide `{target_count}`.

A placeholder exists only when the current trigger supplied that value. See [Math Calculate Format](/format/math-calculate-format.md#numeric-trigger-context-placeholders) for the complete list, value types, resolution order, and examples.

## Trigger list

### Tick and Lifecycle Triggers

* [`on-tick`](/configs/triggers/lifecycle.md#on-tick)
* [`on-target-tick`](/configs/triggers/lifecycle.md#on-target-tick)
* [`on-spawn`](/configs/triggers/lifecycle.md#on-spawn)

### Combat, Damage, and Death Triggers

* [`on-attack`](/configs/triggers/combat.md#on-attack)
* [`on-melee-attack`](/configs/triggers/combat.md#on-melee-attack)
* [`on-damage`](/configs/triggers/combat.md#on-damage)
* [`on-damage-by-entity`](/configs/triggers/combat.md#on-damage-by-entity)
* [`on-regain`](/configs/triggers/combat.md#on-regain)
* [`on-combust`](/configs/triggers/combat.md#on-combust)
* [`on-death`](/configs/triggers/combat.md#on-death)

### Projectile and Ranged Triggers

* [`on-shoot-bow`](/configs/triggers/projectiles.md#on-shoot-bow)
* [`on-projectile-launch`](/configs/triggers/projectiles.md#on-projectile-launch)
* [`on-projectile-tick`](/configs/triggers/projectiles.md#on-projectile-tick)
* [`on-projectile-hit`](/configs/triggers/projectiles.md#on-projectile-hit)

### Block and Interaction Triggers

*No built-in triggers.*

### Item, Enchanting, and Equipment Triggers

*No built-in triggers.*

### Movement and Input Triggers

*No built-in triggers.*

### Effects, Air, Food, and Experience Triggers

*No built-in triggers.*

### Fishing and Trading Triggers

*No built-in triggers.*

### Targeting and Special-Entity Triggers

* [`on-target`](/configs/triggers/targeting-special.md#on-target)
* [`on-untag`](/configs/triggers/targeting-special.md#on-untag)
* [`on-explode`](/configs/triggers/targeting-special.md#on-explode)
* [`on-creeper-explode`](/configs/triggers/targeting-special.md#on-creeper-explode)

## Projectile continuity

`on-shoot-bow` and `on-projectile-launch` can capture exact power IDs for a projectile. `on-projectile-tick` and `on-projectile-hit` run only those captured powers and do not reroll the top-level power limit. Replacing a projectile transfers tracking only when the replacement is another projectile.
