PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding
Incorrect Effective Hit Pool with Evasion and Spell Block
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 5.4k
- フォーク
- 2.4k
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 26
説明
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:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供されたカスタムモディファイアとPoBビルドを使ってPath of Buildingで問題を再現し、Enemy Damage Typeの設定からEffective Hit Poolの計算を追跡してください。列挙された各ダメージタイプについて平均値が想定されるダメージを使用していること、および結果が入力された値と、発生率25%とした記載の例に一致することを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- desktop, game-dev
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100