> For the complete documentation index, see [llms.txt](https://soulslike-framework.isik.vip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soulslike-framework.isik.vip/components-managers/ai-only-components/ai-boss-manager.md).

# AI Boss Manager

<div align="left"><figure><img src="/files/Pxb9F1D6r6SRb7Q5t5rd" alt=""><figcaption></figcaption></figure></div>

The **AI Boss Manager (AC\_AI\_Boss)** component is designed for handling advanced boss behavior, allowing for dynamic phase transitions based on various conditions, such as health thresholds or custom triggers. It extends upon the standard [**AI Combat Manager**](/components-managers/ai-only-components/ai-combat-manager.md), overriding its **Ability system** to support **phase-based Ability sets**, cinematic transitions, and boss-specific mechanics. This ensures that boss encounters feel more engaging and responsive to the player's actions.

It is added to the **Soulslike Boss (B\_Soulslike\_Boss)** class by default.

### **How It Works**

* **Phase Management**
  * The component listens for **stat updates** and evaluates whether a phase transition should be triggered based on a predefined condition (e.g., health dropping below a threshold).
  * If a phase transition is required, it sets the new phase and updates the boss’s ability set accordingly.
  * It supports playing a **cinematic sequence, music, or an animation montage** before resuming combat.
* **Event Bindings & Damage Handling**
  * It binds to **OnStatUpdated** events to track changes in stats that may trigger a phase change.
  * Additionally, it listens for **OnDeath**, ensuring that once a boss is defeated, necessary actions such as **unlocking doors**, **playing a final death cinematic**, or **displaying a "Boss Defeated" message** are executed.
* **Ability Overrides**
  * Dynamically **overrides abilities** at each phase, replacing the boss's current ability set with a new one appropriate for the given phase.
  * This allows bosses to change their combat behavior as the fight progresses, introducing **new mechanics, attack patterns, or defensive maneuvers**.
* **Death Handling**
  * Upon death, it marks the fight as inactive and attempts to **play a death sequence**.
  * If applicable, nearby **boss doors** will be unlocked.
  * A **delayed screen message** (e.g, "Boss Defeated") can be displayed after a configurable delay.

### Example Usage

<figure><img src="/files/GeBGDZz8JYOJXKTSwVgl" alt=""><figcaption></figcaption></figure>

{% embed url="<https://youtu.be/X4sAa8LQ6KU>" %}
