I need to find a formula to implement the life and mana regeneration process. Life regeneration depends on a primary statistic (constitution) and maybe some external modifier provided by items. Mana regeneration depends on constitution, but also on life level, the more damaged you are, the lower you recover your energy. And of course, on external modifiers. the returned value must be the amount of points to regenerate per minute of game time.
Can somebody suggest me a way to calculate this?