# Mana regeneration formula

Suppose my mana regeneration rate was calculated in this way:

ManaRegenRate = 0.01 × (BaseManaRegen + ManaRegenMultiplier × Willpower) × TotalMana

Where willpower is my attribute ranging from 0 to 100 and BaseManaRegen and ManaRegenMultiplier are some constants.

With this formula I would get mana regenerated per second.

How could I rearrange this formula to get the total amount of seconds to regenerate mana from 0 to full?

• Can't you just do something like timeToFullMana = FullMana / ManaRegenRate ? – TomTsagk Oct 25 '19 at 15:15

## 1 Answer

Assuming your "ManaRegenRate" is the mana regenerated per second, you just have to divide the TotalMana through the mana regen rate.

$$TotalMana \over 0.01 × (BaseManaRegen + ManaRegenMultiplier × Willpower) × TotalMana$$

But because TotalMana appears on both sides of the fraction, you can simplify the fraction by removing it and arrive at:

$$1 \over 0.01 × (BaseManaRegen + ManaRegenMultiplier × Willpower)$$

You might notice that the time it takes to fully regenerate mana in your game is completely independent from how much mana the character can actually have.