mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 20:12:19 +00:00
woops, can't alert on server!
This commit is contained in:
parent
2ffade083e
commit
d7083bd442
3 changed files with 4357 additions and 4361 deletions
File diff suppressed because one or more lines are too long
5059
browser/browser.js
5059
browser/browser.js
File diff suppressed because it is too large
Load diff
|
|
@ -83,9 +83,7 @@ module.exports.buyItem = (user, type, options={}) ->
|
||||||
i = (user.items[type] or 0) + 1
|
i = (user.items[type] or 0) + 1
|
||||||
module.exports.getItem type, i
|
module.exports.getItem type, i
|
||||||
|
|
||||||
if user.stats.gp < +nextItem.value
|
return false if user.stats.gp < +nextItem.value
|
||||||
alert("Not enough GP")
|
|
||||||
return false
|
|
||||||
if nextItem.type is 'potion'
|
if nextItem.type is 'potion'
|
||||||
user.stats.hp += 15;
|
user.stats.hp += 15;
|
||||||
user.stats.hp = 50 if user.stats.hp > 50
|
user.stats.hp = 50 if user.stats.hp > 50
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue