prosolis
d76c63be0c
Review follow-ups A + B: armed abilities survive the fight, supply pool serialized
...
A. An armed ability lasted one round of a turn-based fight.
buildZoneCombatants called applyArmedAbility, which applies an ability's mods
*and* clears ArmedAbility and saves the sheet. The turn engine calls that
builder again on every !attack / !cast / !consume, so round 1 fired the ability
and disarmed the character, and every later round rebuilt them with none of its
mods. A Berserker paid stamina for a single round of BerserkerRage /
RageMeleeDmg / PhysicalResistRage / FrenzyDmgBonus. Every entry in
dndActiveAbilities had the same shape. mods.BerserkerRage was not merely unread
at close-out — by then it no longer existed.
Split arming into its two halves:
consumeArmedAbility(c) mutates: disarms, saves, returns the id. Once,
at fight start.
applyAbilityByID(c, id, mods) pure: no DB write, no disarm. Safe on every
rebuild. (No ability's Apply writes to the
character, so this really is pure.)
armAbilityForFight(c, mods) consume + apply, for the auto-resolve callers
that build and fight in one breath.
buildZoneCombatants now takes the already-consumed id and re-applies it. The id
rides on ActorStatuses.ArmedAbility, seeded per seat at fight start, so
partyCombatantsForSession reproduces the ability every rebuild and the close-out
can still see that a rage fired.
The close-out itself: postCombatBookkeeping now carries grantCombatAchievements
+ persistDnDPostCombatSubclass, and all four close-outs route through it —
runDungeonCombat, runZoneCombatRoster, finishCombatSession,
finishPartyCombatSession. It fires on every terminal status, not just a win: a
Berserker who rages and loses is still exhausted, which is what auto-resolve
always did.
Also: buildFightSeats and runZoneCombatRoster consumed the ability before the
checks that could sit a seat out, so a downed member was disarmed for a fight
they never joined. The refusals now run first.
B. Six unlocked read-modify-writes against the shared supply pool.
updateSupplies rewrites supplies_json wholesale, so a caller folding its delta
onto an *Expedition it read earlier discards whatever landed in between.
Handlers run one goroutine per event, so those writers genuinely interleave.
All six now go through withExpeditionSupplies, which takes advExpeditionLock,
re-reads the row, hands the closure the fresh copy and persists what it returns:
nightRolloverBurn (forage + burn in one write), grantTwoWeeksCache,
advanceToNextRegion's transit burn, campPitch, pitchAutopilotCamp, and the
ambient pack-rat drain. expeditionCmdAccept's hand-rolled lock folds onto the
same helper. expedition_sim.go is left alone: single-threaded, takes no locks.
Known consequence, for the balance track: trySimAutoArm used to live inside the
rebuild, so a simulated Fighter (second_wind) or Cleric (healing_word) re-armed
and re-spent a resource every round of every elite/boss fight. expedition-sim
drives those through the turn engine, so every prior expedition-sim corpus
overstates those two classes. Re-baseline after this, not before.
Claude-Session: https://claude.ai/code/session_017mEwUmmS7aQTP2NQXj6rUa
2026-07-10 08:01:51 -07:00
..
2026-07-09 20:21:17 -07:00
2026-07-09 19:22:10 -07:00
2026-07-09 19:22:10 -07:00
2026-05-27 19:41:49 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:22 -07:00
2026-05-09 14:25:22 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 19:22:10 -07:00
2026-07-10 07:20:14 -07:00
2026-07-09 19:22:10 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-04-26 07:57:31 -07:00
2026-07-10 07:18:07 -07:00
2026-04-08 15:50:28 -07:00
2026-05-12 21:59:19 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 18:49:19 -07:00
2026-07-09 22:30:11 -07:00
2026-05-09 14:25:21 -07:00
2026-07-10 07:18:07 -07:00
2026-05-16 12:40:17 -07:00
2026-07-10 07:18:07 -07:00
2026-04-28 22:37:04 -07:00
2026-04-10 16:50:49 -07:00
2026-05-09 21:32:47 -07:00
2026-04-24 22:23:58 -07:00
2026-04-08 23:01:39 -07:00
2026-07-10 07:18:07 -07:00
2026-04-05 17:04:03 -07:00
2026-04-05 17:04:03 -07:00
2026-04-05 17:04:03 -07:00
2026-05-16 12:40:17 -07:00
2026-05-16 12:40:17 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:22 -07:00
2026-03-27 21:26:19 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:23 -07:00
2026-07-09 18:29:31 -07:00
2026-07-09 18:29:31 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:22 -07:00
2026-07-10 07:18:07 -07:00
2026-05-22 08:42:47 -07:00
2026-05-09 14:25:22 -07:00
2026-05-22 08:42:47 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:23 -07:00
2026-05-09 14:25:22 -07:00
2026-05-23 10:30:47 -07:00
2026-07-09 19:22:10 -07:00
2026-05-14 21:19:31 -07:00
2026-07-10 07:18:07 -07:00
2026-05-15 14:43:11 -07:00
2026-07-09 19:22:10 -07:00
2026-07-09 19:22:10 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 18:29:31 -07:00
2026-07-09 18:29:31 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:20:14 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:22 -07:00
2026-05-14 15:28:42 -07:00
2026-05-14 15:28:42 -07:00
2026-05-14 15:28:42 -07:00
2026-07-09 20:29:05 -07:00
2026-05-28 21:55:34 -07:00
2026-07-10 07:18:07 -07:00
2026-05-14 18:00:29 -07:00
2026-05-14 18:00:29 -07:00
2026-03-27 21:26:19 -07:00
2026-03-26 09:22:02 -07:00
2026-07-10 07:18:07 -07:00
2026-05-28 09:35:04 -07:00
2026-06-18 06:34:16 -07:00
2026-05-15 12:11:27 -07:00
2026-05-09 14:25:23 -07:00
2026-07-09 19:36:24 -07:00
2026-05-12 21:54:40 -07:00
2026-04-18 01:07:25 -07:00
2026-05-09 17:23:08 -07:00
2026-05-09 14:25:22 -07:00
2026-05-09 14:25:23 -07:00
2026-07-10 08:01:51 -07:00
2026-05-09 14:25:22 -07:00
2026-07-10 08:01:51 -07:00
2026-05-14 07:53:17 -07:00
2026-07-10 08:01:51 -07:00
2026-05-12 21:59:19 -07:00
2026-07-09 20:21:17 -07:00
2026-07-10 07:20:14 -07:00
2026-07-10 06:32:29 -07:00
2026-04-18 01:05:22 -07:00
2026-07-10 07:18:07 -07:00
2026-05-22 09:26:17 -07:00
2026-05-09 14:25:22 -07:00
2026-07-09 22:07:20 -07:00
2026-07-09 21:23:35 -07:00
2026-07-10 08:01:51 -07:00
2026-07-09 23:23:17 -07:00
2026-07-10 08:01:51 -07:00
2026-07-09 23:23:17 -07:00
2026-07-10 07:20:14 -07:00
2026-05-16 12:53:00 -07:00
2026-07-09 22:07:20 -07:00
2026-07-09 20:29:05 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 06:32:29 -07:00
2026-07-09 20:43:37 -07:00
2026-07-10 07:18:07 -07:00
2026-03-26 09:22:02 -07:00
2026-04-08 17:04:40 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 07:18:07 -07:00
2026-06-18 00:28:05 -07:00
2026-05-12 21:59:19 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 23:23:17 -07:00
2026-05-28 08:14:13 -07:00
2026-07-10 08:01:51 -07:00
2026-05-12 21:59:19 -07:00
2026-07-10 07:18:07 -07:00
2026-05-12 21:59:19 -07:00
2026-05-09 14:25:22 -07:00
2026-07-09 23:56:16 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-14 22:37:47 -07:00
2026-05-14 22:37:47 -07:00
2026-05-17 12:24:18 -07:00
2026-05-17 17:03:20 -07:00
2026-05-09 14:25:22 -07:00
2026-05-09 17:21:33 -07:00
2026-07-10 08:01:51 -07:00
2026-05-27 19:41:49 -07:00
2026-07-09 23:56:16 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:20:14 -07:00
2026-06-18 06:34:16 -07:00
2026-07-10 08:01:51 -07:00
2026-05-15 12:11:27 -07:00
2026-07-09 23:56:16 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 23:56:16 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 23:56:16 -07:00
2026-07-09 18:49:19 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 07:18:07 -07:00
2026-05-16 12:40:17 -07:00
2026-05-15 12:11:27 -07:00
2026-07-10 08:01:51 -07:00
2026-05-09 14:25:22 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:20:14 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:22 -07:00
2026-05-27 18:42:57 -07:00
2026-07-10 07:18:07 -07:00
2026-05-21 23:40:54 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:21 -07:00
2026-05-15 11:29:03 -07:00
2026-05-09 14:25:21 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-14 21:30:15 -07:00
2026-05-12 21:59:19 -07:00
2026-05-17 16:20:10 -07:00
2026-05-09 14:25:22 -07:00
2026-05-14 19:47:01 -07:00
2026-05-17 17:03:20 -07:00
2026-05-17 16:06:46 -07:00
2026-07-09 23:23:17 -07:00
2026-05-14 22:06:31 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 19:22:10 -07:00
2026-05-09 14:25:21 -07:00
2026-07-10 07:18:07 -07:00
2026-05-09 14:25:21 -07:00
2026-05-09 14:25:21 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-14 21:30:15 -07:00
2026-05-09 14:25:21 -07:00
2026-05-15 14:43:11 -07:00
2026-05-14 21:53:06 -07:00
2026-05-14 15:18:18 -07:00
2026-05-27 22:00:02 -07:00
2026-05-09 14:25:21 -07:00
2026-05-09 14:25:22 -07:00
2026-07-10 07:18:07 -07:00
2026-05-16 12:53:00 -07:00
2026-05-09 14:25:21 -07:00
2026-05-09 14:25:22 -07:00
2026-05-14 18:38:57 -07:00
2026-05-16 12:40:17 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 23:56:16 -07:00
2026-05-09 14:25:22 -07:00
2026-07-10 07:20:14 -07:00
2026-05-09 14:25:22 -07:00
2026-07-10 06:32:29 -07:00
2026-05-09 15:17:30 -07:00
2026-05-09 14:25:22 -07:00
2026-05-09 14:25:22 -07:00
2026-05-17 17:03:20 -07:00
2026-05-09 14:25:22 -07:00
2026-07-09 18:29:31 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 23:56:16 -07:00
2026-05-12 21:59:19 -07:00
2026-07-10 07:18:07 -07:00
2026-05-27 17:24:36 -07:00
2026-07-10 07:18:07 -07:00
2026-05-27 18:13:33 -07:00
2026-07-10 07:18:07 -07:00
2026-06-28 17:39:29 -07:00
2026-04-08 17:04:40 -07:00
2026-07-10 07:18:07 -07:00
2026-05-16 12:40:17 -07:00
2026-07-10 08:01:51 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 08:01:51 -07:00
2026-05-27 19:07:37 -07:00
2026-05-27 19:48:44 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 08:01:51 -07:00
2026-07-09 22:30:11 -07:00
2026-07-09 22:30:11 -07:00
2026-07-09 23:56:16 -07:00
2026-07-09 22:18:40 -07:00
2026-07-10 07:20:14 -07:00
2026-07-09 21:23:35 -07:00
2026-07-10 07:20:14 -07:00
2026-07-10 00:37:59 -07:00
2026-05-27 20:47:28 -07:00
2026-07-10 00:37:59 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-03-26 23:38:06 -07:00
2026-05-21 18:05:37 -07:00
2026-07-10 07:18:07 -07:00
2026-05-21 18:05:37 -07:00
2026-05-22 07:25:08 -07:00
2026-03-26 09:22:02 -07:00
2026-05-21 22:58:31 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-04-18 01:06:50 -07:00
2026-03-26 09:22:02 -07:00
2026-03-26 09:22:02 -07:00
2026-05-09 14:25:21 -07:00
2026-03-26 09:22:02 -07:00
2026-03-26 09:22:02 -07:00
2026-04-18 14:11:59 -07:00
2026-05-27 18:42:57 -07:00
2026-04-18 14:11:59 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-03-10 16:58:15 -07:00
2026-04-26 10:09:32 -07:00
2026-07-09 18:52:32 -07:00
2026-07-09 18:52:32 -07:00
2026-07-10 07:18:07 -07:00
2026-04-08 17:04:40 -07:00
2026-05-09 14:25:21 -07:00
2026-05-09 14:25:21 -07:00
2026-07-09 18:32:23 -07:00
2026-07-09 19:22:10 -07:00
2026-07-09 19:22:10 -07:00
2026-05-14 22:37:47 -07:00
2026-05-14 18:00:29 -07:00
2026-05-14 18:00:29 -07:00
2026-03-27 21:26:19 -07:00
2026-03-27 11:55:47 -07:00
2026-07-10 07:18:07 -07:00
2026-04-08 17:04:40 -07:00
2026-07-10 07:18:07 -07:00
2026-04-08 17:04:40 -07:00
2026-05-09 14:25:23 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 00:37:59 -07:00
2026-05-15 08:03:42 -07:00
2026-05-09 14:25:23 -07:00
2026-05-09 14:25:23 -07:00
2026-03-11 00:45:25 -07:00
2026-03-08 18:25:18 -07:00
2026-03-27 11:55:47 -07:00
2026-03-26 09:22:02 -07:00
2026-03-10 18:08:05 -07:00
2026-04-08 17:04:40 -07:00
2026-07-10 07:18:07 -07:00
2026-03-08 18:25:18 -07:00
2026-07-10 07:18:07 -07:00
2026-05-12 21:59:19 -07:00
2026-07-10 07:18:07 -07:00
2026-03-26 09:22:02 -07:00
2026-03-11 00:45:25 -07:00
2026-04-10 16:50:49 -07:00
2026-03-08 18:25:18 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-07-09 18:52:32 -07:00
2026-04-08 17:04:40 -07:00
2026-04-26 10:09:32 -07:00
2026-03-11 00:45:25 -07:00
2026-03-29 16:24:59 -07:00
2026-03-26 09:22:02 -07:00
2026-07-10 07:18:07 -07:00
2026-04-10 16:50:49 -07:00
2026-03-29 16:24:59 -07:00
2026-07-10 07:18:07 -07:00
2026-06-03 17:23:53 -07:00
2026-04-08 15:24:49 -07:00
2026-07-10 07:20:14 -07:00
2026-07-10 08:01:51 -07:00
2026-05-28 20:00:09 -07:00
2026-05-28 20:00:09 -07:00
2026-07-10 07:18:07 -07:00
2026-05-27 17:32:29 -07:00
2026-05-28 20:00:09 -07:00
2026-05-28 20:00:09 -07:00
2026-05-28 20:00:09 -07:00
2026-05-28 20:00:09 -07:00
2026-05-27 17:32:29 -07:00
2026-05-27 17:32:29 -07:00
2026-05-27 17:24:36 -07:00
2026-05-27 17:24:36 -07:00
2026-05-27 17:46:38 -07:00
2026-05-27 17:46:38 -07:00
2026-05-09 16:41:46 -07:00
2026-05-21 23:56:18 -07:00
2026-07-10 07:18:07 -07:00
2026-07-10 07:18:07 -07:00
2026-05-27 17:32:29 -07:00
2026-05-27 17:32:29 -07:00
2026-05-28 19:02:58 -07:00
2026-05-28 20:00:09 -07:00
2026-05-28 20:00:09 -07:00
2026-05-27 17:46:38 -07:00
2026-05-27 17:46:38 -07:00
2026-05-27 17:24:36 -07:00
2026-07-09 19:36:24 -07:00
2026-07-09 19:47:16 -07:00
2026-07-09 23:56:16 -07:00