Added check for total points before skipping attribution

This commit is contained in:
Keith Holliday
2015-11-28 13:08:15 -06:00
parent 3cc2866c76
commit 298df73619

View File

@@ -2281,13 +2281,14 @@ api.wrap = function(user, main) {
user.stats.lvl++; user.stats.lvl++;
tnl = api.tnl(user.stats.lvl); tnl = api.tnl(user.stats.lvl);
user.stats.hp = 50; user.stats.hp = 50;
if (user.stats.lvl > api.maxLevel) { var totalStatPoints = user.stats.str + user.stats.int + user.stats.con + user.stats.per;
if (user.stats.lvl > api.maxLevel && totalPoints >= 100 ) {
continue; continue;
} }
if (user.preferences.automaticAllocation) { if (user.preferences.automaticAllocation) {
user.fns.autoAllocate(); user.fns.autoAllocate();
} else { } else {
user.stats.points = user.stats.lvl - (user.stats.con + user.stats.str + user.stats.per + user.stats.int); user.stats.points = user.stats.lvl - totalStatPoints;
if (user.stats.points < 0) { if (user.stats.points < 0) {
user.stats.points = 0; user.stats.points = 0;
} }