[High] [Bug] Golemancy: enterSpireMode wipes golem designs (should persist across runs) #311

Closed
opened 2026-06-07 17:43:55 +02:00 by Anexim · 2 comments
Owner

Spec: docs/specs/attunements/fabricator/systems/golemancy-spec.md §9, §16
Severity: High

Problem: src/lib/game/stores/combat-descent-actions.ts:256enterSpireMode() resets golemDesigns: {} and golemLoadout: [], destroying all player-designed golems. The spec says "Loadout persists across rooms but not across spire runs" — designs should persist, only active golems and loadout should reset. Players are forced to redesign golems every run.

File: src/lib/game/stores/combat-descent-actions.ts:256

**Spec:** docs/specs/attunements/fabricator/systems/golemancy-spec.md §9, §16 **Severity:** High **Problem:** `src/lib/game/stores/combat-descent-actions.ts:256` — `enterSpireMode()` resets `golemDesigns: {}` and `golemLoadout: []`, destroying all player-designed golems. The spec says "Loadout persists across rooms but not across spire runs" — designs should persist, only active golems and loadout should reset. Players are forced to redesign golems every run. **File:** `src/lib/game/stores/combat-descent-actions.ts:256`
Anexim added the ai:todo label 2026-06-07 17:43:55 +02:00
n8n-gitea was assigned by Anexim 2026-06-07 17:43:55 +02:00
Anexim added ai:in-progress and removed ai:todo labels 2026-06-08 10:21:25 +02:00
Author
Owner

Starting fix. Root cause: enterSpireMode at line 256 resets golemDesigns: {} and golemLoadout: []. Per spec §9, designs should persist across spire runs — only active golems and loadout should reset. Fix: preserve existing golemDesigns, only reset golemLoadout and activeGolems.

Starting fix. Root cause: `enterSpireMode` at line 256 resets `golemDesigns: {}` and `golemLoadout: []`. Per spec §9, designs should persist across spire runs — only active golems and loadout should reset. Fix: preserve existing golemDesigns, only reset golemLoadout and activeGolems.
Anexim added ai:done and removed ai:in-progress labels 2026-06-08 10:22:21 +02:00
Author
Owner

Fixed in combat-descent-actions.ts:256. Changed golemDesigns: {} to golemDesigns: s.golemancy?.golemDesigns ?? {} so designs persist across spire runs. Only golemLoadout and activeGolems are reset, matching spec §9. All 82 golem-related tests pass.

Fixed in `combat-descent-actions.ts:256`. Changed `golemDesigns: {}` to `golemDesigns: s.golemancy?.golemDesigns ?? {}` so designs persist across spire runs. Only `golemLoadout` and `activeGolems` are reset, matching spec §9. All 82 golem-related tests pass.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#311