Skip to content

Show enemy crit chance in Other Avoidance and rename Crit Reduction - #10552

Open
lucaskarsten wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/5417-crit-reduction-label
Open

lucaskarsten wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/5417-crit-reduction-label

Conversation

@lucaskarsten

Copy link
Copy Markdown
Contributor

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:

  • The row is renamed to "Crit Extra Dmg Red." (same length as "Interrupt Avoid Ch.").
  • New "Enemy Crit Ch." row with a breakdown that follows the formula in 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's EnemyCritChance INC mods and the enemy's CritChance / NeverCrit / AlwaysCrit mods (e.g. Enfeeble).
  • ModParser: "Hits have X% reduced Critical Strike Chance against you" is now parsed (stat base_enemy_critical_strike_chance_+%_against_self with negate in the stat descriptions). Only the "increased" form was handled, so the Crucible shield mods (50% / 70% reduced) were ignored. These mods are not in ModCache.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:

  • New 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 on dev and pass with this PR.
  • Full 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.".

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.
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.

Other avoidance/crit reduction suggests crit chance reduction when it's extra damage reduction

1 participant