Count exposure granted to the enemy as an exposure source - #2419
Open
lucaskarsten wants to merge 1 commit into
Open
Count exposure granted to the enemy as an exposure source#2419lucaskarsten wants to merge 1 commit into
lucaskarsten wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 Staffcarrying the line equipped, the enemy ends at Fire Resistance 20 on the default Pinnacle Boss config: 50 from the enemy config plus-30sourced 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
devwith that item alone:hasExposureSource(Modules/CalcPerform.lua:429) only looks at the player side: an<Element>ExposureChancemodifier or theInflictExposureflag. The Whispering Ice grants exposure straight to the enemy throughEnemyModifier, and so doesEnemies in your Presence have Exposure; neither carries a chance modifier or the flag, so no source is found.Condition:CanApply<Element>Exposureis what gates theIs 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:
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. Againstdevit reports 2 successes / 1 failure; with the fix, 3 successes / 0 failures.CalcPerform.lua:3406), so the config's -20% cannot stack onto the item's -60%; the third test covers that directly.