|
Bolty's Note: People had been noting that characters would, from time to time, receive double the healing (or mana) from a potion. Why? Nobody knew, until Trucidation got the ball rolling: The chance of potion double-healing effect depends only on vitality. Character level, other stats, character class and potion type seem to make no difference. Unfortunately, it is very difficult to get the exact formula the game uses without looking in the code. More than 500 potions were used for these tests. The data was then graphed to find the average slope. This formula should predict the chance of the double-healing effect fairly accurately: Chance of double healing = Vit/5 Again, the formula used by the game might be different from this. The actual formula might be something like Vit/5.5 or Vit/4.5, or there might even be a slight curve. However, Vit/5 should get you fairly close. There is a cap at around 90%, but it will probably never be reached by a normal player. Similar formula might apply to Mana potions with your energy used. This is just a speculation, I have not tested it. Mana regeneration makes it very difficult to test mana potions. Bolty's Note: Jarulf chimed in with a truer formula: The chance of double healing is based on Vitality in the following way (for mana, just exchange vitality with energy): if Rnd[100]<(Rnd[Vit]/2) then double Hope this helps. Just in case anyone is interested in more details here is exactly how it works. Assume we have found that the mana potion should give X mana. The game will then give X/128 mana per frame for 128 frames. That is, a potion always takes 5.12 seconds to fill up the amount. What happens if you are already under the influence of a mana potion when taking another one? Well the game will then first calculate the remaining amount of mana the previous potion still has to give, lets call it Y (it does this by taking the X/128 times the remaining numbers of frames for that potion, X here being the amount from the first potion of course). It then calculates X+Y+127/256 (the last probably being some rounding factor or something). It takes the time left on the previous potion (Ty) and add 128 frames (Tx) to that time. This is the new time during which to have the new potion work. Thus now the game will give: (X+Y+127/256) / (Tx+Ty) per frame for a duration of Tx+Ty frames. Let's do an example. You are a Barbarian and you drink a normal mana potion. It will give you 60 mana. It will do this by giving 60/128 mana per frame for 128 frames. You want to speed this up so after 2 seconds (50 frames) you drink a superior mana potion (is that the largest one? I will use the largest one as an example). It give back 100 mana over 128 frames but as we already have a potion working we need to do some work. First we have to find out how much mana the old potion has to give: 60/128 * (128-2*25)= 9360/256 (about 36.56 points). Now add the healing from the new potion plus that extra little bit: 9360/256 + 100 + 127/256 = 35087/256 (about 137.06 mana). It will add that mana over a time equal to 128-2*25+128 frames, or 206 frames. Per frame the game will thus now give: [35087/206]/256 = 170/256. It will do so for 206 frames. Was it clear? The same is of course true for life. Note that this mana increase is in ADDITION to the one you normally regain (through the base mana regeneration modified for warmth and item increasing the mana regeneration). Such items will not in any way speed up mana given back through potions. Bolty's Note: Got all that? Trucidation simplifies things in another response: Interesting... So the chance of critical heal is close to Vit/4 when Vit is 1 to 200. Assuming that Rnd[x] function gives integers between 0 and x-1 (inclusive) and if the Rnd[Vit]/2 part is not rounded in any way, then: Chance of critical heal = [Vit^2/4]/Vit That's for Vit of 1 to 200 to be exact. And for Vit of 201 and up: Chance of critical heal = [Vit^2/4]/Vit - [(Vit - 200)^2/4]/Vit I believe this one is correct. Someone double check? So anyway, after 200 Vit the chance of critical heal suffers diminishing returns. It slowly approaches 100% as Vit goes up to infinity... |