mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 03:30:25 +00:00
Implemented re-roll
This commit is contained in:
parent
294f1b4914
commit
87f832be12
3 changed files with 5 additions and 3 deletions
|
|
@ -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) ->
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
{#with _items.armor as :item}<app:item />{/}
|
||||
{#with _items.weapon as :item}<app:item />{/}
|
||||
{#with _items.potion as :item}<app:item />{/}
|
||||
{#with _items.reroll as :item}<app:item disabled=true/>{/}
|
||||
{#with _items.reroll as :item}<app:item />{/}
|
||||
</ul>
|
||||
{/}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue