Skip to content

Count exposure granted to the enemy as an exposure source - #2419

Open
lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/exposure-from-items
Open

Count exposure granted to the enemy as an exposure source#2419
lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/exposure-from-items

Conversation

@lucaskarsten

Copy link
Copy Markdown

Fixes #2379.

Description of the problem being solved:

The reported symptom is that The Whispering Ice's exposure does not show up in the Calcs tab. The exposure is in fact applied — with only a Permafrost Staff carrying the line equipped, the enemy ends at Fire Resistance 20 on the default Pinnacle Boss config: 50 from the enemy config plus -30 sourced to the item, the 60% halved against a unique enemy, which matches the game.

What is wrong is the state PoB is left in. Measured on dev with that item alone:

enemy Condition:HasFireExposure   true
player Condition:CanApplyFireExposure   nil

hasExposureSource (Modules/CalcPerform.lua:429) only looks at the player side: an <Element>ExposureChance modifier or the InflictExposure flag. The Whispering Ice grants exposure straight to the enemy through EnemyModifier, and so does Enemies in your Presence have Exposure; neither carries a chance modifier or the flag, so no source is found.

Condition:CanApply<Element>Exposure is what gates the Is the enemy Exposed to Fire/Cold/Lightning? config options (Modules/ConfigOptions.lua:1866-1872), so with those items the options are never drawn and there is nowhere in the Calcs tab to see the exposure, even though the resistances already reflect it.

The enemy's own exposure modifiers now count as a source.

Steps taken to verify a working solution:

  • Added spec/System/TestExposureSource_spec.lua: the item grants a source for all three elements, a build with no exposure still reports none, and enabling the config on top of the item does not change the enemy's resistance. Against dev it reports 2 successes / 1 failure; with the fix, 3 successes / 0 failures.
  • Exposure resolves to the largest single source (CalcPerform.lua:3406), so the config's -20% cannot stack onto the item's -60%; the third test covers that directly.
  • Full busted suite: 569 successes / 0 failures / 0 errors.

The Whispering Ice lowers the enemy's elemental resistances through an
EnemyModifier, and so does "Enemies in your Presence have Exposure".
Neither grants an ExposureChance modifier or the InflictExposure flag,
which are the only things hasExposureSource looks for, so the build ends
up in a state where the enemy has Fire Exposure while the player is said
to be unable to apply it.

Condition:CanApply<Element>Exposure gates the "Is the enemy Exposed"
config options, so with those items the options are never drawn and the
exposure cannot be inspected in the Calcs tab, even though the
resistances already reflect it.

The enemy's own exposure modifiers are now treated as a source. Exposure
still resolves to the largest single source, so enabling the config on
top of an item that already grants more does not change the result.
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.

Elemental Exposure on Hit mod from The Whispering Ice is not applied

1 participant