Life and Mana Steal Overflow

This page underwent a massive overhaul after being made aware of some inaccuracies.

% Life Stolen per Hit and % Mana Stolen per Hit (leech) can overflow depending on specific situations.

Bitlife and bitmana (for lack of previously defined terms) are what life and mana are measured in under the hood. All life, mana, damage, and stamina values are represented in 1/256ths. When an item gives you 2 life, it’s more literally giving you 512 bitlife. When something does 10 damage, it’s applying 2560 damage to bitlife. Additionally, leech has extra precision as well (represented by 1/64).

However, under the condition that damage (in bit) multiplied by % leech (in a different bit) goes over 2^31-1 (2147483647), the life stolen overflows. However, there are two different ways Blizzard handles this. If damage (in bit) is <= 2^20 (1048576), then the multiplication will happen without change. If the damage (in bit) is > 2^20, then damage (in bit) is converted to a 64 bit signed integer before multiplication. A division occurs after the multiplication step, which casts the result back to a 32 bit signed integer, which still causes overflows.

It’s important to note that difficulty penalty applies directly to leech after it receives its extra precision and before everything else. The penalty is 1/2 in Nightmare and 1/3 in Hell.

If the final life stolen (in bits) is less than 0, it is set to 0, so you will never lose life or mana due to leech.

Other steps occur within the formula, but irrelevant information has been left out (ie mercenaries and unit modifiers, skill damage modifiers (ie Multiple Shot’s 3/4th damage), and monster leech effectiveness).

The example given below is for an Assassin, but this issue applies to every character. She just hits it very easily. The only other build that I know can reach this in “normal gameplay” is a Werewolf.

Maybe another character or some other configuration can be impacted by this issue, but it’s fairly difficult.

Here’s a video demonstrating it:

666-667 Normal Attack damage and 2315-2316 Dragon Flight damage. I modified Suwayyah to do 40-40 damage and Boots to do 100-100 damage. I set Strength and Dexterity each to 10 so that my base kick damage was 0 (to avoid large damage range) so that only my boots contributed to my damage. I set the Strength Bonus to 100% (normally 120%) for easier calculations and rounding. All of my skills are level 20. Claw Mastery (for the Normal Attack) gives 144% Enhanced Damage. Tiger Strike 3 gives 1440% Enhanced Damage. Dragon Flight gives 765% Enhanced Damage. Cobra Strike 3 gives 270% Life and Mana Stolen per Hit. The Brute has 0% Physical Resistance and a life pool comparable to a Uber boss.

When I use the Suwayyah, I steal life and mana exactly as expected (due note that the amounts are relatively low because Hell difficulty reduces the amount of life and mana received from steals by 1/3rd. The Brute has 100% drain effectiveness). When I swap to Dragon Flight, I no longer steal any life, despite the monster visibly taking damage.

Here is a calculator that is accurate for every scenario I tested:

https://warren1001.github.io/Leech_Overflow/

Please do not turn this thread into a debate on whether or not the Assassin should be able to steal that much life or mana. General Discussion is better suited for that discussion.

11 Likes

This is what happens when instead of actualy making assassin skills viable and fixing skills, you introduce runeword breaking the skills even more…

please keep random garbage posts out of the bug report. they didn’t change the skills, this was possible in LOD. your post makes 0 sense.

Thats my point, they should fix the skills of assassin before introducing anything like Mosaic runeword.

And chill lol :slight_smile:

how are they going to fix a skill that nobody knew was bugged because nobody used it? this bug existed for 22 years and was only now discovered due to making the skills worth using

you chill, you’re derailing the post with garbage “AHH MOSAIC/MECHANIC BAD” sentiment. this bug has absolutely no relevance to mosaic or its mechanic. i can tell you didn’t even read the post because this bug affects werewolf too, but u wanna make it the 427th thread about mosaic complaints lol

2 Likes

Thanks for your detailed analysis.

turns out i was missing some important info. i rewrote the bug report to more accurately reflect the issue.

1 Like

I suppose the reason why this was never an issue with smiters using life tap is because life tap uses a completely different formula for determining healing which probably doesn’t have so much extra precision going on?

thats possible. 50% leech also isnt enough to hit the overflow either. even with grief, smite doesnt do that much single target damage.

You only need about 1311 healing to hit the overflow, which you easily get with grief + life tap since it doesn’t seem to be reduced by difficulty modifiers.

so you would need to do 2622 damage per smite to overflow, since life tap is 50%. achievable with a full damage build.

but its entirely probable that life tap doesnt have the same overflow, its not part of the formula that i got the numbers from.