mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
start fixing commong
This commit is contained in:
@@ -27,13 +27,15 @@ export function toNextLevel (lvl) {
|
||||
} if (lvl === 5) {
|
||||
return 150;
|
||||
}
|
||||
return Math.round((Math.pow(lvl, 2) * 0.25 + 10 * lvl + 139.75) / 10) * 10;
|
||||
return Math.round(((lvl ** 2) * 0.25 + 10 * lvl + 139.75) / 10) * 10;
|
||||
}
|
||||
|
||||
/*
|
||||
A hyperbola function that creates diminishing returns, so you can't go to infinite (eg, with Exp gain).
|
||||
A hyperbola function that creates diminishing returns,
|
||||
so you can't go to infinite (eg, with Exp gain).
|
||||
{max} The asymptote
|
||||
{bonus} All the numbers combined for your point bonus (eg, task.value * user.stats.int * critChance, etc)
|
||||
{bonus} All the numbers combined for your point bonus
|
||||
(eg, task.value * user.stats.int * critChance, etc)
|
||||
{halfway} (optional) the point at which the graph starts bending
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user