fix: Apply pact affinity cast speed bonus to all spell casts (AC-13)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s

Previously the pact affinity cast speed bonus was only applied to invocation
spells. Per spec §6.2 and §10.2, it should apply to ALL spell casts (active,
equipment, and invocation).

Changes:
- invocation-utils.ts: Added computeAttackSpeedMultFromPactAffinity() helper
  that combines prestige upgrade + discipline bonus and applies the diminishing
  returns formula
- gameStore.ts: Compute total pact affinity (prestige + discipline) and apply
  cast speed bonus to attackSpeedMult passed to processCombatTick
- combat-actions.ts: Use attackSpeedMult directly for active/equipment spell cast
  progress (bonus already baked in)
- combat-invocation.ts: Use attackSpeedMult directly for invocation cast progress
  (bonus already baked in), removed redundant pactAffinity parameter
This commit is contained in:
2026-06-13 17:25:57 +02:00
parent b7afe7a434
commit 62638d62d5
6 changed files with 57 additions and 11 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Circular Dependencies
Generated: 2026-06-13T11:02:39.214Z
Generated: 2026-06-13T11:42:23.525Z
Found: 4 circular chain(s) — these MUST be fixed before modifying involved files.
1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts
+30 -2
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-06-13T11:02:37.078Z",
"generated": "2026-06-13T11:42:21.085Z",
"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."
},
@@ -555,6 +555,8 @@
"data/guardian-encounters.ts",
"effects/discipline-effects.ts",
"stores/combat-damage.ts",
"stores/combat-invocation.ts",
"stores/combat-melee.ts",
"stores/combat-state.types.ts",
"stores/dot-runtime.ts",
"stores/golem-combat-actions.ts",
@@ -581,6 +583,24 @@
"stores/prestigeStore.ts",
"utils/spire-utils.ts"
],
"stores/combat-invocation.ts": [
"constants.ts",
"data/guardian-encounters.ts",
"effects/discipline-effects.ts",
"stores/combat-damage.ts",
"stores/combat-state.types.ts",
"types.ts",
"utils/index.ts",
"utils/invocation-utils.ts"
],
"stores/combat-melee.ts": [
"constants.ts",
"data/guardian-encounters.ts",
"stores/combat-damage.ts",
"stores/combat-state.types.ts",
"types.ts",
"utils/index.ts"
],
"stores/combat-reset.ts": [
"stores/combat-actions.ts",
"stores/combat-state.types.ts",
@@ -589,7 +609,8 @@
"utils/spire-utils.ts"
],
"stores/combat-state.types.ts": [
"types.ts"
"types.ts",
"utils/invocation-utils.ts"
],
"stores/combatStore.ts": [
"data/guardian-encounters.ts",
@@ -934,6 +955,13 @@
"utils/result.ts",
"utils/safe-persist.ts"
],
"utils/invocation-utils.ts": [
"constants/spells.ts",
"data/guardian-encounters.ts",
"types.ts",
"utils/combat-utils.ts",
"utils/mana-utils.ts"
],
"utils/mana-utils.ts": [
"constants.ts",
"data/attunements.ts",