Talk:Experience: Difference between revisions
no edit summary
No edit summary |
Wizarddoctor (talk | contribs) No edit summary |
||
Line 16:
7938 xp @ level 50<br>
8092 xp @ level 51
Following formula to calculate experience points works for levels 0 - 6:
LEVEL * 500 + (15 * LEVEL * (LEVEL - 1) / 2)
For levels 5 and 6, following formula is added:
(LEVEL - 4) ^ 2
C# code snippet:
int baseLevel = 500 * level;
int triangularNumberSequenceModifier = 15 * level * (level - 1) / 2;
int squareModifier = level - 4 > 0 ? (int)Math.Pow(level - 4, 2) : 0;
return baseLevel + triangularNumberSequenceModifier + squareModifier;
This stops working after level 6.
|