diff --git a/lib/app/scoring.js b/lib/app/scoring.js
index bdaccb4d56..b49629128c 100644
--- a/lib/app/scoring.js
+++ b/lib/app/scoring.js
@@ -69,7 +69,7 @@ updateStats = function(user, stats) {
};
module.exports.score = score = function(spec) {
- var adjustvalue, cron, delta, diff, direction, exp, hp, lvl, modified, money, num, sign, task, type, user, value, _ref, _ref1, _ref2;
+ var adjustvalue, cron, delta, direction, exp, hp, lvl, modified, money, num, sign, task, type, user, value, _ref, _ref1, _ref2;
if (spec == null) {
spec = {
user: null,
@@ -124,9 +124,8 @@ module.exports.score = score = function(spec) {
num = task.get('value').toFixed(2);
statsNotification("GP -" + num, 'success');
if (money < 0) {
- diff = hp + money;
- hp = diff;
- statsNotification("HP -" + (diff.toFixed(2)), 'error');
+ hp += money;
+ statsNotification("HP " + (money.toFixed(2)), 'error');
money = 0;
}
}
diff --git a/src/app/scoring.coffee b/src/app/scoring.coffee
index 6caedb8fc1..f28136b7fa 100644
--- a/src/app/scoring.coffee
+++ b/src/app/scoring.coffee
@@ -111,9 +111,8 @@ module.exports.score = score = (spec = {user:null, task:null, direction:null, cr
statsNotification "GP -#{num}", 'success'
# if too expensive, reduce health & zero money
if money < 0
- diff = hp + money # hp - money difference
- hp = diff
- statsNotification "HP -#{diff.toFixed(2)}", 'error'
+ hp += money# hp - money difference
+ statsNotification "HP #{money.toFixed(2)}", 'error'
money = 0
# Add points to exp & money if positive delta