Friday, September 7, 2012

Mechanics: Mana and Mana Regen

Mana and Mana Regen are not particularly mystifying mechanics, but they interact in ways that spawn some interesting math.

An important concept, one that started in MMOs such as Everquest or World of Warcraft, is "Time to OOM". It's a measure, given a Rate of Mana Expenditure, of how long it will take to run out of Mana. The equation is fairly simple:

Time to OOM = Mana / (Rate of Mana Expenditure - Mana Regen)

From this equation we can tell that there are three ways to increase the Time to OOM. We can increase our Mana, increase our Mana Regen, or decrease our Rate of Mana Expenditure. We can also tell that Time to OOM is directly proportional to Mana; any increase in Mana linearly increases Time to OOM. If we graph Time to OOM in relation to changes in Mana, it looks like this:



So long as Mana Regen and Rate of Mana Expenditure are constant and their difference is positive this is how the graph will look. The picture looks very different, however, if Mana is kept constant and Mana Regen varies:



Mana Regen becomes increasingly effective the more of it you have. This is because Mana Regen has a recursive influence on Time to OOM. As Mana Regen increases so does Time to OOM, which means there's now more time spent regenerating Mana, which increases Time to OOM, which means there's more time to regenerate Mana etc. When there's a large difference between Mana Regen and Rate of Mana Expenditure this effect isn't all that noticeable, but as they converge it explodes.

These nice, crisp mathematical equations become grossly complicated once you attempt to factor in Blue buff or Chalice.

Blue buff mixes things up by tying Mana to Mana Regen. If we try graph Time to OOM versus Mana for a player with Blue, it's no longer linear.



Because increasing Mana also increases Mana Regen the graph curves gently upward. Extended far enough, or with a sufficiently low Rate of Mana Expenditure, we'd see a familiar asymptotic pattern emerge.

Chalice is even more complicated. It directly scales Mana Regen based on how little mana is remaining. To properly calculate this we have to derive a new equation for Time to OOM which accounts for the rate at which Mana Regen changes. Unfortunately this involves differential calculus, so if the following equation is utterly baffling you're probably in good company.
 
Time to OOM = -(Maximum Mana/Mana Regen) * (ln|Mana Regen - Rate of Mana Expenditure| - ln|2*Mana Regen - Rate of Mana Expenditure|)


I won't assail you with the intricacies of the math involved or how this equation was derived. Instead you can enjoy the wonderful graph this generates:



As before we can see that Time to OOM swings upward, but there are a couple of key differences between this graph and the previous comparison with Mana Regen. Both have identical Rates of Mana Expenditure (40 Mana per second), but this one begins its asymptotic swing much sooner. Chalice essentially halved the distance to the point of infinite Mana, making it the single most potent Mana Regen item in the game.

In practice it isn't necessary to reach the point of infinite Mana, and can even be counter-productive. Even the most indomitable of laners need to go back periodically to heal and buy items, and past the early-game returning to base frequently is a matter of course. As fun as being completely independent of Mana is, it's a better idea to obtain just enough Mana Regen to sustain you between recalls and invest the rest of your gold elsewhere.

At the end of the day managing a mana pool is going to be different for every champion. Many AP champions skirt a fine line where it isn't clear if items like Chalice are worthwhile or not. Applying the math above in practical situations is difficult due to the many extenuating circumstances in play, but if you can the difference in effectiveness, especially for AP champions, can be huge.

No comments:

Post a Comment