Static rewards now in list
This commit is contained in:
+21
-5
@@ -114,10 +114,26 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
|
||||
staticRewards: [
|
||||
{ text: "Re-Roll", notes: "Reset your task values to 0. Do this only if you're floundering.", value: 100, icon:"icon-retweet" }
|
||||
{ text: "Re-Roll", notes: "Reset your task values to 0. Do this only if you're floundering.", value: 100 }
|
||||
]
|
||||
staticRewardIds: [0] #stupid, but necessary for refList
|
||||
staticRewards: {
|
||||
weapon: [
|
||||
{text: "Hands", notes:'', value:0}
|
||||
{text: "Sword", notes:'', value:100}
|
||||
{text: "Mace", notes:'', value:200}
|
||||
]
|
||||
armor: [
|
||||
{text: "Cloth Armor", notes:'', value:0}
|
||||
{text: "Leather Armor", notes:'', value:100}
|
||||
{text: "Chain Mail", notes:'', value:200}
|
||||
]
|
||||
potion:
|
||||
text: "Potion"
|
||||
notes: "Recover 15 HP"
|
||||
value: 100
|
||||
icon:"icon-retweet"
|
||||
reroll:
|
||||
text: "Re-Roll"
|
||||
notes: "Reset your task values to 0. Do this only if you're floundering."
|
||||
icon: "icon-retweet"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-1
@@ -30,13 +30,22 @@ getRoom = (page, model, userId) ->
|
||||
model.refList "_dailyList", "_user.tasks", "_user.dailyIds"
|
||||
model.refList "_todoList", "_user.tasks", "_user.todoIds"
|
||||
model.refList "_rewardList", "_user.tasks", "_user.rewardIds"
|
||||
model.set '_staticRewards', content.staticRewards
|
||||
unless model.get('_user.tasks')
|
||||
model.push '_habitList', task for task in content.defaultTasks.habits
|
||||
model.push '_dailyList', task for task in content.defaultTasks.dailys
|
||||
model.push '_todoList', task for task in content.defaultTasks.todos
|
||||
model.push '_rewardList', task for task in content.defaultTasks.rewards
|
||||
|
||||
#static rewards
|
||||
model.setNull('_user.inventory', {armor:0, weapon:0})
|
||||
sr = [
|
||||
content.staticRewards.armor[user.get('inventory.armor')+1]
|
||||
content.staticRewards.weapon[user.get('inventory.weapon')+1]
|
||||
content.staticRewards.potion
|
||||
content.staticRewards.reroll
|
||||
]
|
||||
model.set '_staticRewards', sr
|
||||
|
||||
# http://tibia.wikia.com/wiki/Formula
|
||||
model.fn '_tnl', '_user.lvl', (lvl) -> 50 * Math.pow(lvl, 2) - 150 * lvl + 200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user