[High] [Feature] Complete Redesign of Golemancy System: Component-Based Construction (Core + Frame + Mind Circuit + Enchantments) #288

Closed
opened 2026-06-05 14:59:59 +02:00 by Anexim · 2 comments
Owner

Type: Feature / Major System Redesign
Priority: High

Summary

Redesign the entire Golemancy system from predefined golem types (10 fixed golems) to a component-based construction system where players design golems by combining:

  1. Core (power source) — 4 tiers: Basic, Intermediate, Advanced, Guardian
  2. Frame (physical chassis) — 7 types: Earth, Sand, Frost, Crystal, Steel, Shadowglass, Crystal-Steel Hybrid
  3. Mind Circuit (behavior) — 4 types: Simple, Intermediate, Advanced, Guardian
  4. Enchantments (optional) — Sword enchantments applied to basic attacks

This is based on the detailed design in issue #268 comment (by Anexim).


Key Changes from Current System

Current New
10 fixed golem definitions Component system with 4×7×4×N combinations
Fixed summon/maintenance costs per golem Computed from selected components
Fixed spell behavior per golem type Player selects spells per circuit type
Fixed tier/element per golem Determined by Core + Frame combination
No Guardian Constructs Guardian Core + Crystal-Steel Frame + Guardian Circuit
Golem HP takes damage HP is display-only; golems don't take enemy damage

Implementation Tasks

Phase 1: Data Definitions

  • Create src/lib/game/data/golems/cores.ts — 4 Core definitions with mana types, capacity, regen, maxRoomDuration, summonCost, unlock conditions
  • Create src/lib/game/data/golems/frames.ts — 7 Frame definitions with damage, speed, armorPierce, magicAffinity, specialEffect, unlock conditions
  • Create src/lib/game/data/golems/circuits.ts — 4 Circuit definitions with maxSpells, behavior logic, unlock conditions
  • Create src/lib/game/data/golems/enchantments.ts — Golem enchantment definitions (Sword_Fire, Sword_Frost, Sword_Lightning, Sword_Shadow)
  • Update src/lib/game/data/golems/types.ts — New type definitions for component system (CoreDefinition, FrameDefinition, CircuitDefinition, GolemDesign, computed properties)
  • Create src/lib/game/data/golems/designs.ts — Design builder, validation, computed property calculation
  • Update src/lib/game/data/golems/index.ts — Export new modules
  • Archive/remove old golem definition files (base-golems.ts, elemental-golems.ts, hybrid-golems.ts, golems-data.ts, utils.ts) or mark deprecated

Phase 2: Discipline Updates

  • Update src/lib/game/data/disciplines/fabricator.ts — Golem Crafting discipline perks should unlock component tiers/capacity, not fixed golems
  • Add new discipline stats if needed: golemCoreTier, golemFrameAccess, golemCircuitAccess, golemEnchantCapacity

Phase 3: Combat Pipeline (Core Implementation)

  • Rewrite src/lib/game/stores/golem-combat-actions.ts — Full implementation:
    • summonGolemDesign(design) — Compute costs, deduct mana, create active golem instance
    • tickGolemCombat(golem) — Attack timer, basic attacks, spell casting logic
    • tickGolemMaintenance(golem) — Player upkeep = core.regen × 2, dismiss if unpaid
    • tickGolemManaRegen(golem) — Internal mana regen for spell casting
    • onRoomClearedGolems() — Decrement roomsRemaining, dismiss expired
  • Rewrite src/lib/game/stores/pipelines/golem-combat.ts — Wire into combat tick pipeline
  • Integrate with src/lib/game/stores/combatStore.ts — Active golems state, loadout management

Phase 4: UI Redesign

  • Redesign src/components/game/tabs/GolemancyTab.tsxDesign Builder interface:
    • Component selection panels (Core, Frame, Circuit, Enchantments)
    • Real-time computed stats preview (summon cost, upkeep, damage, speed, duration, spell slots)
    • Design save/load/delete
    • Loadout priority list (drag to reorder)
    • Unlock status indicators per component
    • Enchantment capacity calculator (Frame.MagicAffinity × CoreTierMultiplier)

Phase 5: Integration & Polish

  • Sync docs/specs/spire-combat-spec.md §9 with new system
  • Update src/lib/game/data/disciplines/fabricator.ts unlock conditions to reference new component requirements
  • Add Guardian Core unlock: Invoker 5 + Guardian Pact signed
  • Add Crystal-Steel Hybrid Frame unlock: Fabricator 5 + Enchanter 5
  • Test complete flow: Create design → Enter spire → Room entry summon → Combat → Maintenance → Room clear → Fade
  • Verify dual-attunement requirements enforced (Enchanter/Fabricator/Invoker levels)

Acceptance Criteria (from Updated Spec)

# Criterion
AC-1 Golem slots = floor(fabricatorLevel / 2) + discipline bonus (max 7)
AC-2 Player creates designs by combining Core + Frame + Circuit + Enchantments
AC-3 Component unlock requirements enforced (attunement levels, mana types, pacts)
AC-4 Designs summoned on room entry if mana allows; failed summons skipped for that room
AC-5 Each golem attacks on its own timer using frame's attack speed
AC-6 Golems with Intermediate/Advanced/Guardian circuits cast selected spells when mana permits
AC-7 Magic Affinity reduces spell damage proportionally (spellDamage × MagicAffinity/100)
AC-8 Frame special effects apply (AoE, Slow, etc.)
AC-9 Enchantments on frames apply sword effects to basic attacks
AC-10 Player upkeep = Core.regen × 2 deducted each tick; golems dismiss if unpaid
AC-11 Dismissed golems not re-summoned mid-room
AC-12 Room duration ticks down on room clear; golems fade after core's maxRoomDuration
AC-13 Guardian Constructs require Guardian Core + Crystal-Steel Frame + Guardian Circuit
AC-14 Golem loadout (designs) configured outside spire, persists across rooms
AC-15 Golem HP is display-only; golems don't take damage from enemies

Dependencies & Blockers

  • Requires spell enchantment system to be functional (for circuit spell selection)
  • Requires Guardian system (pacts, guardian mana types) for Guardian Core/Circuit
  • Requires Enchanter attunement for enchantment unlocks
  • Combat tick pipeline must support parallel golem instances with individual state

Notes

  • The old 10 golem definitions in data/golems/ are replaced entirely by this component system
  • Design data persists in combatStore as golemancy.designs[] and golemancy.loadout[]
  • Active golems tracked in combatStore as golemancy.activeGolems[] with per-instance state (roomsRemaining, attackProgress, currentMana, selectedSpellIndex)
  • This is a breaking change to save data — consider migration or fresh start
**Type:** Feature / Major System Redesign **Priority:** High ## Summary Redesign the entire Golemancy system from predefined golem types (10 fixed golems) to a **component-based construction system** where players design golems by combining: 1. **Core** (power source) — 4 tiers: Basic, Intermediate, Advanced, Guardian 2. **Frame** (physical chassis) — 7 types: Earth, Sand, Frost, Crystal, Steel, Shadowglass, Crystal-Steel Hybrid 3. **Mind Circuit** (behavior) — 4 types: Simple, Intermediate, Advanced, Guardian 4. **Enchantments** (optional) — Sword enchantments applied to basic attacks This is based on the detailed design in **issue #268 comment** (by Anexim). --- ## Key Changes from Current System | Current | New | |---|---| | 10 fixed golem definitions | Component system with 4×7×4×N combinations | | Fixed summon/maintenance costs per golem | Computed from selected components | | Fixed spell behavior per golem type | Player selects spells per circuit type | | Fixed tier/element per golem | Determined by Core + Frame combination | | No Guardian Constructs | Guardian Core + Crystal-Steel Frame + Guardian Circuit | | Golem HP takes damage | HP is display-only; golems don't take enemy damage | --- ## Implementation Tasks ### Phase 1: Data Definitions - [ ] Create `src/lib/game/data/golems/cores.ts` — 4 Core definitions with mana types, capacity, regen, maxRoomDuration, summonCost, unlock conditions - [ ] Create `src/lib/game/data/golems/frames.ts` — 7 Frame definitions with damage, speed, armorPierce, magicAffinity, specialEffect, unlock conditions - [ ] Create `src/lib/game/data/golems/circuits.ts` — 4 Circuit definitions with maxSpells, behavior logic, unlock conditions - [ ] Create `src/lib/game/data/golems/enchantments.ts` — Golem enchantment definitions (Sword_Fire, Sword_Frost, Sword_Lightning, Sword_Shadow) - [ ] Update `src/lib/game/data/golems/types.ts` — New type definitions for component system (CoreDefinition, FrameDefinition, CircuitDefinition, GolemDesign, computed properties) - [ ] Create `src/lib/game/data/golems/designs.ts` — Design builder, validation, computed property calculation - [ ] Update `src/lib/game/data/golems/index.ts` — Export new modules - [ ] Archive/remove old golem definition files (`base-golems.ts`, `elemental-golems.ts`, `hybrid-golems.ts`, `golems-data.ts`, `utils.ts`) or mark deprecated ### Phase 2: Discipline Updates - [ ] Update `src/lib/game/data/disciplines/fabricator.ts` — Golem Crafting discipline perks should unlock component tiers/capacity, not fixed golems - [ ] Add new discipline stats if needed: `golemCoreTier`, `golemFrameAccess`, `golemCircuitAccess`, `golemEnchantCapacity` ### Phase 3: Combat Pipeline (Core Implementation) - [ ] Rewrite `src/lib/game/stores/golem-combat-actions.ts` — Full implementation: - `summonGolemDesign(design)` — Compute costs, deduct mana, create active golem instance - `tickGolemCombat(golem)` — Attack timer, basic attacks, spell casting logic - `tickGolemMaintenance(golem)` — Player upkeep = core.regen × 2, dismiss if unpaid - `tickGolemManaRegen(golem)` — Internal mana regen for spell casting - `onRoomClearedGolems()` — Decrement roomsRemaining, dismiss expired - [ ] Rewrite `src/lib/game/stores/pipelines/golem-combat.ts` — Wire into combat tick pipeline - [ ] Integrate with `src/lib/game/stores/combatStore.ts` — Active golems state, loadout management ### Phase 4: UI Redesign - [ ] Redesign `src/components/game/tabs/GolemancyTab.tsx` — **Design Builder** interface: - Component selection panels (Core, Frame, Circuit, Enchantments) - Real-time computed stats preview (summon cost, upkeep, damage, speed, duration, spell slots) - Design save/load/delete - Loadout priority list (drag to reorder) - Unlock status indicators per component - Enchantment capacity calculator (Frame.MagicAffinity × CoreTierMultiplier) ### Phase 5: Integration & Polish - [ ] Sync `docs/specs/spire-combat-spec.md` §9 with new system - [ ] Update `src/lib/game/data/disciplines/fabricator.ts` unlock conditions to reference new component requirements - [ ] Add Guardian Core unlock: Invoker 5 + Guardian Pact signed - [ ] Add Crystal-Steel Hybrid Frame unlock: Fabricator 5 + Enchanter 5 - [ ] Test complete flow: Create design → Enter spire → Room entry summon → Combat → Maintenance → Room clear → Fade - [ ] Verify dual-attunement requirements enforced (Enchanter/Fabricator/Invoker levels) --- ## Acceptance Criteria (from Updated Spec) | # | Criterion | |---|---| | AC-1 | Golem slots = `floor(fabricatorLevel / 2)` + discipline bonus (max 7) | | AC-2 | Player creates designs by combining Core + Frame + Circuit + Enchantments | | AC-3 | Component unlock requirements enforced (attunement levels, mana types, pacts) | | AC-4 | Designs summoned on room entry if mana allows; failed summons skipped for that room | | AC-5 | Each golem attacks on its own timer using frame's attack speed | | AC-6 | Golems with Intermediate/Advanced/Guardian circuits cast selected spells when mana permits | | AC-7 | Magic Affinity reduces spell damage proportionally (spellDamage × MagicAffinity/100) | | AC-8 | Frame special effects apply (AoE, Slow, etc.) | | AC-9 | Enchantments on frames apply sword effects to basic attacks | | AC-10 | Player upkeep = Core.regen × 2 deducted each tick; golems dismiss if unpaid | | AC-11 | Dismissed golems not re-summoned mid-room | | AC-12 | Room duration ticks down on room clear; golems fade after core's maxRoomDuration | | AC-13 | Guardian Constructs require Guardian Core + Crystal-Steel Frame + Guardian Circuit | | AC-14 | Golem loadout (designs) configured outside spire, persists across rooms | | AC-15 | Golem HP is display-only; golems don't take damage from enemies | --- ## Dependencies & Blockers - Requires spell enchantment system to be functional (for circuit spell selection) - Requires Guardian system (pacts, guardian mana types) for Guardian Core/Circuit - Requires Enchanter attunement for enchantment unlocks - Combat tick pipeline must support parallel golem instances with individual state --- ## Notes - The old 10 golem definitions in `data/golems/` are **replaced entirely** by this component system - Design data persists in combatStore as `golemancy.designs[]` and `golemancy.loadout[]` - Active golems tracked in combatStore as `golemancy.activeGolems[]` with per-instance state (roomsRemaining, attackProgress, currentMana, selectedSpellIndex) - This is a **breaking change** to save data — consider migration or fresh start
Anexim added the ai:todo label 2026-06-05 14:59:59 +02:00
n8n-gitea was assigned by Anexim 2026-06-05 14:59:59 +02:00
Anexim added ai:in-progress and removed ai:todo labels 2026-06-06 19:00:31 +02:00
Author
Owner

Starting implementation of Golemancy System Redesign (component-based construction). The data layer (cores, frames, mindCircuits, enchantments, types, utils) and combat pipeline are already well-implemented. Focusing on: discipline updates, unlock requirement fixes, slot cap, and comprehensive tests.

Starting implementation of Golemancy System Redesign (component-based construction). The data layer (cores, frames, mindCircuits, enchantments, types, utils) and combat pipeline are already well-implemented. Focusing on: discipline updates, unlock requirement fixes, slot cap, and comprehensive tests.
Anexim added ai:done and removed ai:in-progress labels 2026-06-06 19:19:56 +02:00
Author
Owner

Implementation complete. All 1009 tests pass (52 test files). Changes committed and pushed.

Summary of changes:

  1. Crystal-Steel Hybrid Frame unlock — Fixed to require Fabricator 5 + Enchanter 5 (dual attunement) instead of just Fabricator 5
  2. Golem slot calculation — Fixed bug where fabricator level was hardcoded to 0 in summon logic. Now properly passes fabricator level and caps total slots at 7 (base 5 + discipline bonus max 2)
  3. Discipline integration — Added golemCapacity discipline bonus to slot calculation in both combat-descent-actions and golem-combat pipeline
  4. UI update — GolemancyTab now shows discipline slot bonus in header
  5. Tests — Added 50 new tests across golemancy-data.test.ts (34 tests) and golemancy-combat.test.ts (16 tests)
Implementation complete. All 1009 tests pass (52 test files). Changes committed and pushed. Summary of changes: 1. **Crystal-Steel Hybrid Frame unlock** — Fixed to require Fabricator 5 + Enchanter 5 (dual attunement) instead of just Fabricator 5 2. **Golem slot calculation** — Fixed bug where fabricator level was hardcoded to 0 in summon logic. Now properly passes fabricator level and caps total slots at 7 (base 5 + discipline bonus max 2) 3. **Discipline integration** — Added golemCapacity discipline bonus to slot calculation in both combat-descent-actions and golem-combat pipeline 4. **UI update** — GolemancyTab now shows discipline slot bonus in header 5. **Tests** — Added 50 new tests across golemancy-data.test.ts (34 tests) and golemancy-combat.test.ts (16 tests)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#288