# Souls-like Boss Fights: Phases, an Arena and Attacks That Read the Player

> Build an Elden Ring style boss in Unreal Engine 5: a second moveset at a health threshold, an arena that opens and ends the fight, a boss health bar, and attacks that answer what the player does, set up in Blueprint with no C++.

Markdown version of https://rigbak.com/docs/soulslike-combat/boss-fights, a page of the Soulslike Enemy Combat documentation. Link that page when citing it.

> The player walks into the arena, the boss's health bar comes up, and the fight starts. The boss punishes a heal and parries the swing it sees coming, then opens a second moveset when its health drops. Soulslike Enemy Combat builds this from an Enemy AI Config, two Action Sets, one trigger in the level and a few Blueprint nodes.

## The problem

A boss built on a plain Behavior Tree cycles a fixed list of attacks. It swings whether the player is healing or backing off, and the player learns the loop in two tries. Phases turn into a tangle of branches, and you wire the arena, the health bar and the end of the fight again by hand for every boss.

A boss feels smart when it picks each attack by what the player is doing and changes its moveset as the fight goes on. Soulslike Enemy Combat scores every attack against the situation and swaps a moveset with one node, and it ships the arena trigger and the encounter events a boss bar binds to.

---

You need an enemy that already attacks through an Action Set. If you have none, [Getting Started](https://rigbak.com/docs/soulslike-combat/getting-started) builds one in a few minutes, and [Step-by-Step Enemy](https://rigbak.com/docs/soulslike-combat/step-by-step-enemy) gives it a full moveset.

## Set it up (15 minutes)

1. **Make it the boss of the pack**

   Open the boss's **Enemy AI Config** and fill in **Combat Role**.

   In **EnemyConfig_Boss**, under Combat Role, set:

   | Property | Value |
   | --- | --- |
   | Allowed Roles (empty = any) | SEC.Role.Elite |
   | Priority | 200 |
   | Ignore Target Redistribution | true (replaces false) |

   *Elite slots are unlimited, so the boss keeps its role whatever else joins the fight.*

   **Priority** 200 gives it first pick of the roles, and **Ignore Target Redistribution** keeps it on the player it started on while any adds shuffle around.
2. **Give it a second moveset**

   Create a second **Action Set** with the moves for the back half of the fight. In the boss Blueprint, bind **On Vital Changed** on its **SEC Vitals** component. When the **Vital Tag** is `SEC.Vital.Health`, **Old Value** is at or above your threshold and **New Value** is below it, call **Set Runtime Override** on the pawn's **SEC Action Set Component** with the phase-two set. Testing the crossing makes the swap happen once; a test on **New Value** alone runs it again on every later hit. The override beats every other source, the config and any weapon included.
3. **Build the arena**

   Place **BP_SEC_BossArenaTrigger** from the demo's `Demo/Game` folder around the arena. Fill in **Encounter Name** and point **Enemies** at the boss.

   The player walking in opens the fight. Once every listed enemy is dead or gone, the trigger ends it as **Defeated**. Untick **End When Player Leaves** for a fight that follows the player out of the arena.
4. **Play**

   Press Play with the demo's player controller and walk in: the demo's encounter bar, `WBP_SEC_HUD_Encounter`, comes up as the fight opens. Bring the boss under the threshold and run `SEC.Debug.Scoring 1`; the actions listed above it are the phase-two set's.

The trigger itself puts nothing on screen. With your own player controller, add a widget that binds **On Encounter Started** and **On Encounter Ended** on the **SEC Encounter Subsystem**; the demo widget shows how.

---

## Attacks that read the player

The boss scores every attack in its Action Set each time it picks a move. **Tag Score Multipliers** on an action multiply its score while a tag sits on the boss, on its target or on the world, so the same moveset plays differently depending on what the player does.

| The player | The boss | Set this |
| --- | --- | --- |
| Drinks a potion | Lunges in to punish it | On the lunge, a **Tag Score Multipliers** entry for the tag your heal ability puts on the player, at 3.0 |
| Raises a guard | Reaches for its guard break and holds back its light hits | That guard tag at 2.0 on the guard break, and 0.3 on each light attack |
| Reels from a hit | Presses the opening | `SEC.State.Staggered` at 2.5 on a follow-up, held by a **SEC State Tag Window** on the player's hit reaction montage, as the [counter in the parry guide](https://rigbak.com/docs/soulslike-combat/enemy-parry-dodge-counter#hit-back-after-a-parry) reads it |
| Swings at the boss | Parries or dodges the blow it sees coming | A Reaction Set answering `SEC.Stimulus.AttackTelegraphed`, and a **SEC Telegraph Window** on the player's attack montages ([Enemies That Parry, Dodge and Counter](https://rigbak.com/docs/soulslike-combat/enemy-parry-dodge-counter)) |
| Keeps the camera locked on it | Swaps sides or gives ground under the stare | Tick **Swap Strafe on High Threat** and **Adjust Distance by Threat** under **Threat Response** on the boss's Movement Behavior Profile; both ship off ([Threat Detection](https://rigbak.com/docs/soulslike-combat/threat-detection)) |
| Stays out of reach | Closes the gap | A **Distance Scorer** whose range rewards the far band on a lunge ([Action System](https://rigbak.com/docs/soulslike-combat/action-system)) |

The player's tags come from the ability system on the player's pawn. A heal or guard tag is one of your own project's tags, and your own abilities add it. A multiplier of 0 drops a move out of the running while its tag is present.

To stop the boss leaning on one move, set **Max Consecutive Uses** to 2 on it. To keep its heaviest hit out of the opening seconds, set **Initial Cooldown** on that action.

---

## A scripted beat between phases

Some phase changes want a move that lands on your cue rather than the scorer's: a roar, a slam that cracks the floor. Put that action in the phase-two Action Set, with **Selection** set to **Manual Only**. It never wins a poll on its own and waits for a Blueprint to call **Execute Action** with its **Action ID**. Call it right after **Set Runtime Override**, on the same crossing, for a transition the player can read. **Execute Action** looks only in the Action Set in force, so an action left in the phase-one set is not found once the override has swapped.

Add a world tag at the same moment with **Add World Tag**, using a tag of your own for the phase, and give the phase-two openers that tag at 2.0 under **Tag Score Multipliers**. [Common Patterns](https://rigbak.com/docs/soulslike-combat/patterns#the-boss) has the full boss recipe with every number.

---

## A boss with adds

Adds that join the fight take turns with the boss through [Combat Tokens](https://rigbak.com/docs/soulslike-combat/combat-tokens). To let more of them swing during one phase, add an **SEC Token Budget Component** to the player and call **Set Token Budget For This Actor** when the phase opens. [Enemies That Take Turns Attacking](https://rigbak.com/docs/soulslike-combat/enemies-take-turns) covers the group side.

---

## End the fight your own way

A plain **SEC Encounter Trigger** opens the same fight and leaves the ending to you. Bind **On Vital Depleted** on the boss's **SEC Vitals**, and when it reports the health vital, call **End Triggered Encounter** with **Defeated**.

---

## Common questions

**Do I need C++?** No. Every step on this page is a Data Asset, a level actor or a Blueprint node.

**Can phases be StateTree states instead?** Yes. Point the boss's AI Config at a [StateTree](https://rigbak.com/docs/soulslike-combat/statetree) and use its **UpdateActionSet** task to set each phase's moveset as the state starts.

**Does it work in multiplayer?** The boss's decisions run on the server, as every enemy's do ([Multiplayer Enemy AI](https://rigbak.com/docs/soulslike-combat/multiplayer)). The arena trigger reacts to each machine's own player, so every player's screen opens the encounter and its bar as that player walks in.

**Why did it pick that attack?** Run `SEC.Debug.Scoring 1` to see every action's score above the boss, or open its Action Set in the [Action Set Editor](https://rigbak.com/docs/soulslike-combat/action-set-editor) while the game runs and watch each card score live.

---

## Related

| Page | Why |
| --- | --- |
| [Common Patterns](https://rigbak.com/docs/soulslike-combat/patterns#the-boss) | The boss recipe with every number to type |
| [Action System](https://rigbak.com/docs/soulslike-combat/action-system) | Scoring, tag multipliers, manual actions and cooldowns |
| [Vitals](https://rigbak.com/docs/soulslike-combat/vitals) | The health pool and the events a phase swap listens to |
| [Combat Roles](https://rigbak.com/docs/soulslike-combat/combat-roles) | The Elite role and how the rest of the pack works around it |
| [Enemies That Parry, Dodge and Counter](https://rigbak.com/docs/soulslike-combat/enemy-parry-dodge-counter) | Reactions to the player's swings |
