PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

Incorrect Effective Hit Pool with Evasion and Spell Block

Abierto
#8,983 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug: calculation
Lenguaje dominante
Lua
Estrellas
5.4k
Forks
2.4k
Merge medio
1 d 12 h
PR fusionados (30 d)
26

Descripción

Check version
  • I'm running the latest version of Path of Building and I've verified this by checking the changelog
Check for duplicates
  • I've checked for duplicate open and closed issues by using the search function of the issue tracker
Check for support
  • I've checked that the calculation is supposed to be supported. If it isn't please open a feature request instead (Red text is a feature request).
What platform are you running Path of Building on?

Windows

What is the value from the calculation in-game?
What is the value from the calculation in Path of Building?

The Effective Hit Pool stat is wrong when using the default configuration with Average as Enemy Damage Type in situations where the character has a combination of Evasion and Spell Block Chance.

The current calculation first calculates Mitigated hits using the average block chance, assuming 50% enemy attacks and 50% enemy spells. The enemy miss chance is then applied, again assuming 50-50 attacks and spells, to get the total number of Hits before death. The Hits before death is then multiplied by the total incoming damage to get the Effective Hit Pool.

Given a character with a 75% chance to block spell damage and a 75% chance to evade attacks, the current calculation shows: 62.5% chance for block to fail (75% / 2), so Mitigated hits = Hits before death / 0.625, and 37.5% Enemy miss chance (again 75% / 2), resulting in Hits before death = Mitigated hits / Chance to be hit = (Hits / 0.625) / (1 - 0.375) = Hits / (0.625 * 0.625). However, this is clearly incorrect: 62.5% being 5/8, the current calculation results in 25 out of 64 (0.625 * 0.625 = 39%) hits being unblocked or unevaded, while in reality this should be 16 out of 64 or 25%, as all hits are either attacks or spells.

This incorrect number for Effective Hit Pool is also easily seen by setting the custom modifiers listed below and then changing the Enemy Damage Type in the configuration from Average to any of the typed damage types that it claims to be the average of (Melee, Projectile, Spell, Projectile Spell). The resulting Effective Hit Pool for Average is much lower than any of the specific parts (which are equal except for the effect of Evasion on critical damage).

The correct calculation for Effective Hit Pool should use the expected damage per hit (including block, evasion, projectile avoidance and spell suppression) for each enemy damage type and the expected 25% occurrence of each type: e.g. given 75% spell block, 75% evasion, 1000 life and 100 enemy damage, you expect to live for 40 attempts at damage (20 attacks of which 5 hit and 5 out of 20 spells that are unblocked for a total of 1000 damage), which can be calculated as 1000 / (25% * 25 + 25% * 25 + 25% * 25 + 25% * 25) = 40, as each damage instance has an expected damage taken of 25 after mitigation and evasion.

How to reproduce the issue

Create a new character, paste the following Custom Modifiers in the Configuration:

10000 life
+135 to all resistances
75% chance to block spell damage
75% chance to evade attacks

Change the Enemy Damage Type from Average to each of its parts and observe the Effective Hit Pool number.

PoB for PoE1 build code
https://pobb.in/psSfMgg885HN
Screenshots

The Hits before death of 5.87 should be 2.29 / 0.25 = 9.16 with 75% chance to evade attacks and block spells:

Image

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduce el problema en Path of Building con los modificadores personalizados y la build de PoB proporcionados, y luego sigue el cálculo de Effective Hit Pool a partir de la configuración de Enemy Damage Type. Verifica que el promedio use el daño esperado para cada tipo de daño enumerado y que el resultado coincida con los valores introducidos y con el ejemplo indicado de una ocurrencia del 25 %.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
lua
Área
desktop, game-dev
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.