PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

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

Ouverte
#9,009 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

enhancement
Langage dominant
Lua
Étoiles
5.4k
Forks
2.4k
Merge moyen
1 j 12 h
PR mergées (30 j)
26

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

L’issue ne mentionne aucun fichier, test ou point d’entrée. Commencez par examiner la formule proposée pour la durée attendue et sa limitation lorsque p→1, puis déterminez comment la probabilité de refresh et les cumuls d’ailment devraient affecter les autres calculs. Le travail est considéré comme terminé lorsque les effets de durée du refresh sont pris en charge et que le cas de refresh garanti possède un comportement défini.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
lua
Domaine
backend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.