fix: add curse amplification to applyEnemyDefenses (spec §6.3)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
The curse debuff was stored on enemies via dot-runtime.ts but the amplification was never applied to incoming damage. Added curse magnitude check in applyEnemyDefenses (combat-tick.ts) that multiplies incoming damage by (1 + magnitude) for each active curse effect. - Curse amplification applied BEFORE dodge/barrier/armse defenses - Multiple curse effects stack multiplicatively - Non-curse effects (burn, freeze, etc.) are ignored for amplification Also updated spire-combat-spec.md Known Gaps table to reflect: - Melee defense bypass fixed (issue #285) - Curse amplification now implemented (issue #286) Added 9 regression tests in curse-amplification.test.ts. All 957 tests pass (50 test files).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Circular Dependencies
|
||||
Generated: 2026-06-06T14:50:40.350Z
|
||||
Generated: 2026-06-06T15:33:46.661Z
|
||||
|
||||
No circular dependencies found. ✅
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_meta": {
|
||||
"generated": "2026-06-06T14:50:38.455Z",
|
||||
"generated": "2026-06-06T15:33:44.741Z",
|
||||
"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."
|
||||
},
|
||||
|
||||
@@ -215,6 +215,7 @@ Mana-Loop/
|
||||
│ │ │ │ ├── cross-module-helpers.ts
|
||||
│ │ │ │ ├── cross-module-lifecycle-consistency.test.ts
|
||||
│ │ │ │ ├── cross-module-prestige-discipline.test.ts
|
||||
│ │ │ │ ├── curse-amplification.test.ts
|
||||
│ │ │ │ ├── discipline-math.test.ts
|
||||
│ │ │ │ ├── discipline-prerequisites.test.ts
|
||||
│ │ │ │ ├── discipline-reactivate-bug.test.ts
|
||||
|
||||
@@ -539,14 +539,14 @@ They are **in scope for the implementation this spec describes**:
|
||||
|
||||
| Feature | Where Defined | Status | This Spec's Requirement |
|
||||
|---|---|---|---|
|
||||
| Enemy armor reduction | `EnemyState.armor`, `MODIFIER_CONFIG.armored` | **Implemented** (spells/DoTs only; melee bypasses — see issue #285) | Implement in `onDamageDealt` §5.2 |
|
||||
| Enemy barrier absorption | `EnemyState.barrier`, `MODIFIER_CONFIG.mage/shield` | **Implemented** (spells/DoTs only; melee bypasses — see issue #285) | Implement in `onDamageDealt` §5.2 |
|
||||
| Enemy dodge roll | `EnemyState.dodgeChance`, `MODIFIER_CONFIG.agile` | **Implemented** (spells/DoTs only; melee bypasses — see issue #285) | Implement in `onDamageDealt` §5.2 |
|
||||
| Enemy armor reduction | `EnemyState.armor`, `MODIFIER_CONFIG.armored` | **Implemented** — fixed in issue #285 (was bypassed for melee) | Implement in `onDamageDealt` §5.2 |
|
||||
| Enemy barrier absorption | `EnemyState.barrier`, `MODIFIER_CONFIG.mage/shield` | **Implemented** — fixed in issue #285 (was bypassed for melee) | Implement in `onDamageDealt` §5.2 |
|
||||
| Enemy dodge roll | `EnemyState.dodgeChance`, `MODIFIER_CONFIG.agile` | **Implemented** — fixed in issue #285 (was bypassed for melee) | Implement in `onDamageDealt` §5.2 |
|
||||
| Mage barrier recharge | `MODIFIER_CONFIG.mage.barrierRechargeRate` | Data-only | Tick in `onDamageDealt` §5.2 |
|
||||
| Guardian armor | `GuardianDef.armor` | Data-only | Add check to guardian pipeline §5.3 |
|
||||
| DoT / debuff system | Spell/enchantment type defs | **Implemented** — `dot-runtime.ts` complete and wired into combat tick | Verified working; curse amplification needs investigation (see issue #286) |
|
||||
| DoT / debuff system | Spell/enchantment type defs | **Implemented** — `dot-runtime.ts` complete and wired into combat tick; curse amplification added (issue #286) | Verified working |
|
||||
| Golemancy combat | Full golem data exists | Disconnected | Implement per §9 |
|
||||
| Sword melee attacks | Weapon type exists | **Partial** — meleeProgress exists but bypasses enemy defenses (see issue #285) | Add `meleeProgress` per §3.1 |
|
||||
| Sword melee attacks | Weapon type exists | **Implemented** — meleeProgress with enemy defense application (issue #285) | Add `meleeProgress` per §3.1 |
|
||||
| AoE target distribution | `SpellDefinition.aoe` flag | Partial | Implement per §3.2 |
|
||||
| `elemMasteryBonus` | Stub in `calcDamage` | Hardcoded `1` | Future — leave as `1` for now |
|
||||
| `guardianBonus` | Stub in `calcDamage` | Hardcoded `1` | Future — leave as `1` for now |
|
||||
|
||||
Reference in New Issue
Block a user