Combat Resolution¶
Design Goal¶
Combat resolves automatically from the expedition snapshot. No positions, rotations, or real-time decisions after departure. Everything that determines combat outcome is decided before the expedition launches: what weapons and armor the character brings, how skilled they are with that equipment, and which monster family they are going up against.
The resolver is cheap and deterministic. It reads the frozen expedition snapshot, applies five steps, and produces a seeded outcome.
See combat-and-skills-integration.md for how skills and gear feed into quality bands.
See combat-encounter-templates.md for concrete encounter examples built on this model.
Resolution Steps¶
Step 1 — Derive role from loadout¶
The resolver reads each party member's equipped weapons, armor, and gear and assigns a combat role:
| Equipment brought | Role assigned |
|---|---|
| Shield + heavy armor | Tank |
| Healing supplies + medicine kit | Support |
| Bow + light armor | Ranged damage |
| Blade + light armor | Melee damage |
| Arcane focus + light gear | Arcane damage |
| Traps + tools + utility kit | Utility — flex support or damage |
A character fills one role per expedition — whichever their loadout most strongly represents. Archetypes from character creation bias starting skills toward certain loadout types but place no restriction on what the character learns and equips later.
Step 2 — Compute quality band¶
For each role, quality band is derived from:
- Skill level in the two or three skills most relevant to the equipped weapons and armor
- Gear quality tier of those weapons and armor
| Band | What it means |
|---|---|
| Weak | Familiar-range skills, starter or worn gear |
| Decent | Practiced skills, standard crafted or purchased gear |
| Strong | Skilled to Veteran skills, Fine-quality gear |
| Elite | Expert to Master skills, Masterwork gear |
Step 3 — Check role coverage¶
Each encounter type requires a minimum role profile:
| Encounter type | Required coverage |
|---|---|
| Standard solo or group | None — any loadout works |
| Elite | Damage + at least one support or tank |
| Boss | Tank + Damage + Support — all three |
A missing required role applies −25% to the final success probability per missing slot, flooring at 5%. Some bosses mark a specific role as mandatory — those fights cannot resolve as a win without it regardless of how strong the rest of the party is.
Step 4 — Apply matchup modifier (damage roles only)¶
Damage loadouts carry a matchup modifier based on weapon type versus the monster family being fought. Tank and support are matchup-neutral — their job is survival and recovery, not damage output.
| Damage loadout | Strong matchup | Poor matchup |
|---|---|---|
| Bow + light armor | Beasts, Goblinoids | Constructs, armored undead |
| Blade + light armor | Raiders and Brigands | Swarms, incorporeal undead |
| Blunt weapon + medium armor | Constructs, Skeletons | Fast beasts |
| Arcane focus | Undead, Constructs, warded targets | Beasts, open-field humanoids |
| Traps + tools | Vermin, Swarms | Boss fights, fast pursuit |
Effect on effective quality band:
- Strong matchup: bumped one step up (Decent acts as Strong)
- Neutral matchup: unchanged
- Poor matchup: dropped one step (Decent acts as Weak)
Step 5 — Compute success probability¶
Solo or standard group (no required roles):
| Effective quality band | Success chance |
|---|---|
| Weak | 35% |
| Decent | 60% |
| Strong | 80% |
| Elite | 95% |
Boss fight (tank + support + damage all present):
The weakest role in the party pulls the result down the most.
| Weakest role | Other two roles | Success |
|---|---|---|
| Weak | any | 25–40% |
| Decent | Decent / Decent | 55% |
| Decent | Strong / Strong | 65% |
| Strong | Strong / Strong | 82% |
| Strong | Elite / Elite | 88% |
| Elite | Elite / Elite | 95% |
Knowledge bonus: monster knowledge at Mastered adds up to +10% flat. Lower tiers add proportionally less.
Outcome Bands¶
The success probability feeds a seeded random roll. Results:
| Roll result | Outcome |
|---|---|
| Clear success | Full rewards, no penalties |
| Marginal success | Rewards with minor injuries or supply burn |
| Partial failure | Retreat triggered, partial rewards, injury |
| Full failure | Routed, no rewards, heavier penalties |
Bosses and elites apply heavier penalties on failure. Standard content uses the same bands with lighter failure costs.
Player-Facing Readiness Summary¶
Before departure the UI shows the party's readiness for the selected encounter:
Barrow Fields — Karnwarden (Undead) Tank: Strong ✓ Support: Decent ✓ Damage: Decent ⚠ (bow loadout — poor matchup vs. undead, effective: Weak) Estimated success: 38%
The player can change loadouts, recruit a different party member, or proceed knowing the risk.
Encounter Types¶
- standard skirmish
- ambush
- wave defense
- hunt pursuit
- boss chamber
- escort defense
- environmental hazard with hostile pressure
Technical Model¶
Authoritative Records¶
Store:
expeditionexpedition_memberexpedition_supply_commitmentexpedition_route_segmentencounter_seedexpedition_result_log
Deterministic Seed¶
At mission start, generate and store a seed. Use it to derive encounter order, rare event checks, and loot branches. This makes debugging, replay summaries, and dispute review much easier.
Group Commit Logic¶
For group expeditions, all members should lock before departure:
- active build profile and loadout
- supply contribution to the shared escrow
- readiness state
- share settings for rewards and costs
Once the expedition starts, replacements are not allowed unless the mission type explicitly supports reinforcements.
Durable Object Responsibility¶
Use one expedition coordinator for mutable expedition state while the run is active. That coordinator handles group joins before departure, readiness checks, and final settlement locks.
Resolution Timing¶
Do not simulate constantly while the player is away. Instead:
- store projected segment end times
- wake on completion alarm or player check-in
- run the resolver in bounded batches
- write append-only event results
Replay Summary¶
Players should receive a readable expedition report that lists:
- route events
- key combats by phase
- injuries and recoveries
- rare drops
- map discoveries
- reasons for failure if the mission went poorly
The report should explain the strongest reasons for the result, not dump every hidden modifier.
Related Systems¶
- combat and skills integration
- character progression and derived stats
- monster family behaviors
- supply consumption and hunger
- knowledge and scouting
- group contracts and shared rewards