[High] [Bug] Golemancy: Enchantment capacity formula produces near-zero values #310
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec: docs/specs/attunements/fabricator/systems/golemancy-spec.md §7
Severity: High
Problem:
src/lib/game/data/golems/utils.ts:107-108computes enchantment capacity asframe.magicAffinity * core.tierMultiplier. The magicAffinity values are decimals (0.3, 0.5, 0.9), so capacity is fractional (0.3, 0.45, 1.5, 2.7, etc.). Since enchantments cost 8-14 capacity, the system is nearly unusable. The spec likely intends magicAffinity as a percentage (30, 50, etc.) or the formula should useMath.round(frame.magicAffinity * 100) * core.tierMultiplier.File:
src/lib/game/data/golems/utils.ts:107-108Starting fix for enchantment capacity formula. Root cause:
magicAffinitystored as decimal (0.3) but spec describes it as percentage (30%). Capacity = 0.3 × 1.0 = 0.3, far below enchantment costs of 8-14. Fix: multiply by 100 in formula.Fixed enchantment capacity formula in
src/lib/game/data/golems/utils.ts:107-108. Changed fromframe.magicAffinity * core.tierMultipliertoMath.round(frame.magicAffinity * 100) * core.tierMultiplier. Root cause: magicAffinity stored as decimal (0.3) but spec describes it as percentage (30%). Updated 3 test assertions in golemancy-data.test.ts to match new values (30, 100, 300). All 34 tests pass.