Flee Mechanics
When combat is going badly, players can attempt to flee. The chance of success depends on evasion level relative to the mob's level.
Flee Chance
fleeChance = clamp(0.5 + (evasionLevel - mobLevel) * 0.03, 0.05, 0.95)
| Constant | Value | Description |
|---|---|---|
BASE_FLEE_CHANCE | 50% | Base flee chance when evasion equals mob level |
FLEE_CHANCE_PER_LEVEL_DIFF | 3% | Adjustment per level difference (evasion - mob) |
MIN_FLEE_CHANCE | 5% | Floor flee chance against much higher mobs |
MAX_FLEE_CHANCE | 95% | Ceiling flee chance against much lower mobs |
Flee Outcomes
A random roll determines the outcome. If the roll is below the flee chance, the escape succeeds. Within the success range, the top 20% of rolls yield a clean escape; the rest produce a wounded escape. Failing the roll results in a knockout.
Clean Escape
remainingHP = maxHP * 0.15 (15% of max HP, minimum 1)
goldLost = currentGold * 0.05 (5% gold loss)
Wounded Escape
remainingHP = 1 (always 1 HP)
goldLost = currentGold * 0.15 (15% gold loss)
Knockout (Failed Flee)
remainingHP = 0 (enters recovery state)
goldLost = currentGold * 0.3 (30% gold loss)
recoveryCost = maxHP (1 turn per max HP)
Outcome Summary
| Outcome | HP Remaining | Gold Loss | Recovery Cost |
|---|---|---|---|
| Clean Escape | 15% max HP | 5% | None |
| Wounded Escape | 1 HP | 15% | None |
| Knockout | 0 HP | 30% | maxHP turns |