PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding
Incorrect Leech calculations
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Lua
- Estrellas
- 5.4k
- Forks
- 2.4k
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 26
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se especifica ningún archivo fuente ni ninguna prueba. Empieza reproduciendo el ejemplo de life-leech del issue usando la build de Pastebin enlazada y, después, sigue el cálculo que produce el valor “Life Leech/Gain per Hit”. Se considera terminado cuando una recuperación aumentada cambia la tasa y la duración de la recuperación sin aumentar el total recuperado por instancia de leech.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- lua
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100