lefnire/habitrpg — pull request #557 by MrConcept (2013-03-02 22:28:00+00:00)
Title: XP Changes, Better Notifications and Fixes!

# XP Changes #
* The TNL (To Next Level) Algorithm has been changed to the following:

![CodeCogsEqn](https://f.cloud.github.com/assets/1628871/213462/518fd146-8386-11e2-8a86-8080598133ab.gif)
* Here are the XP values required to progress to the next level for the first 20 levels:

XP
Level
XP
Level

1
100
11
1400

2
140
12
1640

3
200
13
1900

4
280
14
2180

5
380
15
2480

6
500
16
2800

7
640
17
3140

8
800
18
3500

9
980
19
3880

10
1180
20
4280

* The base XP gain for Tasks, Habits and Todos has been changed to 10 XP.

# Habit and Task Changes #
* Habit degradation is now enabled for purely Up and Down Habits
* Habit degradation is now uniform for both directions (up and down). The formulae for both are as follows:

![CodeCogsEqn 1 ](https://f.cloud.github.com/assets/1628871/213468/c801d1c6-8386-11e2-8fee-1859f8ffddfa.gif)
* Positive Habits are capped at 0.25s
* Negative Habits are capped at -5 HP
* Gold gained from, Todos, Habits and Dailies is no longer dependant on Strength from the Level and Weapon. This is to align the game with RPG elements but will facilitate Gold gaining mechanics in the future.

# Notifications #
* Gold notifications now show Gold and SIlver earnings:
![Screen Shot 2013-03-02 at 22 19 38](https://f.cloud.github.com/assets/1628871/213475/ad57d3f6-8387-11e2-84d4-05589f610dd6.png)
* Death notifications!
![Screen Shot 2013-03-02 at 22 20 07](https://f.cloud.github.com/assets/1628871/213474/968e9182-8387-11e2-9103-f217a0e3c392.png)

# Fixes #
* XP bars should not longer show rounded up values (i.e. no 100/100 XP exception through API triggered habits)
* Checking and Unchecking a Todo or Daily should add and remove the same amount of Gold and XP

# Code Changes #
* Ported some algorithms to algos.coffee
* Swapped some functions in scoring.coffee