Blue Post: Titanium Nova Ice Lance Calculation - Warcraft Tavern

Titanium Nova Ice Lance Calculation


Kaivax
May 18, 2021
Source
Kaivax

We’ve gotten a lot of feedback about how much damage is necessary to break an enemy trapped in a root-effect, such as Frost Nova. Beta testers reported that it took too much damage to break root effects, and it turns out, they were correct. It took quite a bit of sleuthing to find the issue, but we ultimately found a bug that explains the odd behavior we saw in the Beta, and we should be able to fix it well before the first Arena season.

The Story

To start, one of the reasons this was such a challenge to find is that the behavior is intentionally random. There’s no fixed amount of damage that’s necessary to break roots; there’s a range of damage that might be necessary, which makes it a risk/reward calculation for the players. Reproducing the issue isn’t guaranteed, and testing it can look like normal luck streaks.

When this was first reported, we looked at the scripts on the spell, and verified that they matched the original data, which led us to initially conclude that this was just random luck streaks. However, we’ve seen previous examples of there being a deeper layer to issues like this one, so when the bug reports continued to come in, we knew it warranted further investigation.

What we’re looking at are scripts that are in data, so we can be confident that those match 100%. At the same time, we’re not using the exact same code as was used in 2007, so sometimes we see issues caused by steps we’ve taken to make the original data and the current code compatible with one another. Our next step was to examine the inputs to the spell script and verify that we really were sending all the same information for the script to evaluate. After completing an audit of that data, we once again concluded that this appeared to be just random chance. The data values that our code was sending the script matched, the things it did with the results from the script matched, and the script itself matched.

Everything we looked at appeared to be correct on all fronts, so after a second investigation we once again concluded that the random calculation was correctly matching our intent.

But it still felt wrong.

This is the point where uncovering a bug gets really challenging, and where sometimes we hope to get lucky. It turns out that after continuing to look at the bug and test it in the debugger, we saw an odd behavior: when the Waterbolt landed on a target that was in a Frost Nova, it was evaluated as though it was a melee attack, which is not correct. That turned out to be the clue that led us to the truth. There was no bug in the root-break calculation, the bug itself was a random.

The bug that would sometimes send the incorrect damage source to the formula. And since it wasn’t incorrect every time, we missed it on our code evaluation. It turns out that melee attacks are significantly less likely to break roots than ranged attacks are, and the bug was that ranged attacks could randomly be treated as melee attacks under certain hard-to-reproduce conditions.

The Conclusion

What made this such a challenge to find was that it was a randomly occurring bug in a system that behaves randomly when it’s working correctly, and two sources of randomness combined to confound us.

Thank you to everyone out there who helped us find this one!

A Hotfix is on the Way

One interesting aspect of this is: with this fix, the chance to break roots with damage will actually be slightly higher than it was in the first season of original Burning Crusade in 2007. This is because we’re using the 2.4.3 data, which raised the chances for damage to break roots slightly on targets above level 60.

Scroll to Top