Skip to content

Fix exposure from config and items not listed in Curses and Debuffs - #10512

Open
lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/3232-exposure-in-debuff-list
Open

lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/3232-exposure-in-debuff-list

Conversation

@lucaskarsten

Copy link
Copy Markdown
Contributor

Fixes #3232

Description of the problem being solved:

The damage part of the issue was fixed by #3148; what remained (see the last comment) is that exposure applied through the config, "Is the enemy Exposed to Lightning?" (Corrosive Elements, Mastermind of Discord), lowered the enemy resistance but was never shown in the Calcs tab "Curses and Debuffs" box, unlike Wave of Conviction. The same happened to any exposure not inflicted by a debuff skill (item or passive EnemyModifier sources).

Curses and Debuffs is built in Calcs.lua only from env.debuffs and the curse slots, while exposure is resolved separately in calcs.perform (strongest exposure per element, plus extra exposure and exposure effect, capped by ExposureMin).

The fix records the exposure that is actually applied per element in calcs.perform (env.appliedExposure, reset each pass) and, in Calcs.lua, lists it as "X Exposure" with its final resistance mod in the SkillDebuffs breakdown, unless it comes from a debuff skill that is already listed (matched by source, or by a debuff of the same name, so Wave of Conviction's "Lightning Exposure" is not repeated).

Steps taken to verify a working solution:

  • Added spec/System/TestExposure_spec.lua: config exposure is listed with -10 Lightning Resistance; with "an extra -5%" it lists -15; nothing is listed when the checkbox is off; with Wave of Conviction set to Lightning plus the config exposure, "Lightning Exposure" appears once. On dev the listing test fails; all pass on this branch.
  • Full busted suite: 749 successes, 0 failures.
  • --tags=builds (the saved 3.13 builds): the same 900 failures, with identical messages, on dev and on this branch, so no saved-build output changed.

Link to a build that showcases this PR:

Any build with a lightning skill and "inflict Lightning Exposure on Hit" (e.g. Corrosive Elements), with "Is the enemy Exposed to Lightning?" checked in the config.

Before screenshot:

Curses and Debuffs: empty; the -10% Lightning Resistance only shows inside Effective DPS Mod.

After screenshot:

Curses and Debuffs: Lightning Exposure, hovering shows -10 LightningResist from Config.

Exposure that is not inflicted by a debuff skill (the "Is the enemy
Exposed to X?" config used by Corrosive Elements, Mastermind of Discord
and item "inflict Exposure on Hit" mods) lowered the enemy resistance
but never showed in the Calcs tab Curses and Debuffs list, unlike Wave
of Conviction.

Record the exposure that is applied in calcs.perform and list it, with
its resistance mod, when it does not come from a debuff skill that is
already listed under the same name.
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 from Corrosive Elements not listed in Curses and Debuffs

1 participant