[High] [Bug] Golemancy: Combat runtime missing elemental matchup, enchantment effects, and proper spell damage #313
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 §11
Severity: High
Problem: Multiple combat features are missing or wrong in
src/lib/game/stores/golem-combat-actions.ts:20 * frame.magicAffinityinstead of actual spell databaseDamage * (1 + armorPierce)) instead of bypassing enemy armorFile:
src/lib/game/stores/golem-combat-actions.ts(multiple lines)Starting work on golem-combat-actions.ts fixes. Will address all 5 issues: spell damage, spell mana cost, elemental matchup, enchantment effects, and armor pierce.
All 5 fixes applied and verified. 1038 tests passing (53 files), including 29 new regression tests. Files stay under 400-line limit.
Fix committed and pushed. Summary of changes:
Files modified:
src/lib/game/stores/golem-combat-actions.ts(366 lines) — Core fixessrc/lib/game/stores/golem-combat-helpers.ts(134 lines, new) — Extracted helperssrc/lib/game/stores/combat-actions.ts(388 lines) — Updated call sitesrc/lib/game/stores/golem-combat-actions.test.ts(348 lines, new) — Integration testssrc/lib/game/stores/golem-combat-helpers.test.ts(143 lines, new) — Unit tests5 fixes applied:
SPELLS_DEF[spellId].dmg * frame.magicAffinity(was hardcoded20 * magicAffinity)SPELLS_DEF[spellId].cost.amount(was hardcoded10)getElementalBonus(frame.element, enemyElement)applied to basic attacksonApplyEnchantmentEffectscallbackbaseDamage * (1 - enemyArmor * (1 - armorPierce))(wasbaseDamage * (1 + armorPierce))Test results: 1041 tests passing (54 files), including 32 new regression tests.
All fixes verified complete. 1041 tests passing. Closing as done.