PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

Calculations for refresh duration chance (e.g. Refresh Ignite)

Abierto
#9,009 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

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

Descripción

Check for duplicates
  • I've checked for duplicate open and closed issues by using the search function of the issue tracker
What platform are you running Path of Building on?

Linux - PoB Frontend

Is your feature request related to a problem?

Currently the chance to refresh ignite duration mods are not supported by PoB.

Describe the solution you'd like

Ailment duration refresh, such as the Mastery "50% chance to refresh ignite duration on critical strike" will on average result in an extended duration of the ailment, based on the chance to proc. From my testing, it can be calculated as follows:

Given:
D = base duration of the ailment (including all increases/decreases, faster/slower mods, etc.)
t = attack/cast time of the critting hit
p = probability that a refresh will occur (e.g. 50% refresh chance * crit chance * hit chance)
q = 1 - p
n = the number of hits during the ailment's base lifetime

n = \lfloor D / t \rfloor

Then the expected total duration is:

t \cdot \frac{1 - q^{n}}{p \, q^{n}} + (D - n \,  t)

This looks at the number of hits it would take for n attempts to refresh to fail in a row, and then basing the average on how long it will take for that to happen.

Describe alternatives you've considered

No response

Additional context

As an example of the impact of this, suppose you have:
D = 4 seconds (ignite duration)
t = 0.45 seconds (cast time)
p = 0.1 (50% of a 0.2 crit chance)

With this function it would mean that, on average, the time an individual instance of ignite would last is ~6.35s. This final value would then be used to impact certain other calculations, such as the number of ailment stacks.

Note that this does not handle the special case where p -> 1. If it's guaranteed to refresh the duration (or close to it), the duration is in essence infinite. I don't know what impact that would have on other calculations. There may be the need for an alternative metric to be used, such as the expected lifespan of the entity that is ignited.

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

El issue no menciona archivos, pruebas ni puntos de entrada. Empieza revisando la fórmula propuesta para la duración esperada y su limitación cuando p→1; después, determina cómo deberían afectar la probabilidad de refresco y las acumulaciones de ailment a los demás cálculos. Se considera terminado cuando se admiten los efectos de duración del refresco y el caso de refresco garantizado tiene un comportamiento definido.

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

Evaluación

Stack tecnológico
lua
Área
backend
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.