level 100 modal strings and removing level cap

This commit is contained in:
deilann
2014-05-11 07:53:31 -07:00
parent ca4f88754f
commit 5fd1f2eb0f
2 changed files with 37 additions and 28 deletions
+7 -1
View File
@@ -21,5 +21,11 @@
"rebirthOrb": "Used an Orb of Rebirth to start over after attaining Level",
"rebirthPop": "Begin a new character at Level 1 while retaining achievements, collectibles, and tasks with history.",
"rebirthName": "Orb of Rebirth",
"reborn": "Reborn, max level <%= reLevel %>"
"reborn": "Reborn, max level <%= reLevel %>",
"welcome100": "Welcome to Level 100!",
"intro100": "Now that you've hit level 100, you have the option to use the Orb of Rebirth for free at any time.",
"followup100": "While you can continue to level up, it will no long boost your stats and no more content will unlock, to keep Habit fun for folks of all play styles.",
"rebirth100Info": "If you're ready to start a new adventure, you can Rebirth now... or see how much further you can push yourself.",
"rebirthWait": "I'll wait...",
"rebirthNow": "Rebirth Now!"
}
+30 -27
View File
@@ -66,8 +66,7 @@ api.shouldDo = (day, repeat, options={}) ->
###
api.tnl = (lvl) ->
if lvl >= 100 then 0
else Math.round(((Math.pow(lvl, 2) * 0.25) + (10 * lvl) + 139.75) / 10) * 10
Math.round(((Math.pow(lvl, 2) * 0.25) + (10 * lvl) + 139.75) / 10) * 10
# round to nearest 10?
###
@@ -430,7 +429,10 @@ api.wrap = (user, main=true) ->
if user.stats.lvl < 100
user.balance -= 2
# Save off user's level, for calculating achievement eligibility later
lvl = user.stats.lvl
if user.stats.lvl < 100
lvl = user.stats.lvl
else
lvl = 100
# Turn tasks yellow, zero out streaks
_.each user.tasks, (task) ->
unless task.type is 'reward'
@@ -1099,30 +1101,23 @@ api.wrap = (user, main=true) ->
user.stats.gp = if stats.gp >= 0 then stats.gp else 0
tnl = api.tnl(user.stats.lvl)
# if we're at level 100, turn xp to gold
if user.stats.lvl >= 100
stats.gp += stats.exp / 15
stats.exp = 0
user.stats.lvl = 100
else
# level up & carry-over exp
if stats.exp >= tnl
#silent = true # push through the negative xp silently
user.stats.exp = stats.exp # push normal + notification
while stats.exp >= tnl and user.stats.lvl < 100 # keep levelling up
stats.exp -= tnl
user.stats.lvl++
tnl = api.tnl(user.stats.lvl)
# level up & carry-over exp
if stats.exp >= tnl
#silent = true # push through the negative xp silently
user.stats.exp = stats.exp # push normal + notification
while stats.exp >= tnl # keep levelling up
stats.exp -= tnl
user.stats.lvl++
tnl = api.tnl(user.stats.lvl)
# Auto-allocate a point, or give them a new manual point
if user.preferences.automaticAllocation
user.fns.autoAllocate()
else
# add new allocatable points. We could do user.stats.points++, but this does a fail-safe just in case
user.stats.points = user.stats.lvl - (user.stats.con + user.stats.str + user.stats.per + user.stats.int);
# Auto-allocate a point, or give them a new manual point
if user.preferences.automaticAllocation
user.fns.autoAllocate()
else
# add new allocatable points. We could do user.stats.points++, but this does a fail-safe just in case
user.stats.points = user.stats.lvl - (user.stats.con + user.stats.str + user.stats.per + user.stats.int);
if user.stats.lvl == 100
stats.exp = 0
user.stats.hp = 50
user.stats.exp = stats.exp
@@ -1149,6 +1144,8 @@ api.wrap = (user, main=true) ->
dialog: i18n.t('messageFoundQuest', {questText: content.quests.vice1.text(req.language)}, req.language)
if !user.flags.rebirthEnabled and (user.stats.lvl >= 50 or user.achievements.ultimateGear or user.achievements.beastMaster)
user.flags.rebirthEnabled = true
if !user.flags.freeRebirth = true and user.stats.lvl >= 100
user.flags.freeRebirth = true
###
------------------------------------------------------
@@ -1259,7 +1256,10 @@ api.wrap = (user, main=true) ->
if perfect
user.achievements.perfect ?= 0
user.achievements.perfect++
lvlDiv2 = Math.ceil(user.stats.lvl/2)
if user.stats.lvl < 100
lvlDiv2 = Math.ceil(user.stats.lvl/2)
else
lvlDiv2 = 50
{str:lvlDiv2,int:lvlDiv2,per:lvlDiv2,con:lvlDiv2,stealth:0,streaks:false}
else clearBuffs
@@ -1343,7 +1343,10 @@ api.wrap = (user, main=true) ->
else
+val[stat] or 0
, 0
m[stat] += (user.stats.lvl - 1) / 2
if user.stats.lvl < 100
m[stat] += (user.stats.lvl - 1) / 2
else
m[stat] += 50
m
, {}
computed.maxMP = computed.int*2 + 30