woops, can't alert on server!

This commit is contained in:
Tyler Renelle 2013-08-15 00:26:39 -04:00
parent 2ffade083e
commit d7083bd442
3 changed files with 4357 additions and 4361 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

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