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

# Combat overview

> How the UO-style combat system works: hit chance, damage calculation, defense, health, and stamina.

The Skills plugin replaces vanilla combat with a UO-inspired system built around weapon skills, supporting skills, and an internal health pool that runs parallel to vanilla hearts.

## Combat flow

<Steps>
  <Step title="Attack occurs">
    A player swings a weapon or fires a projectile.
  </Step>

  <Step title="Hit chance check">
    The system rolls against the hit chance formula. On a miss, no damage is dealt but the weapon skill still receives a gain check.
  </Step>

  <Step title="Damage calculation">
    Base weapon damage is multiplied by Tactics, Anatomy, Wrestling (unarmed only), STR, quality, and DI enchant modifiers.
  </Step>

  <Step title="Defense applied">
    Parry is checked first (chance-based, 50% damage reduction on success). Then armor rating (AR) reduces the remaining damage.
  </Step>

  <Step title="Final damage applied">
    The result is applied to the target's internal HP. The player's vanilla hearts are synced to reflect the new internal HP percentage.
  </Step>
</Steps>

## Hit chance

Hit chance is calculated using the attacker's weapon skill against the target's defense value.

```
Hit Chance = Weapon Skill − (Target Defense / 2) + 50
Minimum: 5% | Maximum: 95%
```

* **vs. Mob**: Target Defense = mob's `physical_defense` from config
* **vs. Player**: Target Defense = the opponent's Parrying skill

| Weapon skill | Target defense | Hit chance |
| :----------: | :------------: | :--------: |
|      50      |        0       |  95% (cap) |
|      50      |       50       |     75%    |
|      100     |       100      |  95% (cap) |
|      30      |       80       |     40%    |

## Parry

Parrying is a chance-based block that reduces damage on success. It triggers before AR is applied.

**Parry chance (melee)**

| Equipment         | Parry chance    | Maximum |
| ----------------- | --------------- | :-----: |
| Shield (off-hand) | Parrying × 0.7% |   70%   |
| Weapon only       | Parrying × 0.4% |   40%   |
| Bare hands        | 0%              |    —    |

**Parry chance (projectiles)**

| Equipment           | Parry chance    | Maximum |
| ------------------- | --------------- | :-----: |
| Shield (off-hand)   | Parrying × 0.8% |   80%   |
| Weapon / bare hands | 0%              |    —    |

Arrows and bolts can only be blocked with a shield — weapon parry does not apply to projectiles.

**Parry damage reduction**

When a parry succeeds, the reduction scales with skill level:

```
Parry Reduction = 30% + (Parrying × 0.4%)
Range: 30% (skill 0) → 70% (skill 100)
```

**Role in PvP hit chance**

Parrying also raises the effective defense used in the hit chance formula:

```
Hit Chance vs Player = Weapon Skill − (Parrying / 2) + 50
```

## Internal health system

The plugin manages an internal HP value that maps onto vanilla hearts:

```
Max HP = 100 + STR
Range: 100 (STR 0) to 200 (STR 100)
```

Vanilla hearts always reflect the internal HP percentage — they do not represent fixed half-heart increments.

**Damage conversion**

```
Internal Damage = Vanilla Damage × 10
```

After all skill and defense modifiers are applied, the final internal damage is subtracted from internal HP, and vanilla health is resynced:

```
Vanilla HP = (Internal HP / Max Internal HP) × 20
```

**HP recovery**

| Source                                     | Behavior                                |
| ------------------------------------------ | --------------------------------------- |
| Food / natural regen                       | Standard vanilla behavior               |
| Regeneration effect (golden apple, potion) | `Internal HP += regen amount × 10`      |
| Heal / Greater Heal spells                 | `Internal HP += spell heal amount × 10` |

## STR, DEX, and INT effects on combat

Stats are derived automatically from the average of all skills that contribute to each stat. They cap at 100.

| Stat    | Combat effects                                            |
| ------- | --------------------------------------------------------- |
| **STR** | Max HP `+STR` (100–200 total); mining/lumber speed bonus  |
| **DEX** | Attack speed `+(DEX / 2)%`; movement speed `+(DEX / 10)%` |
| **INT** | Mana cost `−(INT / 2)%`; cast success rate `+(INT / 5)%`  |

<Note>
  Wearing heavy armor applies a DEX penalty that reduces effective DEX. Full Netherite armor costs 29 DEX, which directly reduces attack speed and movement speed.
</Note>

## Stamina system

Stamina is separate from HP and mana. It is consumed by sprinting and recovers at rest.

```
Max Stamina = 100 + DEX + (Focus / 2)
```

With DEX 100 and Focus 100, maximum stamina is 250.

| Action                  | Rate                  |
| ----------------------- | --------------------- |
| Sprint consumption      | 1 per tick (20/sec)   |
| Rest recovery           | 2 per tick (40/sec)   |
| Focus bonus consumption | `× (1 − Focus / 200)` |
| Focus bonus recovery    | `× (1 + Focus / 100)` |

**Exhaustion state**

When stamina reaches 0, the player enters an exhausted state:

* Walk speed reduced by 50%
* Jumping disabled
* Panting particle and sound effect plays every 0.5 seconds
* Normal movement resumes only after stamina recovers to 50

Focus bonuses are ignored during the exhausted recovery period — recovery is fixed at 2/tick until the 50-stamina threshold is crossed.

## Related pages

<Columns cols={2}>
  <Card title="Weapons" icon="sword" href="/combat/weapons">
    Weapon-skill table, full damage formula, archery specifics, and DI enchant reference.
  </Card>

  <Card title="Armor" icon="shield" href="/combat/armor">
    AR system, full armor table, enchantment AR bonuses, and quality modifiers.
  </Card>
</Columns>
