Implemented re-roll

This commit is contained in:
Tyler Renelle 2012-07-08 21:35:32 -04:00
parent 294f1b4914
commit 87f832be12
3 changed files with 5 additions and 3 deletions

View file

@ -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}
}
}

View file

@ -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) ->

View file

@ -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>
{/}