HabitRPG/habitrpg-shared — pull request #76 by Alys (2014-01-05 21:38:38+00:00)
Title: subtract MP when unticking a todo (instead of add)

Currently, when you untick a completed todo, you GAIN MP. Lines 837-839 of this change will cause you to loose it instead.

Line 841 will prevent your MP becoming negative if you used up all your MP before unticking the todo... BUT do we want to prevent negative MP under that circumstance? Perhaps it should be allowed to go negative? The circumstance I'm thinking of is:
1. You tick off a todo, causing your MP to reach (for example) 10.
2. You cast a spell that costs 10 MP. MP is now 0.
3. You realise that you had ticked off the todo accidentally (or deliberately to rort the system!) and so you untick the todo, which (without line 841) would cause your MP to go to -1. Strictly speaking, it SHOULD be -1 because you had spent MP that you hadn't truly earned, but negative MP might look weird and cause "bug" reports. Line 841 will prevent it being negative.