mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
tmp fix, make sure *some* hp is lost
This commit is contained in:
parent
7c39f8c4e3
commit
5d40849ef1
2 changed files with 4 additions and 0 deletions
3
dist/habitrpg-shared.js
vendored
3
dist/habitrpg-shared.js
vendored
|
|
@ -11585,6 +11585,9 @@ var process=require("__browserify_process");(function() {
|
|||
subtractPoints = function() {
|
||||
var conMod, hpMod;
|
||||
conMod = 1 - (user._statsComputed.con / 100);
|
||||
if (conMod < .1) {
|
||||
conMod = 0.1;
|
||||
}
|
||||
hpMod = delta * conMod * task.priority;
|
||||
return stats.hp += Math.round(hpMod * 10) / 10;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -709,6 +709,7 @@ api.wrap = (user) ->
|
|||
# ===== CONSTITUTION =====
|
||||
# TODO Decreases HP loss from bad habits / missed dailies by 0.5% per point.
|
||||
conMod = 1 - (user._statsComputed.con / 100)
|
||||
conMod = 0.1 if conMod < .1
|
||||
hpMod = delta * conMod * task.priority
|
||||
stats.hp += Math.round(hpMod * 10) / 10 # round to 1dp
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue