Skip to content

Conversation

@bobtista
Copy link

The original code used DAMAGE_UNRESISTABLE to prevent an infinite loop where the DoT damage would retrigger onDamage(), which would restart the poison effect. The bug was that chem suits didn't work.

  • Changed DoT damage type from DAMAGE_UNRESISTABLE to DAMAGE_POISON so resistance is properly applied
  • Set m_sourceID to INVALID_ID for DoT damage
  • Updated onDamage() to ignore damage with INVALID_ID source, preventing the infinite loop

Testing

  • Units with POISON resistance (Chemical Suits) now properly resist poison DoT damage
  • Poison DoT no longer causes infinite loops
  • External poison attacks still trigger poison effects correctly

Note - I don't think the DoT damage gives XP with this fix.

@bobtista bobtista self-assigned this Nov 17, 2025
@bobtista bobtista added Bug Something is not working right, typically is user facing NoRetail This fix or change is not applicable with Retail game compatibility labels Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing NoRetail This fix or change is not applicable with Retail game compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GEN][ZH] PoisonedBehavior damage over time ignores POISON resistance

1 participant