> 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/combat.md).

# Combat, Damage, and Death Triggers

Each trigger section uses the same Context terminology as the [Power Triggers](/configs/triggers.md) index.

## `on-attack`

Runs when the powered mob is responsible for damage, including owned indirect damage.

| Context             | Value                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------------- |
| Entity roles        | `SOURCE` is the powered attacker; `SKILL` is the direct damager; `TARGET` is the victim. |
| Event-specific data | Provides mutable damage and damage cause/origin context.                                 |

***

## `on-melee-attack`

Runs only when the powered mob is the direct damager.

| Context             | Value                                                     |
| ------------------- | --------------------------------------------------------- |
| Entity roles        | `SOURCE` and `SKILL` are the mob; `TARGET` is the victim. |
| Event-specific data | Provides mutable damage and melee context.                |

***

## `on-damage`

Runs when the powered mob receives any damage.

| Context             | Value                                                                                                                     |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Entity roles        | `TARGET` is the powered mob; `SOURCE` is the resolved attacker when present; `SKILL` is direct damager or owner fallback. |
| Event-specific data | Includes environmental damage and mutable damage context.                                                                 |

***

## `on-damage-by-entity`

Runs when the powered mob receives entity-caused damage.

| Context             | Value                                                                                  |
| ------------------- | -------------------------------------------------------------------------------------- |
| Entity roles        | `TARGET` is the powered mob; `SOURCE` is resolved attacker; `SKILL` is direct damager. |
| Event-specific data | Does not run for environment-only damage.                                              |

***

## `on-regain`

Runs when the powered mob regains health.

| Context             | Value                                        |
| ------------------- | -------------------------------------------- |
| Entity roles        | All entity roles resolve to the powered mob. |
| Event-specific data | Provides mutable regain amount.              |

***

## `on-combust`

Runs when the powered mob is combusted.

| Context             | Value                                            |
| ------------------- | ------------------------------------------------ |
| Entity roles        | All entity roles resolve to the powered mob.     |
| Event-specific data | Provides mutable duration and combustion origin. |

***

## `on-death`

Runs when the powered mob dies.

| Context             | Value                                                                    |
| ------------------- | ------------------------------------------------------------------------ |
| Entity roles        | All entity roles resolve to the powered mob.                             |
| Event-specific data | Provides death result, drops/experience, and supported revival behavior. |
