diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index e5c5c526cf2458e5e2660ed3c99c21aee55ce6e0..a2e6e8f1d049a8c63763a389be1bb5a293ee77ec 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -564,7 +564,7 @@ App.UI.SlaveList.sortingLinks = function(passage) { const textify = string => capFirstChar(string.replace(/([A-Z])/g, " $1")); let innerDiv = App.UI.DOM.makeElement("div", "Sort by: ", "indent"); - let order = ["devotion", "name", "assignment", "seniority", "actualAge", "visualAge", "physicalAge", "weeklyIncome", "health", "weight", "muscles", "sexDrive", "pregnancy"] + let order = ["devotion", "name", "assignment", "seniority", "actualAge", "visualAge", "physicalAge", "weeklyIncome", "health", "weight", "muscles", "intelligence", "sexDrive", "pregnancy"] .map(so => V.sortSlavesBy !== so ? App.UI.DOM.passageLink(textify(so), passage, () => { V.sortSlavesBy = so; }) : textify(so)); innerDiv.append(App.UI.DOM.arrayToList(order, " | ", " | ")); diff --git a/src/js/utilsSlaves.js b/src/js/utilsSlaves.js index 2c4f199ae36dcd885ef631624b7453b1c433f83b..c5b544724e39164d473f14dfdabe3c7ff638135a 100644 --- a/src/js/utilsSlaves.js +++ b/src/js/utilsSlaves.js @@ -47,6 +47,8 @@ globalThis.SlaveSort = function() { Dweight: (a, b) => b.weight - a.weight, Amuscles: (a, b) => a.muscles - b.muscles, Dmuscles: (a, b) => b.muscles - a.muscles, + Aintelligence: (a, b) => (a.intelligence + a.intelligenceImplant) - (b.intelligence + b.intelligenceImplant), + Dintelligence: (a, b) => (b.intelligence + b.intelligenceImplant) - (a.intelligence + a.intelligenceImplant), AsexDrive: (a, b) => effectiveEnergy(a) - effectiveEnergy(b), DsexDrive: (a, b) => effectiveEnergy(b) - effectiveEnergy(a), Apregnancy: (a, b) => effectivePreg(a) - effectivePreg(b),