Skip to content

Detect exposure sources across active skills#1899

Open
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/exposure-source-damage-type
Open

Detect exposure sources across active skills#1899
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/exposure-source-damage-type

Conversation

@unrealdreamz
Copy link
Copy Markdown
Contributor

@unrealdreamz unrealdreamz commented May 18, 2026

Fixes #996
Refs #561

Summary

  • Detect exposure sources from any active player skill, not only the currently selected main skill.
  • Keep the existing global exposure-source path intact.
  • Add regressions for conditional exposure supports and for a secondary active skill enabling exposure while Spark remains selected.

Root Cause

Exposure configuration eligibility only inspected env.player.mainSkill.skillModList. That made two valid exposure-source cases fail:

  1. Conditional support sources such as Lightning Exposure could be hidden because their runtime condition was not already true.
  2. Exposure caused by another active skill did not make the exposure configuration valid for the selected damage skill, even though exposure is an enemy state once applied.

Fix

The exposure-source check now scans env.player.activeSkillList for FireExposureChance, ColdExposureChance, or LightningExposureChance mods using HasMod(...), so it detects real support/source mods without requiring their runtime condition to already evaluate true. Global/non-skill exposure chance still uses the existing evaluated modDB:Sum(...) > 0 path.

Validation

  • git diff --check - pass.
  • git diff --cached --check - pass before amended commit.
  • git show --check --stat --oneline --no-renames HEAD - pass.
  • python/lupa syntax smoke for spec/System/TestSkills_spec.lua - pass.
  • Added targeted regressions in spec/System/TestSkills_spec.lua.
  • Full Busted/Docker suite not run locally: docker, docker-compose, lua, luajit, and busted are not installed on PATH on this machine.

Risk / Rollback

Risk is low and contained to exposure config/source eligibility. The change does not force exposure to apply; users still need to enable the exposure configuration, and exposure magnitude still flows through the existing enemy modifier path. Rollback is the single commit if maintainers prefer exposure eligibility to remain main-skill-only.

@unrealdreamz unrealdreamz force-pushed the fix/exposure-source-damage-type branch from 1cd5474 to 3435e3b Compare May 19, 2026 00:28
@unrealdreamz unrealdreamz changed the title Allow conditional exposure sources in config Detect exposure sources across active skills May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exposure has too strict source conditional

1 participant