Combat Mechanics

Overview

Combat in Last State is a turn-based tactical encounter system where stance choice, target selection, readiness, and equipment determine survival. In current runtime it is triggered across multiple hostile contexts: wildlife/predator engagements, bandit and hostile NPC encounters, caravan/road ambush events, and threat escalation around bandit activity routes and camps.

Combat System

Stances

Players can switch between three stances during combat to adjust their tactical approach:

Stance Attack Mod Defense Mod Description
Balanced 0% +5% Steady footing with even attack and defense.
Aggressive +18% -8% Press the assault for more damage at the cost of safety.
Defensive -8% +22% Turtle up to weather blows and counter.

Runtime notes from current combat logic:

  • Defend action scaling uses stance and readiness; defensive stance produces the strongest mitigation profile for incoming hits
  • Recover action synergy: defensive stance improves recovery output (combat UI/logic applies a recovery boost while defensive)
  • Enemies can also rotate stances during combat rounds, so your best stance can change mid-fight

Targeting

Attacks can be aimed at specific body parts, each with different risks and effects:

Target Base Hit Chance Damage Mult Strategic Effect
Torso 40% 1.0x Standard target. Reliable damage.
Head 20% 1.25x High damage. Can cause enemies to reel from impact.
Arms 28% 1.1x Weaken/Disarm pressure: Applies weaken turns and disarm turns, reducing enemy damage and accuracy for multiple rounds.
Legs 26% 1.15x Slow: Applies slow turns, reducing enemy accuracy each round and disrupting their movement rhythm.
Runtime note: Stance adds target-specific hit adjustments (for example, aggressive favors head/legs while defensive favors torso/arms)

Weapons

Weapons determine damage output, reach (accuracy bonus), and special interactions.

Weapon Dmg Mult Reach Bonus Ammo/Usage
Fists 1.0x +0% Always available. Bare-knuckle strikes.
Slingshot 1.2x +5% Uses slingshot_ball ammo. Fast, low-fatigue ranged option.
Spear 1.3x +4% Durable melee control weapon. Includes counter-hit potential in combat logic.
Throwing Spear 1.4x +6% Single-use inventory item. Removed from inventory when thrown.
Bow 1.5x +8% Uses Arrows. Reliable ranged option.
Crossbow 1.8x +10% Uses Bolts. High-power ranged weapon.
Club 1.2x +2% Basic blunt melee. Lower fatigue profile with frequent action flow.
Nailed Club 1.32x +3% Heavy blunt-spike variant. Can stagger and apply armor-break effects.
Rusty Machete 1.28x +3% Combat-usable blade with bleed chance at lower reliability than clean machete.
Machete 1.4x +4% Combat-usable heavy blade with stronger bleed profile.

Mechanics & Formulas

Hit Chance

Core Aim Chance = clamp01(Base Target Hit + Stance-Target Adjustment + Accuracy Bonuses)
  • Base Target Hit comes from target choice: Torso 0.40, Arms 0.28, Legs 0.26, Head 0.20
  • Stance-Target Adjustment is applied by matrix (for example: aggressive boosts head/legs, defensive boosts arms/legs, balanced strongly favors torso).
  • Sleep Deprivation Penalty: at sleepDeprivationLevel >= 3, hit chance is multiplicatively reduced (15% baseline, scaling to max 25%)
  • Final attack roll in live combat then adds weapon reach and subtracts enemy defense pressure, then clamps again to a practical floor/ceiling (0.10 to 0.98 for player attacks)
  • Readiness is a separate combat scalar used in damage/defense, computed from morale, fatigue, injury, condition and clamped to [-0.25, +0.35]

Damage Calculation

Player Damage (runtime) = round((Base Roll + Skill Bonus) Weapon Mult Target Mult Spec Weapon Bonus (1 + 0.6StanceAtk + 0.4Readiness))
  • Critical hits apply an additional multiplier (x1.5)
  • Enemy mitigation layers depend on enemy type
  • Bandits apply defense-based reduction
  • Ruins archetypes can apply extra flat reduction (damageReduction)
  • Mitigation is contextual rather than one single fixed formula for all enemies

Defense & Injuries

  • Defense Rating (player): clamp01(0.25 + StanceDef + Readiness + DefendBonus + AgilityDefense)
  • Defend bonus: +0.25 while defending
  • Agility defense bonus: max(0, (Agility - 3) * 0.1)
  • Incoming damage mitigation uses wearable defense + defense rating - armor pierce (when present), capped at 65% effective defense
  • Armor wear: on incoming hits, equipped wearables have a small durability-loss chance (5%, -0.3 durability to a random wearable)
  • Injury application: successful enemy hits apply limb injury pressure via addInjury(...) scaled from mitigated damage

Actions

  • Attack: Strike the selected target with your equipped combat weapon. Attack behavior includes weapon fatigue cost, reach effects, crit chance, and on-hit weapon effects (bleed, stagger, armor-break) where supported
  • Defend: Raise guard and activate defending state, granting a strong one-hit defensive cushion in the next enemy damage calculation
  • Heal: Use medical supplies in combat
  • Generic medicine: INT-scaled healing, can reduce bleeding, gains stance/readiness bonuses
  • Medkit: larger heal package, bleeding reset, and fracture treatment chance (with skill/quality scaling)
  • If infection-type states are active, heal actions also roll cure chance from Intelligence + medicine quality
  • Recover: Restore fatigue during combat (+8 to +14 base), with +20% efficiency while in defensive stance
  • Flee: Escape roll based on readiness with modifiers
  • starts from 0.6 + readiness
  • reduced by your leg penalties
  • affected by agility bonus
  • clamped to runtime bounds (15% min, up to 95% max with agility bonuses)