diff --git a/src/endWeek/saServeThePublic.js b/src/endWeek/saServeThePublic.js index 15ea4fbff2fa729b86661c7a2d99c835b24ca9c6..b375f8295923506ae842a94095021e3aef21b82d 100644 --- a/src/endWeek/saServeThePublic.js +++ b/src/endWeek/saServeThePublic.js @@ -651,22 +651,23 @@ App.SlaveAssignment.serveThePublic = (function() { } } + const modScore = SlaveStatsChecker.modScore(slave); if (arcology.FSTransformationFetishist > 20 || arcology.FSDegradationist > 20) { - if ((V.modScore > 15) || (V.piercingScore > 8 && V.tatScore > 5)) { + if ((modScore.total > 15) || (modScore.piercing > 8 && modScore.tat > 5)) { r += ` The public fetishizes body mods and considers ${hers} fascinating.`; - } else if (V.modScore > 7) { + } else if (modScore.total > 7) { r += ` The public fetishizes body mods and considers ${hers} interesting.`; } } else if (arcology.FSBodyPurist > 20 || arcology.FSPaternalist > 20) { - if (V.modScore <= 7) { + if (modScore.total <= 7) { r += ` The public disapproves of body mods and is pleased that ${he}'s unspoiled in that regard.`; } else { r += ` The public disapproves of body mods and considers ${hers} unappealing.`; } } else { - if ((V.modScore > 15) || (V.piercingScore > 8 && V.tatScore > 5)) { + if ((modScore.total > 15) || (modScore.piercing > 8 && modScore.tat > 5)) { r += ` ${He} has so much body art that most potential patrons don't think ${he} needs any more.`; - } else if (slave.corsetPiercing !== 0 || V.piercingScore >= 3 || V.tatScore >= 2) { + } else if (slave.corsetPiercing !== 0 || modScore.piercing >= 3 || modScore.tat >= 2) { r += ` ${His} body art helps attract patrons to use ${him} freely.`; } } diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js index ea6e8c18b11a333b6abfc50e70f9a0df0526ca60..36289d69324cf059c4859ce9c1d4c650d139d53a 100644 --- a/src/endWeek/saWhore.js +++ b/src/endWeek/saWhore.js @@ -725,22 +725,23 @@ App.SlaveAssignment.whore = (function() { } } + const modScore = SlaveStatsChecker.modScore(slave); if (arcology.FSTransformationFetishist > 20 || arcology.FSDegradationist > 20) { - if ((V.modScore > 15) || (V.piercingScore > 8 && V.tatScore > 5)) { + if ((modScore.total > 15) || (modScore.piercing > 8 && modScore.tat > 5)) { r += ` Many customers fetishize body mods and consider ${hers} fascinating.`; - } else if (V.modScore > 7) { + } else if (modScore.total > 7) { r += ` Many customers fetishize body mods and consider ${hers} interesting.`; } } else if (arcology.FSBodyPurist > 20 || arcology.FSPaternalist > 20) { - if (V.modScore <= 7) { + if (modScore.total <= 7) { r += ` Many customers disapprove of body mods and are pleased that ${he}'s unspoiled in that regard.`; } else { r += ` Many customers disapprove of body mods and consider ${hers} unappealing.`; } } else { - if ((V.modScore > 15) || (V.piercingScore > 8 && V.tatScore > 5)) { + if ((modScore.total > 15) || (modScore.piercing > 8 && modScore.tat > 5)) { r += ` ${He} has so much body art that most customers don't think ${he} needs any more.`; - } else if (slave.corsetPiercing !== 0 || V.piercingScore >= 3 || V.tatScore >= 2) { + } else if (slave.corsetPiercing !== 0 || modScore.piercing >= 3 || modScore.tat >= 2) { r += ` ${His} body art helps attract customers.`; } } diff --git a/src/facilities/nursery/widgets/children/childSummary.js b/src/facilities/nursery/widgets/children/childSummary.js index 9e344622f5271e0b0e3090d0314f73fb079fe226..ec584e74c276ce20f4ac78fe80c3a171cf74c5c1 100644 --- a/src/facilities/nursery/widgets/children/childSummary.js +++ b/src/facilities/nursery/widgets/children/childSummary.js @@ -2271,12 +2271,12 @@ App.Facilities.Nursery.ChildSummary = function(child) { // * @param {App.Entity.SlaveState} child // */ // function shortMods(child) { - // V.modScore = SlaveStatsChecker.modScore(child); - // if (child.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) { + // const modScore = SlaveStatsChecker.modScore(child); + // if (child.corsetPiercing === 0 && modScore.piercing < 3 && modScore.tat < 2) { // return; - // } else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { + // } else if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) { // r += `Mods++`; - // } else if (V.modScore > 7) { + // } else if (modScore.total > 7) { // r += `Mods+`; // } else { // r += `Mods`; @@ -2598,12 +2598,12 @@ App.Facilities.Nursery.ChildSummary = function(child) { // * @param {App.Entity.SlaveState} child // */ // function longMods(child) { - // V.modScorChildStatsChecker.modScore(child); - // if (child.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) { + // const modScore = SlaveStatsChecker.modScore(child); + // if (child.corsetPiercing === 0 && modScore.piercing < 3 && modScore.tat < 2) { // return; - // } else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { + // } else if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) { // r += `Extensive body mods. `; - // } else if (V.modScore > 7) { + // } else if (modScore.total > 7) { // r += `Noticeable body mods. `; // } else { // r += `Light body mods. `; diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index c8c1bd2d769e90d408406ad2e802115e83dedf80..08b28b727a18b361bc27156808b331082caa3ffc 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -86,7 +86,6 @@ globalThis.BeautyArray = (function() { arcology = V.arcologies[0]; beauty = 0; retval = []; - V.modScore = SlaveStatsChecker.modScore(slave); calcInitBeauty(slave); if (slave.fuckdoll === 0) { @@ -94,7 +93,7 @@ globalThis.BeautyArray = (function() { calcIntelligenceBeauty(slave); calcFaceBeauty(slave); calcTeethBeauty(slave); - calcModBeauty(); + calcModBeauty(slave); calcCosmeticsBeauty(slave); calcFSNotFuckdollBeauty(slave); calcMiscNotFuckdollBeauty(slave); @@ -288,29 +287,30 @@ globalThis.BeautyArray = (function() { } } - function calcModBeauty( - /* slave - */ - ) { + /** + * @param {App.Entity.SlaveState} slave + */ + function calcModBeauty(slave) { + const modScore = SlaveStatsChecker.modScore(slave); if (arcology.FSTransformationFetishist > 20 || arcology.FSDegradationist > 20) { - if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { - adjustBeauty("Modded: Greatly", (8 + (V.modScore * 0.25))); - } else if (V.modScore > 7) { - adjustBeauty("Modded: Some", (V.modScore - 7)); + if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) { + adjustBeauty("Modded: Greatly", (8 + (modScore.total * 0.25))); + } else if (modScore.total > 7) { + adjustBeauty("Modded: Some", (modScore.total - 7)); } } else if (arcology.FSBodyPurist > 20 || arcology.FSPaternalist > 20) { - if (V.modScore <= 7) { + if (modScore.total <= 7) { adjustBeauty("Modded: Few: Body Purist / Paternalist", (10)); } else { - adjustBeauty("Modded: Body Purist", (15 - V.modScore)); + adjustBeauty("Modded: Body Purist", (15 - modScore.total)); } } else { - if (V.modScore <= 7) { - adjustBeauty("Modded: Few", (V.modScore)); - } else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { + if (modScore.total <= 7) { + adjustBeauty("Modded: Few", (modScore.total)); + } else if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) { adjustBeauty("Modded: Greatly", (11)); } else { - adjustBeauty("Modded", (7 + (0.5 * (V.modScore - 7)))); + adjustBeauty("Modded", (7 + (0.5 * (modScore.total - 7)))); } } } diff --git a/src/js/slaveSummaryHelpers.js b/src/js/slaveSummaryHelpers.js index 6c835eb8c41bff7f299652a1ee19ee82117a0423..519f7fdd8b6f867f8f740eb833af2a322c743d9a 100644 --- a/src/js/slaveSummaryHelpers.js +++ b/src/js/slaveSummaryHelpers.js @@ -624,12 +624,12 @@ App.UI.SlaveSummaryImpl = function() { * @returns {void} */ function long_mods(slave, c) { - V.modScore = SlaveStatsChecker.modScore(slave); - if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) { + const modScore = SlaveStatsChecker.modScore(slave); + if (slave.corsetPiercing === 0 && modScore.piercing < 3 && modScore.tat < 2) { return; - } else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { + } else if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) { makeSpan(c, "Extensive body mods."); - } else if (V.modScore > 7) { + } else if (modScore.total > 7) { makeSpan(c, "Noticeable body mods."); } else { makeSpan(c, "Light body mods."); @@ -798,12 +798,12 @@ App.UI.SlaveSummaryImpl = function() { * @returns {void} */ function short_mods(slave, c) { - V.modScore = SlaveStatsChecker.modScore(slave); - if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) { + const modScore = SlaveStatsChecker.modScore(slave); + if (slave.corsetPiercing === 0 && modScore.piercing < 3 && modScore.tat < 2) { return; - } else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { + } else if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) { makeSpan(c, "Mods++"); - } else if (V.modScore > 7) { + } else if (modScore.total > 7) { makeSpan(c, "Mods+"); } else { makeSpan(c, "Mods"); diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index f1c045b7be4f82ad180d6905aacb667f14456448..e251391818d33a8b0171d49f6fa34126c989770a 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -46,14 +46,20 @@ globalThis.SlaveStatsChecker = (function() { /** call as SlaveStatsChecker.modScore() * @param {App.Entity.SlaveState} slave - * @returns {number} // I think + * @returns {{piercing: number, tat: number, brand: number, scar: number, total: number}} */ function modScore(slave) { - V.piercingScore = piercingScore(slave); - V.tatScore = tatScore(slave); - V.brandScore = brandScore(slave); - V.scarScore = scarScore(slave); - return V.tatScore + V.piercingScore + V.brandScore + V.scarScore; + const piercing = piercingScore(slave); + const tat = tatScore(slave); + const brand = brandScore(slave); + const scar = scarScore(slave); + return { + piercing, + tat, + brand, + scar, + total: piercing + tat + brand + scar + }; } /** @@ -401,7 +407,7 @@ globalThis.heelLength = function(slave) { */ globalThis.bimboScore = function(slave) { let degree = 0; - let mods = SlaveStatsChecker.modScore(slave); + const modScore = SlaveStatsChecker.modScore(slave); if (slave.lips > 70) { degree++; @@ -454,13 +460,13 @@ globalThis.bimboScore = function(slave) { if (slave.makeup > 1 && slave.nails > 1) { degree++; } - if (mods >= 10) { + if (modScore.total >= 10) { degree++; } - if (V.piercingScore > 5) { + if (modScore.piercing > 5) { degree++; } - if (V.tatScore > 3) { + if (modScore.tat > 3) { degree++; } if (setup.highHeels.includes(slave.shoes)) { diff --git a/src/uncategorized/hgApplication.tw b/src/uncategorized/hgApplication.tw index 895894c545fa32fe06f3ed9772720b143c6cdc4a..23da3ec0b84cafaddb6bad2124974a1614e6307f 100644 --- a/src/uncategorized/hgApplication.tw +++ b/src/uncategorized/hgApplication.tw @@ -328,7 +328,7 @@ In spare moments $he teaches $activeSlave.slaveName how to prostitute _himself2. <</if>> <<if $HGPiercings>> - <<if $activeSlave.devotion >= -20 && $activeSlave.genes == "XY" && $activeSlave.attrXY <= 35 && $arcologies[0].FSBodyPurist == "unset" && ($arcologies[0].FSPaternalist == "unset" || ($arcologies[0].FSPaternalist != "unset" && $modScore < 13))>> + <<if $activeSlave.devotion >= -20 && $activeSlave.genes == "XY" && $activeSlave.attrXY <= 35 && $arcologies[0].FSBodyPurist == "unset" && ($arcologies[0].FSPaternalist == "unset" || ($arcologies[0].FSPaternalist != "unset" && SlaveStatsChecker.modScore($activeSlave).total < 13))>> <<set _piercingForbidden = 0>> <<for _i = 0; _i < 1; _i++>> <<if $activeSlave.earPiercing == 0 && $activeSlave.earShape !== "none">> diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 5d9b0faa120f425b94686c5fac7099dab6862443..35a67630ff54d57499637f1ca16dbc5ea410750e 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -5758,7 +5758,7 @@ <</if>> <<if $arcologies[0].FSPaternalist != "unset" || $arcologies[0].FSDegradationist != "unset" || $arcologies[0].FSBodyPurist != "unset">> - <<set $modScore = SlaveStatsChecker.modScore($slaves[$i])>> + <<set _modScore = SlaveStatsChecker.modScore($slaves[$i])>> <</if>> <<if $arcologies[0].FSSupremacist != "unset">> @@ -6142,7 +6142,7 @@ <<= FutureSocieties.ChangePorn("Paternalist", -3)>> <</if>> <</if>> - <<if ($modScore > 15 || ($piercingScore > 8 && $tatScore > 5))>> + <<if (_modScore.total > 15 || (_modScore.piercing > 8 && _modScore.tat > 5))>> Society @@.red;disapproves@@ of $his degrading body modifications, which dulls the public interest in letting slaves choose their own appearance. <<= FutureSocieties.ChangePorn("Paternalist", -1)>> <</if>> @@ -6179,7 +6179,7 @@ Society @@.green;approves@@ of how $he is restrained for involuntary use, seeing this as the future of sexual relations. <<= FutureSocieties.ChangePorn("Degradationist", 1)>> <</if>> - <<if ($modScore > 15 || ($piercingScore > 8 && $tatScore > 5))>> + <<if (_modScore.total > 15 || (_modScore.piercing > 8 && _modScore.tat > 5))>> Society @@.green;approves@@ of $his many body modifications, which advances the public taste for such degradation of slave bodies. <<= FutureSocieties.ChangePorn("Degradationist", 1)>> <</if>> @@ -6291,7 +6291,7 @@ Society @@.red;disapproves@@ of $slaves[$i].slaveName's implants; this holds back acceptance of the idea that slaves should be all-natural. <<= FutureSocieties.ChangePorn("BodyPurist", -1)>> <</if>> - <<if ($slaves[$i].corsetPiercing == 0 && $piercingScore < 3 && $tatScore < 2)>> + <<if ($slaves[$i].corsetPiercing == 0 && _modScore.piercing < 3 && _modScore.tat < 2)>> Society @@.green;approves@@ of $his unmarked, unblemished skin, advancing the fashion for unspoiled slaves. <<= FutureSocieties.ChangePorn("BodyPurist", 1)>> <</if>> diff --git a/src/uncategorized/saRecruitGirls.tw b/src/uncategorized/saRecruitGirls.tw index 962b1d4776013671ccd0cbcaed2a07dc13345dd9..dd8656c11ede3964deca33d5ac2fe2439cd815c1 100644 --- a/src/uncategorized/saRecruitGirls.tw +++ b/src/uncategorized/saRecruitGirls.tw @@ -571,11 +571,11 @@ <<set _seed += 1>> <</if>> <<elseif $arcologies[0].FSDegradationist != "unset">> - <<set $modScore = SlaveStatsChecker.modScore($slaves[$i])>> + <<set _modScore = SlaveStatsChecker.modScore($slaves[$i])>> <<if $slaves[$i].intelligence+$slaves[$i].intelligenceImplant > 50>> <<set _seed += 1, _FSdefend++, $arcologies[0].FSDegradationist += 0.01*$FSSingleSlaveRep*_FSIntMod>> <</if>> - <<if $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>> + <<if _modScore.total > 15 || (_modScore.piercing > 8 && _modScore.tat > 5)>> <<set _seed += 1, _FSmatch++, $arcologies[0].FSDegradationist += 0.01*$FSSingleSlaveRep>> <</if>> <</if>> @@ -602,8 +602,8 @@ <</if>> <</if>> <<if $arcologies[0].FSBodyPurist != "unset">> - <<set $modScore = SlaveStatsChecker.modScore($slaves[$i])>> - <<if $slaves[$i].corsetPiercing == 0 && $piercingScore < 3 && $tatScore < 2>> + <<set _modScore = SlaveStatsChecker.modScore($slaves[$i])>> + <<if $slaves[$i].corsetPiercing == 0 && _modScore.piercing < 3 && _modScore.tat < 2>> <<if $slaves[$i].boobsImplant == 0>> <<set _seed += 1>> <</if>> @@ -915,7 +915,7 @@ $His praise of your good works lacks the special touch of personal affection, so it doesn't impress much. <</if>> <<elseif $arcologies[0].FSDegradationist != "unset">> - <<if $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>> + <<if _modScore.total > 15 || (_modScore.piercing > 8 && _modScore.tat > 5)>> <<if $slaves[$i].intelligence+$slaves[$i].intelligenceImplant > 50>> Ordinarily you would punish a slave who displays independent thinking, but when $slaves[$i].slaveName goes public in all $his garish, modded glory to defend the legal right of slaveowners to use their property however they please, $he's earned a brief reprieve. <<else>> @@ -969,7 +969,7 @@ <</if>> <</if>> <<if $arcologies[0].FSBodyPurist != "unset">> - <<if $slaves[$i].corsetPiercing == 0 && $piercingScore < 3 && $tatScore < 2>> + <<if $slaves[$i].corsetPiercing == 0 && _modScore.piercing < 3 && _modScore.tat < 2>> <<if $slaves[$i].boobsImplant == 0 && $slaves[$i].buttImplant == 0 && $slaves[$i].waist >= -95>> $He exhibits pure sexuality in a lovely, artistic gallery of erotic photos posted this week that displays every natural <<if $showInches == 2>>inch<<else>>centimeter<</if>> of $his body. <<elseif $slaves[$i].boobsImplant == 0 && $slaves[$i].buttImplant == 0>>