fix: add runId to seed calculations and use seeded random for treasure loot
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s

Fixes #299: Seed calculation now includes runId component per spec (seed = floor × 12345 + runId)
Fixes #298: Treasure loot now uses seeded random instead of Math.random()

Changes:
- Added runId field to CombatState type
- Generated random runId on spire entry in createEnterSpireMode
- Updated getRoomsForFloor, generateSpireRoomType, generateSpireFloorState, generateTreasureLoot to accept and use runId
- Updated all call sites in combat-descent-actions.ts and combatStore.ts
- Treasure loot item count now uses seeded RNG instead of Math.random()
This commit is contained in:
2026-06-08 14:54:37 +02:00
parent 7f5493f4d8
commit 83f835ccb0
6 changed files with 47 additions and 31 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-06-08T12:36:36.211Z",
"generated": "2026-06-08T12:41:07.359Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
},