> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rpgmobs.frotty27.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Abilities

> Configuring the special combat abilities that elites can use.

`abilities.yml` defines the 9 combat abilities that make elites more than just stat-boosted mobs. Each ability has its own activation rules, cooldowns, and per-tier scaling.

## Common Fields

Every ability shares these settings:

| Field                    | What it does                                                                                              |
| :----------------------- | :-------------------------------------------------------------------------------------------------------- |
| `isEnabled`              | Master toggle for the ability.                                                                            |
| `chancePerTier`          | Probability that an elite of each tier gets this ability when it spawns. `1.0` = guaranteed.              |
| `cooldownSecondsPerTier` | Minimum time between uses for each tier.                                                                  |
| `gate`                   | Weapon category restrictions. Only mobs holding weapons from the allowed categories can use this ability. |

### Ability Gating

The ability gating system controls which elites can use each ability. When a mob spawns as an elite, RPGMobs checks three conditions before granting an ability:

1. **Linked mob rule keys** -- the elite's matched mob rule key must appear in the ability's `linkedMobRuleKeys` list.
2. **Per-entry tier enablement** -- each linked entry has its own per-tier toggle array. The entry's tier toggle must be enabled for the elite's tier.
3. **Weapon category gate** -- the elite's equipped weapon must belong to one of the ability's `allowedWeaponCategories`.

If all three checks pass, the ability is granted.

```yaml theme={null}
charge_leap:
  isEnabled: true
  linkedMobRuleKeys:
    - "category:Skeletons"
    - "category:Zombies"
    - "category:Goblins"
    - "category:Trorks"
    - "category:Outlanders"
    - "category:Wraiths"
  excludeLinkedMobRuleKeys:
    - "Skeleton_Incandescent_Head"
    - "Crawler_Void"
    - "Eye_Void"
  gate:
    allowedWeaponCategories:
      - "category:Axes"
      - "category:Battleaxes"
      - "category:Swords"
      - "category:Longswords"
      - "category:Clubs"
      - "category:Daggers"
      - "category:Maces"
      - "category:Spears"
```

* **`linkedMobRuleKeys`** accepts both individual mob rule keys (e.g. `"Goblin_Duke"`) and category keys (e.g. `"category:Skeletons"`). A category key includes all mob rules within that category.
* **`excludeLinkedMobRuleKeys`** removes specific mob rule keys that would otherwise be included by a category. For example, `"Skeleton_Incandescent_Head"` is excluded from Charge Leap even though the `Skeletons` category is linked.
* **`allowedWeaponCategories`** restricts the ability to mobs wielding weapons from the listed categories. This prevents ranged mobs from using melee-only abilities like Charge Leap.

Each linked entry's per-tier enablement is managed through the Admin UI. When you expand an ability in the Abilities tab, each linked mob entry shows five T1--T5 toggle buttons that control which tiers that specific mob can use the ability at.

### Per-World Overlays

Abilities can be configured per-world via `abilityOverlays` in the [overlay system](/config/instances). Each world can define its own set of linked mob entries with independent per-tier toggles, allowing you to enable or disable abilities for specific mobs on a per-world basis without changing the base configuration.

## Charge Leap

A physics-based attack where the elite launches itself at a nearby player, dealing slam damage on impact.

```yaml theme={null}
charge_leap:
  isEnabled: true
  cooldownSecondsPerTier: [0, 0, 0, 16, 20]
  minRange: 9.0
  maxRange: 30.0
  faceTarget: true
  slamBaseDamagePerTier: [0, 0, 0, 20, 30]
  applyForcePerTier: [0, 0, 0, 530, 530]
  slamRangePerTier: [0, 0, 0, 3, 4]
  knockbackLiftPerTier: [0, 0, 0, 3, 6]
  knockbackPushAwayPerTier: [0, 0, 0, -3, -6]
  knockbackForcePerTier: [0, 0, 0, 20, 26]
```

| Setting                    | What it does                                                          |
| :------------------------- | :-------------------------------------------------------------------- |
| `minRange` / `maxRange`    | The elite will only leap if the target is within this distance range. |
| `faceTarget`               | Whether the mob turns to face the player before leaping.              |
| `slamBaseDamagePerTier`    | Flat damage dealt on impact for each tier.                            |
| `applyForcePerTier`        | Launch velocity force. Higher values mean faster, longer leaps.       |
| `slamRangePerTier`         | Area-of-effect radius for the slam damage.                            |
| `knockbackLiftPerTier`     | Upward knockback applied to nearby players on landing.                |
| `knockbackPushAwayPerTier` | Horizontal knockback (positive values pull inward).                   |
| `knockbackForcePerTier`    | Overall knockback strength.                                           |

## Heal Potion

Allows the elite to drink a healing potion when its health drops below a threshold. Players can interrupt the heal by dealing enough hits during the drinking animation.

```yaml theme={null}
heal_potion:
  isEnabled: true
  cooldownSecondsPerTier: [0, 0, 0, 15, 15]
  minHealthTriggerPercent: 0.50
  maxHealthTriggerPercent: 0.50
  instantHealChance: 1.0
  instantHealAmountPerTier: [0, 0, 0, 0.25, 0.25]
  npcDrinkDurationSeconds: 3.0
  npcDrinkItemId: "Potion_Health_Greater"
```

| Setting                                               | What it does                                                                                                                                                                    |
| :---------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `minHealthTriggerPercent` / `maxHealthTriggerPercent` | The health threshold range at which the heal triggers. A random value between min and max is chosen once when the elite spawns. `0.50` means the elite tries to heal at 50% HP. |
| `instantHealChance`                                   | Chance to use an instant heal (restores health immediately) vs. regeneration over time. `1.0` = always instant.                                                                 |
| `instantHealAmountPerTier`                            | Fraction of max health restored by instant heal. `0.25` = heals 25% of max HP.                                                                                                  |
| `npcDrinkDurationSeconds`                             | How long the drinking animation lasts. Players have this window to interrupt it.                                                                                                |
| `npcDrinkItemId`                                      | The item the mob visually holds while drinking.                                                                                                                                 |

## Undead Summon

Allows elites to summon reinforcement minions during combat. By default, undead elites summon undead minions (skeleton archers, zombies, wraiths), Goblin\_Duke summons goblins, and Trork\_Shaman summons trorks. When the summoner dies, all its minions despawn.

```yaml theme={null}
undead_summon:
  isEnabled: true
  chancePerTier: [0, 0, 0, 0.5, 1.0]
  cooldownSecondsPerTier: [0, 0, 0, 25, 25]
  maxAliveMinionsPerSummoner: 4
  skeletonArcherWeight: 100
  zombieWeight: 0
  wraithWeight: 25
  aberrantWeight: 25
  excludeFromSummonPool: ["Trork_Shaman"]
  roleIdentifiers:
    - "Skeleton_Frost"
    - "Skeleton_Sand"
    - "Skeleton_Burnt"
    - "Skeleton_Incandescent"
    - "Skeleton_Pirate"
    - "Skeleton"
    - "Zombie_Burnt"
    - "Zombie_Frost"
    - "Zombie_Sand"
    - "Zombie"
    - "Goblin_"
    - "Trork_"
```

| Setting                      | What it does                                                                                                                                                                                                                                        |
| :--------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `maxAliveMinionsPerSummoner` | Maximum number of summoned minions alive at once per summoner. Capped at 0-50.                                                                                                                                                                      |
| `skeletonArcherWeight`       | Weight for skeleton archers in the summon pool. Higher = more likely.                                                                                                                                                                               |
| `zombieWeight`               | Weight for zombie minions.                                                                                                                                                                                                                          |
| `wraithWeight`               | Weight for wraith minions.                                                                                                                                                                                                                          |
| `aberrantWeight`             | Weight for aberrant zombies in the zombie summon pool.                                                                                                                                                                                              |
| `excludeFromSummonPool`      | Roles excluded from the auto-generated summon pool. Prevents summoners from summoning themselves (e.g., Trork\_Shaman won't summon other Shamans).                                                                                                  |
| `roleIdentifiers`            | List of role name fragments used to pick which variant of minion gets summoned. The summoner's own role is checked against this list to pick a matching variant. For example, a Goblin\_Duke matches `"Goblin_"` and will summon other goblin NPCs. |

### Role-Based Summoning

The summon system automatically builds per-role summon pools from the mob rules. When a summoner's role matches a `roleIdentifier`, only NPCs matching that same identifier are added to its summon pool:

* **Undead summoners** (skeletons, zombies, wraiths) summon other undead variants
* **Goblin\_Duke** summons other goblins (matching `"Goblin_"`)
* **Trork\_Shaman** summons other trorks (matching `"Trork_"`), excluding itself via `excludeFromSummonPool`

**Tip:** The summon ability is gated via `linkedMobRuleKeys` to undead mobs, Goblin\_Duke, and Trork\_Shaman by default. To allow other mob types to summon, add them to the ability's `linkedMobRuleKeys` (either individually or via a category) and add an appropriate prefix to `roleIdentifiers` so the summon system knows which pool to build for them.

## Dodge Roll

A reactive and preemptive defensive ability. When a nearby player starts attacking, the elite has a chance to dodge sideways with a brief invulnerability window. Charged attacks give a boosted dodge chance. Detected by `RPGMobsPlayerAttackDetectionSystem` which reads player attack interactions in a cone.

```yaml theme={null}
dodge_roll:
  isEnabled: true
  cooldownSecondsPerTier: [12, 10, 8, 6, 5]
  dodgeChancePerTier: [0.05, 0.08, 0.12, 0.18, 0.25]
  dodgeForce: 300.0
  invulnerabilityDurationPerTier: [0.3, 0.3, 0.4, 0.5, 0.6]
```

| Setting                          | What it does                                                                                |
| :------------------------------- | :------------------------------------------------------------------------------------------ |
| `dodgeChancePerTier`             | Probability that the elite dodges when triggered. Charged player attacks boost this chance. |
| `dodgeForce`                     | Lateral dash velocity. Higher values mean faster, longer dodges.                            |
| `invulnerabilityDurationPerTier` | Duration in seconds of the invulnerability window during the dodge.                         |

## Multi Slash Short

Quick 1-2 hit strikes with 3 random variations per weapon type. The fastest of the Multi Slash abilities, designed for interrupting player actions. Available to all tiers.

```yaml theme={null}
multi_slash_short:
  isEnabled: true
  cooldownSecondsPerTier: [10, 8, 6, 5, 4]
```

Each of the 8 weapon variants (Swords, Longswords, Daggers, Battleaxes, Axes, Maces, Clubs, Spears) has independent config values for trigger chance, cooldown, damage, forward drift, knockback, and melee range. These are configured per-variant in the Admin UI using the variant selector buttons.

## Multi Slash Medium

2-4 hit combos with 2 random variations per weapon type. A balance of damage and recovery time. Available T2+.

```yaml theme={null}
multi_slash_medium:
  isEnabled: true
  cooldownSecondsPerTier: [0, 12, 10, 8, 6]
```

Uses the same per-weapon-variant config system as Multi Slash Short.

## Multi Slash Long

4-6 hit full combos with 1 variation per weapon type. High damage output but long wind-up and recovery times give players counter windows. Available T3+.

```yaml theme={null}
multi_slash_long:
  isEnabled: true
  cooldownSecondsPerTier: [0, 0, 15, 12, 10]
```

Uses the same per-weapon-variant config system as Multi Slash Short. Wind-up times are standardized at a minimum of 2.1 seconds.

### Weapon Variants

All three Multi Slash abilities support 8 weapon variants, each with unique animations, sounds, trails, and timing:

| Variant    | Short (hits) | Medium (hits) | Long (hits) | Signature moves                     |
| :--------- | :----------: | :-----------: | :---------: | :---------------------------------- |
| Swords     |      1-2     |       3       |      6      | Spins and overhead jump finisher    |
| Longswords |      1-2     |       3       |      4      | Wide sweeps and stab finisher       |
| Daggers    |      1-2     |       3       |      4      | Razor strikes and kick finisher     |
| Battleaxes |       1      |       2       |      3      | Whirlwind and downstrike finisher   |
| Axes       |      1-2     |       3       |      4      | Charged swings and upswing finisher |
| Maces      |      1-2     |       2       |      3      | Uppercut and falling slam finisher  |
| Clubs      |      1-2     |       2       |      3      | Side bashes and overhead slam       |
| Spears     |      1-2     |       3       |      5      | Stab and spin sweep finisher        |

## Enrage

A berserk transformation where the elite drops its weapon and enters a 20-second rapid punch chain. The mob cycles through 3 random variation patterns of light and heavy punches, then dies from exhaustion with normal loot and XP drops. Available T2+.

```yaml theme={null}
enrage:
  isEnabled: true
  cooldownSecondsPerTier: [0, 60, 60, 60, 60]
  triggerHealthPercentPerTier: [0, 0.30, 0.25, 0.20, 0.15]
  lightPunchDamagePerTier: [0, 3, 5, 8, 12]
  heavyPunchDamagePerTier: [0, 6, 10, 16, 24]
```

| Setting                       | What it does                                                          |
| :---------------------------- | :-------------------------------------------------------------------- |
| `triggerHealthPercentPerTier` | Health threshold below which enrage can trigger. `0.30` means 30% HP. |
| `lightPunchDamagePerTier`     | Damage per light punch (0.45s each, 2.0 range).                       |
| `heavyPunchDamagePerTier`     | Damage per heavy punch (0.65s each, 2.5 range, with visual trails).   |

**Note:** Enrage is restricted to melee mobs only. The mob's weapon is de-equipped at the start and restored if the ability is interrupted (death or deaggro). Enrage can only trigger once per mob (the `enraged` flag persists across chunk unload/reload).

## Volley

A ranged projectile burst for mobs wielding bows, crossbows, or guns. The mob aims upward briefly, then fires a spread of projectiles. Available T3+.

```yaml theme={null}
volley:
  isEnabled: true
  cooldownSecondsPerTier: [0, 0, 18, 15, 12]
  volleyTriggerChancePerTier: [0, 0, 0.08, 0.12, 0.18]
  minRange: 8.0
  maxRange: 30.0
  projectileCountPerTier: [0, 0, 3, 4, 5]
  spreadAnglePerTier: [0, 0, 15, 20, 25]
  baseDamagePerProjectilePerTier: [0, 0, 5, 8, 12]
```

| Setting                          | What it does                                          |
| :------------------------------- | :---------------------------------------------------- |
| `volleyTriggerChancePerTier`     | Probability of triggering per combat tick evaluation. |
| `minRange` / `maxRange`          | Target must be within this distance range.            |
| `projectileCountPerTier`         | Number of projectiles fired in the burst.             |
| `spreadAnglePerTier`             | Spread angle in degrees between projectiles.          |
| `baseDamagePerProjectilePerTier` | Damage per individual projectile.                     |

## Global Ability Cooldown

After any ability completes, a random cooldown of 1-3 seconds prevents the next ability from triggering. This prevents ability spam in group combat.

```yaml theme={null}
globalCooldownMinSeconds: 1.0
globalCooldownMaxSeconds: 3.0
```

## Ability Gating Summary

Abilities are no longer filtered by combat personality. Instead, each ability uses the linked mob rule system with per-entry per-tier toggles. This gives full control over which mobs can use which abilities at which tiers, configured through the Admin UI or the `abilityOverlays` in per-world overlays.

Abilities are evaluated in feature registration order  -  the first ability whose gate passes wins. A global cooldown (1-3 seconds, configurable) prevents immediate ability chaining after any ability completes.
