PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

Incorrect Leech calculations

オープン
#2,741 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
Lua
スター
5.4k
フォーク
2.4k
平均マージ
1日 12時間
マージ済み PR(30日)
26

説明

Hello. This is not really a "bug" but I couldn't find another place to properly submit this issue.

I have been messing around with the leech modifiers (life leech, but maybe the others are working the same way), and the values that PoB shows, I think they are incorrect.

I'll set up an example, if you don't mind:

Some facts:

  • Each instance of life leech is capped at 10% of maximum life.
  • Each instance of leech recovers life at a rate of 2% of maximum life.
  • The maximum recovery per second from all instances of life leech is capped at 20% of maximum life.
  • There is no limit to how many leech instances are active, but rather the limits are given by the 3 values above.

Deductions we can make:

  • Assuming we never reach full life, each instance of life leech that reached its cap of 10% of maximum life expires after 5 seconds, due to the fact that the recovery of this instance is at a rate of 2% of maximum life, and the total instance is 10% of maximum life, so after 5 seconds we have recovered the full 10%.
  • We would need 10 instances of life leech, recovering 2% of maximum life each, to reach the cap of 20% of maximum life recovered per second.

What I think is wrong:

Lets say I have 7,166 life. Therefore, each instance of life leech is capped at 716.6 life (10%). Each instance of life leech recovery rate is capped at 143.22 life per second (2%). After 5 seconds, the total amount recovered from this instance of life leech is 716.6, the whole instance of 10% of my maximum life.

The problem is the following: if I take a node like the one called "Two Handed Melee Damage and Life Leech Speed", which modifies the value "Increased Recovery per Second from Life Leech", the total amount of life recovered from an instance of life leech changes according to PoB shown in the "Life Leech/Gain per Hit" value, and it shouldn't change.

This node should just be modifying the rate at which I recover life (the 2%), and this node is really not modifying the total amount a life leech instance can recover (the 10%). So all this node should do is make it so that I am recovering life faster, but in the end, the total amount recovered should still be the same, which also means that the life leech instance does no longer last 5 seconds, but less, because since I recover life faster, I reach the total amount faster.

Putting in some numbers using this specific node that I mentioned: the node says "60% increased Recovery per Second from Life Leech". This means that instead of 2%, I am now recovering 3.2% maximum life per second. The instance is still a total of 10% of maximum life, so the duration of the instance is 3.125 seconds, and not 5 seconds as it was previously.

But according to PoB, I am now recovering more life per life leech instance, and that is incorrect. I think the reason why this value is incorrect is because the default duration value of 5s per life leech instance is still being 5s, and not being modified by the fact that the cap of the instance is still 10% of maximum life and I am reaching that cap faster now, so the instance in reality lasts less.

This is the build I was working on when figuring all this out:
https://pastebin.com/CTbn9C1A

I may be wrong, but I don't think I am. Let me know if there is any need for clarification.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ソースファイルもテストも指定されていません。まず、リンクされた Pastebin ビルドを使って issue の life-leech の例を再現し、次に「Life Leech/Gain per Hit」の値を生成する計算を追跡してください。完了の条件は、回復量の増加によって回復速度と持続時間が変化し、各 leech インスタンスで回復される合計量は増加しないことです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua
領域
backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。