quests: add collection quests, incl. polar bear pt 2, and quest arks, and achievements

This commit is contained in:
Tyler Renelle
2013-12-24 10:25:09 -07:00
parent f538a91538
commit 094989db13
9 changed files with 185 additions and 120 deletions

View File

@@ -84,6 +84,8 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', 'User',
}
$scope.purchase = function(type, item){
if (item.previous && !User.user.achievements.quests[item.previous])
return alert("You must first complete " + $rootScope.Content.quests[item.previous].text + '.');
var gems = User.user.balance * 4;
if(gems < item.value) return $rootScope.modals.buyGems = true;
var string = (type == 'hatchingPotion') ? 'hatching potion' : type; // give hatchingPotion a space