fix: ensure procedural guardian names are unique across floors
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s

- Modified generateGuardianName() in guardian-encounters.ts to add a cycleOffset (floor/50) that shifts prefix selection for the same elements at different 100-floor ranges
- For multi-element names, also shift the title by cycleOffset to further reduce collision chance
- Added regression test guardian-names-unique.test.ts with 7 test cases covering:
  * Previously colliding floors (170/370 crystal, 200/230 exotic convergence, 210/240 astral convergence)
  * All static guardian floors (10-240) uniqueness
  * All procedural guardian floors (250-490) uniqueness
  * Full range (10-490) uniqueness
  * Determinism check
  * Title format validation

Fixes #376
This commit is contained in:
2026-06-12 10:05:27 +02:00
parent 7e0e9b9f7c
commit b68cc948a3
5 changed files with 93 additions and 4 deletions
+1
View File
@@ -231,6 +231,7 @@ Mana-Loop/
│ │ │ │ ├── floor-utils.test.ts
│ │ │ │ ├── floor-utils.upgraded.test.ts
│ │ │ │ ├── formatting.test.ts
│ │ │ │ ├── guardian-names-unique.test.ts
│ │ │ │ ├── guardian-names.test.ts
│ │ │ │ ├── hasty-enchanter.test.ts
│ │ │ │ ├── mana-conversion-component-deduction.test.ts