fix: #346 #345 spell casting guards and equipment spell wiring
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
Issue #346: Added floorHP > 0 guard to primary and equipment spell casting while loops in combat-actions.ts. Previously spells continued casting and draining mana after all enemies were dead. Issue #345 Bug A: Populated equipmentSpellStates from equipped gear in gameStore.ts combat tick setup using getActiveEquipmentSpells(). Previously equipment spell enchantments (e.g., spell_manaBolt on casters) never fired during combat because equipmentSpellStates was always empty. Issue #345 Bug B: Added deductWeaponEnchantCosts() helper in combat-damage.ts and wired it into the melee loop in combat-actions.ts. Weapon enchant spells (fireBlade, frostBlade, lightningBlade, voidBlade) now properly deduct mana per melee hit instead of providing free elemental bonus damage. All 1141 tests pass (65 test files), no regressions. Added 5 new regression tests. Files changed: - combat-actions.ts: +floorHP>0 guards, weapon enchant cost deduction - combat-damage.ts: +deductWeaponEnchantCosts() helper - gameStore.ts: +equipment spell state population from equipped gear - spell-cast-floorhp-guard.test.ts: new regression test file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_meta": {
|
||||
"generated": "2026-06-10T09:19:24.358Z",
|
||||
"generated": "2026-06-10T09:41:39.446Z",
|
||||
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
|
||||
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
|
||||
},
|
||||
@@ -564,6 +564,7 @@
|
||||
"effects/discipline-effects.ts",
|
||||
"stores/attunementStore.ts",
|
||||
"stores/combat-state.types.ts",
|
||||
"stores/discipline-slice.ts",
|
||||
"stores/golem-combat-actions.ts",
|
||||
"stores/manaStore.ts",
|
||||
"stores/non-combat-room-actions.ts",
|
||||
@@ -578,6 +579,7 @@
|
||||
"stores/combat-actions.ts",
|
||||
"stores/combat-descent-actions.ts",
|
||||
"stores/combat-state.types.ts",
|
||||
"stores/discipline-slice.ts",
|
||||
"stores/golemancy-actions.ts",
|
||||
"stores/non-combat-room-actions.ts",
|
||||
"types.ts",
|
||||
@@ -692,7 +694,6 @@
|
||||
],
|
||||
"stores/gameStore.ts": [
|
||||
"constants.ts",
|
||||
"data/attunements.ts",
|
||||
"data/guardian-encounters.ts",
|
||||
"effects.ts",
|
||||
"effects/discipline-effects.ts",
|
||||
@@ -713,6 +714,7 @@
|
||||
"stores/tick-pipeline.ts",
|
||||
"stores/uiStore.ts",
|
||||
"types.ts",
|
||||
"utils/conversion-params.ts",
|
||||
"utils/conversion-rates.ts",
|
||||
"utils/element-cap-bonus.ts",
|
||||
"utils/element-distance.ts",
|
||||
@@ -872,6 +874,10 @@
|
||||
"types.ts",
|
||||
"utils/mana-utils.ts"
|
||||
],
|
||||
"utils/conversion-params.ts": [
|
||||
"data/attunements.ts",
|
||||
"data/guardian-encounters.ts"
|
||||
],
|
||||
"utils/conversion-rates.ts": [
|
||||
"data/conversion-costs.ts",
|
||||
"effects/discipline-effects.ts",
|
||||
@@ -902,6 +908,7 @@
|
||||
],
|
||||
"utils/index.ts": [
|
||||
"utils/combat-utils.ts",
|
||||
"utils/conversion-params.ts",
|
||||
"utils/floor-utils.ts",
|
||||
"utils/formatting.ts",
|
||||
"utils/mana-utils.ts",
|
||||
|
||||
Reference in New Issue
Block a user