Add expected burn damage to DPS#836
Conversation
|
I made another PR for this which doesn't account for the losses burns at max stacks, simply capping stacks at max 5 after averaging: #825. That may be too simplistic. This approach seems rather expensive. Could you compare your numbers for def erlang_b(E: float, m: int) -> float:
"""Calculate the probability of call losses."""
inv_b = 1.0
for j in range(1, m + 1):
inv_b = 1.0 + inv_b * j / E
return 1.0 / inv_b
def burn_loss_prob(burn_chance: float, speed: float):
return erlang_b(burn_chance * 40 / speed, 5) |
|
I have implemented the Erlang B loss formula in my PR: #825. |
|
This approach is indeed more expensive than the Erlang B formula, but it is very accurate. For example, in the case of an eclipse moon set with 100% accuracy, The performance seems fine for the most part, with the exception of generating a plot of monster magic level vs. DPS for a monster with a high magic level for the fire spell pact - there's a noticeable delay in that because it takes longer to converge for very high proc chances. But the eclipse moon set performs pretty well even when plotting, and both perform well when just calculating results in the table. Given that the fire spell pact is a temporary effect and that the majority of people just use the table values anyway, I think the performance issues for plotting fire spells are acceptable, but I will leave that up to Llemonduck to decide. |
This adds the expected burn damage from the eclipse moon set effect and the fire spell burn pact to the DPS calculation. The burn cap of 5 stacks is accounted for here by using a Markov chain model to determine the steady-state probability of being at 5 stacks on an attack tick, and then using that to reduce the burn proc chance by accounting for wasted procs. All of the cases I've tested line up well with simulation results.
Note that this does not add burn to either of the TTK calculations, as that is significantly more challenging. I changed the warning on the eclipse moon set to specify that the set effect is included in DPS but not TTK. I didn't add a similar message for the fire spell pact, but I can add that if desired.