Skip to content

Fix Exposure not working on many skills#1899

Merged
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/exposure-source-damage-type
May 24, 2026
Merged

Fix Exposure not working on many skills#1899
LocalIdentity merged 3 commits 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
LocalIdentity added 2 commits May 23, 2026 17:28
Adds the exposure stat maps for many skills and changes exposure to use a positive value so that we can use limit stats on it
Moves many stats from skills into the global stat map
Moves the defence calcs before exposure so that Refraction III works
Add logic to calculate the exposure effect per skill
@LocalIdentity LocalIdentity changed the title Detect exposure sources across active skills Fix Exposure not working on many skills May 24, 2026
@LocalIdentity LocalIdentity added the bug: behaviour Behavioral differences label May 24, 2026
@LocalIdentity LocalIdentity merged commit 1bb6144 into PathOfBuildingCommunity:dev May 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: behaviour Behavioral differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exposure has too strict source conditional

2 participants