Implemented re-roll
This commit is contained in:
@@ -137,7 +137,7 @@ module.exports = {
|
||||
{type: 'armor', index: 5, text: "Golden Armor", icon: 'item-goldenarmor', notes:'', value:500}
|
||||
]
|
||||
potion: {type: 'potion', text: "Potion", notes: "Recover 15 HP", value: 100, icon: 'item-flask'}
|
||||
reroll: {type: 'reroll', text: "Re-Roll", icon: 'favicon', notes: "Reset your task values to 0. Do this only if you're floundering.", value:0}
|
||||
reroll: {type: 'reroll', text: "Re-Roll", icon: 'favicon', notes: "Reset your task values to 0. Do this only if you're floundering.", value:500}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -321,7 +321,9 @@ ready (model) ->
|
||||
hp = 50 if hp > 50
|
||||
user.set 'stats.hp', hp
|
||||
else if type == 'reroll'
|
||||
console.log 'reroll'
|
||||
for taskId of user.get('tasks')
|
||||
task = model.at('_user.tasks.'+taskId)
|
||||
task.set('value', 0) unless task.get('type')=='reward'
|
||||
|
||||
|
||||
exports.vote = (e, el, next) ->
|
||||
|
||||
Reference in New Issue
Block a user