fix: Restrict pact affinity cast speed bonus to invocation spells only
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Previously (commit 62638d6), the pact affinity cast speed bonus was applied
to ALL spell casts (active, equipment, invocation). Per design intent, it
should only apply to invocation system spells.
Changes:
- invocation-system-spec.md: Update §6.2, §10.2, AC-13 to clarify bonus
applies to invocation spells only
- gameStore.ts: Stop computing pact affinity bonus into attackSpeedMult;
pass base 1.0 instead
- combat-actions.ts: Remove stale AC-13 comment
- combat-invocation.ts: Compute pact affinity cast speed bonus locally
for invocation spells only, using prestige upgrade level + discipline bonus
- invocation-utils.ts: Remove computeAttackSpeedMultFromPactAffinity (no
longer needed)
All 1235 tests pass.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Circular Dependencies
|
||||
Generated: 2026-06-13T11:42:23.525Z
|
||||
Generated: 2026-06-13T15:26:15.912Z
|
||||
Found: 4 circular chain(s) — these MUST be fixed before modifying involved files.
|
||||
|
||||
1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_meta": {
|
||||
"generated": "2026-06-13T11:42:21.085Z",
|
||||
"generated": "2026-06-13T15:26:13.488Z",
|
||||
"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."
|
||||
},
|
||||
@@ -760,6 +760,7 @@
|
||||
"utils/element-cap-bonus.ts",
|
||||
"utils/element-distance.ts",
|
||||
"utils/index.ts",
|
||||
"utils/invocation-utils.ts",
|
||||
"utils/safe-persist.ts"
|
||||
],
|
||||
"stores/gameStore.types.ts": [],
|
||||
|
||||
@@ -17,7 +17,7 @@ auto-cast elemental spells at a fraction of their normal cost.
|
||||
- Make pacts feel *active* in combat, not just passive stat sticks
|
||||
- Reward players who have signed more/higher-tier pacts (faster charge, stronger spells)
|
||||
- Create meaningful decisions: when to invoke, which guardian gets channeled, mana management during invocation
|
||||
- Give Pact Affinity a combat role (cast speed) so it matters outside of ritual time reduction
|
||||
- Give Pact Affinity a combat role (cast speed for invocation spells) so it matters outside of ritual time reduction
|
||||
- Add a new Invoker discipline (`guardian-invocation`) for vertical progression of the system
|
||||
|
||||
---
|
||||
@@ -261,13 +261,13 @@ This gives diminishing returns:
|
||||
|
||||
### 6.2 Application
|
||||
|
||||
The cast speed bonus applies to **all spell casts** (active spell, equipment
|
||||
spells, and invocation spells) while in combat (`climb` action). It is applied
|
||||
as a multiplier to the `totalAttackSpeed` value used in cast progress
|
||||
calculation:
|
||||
The cast speed bonus applies to **invocation spells only** — the spells auto-cast
|
||||
by the Invocation system while channeling a guardian. It does **not** apply to the
|
||||
player's active spell or equipment spells. It is applied as a multiplier to the
|
||||
attack speed used in the invocation spell's cast progress calculation:
|
||||
|
||||
```
|
||||
effectiveAttackSpeed = totalAttackSpeed × (1 + castSpeedBonus)
|
||||
effectiveAttackSpeed = baseAttackSpeed × (1 + castSpeedBonus)
|
||||
```
|
||||
|
||||
### 6.3 Affinity Sources (Unchanged)
|
||||
@@ -497,15 +497,16 @@ spell block, add an **invocation block**:
|
||||
|
||||
### 10.2 Pact Affinity Cast Speed
|
||||
|
||||
In the cast progress calculation, apply the cast speed bonus:
|
||||
In the invocation spell cast progress calculation, apply the cast speed bonus:
|
||||
|
||||
```
|
||||
const castSpeedBonus = computeCastSpeedBonus(pactAffinity);
|
||||
const effectiveAttackSpeed = totalAttackSpeed × (1 + castSpeedBonus);
|
||||
const progressPerTick = HOURS_PER_TICK × spellCastSpeed × effectiveAttackSpeed;
|
||||
const effectiveAttackSpeed = baseAttackSpeed × (1 + castSpeedBonus);
|
||||
const invProgressPerTick = HOURS_PER_TICK × invCastSpeed × effectiveAttackSpeed;
|
||||
```
|
||||
|
||||
This applies to **all** cast progress calculations (active, equipment, invocation).
|
||||
This applies to **invocation spells only** (not to the player's active spell or
|
||||
equipment spells).
|
||||
|
||||
---
|
||||
|
||||
@@ -572,7 +573,7 @@ gameStore.tick()
|
||||
| AC-10 | Charge only fills while in `climb` action. |
|
||||
| AC-11 | Invocation spell casts in parallel with the player's active spell and equipment spells. |
|
||||
| AC-12 | Pact Affinity grants a cast speed bonus using `MAX_BONUS × (1 - 1 / (1 + pactAffinity × 1.5))`, capped at 50%. |
|
||||
| AC-13 | Cast speed bonus applies to all spell casts (active, equipment, invocation). |
|
||||
| AC-13 | Cast speed bonus applies to invocation spells only (not active/equipment spells). |
|
||||
| AC-14 | The `guardian-invocation` discipline requires at least one signed pact. |
|
||||
| AC-15 | `invocation-efficiency` once perk reduces cost multiplier by 0.02. |
|
||||
| AC-16 | `invocation-speed` infinite perk grants +0.05 charge rate bonus every 150 XP. |
|
||||
|
||||
Reference in New Issue
Block a user