award ultimate gear achievement

This commit is contained in:
Matteo Pagliazzi
2013-10-27 12:13:06 +01:00
parent 79e0d5cba2
commit d7416117f9
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -88,6 +88,8 @@ module.exports.buyItem = (user, type, options={}) ->
options.paths['stats.hp'] = true
else
user.items[type] = ~~nextItem.index
if user.items.weapon >= 6 and user.items.armor >= 5 and user.items.head >= 5 and user.items.shield >= 5
user.achievements.ultimateGear = true;
options.paths["items.#{type}"] = true
user.stats.gp -= +nextItem.value
options.paths['stats.gp'] = true