fix: resolve 7 medium-priority bugs from audit #372
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s

- #371: Replace Math.random() with seeded PRNG in getSpireEnemyArmor/Barrier
- #370: Add mana refund when cancelling pact ritual in cancelPactRitual
- #367: Add ENCHANT_MASTERY check for design slot 2 in crafting store
- #364: Fix useGameDerived to read crafting data from useCraftingStore
- #363: Clamp recovery room regen delta to prevent negative mana loss
- #365: Add shield/barrier/healthRegen fields to all procedural guardians
- #362: Refactor enchanting tick pipeline to return writes instead of direct store calls

Extracted procedural guardian generators into guardian-procedural.ts to stay under 400-line limit.

All 1158 tests pass.
This commit is contained in:
2026-06-11 11:37:06 +02:00
parent 2d9f0042ef
commit 9476e92a4b
11 changed files with 253 additions and 319 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Circular Dependencies
Generated: 2026-06-11T07:06:06.140Z
Generated: 2026-06-11T07:08:59.875Z
Found: 3 circular chain(s) — these MUST be fixed before modifying involved files.
1. 1) stores/golem-combat-actions.ts > stores/golem-combat-helpers.ts
+1 -1
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-06-11T07:06:04.118Z",
"generated": "2026-06-11T07:08:57.908Z",
"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."
},
+1
View File
@@ -356,6 +356,7 @@ Mana-Loop/
│ │ │ │ ├── fabricator-wizard-recipes.ts
│ │ │ │ ├── guardian-data.ts
│ │ │ │ ├── guardian-encounters.ts
│ │ │ │ ├── guardian-procedural.ts
│ │ │ │ └── loot-drops.ts
│ │ │ ├── effects/
│ │ │ │ ├── discipline-effects.ts