# Statuses

Statuses are temporary effects applied to characters. Buffs, debuffs, damage-over-time, crowd control, shields, and auras are all statuses.

## Creating a Status

Open the Spark Editor, go to **Combat > Statuses** and click **Create New**.

Each status entry has:

| Field        | Description                                   |
| ------------ | --------------------------------------------- |
| Display Name | Name shown in UI.                             |
| Description  | Tooltip text.                                 |
| Icon         | Sprite for the status bar.                    |
| Show In UI   | Whether the status appears in the status bar. |

## Duration

| Field                     | Description                                                           |
| ------------------------- | --------------------------------------------------------------------- |
| Base Duration             | Duration in seconds. Set to 0 for permanent (until manually removed). |
| Persist After Self Death  | Status remains if the affected entity dies.                           |
| Persist After Owner Death | Status remains if the entity that applied it dies.                    |

## Stacking

| Field         | Description                                                    |
| ------------- | -------------------------------------------------------------- |
| Stacking Mode | How multiple applications of this status interact (see below). |
| Max Stacks    | Maximum stack count (only used in Stack mode).                 |

### Stacking Modes

| Mode            | Description                                                                                                      |
| --------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Refresh**     | Reapplication resets the duration to its base value. Only one instance exists.                                   |
| **Extend**      | Reapplication adds the full duration to the remaining time.                                                      |
| **Independent** | Each application creates a separate instance. Multiple copies can exist simultaneously.                          |
| **Replace**     | Reapplication removes the old instance and creates a new one.                                                    |
| **Stack**       | Increases the stack count (up to Max Stacks) and refreshes the duration. Stack count can multiply effect values. |

## Periodic Effects (Ticks)

| Field               | Description                                                                                                        |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Has Periodic Effect | Whether the status ticks periodically.                                                                             |
| Tick Count          | Number of times the effect ticks over the full duration. The tick interval is calculated as duration ÷ tick count. |

## Effect Lists

Statuses have four separate lists of effects that execute at different points in the status lifecycle:

| Effect List              | When It Executes                                            |
| ------------------------ | ----------------------------------------------------------- |
| **On Apply Effects**     | When the status is first applied to an entity.              |
| **On Tick Effects**      | Each time the periodic timer fires (if ticking is enabled). |
| **On End Effects**       | When the status expires naturally (duration runs out).      |
| **On Dispelled Effects** | When the status is removed early by a dispel effect.        |

Each list can contain any combination of the 8 effect types (Damage, Healing, Apply Status, Modify Stat, Knockback, Damage Object, Dispel, Trigger).

## Visual Effects

| Field               | Description                                                                                                         |
| ------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Status VFX Prefab   | A GameObject prefab spawned on the target while the status is active. Automatically destroyed when the status ends. |
| VFX Position Offset | Local position offset for the VFX relative to the target.                                                           |

## Dispel Configuration

| Field            | Description                                                                                                                                |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Can Be Dispelled | Whether this status can be removed by dispel effects. Set to false for effects that should not be removable (e.g., transformation, death). |

## Immunity

| Field              | Description                                                                                                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Grants Immunity To | List of status tags this status grants immunity to while active. For example, a "Cleanse" buff might grant immunity to all statuses tagged "Poison" or "Debuff." |

When a status grants immunity, any new status application matching those tags is blocked and a StatusImmuneEvent is published.

## Rules Integration

| Field        | Description                                                                                             |
| ------------ | ------------------------------------------------------------------------------------------------------- |
| Apply Rules  | Rule modifications applied when the status is applied (e.g., set CAN\_MOVE to false for a root effect). |
| Remove Rules | Rule modifications applied when the status ends (e.g., restore CAN\_MOVE to true).                      |

This connects statuses to the Rules system, letting you control character behavior while a status is active.

## Status Tags

Status tags categorize statuses for grouping, filtering, and immunity. Create them in **Combat > Statuses > Status Tags**.

Each tag has a display name and a color for UI visualization.

Examples: Buff, Debuff, Crowd Control, Damage Over Time, Heal Over Time, Poison, Stun, Slow, Shield, Bleed.

Tags are used by the Dispel effect type to target specific categories of statuses, by the immunity system to block categories of statuses, and by UI to color-code or filter status displays.

## Status Removal

Statuses can be removed for several reasons:

| Reason          | Description                                                                            |
| --------------- | -------------------------------------------------------------------------------------- |
| **Expired**     | Duration ran out naturally. Executes On End Effects.                                   |
| **Dispelled**   | Removed by a Dispel effect. Executes On Dispelled Effects.                             |
| **Manual**      | Removed by code or game logic.                                                         |
| **Death**       | Target entity died.                                                                    |
| **Owner Death** | The entity that applied the status died (unless Persist After Owner Death is enabled). |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sparkframework.dev/documentation/user-guide/plugins/combat/statuses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
