Repository navigation
Show enemy crit chance in Other Avoidance and rename Crit Reduction - #10552
Open
lucaskarsten wants to merge 2 commits into
Open
lucaskarsten wants to merge 2 commits into
lucaskarsten wants to merge 2 commits into
Conversation
The "Crit Reduction" row only showed reduced extra damage from critical strikes, which reads like a crit chance reduction. It is now labelled "Crit Extra Dmg Red.", and a new "Enemy Crit Ch." row shows the enemy critical strike chance used for eHP with a breakdown (base, increased/ reduced, evade, never/always crit) and its player and enemy sources. Also parse "Hits have X% reduced Critical Strike Chance against you" (Crucible shield mods), which was ignored.
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 #5417 .
Description of the problem being solved:
The "Crit Reduction" row in Other Avoidance only shows
ReduceCritExtraDamage(e.g. Watcher's Eye "You take X% reduced Extra Damage from Critical Strikes"), which reads like a reduction of the enemy's crit chance. The enemy crit chance itself, used in the eHP "enemy crit effect", was not shown anywhere, and nothing explained how it is calculated.Changes:
CalcDefence: base chance from the Configuration tab, x increased/reduced, x (1 - chance to evade), or "never/always Critically Strikes" when those flags apply. Its sources list the player'sEnemyCritChanceINC mods and the enemy'sCritChance/NeverCrit/AlwaysCritmods (e.g. Enfeeble).ModParser: "Hits have X% reduced Critical Strike Chance against you" is now parsed (statbase_enemy_critical_strike_chance_+%_against_selfwithnegatein the stat descriptions). Only the "increased" form was handled, so the Crucible shield mods (50% / 70% reduced) were ignored. These mods are not inModCache.lua, so it does not change.Note: in current data Defiance Banner no longer has a crit chance stat, so the "Defiance Banner" part of the issue no longer applies; Enfeeble and the Crucible mods are the current sources.
Not changed: "Hits have +X% additional Critical Strike Chance against you" (Scourge) is still unparsed.
Steps taken to verify a working solution:
TestEnemyCritRows_spec.lua: the row labels, the reduced crit chance parse (5% -> 2.5%) with 30% reduced extra crit damage, and the breakdown lines for the normal and the "always crit" cases. All 3 fail ondevand pass with this PR.busted --lua=luajit: 929 / 929 passing.Link to a build that showcases this PR:
Any build: open Calcs > Other Avoidance.
Before screenshot:
"Crit Reduction" row only; no enemy crit chance row.
After screenshot:
"Enemy Crit Ch." 5.0% with breakdown "5.00% (base, from Configuration) / x 1.00 / = 5.00%", and "Crit Extra Dmg Red.".