Skip to content

Conversation

@wh98yap-hub
Copy link

@wh98yap-hub wh98yap-hub commented Sep 25, 2025

Fixes #8990.

Description of the problem being solved:

Fixed poison stacks showing 0 despite 100% poison chance when using multi-step damage conversion chains (e.g., Cold→Fire→Chaos→Poison). The issue occurred because Path of Building's ailment calculations only considered unconverted damage portions and didn't account for damage that becomes eligible for ailments through conversion chains.

Root causes addressed:

  • calcAilmentSourceDamage() only used unconverted damage, ignoring conversion contributions
  • Poison chance calculation didn't include ChaosPoisonChance for both hit and crit scenarios
  • No automatic enabling of CanPoison flags for damage types that convert to Chaos
  • Same issues affected ignite calculations with fire conversions

Steps taken to verify a working solution:

  • Test Setup: 2x The Consuming Dark daggers + 2x The Pyre rings + Cold Snap of Power skill
  • Conversion Chain: Cold (100%) → Fire (40% via Pyre) → Chaos (12% via Consuming Dark) → Poison (60% chance per dagger)
  • Before Fix: Poison DPS = 0, Poison Stacks = 0 (capped to 1)
  • After Fix: Poison DPS = 1,178.9, Poison Stacks = 0.67, Poison Chance = 100%
  • Regression Testing: Verified pure chaos poison builds still work correctly
  • Edge Case Testing: Tested partial conversions and multiple ailment scenarios

Link to a build that showcases this PR:

Path of Building test build:

  • Skill: Cold Snap of Power
  • Weapons: 2x The Consuming Dark (Fiend Dagger)
  • Rings: 2x The Pyre (Sapphire Ring)
  • Expected: Poison calculations now work with conversion chains

Before fix:

Poison DPS: 0, Poison Stacks: 0, despite showing 100% poison chance
image

After fix:

Poison DPS: 1,178.9, Poison Stacks: 0.67, Poison Chance: 100% (working correctly)
image

Technical Changes:

  • Added calcAilmentConversionMultiplier() function for multi-step conversion tracking
  • Enhanced calcAilmentSourceDamage() to use conversion chains instead of just unconverted portions
  • Added automatic CanPoison/CanIgnite flag enabling for converted damage types
  • Fixed poison chance calculations to include ChaosPoisonChance for both hits and crits
  • Applied same fixes to ignite calculations for fire conversions
  • Added comprehensive safety checks to prevent nil reference errors

@Wires77 Wires77 changed the title Update CalcOffence.lua Fix issue with converted damage showing no poison stacks Oct 30, 2025
@Wires77 Wires77 added the bug: calculation Numerical differences label Oct 30, 2025
@RunawayHyena
Copy link

While to poison chance is now calculated correctly, I don't think it's working for Full DPS yet? Poison DPS doesn't appear when a skill is toggled for Full DPS, forcing 100% Chance to Poison in Custom Modifiers makes the calculation correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: calculation Numerical differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Consuming Dark

3 participants