[High] [Bug] Golemancy spec vs code: slot cap 7 vs 9, AoE not implemented, armor pierce formula mismatch #326

Closed
opened 2026-06-08 16:02:44 +02:00 by Anexim · 3 comments
Owner

Spec: docs/specs/attunements/fabricator/systems/golemancy-spec.md

Discrepancies found:

D-SLOT-01 [HIGH] — Golem slot cap is 7 in code but spec allows up to 9

  • Spec §2.2: discipline provides base golemCapacity: +2 + up to +2 from capped perk = max +4 discipline bonus. With attunement max of 5, spec implies maximum 9 golem slots
  • Code: golem-combat-actions.ts caps at Math.min(7, baseSlots + disciplineSlotsBonus)maximum 7
  • Fix: Either change cap to 9 in code, or update spec to say max is 7

D-COMB-03 [HIGH] — AoE frames don't actually hit multiple targets

  • Spec §11: AoE frames (Sand, Shadowglass) distribute damage across multiple targets
  • Code: processGolemAttacks targets a single enemy via getTargetEnemy()aoeTargets field is computed in stats but never used in the combat loop
  • Fix: Implement AoE damage distribution using aoeTargets

D-COMB-01 [HIGH] — Armor pierce formula differs between specs

  • Golemancy spec §11: dmg = golem.frame.baseDamage (no armor pierce in damage formula)
  • Spire-combat spec §9.4: dmg = frame.baseDamage × (1 + frame.armorPierce) (armor pierce increases damage)
  • Code (golem-combat-helpers.ts): Uses armor pierce to reduce enemy armor's damage reduction effect (third interpretation)
  • Fix: Reconcile between specs and implement consistently

D-CIRC-01 [MEDIUM] — Simple Logic Circuit summon cost is raw mana, not earth mana

  • Spec §6.1: Cost is "Earth Mana"
  • Code (mindCircuits.ts): Uses rawCost(3) (raw mana)
  • Fix: Change to elemCost('earth', 3) to match spec

D-ENCHANT-03 [MEDIUM] — Golem enchantments have no unlock requirement in data model

  • Spec §7: Enchantments require "Enchanter Attunement 5 + Fabricator Attunement 5"
  • Code (golemEnchantments.ts): No unlockRequirement field on enchantment definitions
  • Fix: Add unlock requirements to data model or enforce in UI

D-CORE-01/D-CORE-02 [LOW] — Guardian Core uses placeholder values

  • Spec §4.3: Guardian Core should use guardian-specific mana types
  • Code (cores.ts): Uses elemCost('earth', 50) and primaryManaType: 'earth' as placeholders
  • Fix: Implement runtime override mechanism for guardian-specific mana types
**Spec:** `docs/specs/attunements/fabricator/systems/golemancy-spec.md` **Discrepancies found:** ### D-SLOT-01 [HIGH] — Golem slot cap is 7 in code but spec allows up to 9 - **Spec §2.2:** discipline provides base `golemCapacity: +2` + up to `+2` from capped perk = max +4 discipline bonus. With attunement max of 5, spec implies **maximum 9 golem slots** - **Code:** `golem-combat-actions.ts` caps at `Math.min(7, baseSlots + disciplineSlotsBonus)` — **maximum 7** - **Fix:** Either change cap to 9 in code, or update spec to say max is 7 ### D-COMB-03 [HIGH] — AoE frames don't actually hit multiple targets - **Spec §11:** AoE frames (Sand, Shadowglass) distribute damage across multiple targets - **Code:** `processGolemAttacks` targets a single enemy via `getTargetEnemy()` — `aoeTargets` field is computed in stats but **never used in the combat loop** - **Fix:** Implement AoE damage distribution using `aoeTargets` ### D-COMB-01 [HIGH] — Armor pierce formula differs between specs - **Golemancy spec §11:** `dmg = golem.frame.baseDamage` (no armor pierce in damage formula) - **Spire-combat spec §9.4:** `dmg = frame.baseDamage × (1 + frame.armorPierce)` (armor pierce increases damage) - **Code (`golem-combat-helpers.ts`):** Uses armor pierce to reduce enemy armor's damage reduction effect (third interpretation) - **Fix:** Reconcile between specs and implement consistently ### D-CIRC-01 [MEDIUM] — Simple Logic Circuit summon cost is raw mana, not earth mana - **Spec §6.1:** Cost is "Earth Mana" - **Code (`mindCircuits.ts`):** Uses `rawCost(3)` (raw mana) - **Fix:** Change to `elemCost('earth', 3)` to match spec ### D-ENCHANT-03 [MEDIUM] — Golem enchantments have no unlock requirement in data model - **Spec §7:** Enchantments require "Enchanter Attunement 5 + Fabricator Attunement 5" - **Code (`golemEnchantments.ts`):** No `unlockRequirement` field on enchantment definitions - **Fix:** Add unlock requirements to data model or enforce in UI ### D-CORE-01/D-CORE-02 [LOW] — Guardian Core uses placeholder values - **Spec §4.3:** Guardian Core should use guardian-specific mana types - **Code (`cores.ts`):** Uses `elemCost('earth', 50)` and `primaryManaType: 'earth'` as placeholders - **Fix:** Implement runtime override mechanism for guardian-specific mana types
Anexim added the ai:todo label 2026-06-08 16:02:44 +02:00
n8n-gitea was assigned by Anexim 2026-06-08 16:02:44 +02:00
Anexim added ai:in-progress and removed ai:todo labels 2026-06-09 00:58:24 +02:00
Author
Owner

Starting work on golecmancy spec vs code discrepancies. Analyzing all 6 issues: D-SLOT-01, D-COMB-03, D-COMB-01, D-CIRC-01, D-ENCHANT-03, D-CORE-01/02.

Starting work on golecmancy spec vs code discrepancies. Analyzing all 6 issues: D-SLOT-01, D-COMB-03, D-COMB-01, D-CIRC-01, D-ENCHANT-03, D-CORE-01/02.
Author
Owner

Progress update — All 6 discrepancies addressed:

D-SLOT-01 [HIGH] — No code change needed

Spec §2.2 says max 7 golem slots (5 attunement + 2 discipline). Code already caps at Math.min(7, ...). The issue description misread the spec — both agree on max 7.

D-COMB-03 [HIGH] — AoE damage distribution implemented

Added getTargetEnemies parameter to processGolemAttacks. Frames with aoeTargets > 1 (Sand, Shadowglass) now distribute damage evenly across up to aoeTargets living enemies. Updated store wrapper to provide enemy list.

D-COMB-01 [HIGH] — Armor pierce formula reconciled

Changed computeBasicAttackDamage from "armor pierce reduces enemy armor effectiveness" to spire-combat spec §9.4 formula: dmg = baseDamage × (1 + armorPierce). Enemy armor reduction is handled separately in onDamageDealt.

D-CIRC-01 [MEDIUM] — Simple Logic Circuit cost fixed

Changed from rawCost(3) to elemCost('earth', 3) to match spec §6.1 ("Cost is Earth Mana").

D-ENCHANT-03 [MEDIUM] — Golem enchantment unlock requirements added

Added unlockRequirement: { type: 'dual_attunement', attunements: ['enchanter', 'fabricator'], levels: [5, 5] } to all 8 golem enchantment definitions, matching spec §7.

D-CORE-01/02 [LOW] — Guardian Core runtime override mechanism

Added guardianSummonCost and guardianPrimaryManaType optional fields to GolemDesign and SerializedDesign interfaces. computeGolemStats now uses these overrides when core is 'guardian', allowing runtime guardian-specific mana types instead of placeholder earth mana.

Tests: All 135 golem-related tests pass. Updated tests for new armor pierce formula and Simple Logic Circuit cost change.

**Progress update — All 6 discrepancies addressed:** ### D-SLOT-01 [HIGH] — No code change needed Spec §2.2 says max 7 golem slots (5 attunement + 2 discipline). Code already caps at `Math.min(7, ...)`. The issue description misread the spec — both agree on max 7. ### D-COMB-03 [HIGH] — AoE damage distribution implemented ✅ Added `getTargetEnemies` parameter to `processGolemAttacks`. Frames with `aoeTargets > 1` (Sand, Shadowglass) now distribute damage evenly across up to `aoeTargets` living enemies. Updated store wrapper to provide enemy list. ### D-COMB-01 [HIGH] — Armor pierce formula reconciled ✅ Changed `computeBasicAttackDamage` from "armor pierce reduces enemy armor effectiveness" to spire-combat spec §9.4 formula: `dmg = baseDamage × (1 + armorPierce)`. Enemy armor reduction is handled separately in `onDamageDealt`. ### D-CIRC-01 [MEDIUM] — Simple Logic Circuit cost fixed ✅ Changed from `rawCost(3)` to `elemCost('earth', 3)` to match spec §6.1 ("Cost is Earth Mana"). ### D-ENCHANT-03 [MEDIUM] — Golem enchantment unlock requirements added ✅ Added `unlockRequirement: { type: 'dual_attunement', attunements: ['enchanter', 'fabricator'], levels: [5, 5] }` to all 8 golem enchantment definitions, matching spec §7. ### D-CORE-01/02 [LOW] — Guardian Core runtime override mechanism ✅ Added `guardianSummonCost` and `guardianPrimaryManaType` optional fields to `GolemDesign` and `SerializedDesign` interfaces. `computeGolemStats` now uses these overrides when core is 'guardian', allowing runtime guardian-specific mana types instead of placeholder earth mana. **Tests:** All 135 golem-related tests pass. Updated tests for new armor pierce formula and Simple Logic Circuit cost change.
Anexim added ai:done and removed ai:in-progress labels 2026-06-09 01:26:59 +02:00
Author
Owner

All 6 discrepancies have been addressed and committed. See commit b0e553c.

Summary of changes:

  • D-SLOT-01 [HIGH]: Verified — code cap of 7 matches spec §2.2 (both say max 7)
  • D-COMB-03 [HIGH]: AoE damage distribution implemented for Sand/Shadowglass frames
  • D-COMB-01 [HIGH]: Armor pierce formula reconciled to spire-combat spec §9.4: dmg = baseDamage × (1 + armorPierce)
  • D-CIRC-01 [MEDIUM]: Simple Logic Circuit summon cost changed from rawCost(3) to elemCost('earth', 3)
  • D-ENCHANT-03 [MEDIUM]: Added unlockRequirement (Enchanter 5 + Fabricator 5) to all 8 golem enchantments
  • D-CORE-01/02 [LOW]: Added guardianSummonCost/guardianPrimaryManaType runtime override mechanism for Guardian Core

All 1086 tests pass. Files refactored to stay under 400-line limit.

All 6 discrepancies have been addressed and committed. See commit b0e553c. Summary of changes: - **D-SLOT-01 [HIGH]**: Verified — code cap of 7 matches spec §2.2 (both say max 7) - **D-COMB-03 [HIGH]**: AoE damage distribution implemented for Sand/Shadowglass frames - **D-COMB-01 [HIGH]**: Armor pierce formula reconciled to spire-combat spec §9.4: dmg = baseDamage × (1 + armorPierce) - **D-CIRC-01 [MEDIUM]**: Simple Logic Circuit summon cost changed from rawCost(3) to elemCost('earth', 3) - **D-ENCHANT-03 [MEDIUM]**: Added unlockRequirement (Enchanter 5 + Fabricator 5) to all 8 golem enchantments - **D-CORE-01/02 [LOW]**: Added guardianSummonCost/guardianPrimaryManaType runtime override mechanism for Guardian Core All 1086 tests pass. Files refactored to stay under 400-line limit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#326