[Medium] [Bug] Enchanting: spell_iceShard defined twice with different costs (75 vs 95) #303
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/enchanter/systems/enchanting-spec.md §7.1
Severity: Wrong value
Problem:
spell_iceShardis defined in both:src/lib/game/data/enchantments/spell-effects/basic-spells.ts:53-60withbaseCapacityCost: 75src/lib/game/data/enchantments/spell-effects/frost-spells.ts:23-30withbaseCapacityCost: 95Since both are merged into the same
ENCHANTMENT_EFFECTSrecord via spread inspell-effects/index.ts:28-29, the frost-spells version (cost 95) overwrites the basic-spells version (cost 75). The spec lists this ID twice with different costs, which is also a spec ambiguity.File:
src/lib/game/data/enchantments/spell-effects/index.ts:28-29Starting work on spell_iceShard duplicate definition bug. Will investigate both files and the spec to determine the correct cost, then remove the duplicate.
Fix applied and pushed. Removed the duplicate
spell_iceShardentry frombasic-spells.ts(cost 75, water damage). The canonical version infrost-spells.ts(cost 95, frost damage) is now the sole definition, which is the intended behavior — the frost version overwrites the basic one via spread order inspell-effects/index.ts.Root cause: Both
basic-spells.ts:53-60andfrost-spells.ts:23-30definedspell_iceShardwith the same ID. Sincefrost-spellsis spread afterbasic-spellsin the index, the cost was silently 95 instead of 75.Fix: Removed the basic-spells duplicate (10 lines). File size: 163 lines (under 400 limit).
Tests: 1069 passed (58 files), all pre-commit checks pass.