Wiki/Resources/Flee Mechanics

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)
ConstantValueDescription
BASE_FLEE_CHANCE50%Base flee chance when evasion equals mob level
FLEE_CHANCE_PER_LEVEL_DIFF3%Adjustment per level difference (evasion - mob)
MIN_FLEE_CHANCE5%Floor flee chance against much higher mobs
MAX_FLEE_CHANCE95%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

OutcomeHP RemainingGold LossRecovery Cost
Clean Escape15% max HP5%None
Wounded Escape1 HP15%None
Knockout0 HP30%maxHP turns