fix: make guardian names deterministic per floor instead of using Math.random()
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m37s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m37s
- generateGuardianName() now takes a floor parameter and uses floor % prefixes.length for deterministic prefix selection - generateComboGuardianName() now takes a floor parameter and uses (floor + i) % prefixes.length for each element - getGuardianForFloor() passes floor to generateGuardianName for static guardians with empty names - getExtendedGuardian() passes floor to generateComboGuardianName for combo guardians - Removes dependency on Math.random() → names are stable across ticks/refreshes Fixes #161
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Circular Dependencies
|
||||
Generated: 2026-05-27T09:16:38.657Z
|
||||
Generated: 2026-05-27T09:18:37.387Z
|
||||
|
||||
No circular dependencies found. ✅
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_meta": {
|
||||
"generated": "2026-05-27T09:16:36.915Z",
|
||||
"generated": "2026-05-27T09:18:35.464Z",
|
||||
"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."
|
||||
},
|
||||
|
||||
@@ -213,6 +213,7 @@ Mana-Loop/
|
||||
│ │ │ ├── floor-utils.test.ts
|
||||
│ │ │ ├── floor-utils.upgraded.test.ts
|
||||
│ │ │ ├── formatting.test.ts
|
||||
│ │ │ ├── guardian-names.test.ts
|
||||
│ │ │ ├── mana-utils.test.ts
|
||||
│ │ │ ├── pact-utils.test.ts
|
||||
│ │ │ ├── regression-fixes.test.ts
|
||||
|
||||
Reference in New Issue
Block a user