diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index e3f6bddc01391f0448023be54fba8ce9cc319bf8..775b5ba9e7ba43225e2ec18769e0bad9ec389290 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -553,6 +553,70 @@ globalThis.isFullyPotent = function(slave) { return false; }; +/** + * @param {App.Entity.SlaveState} slave + * @returns {boolean} Whether the slave is considered at least smart + */ +globalThis.isSmart = function(slave) { + if (!slave) { + return null; + } else if (slave.intelligence > 15) { + return true; + } + return false; +}; + +/** + * @param {App.Entity.SlaveState} slave + * @returns {boolean} Whether the slave is considered at least slow + */ +globalThis.isStupid = function(slave) { + if (!slave) { + return null; + } else if (slave.intelligence < -15) { + return true; + } + return false; +}; + +/** + * @param {App.Entity.SlaveState} slave + * @returns {boolean} Whether the slave is a part of the "superior" race + */ +globalThis.isSuperiorRace = function(slave) { + if (!slave || arcology.FSSupremacist === "unset") { + return null; + } else { + if (slave.race === arcology.FSSupremacistRace) { + return true; + } + } + return false; +}; + +/** + * @param {App.Entity.SlaveState} slave + * @returns {boolean} Whether the slave is a part of the "inferior" race + */ +globalThis.isInferiorRace = function(slave) { + if (!slave || arcology.FSSubjugationist === "unset") { + return null; + } else { + if (slave.race === arcology.FSSubjugationistRace) { + return true; + } + } + return false; +}; + +/** + * @param {App.Entity.SlaveState} slave + * @returns {boolean} Whether the slave is a breeder for the Elites + */ +globalThis.isEliteBreeder = function(slave) { + return slave.breedingMark; +}; + /** * @param {App.Entity.SlaveState} slave * @returns {boolean}