mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 15:31:16 +00:00
divide tibia TNL by 5, make leveling easier
This commit is contained in:
parent
f0aa6299ea
commit
91e4a50179
4 changed files with 6 additions and 6 deletions
|
|
@ -56,7 +56,7 @@ get('/:uidParam?', function(page, model, _arg) {
|
|||
reroll: content.items.reroll
|
||||
});
|
||||
model.fn('_user._tnl', '_user.stats.lvl', function(lvl) {
|
||||
return 50 * Math.pow(lvl, 2) - 150 * lvl + 200;
|
||||
return (50 * Math.pow(lvl, 2) - 150 * lvl + 200) / 5;
|
||||
});
|
||||
model.refList("_habitList", "_user.tasks", "_user.habitIds");
|
||||
model.refList("_dailyList", "_user.tasks", "_user.dailyIds");
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ module.exports.tally = function(user) {
|
|||
lvl = 0;
|
||||
while (lvl < (user.get('stats.lvl') - 1)) {
|
||||
lvl++;
|
||||
expTally += 50 * Math.pow(lvl, 2) - 150 * lvl + 200;
|
||||
expTally += (50 * Math.pow(lvl, 2) - 150 * lvl + 200) / 5;
|
||||
}
|
||||
return user.push('history.exp', {
|
||||
date: new Date(),
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ get '/:uidParam?', (page, model, {uidParam}) ->
|
|||
potion: content.items.potion
|
||||
reroll: content.items.reroll
|
||||
|
||||
# http://tibia.wikia.com/wiki/Formula
|
||||
model.fn '_user._tnl', '_user.stats.lvl', (lvl) ->
|
||||
50 * Math.pow(lvl, 2) - 150 * lvl + 200
|
||||
model.fn '_user._tnl', '_user.stats.lvl', (lvl) ->
|
||||
# http://tibia.wikia.com/wiki/Formula
|
||||
(50 * Math.pow(lvl, 2) - 150 * lvl + 200)/5
|
||||
|
||||
# Default Tasks
|
||||
model.refList "_habitList", "_user.tasks", "_user.habitIds"
|
||||
|
|
|
|||
|
|
@ -158,5 +158,5 @@ module.exports.tally = (user) ->
|
|||
lvl = 0 #iterator
|
||||
while lvl < (user.get('stats.lvl')-1)
|
||||
lvl++
|
||||
expTally += 50 * Math.pow(lvl, 2) - 150 * lvl + 200
|
||||
expTally += (50 * Math.pow(lvl, 2) - 150 * lvl + 200)/5
|
||||
user.push 'history.exp', { date: new Date(), value: expTally }
|
||||
Loading…
Reference in a new issue