Medical & Recovery

Injury state tracking, wound aging, recovery timelines, care levels, and long-term sequelae — physics-grounded medical simulation.

What this uses

src/sim/injury.ts src/sim/wound-aging.ts src/sim/medical.ts src/sim/condition.ts src/sim/impairment.ts src/sim/limb.ts src/sim/hydrostatic.ts src/sim/nutrition.ts docs/validation-untreated-knife-wound.md docs/validation-first-aid-saves-lives.md docs/validation-fracture-recovery.md

Injury in Ananke is physical — surface, internal, and structural damage accumulate per body region. Healing rates depend on care level, nutrition, time, and whether infection is present. Permanent damage leaves lasting impairments. All rates are validated against real-world medical data.

Injury state — static preview

static preview

Sample entity after a sword fight — surface, internal, and structural damage per body region.

Head
S 0.15
Torso
I 0.62
L. Arm
Str 0.45 ✦frac
R. Arm
S 0.28
Abdomen
I 0.38
L. Leg
S 0.05
R. Leg
intact
Vitals
shock 0.48
Condition flags
bleeding (torso)
fracture (L. arm)
infection risk
no sepsis
Vitals summary
shock: q(0.48)
fatigue: q(0.71)
consciousness: q(0.52)
fluid loss: q(0.22)

Care level & healing rates

Surface healq(0.020)/dayWounds cleaned and dressed; basic bandaging
Internal healq(0.010)/dayReduces internal bleeding; improves prognosis
Fracture healq(0.006)/daySplinting; aligned healing reduces permanent damage
Infection risk−40%Clean dressings and wound hygiene reduce infection

Recovery timeline — first-aid care

static preview

Days to recovery for the sample entity above. Values from stepWoundAging rates in src/sim/wound-aging.ts.

Day 0
shock 0.48
Day 3
surface healing
Day 7
infection cleared
Day 14
internal improving
Day 30
fracture callus
Day 90
near full recovery

Permanent damage floor from the fracture prevents full q(0) restoration. PHANTOM_PAIN_THRESHOLD = q(0.30) — fractures with structural ≥ q(0.30) cause phantom pain.

Try this

  1. Call stepWoundAging(entity, elapsedSeconds) each downtime tick — it handles healing, infection worsening, sepsis detection, and phantom pain.
  2. Set care level by adjusting the careLevel parameter in src/sim/medical.ts to modify healing multipliers.
  3. Check SEPSIS_THRESHOLD = q(0.85) — infection above this triggers a mortality roll.
  4. See docs/validation-untreated-knife-wound.md for the real-world baseline the healing model is calibrated against.
  5. Run npm run run:validation to verify the fracture recovery and first-aid calibration scenarios.