[High] [Task] DoT/debuff system fully implemented and wired into combat pipeline #286

Closed
opened 2026-06-05 13:53:01 +02:00 by Anexim · 2 comments
Owner

Type: Verification / Documentation update
Priority: High

Investigation findings:

The DoT/debuff system is fully implemented and wired into the combat pipeline. This contradicts the spire-combat-spec.md §11 "Known Gaps" table which lists it as "No runtime".

What's implemented:

  • dot-runtime.tsapplyOnHitEffect() and processDoTPhase() are complete
  • All 9 effect types from spec §6 are handled: burn, poison, bleed, freeze, slow, curse, armor_corrode, blind
  • bypassArmor and bypassBarrier flags work correctly
  • Wired into combat-actions.ts at line 169 (on-hit) and line 318 (DoT tick phase)
  • Effect duration decrement and expiry work correctly

Minor gap: The curse effect amplifies incoming damage but the actual multiplication of incoming damage by curse magnitude is not visible in combat-actions.ts or combat-tick.ts. It may need to be applied in applyEnemyDefenses or onDamageDealt.

Action needed: Update spire-combat-spec.md §11 "Known Gaps" table to reflect that DoT/debuff is implemented. Investigate curse amplification.

**Type:** Verification / Documentation update **Priority:** High **Investigation findings:** The DoT/debuff system is **fully implemented** and wired into the combat pipeline. This contradicts the spire-combat-spec.md §11 "Known Gaps" table which lists it as "No runtime". **What's implemented:** - `dot-runtime.ts` — `applyOnHitEffect()` and `processDoTPhase()` are complete - All 9 effect types from spec §6 are handled: burn, poison, bleed, freeze, slow, curse, armor_corrode, blind - `bypassArmor` and `bypassBarrier` flags work correctly - Wired into `combat-actions.ts` at line 169 (on-hit) and line 318 (DoT tick phase) - Effect duration decrement and expiry work correctly **Minor gap:** The `curse` effect amplifies incoming damage but the actual multiplication of incoming damage by curse magnitude is not visible in `combat-actions.ts` or `combat-tick.ts`. It may need to be applied in `applyEnemyDefenses` or `onDamageDealt`. **Action needed:** Update spire-combat-spec.md §11 "Known Gaps" table to reflect that DoT/debuff is implemented. Investigate curse amplification.
Anexim added the ai:todo label 2026-06-05 13:53:01 +02:00
n8n-gitea was assigned by Anexim 2026-06-05 13:53:01 +02:00
Anexim added ai:in-progress and removed ai:todo labels 2026-06-06 17:35:44 +02:00
Author
Owner

Starting investigation of the DoT/debuff system verification. The issue reports that the curse effect amplifies incoming damage but the actual multiplication may not be applied in combat-actions.ts or combat-tick.ts. Will investigate the code path.

Starting investigation of the DoT/debuff system verification. The issue reports that the curse effect amplifies incoming damage but the actual multiplication may not be applied in combat-actions.ts or combat-tick.ts. Will investigate the code path.
Anexim added ai:done and removed ai:in-progress labels 2026-06-06 17:48:32 +02:00
Author
Owner

DoT/Debuff System Verification Complete

Findings

The DoT/debuff system in dot-runtime.ts is fully implemented and wired into the combat pipeline. All 9 effect types from spec §6 are handled:

  • burn, poison, bleed (DoT)
  • freeze, slow, blind (soft CC)
  • curse (damage amplification)
  • armor_corrode (armor reduction)

Gap Found and Fixed: Curse Amplification

Issue: The curse effect was stored on enemies via applyOnHitEffect() but the amplification was never applied to incoming damage. The processDoTPhase() function had a comment // No immediate HP effect — curse multiplier is stored on the enemy but no code anywhere consumed the curse effect.

Fix: Added curse amplification check in applyEnemyDefenses() (combat-tick.ts):

  • Iterates enemy's activeEffects for curse effects
  • Multiplies incoming damage by (1 + magnitude) for each curse
  • Applied BEFORE dodge/barrier/armor defenses (per spec §6.3)
  • Multiple curses stack multiplicatively

Tests Added

  • curse-amplification.test.ts — 9 tests covering:
    • No amplification without curse
    • Single curse amplification
    • Multiplicative stacking
    • Curse before armor/barrier/dodge
    • Non-curse effects ignored
    • Null enemy handling
    • Zero-magnitude curse

Spec Updated

Updated spire-combat-spec.md §11 Known Gaps table to reflect:

  • Melee defense bypass fixed (issue #285)
  • Curse amplification now implemented (issue #286)

Verification

  • All 957 tests pass (50 test files)
  • All files under 400 lines
  • Pre-commit hooks pass
  • Committed and pushed (commits 325949c, bd15df8)
## DoT/Debuff System Verification Complete ### Findings The DoT/debuff system in `dot-runtime.ts` is **fully implemented** and wired into the combat pipeline. All 9 effect types from spec §6 are handled: - burn, poison, bleed (DoT) - freeze, slow, blind (soft CC) - curse (damage amplification) - armor_corrode (armor reduction) ### Gap Found and Fixed: Curse Amplification **Issue:** The curse effect was stored on enemies via `applyOnHitEffect()` but the amplification was never applied to incoming damage. The `processDoTPhase()` function had a comment `// No immediate HP effect — curse multiplier is stored on the enemy` but no code anywhere consumed the curse effect. **Fix:** Added curse amplification check in `applyEnemyDefenses()` (combat-tick.ts): - Iterates enemy's `activeEffects` for curse effects - Multiplies incoming damage by `(1 + magnitude)` for each curse - Applied BEFORE dodge/barrier/armor defenses (per spec §6.3) - Multiple curses stack multiplicatively ### Tests Added - `curse-amplification.test.ts` — 9 tests covering: - No amplification without curse - Single curse amplification - Multiplicative stacking - Curse before armor/barrier/dodge - Non-curse effects ignored - Null enemy handling - Zero-magnitude curse ### Spec Updated Updated `spire-combat-spec.md` §11 Known Gaps table to reflect: - Melee defense bypass fixed (issue #285) - Curse amplification now implemented (issue #286) ### Verification - ✅ All 957 tests pass (50 test files) - ✅ All files under 400 lines - ✅ Pre-commit hooks pass - ✅ Committed and pushed (commits 325949c, bd15df8)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#286