diff --git a/website/client/js/controllers/inventoryCtrl.js b/website/client/js/controllers/inventoryCtrl.js index 90d88025ae..ce16be8b9a 100644 --- a/website/client/js/controllers/inventoryCtrl.js +++ b/website/client/js/controllers/inventoryCtrl.js @@ -62,6 +62,16 @@ habitrpg.controller("InventoryCtrl", var item = Content.gear.flat[key]; + var bonusMultiplier = 1; + if (item.klass === User.user.stats.class || item.specialClass === User.user.stats.class) { + bonusMultiplier = 1.5; + } + + item._effectiveStr = item.str * bonusMultiplier; + item._effectiveCon = item.con * bonusMultiplier; + item._effectivePer = item.per * bonusMultiplier; + item._effectiveInt = item.int * bonusMultiplier; + if (!$scope.gearByClass[item.klass]) { $scope.gearByClass[item.klass] = []; } diff --git a/website/client/js/controllers/sortableInventoryCtrl.js b/website/client/js/controllers/sortableInventoryCtrl.js index 0c60b3a15f..7bf2641b02 100644 --- a/website/client/js/controllers/sortableInventoryCtrl.js +++ b/website/client/js/controllers/sortableInventoryCtrl.js @@ -1,10 +1,10 @@ habitrpg.controller('SortableInventoryController', ['$scope', function ($scope) { var attributeSort = { - constitution: ['-con', '-(con+int+per+str)'], - intelligence: ['-int', '-(con+int+per+str)'], - perception: ['-per', '-(con+int+per+str)'], - strength: ['-str', '-(con+int+per+str)'], + constitution: ['-(_effectiveCon)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'], + intelligence: ['-(_effectiveInt)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'], + perception: ['-(_effectivePer)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'], + strength: ['-(_effectiveStr)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'], set: 'set' }