diff --git a/.jshintrc b/.jshintrc index a1947112bf21a9e16f15cf94cc5d0bf746adb335..3be7392d7eddf06ac873c8b06f1de07b2e98e0a7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -5,8 +5,8 @@ "esversion": 6, "eqeqeq": true, "nocomma": true, - "undef": true, - "maxerr": 150, + "undef": false, + "maxerr": 250, "unused": true, "globals": { "SugarCube": false, @@ -20,5 +20,7 @@ "prerender": true, "postrender": true, "postdisplay": true - } + }, + "-W008": false, + "-W014": false } diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index b723149cbc4271e4e93854c9cc3d62b63b803764..db6e52410f032f8d4457d0fa477791cbc14cbd70 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -93,7 +93,7 @@ window.DefaultRules = (function() { break; case "be confined in the arcade": - if ((V.arcadeSlaves < V.arcade && slave.indentureRestrictions <= 0 && (slave.breedingMark != 1 || V.propOutcome === 0))) + if ((V.arcadeSlaves < V.arcade && slave.indentureRestrictions <= 0 && (slave.breedingMark !== 1 || V.propOutcome === 0))) break; else { RAFacilityRemove(slave, rule); // before deleting rule.setAssignment @@ -111,7 +111,7 @@ window.DefaultRules = (function() { break; case "get treatment in the clinic": - if ((V.clinicSlaves < V.clinic && (slave.health < 20 || (slave.chem > 15 && V.Nurse !== 0 && V.clinicUpgradeFilters == 1)) || ((slave.bellyImplant > -1) && (V.bellyImplants == 1)) || slave.preg > 1)) + if ((V.clinicSlaves < V.clinic && (slave.health < 20 || (slave.chem > 15 && V.Nurse !== 0 && V.clinicUpgradeFilters === 1)) || ((slave.bellyImplant > -1) && (V.bellyImplants === 1)) || slave.preg > 1)) break; else { RAFacilityRemove(slave, rule); // before deleting rule.setAssignment @@ -120,7 +120,7 @@ window.DefaultRules = (function() { break; case "rest in the spa": - if ((V.spaSlaves < V.spa) && (slave.health < 20) || (slave.trust < 60) || (slave.devotion <= 60) || (slave.fetish == "mindbroken") && (slave.devotion >= -20)) + if ((V.spaSlaves < V.spa) && (slave.health < 20) || (slave.trust < 60) || (slave.devotion <= 60) || (slave.fetish === "mindbroken") && (slave.devotion >= -20)) break; else { RAFacilityRemove(slave,rule); // before deleting rule.setAssignment @@ -138,7 +138,7 @@ window.DefaultRules = (function() { break; case "work in the brothel": - if ((V.brothelSlaves < V.brothel && (slave.devotion > 50 || slave.trust > 50 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)) && (slave.breedingMark != 1 || V.propOutcome === 0))) + if ((V.brothelSlaves < V.brothel && (slave.devotion > 50 || slave.trust > 50 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)) && (slave.breedingMark !== 1 || V.propOutcome === 0))) break; else { RAFacilityRemove(slave, rule); // before deleting rule.setAssignment @@ -147,7 +147,7 @@ window.DefaultRules = (function() { break; case "serve in the club": - if ((V.clubSlaves < V.club && (slave.devotion > 50 || slave.trust > 50 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)) && (slave.breedingMark != 1 || V.propOutcome === 0))) + if ((V.clubSlaves < V.club && (slave.devotion > 50 || slave.trust > 50 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)) && (slave.breedingMark !== 1 || V.propOutcome === 0))) break; else { RAFacilityRemove(slave, rule); // before deleting rule.setAssignment @@ -159,13 +159,13 @@ window.DefaultRules = (function() { if ((V.dairy > V.dairySlaves+V.bioreactorsXY+V.bioreactorsXX+V.bioreactorsHerm+V.bioreactorsBarren)) { if ((slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1)) break; - else if (((slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) || (slave.breedingMark == 1 && V.propOutcome == 1 && V.dairyRestriantsSettings > 0) || ((V.dairyPregSetting > 0) && ((slave.bellyImplant != -1) || (slave.broodmother !== 0)))) + else if (((slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) || (slave.breedingMark === 1 && V.propOutcome === 1 && V.dairyRestriantsSettings > 0) || ((V.dairyPregSetting > 0) && ((slave.bellyImplant !== -1) || (slave.broodmother !== 0)))) break; else { - if ((slave.lactation > 0 || ((V.dairySlimMaintainUpgrade === 0 || V.dairySlimMaintain === 0) && (slave.boobs > 300 || slave.dick === 0 || V.dairyImplantsSetting == 1) && V.dairyImplantsSetting != 2)) || (slave.balls > 0)) { - if ((slave.devotion > 20) || ((slave.devotion >= -50) && (slave.trust < -20)) || (slave.trust < -50) || (slave.amp == 1) || (V.dairyRestraintsUpgrade == 1)) { - if ((V.dairyStimulatorsSetting < 2) || (slave.anus > 2) || (V.dairyPrepUpgrade == 1)) { - if ((V.dairyPregSetting < 2) || (slave.vagina > 2) || (slave.ovaries === 0) || (V.dairyPrepUpgrade == 1)) + if ((slave.lactation > 0 || ((V.dairySlimMaintainUpgrade === 0 || V.dairySlimMaintain === 0) && (slave.boobs > 300 || slave.dick === 0 || V.dairyImplantsSetting === 1) && V.dairyImplantsSetting !== 2)) || (slave.balls > 0)) { + if ((slave.devotion > 20) || ((slave.devotion >= -50) && (slave.trust < -20)) || (slave.trust < -50) || (slave.amp === 1) || (V.dairyRestraintsUpgrade === 1)) { + if ((V.dairyStimulatorsSetting < 2) || (slave.anus > 2) || (V.dairyPrepUpgrade === 1)) { + if ((V.dairyPregSetting < 2) || (slave.vagina > 2) || (slave.ovaries === 0) || (V.dairyPrepUpgrade === 1)) break; else { RAFacilityRemove(slave,rule); // before deleting rule.setAssignment @@ -206,7 +206,7 @@ window.DefaultRules = (function() { break; case "learn in the schoolroom": - if ((V.schoolroomSlaves < V.schoolroom && slave.fetish != "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)))) + if ((V.schoolroomSlaves < V.schoolroom && slave.fetish !== "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)))) if ((slave.intelligenceImplant < 30) || (slave.voice !== 0 && slave.accent+V.schoolroomUpgradeLanguage > 2) || (slave.oralSkill <= 10+V.schoolroomUpgradeSkills*20) || (slave.whoreSkill <= 10+V.schoolroomUpgradeSkills*20) || (slave.entertainSkill <= 10+V.schoolroomUpgradeSkills*20) || (slave.analSkill < 10+V.schoolroomUpgradeSkills*20) || ((slave.vagina >= 0) && (slave.vaginalSkill < 10+V.schoolroomUpgradeSkills*20))) break; else { @@ -229,14 +229,14 @@ window.DefaultRules = (function() { break; case "take classes": - if (slave.intelligenceImplant < 15 && slave.fetish != "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.trust < -20 && slave.devotion >= -50))) + if (slave.intelligenceImplant < 15 && slave.fetish !== "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.trust < -20 && slave.devotion >= -50))) break; else delete rule.setAssignment; break; case "choose her own job": - if ((slave.fetish != "mindbroken")) + if ((slave.fetish !== "mindbroken")) break; else delete rule.setAssignment; @@ -257,7 +257,7 @@ window.DefaultRules = (function() { break; case "work a glory hole": - if (slave.indentureRestrictions <= 0 && (slave.breedingMark != 1 || V.propOutcome === 0)) + if (slave.indentureRestrictions <= 0 && (slave.breedingMark !== 1 || V.propOutcome === 0)) break; else delete rule.setAssignment; @@ -266,7 +266,7 @@ window.DefaultRules = (function() { case "whore": case "serve the public": case "stay confined": - if ((slave.fuckdoll === 0) && (slave.breedingMark != 1 || V.propOutcome === 0)) + if ((slave.fuckdoll === 0) && (slave.breedingMark !== 1 || V.propOutcome === 0)) break; else delete rule.setAssignment; @@ -281,8 +281,8 @@ window.DefaultRules = (function() { function AssignJobToSlave(slave, rule) { // place slave on assignment defined by the rule - if ((rule.setAssignment !== undefined && rule.setAssignment != "no default setting")) { - if (((rule.setAssignment == "choose her own job" && !slave.choosesOwnAssignment) || rule.setAssignment != slave.assignment)) { + if ((rule.setAssignment !== undefined && rule.setAssignment !== "no default setting")) { + if (((rule.setAssignment === "choose her own job" && !slave.choosesOwnAssignment) || rule.setAssignment !== slave.assignment)) { switch (rule.setAssignment) { case "live with your Head Girl": r += `<br>${slave.slaveName} has been automatically assigned to live in your Head Girl's private suite.`; @@ -338,7 +338,7 @@ window.DefaultRules = (function() { function ProcessClothing(slave, rule) { // apply clothes to slave if ((rule.clothes !== undefined) && (rule.clothes !== "no default setting")) { - if ((rule.clothes == "choosing her own clothes")) { + if ((rule.clothes === "choosing her own clothes")) { if ((slave.choosesOwnClothes === 0)) { slave.clothes = "choosing her own clothes"; slave.choosesOwnClothes = 1; @@ -354,20 +354,20 @@ window.DefaultRules = (function() { function ProcessCollar(slave, rule) { // apply collar to slave - if ((rule.collar !== undefined) && (rule.collar != "no default setting")) { + if ((rule.collar !== undefined) && (rule.collar !== "no default setting")) { if ((slave.collar !== rule.collar)) { r += '<br>'; - if (rule.collar == "preg biometrics" && slave.preg <= -1 && slave.ovaries === 0 && slave.mpreg === 0) { + if (rule.collar === "preg biometrics" && slave.preg <= -1 && slave.ovaries === 0 && slave.mpreg === 0) { slave.collar = "none"; r += `${slave.slaveName} cannot utilize preg biometrics. `; - } else if ((rule.collar == "massive dildo gag" && slave.oralSkill <= 50)) { + } else if ((rule.collar === "massive dildo gag" && slave.oralSkill <= 50)) { slave.collar = "none"; r += `${slave.slaveName} lacks the oral skill to successfully keep the massive dildo gag in her throat. `; } else slave.collar = rule.collar; - if ((slave.collar == "none")) + if ((slave.collar === "none")) r += `${slave.slaveName} has been given no collar.`; - else if ((slave.collar == "pretty jewelry")) + else if ((slave.collar === "pretty jewelry")) r += `${slave.slaveName} has been given ${slave.collar}.`; else if ((["dildo gag", "massive dildo gag", "ball gag", "bit gag", "neck corset", "porcelain mask", "bell collar", "bowtie"].includes(slave.collar))) r += `${slave.slaveName} has been given a ${slave.collar}.`; @@ -382,14 +382,14 @@ window.DefaultRules = (function() { if ((rule.eyewear !== undefined) && (rule.eyewear !== "no default setting")) { switch (rule.eyewear) { case "correct with glasses": - if (slave.eyes == -1) { - if (slave.eyewear != "corrective glasses") { + if (slave.eyes === -1) { + if (slave.eyewear !== "corrective glasses") { slave.eyewear = "corrective glasses"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given corrective glasses.`; } } else { - if (slave.eyewear != "none") { + if (slave.eyewear !== "none") { slave.eyewear = "none"; r += `<br>${slave.slaveName}'s eyewear has been removed.`; } @@ -397,14 +397,14 @@ window.DefaultRules = (function() { break; case "correct with contacts": - if (slave.eyes == -1) { - if (slave.eyewear != "corrective contacts") { + if (slave.eyes === -1) { + if (slave.eyewear !== "corrective contacts") { slave.eyewear = "corrective contacts"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given corrective contacts.`; } } else { - if (slave.eyewear != "none") { + if (slave.eyewear !== "none") { slave.eyewear = "none"; r += `<br>${slave.slaveName}'s eyewear has been removed.`; } @@ -413,13 +413,13 @@ window.DefaultRules = (function() { case "blur with glasses": if (slave.eyes > -1) { - if (slave.eyewear != "blurring glasses") { + if (slave.eyewear !== "blurring glasses") { slave.eyewear = "blurring glasses"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given blurring glasses.`; } } else { - if (slave.eyewear != "none") { + if (slave.eyewear !== "none") { slave.eyewear = "none"; r += `<br>${slave.slaveName}'s eyewear has been removed.`; } @@ -428,13 +428,13 @@ window.DefaultRules = (function() { case "blur with contacts": if (slave.eyes > -1) { - if (slave.eyewear != "blurring contacts") { + if (slave.eyewear !== "blurring contacts") { slave.eyewear = "blurring contacts"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given blurring contacts.`; } } else { - if (slave.eyewear != "none") { + if (slave.eyewear !== "none") { slave.eyewear = "none"; r += `<br>${slave.slaveName}'s eyewear has been removed.`; } @@ -442,14 +442,14 @@ window.DefaultRules = (function() { break; case "universal glasses": - if (slave.eyes == -1) { - if (slave.eyewear != "corrective glasses") { + if (slave.eyes === -1) { + if (slave.eyewear !== "corrective glasses") { slave.eyewear = "corrective glasses"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given corrective glasses.`; } } else { - if (slave.eyewear != "glasses") { + if (slave.eyewear !== "glasses") { slave.eyewear = "glasses"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given decorative glasses.`; @@ -458,7 +458,7 @@ window.DefaultRules = (function() { break; default: - if (slave.eyewear != "none") { + if (slave.eyewear !== "none") { slave.eyewear = "none"; r += `<br>${slave.slaveName}'s eyewear has been removed.`; } @@ -472,14 +472,14 @@ window.DefaultRules = (function() { if ((rule.earwear !== undefined) && (rule.earwear !== "no default setting")) { switch (rule.earwear) { case "correct with hearing aids": - if (slave.hears == -1) { - if (slave.earwear != "hearing aids") { + if (slave.hears === -1) { + if (slave.earwear !== "hearing aids") { slave.earwear = "hearing aids"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given hearing aids.`; } } else { - if (slave.earwear != "none") { + if (slave.earwear !== "none") { slave.earwear = "none"; r += `<br>${slave.slaveName}'s earwear has been removed.`; } @@ -488,13 +488,13 @@ window.DefaultRules = (function() { case "muffle with ear plugs": if (slave.hears > -1) { - if (slave.earwear != "muffling ear plugs") { + if (slave.earwear !== "muffling ear plugs") { slave.earwear = "muffling ear plugs"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given muffling ear plugs.`; } } else { - if (slave.earwear != "none") { + if (slave.earwear !== "none") { slave.earwear = "none"; r += `<br>${slave.slaveName}'s earwear has been removed.`; } @@ -503,13 +503,13 @@ window.DefaultRules = (function() { case "deafen with ear plugs": if (slave.hears > -2) { - if (slave.earwear != "deafening ear plugs") { + if (slave.earwear !== "deafening ear plugs") { slave.earwear = "deafening ear plugs"; cashX(forceNeg(V.modCost), "slaveMod", slave); r += `<br>${slave.slaveName} has been given deafening ear plugs.`; } } else { - if (slave.earwear != "none") { + if (slave.earwear !== "none") { slave.earwear = "none"; r += `<br>${slave.slaveName}'s earwear has been removed.`; } @@ -517,7 +517,7 @@ window.DefaultRules = (function() { break; default: - if (slave.earwear != "none") { + if (slave.earwear !== "none") { slave.earwear = "none"; r += `<br>${slave.slaveName}'s earwear has been removed.`; } @@ -553,21 +553,21 @@ window.DefaultRules = (function() { break; case "long dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length dildo for her pussy.`; slave.vaginalAccessory = "dildo"; } break; case "long, large dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length large dildo for her pussy.`; slave.vaginalAccessory = "large dildo"; } break; case "long, huge dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length huge dildo for her pussy.`; slave.vaginalAccessory = "huge dildo"; } else { @@ -610,21 +610,21 @@ window.DefaultRules = (function() { break; case "long dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length dildo for her pussy.`; slave.vaginalAccessory = "dildo"; } break; case "long, large dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length large dildo for her pussy.`; slave.vaginalAccessory = "large dildo"; } break; case "long, huge dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length huge dildo for her pussy.`; slave.vaginalAccessory = "huge dildo"; } else { @@ -667,21 +667,21 @@ window.DefaultRules = (function() { break; case "long dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so ${slave.slaveName} has been given a standard length dildo for her pussy.`; slave.vaginalAccessory = "dildo"; } break; case "long, large dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so ${slave.slaveName} has been given a standard length large dildo for her pussy.`; slave.vaginalAccessory = "large dildo"; } break; case "long, huge dildo": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so ${slave.slaveName} has been given a standard length huge dildo for her pussy.`; slave.vaginalAccessory = "huge dildo"; } else { @@ -713,7 +713,7 @@ window.DefaultRules = (function() { if ((rule.aVirginDickAccessory !== undefined) && (rule.aVirginDickAccessory !== "no default setting")) { if ((slave.dickAccessory !== rule.aVirginDickAccessory)) { slave.dickAccessory = rule.aVirginDickAccessory; - if (slave.dickAccessory == "none") + if (slave.dickAccessory === "none") r += `<br>${slave.slaveName} is a virgin and has been instructed not to wear a dick accessory.`; else r += `<br>${slave.slaveName} is a virgin and has been given a ${slave.dickAccessory} accessory for her cock.`; @@ -723,7 +723,7 @@ window.DefaultRules = (function() { if ((rule.dickAccessory !== undefined) && (rule.dickAccessory !== "no default setting")) { if ((slave.dickAccessory !== rule.dickAccessory)) { slave.dickAccessory = rule.dickAccessory; - if (slave.dickAccessory == "none") + if (slave.dickAccessory === "none") r += `<br>${slave.slaveName} has been instructed not to wear a dick accessory.`; else r += `<br>${slave.slaveName} has been given a ${slave.dickAccessory} accessory for her cock.`; @@ -737,7 +737,7 @@ window.DefaultRules = (function() { // apply shoes to slave if ((rule.shoes !== undefined) && (rule.shoes !== "no default setting")) { if ((slave.shoes !== rule.shoes)) { - if ((slave.amp != 1)) { + if ((slave.amp !== 1)) { slave.shoes = rule.shoes; r += `<br>${slave.slaveName}'s shoes have been set to ${slave.shoes}.`; } @@ -754,7 +754,7 @@ window.DefaultRules = (function() { slave.bellyAccessory = "none"; } else { slave.bellyAccessory = rule.bellyAccessory; - if (slave.bellyAccessory == "none") + if (slave.bellyAccessory === "none") r += `<br>${slave.slaveName} has been instructed not to wear a torso accessory.`; else r += `<br>${slave.slaveName} has been given ${slave.bellyAccessory} to wear.`; @@ -798,21 +798,21 @@ window.DefaultRules = (function() { break; case "long plug": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so the anal virgin ${slave.slaveName} has been given a standard length plug for her anus.`; slave.buttplug = "plug"; } break; case "long, large plug": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so the anal virgin ${slave.slaveName} has been given a standard length large plug for her anus.`; slave.buttplug = "large plug"; } break; case "long, huge plug": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so the anal virgin ${slave.slaveName} has been given a standard length huge plug for her anus.`; slave.buttplug = "huge plug"; } else { @@ -855,21 +855,21 @@ window.DefaultRules = (function() { break; case "long plug": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so ${slave.slaveName} has been given a standard length plug for her anus.`; slave.buttplug = "plug"; } break; case "long, large plug": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so ${slave.slaveName} has been given a standard length large plug for her anus.`; slave.buttplug = "large plug"; } break; case "long, huge plug": - if (slave.breedingMark == 1 && V.propOutcome == 1) { + if (slave.breedingMark === 1 && V.propOutcome === 1) { r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so ${slave.slaveName} has been given a standard length huge plug for her anus.`; slave.buttplug = "huge plug"; } else { @@ -1004,68 +1004,68 @@ window.DefaultRules = (function() { function ProcessAssetGrowthDrugs(slave, rule) { // Asset Growth const growth_drugs = new Set(["breast injections", "breast redistributors", "butt injections", "butt redistributors", "hyper breast injections", "hyper butt injections", "hyper penis enhancement", "hyper testicle enhancement", "intensive breast injections", "intensive butt injections", "intensive penis enhancement", "intensive testicle enhancement", "lip atrophiers", "lip injections", "penis atrophiers", "penis enhancement", "testicle atrophiers", "testicle enhancement"]); - if ((slave.drugs == "super fertility drugs" || slave.drugs == "fertility drugs") && isFertile(slave)) { + if ((slave.drugs === "super fertility drugs" || slave.drugs === "fertility drugs") && isFertile(slave)) { r += `<br>${slave.slaveName} is on ${slave.drugs} and will not be considered for drug enhancement until that regime is complete.`; return; - } else if ((rule.growth_boobs == "no default setting" && rule.growth_butt == "no default setting" && rule.growth_lips == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_balls == "no default setting")) { + } else if ((rule.growth_boobs === "no default setting" && rule.growth_butt === "no default setting" && rule.growth_lips === "no default setting" && rule.growth_dick === "no default setting" && rule.growth_dick === "no default setting" && rule.growth_balls === "no default setting")) { return; } if (!rule.hyper_drugs) { // More resource intensive version with prioritizing. let _priorities = []; - if (rule.growth_boobs != "no default setting") { + if (rule.growth_boobs !== "no default setting") { let _priority; if (slave.boobs < rule.growth_boobs) { _priority = {drug: "breast injections", weight: (rule.growth_boobs-slave.boobs)/rule.growth_boobs}; _priorities.push(_priority); - } else if ((slave.boobs > parseInt(rule.growth_boobs)+200) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) { + } else if ((slave.boobs > parseInt(rule.growth_boobs)+200) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) { _priority = { drug: "breast redistributors", weight: (1+((slave.boobs-slave.boobsImplant-slave.boobsMilk-rule.growth_boobs)/rule.growth_boobs)) }; _priorities.push(_priority); } } - if (rule.growth_butt != "no default setting") { + if (rule.growth_butt !== "no default setting") { let _priority; if (slave.butt < rule.growth_butt) { _priority = {drug: "butt injections", weight: (rule.growth_butt-slave.butt)/rule.growth_butt}; _priorities.push(_priority); - } else if ((Math.trunc(slave.butt) > rule.growth_butt) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) { + } else if ((Math.trunc(slave.butt) > rule.growth_butt) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) { _priority = { drug: "butt redistributors", weight: (1+((slave.butt-slave.buttImplant-rule.growth_butt)/rule.growth_butt)) }; _priorities.push(_priority); } } - if (rule.growth_lips != "no default setting") { + if (rule.growth_lips !== "no default setting") { let _priority; if (slave.lips < rule.growth_lips) { _priority = {drug: "lip injections", weight: (rule.growth_lips-slave.lips)/rule.growth_lips}; _priorities.push(_priority); - } else if ((slave.lips > rule.growth_lips) && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) { + } else if ((slave.lips > rule.growth_lips) && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) { _priority = { drug: "lip atrophiers", weight: (1+((slave.lips-slave.lipsImplant-rule.growth_lips)/rule.growth_lips))}; _priorities.push(_priority); } } - if (rule.growth_dick != "no default setting" && slave.dick) { + if (rule.growth_dick !== "no default setting" && slave.dick) { let _priority; if (slave.dick < rule.growth_dick) { _priority = {drug: "penis enhancement", weight: (rule.growth_dick-slave.dick)/rule.growth_dick}; _priorities.push(_priority); - } else if ((slave.dick > rule.growth_dick) && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) { + } else if ((slave.dick > rule.growth_dick) && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) { _priority = { drug: "penis atrophiers", weight: (1+((slave.dick-rule.growth_dick)/rule.growth_dick))}; _priorities.push(_priority); } } - if (rule.growth_balls != "no default setting" && slave.balls) { + if (rule.growth_balls !== "no default setting" && slave.balls) { let _priority; if (slave.balls < rule.growth_balls) { _priority = {drug: "testicle enhancement", weight: (rule.growth_balls-slave.balls)/rule.growth_balls}; _priorities.push(_priority); - } else if ((slave.balls > rule.growth_balls) && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) { + } else if ((slave.balls > rule.growth_balls) && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) { _priority = { drug: "testicle atrophiers", weight: (1+((slave.balls-rule.growth_balls)/rule.growth_balls))}; @@ -1074,10 +1074,10 @@ window.DefaultRules = (function() { } if (_priorities.length > 1) { _priorities = _priorities.sort(function(a, b){if(a.weight > b.weight) return -1; if(a.weight < b.weight) return 1; return 0;}); - if (slave.drugs != _priorities[0].drug) { + if (slave.drugs !== _priorities[0].drug) { slave.drugs = _priorities[0].drug; r += `<br>${slave.slaveName} has been put on `; - if (rule.growth_intensity && slave.drugs != "lip injections" && slave.health > 0) { + if (rule.growth_intensity && slave.drugs !== "lip injections" && slave.health > 0) { slave.drugs = "intensive " + slave.drugs; r += `${slave.drugs}, since she's healthy enough to take them, and `; } else { @@ -1090,10 +1090,10 @@ window.DefaultRules = (function() { } return; } else if (_priorities.length > 0) { - if (slave.drugs != _priorities[0].drug) { + if (slave.drugs !== _priorities[0].drug) { slave.drugs = _priorities[0].drug; r += `<br>${slave.slaveName} has been put on `; - if (rule.growth_intensity && slave.drugs != "lip injections" && slave.health > 0) { + if (rule.growth_intensity && slave.drugs !== "lip injections" && slave.health > 0) { slave.drugs = "intensive " + slave.drugs; r += `${slave.drugs}, since she's healthy enough to take them, and `; } else @@ -1107,91 +1107,91 @@ window.DefaultRules = (function() { return; } } else { - if (rule.growth_boobs != "no default setting") { + if (rule.growth_boobs !== "no default setting") { if (slave.boobs < rule.growth_boobs) { - if (slave.drugs != "hyper breast injections") { + if (slave.drugs !== "hyper breast injections") { slave.drugs = "hyper breast injections"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_butt != "no default setting") { + if (rule.growth_butt !== "no default setting") { if (slave.butt < rule.growth_butt) { - if (slave.drugs != "hyper butt injections") { + if (slave.drugs !== "hyper butt injections") { slave.drugs = "hyper butt injections"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_lips != "no default setting") { + if (rule.growth_lips !== "no default setting") { if (slave.lips < rule.growth_lips) { - if (slave.drugs != "lip injections") { + if (slave.drugs !== "lip injections") { slave.drugs = "lip injections"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_dick != "no default setting" && slave.dick) { + if (rule.growth_dick !== "no default setting" && slave.dick) { if (slave.dick < rule.growth_dick) { - if (slave.drugs != "hyper penis enhancement") { + if (slave.drugs !== "hyper penis enhancement") { slave.drugs = "hyper penis enhancement"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_balls != "no default setting" && slave.balls) { + if (rule.growth_balls !== "no default setting" && slave.balls) { if (slave.balls < rule.growth_balls) { - if (slave.drugs != "hyper testicle enhancement") { + if (slave.drugs !== "hyper testicle enhancement") { slave.drugs = "hyper testicle enhancement"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (V.arcologies[0].FSSlimnessEnthusiastResearch == 1) { - if (rule.growth_boobs != "no default setting") { + if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) { + if (rule.growth_boobs !== "no default setting") { if (slave.boobs-slave.boobsImplant-slave.boobsMilk > parseInt(rule.growth_boobs)+200 && slave.weight < 100) { - if (slave.drugs != "breast redistributors") { + if (slave.drugs !== "breast redistributors") { slave.drugs = "breast redistributors"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_butt != "no default setting") { + if (rule.growth_butt !== "no default setting") { if (Math.trunc(slave.butt-slave.buttImplant) > rule.growth_butt && slave.weight < 100) { - if (slave.drugs != "butt redistributors") { + if (slave.drugs !== "butt redistributors") { slave.drugs = "butt redistributors"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_lips != "no default setting") { + if (rule.growth_lips !== "no default setting") { if (slave.lips-slave.lipsImplant > rule.growth_lips) { - if (slave.drugs != "lip atrophiers") { + if (slave.drugs !== "lip atrophiers") { slave.drugs = "lip atrophiers"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_dick != "no default setting" && slave.dick) { + if (rule.growth_dick !== "no default setting" && slave.dick) { if (slave.dick > rule.growth_dick) { - if (slave.drugs != "penis atrophiers") { + if (slave.drugs !== "penis atrophiers") { slave.drugs = "penis atrophiers"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } return; } } - if (rule.growth_balls != "no default setting" && slave.balls) { + if (rule.growth_balls !== "no default setting" && slave.balls) { if (slave.balls > rule.growth_balls) { - if (slave.drugs != "testicle atrophiers") { + if (slave.drugs !== "testicle atrophiers") { slave.drugs = "testicle atrophiers"; r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`; } @@ -1223,17 +1223,17 @@ window.DefaultRules = (function() { break; case "sag-B-gone": - if (!(slave.boobs > 250 && slave.boobShape != "saggy")) + if (!(slave.boobs > 250 && slave.boobShape !== "saggy")) flag = false; break; case "female hormone injections": - if (!((slave.breedingMark != 1 || V.propOutcome == 0) && (slave.ovaries == 1 || slave.mpreg == 1) && slave.pubertyXX === 0)) + if (!((slave.breedingMark !== 1 || V.propOutcome === 0) && (slave.ovaries === 1 || slave.mpreg === 1) && slave.pubertyXX === 0)) flag = false; break; case "male hormone injections": - if (!((slave.breedingMark != 1 || V.propOutcome == 0) && slave.balls > 0 && slave.pubertyXY === 0)) + if (!((slave.breedingMark !== 1 || V.propOutcome === 0) && slave.balls > 0 && slave.pubertyXY === 0)) flag = false; break; @@ -1288,7 +1288,7 @@ window.DefaultRules = (function() { break; case "super fertility drugs": - if (!(slave.indentureRestrictions < 1 && (slave.breedingMark !== 1 || V.propOutcome == 0))) + if (!(slave.indentureRestrictions < 1 && (slave.breedingMark !== 1 || V.propOutcome === 0))) flag = false; break; @@ -1338,7 +1338,7 @@ window.DefaultRules = (function() { break; case "female hormone injections": - if (!((slave.breedingMark !== 1 || V.propOutcome == 0) && (slave.ovaries === 1 || slave.mpreg === 1) && slave.pubertyXX === 0)) + if (!((slave.breedingMark !== 1 || V.propOutcome === 0) && (slave.ovaries === 1 || slave.mpreg === 1) && slave.pubertyXX === 0)) flag = false; break; @@ -1414,10 +1414,10 @@ window.DefaultRules = (function() { if (rule.diet === "healthy" && slave.diet !== "healthy") { slave.diet = "healthy"; r += `<br>${slave.slaveName} has been assigned to a healthy diet.`; - } else if ((slave.boobs >= 1600) && (slave.muscles > 5) && (slave.diet == "muscle building") && ((rule.muscles == "no default setting") || (rule.muscles === 0))) { + } else if ((slave.boobs >= 1600) && (slave.muscles > 5) && (slave.diet === "muscle building") && ((rule.muscles === "no default setting") || (rule.muscles === 0))) { slave.diet = "healthy"; r += `<br>${slave.slaveName} has huge boobs, but she already has the back muscles to bear them, so she's been assigned to stop working out so hard.`; - } else if ((rule.dietGrowthSupport == 1) && ((slave.drugs == "breast injections") || (slave.drugs == "butt injections")) && (slave.weight <= 95)) { + } else if ((rule.dietGrowthSupport === 1) && ((slave.drugs === "breast injections") || (slave.drugs === "butt injections")) && (slave.weight <= 95)) { if (slave.diet !== "fattening") { slave.diet = "fattening"; r += `<br>${slave.slaveName} is on drugs designed to expand major body parts, so she's been put on a fattening diet to provide her body as much fuel for growth as possible.`; @@ -1435,7 +1435,7 @@ window.DefaultRules = (function() { slave.diet = "fattening"; r += `<br>${slave.slaveName} is too skinny so her diet has been set to fattening.`; } - } else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp != 1)) { + } else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp !== 1)) { if ((slave.muscles >= rule.muscles+8)) { if ((slave.diet !== "slimming")) { slave.diet = "slimming"; @@ -1458,7 +1458,7 @@ window.DefaultRules = (function() { r += `<br>${slave.slaveName} is at the target weight, so her diet has been normalized.`; } } - } else if ((rule.diet == "attractive")) { + } else if ((rule.diet === "attractive")) { if (((slave.weight > 95) || ((slave.weight > 30) && (slave.hips < 2)))) { if ((slave.diet !== "restricted")) { slave.diet = "restricted"; @@ -1469,7 +1469,7 @@ window.DefaultRules = (function() { slave.diet = "fattening"; r += `<br>${slave.slaveName} is too skinny so her diet has been set to fattening.`; } - } else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp != 1)) { + } else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp !== 1)) { if ((slave.muscles >= rule.muscles+8)) { if ((slave.diet !== "slimming")) { slave.diet = "slimming"; @@ -1492,18 +1492,18 @@ window.DefaultRules = (function() { r += `<br>${slave.slaveName} is at the target weight, so her diet has been normalized.`; } } - } else if ((rule.diet == "XX")) { + } else if ((rule.diet === "XX")) { if ((slave.diet !== "XX")) { slave.diet = "XX"; r += `<br>${slave.slaveName} has been put on a diet that favors feminine development.`; } - } else if ((rule.diet == "XY")) { + } else if ((rule.diet === "XY")) { if ((slave.diet !== "XY")) { slave.diet = "XY"; r += `<br>${slave.slaveName} has been put on a diet that favors masculine development.`; } - } else if ((rule.diet == "XXY")) { - if (slave.balls > 0 && (slave.ovaries == 1 || slave.mpreg == 1)) { + } else if ((rule.diet === "XXY")) { + if (slave.balls > 0 && (slave.ovaries === 1 || slave.mpreg === 1)) { if ((slave.diet !== "XXY")) { slave.diet = "XXY"; r += `<br>${slave.slaveName} has been put on a diet that enhances a herm's unique sexuality.`; @@ -1514,12 +1514,12 @@ window.DefaultRules = (function() { r += `<br>${slave.slaveName} has been put on a standard diet since she is not a hermaphrodite.`; } } - } else if ((rule.diet == "cleansing")) { + } else if ((rule.diet === "cleansing")) { if ((slave.diet !== "cleansing") && (slave.health < 90 || slave.chem >= 10)) { slave.diet = "cleansing"; r += `<br>${slave.slaveName} has been put on a diet of cleansers.`; } - } else if ((rule.diet == "fertility")) { + } else if ((rule.diet === "fertility")) { if (canGetPregnant(slave)) { if ((slave.diet !== "fertility")) { slave.diet = "fertility"; @@ -1536,7 +1536,7 @@ window.DefaultRules = (function() { } } } - } else if ((rule.diet == "cum production")) { + } else if ((rule.diet === "cum production")) { if ((slave.balls > 0)) { if ((slave.diet !== "cum production")) { slave.diet = "cum production"; @@ -1550,7 +1550,7 @@ window.DefaultRules = (function() { } } } - } else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp != 1)) { // no diet rule, muscles only + } else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp !== 1)) { // no diet rule, muscles only if ((slave.muscles >= rule.muscles+8)) { if ((slave.diet !== "slimming")) { slave.diet = "slimming"; @@ -1572,7 +1572,7 @@ window.DefaultRules = (function() { if (slave.drugs === "appetite suppressors" && slave.diet !== "restricted") { slave.drugs = "no drugs"; r += `<br>${slave.slaveName} is no longer losing weight, so she's no longer being given appetite suppressors.`; - } else if (slave.diet === "restricted" && V.arcologies[0].FSSlimnessEnthusiastResearch == 1 && (slave.drugs == "no drugs" || slave.drugs == "none")) { + } else if (slave.diet === "restricted" && V.arcologies[0].FSSlimnessEnthusiastResearch === 1 && (slave.drugs === "no drugs" || slave.drugs === "none")) { slave.drugs = "appetite suppressors"; r += `<br>${slave.slaveName} is losing weight so she will be given weight loss pills.`; } @@ -1583,7 +1583,7 @@ window.DefaultRules = (function() { if (slave.curatives !== rule.curatives) { if (rule.curatives === 2) { if (slave.health > 100) { - if ((slave.curatives != 1)) { + if ((slave.curatives !== 1)) { r += `<br>${slave.slaveName} has been put on preventatives, since curatives cannot improve her health further.`; slave.curatives = 1; } @@ -1600,8 +1600,8 @@ window.DefaultRules = (function() { } function ProcessAphrodisiacs(slave, rule) { - if ((rule.aphrodisiacs !== undefined) && (rule.aphrodisiacs != "no default setting")) { - if (slave.aphrodisiacs != rule.aphrodisiacs) { + if ((rule.aphrodisiacs !== undefined) && (rule.aphrodisiacs !== "no default setting")) { + if (slave.aphrodisiacs !== rule.aphrodisiacs) { r += `<br>${slave.slaveName} has been ${rule.aphrodisiacs > 0 ? `put on the proper` : `taken off`} aphrodisiacs.`; slave.aphrodisiacs = rule.aphrodisiacs; } @@ -1618,7 +1618,7 @@ window.DefaultRules = (function() { if (slave.indentureRestrictions >= 2) { slave.hormones = Math.clamp(slave.hormones, -1, 1); } - if (slave.hormones != _oldHormones) { + if (slave.hormones !== _oldHormones) { r += `<br>${slave.slaveName} is a gelding, so she has been put on the appropriate hormonal regime.`; } } @@ -1626,15 +1626,15 @@ window.DefaultRules = (function() { } else if ((slave.balls > 0)) { if ((rule.XY !== undefined) && (rule.XY !== "no default setting")) { if ((slave.hormones !== rule.XY)) { - if ((slave.assignment != "recruit girls")) { - if ((slave.assignment != "be the Wardeness")) { - if ((slave.assignment != "be the Madam")) { + if ((slave.assignment !== "recruit girls")) { + if ((slave.assignment !== "be the Wardeness")) { + if ((slave.assignment !== "be the Madam")) { const _oldHormones = slave.hormones; slave.hormones = rule.XY; if (slave.indentureRestrictions >= 2) { slave.hormones = Math.clamp(slave.hormones, -1, 1); } - if (slave.hormones != _oldHormones) { + if (slave.hormones !== _oldHormones) { r += `<br>${slave.slaveName} is a shemale, so she has been put on the appropriate hormonal regime.`; } } @@ -1654,7 +1654,7 @@ window.DefaultRules = (function() { if (slave.indentureRestrictions >= 2) { slave.hormones = Math.clamp(slave.hormones, -1, 1); } - if (slave.hormones != _oldHormones) { + if (slave.hormones !== _oldHormones) { r += `<br>${slave.slaveName} is a female, so she has been put on the appropriate hormonal regime.`; } } @@ -1662,25 +1662,25 @@ window.DefaultRules = (function() { } function ProcessPregnancyDrugs(slave, rule) { - if (slave.pregKnown == 1 && rule.pregSpeed != "no default setting" && (slave.breedingMark != 1 || V.propOutcome == 0) && slave.indentureRestrictions < 1 && slave.broodmother === 0) { - if (rule.pregSpeed == "slow" && slave.preg < slave.pregData.minLiveBirth) { + if (slave.pregKnown === 1 && rule.pregSpeed !== "no default setting" && (slave.breedingMark !== 1 || V.propOutcome === 0) && slave.indentureRestrictions < 1 && slave.broodmother === 0) { + if (rule.pregSpeed === "slow" && slave.preg < slave.pregData.minLiveBirth) { slave.pregControl = "slow gestation"; r += `<br>${slave.slaveName} is pregnant, so she has been put on the gestation slowing agents.`; - } else if (rule.pregSpeed == "fast" && slave.preg < slave.pregData.minLiveBirth && slave.health > -50) { + } else if (rule.pregSpeed === "fast" && slave.preg < slave.pregData.minLiveBirth && slave.health > -50) { slave.pregControl = "speed up"; r += `<br>${slave.slaveName} is pregnant, so she has been put on rapid gestation agents. CAUTION! Can be dangerous. Clinic supervision is recommended.`; - } else if (rule.pregSpeed == "suppress" && slave.preg >= slave.pregData.minLiveBirth && slave.health > -50) { + } else if (rule.pregSpeed === "suppress" && slave.preg >= slave.pregData.minLiveBirth && slave.health > -50) { slave.pregControl = "labor suppressors"; r += `<br>${slave.slaveName} is ready to birth, so she has been put on labor suppressing agents.`; - } else if (rule.pregSpeed == "stimulate" && slave.preg > slave.pregData.minLiveBirth && slave.health > -50) { + } else if (rule.pregSpeed === "stimulate" && slave.preg > slave.pregData.minLiveBirth && slave.health > -50) { slave.labor = 1; slave.induce = 1; V.birthee = 1; r += `<br>${slave.slaveName} is ready to birth, so her labor has been stimulated.`; - } else if (rule.pregSpeed == "fast" && slave.pregControl == "speed up" && slave.health <= -50) { + } else if (rule.pregSpeed === "fast" && slave.pregControl === "speed up" && slave.health <= -50) { slave.pregControl = "none"; r += `<br>${slave.slaveName} is on rapid gestation agents and dangerously unhealthy, so her agent regimen has been stopped.`; - } else if (rule.pregSpeed == "suppress" && slave.pregControl == "labor suppressors" && slave.health <= -50) { + } else if (rule.pregSpeed === "suppress" && slave.pregControl === "labor suppressors" && slave.health <= -50) { slave.pregControl = "none"; r += `<br>${slave.slaveName} is on labor suppression agents and unhealthy, so her agent regimen has been stopped.`; } @@ -1691,9 +1691,9 @@ window.DefaultRules = (function() { if ((rule.livingRules !== undefined) && (rule.livingRules !== "no default setting")) { if (setup.facilityCareers.includes(slave.assignment)) { r += ``; // `<br>${slave.slaveName}'s living standards are controlled by her assignment.`; - } else if (((slave.assignment == "be your Head Girl") && (V.HGSuite == 1)) || ((slave.assignment == "guard you") && (V.dojo > 1))) { + } else if (((slave.assignment === "be your Head Girl") && (V.HGSuite === 1)) || ((slave.assignment === "guard you") && (V.dojo > 1))) { r += `<br>${slave.slaveName} has a private room.`; - } else if ((slave.fetish == "mindbroken")) { + } else if ((slave.fetish === "mindbroken")) { if ((slave.livingRules !== "spare")) { slave.livingRules = "spare"; r += `<br>Since ${slave.slaveName} is mindbroken her living standard has been set to spare.`; @@ -1721,12 +1721,12 @@ window.DefaultRules = (function() { function ProcessSpeech(slave, rule) { if ((rule.speechRules !== undefined) && (rule.speechRules !== "no default setting")) { - if (slave.fetish == "mindbroken") { + if (slave.fetish === "mindbroken") { if ((slave.speechRules !== "restrictive")) { slave.speechRules = "restrictive"; r += `<br>Since ${slave.slaveName} is mindbroken her speech rules have been set to restrictive.`; } - } else if (slave.accent == 4) { + } else if (slave.accent === 4) { if (rule.speechRules === "accent elimination" && slave.speechRules !== "language lessons") { slave.speechRules = "language lessons"; r += `<br>Since ${slave.slaveName} does not know how to talk, her speech rules have been set to language learning.`; @@ -1768,7 +1768,7 @@ window.DefaultRules = (function() { _release = 1; else _release = 1; - if ((slave.fetish == "mindbroken") && (slave.releaseRules !== "permissive")) { + if ((slave.fetish === "mindbroken") && (slave.releaseRules !== "permissive")) { slave.releaseRules = "permissive"; r += `<br>Since ${slave.slaveName} is mindbroken her masturbation rules have been set to permissive.`; } else if ((slave.amp === 1 || slave.fuckdoll > 0) && (slave.releaseRules === "masturbation")) { @@ -1834,13 +1834,13 @@ window.DefaultRules = (function() { function ProcessDietCum(slave, rule) { if ((rule.dietCum !== undefined) && (rule.dietCum !== "no default setting")) { - if (slave.dietCum != rule.dietCum) { + if (slave.dietCum !== rule.dietCum) { slave.dietCum = rule.dietCum; - if (slave.dietCum == 2) { + if (slave.dietCum === 2) { r += `<br>${slave.slaveName} has been put on a diet based on cum.`; slave.dietMilk = 0; } - if (slave.dietCum == 1) + if (slave.dietCum === 1) r += `<br>${slave.slaveName} has had cum added to her diet.`; else r += `<br>${slave.slaveName} has had cum removed from her diet.`; @@ -1850,13 +1850,13 @@ window.DefaultRules = (function() { function ProcessDietMilk(slave, rule) { if ((rule.dietMilk !== undefined) && (rule.dietMilk !== "no default setting")) { - if (slave.dietMilk != rule.dietMilk) { + if (slave.dietMilk !== rule.dietMilk) { slave.dietMilk = rule.dietMilk; - if (slave.dietMilk == 2) { + if (slave.dietMilk === 2) { r += `<br>${slave.slaveName} has been put on a diet based on human milk.`; slave.dietCum = 0; } - if (slave.dietMilk == 1) + if (slave.dietMilk === 1) r += `<br>${slave.slaveName} has had human milk added to her diet.`; else r += `<br>${slave.slaveName} has had human milk removed from her diet.`; @@ -1868,7 +1868,7 @@ window.DefaultRules = (function() { if ((rule.onDiet !== undefined) && (rule.onDiet !== "no default setting")) { if ((slave.onDiet !== rule.onDiet)) { slave.onDiet = rule.onDiet ; - if (slave.onDiet == 1) + if (slave.onDiet === 1) r += `<br>${slave.slaveName} is not permitted to eat the solid slave food.`; else r += `<br>${slave.slaveName} is permitted to eat the solid slave food.`; @@ -1878,38 +1878,38 @@ window.DefaultRules = (function() { function ProcessTeeth(slave, rule) { if ((rule.teeth !== undefined) && (rule.teeth !== "no default setting")) { - if ((rule.teeth == "universal")) { - if ((slave.teeth == "crooked")) { + if ((rule.teeth === "universal")) { + if ((slave.teeth === "crooked")) { slave.teeth = "straightening braces"; cashX(forceNeg(V.modCost), "slaveSurgery", slave); r += `<br>${slave.slaveName} has been given braces for her crooked teeth.`; - } else if (slave.teeth == "gapped") { + } else if (slave.teeth === "gapped") { slave.teeth = "straightening braces"; cashX(forceNeg(V.modCost), "slaveSurgery", slave); r += `<br>${slave.slaveName} has been given braces to close the gap in her teeth.`; - } else if ((slave.teeth == "normal")) { + } else if ((slave.teeth === "normal")) { slave.teeth = "cosmetic braces"; cashX(forceNeg(V.modCost), "slaveSurgery", slave); r += `<br>${slave.slaveName} has been given cosmetic braces.`; } - } else if ((rule.teeth == "straighten")) { - if ((slave.teeth == "crooked")) { + } else if ((rule.teeth === "straighten")) { + if ((slave.teeth === "crooked")) { slave.teeth = "straightening braces"; cashX(forceNeg(V.modCost), "slaveSurgery", slave); r += `<br>${slave.slaveName} has been given braces for her crooked teeth.`; - } else if (slave.teeth == "gapped") { + } else if (slave.teeth === "gapped") { slave.teeth = "straightening braces"; cashX(forceNeg(V.modCost), "slaveSurgery", slave); r += `<br>${slave.slaveName} has been given braces to close the gap in her teeth.`; - } else if ((slave.teeth == "cosmetic braces")) { + } else if ((slave.teeth === "cosmetic braces")) { slave.teeth = "normal"; r += `<br>${slave.slaveName} has gotten her braces off, since her teeth are straight.`; } - } else if ((rule.teeth == "none")) { - if ((slave.teeth == "straightening braces")) { + } else if ((rule.teeth === "none")) { + if ((slave.teeth === "straightening braces")) { slave.teeth = "crooked"; r += `<br>${slave.slaveName} has gotten her braces off.`; - } else if ((slave.teeth == "cosmetic braces")) { + } else if ((slave.teeth === "cosmetic braces")) { slave.teeth = "normal"; r += `<br>${slave.slaveName} has gotten her braces off.`; } @@ -1934,7 +1934,7 @@ window.DefaultRules = (function() { } } - if ((slave.amp != 1)) { + if ((slave.amp !== 1)) { if (rule.nails !== undefined && (rule.nails !== "no default setting")) { if ((slave.nails !== rule.nails)) { slave.nails = rule.nails; @@ -1945,7 +1945,7 @@ window.DefaultRules = (function() { } if (rule.hColor !== undefined && (rule.hColor !== "no default setting")) { - if (slave.bald != 1) { + if (slave.bald !== 1) { if ((slave.hColor !== rule.hColor)) { slave.hColor = rule.hColor; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -1955,11 +1955,11 @@ window.DefaultRules = (function() { } if (rule.hStyle !== undefined && (rule.hStyle !== "no default setting")) { - if (slave.bald != 1) { + if (slave.bald !== 1) { if ((slave.hStyle !== rule.hStyle)) { slave.hStyle = rule.hStyle; cashX(forceNeg(V.modCost), "slaveMod", slave); - if ((rule.hStyle == "shaved")) { + if ((rule.hStyle === "shaved")) { slave.hLength = 0; r += `<br>${slave.slaveName}'s hair has been shaved.`; } else @@ -1969,7 +1969,7 @@ window.DefaultRules = (function() { } if (rule.hLength !== undefined && (rule.hLength !== "no default setting")) { - if (slave.bald != 1) { + if (slave.bald !== 1) { if ((slave.hLength !== rule.hLength)) { if ((slave.hLength > rule.hLength)) { cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -1985,7 +1985,7 @@ window.DefaultRules = (function() { } if (rule.haircuts !== undefined && (rule.haircuts !== "no default setting")) { - if (slave.bald != 1) { + if (slave.bald !== 1) { if (rule.haircuts === 1 && slave.haircuts !== 1) { r += `<br>${slave.slaveName}'s hair will now be maintained at ${lengthToEitherUnit(slave.hLength)} long.`; slave.haircuts = 1; @@ -1997,7 +1997,7 @@ window.DefaultRules = (function() { } if (rule.eyebrowHColor !== undefined && (rule.eyebrowHColor !== "no default setting")) { - if (slave.eyebrowHStyle != "bald" && slave.eyebrowHStyle != "hairless") { + if (slave.eyebrowHStyle !== "bald" && slave.eyebrowHStyle !== "hairless") { if ((slave.eyebrowHColor !== rule.eyebrowHColor)) { slave.eyebrowHColor = rule.eyebrowHColor; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2007,7 +2007,7 @@ window.DefaultRules = (function() { } if (rule.eyebrowHStyle !== undefined && (rule.eyebrowHStyle !== "no default setting")) { - if (slave.eyebrowHStyle != "bald" && slave.eyebrowHStyle != "hairless") { + if (slave.eyebrowHStyle !== "bald" && slave.eyebrowHStyle !== "hairless") { if ((slave.eyebrowHStyle !== rule.eyebrowHStyle)) { slave.eyebrowHStyle = rule.eyebrowHStyle; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2017,7 +2017,7 @@ window.DefaultRules = (function() { } if (rule.eyebrowFullness !== undefined && (rule.eyebrowFullness !== "no default setting")) { - if (slave.eyebrowHStyle != "bald" && slave.eyebrowHStyle != "hairless") { + if (slave.eyebrowHStyle !== "bald" && slave.eyebrowHStyle !== "hairless") { if ((slave.eyebrowFullness !== rule.eyebrowFullness)) { slave.eyebrowFullness = rule.eyebrowFullness; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2027,7 +2027,7 @@ window.DefaultRules = (function() { } if (rule.pubicHColor !== undefined && (rule.pubicHColor !== "no default setting")) { - if (slave.pubicHStyle != "bald" && slave.pubicHStyle != "hairless") { + if (slave.pubicHStyle !== "bald" && slave.pubicHStyle !== "hairless") { if ((slave.pubicHColor !== rule.pubicHColor)) { slave.pubicHColor = rule.pubicHColor; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2037,7 +2037,7 @@ window.DefaultRules = (function() { } if (rule.pubicHStyle !== undefined && (rule.pubicHStyle !== "no default setting")) { - if (slave.pubicHStyle != "bald" && slave.pubicHStyle != "hairless") { + if (slave.pubicHStyle !== "bald" && slave.pubicHStyle !== "hairless") { if ((slave.pubicHStyle !== rule.pubicHStyle)) { slave.pubicHStyle = rule.pubicHStyle; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2047,7 +2047,7 @@ window.DefaultRules = (function() { } if (rule.underArmHColor !== undefined && (rule.underArmHColor !== "no default setting")) { - if (slave.underArmHStyle != "bald" && slave.underArmHStyle != "hairless") { + if (slave.underArmHStyle !== "bald" && slave.underArmHStyle !== "hairless") { if ((slave.underArmHColor !== rule.underArmHColor)) { slave.underArmHColor = rule.underArmHColor; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2057,7 +2057,7 @@ window.DefaultRules = (function() { } if (rule.underArmHStyle !== undefined && (rule.underArmHStyle !== "no default setting")) { - if (slave.underArmHStyle != "bald" && slave.underArmHStyle != "hairless") { + if (slave.underArmHStyle !== "bald" && slave.underArmHStyle !== "hairless") { if ((slave.underArmHStyle !== rule.underArmHStyle)) { slave.underArmHStyle = rule.underArmHStyle; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2067,7 +2067,7 @@ window.DefaultRules = (function() { } if (rule.eyebrowHColor !== undefined && (rule.eyebrowHColor !== "no default setting")) { - if (slave.eyebrowHStyle != "bald") { + if (slave.eyebrowHStyle !== "bald") { if ((slave.eyebrowHColor !== rule.eyebrowHColor)) { slave.eyebrowHColor = rule.eyebrowHColor; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2077,7 +2077,7 @@ window.DefaultRules = (function() { } if (rule.eyebrowHStyle !== undefined && (rule.eyebrowHStyle !== "no default setting")) { - if (slave.eyebrowHStyle != "bald") { + if (slave.eyebrowHStyle !== "bald") { if ((slave.eyebrowHStyle !== rule.eyebrowHStyle)) { slave.eyebrowHStyle = rule.eyebrowHStyle; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2087,7 +2087,7 @@ window.DefaultRules = (function() { } if (rule.eyebrowFullness !== undefined && (rule.eyebrowFullness !== "no default setting")) { - if (slave.eyebrowHStyle != "bald") { + if (slave.eyebrowHStyle !== "bald") { if ((slave.eyebrowFullness !== rule.eyebrowFullness)) { slave.eyebrowFullness = rule.eyebrowFullness; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2140,14 +2140,14 @@ window.DefaultRules = (function() { else r += `<br>${slave.slaveName}'s clit piercing has been removed.`; - } else if ((slave.vagina != -1) || (slave.dick !== 0)) { + } else if ((slave.vagina !== -1) || (slave.dick !== 0)) { slave.clitPiercing = rule.clitPiercing; if (slave.dick > 0) r += `<br>${slave.slaveName}'s frenulum has been pierced.`; else r += `<br>${slave.slaveName}'s clit has been pierced.`; - if (rule.clitPiercing == 3) + if (rule.clitPiercing === 3) cashX(-1000, "slaveMod"); else cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -2155,7 +2155,7 @@ window.DefaultRules = (function() { } } - if ((slave.vagina != -1)) { + if ((slave.vagina !== -1)) { if (rule.vaginaPiercing !== undefined && (rule.vaginaPiercing !== "no default setting")) { if ((slave.vaginaPiercing !== rule.vaginaPiercing)) { if ((rule.vaginaPiercing === 0)) { @@ -2291,7 +2291,7 @@ window.DefaultRules = (function() { } function ProcessSmartPiercings(slave, rule) { - if ((slave.clitPiercing == 3)) { + if ((slave.clitPiercing === 3)) { let _used = 0; if (rule.clitSetting !== undefined && (rule.clitSetting !== "no default setting")) { if (slave.clitSetting !== rule.clitSetting) { @@ -2438,7 +2438,7 @@ window.DefaultRules = (function() { r += `<br>${slave.slaveName}'s lower back has been tattooed.`; } } - if ((rule.autoBrand == 1)) { + if ((rule.autoBrand === 1)) { if ((slave.brand === 0)) { if ((slave.health > -20)) { slave.brand = V.brandDesign; @@ -2462,7 +2462,7 @@ window.DefaultRules = (function() { } slave.pornFeed = rule.pornFeed; let yesno = slave.pornFeed ? "are now" : "are no longer"; - if (slave.pornFeed === 0) {slave.pornFameSpending = 0}; + if (slave.pornFeed === 0) { slave.pornFameSpending = 0;} r += `<br>Highlights of ${slave.slaveName}'s sex life ${yesno} being released.`; } diff --git a/src/js/PenthouseNaming.js b/src/js/PenthouseNaming.js index 0bf340af6ff9896b7d2a0a1c9b16b9428891c09f..bd4a1f0d02694a431adf00a01d0e50f997389647 100644 --- a/src/js/PenthouseNaming.js +++ b/src/js/PenthouseNaming.js @@ -1,27 +1,30 @@ -window.MasterSuiteUIName = function() { +window.MasterSuiteUIName = function () { const V = State.variables; var name = ""; if (V.masterSuiteNameCaps === "The Master Suite") - name = "Master Suite" + name = "Master Suite"; else name = V.masterSuiteNameCaps; - return `<<link "${name}""Master Suite">><</link>> `} -window.HeadGirlSuiteUIName = function() { + return `<<link "${name}""Master Suite">><</link>> `; +}; +window.HeadGirlSuiteUIName = function () { const V = State.variables; var name = ""; if (V.HGSuiteNameCaps === "The Head Girl Suite") - name = "Head Girl Suite" + name = "Head Girl Suite"; else name = V.HGSuiteNameCaps; - return `<<link "${name}""Head Girl Suite">><</link>> `} -window.ServantQuartersUIName = function() { + return `<<link "${name}""Head Girl Suite">><</link>> `; +}; +window.ServantQuartersUIName = function () { const V = State.variables; var name = ""; if (V.servantsQuartersNameCaps === "The Servants' Quarters") - name = "Servants' Quarters" + name = "Servants' Quarters"; else name = V.servantsQuartersNameCaps; - return `<<link "${name}""Servants' Quarters">><</link>> `} + return `<<link "${name}""Servants' Quarters">><</link>> `; +}; window.SpaUIName = function() { const V = State.variables; var name = ""; @@ -30,43 +33,48 @@ window.SpaUIName = function() { else name = V.spaNameCaps; return `<<link "${name}""Spa">><</link>> `} -window.NurseryUIName = function() { +window.NurseryUIName = function () { const V = State.variables; var name = ""; if (V.nurseryNameCaps === "The Nursery") - name = "Nursery" + name = "Nursery"; else name = V.nurseryNameCaps; - return `<<link "${name}""Nursery">><</link>> `} -window.ClinicUIName = function() { + return `<<link "${name}""Nursery">><</link>> `; +}; +window.ClinicUIName = function () { const V = State.variables; var name = ""; if (V.clinicNameCaps === "The Clinic") - name = "Clinic" + name = "Clinic"; else name = V.clinicNameCaps; - return `<<link "${name}""Clinic">><</link>> `} -window.SchoolRoomUIName = function() { + return `<<link "${name}""Clinic">><</link>> `; +}; +window.SchoolRoomUIName = function () { const V = State.variables; var name = ""; if (V.schoolroomNameCaps === "The Schoolroom") - name = "Schoolroom" + name = "Schoolroom"; else name = V.schoolroomNameCaps; - return `<<link "${name}""Schoolroom">><</link>> `} -window.CellblockUIName = function() { + return `<<link "${name}""Schoolroom">><</link>> `; +}; +window.CellblockUIName = function () { const V = State.variables; var name = ""; if (V.cellblockNameCaps === "The Cellblock") - name = "Cellblock" + name = "Cellblock"; else name = V.cellblockNameCaps; - return `<<link "${name}""Cellblock">><</link>> `} -window.IncubatorUIName = function() { + return `<<link "${name}""Cellblock">><</link>> `; +}; +window.IncubatorUIName = function () { const V = State.variables; var name = ""; if (V.incubatorNameCaps === "The Incubator") - name = "Incubator" + name = "Incubator"; else name = V.incubatorNameCaps; - return `<<link "${name}""Incubator">><</link>> `} \ No newline at end of file + return `<<link "${name}""Incubator">><</link>> `; +}; diff --git a/src/js/SetBellySize.js b/src/js/SetBellySize.js index 7cf564990b3452caffb93f5c197c19aafe8a5392..6b9cc142ca3a00412b617c93d04cb89f31f16376 100644 --- a/src/js/SetBellySize.js +++ b/src/js/SetBellySize.js @@ -7,11 +7,11 @@ window.SetBellySize = function SetBellySize(slave) { else _implantSize = 0; - if (slave.inflation == 3) + if (slave.inflation === 3) slave.bellyFluid = 10000; - else if (slave.inflation == 2) + else if (slave.inflation === 2) slave.bellyFluid = 5000; - else if (slave.inflation == 1) + else if (slave.inflation === 1) slave.bellyFluid = 2000; else slave.bellyFluid = 0; diff --git a/src/js/accordianJS.js b/src/js/accordianJS.js index 8946465faa6decdb6b0cd108f738e9244cd2a8b7..622a41c09b24c0bf0150731990e481fe3e3c1ff8 100644 --- a/src/js/accordianJS.js +++ b/src/js/accordianJS.js @@ -16,11 +16,11 @@ postdisplay["doAccordionSet"] = function (content) { if (variables().useAccordion == 1) { Array.prototype.slice.call(document.querySelectorAll('.macro-include')) - .forEach(function(element) { - element.classList.add('accHidden'); - }); + .forEach(function (element) { + element.classList.add('accHidden'); + }); } -} +}; postdisplay["doAccordion"] = function (content) { var acc = document.getElementsByClassName("accordion"); @@ -33,7 +33,7 @@ postdisplay["doAccordion"] = function (content) { if (panel.style.maxHeight) { panel.style.maxHeight = null; } else { - panel.style.maxHeight = 2*panel.scrollHeight + "px"; + panel.style.maxHeight = 2 * panel.scrollHeight + "px"; } }; } diff --git a/src/js/assayJS.js b/src/js/assayJS.js index fc2f810f07ffe397915d10b337bf68fcc23d9255..85d8cfd6d7167edba517ca24985c56c5f024564f 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -246,7 +246,7 @@ window.properMaster = function properMaster() { window.newSlave = function newSlave(slave) { const V = State.variables; - if (slave.override_Eye_Color != 1) { + if (slave.override_Eye_Color !== 1) { switch (slave.eyeColor) { case "blind blue": slave.origEye = "deep blue"; @@ -261,22 +261,22 @@ window.newSlave = function newSlave(slave) { } } - if (slave.override_Race != 1) { + if (slave.override_Race !== 1) { slave.origRace = slave.race; } - if (slave.override_H_Color != 1) { + if (slave.override_H_Color !== 1) { slave.origHColor = slave.hColor; } - if (slave.override_Arm_H_Color != 1) { + if (slave.override_Arm_H_Color !== 1) { slave.underArmHColor = slave.hColor; } - if (slave.override_Pubic_H_Color != 1) { + if (slave.override_Pubic_H_Color !== 1) { slave.pubicHColor = slave.hColor; } - if (slave.override_Brow_H_Color != 1) { + if (slave.override_Brow_H_Color !== 1) { slave.eyebrowHColor = slave.hColor; } - if (slave.override_Skin != 1) { + if (slave.override_Skin !== 1) { slave.origSkin = slave.skin; } @@ -377,7 +377,7 @@ window.newChild = function newChild(child) { child.age = 0; /* not sure if this is the correct way to do this or if more is required */ child.birthWeek = 0; /* Child comes out at 0,0. That's all that's needed. The specifics are defined later.*/ - if (child.override_Eye_Color != 1) { + if (child.override_Eye_Color !== 1) { switch (child.eyeColor) { case "blind blue": child.origEye = "deep blue"; @@ -392,22 +392,22 @@ window.newChild = function newChild(child) { } } - if (child.override_Race != 1) { + if (child.override_Race !== 1) { child.origRace = child.race; } - if (child.override_H_Color != 1) { + if (child.override_H_Color !== 1) { child.origHColor = child.hColor; } - if (child.override_Arm_H_Color != 1) { + if (child.override_Arm_H_Color !== 1) { child.underArmHColor = child.hColor; } - if (child.override_Pubic_H_Color != 1) { + if (child.override_Pubic_H_Color !== 1) { child.pubicHColor = child.hColor; } - if (child.override_Brow_H_Color != 1) { + if (child.override_Brow_H_Color !== 1) { child.eyebrowHColor = child.hColor; } - if (child.override_Skin != 1) { + if (child.override_Skin !== 1) { child.origSkin = child.skin; } @@ -477,7 +477,7 @@ window.getSlave = function getSlave(ID) { else return State.variables.slaves[index]; }; window.getChild = function getChild(ID) { - return V.cribs.find(function(s) { return s.ID == ID; }); + return V.cribs.find(function(s) { return s.ID === ID; }); }; window.getPronouns = function getPronouns(slave) { return { @@ -2052,7 +2052,7 @@ window.SlaveSort = function SlaveSort(slaves, main=false) { window.slaveSortMinor = function slaveSortMinor(slaves) { slaves = slaves.sort((a, b) => a.slaveName < b.slaveName ? -1 : 1); -} +}; window.MenialPopCap = function MenialPopCap () { const V = State.variables; @@ -2260,7 +2260,7 @@ window.Deadliness = function Deadliness(slave) { if (!canHear(slave)) { deadliness -= 4; - } else if ((slave.hears == -1 && slave.earwear !== "hearing aids") || (slave.hears == 0 && slave.earwear === "muffling ear plugs")) { + } else if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs")) { deadliness -= 1; } diff --git a/src/js/assignJS.js b/src/js/assignJS.js index dd58152a1d5cebed72bd73fe9876a4e2e911f4cb..77f89fbbee078531dfdded588ac28f699f570eb9 100644 --- a/src/js/assignJS.js +++ b/src/js/assignJS.js @@ -276,7 +276,7 @@ window.assignJob = function assignJob(slave, job) { if (V.dojo > 1) { slave.livingRules = "luxurious"; } - if (V.pitBG == 1 && V.fighterIDs.includes(slave.ID)) + if (V.pitBG === 1 && V.fighterIDs.includes(slave.ID)) V.fighterIDs.delete(slave.ID); break; @@ -302,7 +302,7 @@ window.assignJob = function assignJob(slave, job) { if (slave.assignmentVisible === 0 && Array.isArray(V.personalAttention)) { const awi = V.personalAttention.findIndex(function(s) { return s.ID === slave.ID; }); - if (awi != -1) { + if (awi !== -1) { V.personalAttention.deleteAt(awi); if (V.personalAttention.length === 0) { if (V.PC.career === "escort") @@ -515,4 +515,4 @@ window.removeJob = function removeJob(slave, assignment) { V.slaves[idx] = slave; return r; -}; \ No newline at end of file +}; diff --git a/src/js/birthJS.js b/src/js/birthJS.js index 02170a841ea9bd0a407d5f69d7aedff738b61627..691204ee9498f8e0158602f7d2cfebc08131f1a1 100644 --- a/src/js/birthJS.js +++ b/src/js/birthJS.js @@ -13,7 +13,7 @@ window.BirthDestinationText = function(choice,slave) { if (T.call !== 1) r += `future minded schools, to be administered fertility and virility treatments as well as be brought up to take pride in reproduction.`; if (slave.burst > 0) r += ` Hopefully there they will be trained to not suffer the same fate.`; r += ` ${sn} `; - if (slave.fetish == "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { + if (slave.fetish === "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { r += `has few thoughts about the matter.`; } if (V.slave.burst < 1) { @@ -52,7 +52,7 @@ window.BirthDestinationText = function(choice,slave) { break; case "Citizen": if (T.call !== 1) r += `citizen schools, to be brought up coequal with the arcology's other young people. ${sn} `; - if (slave.fetish == "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { + if (slave.fetish === "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { r += `has few thoughts about the matter.`; } if (V.slave.burst < 1) { @@ -69,7 +69,7 @@ window.BirthDestinationText = function(choice,slave) { break; case "Private": if (T.call !== 1) r += `${T.count > 1 ? 'ren are':' is'} sent to be privately raised, to be brought up as a future high class citizen. ${sn} `; - if (slave.fetish == "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { + if (slave.fetish === "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { r += `has few thoughts about the matter.`; } if (V.slave.burst < 1) { @@ -99,7 +99,7 @@ window.BirthDestinationText = function(choice,slave) { const cash = cashFormat(T.count*(50+T.babyCost));r += ` <span class='yellowgreen'>${cash}.</span>`; if (slave.prematureBirth > 0) r += ` A low price due to the added costs of caring for ${T.count > 1 ? 'them':'it'}.`; r += ` ${sn} `; - if (slave.fetish == "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { + if (slave.fetish === "mindbroken" || slave.fuckdoll > 0 || slave.burst > 0) { r += `has few thoughts about the matter.`; } if (V.slave.burst < 1) { @@ -120,4 +120,4 @@ window.BirthDestinationText = function(choice,slave) { break; } return r; -}; \ No newline at end of file +}; diff --git a/src/js/colorModeJS.js b/src/js/colorModeJS.js index f5b61a7b863209187ad0c80e00beeb610cfb5528..a18e3231016867970de95ffc71daf44284514ddb 100644 --- a/src/js/colorModeJS.js +++ b/src/js/colorModeJS.js @@ -1,28 +1,28 @@ -window.flipColors = function (lightColorMap){ - if ( !window.savedColorMap ){ +window.flipColors = function (lightColorMap) { + if (!window.savedColorMap) { window.savedColorMap = setColors(lightColorMap); } else { restoreColors(window.savedColorMap); window.savedColorMap = null; } -} +}; -window.setColors = function(colorMap){ +window.setColors = function (colorMap) { let originalState = []; - let props = ["color","backgroundColor","backgroundImage"]; + let props = ["color", "backgroundColor", "backgroundImage"]; let styleSheetArray = Array.from(document.styleSheets); - styleSheetArray.forEach( styleSheet => { + styleSheetArray.forEach(styleSheet => { let cssRules = Array.from(styleSheet.cssRules); - cssRules.forEach( cssRule => { - if ( cssRule.type === 1 ){ - props.forEach( propName => { + cssRules.forEach(cssRule => { + if (cssRule.type === 1) { + props.forEach(propName => { let currentValue = cssRule.style[propName]; if ( - currentValue != "" && - currentValue != "inherit" && - currentValue != "transparent"){ + currentValue !== "" && + currentValue !== "inherit" && + currentValue !== "transparent") { let newVal = colorMap[currentValue]; - if ( typeof newVal != "undefined" ){ + if (typeof newVal !== "undefined") { cssRule.style[propName] = newVal; originalState.push( { @@ -33,17 +33,17 @@ window.setColors = function(colorMap){ ); } } - }) + }); } }); }); return originalState; -} +}; window.restoreColors = function(styleMap){ styleMap.forEach( item => { - item.element.style[item.propName] = item.value + item.element.style[item.propName] = item.value; } - ) -} + ); +}; diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 233cd43cce8a562a3540048a125450434b780e27..fa9fa3b048dfdf5d4ebedeb90cc9d3c4ff001ec2 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -449,7 +449,7 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() { function slaveRelationDatatypeCleanup(slave) { slave.mother = +slave.mother || 0; slave.father = +slave.father || 0; - if (V.familyTesting == 0) { + if (V.familyTesting === 0) { slave.relationTarget = Math.max(+slave.relationTarget, 0) || 0; } slave.canRecruit = Math.clamp(+slave.canRecruit, 0, 1) || 0; @@ -1009,7 +1009,7 @@ window.childPornDatatypeCleanup = function childPornDatatypeCleanup(child) { window.childRelationDatatypeCleanup = function childRelationDatatypeCleanup(child) { child.mother = +child.mother || 0; child.father = +child.father || 0; - if (State.variables.familyTesting == 0) { + if (State.variables.familyTesting === 0) { child.relationTarget = Math.max(+child.relationTarget, 0) || 0; } child.canRecruit = Math.clamp(+child.canRecruit, 0, 1) || 0; @@ -1219,7 +1219,7 @@ window.EconomyDatatypeCleanup = function EconomyDatatypeCleanup() { V.AProsperityCap = Math.max(+V.AProsperityCap, 0) || 0; V.arcologies[0].ownership = Math.clamp(+V.arcologies[0].ownership, 0, 100) || 0; V.arcologies[0].minority = Math.clamp(+V.arcologies[0].minority, 0, 100) || 0; - + V.food = Math.max(+V.food, 0) || 0; V.economy = Math.max(+V.economy, 20) || 100; @@ -1301,10 +1301,10 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { V.shelterAbuse = Math.max(+V.shelterAbuse, 0) || 0; V.assistant = Math.clamp(+V.assistant, 0, 1) || 0; - if (typeof V.assistantPronouns != "object") { + if (typeof V.assistantPronouns !== "object") { V.assistantPronouns = {}; } - if (typeof V.marketAssistantPronouns != "object") { + if (typeof V.marketAssistantPronouns !== "object") { V.marketAssistantPronouns = {}; } generateAssistantPronouns(); diff --git a/src/js/economyJS.js b/src/js/economyJS.js index b9339bb6389e1f2e6063646d52280f4aec045e1e..f662f77e96d723201bbb1b67e2c62819c52c675c 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -11,7 +11,7 @@ window.PersonalAttention = Object.freeze({TRADE: 'trading', WAR: 'warfare', SLAV window.predictCost = function(array) { var array2 = array; - var totalCosts = ( + var totalCosts = ( getBrothelCosts() + getBrothelAdsCosts() + getArcadeCosts() + @@ -43,10 +43,10 @@ window.predictCost = function(array) { //these two apply a multiplicative effect to all costs so far. totalCosts = getEnvironmentCosts(totalCosts); totalCosts = getPCMultiplierCosts(totalCosts); - + //in the old order these were applied after multiplication. Not sure if deliberate, but I'm leaving it for now. totalCosts += ( - getSFCosts() + + getSFCosts() + getWeatherCosts() ); /* @@ -90,8 +90,8 @@ window.getCost = function(array) { cashX(forceNeg(getPCTrainingCosts()), "PCtraining"); cashX(forceNeg(getPCCosts()), "PCmedical"); getTotalSlaveCosts(array2); - - + + //these two apply a multiplicative effect to all costs so far. // Calculate what the deduced expenses would be, then subtract costSoFar = (oldCash - State.variables.cash); //How much we have spent by this point; expected to be positive. @@ -108,7 +108,7 @@ window.getCost = function(array) { //slave expenses window.predictTotalSlaveCosts = function(array3) { - var loopCosts = 0; + var loopCosts = 0; //slave expenses for (var slave of array3) { loopCosts += getSlaveCost(slave); @@ -140,7 +140,7 @@ window.getBrothelCosts = function() { window.getBrothelAdsCosts = function() { var brothel = State.variables.brothel; - var costs = 0 + var costs = 0; if(brothel > 0) { costs += State.variables.brothelAdsSpending; } @@ -211,7 +211,7 @@ window.getServantsQuartersCosts = function() { }; window.getMasterSuiteCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.masterSuitePregnancySlaveLuxuries === 1) { costs += 500; } @@ -239,7 +239,7 @@ window.getSecurityExpansionCost = function() { //security expansion var secExpCost = 0; var soldierMod = 0; - if(State.variables.secExp == 1) { + if(State.variables.secExp === 1) { if(State.variables.edictsUpkeep > 0) { secExpCost += State.variables.edictsUpkeep; } @@ -258,10 +258,10 @@ window.getSecurityExpansionCost = function() { if(State.variables.riotCenter > 0) { secExpCost += State.variables.riotUpkeep; } - if(State.variables.soldierWages == 0) { + if(State.variables.soldierWages === 0) { soldierMod = 1; } - else if(State.variables.soldierWages == 1) { + else if(State.variables.soldierWages === 1) { soldierMod = 1.5; } else { @@ -304,20 +304,20 @@ window.getLifestyleCosts = function() { window.getFSCosts = function() { var costs = 0; costs += State.variables.FSSpending; - if(State.variables.arcologies[0].FSRepopulationFocusLaw === 1 && State.variables.PC.pregKnown == 1) { + if(State.variables.arcologies[0].FSRepopulationFocusLaw === 1 && State.variables.PC.pregKnown === 1) { costs -= 500; } return costs; }; window.getCitizenOrphanageCosts = function() { - var costs = 0; + var costs = 0; costs += State.variables.citizenOrphanageTotal * 100; return costs; }; window.getPrivateOrphanageCosts = function() { - var costs = 0; + var costs = 0; costs += State.variables.privateOrphanageTotal * 500; if(State.variables.breederOrphanageTotal > 0) { costs += 50; @@ -326,7 +326,7 @@ window.getPrivateOrphanageCosts = function() { }; window.getPeacekeeperCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.peacekeepers !== 0 && State.variables.peacekeepers.undermining !== 0) { costs += State.variables.peacekeepers.undermining; } @@ -349,8 +349,8 @@ window.getMercenariesCosts = function() { }; window.getMenialRetirementCosts = function() { - var costs = 0; - if(State.variables.citizenRetirementMenials == 1) { + var costs = 0; + if(State.variables.citizenRetirementMenials === 1) { costs += State.variables.menials * 2; } return costs; @@ -358,7 +358,7 @@ window.getMenialRetirementCosts = function() { // policy and other expenses window.getRecruiterCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.Recruiter !== 0) { costs += 250; } @@ -366,7 +366,7 @@ window.getRecruiterCosts = function() { }; window.getSchoolCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.TSS.schoolPresent === 1) { costs += 1000; } @@ -445,7 +445,7 @@ window.getPolicyCosts = function() { }; window.getCyberModCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.cyberMod !== 0 && State.variables.researchLab.built === 'true') { costs += ((100 * State.variables.researchLab.maxSpace) + (300 * State.variables.researchLab.hired) + (100 * State.variables.researchLab.hired)); } @@ -455,7 +455,7 @@ window.getCyberModCosts = function() { //player expenses window.getPCTrainingCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.PC.actualAge >= State.variables.IsInPrimePC && State.variables.PC.actualAge < State.variables.IsPastPrimePC) { if(State.variables.personalAttention === PersonalAttention.TRADE) { costs += 10000*State.variables.AgeEffectOnTrainerPricingPC; @@ -474,7 +474,7 @@ window.getPCTrainingCosts = function() { return costs; }; window.getPCCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.PC.preg === -1) { costs += 25; } else if(State.variables.PC.fertDrugs === 1) { @@ -506,7 +506,7 @@ window.getPCMultiplierCosts = function(cost) { }; window.getEnvironmentCosts = function(cost) { - if(State.variables.secExp == 1) { + if(State.variables.secExp === 1) { if(State.variables.terrain === 'oceanic' || State.variables.terrain === 'marine') { if(State.variables.docks > 0) { cost *= (1 - State.variables.docks * 0.05); @@ -519,7 +519,7 @@ window.getEnvironmentCosts = function(cost) { }; window.getSFCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.SF.Toggle && State.variables.SF.Active >= 1) { if(State.variables.SF.Subsidy) { costs += Math.ceil( (10000*(State.variables.SF.Squad.Troops/10))+(1+(State.variables.arcologies[0].prosperity/100))+(1+(State.variables.SF.Size/100)) ); @@ -534,7 +534,7 @@ window.getSFCosts = function() { }; window.getWeatherCosts = function() { - var costs = 0; + var costs = 0; if(State.variables.econWeatherDamage && State.variables.disasterResponse > 0) { costs += Math.trunc(State.variables.disasterResponse * 200000 / State.variables.localEcon); } @@ -605,7 +605,7 @@ window.getSlaveCost = function(s) { case Job.DAIRY: if(State.variables.dairyRestraintsSetting >= 2) { cost += rulesCost * 0.75; - } else if(s.livingRules == LivingRule.NORMAL) { + } else if(s.livingRules === LivingRule.NORMAL) { cost += rulesCost * 1.5; } else if(State.variables.dairyDecoration === 'Degradationist') { cost += rulesCost * 0.90; @@ -614,7 +614,7 @@ window.getSlaveCost = function(s) { } break; case Job.BROTHEL: - if(s.livingRules == LivingRule.NORMAL) { + if(s.livingRules === LivingRule.NORMAL) { cost += rulesCost * 1.5; } else { cost += rulesCost; @@ -626,7 +626,7 @@ window.getSlaveCost = function(s) { case Job.CLINIC: if(s.livingRules === LivingRule.LUXURIOUS) { cost += rulesCost * 2; - } else if(s.livingRules == LivingRule.NORMAL) { + } else if(s.livingRules === LivingRule.NORMAL) { cost += rulesCost * 1.5; } else { cost += rulesCost; @@ -635,14 +635,14 @@ window.getSlaveCost = function(s) { case Job.SPA: case Job.NANNY: if(s.livingRules === LivingRule.LUXURIOUS) { cost += rulesCost * 1.75; - } else if(s.livingRules == LivingRule.NORMAL) { + } else if(s.livingRules === LivingRule.NORMAL) { cost += rulesCost * 1.5; } else { cost += rulesCost; } break; case Job.SERVANT: - if(s.livingRules == LivingRule.NORMAL) { + if(s.livingRules === LivingRule.NORMAL) { cost += rulesCost * 1.5; } else { if(State.variables.servantsQuartersDecoration === 'Degradationist') { @@ -653,7 +653,7 @@ window.getSlaveCost = function(s) { } break; case Job.JAIL: - if(s.livingRules == LivingRule.NORMAL) { + if(s.livingRules === LivingRule.NORMAL) { cost += rulesCost * 1.25; } else { cost += rulesCost * 0.90; @@ -667,7 +667,7 @@ window.getSlaveCost = function(s) { default: if(s.livingRules === LivingRule.LUXURIOUS) { cost += rulesCost * (s.relationship >= 4 ? 3 : 4); - } else if(s.livingRules == LivingRule.NORMAL) { + } else if(s.livingRules === LivingRule.NORMAL) { cost += rulesCost * 2; } else { cost += rulesCost; @@ -685,7 +685,7 @@ window.getSlaveCost = function(s) { cost -= foodCost; break; } - if(s.geneticQuirks.fertility == 2 && s.geneticQuirks.hyperFertility == 2 && s.preg == 0 && (s.ovaries == 1 || s.mpreg == 1)) { + if(s.geneticQuirks.fertility === 2 && s.geneticQuirks.hyperFertility === 2 && s.preg === 0 && (s.ovaries === 1 || s.mpreg === 1)) { cost += foodCost * 0.5; } if(s.weight > 130) { @@ -732,30 +732,30 @@ window.getSlaveCost = function(s) { // Accessibility costs if(State.variables.boobAccessibility !== 1 && s.boobs > 20000 - && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) { + && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { cost += 50; } if(State.variables.pregAccessibility !== 1 - && (s.belly >= 60000) && s.assignment != Job.BABY_FACTORY && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) { + && (s.belly >= 60000) && s.assignment !== Job.BABY_FACTORY && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { cost += 100; } - if(State.variables.dickAccessibility != 1 && s.dick > 45 && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) { + if(State.variables.dickAccessibility !== 1 && s.dick > 45 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { cost += 50; } - if(State.variables.ballsAccessibility != 1 && s.balls > 90 && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) { + if(State.variables.ballsAccessibility !== 1 && s.balls > 90 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { cost += 50; } - if(State.variables.buttAccessibility != 1 && s.butt > 15 && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) { + if(State.variables.buttAccessibility !== 1 && s.butt > 15 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { cost += 50; } - if(!canSee(s) && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) { + if(!canSee(s) && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { cost += 50; } else if(s.eyes <= -1 && s.eyewear !== 'corrective glasses' && s.eyewear !== 'corrective contacts') { cost += 25; } else if(s.eyewear === 'blurring glasses' || s.eyewear === 'blurring contacts') { cost += 25; } - if(!canHear(s) && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) { + if(!canHear(s) && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { cost += 40; } else if(s.hears <= -1 && s.earwear !== 'hearing aids') { cost += 15; @@ -1081,14 +1081,14 @@ window.initFacilityStatistics = function(facility) { return facility; }; -/* +/* Welcome to the new way to spend and make money, all while having it recorded: cashX! In the past, costs were directly deducted from $cash, with something like <<set $cash -= 100>>. The new system will still happily spend your money, but it will also record it in the appropriate budget category and (optinally) the appropriate slave as well. Let's say you were going to spend 100 on your favorite $activeSlave with cashX. You might try: - + <<run cashX(-100, "slaveMod", $activeSlave)>> There we go! @@ -1120,10 +1120,10 @@ window.cashX = function(cost, what, who) { V.lastWeeksErrors += `"${cost}" at ${what} is infinity, `; } else { - + //Spend the money V.cash += cost; - + //INCOME if(cost > 0) { @@ -1133,14 +1133,14 @@ window.cashX = function(cost, what, who) { } else { V.lastWeeksErrors += `Unknown place "${what}" gained you ${cost},`; } - + //record the slave, if available if (typeof who !== 'undefined'){ who.lastWeeksCashIncome += cost; who.lifetimeCashIncome += cost; } } - + //EXPENSES else if(cost < 0) { @@ -1172,4 +1172,3 @@ window.forceNeg = function(x) { Number.prototype.toFixedHTML = function() { return commaNum(Number.prototype.toFixed.apply(this, arguments)).replace(/\.0+$/, '<span style="opacity: 0.3">$&</span>'); }; - diff --git a/src/js/eventSelectionJS.js b/src/js/eventSelectionJS.js index 5365e1d048e1eec21caa02754bbfd62e7312293b..714fa412f4221116ad7517883cab89e16120e569 100644 --- a/src/js/eventSelectionJS.js +++ b/src/js/eventSelectionJS.js @@ -1,144 +1,145 @@ -window.generateRandomEventPoolStandard = function(eventSlave) { +window.generateRandomEventPoolStandard = function (eventSlave) { -/* STANDARD EVENTS */ + /* STANDARD EVENTS */ -if(eventSlave.fetish != "mindbroken") { - if(canWalk(eventSlave)) { - if(canTalk(eventSlave)) { + if (eventSlave.fetish !== "mindbroken") { + if (canWalk(eventSlave)) { + if (canTalk(eventSlave)) { - if(State.variables.RECockmilkInterceptionIDs.length > 1 || (State.variables.RECockmilkInterceptionIDs.length == 1 && eventSlave.ID != State.variables.RECockmilkInterceptionIDs[0])){ - if(eventSlave.devotion > 20) { - if (eventSlave.dietCum > 0 || (eventSlave.fetishKnown && eventSlave.fetish == "cumslut")) { - State.variables.RETSevent.push("cockmilk interception"); + if (State.variables.RECockmilkInterceptionIDs.length > 1 || (State.variables.RECockmilkInterceptionIDs.length === 1 && eventSlave.ID !== State.variables.RECockmilkInterceptionIDs[0])) { + if (eventSlave.devotion > 20) { + if (eventSlave.dietCum > 0 || (eventSlave.fetishKnown && eventSlave.fetish === "cumslut")) { + State.variables.RETSevent.push("cockmilk interception"); + } } } - } - if(State.variables.REInterslaveBeggingIDs.length > 1 || (State.variables.REInterslaveBeggingIDs.length == 1 && eventSlave.ID != State.variables.REInterslaveBeggingIDs[0])) { - if(State.variables.universalRulesConsent == 1) { - if(eventSlave.devotion > 20) { - if(eventSlave.energy > 40) { - if(canPenetrate(eventSlave)) { - if(canSee(eventSlave)) { - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - State.variables.RETSevent.push("interslave begging"); + if (State.variables.REInterslaveBeggingIDs.length > 1 || (State.variables.REInterslaveBeggingIDs.length === 1 && eventSlave.ID !== State.variables.REInterslaveBeggingIDs[0])) { + if (State.variables.universalRulesConsent === 1) { + if (eventSlave.devotion > 20) { + if (eventSlave.energy > 40) { + if (canPenetrate(eventSlave)) { + if (canSee(eventSlave)) { + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + State.variables.RETSevent.push("interslave begging"); + } } } } } } } - } - if(State.variables.familyTesting == 0) { - if(eventSlave.devotion > 20) { - if(eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) { - if(eventSlave.relation == "mother") { - if(eventSlave.belly < 100000) { - if(eventSlave.lactation) { - if(eventSlave.nipples != "fuckable") { - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - State.variables.RETSevent.push("incestuous nursing"); + if (State.variables.familyTesting === 0) { + if (eventSlave.devotion > 20) { + if (eventSlave.sexualQuirk === "perverted" || eventSlave.energy > 80) { + if (eventSlave.relation === "mother") { + if (eventSlave.belly < 100000) { + if (eventSlave.lactation) { + if (eventSlave.nipples !== "fuckable") { + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + State.variables.RETSevent.push("incestuous nursing"); + } } } } } } } + } else { + if (eventSlave.devotion > 20 && (eventSlave.sexualQuirk === "perverted" || eventSlave.energy > 80) && eventSlave.belly < 100000 && eventSlave.lactation > 0 && eventSlave.nipples !== "fuckable" && eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity" && eventSlave.daughters > 0) { + State.variables.RETSevent.push("incestuous nursing"); + } } - } else { - if (eventSlave.devotion > 20 && (eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) && eventSlave.belly < 100000 && eventSlave.lactation > 0 && eventSlave.nipples != "fuckable" && eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity" && eventSlave.daughters > 0) { - State.variables.RETSevent.push("incestuous nursing"); - } - } - if(eventSlave.intelligence+eventSlave.intelligenceImplant > 50) { - if(eventSlave.devotion > 50) { - if(eventSlave.intelligenceImplant >= 15) { - if(eventSlave.accent < 4) { - State.variables.RESSevent.push("devoted educated slave"); + if (eventSlave.intelligence + eventSlave.intelligenceImplant > 50) { + if (eventSlave.devotion > 50) { + if (eventSlave.intelligenceImplant >= 15) { + if (eventSlave.accent < 4) { + State.variables.RESSevent.push("devoted educated slave"); + } } } } - } - if(eventSlave.entertainSkill >= 60 || ["an exotic dancer", "a dancer", "a house DJ", "a party girl", "an aspiring pop star"].includes(eventSlave.career)) { - if(canHear(eventSlave)) { - if(eventSlave.health > 40) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - State.variables.RESSevent.push("happy dance"); + if (eventSlave.entertainSkill >= 60 || ["an exotic dancer", "a dancer", "a house DJ", "a party girl", "an aspiring pop star"].includes(eventSlave.career)) { + if (canHear(eventSlave)) { + if (eventSlave.health > 40) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + State.variables.RESSevent.push("happy dance"); + } } } } } - } - if(State.variables.RERepressedAnalVirginSubIDs.length > 0) { - if(eventSlave.anus == 0) { - if(eventSlave.devotion >= -50) { - if(eventSlave.trust >= -50) { - if(eventSlave.sexualFlaw == "repressed") { - State.variables.RETSevent.push("repressed anal virgin"); + if (State.variables.RERepressedAnalVirginSubIDs.length > 0) { + if (eventSlave.anus === 0) { + if (eventSlave.devotion >= -50) { + if (eventSlave.trust >= -50) { + if (eventSlave.sexualFlaw === "repressed") { + State.variables.RETSevent.push("repressed anal virgin"); + } } } } } - } - if(State.variables.assistant > 0) { - if(State.variables.assistantAppearance != "normal") { - if(eventSlave.devotion >= -20) { - if(canSee(eventSlave)) { - if(eventSlave.devotion <= 50) { - if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("PA servant"); + if (State.variables.assistant > 0) { + if (State.variables.assistantAppearance !== "normal") { + if (eventSlave.devotion >= -20) { + if (canSee(eventSlave)) { + if (eventSlave.devotion <= 50) { + if (["be a servant", "work as a servant"].includes(eventSlave.assignment)) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("PA servant"); + } } - } - } else if(eventSlave.trust > 75) { - if(eventSlave.energy > 60) { - if((canDoAnal(eventSlave) && eventSlave.anus > 0) || (canDoVaginal(eventSlave) && eventSlave.vagina > 0)) { - State.variables.RESSevent.push("PA flirting"); + } else if (eventSlave.trust > 75) { + if (eventSlave.energy > 60) { + if ((canDoAnal(eventSlave) && eventSlave.anus > 0) || (canDoVaginal(eventSlave) && eventSlave.vagina > 0)) { + State.variables.RESSevent.push("PA flirting"); + } } } } } } } - } - if(eventSlave.clothes == "a succubus outfit") { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("sexy succubus"); + if (eventSlave.clothes === "a succubus outfit") { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("sexy succubus"); + } } } - } - if(State.variables.HeadGirl != 0) { - if(eventSlave.devotion <= 50) { - if(eventSlave.anus != 0 && canDoAnal(eventSlave)) { - if(State.variables.HGSeverity >= 0) { - State.variables.events.push("RE anal punishment"); + if (State.variables.HeadGirl !== 0) { + if (eventSlave.devotion <= 50) { + if (eventSlave.anus !== 0 && canDoAnal(eventSlave)) { + if (State.variables.HGSeverity >= 0) { + State.variables.events.push("RE anal punishment"); + } + State.variables.events.push("RE shower punishment"); } - State.variables.events.push("RE shower punishment"); } - } - if(eventSlave.ID == State.variables.HeadGirl.ID) { - if(eventSlave.trust > 50) { - State.variables.RESSevent.push("trusting HG"); + if (eventSlave.ID === State.variables.HeadGirl.ID) { + if (eventSlave.trust > 50) { + State.variables.RESSevent.push("trusting HG"); + } } - } - if(eventSlave.ID != State.variables.HeadGirl.ID) { - if(canSee(eventSlave) && canWalk(eventSlave)) { - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.trust > 75) { - if(eventSlave.devotion > 50) { - if(eventSlave.oralSkill > 30) { - if(eventSlave.intelligence+eventSlave.intelligenceImplant >= State.variables.HeadGirl.intelligence+State.variables.HeadGirl.intelligenceImplant) { - if(eventSlave.oralSkill > State.variables.HeadGirl.oralSkill) { - State.variables.events.push("RE HG replacement"); + if (eventSlave.ID !== State.variables.HeadGirl.ID) { + if (canSee(eventSlave) && canWalk(eventSlave)) { + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.trust > 75) { + if (eventSlave.devotion > 50) { + if (eventSlave.oralSkill > 30) { + if (eventSlave.intelligence + eventSlave.intelligenceImplant >= State.variables.HeadGirl.intelligence + State.variables.HeadGirl.intelligenceImplant) { + if (eventSlave.oralSkill > State.variables.HeadGirl.oralSkill) { + State.variables.events.push("RE HG replacement"); + } } } } @@ -147,60 +148,60 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(eventSlave.livingRules == "spare") { - if(eventSlave.devotion <= 20) { - if(eventSlave.devotion > -10) { - State.variables.RESSevent.push("sleeping ambivalent"); - } - if(eventSlave.trust < -20) { - State.variables.RESSevent.push("bad dream"); + if (eventSlave.livingRules === "spare") { + if (eventSlave.devotion <= 20) { + if (eventSlave.devotion > -10) { + State.variables.RESSevent.push("sleeping ambivalent"); + } + if (eventSlave.trust < -20) { + State.variables.RESSevent.push("bad dream"); + } } } - } - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20) { - if(eventSlave.weekAcquired > 0) { - if(State.variables.week-eventSlave.weekAcquired < 10) { - if(eventSlave.energy > 20) { - if(eventSlave.anus != 0) { - if(eventSlave.vagina != 0) { - State.variables.RESSevent.push("ignorant horny"); + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -20) { + if (eventSlave.weekAcquired > 0) { + if (State.variables.week - eventSlave.weekAcquired < 10) { + if (eventSlave.energy > 20) { + if (eventSlave.anus !== 0) { + if (eventSlave.vagina !== 0) { + State.variables.RESSevent.push("ignorant horny"); + } } } } } } } - } - if(State.variables.RETasteTestSubIDs.length > 1) { - if(eventSlave.livingRules == "luxurious") { - if(eventSlave.devotion > 20) { - if(eventSlave.energy > 80) { - State.variables.RETSevent.push("taste test"); + if (State.variables.RETasteTestSubIDs.length > 1) { + if (eventSlave.livingRules === "luxurious") { + if (eventSlave.devotion > 20) { + if (eventSlave.energy > 80) { + State.variables.RETSevent.push("taste test"); + } } } } - } - if(State.variables.modRequestsAllowed > 0) { - if(eventSlave.trust > 50) { - if(eventSlave.devotion > 20) { - if(eventSlave.dick != 0 || eventSlave.vagina != -1) { - if(eventSlave.nipples != "fuckable") { - if(eventSlave.speechRules == "permissive") { - if(eventSlave.corsetPiercing == 0) { - if(eventSlave.tonguePiercing == 0) { - if(eventSlave.anusPiercing == 0) { - if(eventSlave.nipplesPiercing == 0) { - if(eventSlave.dickPiercing == 0) { - if(eventSlave.vaginaPiercing == 0) { - if(eventSlave.lipsTat == 0 || eventSlave.lipsTat == "none") { - if(eventSlave.vaginaTat == 0 || eventSlave.vaginaTat == "none") { - State.variables.RESSevent.push("mods please"); + if (State.variables.modRequestsAllowed > 0) { + if (eventSlave.trust > 50) { + if (eventSlave.devotion > 20) { + if (eventSlave.dick !== 0 || eventSlave.vagina !== -1) { + if (eventSlave.nipples !== "fuckable") { + if (eventSlave.speechRules === "permissive") { + if (eventSlave.corsetPiercing === 0) { + if (eventSlave.tonguePiercing === 0) { + if (eventSlave.anusPiercing === 0) { + if (eventSlave.nipplesPiercing === 0) { + if (eventSlave.dickPiercing === 0) { + if (eventSlave.vaginaPiercing === 0) { + if (eventSlave.lipsTat === 0 || eventSlave.lipsTat === "none") { + if (eventSlave.vaginaTat === 0 || eventSlave.vaginaTat === "none") { + State.variables.RESSevent.push("mods please"); + } } } } @@ -214,31 +215,31 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(eventSlave.muscles > 5) { - if(eventSlave.devotion > 20) { - if(eventSlave.diet != "slimming") { - State.variables.RESSevent.push("sore shoulders"); + if (eventSlave.muscles > 5) { + if (eventSlave.devotion > 20) { + if (eventSlave.diet !== "slimming") { + State.variables.RESSevent.push("sore shoulders"); + } } } - } - if(eventSlave.relationship > 3) { - var relationshipSlave = State.variables.slaves.find(function(s) { return s.ID == eventSlave.relationshipTarget; }); - if(relationshipSlave.devotion > 20) { - if(canWalk(relationshipSlave)) { - if(canTalk(relationshipSlave)) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - if(eventSlave.speechRules != "restrictive") { - State.variables.RETSevent.push("date please"); - } - if(relationshipSlave.anus != 0) { - if(relationshipSlave.dick != 1) { - if(relationshipSlave.dick == 0 || canAchieveErection(relationshipSlave)) { - if(relationshipSlave.fetish == "dom" || relationshipSlave.fetish == "sadist") { - State.variables.RETSevent.push("top exhaustion"); + if (eventSlave.relationship > 3) { + var relationshipSlave = State.variables.slaves.find(function (s) { return s.ID === eventSlave.relationshipTarget; }); + if (relationshipSlave.devotion > 20) { + if (canWalk(relationshipSlave)) { + if (canTalk(relationshipSlave)) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + if (eventSlave.speechRules !== "restrictive") { + State.variables.RETSevent.push("date please"); + } + if (relationshipSlave.anus !== 0) { + if (relationshipSlave.dick !== 1) { + if (relationshipSlave.dick === 0 || canAchieveErection(relationshipSlave)) { + if (relationshipSlave.fetish === "dom" || relationshipSlave.fetish === "sadist") { + State.variables.RETSevent.push("top exhaustion"); + } } } } @@ -248,414 +249,414 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(State.variables.REAnalCowgirlSubIDs.length > 1 || (State.variables.REAnalCowgirlSubIDs.length == 1 && eventSlave.ID != State.variables.REAnalCowgirlSubIDs[0])) { - if(eventSlave.devotion > 20) { - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - if(eventSlave.fetish == "buttslut" || eventSlave.fetish == "sadist" || eventSlave.fetish == "dom") { - if((eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") || eventSlave.dick == 0) { - State.variables.RETSevent.push("anal cowgirl"); + if (State.variables.REAnalCowgirlSubIDs.length > 1 || (State.variables.REAnalCowgirlSubIDs.length === 1 && eventSlave.ID !== State.variables.REAnalCowgirlSubIDs[0])) { + if (eventSlave.devotion > 20) { + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + if (eventSlave.fetish === "buttslut" || eventSlave.fetish === "sadist" || eventSlave.fetish === "dom") { + if ((eventSlave.dickAccessory !== "chastity" && eventSlave.dickAccessory !== "combined chastity") || eventSlave.dick === 0) { + State.variables.RETSevent.push("anal cowgirl"); + } } } } } - } - if(State.variables.REBoobCollisionSubIDs.length > 1) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(eventSlave.boobs > 3000) { - if(eventSlave.attrXX >= 50 || (eventSlave.fetish == "boobs" && eventSlave.fetishStrength > 95)) { - State.variables.RETSevent.push("boob collision"); + if (State.variables.REBoobCollisionSubIDs.length > 1) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (eventSlave.boobs > 3000) { + if (eventSlave.attrXX >= 50 || (eventSlave.fetish === "boobs" && eventSlave.fetishStrength > 95)) { + State.variables.RETSevent.push("boob collision"); + } } } } } - } - if(State.variables.weatherToday.severity <= 1) { - if(eventSlave.trust > 50) { - if(eventSlave.devotion > 20) { - if(eventSlave.anus != 0 && canDoAnal(eventSlave)) { - if(eventSlave.vagina != 0) { - State.variables.RESSevent.push("confident tanning"); + if (State.variables.weatherToday.severity <= 1) { + if (eventSlave.trust > 50) { + if (eventSlave.devotion > 20) { + if (eventSlave.anus !== 0 && canDoAnal(eventSlave)) { + if (eventSlave.vagina !== 0) { + State.variables.RESSevent.push("confident tanning"); + } } } } } - } - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - var giver = 0; - if(State.variables.HeadGirl == 0) { - giver = 1; - } else if(State.variables.HeadGirl.ID != eventSlave.ID) { - giver = 1; - } - if(giver == 1) { - State.variables.RESSevent.push("a gift"); + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + var giver = 0; + if (State.variables.HeadGirl === 0) { + giver = 1; + } else if (State.variables.HeadGirl.ID !== eventSlave.ID) { + giver = 1; + } + if (giver === 1) { + State.variables.RESSevent.push("a gift"); + } } } - } - if(eventSlave.relationship >= 2) { - if(eventSlave.relationship < 5) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust >= -20) { - State.variables.events.push("RE relationship advice"); + if (eventSlave.relationship >= 2) { + if (eventSlave.relationship < 5) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust >= -20) { + State.variables.events.push("RE relationship advice"); + } } } } - } - if(eventSlave.devotion > 50) { - if(eventSlave.anus > 0) { - if(eventSlave.vagina != 0) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("devoted exhibition"); - State.variables.RESSevent.push("devoted lotion"); - } - if(eventSlave.energy > 95 && canDoAnal(eventSlave)) { - State.variables.RESSevent.push("devoted nympho"); - } - if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") { - if(!["chastity", "combined chastity"].includes(eventSlave.dickAccessory) || eventSlave.dick == 0) { - State.variables.RESSevent.push("permitted masturbation"); + if (eventSlave.devotion > 50) { + if (eventSlave.anus > 0) { + if (eventSlave.vagina !== 0) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("devoted exhibition"); + State.variables.RESSevent.push("devoted lotion"); + } + if (eventSlave.energy > 95 && canDoAnal(eventSlave)) { + State.variables.RESSevent.push("devoted nympho"); + } + if (eventSlave.releaseRules === "permissive" || eventSlave.releaseRules === "masturbation") { + if (!["chastity", "combined chastity"].includes(eventSlave.dickAccessory) || eventSlave.dick === 0) { + State.variables.RESSevent.push("permitted masturbation"); + } } } } } - } - if(eventSlave.trust < -50) { - if(eventSlave.devotion <= 20) { - State.variables.RESSevent.push("terrified inspection"); + if (eventSlave.trust < -50) { + if (eventSlave.devotion <= 20) { + State.variables.RESSevent.push("terrified inspection"); + } } - } - if(eventSlave.dick > 0) { - if(eventSlave.anus > 0) { - if(eventSlave.devotion >= 10) { - if(State.variables.REFeminizationCheckinIDs.includes(eventSlave.ID)) { - State.variables.RECIevent.push("feminization"); - } - if(eventSlave.trust >= 10) { - if(canAchieveErection(eventSlave)) { - if(State.variables.REFutaSisterCheckinIDs.includes(eventSlave.ID)) { - State.variables.RECIevent.push("futa"); + if (eventSlave.dick > 0) { + if (eventSlave.anus > 0) { + if (eventSlave.devotion >= 10) { + if (State.variables.REFeminizationCheckinIDs.includes(eventSlave.ID)) { + State.variables.RECIevent.push("feminization"); + } + if (eventSlave.trust >= 10) { + if (canAchieveErection(eventSlave)) { + if (State.variables.REFutaSisterCheckinIDs.includes(eventSlave.ID)) { + State.variables.RECIevent.push("futa"); + } } } } } } - } - if(eventSlave.analSkill > 30) { - if(eventSlave.devotion >= 10) { - if(State.variables.REMILFCheckinIDs.includes(eventSlave.ID)) { - State.variables.RECIevent.push("MILF"); + if (eventSlave.analSkill > 30) { + if (eventSlave.devotion >= 10) { + if (State.variables.REMILFCheckinIDs.includes(eventSlave.ID)) { + State.variables.RECIevent.push("MILF"); + } } } - } - if(eventSlave.attrXY > 50) { - if(eventSlave.anus != 0) { - if(eventSlave.vagina != 0) { - if(eventSlave.devotion >= 10) { - if(State.variables.REOrientationCheckinIDs.includes(eventSlave.ID)) { - State.variables.RECIevent.push("orientation"); + if (eventSlave.attrXY > 50) { + if (eventSlave.anus !== 0) { + if (eventSlave.vagina !== 0) { + if (eventSlave.devotion >= 10) { + if (State.variables.REOrientationCheckinIDs.includes(eventSlave.ID)) { + State.variables.RECIevent.push("orientation"); + } } } } } - } - if(eventSlave.face >= -10) { - if(eventSlave.devotion >= 10) { - if(eventSlave.assignment == "serve the public" || eventSlave.assignment == "whore") { - if(State.variables.REUglyCheckinIDs.includes(eventSlave.ID)) { - State.variables.RECIevent.push("ugly"); + if (eventSlave.face >= -10) { + if (eventSlave.devotion >= 10) { + if (eventSlave.assignment === "serve the public" || eventSlave.assignment === "whore") { + if (State.variables.REUglyCheckinIDs.includes(eventSlave.ID)) { + State.variables.RECIevent.push("ugly"); + } } } } - } - if(eventSlave.anus > 1) { - if(eventSlave.anus < 4) { - if(eventSlave.analArea > 1) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - if(State.variables.REButtholeCheckinIDs.includes(eventSlave.ID)) { - State.variables.RECIevent.push("butthole"); + if (eventSlave.anus > 1) { + if (eventSlave.anus < 4) { + if (eventSlave.analArea > 1) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + if (State.variables.REButtholeCheckinIDs.includes(eventSlave.ID)) { + State.variables.RECIevent.push("butthole"); + } } } } } } - } - /* - if(eventSlave.drugs == "breast injections") { - if(eventSlave.anus > 0 || eventSlave.vagina > 0) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20) { - if(eventSlave.trust >= -50) { - if(State.variables.REReductionCheckinIDs.includes(eventSlave.ID)) { - State.variables.RECIevent.push("reduction"); + /* + if(eventSlave.drugs == "breast injections") { + if(eventSlave.anus > 0 || eventSlave.vagina > 0) { + if(eventSlave.devotion <= 50) { + if(eventSlave.devotion >= -20) { + if(eventSlave.trust >= -50) { + if(State.variables.REReductionCheckinIDs.includes(eventSlave.ID)) { + State.variables.RECIevent.push("reduction"); + } } } } } } - } - */ + */ - if(eventSlave.assignment == "be a servant" || eventSlave.assignment == "work as a servant") { - if(eventSlave.devotion <= 95) { - if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) { - State.variables.RESSevent.push("cooler lockin"); + if (eventSlave.assignment === "be a servant" || eventSlave.assignment === "work as a servant") { + if (eventSlave.devotion <= 95) { + if (eventSlave.intelligence + eventSlave.intelligenceImplant < -50) { + State.variables.RESSevent.push("cooler lockin"); + } } } - } - if(State.variables.universalRulesConsent == 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.fetish == "sadist" || eventSlave.fetish == "dom" || eventSlave.energy > 95) { - if(State.variables.REShowerForceSubIDs.length > 0) { - if(eventSlave.trust <= 75) { - State.variables.RETSevent.push("shower force"); + if (State.variables.universalRulesConsent === 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.fetish === "sadist" || eventSlave.fetish === "dom" || eventSlave.energy > 95) { + if (State.variables.REShowerForceSubIDs.length > 0) { + if (eventSlave.trust <= 75) { + State.variables.RETSevent.push("shower force"); + } } - } - if(eventSlave.anus > 0) { - if(State.variables.RESadisticDescriptionSubIDs.length > 0) { - State.variables.RETSevent.push("sadistic description"); + if (eventSlave.anus > 0) { + if (State.variables.RESadisticDescriptionSubIDs.length > 0) { + State.variables.RETSevent.push("sadistic description"); + } } - } - if(State.variables.cockFeeder > 0) { - if(canPenetrate(eventSlave) || eventSlave.dick == 0) { - State.variables.RESSevent.push("kitchen molestation"); + if (State.variables.cockFeeder > 0) { + if (canPenetrate(eventSlave) || eventSlave.dick === 0) { + State.variables.RESSevent.push("kitchen molestation"); + } } } - } - if(State.variables.REIfYouEnjoyItSubIDs.length > 0) { - State.variables.RETSevent.push("if you enjoy it"); - } - if(State.variables.RESimpleAssaultIDs.length > 0) { - if(canPenetrate(eventSlave)) { - State.variables.RETSevent.push("simple assault"); + if (State.variables.REIfYouEnjoyItSubIDs.length > 0) { + State.variables.RETSevent.push("if you enjoy it"); + } + if (State.variables.RESimpleAssaultIDs.length > 0) { + if (canPenetrate(eventSlave)) { + State.variables.RETSevent.push("simple assault"); + } } } } - } - if(eventSlave.devotion < -50) { - if(eventSlave.trust >= -20) { - if(eventSlave.speechRules == "restrictive") { - State.variables.RESSevent.push("vocal disobedience"); + if (eventSlave.devotion < -50) { + if (eventSlave.trust >= -20) { + if (eventSlave.speechRules === "restrictive") { + State.variables.RESSevent.push("vocal disobedience"); + } } } - } - if(State.variables.boobAccessibility != 1 && State.variables.ballsAccessibility != 1 && State.variables.pregAccessibility != 1) { - if(eventSlave.boobs > 10000) { - if(eventSlave.devotion >= -20) { - if(State.variables.slaves.length > 2) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("huge tits"); + if (State.variables.boobAccessibility !== 1 && State.variables.ballsAccessibility !== 1 && State.variables.pregAccessibility !== 1) { + if (eventSlave.boobs > 10000) { + if (eventSlave.devotion >= -20) { + if (State.variables.slaves.length > 2) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("huge tits"); + } } } } } - } - if(eventSlave.physicalAge > 30) { - if(eventSlave.ageImplant > 0) { - if(eventSlave.devotion > 20) { - State.variables.RESSevent.push("age implant"); + if (eventSlave.physicalAge > 30) { + if (eventSlave.ageImplant > 0) { + if (eventSlave.devotion > 20) { + State.variables.RESSevent.push("age implant"); + } } } - } - if(State.variables.seeAge != 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.birthWeek >= 51) { - /* lets give this a much higher chance of appearing */ - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); + if (State.variables.seeAge !== 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.birthWeek >= 51) { + /* lets give this a much higher chance of appearing */ + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + } } } } - } - if(eventSlave.clothes == "a penitent nuns habit") { - if(eventSlave.anus > 0) { - if(eventSlave.devotion >= -20) { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("penitent"); + if (eventSlave.clothes === "a penitent nuns habit") { + if (eventSlave.anus > 0) { + if (eventSlave.devotion >= -20) { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("penitent"); + } } } } - } - if(eventSlave.slaveName != eventSlave.birthName && eventSlave.birthName !== "") { - if(eventSlave.devotion <= 20) { - if(eventSlave.trust >= -20) { - if(eventSlave.anus > 0 && canDoAnal(eventSlave)) { - State.variables.RESSevent.push("not my name"); + if (eventSlave.slaveName !== eventSlave.birthName && eventSlave.birthName !== "") { + if (eventSlave.devotion <= 20) { + if (eventSlave.trust >= -20) { + if (eventSlave.anus > 0 && canDoAnal(eventSlave)) { + State.variables.RESSevent.push("not my name"); + } } } } - } - if(State.variables.slaves.length > 2) { - if(eventSlave.devotion >= -20) { - if(eventSlave.heels == 1) { - if(eventSlave.shoes == "heels" || eventSlave.shoes == "boots" || eventSlave.shoes == "extreme heels") { - State.variables.RESSevent.push("tendon fall"); + if (State.variables.slaves.length > 2) { + if (eventSlave.devotion >= -20) { + if (eventSlave.heels === 1) { + if (eventSlave.shoes === "heels" || eventSlave.shoes === "boots" || eventSlave.shoes === "extreme heels") { + State.variables.RESSevent.push("tendon fall"); + } } } } - } - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.devotion <= 50) { - if(eventSlave.vagina < 0) { - if(canDoAnal(eventSlave)) { - if(eventSlave.anus > 0) { - if(eventSlave.analSkill <= 30) { - State.variables.RESSevent.push("obedient shemale"); + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.devotion <= 50) { + if (eventSlave.vagina < 0) { + if (canDoAnal(eventSlave)) { + if (eventSlave.anus > 0) { + if (eventSlave.analSkill <= 30) { + State.variables.RESSevent.push("obedient shemale"); + } } } } } } - } - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 20) { - if(eventSlave.physicalAge > 37) { - if(eventSlave.anus > 0) { - if(eventSlave.vagina > 0) { - State.variables.RESSevent.push("devoted old"); + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 20) { + if (eventSlave.physicalAge > 37) { + if (eventSlave.anus > 0) { + if (eventSlave.vagina > 0) { + State.variables.RESSevent.push("devoted old"); + } } } } } - } - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(eventSlave.actualAge > 35) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(State.variables.PC.actualAge < 25) { - State.variables.RESSevent.push("young PC age difference"); + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (eventSlave.actualAge > 35) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (State.variables.PC.actualAge < 25) { + State.variables.RESSevent.push("young PC age difference"); + } } } } } - } - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(eventSlave.actualAge < 22) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(State.variables.PC.actualAge >= 50) { - State.variables.RESSevent.push("old PC age difference"); + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (eventSlave.actualAge < 22) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (State.variables.PC.actualAge >= 50) { + State.variables.RESSevent.push("old PC age difference"); + } } } } } - } - if(eventSlave.fetish == "humiliation" || eventSlave.energy > 95) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(eventSlave.vagina != 0) { - if(eventSlave.anus != 0) { - if(eventSlave.fetishKnown == 1) { - State.variables.RESSevent.push("fearful humiliation"); + if (eventSlave.fetish === "humiliation" || eventSlave.energy > 95) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -20) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (eventSlave.vagina !== 0) { + if (eventSlave.anus !== 0) { + if (eventSlave.fetishKnown === 1) { + State.variables.RESSevent.push("fearful humiliation"); + } } } } } } } - } - if(eventSlave.livingRules == "luxurious") { - if(eventSlave.devotion <= 75) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("newly devoted sunrise"); + if (eventSlave.livingRules === "luxurious") { + if (eventSlave.devotion <= 75) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("newly devoted sunrise"); + } } } - } - if(State.variables.PC.dick == 1) { - if(State.variables.PC.belly < 5000) { - if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) { - if(eventSlave.attrXY <= 35 || eventSlave.behavioralFlaw == "hates men" || eventSlave.sexualFlaw == "repressed") { - if(eventSlave.devotion >= -20) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("frightening dick"); + if (State.variables.PC.dick === 1) { + if (State.variables.PC.belly < 5000) { + if (["be a servant", "work as a servant"].includes(eventSlave.assignment)) { + if (eventSlave.attrXY <= 35 || eventSlave.behavioralFlaw === "hates men" || eventSlave.sexualFlaw === "repressed") { + if (eventSlave.devotion >= -20) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("frightening dick"); + } } } } } } - } - if(State.variables.spa > 0) { - if(eventSlave.boobs > 2000) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("spa boobs"); + if (State.variables.spa > 0) { + if (eventSlave.boobs > 2000) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("spa boobs"); + } } } } } - } - if(eventSlave.lactation > 0) { - if(eventSlave.boobs > 800) { - if(eventSlave.nipples != "fuckable") { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("cow milking"); + if (eventSlave.lactation > 0) { + if (eventSlave.boobs > 800) { + if (eventSlave.nipples !== "fuckable") { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("cow milking"); + } } } } } - } - if(eventSlave.dietCum > 0) { - if(eventSlave.devotion <= 20) { - if((eventSlave.fetish != "cumslut" && eventSlave.fetish != "masochist" && eventSlave.fetishStrength < 60) || eventSlave.fetishKnown == 0) { - State.variables.RESSevent.push("retching cum feeding"); + if (eventSlave.dietCum > 0) { + if (eventSlave.devotion <= 20) { + if ((eventSlave.fetish !== "cumslut" && eventSlave.fetish !== "masochist" && eventSlave.fetishStrength < 60) || eventSlave.fetishKnown === 0) { + State.variables.RESSevent.push("retching cum feeding"); + } } } - } - if(State.variables.arcologies[0].FSSubjugationist != "unset") { - if(eventSlave.race != State.variables.arcologies[0].FSSubjugationistRace) { - if(State.variables.week-eventSlave.weekAcquired > 1) { - if(State.variables.week-eventSlave.weekAcquired < 10) { - if(eventSlave.devotion < -20) { - if(eventSlave.trust >= -20) { - if(eventSlave.health > -20) { - if(eventSlave.race == eventSlave.origRace) { - if(eventSlave.indentureRestrictions < 1) { - State.variables.RESSevent.push("subjugation blues"); + if (State.variables.arcologies[0].FSSubjugationist !== "unset") { + if (eventSlave.race !== State.variables.arcologies[0].FSSubjugationistRace) { + if (State.variables.week - eventSlave.weekAcquired > 1) { + if (State.variables.week - eventSlave.weekAcquired < 10) { + if (eventSlave.devotion < -20) { + if (eventSlave.trust >= -20) { + if (eventSlave.health > -20) { + if (eventSlave.race === eventSlave.origRace) { + if (eventSlave.indentureRestrictions < 1) { + State.variables.RESSevent.push("subjugation blues"); + } } } } @@ -664,19 +665,19 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(canTalk(eventSlave)) { - if(eventSlave.dietCum > 0) { - if(eventSlave.diet == "fattening") { - if(eventSlave.trust >= -50) { - if(eventSlave.fetish != "cumslut") { - if(eventSlave.weight < -30) { - if(eventSlave.health > -80) { - if(eventSlave.behavioralFlaw != "anorexic") { - if(eventSlave.sexualFlaw != "self hating") { - if(eventSlave.fetishStrength <= 60 || eventSlave.fetishKnown != 1) { - State.variables.RESSevent.push("too thin for cum diet"); + if (canTalk(eventSlave)) { + if (eventSlave.dietCum > 0) { + if (eventSlave.diet === "fattening") { + if (eventSlave.trust >= -50) { + if (eventSlave.fetish !== "cumslut") { + if (eventSlave.weight < -30) { + if (eventSlave.health > -80) { + if (eventSlave.behavioralFlaw !== "anorexic") { + if (eventSlave.sexualFlaw !== "self hating") { + if (eventSlave.fetishStrength <= 60 || eventSlave.fetishKnown !== 1) { + State.variables.RESSevent.push("too thin for cum diet"); + } } } } @@ -686,17 +687,17 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(eventSlave.drugs == "intensive breast injections" || eventSlave.drugs == "hyper breast injections") { - if(eventSlave.boobs <= 8000) { - if(eventSlave.boobs > 2000) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -50) { - if(eventSlave.trust >= -50) { - if(eventSlave.fetish != "boobs") { - if(eventSlave.intelligence+eventSlave.intelligenceImplant >= -50) { - State.variables.RESSevent.push("breast expansion blues"); + if (eventSlave.drugs === "intensive breast injections" || eventSlave.drugs === "hyper breast injections") { + if (eventSlave.boobs <= 8000) { + if (eventSlave.boobs > 2000) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -50) { + if (eventSlave.trust >= -50) { + if (eventSlave.fetish !== "boobs") { + if (eventSlave.intelligence + eventSlave.intelligenceImplant >= -50) { + State.variables.RESSevent.push("breast expansion blues"); + } } } } @@ -704,105 +705,105 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(eventSlave.physicalAge > 35) { - if(eventSlave.speechRules != "restrictive") { - if(["whore", "serve the public", "work in the brothel", "serve in the club"].includes(eventSlave.assignment)) { - if(eventSlave.devotion >= -20) { - if(eventSlave.devotion <= 95) { - State.variables.RESSevent.push("ara ara"); + if (eventSlave.physicalAge > 35) { + if (eventSlave.speechRules !== "restrictive") { + if (["whore", "serve the public", "work in the brothel", "serve in the club"].includes(eventSlave.assignment)) { + if (eventSlave.devotion >= -20) { + if (eventSlave.devotion <= 95) { + State.variables.RESSevent.push("ara ara"); + } } } } } - } - if(eventSlave.anus > 3) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - State.variables.RESSevent.push("gaped asshole"); + if (eventSlave.anus > 3) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + State.variables.RESSevent.push("gaped asshole"); + } } } - } - if(eventSlave.health > 90) { - if(eventSlave.muscles > 5) { - if(eventSlave.weight <= 30) { - if(eventSlave.weight >= -30) { - if(eventSlave.trust > 50) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("passing declaration"); + if (eventSlave.health > 90) { + if (eventSlave.muscles > 5) { + if (eventSlave.weight <= 30) { + if (eventSlave.weight >= -30) { + if (eventSlave.trust > 50) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("passing declaration"); + } } } } } } - } - if(eventSlave.trust < -50) { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("im scared"); + if (eventSlave.trust < -50) { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("im scared"); + } } - } - if(eventSlave.fetish == "sadist") { - if(eventSlave.fetishStrength > 20) { - if(State.variables.arcadeSlaves > 0) { - if(eventSlave.trust >= -20) { - if(eventSlave.devotion > 50) { - if(eventSlave.belly < 300000) { - State.variables.RESSevent.push("arcade sadist"); + if (eventSlave.fetish === "sadist") { + if (eventSlave.fetishStrength > 20) { + if (State.variables.arcadeSlaves > 0) { + if (eventSlave.trust >= -20) { + if (eventSlave.devotion > 50) { + if (eventSlave.belly < 300000) { + State.variables.RESSevent.push("arcade sadist"); + } } } } } } - } - if(eventSlave.dick == 0) { - if(eventSlave.vagina == -1) { - if(canDoAnal(eventSlave)) { - if(eventSlave.energy > 20) { - if(eventSlave.devotion >= -50) { - if(eventSlave.fetish != "buttslut" || eventSlave.fetishStrength <= 20) { - if(eventSlave.nipples != "fuckable") { - State.variables.RESSevent.push("desperate null"); + if (eventSlave.dick === 0) { + if (eventSlave.vagina === -1) { + if (canDoAnal(eventSlave)) { + if (eventSlave.energy > 20) { + if (eventSlave.devotion >= -50) { + if (eventSlave.fetish !== "buttslut" || eventSlave.fetishStrength <= 20) { + if (eventSlave.nipples !== "fuckable") { + State.variables.RESSevent.push("desperate null"); + } } } } } } } - } - if(eventSlave.devotion > 20) { - if(eventSlave.boobs > 2000) { - State.variables.RESSevent.push("back stretch"); + if (eventSlave.devotion > 20) { + if (eventSlave.boobs > 2000) { + State.variables.RESSevent.push("back stretch"); + } } - } - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.choosesOwnClothes !== 1) { - if(setup.modestClothes.includes(eventSlave.clothes)) { - State.variables.RESSevent.push("modest clothes"); + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.choosesOwnClothes !== 1) { + if (setup.modestClothes.includes(eventSlave.clothes)) { + State.variables.RESSevent.push("modest clothes"); + } } } } } - } - if(State.variables.PC.vagina == 1) { - if(eventSlave.devotion <= 20) { - if((eventSlave.trust >= -20 && eventSlave.behavioralFlaw == "arrogant") || (eventSlave.trust > 20)) { - if(eventSlave.muscles > 30) { - if(eventSlave.health > 20) { - if(eventSlave.energy > 50) { - if(canPenetrate(eventSlave)) { - if(State.variables.Bodyguard == 0) { - State.variables.RESSevent.push("mutinery attempt"); + if (State.variables.PC.vagina === 1) { + if (eventSlave.devotion <= 20) { + if ((eventSlave.trust >= -20 && eventSlave.behavioralFlaw === "arrogant") || (eventSlave.trust > 20)) { + if (eventSlave.muscles > 30) { + if (eventSlave.health > 20) { + if (eventSlave.energy > 50) { + if (canPenetrate(eventSlave)) { + if (State.variables.Bodyguard === 0) { + State.variables.RESSevent.push("mutinery attempt"); + } } } } @@ -810,470 +811,470 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - } /* closes mute exempt */ + } /* closes mute exempt */ - if(eventSlave.devotion > 20) { - if(["ball gag", "bit gag", "dildo gag", "massive dildo gag"].includes(eventSlave.collar)) { - State.variables.RESSevent.push("gagged slave"); + if (eventSlave.devotion > 20) { + if (["ball gag", "bit gag", "dildo gag", "massive dildo gag"].includes(eventSlave.collar)) { + State.variables.RESSevent.push("gagged slave"); + } } - } - if(eventSlave.devotion > 20) { - if(eventSlave.butt > 5) { - if(!["no clothing", "body oil", "a toga", "a kimono", "shibari ropes", "a slutty maid outfit", "a string bikini", "a scalemail bikini", "shimapan panties", "a chattel habit", "a slave gown", "a halter top dress", "a ball gown", "a mini dress", "harem gauze", "a schutzstaffel uniform", "a slutty schutzstaffel uniform", "a red army uniform", "a monokini", "a burkini"].includes(eventSlave.clothes)) { - State.variables.RESSevent.push("ass fitting"); + if (eventSlave.devotion > 20) { + if (eventSlave.butt > 5) { + if (!["no clothing", "body oil", "a toga", "a kimono", "shibari ropes", "a slutty maid outfit", "a string bikini", "a scalemail bikini", "shimapan panties", "a chattel habit", "a slave gown", "a halter top dress", "a ball gown", "a mini dress", "harem gauze", "a schutzstaffel uniform", "a slutty schutzstaffel uniform", "a red army uniform", "a monokini", "a burkini"].includes(eventSlave.clothes)) { + State.variables.RESSevent.push("ass fitting"); + } } } - } - if(eventSlave.trust > 20) { - if(eventSlave.devotion > 20) { - if(eventSlave.energy > 40) { - if(eventSlave.belly < 300000) { - if(State.variables.PC.belly < 5000 && State.variables.PC.ballsImplant < 3 && State.variables.PC.balls < 3) { - if(canSee(eventSlave)) { - State.variables.RESSevent.push("comfortable seat"); + if (eventSlave.trust > 20) { + if (eventSlave.devotion > 20) { + if (eventSlave.energy > 40) { + if (eventSlave.belly < 300000) { + if (State.variables.PC.belly < 5000 && State.variables.PC.ballsImplant < 3 && State.variables.PC.balls < 3) { + if (canSee(eventSlave)) { + State.variables.RESSevent.push("comfortable seat"); + } } } } } } - } - if(eventSlave.vaginaLube > 1) { - if(eventSlave.devotion > 20) { - if(canDoVaginal(State.variables.activeSlave)) { - State.variables.RESSevent.push("moist pussy"); + if (eventSlave.vaginaLube > 1) { + if (eventSlave.devotion > 20) { + if (canDoVaginal(State.variables.activeSlave)) { + State.variables.RESSevent.push("moist pussy"); + } } } - } - if(eventSlave.devotion <= 20) { - if(eventSlave.trust <= -20) { - if(eventSlave.genes == "XY") { - if(eventSlave.dick > 0) { - if(!["chastity", "combined chastity"].includes(eventSlave.dickAccessory)) { - if(eventSlave.vagina == -1) { - if(eventSlave.attrXY < 50) { - State.variables.RESSevent.push("transition anxiety"); + if (eventSlave.devotion <= 20) { + if (eventSlave.trust <= -20) { + if (eventSlave.genes === "XY") { + if (eventSlave.dick > 0) { + if (!["chastity", "combined chastity"].includes(eventSlave.dickAccessory)) { + if (eventSlave.vagina === -1) { + if (eventSlave.attrXY < 50) { + State.variables.RESSevent.push("transition anxiety"); + } } } } } } } - } - if(State.variables.seeAge == 1) { - if(eventSlave.actualAge < 18) { - if(eventSlave.devotion > 20) { - if(eventSlave.ovaries == 1) { - if(eventSlave.pubertyXX == 0) { - if(eventSlave.preg == 0) { - if(eventSlave.physicalAge >= eventSlave.pubertyAgeXX-.5) { - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); + if (State.variables.seeAge === 1) { + if (eventSlave.actualAge < 18) { + if (eventSlave.devotion > 20) { + if (eventSlave.ovaries === 1) { + if (eventSlave.pubertyXX === 0) { + if (eventSlave.preg === 0) { + if (eventSlave.physicalAge >= eventSlave.pubertyAgeXX - .5) { + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + } } } } - } - if(canPenetrate(eventSlave)) { - if(eventSlave.balls > 0) { - if(eventSlave.pubertyXY == 0) { - if(eventSlave.physicalAge >= eventSlave.pubertyAgeXY-.5) { - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); + if (canPenetrate(eventSlave)) { + if (eventSlave.balls > 0) { + if (eventSlave.pubertyXY === 0) { + if (eventSlave.physicalAge >= eventSlave.pubertyAgeXY - .5) { + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + } } } } } } - } - } /* closes aging exemption */ + } /* closes aging exemption */ - if(eventSlave.devotion >= -150) { - if(eventSlave.devotion <= 50) { - State.variables.events.push("RE standard punishment"); + if (eventSlave.devotion >= -150) { + if (eventSlave.devotion <= 50) { + State.variables.events.push("RE standard punishment"); + } } - } - if(eventSlave.boobs > 600) { - if(eventSlave.boobShape == "torpedo-shaped") { - if(eventSlave.devotion >= -50) { - State.variables.RESSevent.push("torpedo squeeze"); + if (eventSlave.boobs > 600) { + if (eventSlave.boobShape === "torpedo-shaped") { + if (eventSlave.devotion >= -50) { + State.variables.RESSevent.push("torpedo squeeze"); + } } } - } - if(eventSlave.assignment == "serve the public") { - if(eventSlave.fetishKnown == 1) { - if(State.variables.FSDegradationist == "unset") { - if(State.variables.arcologyUpgrade.drones == 1) { - State.variables.RESSevent.push("mean girls"); + if (eventSlave.assignment === "serve the public") { + if (eventSlave.fetishKnown === 1) { + if (State.variables.FSDegradationist === "unset") { + if (State.variables.arcologyUpgrade.drones === 1) { + State.variables.RESSevent.push("mean girls"); + } } } } - } - if(eventSlave.balls > 0) { - if(eventSlave.hormoneBalance >= 100) { - if(State.variables.hormoneUpgradeMood == 0) { - if(eventSlave.trust >= -50) { - if(eventSlave.devotion >= -20) { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("orchiectomy please"); + if (eventSlave.balls > 0) { + if (eventSlave.hormoneBalance >= 100) { + if (State.variables.hormoneUpgradeMood === 0) { + if (eventSlave.trust >= -50) { + if (eventSlave.devotion >= -20) { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("orchiectomy please"); + } } } } } } - } - if(eventSlave.trust > 20) { - if(eventSlave.devotion > 50) { - if(State.variables.PC.belly < 5000) { - State.variables.RESSevent.push("shower slip"); - } - if(eventSlave.amp < 0) { - State.variables.RESSevent.push("plimb help"); + if (eventSlave.trust > 20) { + if (eventSlave.devotion > 50) { + if (State.variables.PC.belly < 5000) { + State.variables.RESSevent.push("shower slip"); + } + if (eventSlave.amp < 0) { + State.variables.RESSevent.push("plimb help"); + } } } - } - if(eventSlave.devotion <= 20) { - if(eventSlave.devotion >= -50) { - if(eventSlave.trust >= -20) { - if(State.variables.suppository != 0) { - if(eventSlave.fetish != "buttslut") { - State.variables.RESSevent.push("suppository resistance"); + if (eventSlave.devotion <= 20) { + if (eventSlave.devotion >= -50) { + if (eventSlave.trust >= -20) { + if (State.variables.suppository !== 0) { + if (eventSlave.fetish !== "buttslut") { + State.variables.RESSevent.push("suppository resistance"); + } } - } - if(State.variables.cockFeeder != 0) { - if(eventSlave.fetish != "cumslut") { - State.variables.RESSevent.push("cockfeeder resistance"); + if (State.variables.cockFeeder !== 0) { + if (eventSlave.fetish !== "cumslut") { + State.variables.RESSevent.push("cockfeeder resistance"); + } } } } } - } - if(eventSlave.relationship <= -2) { - if(eventSlave.trust > 50) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("bonded love"); + if (eventSlave.relationship <= -2) { + if (eventSlave.trust > 50) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("bonded love"); + } } } - } - if(eventSlave.trust > 20) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("objectifying visit"); + if (eventSlave.trust > 20) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("objectifying visit"); + } } - } - if (canWalk(eventSlave)) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > -10) { - if(eventSlave.ID != State.variables.HeadGirl.ID) { - if(eventSlave.ID != State.variables.Concubine.ID) { - State.variables.RESSevent.push("refreshment delivery"); + if (canWalk(eventSlave)) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > -10) { + if (eventSlave.ID !== State.variables.HeadGirl.ID) { + if (eventSlave.ID !== State.variables.Concubine.ID) { + State.variables.RESSevent.push("refreshment delivery"); + } } } } } - } - if(eventSlave.dick > 8) { - if(eventSlave.balls > 0) { - if(eventSlave.energy > 60) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(eventSlave.belly < 100000) { - State.variables.RESSevent.push("dick wringing"); + if (eventSlave.dick > 8) { + if (eventSlave.balls > 0) { + if (eventSlave.energy > 60) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (eventSlave.belly < 100000) { + State.variables.RESSevent.push("dick wringing"); + } } } } } } } - } - if(eventSlave.balls > 0) { - if(eventSlave.scrotum > 0) { - if(eventSlave.dickAccessory == "chastity" || eventSlave.dickAccessory == "combined chastity") { - if(eventSlave.devotion <= 95) { - if(eventSlave.energy > 50) { - if(eventSlave.energy < 95) { - if(eventSlave.devotion >= -20 || eventSlave.trust < -20) { - State.variables.RESSevent.push("cage relief"); + if (eventSlave.balls > 0) { + if (eventSlave.scrotum > 0) { + if (eventSlave.dickAccessory === "chastity" || eventSlave.dickAccessory === "combined chastity") { + if (eventSlave.devotion <= 95) { + if (eventSlave.energy > 50) { + if (eventSlave.energy < 95) { + if (eventSlave.devotion >= -20 || eventSlave.trust < -20) { + State.variables.RESSevent.push("cage relief"); + } } } } } } } - } - if(State.variables.PC.dick > 0) { - if(State.variables.PC.boobs > 0) { - if(canSee(eventSlave)) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20) { - if(((eventSlave.attrXY <= 35) && (eventSlave.attrXX > 65)) || ((eventSlave.attrXX <= 35) && (eventSlave.attrXY > 65))) { - State.variables.RESSevent.push("dickgirl PC"); + if (State.variables.PC.dick > 0) { + if (State.variables.PC.boobs > 0) { + if (canSee(eventSlave)) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -20) { + if (((eventSlave.attrXY <= 35) && (eventSlave.attrXX > 65)) || ((eventSlave.attrXX <= 35) && (eventSlave.attrXY > 65))) { + State.variables.RESSevent.push("dickgirl PC"); + } } } } } } - } - if(eventSlave.voice > 0) { - if(eventSlave.lips <= 95) { - if(!["dildo gag", "massive dildo gag", "ball gag", "bit gag"].includes(eventSlave.collar)) { - if(eventSlave.accent == 3) { - if(eventSlave.devotion <= 50) { - if(eventSlave.trust > -10) { - if(eventSlave.devotion >= -20 || eventSlave.trust < -20) { - State.variables.RESSevent.push("language lesson"); + if (eventSlave.voice > 0) { + if (eventSlave.lips <= 95) { + if (!["dildo gag", "massive dildo gag", "ball gag", "bit gag"].includes(eventSlave.collar)) { + if (eventSlave.accent === 3) { + if (eventSlave.devotion <= 50) { + if (eventSlave.trust > -10) { + if (eventSlave.devotion >= -20 || eventSlave.trust < -20) { + State.variables.RESSevent.push("language lesson"); + } } } } } } } - } - if(eventSlave.energy > 40) { - if(canSee(eventSlave)) { - if(eventSlave.trust >= -50) { - if(eventSlave.devotion > 0) { - if(eventSlave.devotion <= 50) { - if(((eventSlave.attrXX >= 50) && (State.variables.PC.boobs == 1 || State.variables.PC.title == 0) && (State.variables.PC.belly < 5000)) - || ((eventSlave.attrXY >= 50) && (State.variables.PC.dick == 1) && (State.variables.PC.boobs == 0) && (State.variables.PC.belly < 1500)) - || (eventSlave.fetish == "pregnancy" && State.variables.PC.belly >= 5000) - || (eventSlave.fetish == "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) { - State.variables.RESSevent.push("hot PC"); + if (eventSlave.energy > 40) { + if (canSee(eventSlave)) { + if (eventSlave.trust >= -50) { + if (eventSlave.devotion > 0) { + if (eventSlave.devotion <= 50) { + if (((eventSlave.attrXX >= 50) && (State.variables.PC.boobs === 1 || State.variables.PC.title === 0) && (State.variables.PC.belly < 5000)) + || ((eventSlave.attrXY >= 50) && (State.variables.PC.dick === 1) && (State.variables.PC.boobs === 0) && (State.variables.PC.belly < 1500)) + || (eventSlave.fetish === "pregnancy" && State.variables.PC.belly >= 5000) + || (eventSlave.fetish === "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) { + State.variables.RESSevent.push("hot PC"); + } } } } } } - } - if(eventSlave.trust <= 20) { - if(eventSlave.trust >= -75) { - if(eventSlave.devotion <= 30) { - if(eventSlave.devotion >= -20) { - State.variables.RESSevent.push("like me"); + if (eventSlave.trust <= 20) { + if (eventSlave.trust >= -75) { + if (eventSlave.devotion <= 30) { + if (eventSlave.devotion >= -20) { + State.variables.RESSevent.push("like me"); + } } } } - } - if(eventSlave.boobs >= 2000) { - if(eventSlave.boobsImplant == 0) { - if(eventSlave.nipples != "tiny" && eventSlave.nipples != "fuckable") { - if(eventSlave.devotion > 20) { - State.variables.RESSevent.push("huge naturals"); + if (eventSlave.boobs >= 2000) { + if (eventSlave.boobsImplant === 0) { + if (eventSlave.nipples !== "tiny" && eventSlave.nipples !== "fuckable") { + if (eventSlave.devotion > 20) { + State.variables.RESSevent.push("huge naturals"); + } } } } - } - if(eventSlave.boobs > 800) { - if(Math.floor(eventSlave.boobsImplant/eventSlave.boobs) >= .60) { - if(eventSlave.devotion > 20) { - State.variables.RESSevent.push("implant inspection"); + if (eventSlave.boobs > 800) { + if (Math.floor(eventSlave.boobsImplant / eventSlave.boobs) >= .60) { + if (eventSlave.devotion > 20) { + State.variables.RESSevent.push("implant inspection"); + } } } - } - if(eventSlave.devotion < -20) { - if(eventSlave.trust >= -20) { - if(eventSlave.clothes == "uncomfortable straps") { - State.variables.RESSevent.push("bondage gear"); + if (eventSlave.devotion < -20) { + if (eventSlave.trust >= -20) { + if (eventSlave.clothes === "uncomfortable straps") { + State.variables.RESSevent.push("bondage gear"); + } } } - } - if(eventSlave.labia > 1 && eventSlave.vagina >= 0) { - if(eventSlave.muscles > 5 || eventSlave.diet == "muscle building") { - if(eventSlave.belly < 10000) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("inconvenient labia"); + if (eventSlave.labia > 1 && eventSlave.vagina >= 0) { + if (eventSlave.muscles > 5 || eventSlave.diet === "muscle building") { + if (eventSlave.belly < 10000) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("inconvenient labia"); + } } } } } - } - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.addict > 20) { - if(eventSlave.aphrodisiacs > 0 || eventSlave.inflationType == "aphrodisiac") { - State.variables.RESSevent.push("obedient addict"); + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.addict > 20) { + if (eventSlave.aphrodisiacs > 0 || eventSlave.inflationType === "aphrodisiac") { + State.variables.RESSevent.push("obedient addict"); + } } } - } - if(State.variables.seeExtreme == 1) { - if(eventSlave.devotion < -50) { - if(eventSlave.trust >= -50) { - if(eventSlave.assignment != "stay confined") { - if(eventSlave.heels != 1) { - State.variables.RESSevent.push("escapee"); + if (State.variables.seeExtreme === 1) { + if (eventSlave.devotion < -50) { + if (eventSlave.trust >= -50) { + if (eventSlave.assignment !== "stay confined") { + if (eventSlave.heels !== 1) { + State.variables.RESSevent.push("escapee"); + } } } } } - } - if(eventSlave.devotion <= 50) { - if(eventSlave.trust >= -50) { - if(eventSlave.behavioralFlaw == "gluttonous") { - if(eventSlave.diet == "restricted") { - State.variables.RESSevent.push("diet"); + if (eventSlave.devotion <= 50) { + if (eventSlave.trust >= -50) { + if (eventSlave.behavioralFlaw === "gluttonous") { + if (eventSlave.diet === "restricted") { + State.variables.RESSevent.push("diet"); + } } } } - } - if(eventSlave.devotion <= 20) { - if(eventSlave.devotion >= -50) { - State.variables.RESSevent.push("resistant shower"); + if (eventSlave.devotion <= 20) { + if (eventSlave.devotion >= -50) { + State.variables.RESSevent.push("resistant shower"); + } } - } - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.devotion >= -20) { - if(eventSlave.trust >= -20) { - if(eventSlave.energy > 75) { - if(eventSlave.fetish != "buttslut") { - if(eventSlave.vagina != 0 || eventSlave.anus != 0) { - State.variables.RESSevent.push("night visit"); + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.devotion >= -20) { + if (eventSlave.trust >= -20) { + if (eventSlave.energy > 75) { + if (eventSlave.fetish !== "buttslut") { + if (eventSlave.vagina !== 0 || eventSlave.anus !== 0) { + State.variables.RESSevent.push("night visit"); + } } } } } } - } - if (eventSlave.releaseRules == "restrictive" || eventSlave.releaseRules == "chastity") { - if(eventSlave.need) { - if(eventSlave.devotion <= 95) { - if(eventSlave.trust >= -20) { - if((eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") || (eventSlave.dick == 0)) { - State.variables.RESSevent.push("forbidden masturbation"); + if (eventSlave.releaseRules === "restrictive" || eventSlave.releaseRules === "chastity") { + if (eventSlave.need) { + if (eventSlave.devotion <= 95) { + if (eventSlave.trust >= -20) { + if ((eventSlave.dickAccessory !== "chastity" && eventSlave.dickAccessory !== "combined chastity") || (eventSlave.dick === 0)) { + State.variables.RESSevent.push("forbidden masturbation"); + } } } - } - if(eventSlave.devotion >= -20) { - if(eventSlave.trust >= -50) { - State.variables.RESSevent.push("desperately horny"); + if (eventSlave.devotion >= -20) { + if (eventSlave.trust >= -50) { + State.variables.RESSevent.push("desperately horny"); + } } } } - } - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - if(canPenetrate(eventSlave)) { - State.variables.RESSevent.push("slave dick on slave"); + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + if (canPenetrate(eventSlave)) { + State.variables.RESSevent.push("slave dick on slave"); + } } - } - if(eventSlave.muscles > 30) { - if(eventSlave.weight <= 10) { - if(eventSlave.anus != 0 || State.variables.PC.dick == 0) { - if(eventSlave.vagina != 0 || State.variables.PC.dick == 0) { - State.variables.RESSevent.push("muscles"); + if (eventSlave.muscles > 30) { + if (eventSlave.weight <= 10) { + if (eventSlave.anus !== 0 || State.variables.PC.dick === 0) { + if (eventSlave.vagina !== 0 || State.variables.PC.dick === 0) { + State.variables.RESSevent.push("muscles"); + } } } } - } - if(eventSlave.devotion >= -20) { - if(eventSlave.lactation > 1) { - if(canDoVaginal(eventSlave) || canDoAnal(eventSlave)) { - State.variables.RESSevent.push("milkgasm"); + if (eventSlave.devotion >= -20) { + if (eventSlave.lactation > 1) { + if (canDoVaginal(eventSlave) || canDoAnal(eventSlave)) { + State.variables.RESSevent.push("milkgasm"); + } } } - } - if(eventSlave.waist < -95) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust >= -20) { - if(eventSlave.belly < 30000) { - if(eventSlave.weight <= 95) { - State.variables.RESSevent.push("devoted waist"); + if (eventSlave.waist < -95) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust >= -20) { + if (eventSlave.belly < 30000) { + if (eventSlave.weight <= 95) { + State.variables.RESSevent.push("devoted waist"); + } } } } } - } - if(eventSlave.entertainSkill >= 100) { - if(eventSlave.trust > 50) { - if(["serve the public", "serve in the club"].includes(eventSlave.assignment)) { - State.variables.RESSevent.push("masterful entertainer"); + if (eventSlave.entertainSkill >= 100) { + if (eventSlave.trust > 50) { + if (["serve the public", "serve in the club"].includes(eventSlave.assignment)) { + State.variables.RESSevent.push("masterful entertainer"); + } } } - } - if(eventSlave.whoreSkill >= 100) { - if(eventSlave.trust > 50) { - if(["whore", "work in the brothel"].includes(eventSlave.assignment)) { - State.variables.RESSevent.push("masterful whore"); + if (eventSlave.whoreSkill >= 100) { + if (eventSlave.trust > 50) { + if (["whore", "work in the brothel"].includes(eventSlave.assignment)) { + State.variables.RESSevent.push("masterful whore"); + } } } - } - if(eventSlave.dick > 0) { - if(eventSlave.balls == 0) { - if(eventSlave.ovaries == 0) { - if(eventSlave.devotion <= 50) { - if(eventSlave.trust < -50) { - if(eventSlave.anus > 0) { - if(canDoAnal(eventSlave)) { - State.variables.RESSevent.push("resistant gelding"); + if (eventSlave.dick > 0) { + if (eventSlave.balls === 0) { + if (eventSlave.ovaries === 0) { + if (eventSlave.devotion <= 50) { + if (eventSlave.trust < -50) { + if (eventSlave.anus > 0) { + if (canDoAnal(eventSlave)) { + State.variables.RESSevent.push("resistant gelding"); + } } } } } } } - } - if(State.variables.seePreg != 0) { - if(isFertile(eventSlave)) { - if(eventSlave.devotion > 50) { - if(State.variables.PC.dick != 0) { - if(eventSlave.fetish == "pregnancy" || eventSlave.energy > 95) { - if(eventSlave.eggType == "human") { - if(eventSlave.fetishKnown == 1) { - if(eventSlave.vagina != 0) { - if(eventSlave.anus > 0) { - State.variables.RESSevent.push("impregnation please"); + if (State.variables.seePreg !== 0) { + if (isFertile(eventSlave)) { + if (eventSlave.devotion > 50) { + if (State.variables.PC.dick !== 0) { + if (eventSlave.fetish === "pregnancy" || eventSlave.energy > 95) { + if (eventSlave.eggType === "human") { + if (eventSlave.fetishKnown === 1) { + if (eventSlave.vagina !== 0) { + if (eventSlave.anus > 0) { + State.variables.RESSevent.push("impregnation please"); + } } } } @@ -1282,120 +1283,120 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(["large plug", "long, large plug", "huge plug", "long, huge plug"].includes(eventSlave.buttplug)) { - if(eventSlave.assignment != "stay confined" && isSlaveAvailable(eventSlave)) { - if(eventSlave.devotion <= 20) { - if(eventSlave.trust >= -50) { - if(eventSlave.anus < 3) { - State.variables.RESSevent.push("plug disobedience"); + if (["large plug", "long, large plug", "huge plug", "long, huge plug"].includes(eventSlave.buttplug)) { + if (eventSlave.assignment !== "stay confined" && isSlaveAvailable(eventSlave)) { + if (eventSlave.devotion <= 20) { + if (eventSlave.trust >= -50) { + if (eventSlave.anus < 3) { + State.variables.RESSevent.push("plug disobedience"); + } } } } } - } - if(["whore", "serve the public", "work in the brothel", "serve in the club"].includes(eventSlave.assignment)) { - if(eventSlave.vagina != 0) { - if(eventSlave.anus != 0) { - if(canDoAnal(eventSlave)) { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("used whore"); + if (["whore", "serve the public", "work in the brothel", "serve in the club"].includes(eventSlave.assignment)) { + if (eventSlave.vagina !== 0) { + if (eventSlave.anus !== 0) { + if (canDoAnal(eventSlave)) { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("used whore"); + } } } } } - } - if(eventSlave.assignment == "serve the public") { - if(eventSlave.devotion >= -20) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("nice guys"); + if (eventSlave.assignment === "serve the public") { + if (eventSlave.devotion >= -20) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("nice guys"); + } } } - } - if(eventSlave.assignment == "please you") { - if(eventSlave.devotion > 20) { - State.variables.RESSevent.push("lazy evening"); + if (eventSlave.assignment === "please you") { + if (eventSlave.devotion > 20) { + State.variables.RESSevent.push("lazy evening"); + } } - } - if(eventSlave.height < (Height.mean(eventSlave)*0.95)) { - if(eventSlave.physicalAge > 12) { - if(canDoAnal(eventSlave)) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust <= 95) { - State.variables.RESSevent.push("devoted shortstack"); + if (eventSlave.height < (Height.mean(eventSlave) * 0.95)) { + if (eventSlave.physicalAge > 12) { + if (canDoAnal(eventSlave)) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust <= 95) { + State.variables.RESSevent.push("devoted shortstack"); + } } } } } - } - } /* closes amp/crawling exempt */ + } /* closes amp/crawling exempt */ - if(canTalk(eventSlave)) { + if (canTalk(eventSlave)) { - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.boobsImplant > 400) { - if(eventSlave.lipsImplant >= 30) { - if(eventSlave.buttImplant > 3) { - if(eventSlave.boobs < 9000 || eventSlave.butt < 8) { - State.variables.RESSevent.push("surgery addict"); + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.boobsImplant > 400) { + if (eventSlave.lipsImplant >= 30) { + if (eventSlave.buttImplant > 3) { + if (eventSlave.boobs < 9000 || eventSlave.butt < 8) { + State.variables.RESSevent.push("surgery addict"); + } } } } } - } - if(eventSlave.assignment == "please you") { - if(eventSlave.devotion > 20) { - if(eventSlave.trust >= -20) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(!["chastity", "combined chastity"].includes(eventSlave.dickAccessory) || eventSlave.dick == 0) { - if(State.variables.corpIncorporated != 0) { - State.variables.RESSevent.push("shift sleep"); - } - if(canWalk(eventSlave)) { - if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") { - State.variables.RESSevent.push("shift masturbation"); + if (eventSlave.assignment === "please you") { + if (eventSlave.devotion > 20) { + if (eventSlave.trust >= -20) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (!["chastity", "combined chastity"].includes(eventSlave.dickAccessory) || eventSlave.dick === 0) { + if (State.variables.corpIncorporated !== 0) { + State.variables.RESSevent.push("shift sleep"); + } + if (canWalk(eventSlave)) { + if (eventSlave.releaseRules === "permissive" || eventSlave.releaseRules === "masturbation") { + State.variables.RESSevent.push("shift masturbation"); + } + } + if (eventSlave.entertainSkill >= 60) { + State.variables.RESSevent.push("shift doorframe"); } } - if(eventSlave.entertainSkill >= 60) { - State.variables.RESSevent.push("shift doorframe"); - } - } - if(canDoVaginal(eventSlave)) { - if(State.variables.PC.vagina == 1) { - if(eventSlave.dick == 0) { - if(State.variables.fuckSlaves > 2) { - State.variables.RESSevent.push("fucktoy tribbing"); + if (canDoVaginal(eventSlave)) { + if (State.variables.PC.vagina === 1) { + if (eventSlave.dick === 0) { + if (State.variables.fuckSlaves > 2) { + State.variables.RESSevent.push("fucktoy tribbing"); + } } } } } } } - } - } else if(["serve in the master suite", "be your Concubine"].includes(eventSlave.assignment)) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust >= -20) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if((!["chastity", "combined chastity"].includes(eventSlave.dickAccessory)) || (eventSlave.dick == 0)) { - if(State.variables.corpIncorporated != 0) { - State.variables.RESSevent.push("shift sleep"); - } - if(eventSlave.entertainSkill >= 60) { - State.variables.RESSevent.push("shift doorframe"); + } else if (["serve in the master suite", "be your Concubine"].includes(eventSlave.assignment)) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust >= -20) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if ((!["chastity", "combined chastity"].includes(eventSlave.dickAccessory)) || (eventSlave.dick === 0)) { + if (State.variables.corpIncorporated !== 0) { + State.variables.RESSevent.push("shift sleep"); + } + if (eventSlave.entertainSkill >= 60) { + State.variables.RESSevent.push("shift doorframe"); + } } - } - if(canDoVaginal(eventSlave)) { - if(State.variables.PC.vagina == 1) { - if(eventSlave.dick == 0) { - if(State.variables.fuckSlaves > 2) { - State.variables.RESSevent.push("fucktoy tribbing"); + if (canDoVaginal(eventSlave)) { + if (State.variables.PC.vagina === 1) { + if (eventSlave.dick === 0) { + if (State.variables.fuckSlaves > 2) { + State.variables.RESSevent.push("fucktoy tribbing"); + } } } } @@ -1403,572 +1404,572 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount > 900) { - if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount < 1100) { - if(eventSlave.vagina != 0) { - if(eventSlave.anus > 0) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("millenary"); + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.oralCount + eventSlave.vaginalCount + eventSlave.analCount > 900) { + if (eventSlave.oralCount + eventSlave.vaginalCount + eventSlave.analCount < 1100) { + if (eventSlave.vagina !== 0) { + if (eventSlave.anus > 0) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("millenary"); + } } } } } } - } - if(eventSlave.assignment == "stay confined") { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("solitary desperation"); + if (eventSlave.assignment === "stay confined") { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("solitary desperation"); + } } - } - if(eventSlave.speechRules == "restrictive") { - if(eventSlave.devotion > 60) { - if(eventSlave.trust >= -20) { - State.variables.RESSevent.push("restricted profession"); + if (eventSlave.speechRules === "restrictive") { + if (eventSlave.devotion > 60) { + if (eventSlave.trust >= -20) { + State.variables.RESSevent.push("restricted profession"); + } } } - } - if(eventSlave.speechRules == "restrictive") { - if(eventSlave.intelligence > 15) { - if(eventSlave.trust >= -20) { - if(eventSlave.devotion <= 20) { - State.variables.RESSevent.push("restricted smart"); + if (eventSlave.speechRules === "restrictive") { + if (eventSlave.intelligence > 15) { + if (eventSlave.trust >= -20) { + if (eventSlave.devotion <= 20) { + State.variables.RESSevent.push("restricted smart"); + } } } } - } - if(State.variables.expansionRequestsAllowed > 0) { - if(eventSlave.drugs == "no drugs") { - if(eventSlave.speechRules == "permissive") { - if(eventSlave.health > 20) { - if(eventSlave.devotion >= -20) { - if(eventSlave.trust > 20) { - if(State.variables.arcologies[0].FSSlimnessEnthusiast == "unset") { - State.variables.RESSevent.push("injections please"); + if (State.variables.expansionRequestsAllowed > 0) { + if (eventSlave.drugs === "no drugs") { + if (eventSlave.speechRules === "permissive") { + if (eventSlave.health > 20) { + if (eventSlave.devotion >= -20) { + if (eventSlave.trust > 20) { + if (State.variables.arcologies[0].FSSlimnessEnthusiast === "unset") { + State.variables.RESSevent.push("injections please"); + } } } } } } } - } - if(eventSlave.assignment == "serve the public") { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("serve the public devoted"); + if (eventSlave.assignment === "serve the public") { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("serve the public devoted"); + } } } - } - if(eventSlave.behavioralFlaw == "bitchy") { - if(canSee(eventSlave)) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust >= -20) { - State.variables.RESSevent.push("obedient bitchy"); + if (eventSlave.behavioralFlaw === "bitchy") { + if (canSee(eventSlave)) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust >= -20) { + State.variables.RESSevent.push("obedient bitchy"); + } } } } - } - } /* closes mute exempt */ + } /* closes mute exempt */ - if(State.variables.cockFeeder == 0) { - if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20 || eventSlave.trust < -20) { - State.variables.RESSevent.push("obedient idiot"); + if (State.variables.cockFeeder === 0) { + if (eventSlave.intelligence + eventSlave.intelligenceImplant < -50) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -20 || eventSlave.trust < -20) { + State.variables.RESSevent.push("obedient idiot"); + } } } } - } - if(eventSlave.boobs > 25000) { - if(eventSlave.belly < 100000) { - State.variables.RESSevent.push("tittymonster inspection"); + if (eventSlave.boobs > 25000) { + if (eventSlave.belly < 100000) { + State.variables.RESSevent.push("tittymonster inspection"); + } } - } - if(State.variables.assistant > 1) { - if(eventSlave.fetishKnown == 1) { - if(eventSlave.energy > 95) { - if(eventSlave.devotion > 20) { - if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") { - State.variables.RESSevent.push("nympho with assistant"); + if (State.variables.assistant > 1) { + if (eventSlave.fetishKnown === 1) { + if (eventSlave.energy > 95) { + if (eventSlave.devotion > 20) { + if (eventSlave.releaseRules === "permissive" || eventSlave.releaseRules === "masturbation") { + State.variables.RESSevent.push("nympho with assistant"); + } } } } } - } - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - if(eventSlave.assignment == "please you" || eventSlave.assignment == "serve in the master suite" || eventSlave.assignment == "be your Concubine") { - State.variables.RESSevent.push("bed snuggle"); + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + if (eventSlave.assignment === "please you" || eventSlave.assignment === "serve in the master suite" || eventSlave.assignment === "be your Concubine") { + State.variables.RESSevent.push("bed snuggle"); + } } } - } - if(eventSlave.minorInjury == "sore ass") { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("sore ass"); + if (eventSlave.minorInjury === "sore ass") { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("sore ass"); + } } - } - if(eventSlave.sexualFlaw == "hates oral") { - if(State.variables.PC.dick != 0) { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("hates oral"); + if (eventSlave.sexualFlaw === "hates oral") { + if (State.variables.PC.dick !== 0) { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("hates oral"); + } } } - } - if(eventSlave.vagina == 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 20) { - if(eventSlave.speechRules != "restrictive") { - State.variables.RESSevent.push("devoted virgin"); + if (eventSlave.vagina === 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 20) { + if (eventSlave.speechRules !== "restrictive") { + State.variables.RESSevent.push("devoted virgin"); + } } } } - } - if(eventSlave.anus == 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 20) { - if(eventSlave.speechRules != "restrictive") { - State.variables.RESSevent.push("devoted anal virgin"); + if (eventSlave.anus === 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 20) { + if (eventSlave.speechRules !== "restrictive") { + State.variables.RESSevent.push("devoted anal virgin"); + } } } } - } - if(State.variables.seeExtreme == 1) { - if(eventSlave.balls > 1) { - if(eventSlave.scrotum > 0) { - if(eventSlave.devotion <= 20) { - if(eventSlave.trust <= 20) { - if(eventSlave.speechRules != "restrictive") { - State.variables.RESSevent.push("fearful balls"); + if (State.variables.seeExtreme === 1) { + if (eventSlave.balls > 1) { + if (eventSlave.scrotum > 0) { + if (eventSlave.devotion <= 20) { + if (eventSlave.trust <= 20) { + if (eventSlave.speechRules !== "restrictive") { + State.variables.RESSevent.push("fearful balls"); + } } } } } } - } - if(eventSlave.devotion <= 50) { - if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") { - State.variables.RESSevent.push("scrubbing"); + if (eventSlave.devotion <= 50) { + if (eventSlave.assignment === "work as a servant" || eventSlave.assignment === "be a servant") { + State.variables.RESSevent.push("scrubbing"); + } } - } - if(eventSlave.devotion <= 20) { - if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") { - if(eventSlave.clothes == "a slutty maid outfit" || eventSlave.clothes == "a nice maid outfit") { - State.variables.RESSevent.push("servant maid"); + if (eventSlave.devotion <= 20) { + if (eventSlave.assignment === "work as a servant" || eventSlave.assignment === "be a servant") { + if (eventSlave.clothes === "a slutty maid outfit" || eventSlave.clothes === "a nice maid outfit") { + State.variables.RESSevent.push("servant maid"); + } } } - } - if(eventSlave.speechRules != "restrictive") { - if(canDoVaginal(eventSlave)) { - if(eventSlave.fetish != "buttslut") { - if(eventSlave.vagina == 0) { - if(eventSlave.anus != 0) { - if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount > 100) { - State.variables.RESSevent.push("unhappy virgin"); + if (eventSlave.speechRules !== "restrictive") { + if (canDoVaginal(eventSlave)) { + if (eventSlave.fetish !== "buttslut") { + if (eventSlave.vagina === 0) { + if (eventSlave.anus !== 0) { + if (eventSlave.oralCount + eventSlave.vaginalCount + eventSlave.analCount > 100) { + State.variables.RESSevent.push("unhappy virgin"); + } } } } } } - } - if(eventSlave.aphrodisiacs > 1 || eventSlave.inflationType == "aphrodisiac") { - if(eventSlave.speechRules == "restrictive" && eventSlave.releaseRules !== "permissive") { - if(eventSlave.amp != 1) { - State.variables.RESSevent.push("extreme aphrodisiacs"); + if (eventSlave.aphrodisiacs > 1 || eventSlave.inflationType === "aphrodisiac") { + if (eventSlave.speechRules === "restrictive" && eventSlave.releaseRules !== "permissive") { + if (eventSlave.amp !== 1) { + State.variables.RESSevent.push("extreme aphrodisiacs"); + } } } - } - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - if(eventSlave.clit > 2) { - State.variables.RESSevent.push("slave clit on slave"); + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + if (eventSlave.clit > 2) { + State.variables.RESSevent.push("slave clit on slave"); + } } - } - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "chastity") { - if(eventSlave.dick > 4) { - if(eventSlave.amp != 1){ - if(canAchieveErection(eventSlave)) { - if(eventSlave.belly < 10000) { - if(eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") { - State.variables.RESSevent.push("slave dick huge"); + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "chastity") { + if (eventSlave.dick > 4) { + if (eventSlave.amp !== 1) { + if (canAchieveErection(eventSlave)) { + if (eventSlave.belly < 10000) { + if (eventSlave.dickAccessory !== "chastity" && eventSlave.dickAccessory !== "combined chastity") { + State.variables.RESSevent.push("slave dick huge"); + } } } } } } - } - if(eventSlave.heels == 1) { - if(eventSlave.shoes == "heels" || eventSlave.shoes == "extreme heels") { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("heels"); + if (eventSlave.heels === 1) { + if (eventSlave.shoes === "heels" || eventSlave.shoes === "extreme heels") { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("heels"); + } } } - } - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "chastity") { - if(eventSlave.belly < 300000) { - if(eventSlave.anus > 2) { - if(eventSlave.fetish == "buttslut" || eventSlave.energy > 95) { - if(eventSlave.fetish != "none") { - if(canDoAnal(eventSlave)) { - State.variables.RESSevent.push("loose buttslut"); + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "chastity") { + if (eventSlave.belly < 300000) { + if (eventSlave.anus > 2) { + if (eventSlave.fetish === "buttslut" || eventSlave.energy > 95) { + if (eventSlave.fetish !== "none") { + if (canDoAnal(eventSlave)) { + State.variables.RESSevent.push("loose buttslut"); + } } } } } } - } - if(eventSlave.assignment == "whore") { - if(canDoAnal(eventSlave) && (eventSlave.vagina < 0 || canDoVaginal(eventSlave))) { - if(eventSlave.devotion < -20 && eventSlave.trust >= -20) { - State.variables.RESSevent.push("whore rebellious"); + if (eventSlave.assignment === "whore") { + if (canDoAnal(eventSlave) && (eventSlave.vagina < 0 || canDoVaginal(eventSlave))) { + if (eventSlave.devotion < -20 && eventSlave.trust >= -20) { + State.variables.RESSevent.push("whore rebellious"); + } } } - } - if(eventSlave.amp == 1) { - if(eventSlave.devotion > 20) { - if(eventSlave.anus > 0 && canDoAnal(eventSlave)) { - State.variables.RESSevent.push("devoted amp"); + if (eventSlave.amp === 1) { + if (eventSlave.devotion > 20) { + if (eventSlave.anus > 0 && canDoAnal(eventSlave)) { + State.variables.RESSevent.push("devoted amp"); + } + } + if (eventSlave.assignment === "rest") { + State.variables.RESSevent.push("resting amp"); } } - if(eventSlave.assignment == "rest") { - State.variables.RESSevent.push("resting amp"); - } - } - if(eventSlave.boobs < 500) { - if(eventSlave.butt < 3) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion > 20 && eventSlave.trust >= -20) { - if(eventSlave.weight <= 10) { - if(eventSlave.muscles <= 30) { - State.variables.RESSevent.push("obedient girlish"); + if (eventSlave.boobs < 500) { + if (eventSlave.butt < 3) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion > 20 && eventSlave.trust >= -20) { + if (eventSlave.weight <= 10) { + if (eventSlave.muscles <= 30) { + State.variables.RESSevent.push("obedient girlish"); + } } } } } } } - } - if(eventSlave.boobs > 1200) { - if(eventSlave.areolaeShape != "circle") { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("shaped areolae"); + if (eventSlave.boobs > 1200) { + if (eventSlave.areolaeShape !== "circle") { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("shaped areolae"); + } } } - } - if(eventSlave.behavioralFlaw == "arrogant") { - if(eventSlave.devotion < -50) { - if(eventSlave.trust >= -50) { - State.variables.RESSevent.push("rebellious arrogant"); + if (eventSlave.behavioralFlaw === "arrogant") { + if (eventSlave.devotion < -50) { + if (eventSlave.trust >= -50) { + State.variables.RESSevent.push("rebellious arrogant"); + } } } - } - if(State.variables.seePreg != 0) { - if(eventSlave.bellyPreg >= 10000) { - State.variables.RESSevent.push("hugely pregnant"); + if (State.variables.seePreg !== 0) { + if (eventSlave.bellyPreg >= 10000) { + State.variables.RESSevent.push("hugely pregnant"); + } } - } - if(eventSlave.hormoneBalance >= 50) { - if(eventSlave.vagina == -1) { - if(eventSlave.balls >= 0) { - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.devotion <= 50) { - if(eventSlave.fetish != "buttslut") { - if(eventSlave.speechRules == "permissive") { - State.variables.RESSevent.push("hormone dysfunction"); + if (eventSlave.hormoneBalance >= 50) { + if (eventSlave.vagina === -1) { + if (eventSlave.balls >= 0) { + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.devotion <= 50) { + if (eventSlave.fetish !== "buttslut") { + if (eventSlave.speechRules === "permissive") { + State.variables.RESSevent.push("hormone dysfunction"); + } } } } } } } - } - if(eventSlave.vaginaPiercing > 1) { - if(eventSlave.nipplesPiercing > 1) { - if(eventSlave.clitPiercing > 1) { - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.devotion <= 50) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("heavy piercing"); + if (eventSlave.vaginaPiercing > 1) { + if (eventSlave.nipplesPiercing > 1) { + if (eventSlave.clitPiercing > 1) { + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.devotion <= 50) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("heavy piercing"); + } } } } } } - } - if(eventSlave.fetishKnown == 1) { - if(eventSlave.fetish == "cumslut" || eventSlave.energy > 95) { - if(["whore", "serve the public", "work in the brothel", "serve in the club", "work a glory hole"].includes(eventSlave.assignment)) { - if(eventSlave.devotion > 20) { - if(State.variables.PC.dick != 0) { - State.variables.RESSevent.push("cumslut whore"); + if (eventSlave.fetishKnown === 1) { + if (eventSlave.fetish === "cumslut" || eventSlave.energy > 95) { + if (["whore", "serve the public", "work in the brothel", "serve in the club", "work a glory hole"].includes(eventSlave.assignment)) { + if (eventSlave.devotion > 20) { + if (State.variables.PC.dick !== 0) { + State.variables.RESSevent.push("cumslut whore"); + } } } } } - } - if(eventSlave.anus == 0) { - if(eventSlave.devotion < -20) { - if(eventSlave.trust >= -20) { - State.variables.RESSevent.push("resistant anal virgin"); + if (eventSlave.anus === 0) { + if (eventSlave.devotion < -20) { + if (eventSlave.trust >= -20) { + State.variables.RESSevent.push("resistant anal virgin"); + } } } - } - if(eventSlave.relationship == 4) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - State.variables.events.push("RE slave marriage"); + if (eventSlave.relationship === 4) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + State.variables.events.push("RE slave marriage"); + } } } - } - if(State.variables.PC.dick != 0) { - if (eventSlave.bellyPreg >= 300000) { - State.variables.RESSevent.push("hyperpreg stuck"); + if (State.variables.PC.dick !== 0) { + if (eventSlave.bellyPreg >= 300000) { + State.variables.RESSevent.push("hyperpreg stuck"); + } } - } - if(eventSlave.devotion >= 50) { - if(eventSlave.trust <= 20) { - if(canWalk(eventSlave)) { - State.variables.RESSevent.push("devoted fearful slave"); + if (eventSlave.devotion >= 50) { + if (eventSlave.trust <= 20) { + if (canWalk(eventSlave)) { + State.variables.RESSevent.push("devoted fearful slave"); + } } } - } - if(eventSlave.prestige == 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { + if (eventSlave.prestige === 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { - if(eventSlave.entertainSkill >= 100) { - if(eventSlave.assignment == "serve the public") { - State.variables.events.push("RE legendary entertainer"); + if (eventSlave.entertainSkill >= 100) { + if (eventSlave.assignment === "serve the public") { + State.variables.events.push("RE legendary entertainer"); + } } - } - if(eventSlave.whoreSkill >= 100) { - if(eventSlave.assignment == "whore") { - State.variables.events.push("RE legendary whore"); + if (eventSlave.whoreSkill >= 100) { + if (eventSlave.assignment === "whore") { + State.variables.events.push("RE legendary whore"); + } } - } - if(eventSlave.lactation > 0) { - if((eventSlave.boobs-eventSlave.boobsImplant) > 6000) { - if(eventSlave.assignment == "get milked") { - State.variables.events.push("RE legendary cow"); + if (eventSlave.lactation > 0) { + if ((eventSlave.boobs - eventSlave.boobsImplant) > 6000) { + if (eventSlave.assignment === "get milked") { + State.variables.events.push("RE legendary cow"); + } } } - } - if(eventSlave.bellyPreg >= 14000) { - if(eventSlave.broodmother == 0) { - if(eventSlave.births > 10) { - if(eventSlave.assignment == "whore" || eventSlave.assignment == "serve the public") { - if(eventSlave.amp != 1) { - State.variables.events.push("RE legendary womb"); + if (eventSlave.bellyPreg >= 14000) { + if (eventSlave.broodmother === 0) { + if (eventSlave.births > 10) { + if (eventSlave.assignment === "whore" || eventSlave.assignment === "serve the public") { + if (eventSlave.amp !== 1) { + State.variables.events.push("RE legendary womb"); + } } } } } - } - if(eventSlave.balls > 6) { - if(eventSlave.dick > 6) { - if(eventSlave.assignment == "work in the dairy" || eventSlave.assignment == "get milked") { - State.variables.events.push("RE legendary balls"); + if (eventSlave.balls > 6) { + if (eventSlave.dick > 6) { + if (eventSlave.assignment === "work in the dairy" || eventSlave.assignment === "get milked") { + State.variables.events.push("RE legendary balls"); + } } } - } - if(eventSlave.origin == "You sentenced her to enslavement as a punishment for attempted theft of a slave." || eventSlave.origin == "She is an enslaved Daughter of Liberty.") { - if(eventSlave.devotion > 95 && eventSlave.assignment == "please you") { - State.variables.events.push("RE former abolitionist"); + if (eventSlave.origin === "You sentenced her to enslavement as a punishment for attempted theft of a slave." || eventSlave.origin === "She is an enslaved Daughter of Liberty.") { + if (eventSlave.devotion > 95 && eventSlave.assignment === "please you") { + State.variables.events.push("RE former abolitionist"); + } } - } + } } } - } - /* NICKNAME EVENTS */ + /* NICKNAME EVENTS */ - if(State.variables.nicknamesAllowed == 1) { - var toSearch = eventSlave.slaveName.toLowerCase(); - if(toSearch.indexOf("'") == -1) { - if(State.variables.week-eventSlave.weekAcquired >= 4) { - State.variables.events.push("RE nickname"); - State.variables.seed = 0; - } - } /* closes nickname check */ - } /* closes no nicknames option */ + if (State.variables.nicknamesAllowed === 1) { + var toSearch = eventSlave.slaveName.toLowerCase(); + if (toSearch.indexOf("'") === -1) { + if (State.variables.week - eventSlave.weekAcquired >= 4) { + State.variables.events.push("RE nickname"); + State.variables.seed = 0; + } + } /* closes nickname check */ + } /* closes no nicknames option */ -} /* closes mindbreak exempt */ + } /* closes mindbreak exempt */ -if(eventSlave.fetish == "mindbroken") { - if(canWalk(eventSlave)) { - State.variables.RESSevent.push("mindbroken morning"); - } - if(eventSlave.kindness != undefined && eventSlave.kindness >= 100) { - if((isSlaveAvailable(eventSlave) && canWalk(eventSlave)) || (["please you", "serve in the master suite", "be your Concubine"].includes(eventSlave.assignment))) { - if(eventSlave.relationship == -3) { - if(jsRandom(1,200) < eventSlave.kindness) { - State.variables.RESSevent.push("surprising wakeup"); + if (eventSlave.fetish === "mindbroken") { + if (canWalk(eventSlave)) { + State.variables.RESSevent.push("mindbroken morning"); + } + if (eventSlave.kindness !== undefined && eventSlave.kindness >= 100) { + if ((isSlaveAvailable(eventSlave) && canWalk(eventSlave)) || (["please you", "serve in the master suite", "be your Concubine"].includes(eventSlave.assignment))) { + if (eventSlave.relationship === -3) { + if (jsRandom(1, 200) < eventSlave.kindness) { + State.variables.RESSevent.push("surprising wakeup"); + } } } } - } - if(eventSlave.career == "a breeding bull" && eventSlave.assignment == "serve in the master suite" && canPenetrate(eventSlave) && eventSlave.dick >= 5 && eventSlave.amp != 1 && State.variables.PC.vagina == 1 && State.variables.PC.preg == 0 && (eventSlave.muscles > 30 || eventSlave.weight > 30)) { - State.variables.RESSevent.push("breeding bull"); - if(State.variables.PC.fertDrugs > 0) { - State.variables.RESSevent.push("breeding bull"); - State.variables.RESSevent.push("breeding bull"); - } - if(State.variables.PC.forcedFertDrugs > 0) { - State.variables.RESSevent.push("breeding bull"); + if (eventSlave.career === "a breeding bull" && eventSlave.assignment === "serve in the master suite" && canPenetrate(eventSlave) && eventSlave.dick >= 5 && eventSlave.amp !== 1 && State.variables.PC.vagina === 1 && State.variables.PC.preg === 0 && (eventSlave.muscles > 30 || eventSlave.weight > 30)) { State.variables.RESSevent.push("breeding bull"); + if (State.variables.PC.fertDrugs > 0) { + State.variables.RESSevent.push("breeding bull"); + State.variables.RESSevent.push("breeding bull"); + } + if (State.variables.PC.forcedFertDrugs > 0) { + State.variables.RESSevent.push("breeding bull"); + State.variables.RESSevent.push("breeding bull"); + } } } -} -} +}; /* servants spend a lot of time in the penthouse, so should be eligible for a number (but not all) random events */ -window.generateRandomEventPoolServant = function(eventSlave) { +window.generateRandomEventPoolServant = function (eventSlave) { -/* STANDARD EVENTS */ + /* STANDARD EVENTS */ -if(eventSlave.fetish != "mindbroken") { - if(canWalk(eventSlave)) { - if(canTalk(eventSlave)) { + if (eventSlave.fetish !== "mindbroken") { + if (canWalk(eventSlave)) { + if (canTalk(eventSlave)) { - if(State.variables.RECockmilkInterceptionIDs.length > 1 || (State.variables.RECockmilkInterceptionIDs.length == 1 && eventSlave.ID != State.variables.RECockmilkInterceptionIDs[0])){ - if(eventSlave.devotion > 20) { - if (eventSlave.dietCum > 0 || (eventSlave.fetishKnown && eventSlave.fetish == "cumslut")) { - State.variables.RETSevent.push("cockmilk interception"); + if (State.variables.RECockmilkInterceptionIDs.length > 1 || (State.variables.RECockmilkInterceptionIDs.length === 1 && eventSlave.ID !== State.variables.RECockmilkInterceptionIDs[0])) { + if (eventSlave.devotion > 20) { + if (eventSlave.dietCum > 0 || (eventSlave.fetishKnown && eventSlave.fetish === "cumslut")) { + State.variables.RETSevent.push("cockmilk interception"); + } } } - } - if(State.variables.REInterslaveBeggingIDs.length > 1 || (State.variables.REInterslaveBeggingIDs.length == 1 && eventSlave.ID != State.variables.REInterslaveBeggingIDs[0])) { - if(State.variables.universalRulesConsent == 1) { - if(eventSlave.devotion > 20) { - if(eventSlave.energy > 40) { - if(canPenetrate(eventSlave)) { - if(canSee(eventSlave)) { - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - State.variables.RETSevent.push("interslave begging"); + if (State.variables.REInterslaveBeggingIDs.length > 1 || (State.variables.REInterslaveBeggingIDs.length === 1 && eventSlave.ID !== State.variables.REInterslaveBeggingIDs[0])) { + if (State.variables.universalRulesConsent === 1) { + if (eventSlave.devotion > 20) { + if (eventSlave.energy > 40) { + if (canPenetrate(eventSlave)) { + if (canSee(eventSlave)) { + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + State.variables.RETSevent.push("interslave begging"); + } } } } } } } - } - if(State.variables.familyTesting == 0) { - if(eventSlave.devotion > 20) { - if(eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) { - if(eventSlave.relation == "mother") { - if(eventSlave.belly < 100000) { - if(eventSlave.lactation) { - if(eventSlave.nipples != "fuckable") { - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - State.variables.RETSevent.push("incestuous nursing"); + if (State.variables.familyTesting === 0) { + if (eventSlave.devotion > 20) { + if (eventSlave.sexualQuirk === "perverted" || eventSlave.energy > 80) { + if (eventSlave.relation === "mother") { + if (eventSlave.belly < 100000) { + if (eventSlave.lactation) { + if (eventSlave.nipples !== "fuckable") { + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + State.variables.RETSevent.push("incestuous nursing"); + } } } } } } } + } else { + if (eventSlave.devotion > 20 && (eventSlave.sexualQuirk === "perverted" || eventSlave.energy > 80) && eventSlave.belly < 100000 && eventSlave.lactation > 0 && eventSlave.nipples !== "fuckable" && eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity" && eventSlave.daughters > 0) { + State.variables.RETSevent.push("incestuous nursing"); + } } - } else { - if (eventSlave.devotion > 20 && (eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) && eventSlave.belly < 100000 && eventSlave.lactation > 0 && eventSlave.nipples != "fuckable" && eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity" && eventSlave.daughters > 0) { - State.variables.RETSevent.push("incestuous nursing"); - } - } - if(State.variables.assistant > 0) { - if(State.variables.assistantAppearance != "normal") { - if(eventSlave.devotion >= -20) { - if(eventSlave.devotion <= 50) { - if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("PA servant"); + if (State.variables.assistant > 0) { + if (State.variables.assistantAppearance !== "normal") { + if (eventSlave.devotion >= -20) { + if (eventSlave.devotion <= 50) { + if (["be a servant", "work as a servant"].includes(eventSlave.assignment)) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("PA servant"); + } } } } } } - } - if(State.variables.HeadGirl != 0) { - if(eventSlave.devotion <= 50) { - if(eventSlave.anus != 0 && canDoAnal(eventSlave)) { - if(State.variables.HGSeverity >= 0) { - State.variables.events.push("RE anal punishment"); + if (State.variables.HeadGirl !== 0) { + if (eventSlave.devotion <= 50) { + if (eventSlave.anus !== 0 && canDoAnal(eventSlave)) { + if (State.variables.HGSeverity >= 0) { + State.variables.events.push("RE anal punishment"); + } + State.variables.events.push("RE shower punishment"); } - State.variables.events.push("RE shower punishment"); } } - } - if(State.variables.RETasteTestSubIDs.length > 1) { - if(eventSlave.livingRules == "luxurious") { - if(eventSlave.devotion > 20) { - if(eventSlave.energy > 80) { - State.variables.RETSevent.push("taste test"); + if (State.variables.RETasteTestSubIDs.length > 1) { + if (eventSlave.livingRules === "luxurious") { + if (eventSlave.devotion > 20) { + if (eventSlave.energy > 80) { + State.variables.RETSevent.push("taste test"); + } } } } - } - if(eventSlave.relationship > 3) { - var relationshipSlave = State.variables.slaves.find(function(s) { return s.ID == eventSlave.relationshipTarget; }); - if(relationshipSlave.devotion > 20) { - if(canWalk(relationshipSlave)) { - if(canTalk(relationshipSlave)) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - if(relationshipSlave.anus != 0) { - if(relationshipSlave.dick != 1) { - if(relationshipSlave.dick == 0 || canAchieveErection(relationshipSlave)) { - if(relationshipSlave.fetish == "dom" || relationshipSlave.fetish == "sadist") { - State.variables.RETSevent.push("top exhaustion"); + if (eventSlave.relationship > 3) { + var relationshipSlave = State.variables.slaves.find(function (s) { return s.ID === eventSlave.relationshipTarget; }); + if (relationshipSlave.devotion > 20) { + if (canWalk(relationshipSlave)) { + if (canTalk(relationshipSlave)) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + if (relationshipSlave.anus !== 0) { + if (relationshipSlave.dick !== 1) { + if (relationshipSlave.dick === 0 || canAchieveErection(relationshipSlave)) { + if (relationshipSlave.fetish === "dom" || relationshipSlave.fetish === "sadist") { + State.variables.RETSevent.push("top exhaustion"); + } } } } @@ -1978,254 +1979,254 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(State.variables.weatherToday.severity <= 1) { - if(eventSlave.trust > 50) { - if(eventSlave.devotion > 20) { - if(eventSlave.anus != 0 && canDoAnal(eventSlave)) { - if(eventSlave.vagina != 0) { - State.variables.RESSevent.push("confident tanning"); + if (State.variables.weatherToday.severity <= 1) { + if (eventSlave.trust > 50) { + if (eventSlave.devotion > 20) { + if (eventSlave.anus !== 0 && canDoAnal(eventSlave)) { + if (eventSlave.vagina !== 0) { + State.variables.RESSevent.push("confident tanning"); + } } } } } - } - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - var giver = 0; - if(State.variables.HeadGirl == 0) { - giver = 1; - } else if(State.variables.HeadGirl.ID != eventSlave.ID) { - giver = 1; - } - if(giver == 1) { - State.variables.RESSevent.push("a gift"); + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + var giver = 0; + if (State.variables.HeadGirl === 0) { + giver = 1; + } else if (State.variables.HeadGirl.ID !== eventSlave.ID) { + giver = 1; + } + if (giver === 1) { + State.variables.RESSevent.push("a gift"); + } } } - } - if(eventSlave.devotion > 50) { - if(eventSlave.anus > 0) { - if(eventSlave.vagina != 0) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("devoted lotion"); + if (eventSlave.devotion > 50) { + if (eventSlave.anus > 0) { + if (eventSlave.vagina !== 0) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("devoted lotion"); + } } } } - } - if(eventSlave.assignment == "be a servant" || eventSlave.assignment == "work as a servant") { - if(eventSlave.devotion <= 95) { - if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) { - State.variables.RESSevent.push("cooler lockin"); + if (eventSlave.assignment === "be a servant" || eventSlave.assignment === "work as a servant") { + if (eventSlave.devotion <= 95) { + if (eventSlave.intelligence + eventSlave.intelligenceImplant < -50) { + State.variables.RESSevent.push("cooler lockin"); + } } } - } - if(State.variables.universalRulesConsent == 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.fetish == "sadist" || eventSlave.fetish == "dom" || eventSlave.energy > 95) { - if(State.variables.REShowerForceSubIDs.length > 0) { - if(eventSlave.trust <= 75) { - State.variables.RETSevent.push("shower force"); + if (State.variables.universalRulesConsent === 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.fetish === "sadist" || eventSlave.fetish === "dom" || eventSlave.energy > 95) { + if (State.variables.REShowerForceSubIDs.length > 0) { + if (eventSlave.trust <= 75) { + State.variables.RETSevent.push("shower force"); + } } - } - if(eventSlave.anus > 0) { - if(State.variables.RESadisticDescriptionSubIDs.length > 0) { - State.variables.RETSevent.push("sadistic description"); + if (eventSlave.anus > 0) { + if (State.variables.RESadisticDescriptionSubIDs.length > 0) { + State.variables.RETSevent.push("sadistic description"); + } } - } - if(State.variables.cockFeeder > 0) { - if(canPenetrate(eventSlave) || eventSlave.dick == 0) { - State.variables.RESSevent.push("kitchen molestation"); + if (State.variables.cockFeeder > 0) { + if (canPenetrate(eventSlave) || eventSlave.dick === 0) { + State.variables.RESSevent.push("kitchen molestation"); + } } } - } - if(State.variables.REIfYouEnjoyItSubIDs.length > 0) { - State.variables.RETSevent.push("if you enjoy it"); - } - if(State.variables.RESimpleAssaultIDs.length > 0) { - if(canPenetrate(eventSlave)) { - State.variables.RETSevent.push("simple assault"); + if (State.variables.REIfYouEnjoyItSubIDs.length > 0) { + State.variables.RETSevent.push("if you enjoy it"); + } + if (State.variables.RESimpleAssaultIDs.length > 0) { + if (canPenetrate(eventSlave)) { + State.variables.RETSevent.push("simple assault"); + } } } } - } - if(State.variables.boobAccessibility != 1 && State.variables.ballsAccessibility != 1 && State.variables.pregAccessibility != 1) { - if(eventSlave.boobs > 10000) { - if(eventSlave.devotion >= -20) { - if(State.variables.slaves.length > 2) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("huge tits"); + if (State.variables.boobAccessibility !== 1 && State.variables.ballsAccessibility !== 1 && State.variables.pregAccessibility !== 1) { + if (eventSlave.boobs > 10000) { + if (eventSlave.devotion >= -20) { + if (State.variables.slaves.length > 2) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("huge tits"); + } } } } } - } - if(State.variables.seeAge != 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.birthWeek >= 51) { - /* lets give this a much higher chance of appearing */ - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); - State.variables.RESSevent.push("birthday"); + if (State.variables.seeAge !== 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.birthWeek >= 51) { + /* lets give this a much higher chance of appearing */ + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + State.variables.RESSevent.push("birthday"); + } } } } - } - if(eventSlave.slaveName != eventSlave.birthName && eventSlave.birthName !== "") { - if(eventSlave.devotion <= 20) { - if(eventSlave.trust >= -20) { - if(eventSlave.anus > 0 && canDoAnal(eventSlave)) { - State.variables.RESSevent.push("not my name"); + if (eventSlave.slaveName !== eventSlave.birthName && eventSlave.birthName !== "") { + if (eventSlave.devotion <= 20) { + if (eventSlave.trust >= -20) { + if (eventSlave.anus > 0 && canDoAnal(eventSlave)) { + State.variables.RESSevent.push("not my name"); + } } } } - } - if(State.variables.slaves.length > 2) { - if(eventSlave.devotion >= -20) { - if(eventSlave.heels == 1) { - if(eventSlave.shoes == "heels" || eventSlave.shoes == "boots" || eventSlave.shoes == "extreme heels") { - State.variables.RESSevent.push("tendon fall"); + if (State.variables.slaves.length > 2) { + if (eventSlave.devotion >= -20) { + if (eventSlave.heels === 1) { + if (eventSlave.shoes === "heels" || eventSlave.shoes === "boots" || eventSlave.shoes === "extreme heels") { + State.variables.RESSevent.push("tendon fall"); + } } } } - } - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.devotion <= 50) { - if(eventSlave.vagina < 0) { - if(canDoAnal(eventSlave)) { - if(eventSlave.anus > 0) { - if(eventSlave.analSkill <= 30) { - State.variables.RESSevent.push("obedient shemale"); + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.devotion <= 50) { + if (eventSlave.vagina < 0) { + if (canDoAnal(eventSlave)) { + if (eventSlave.anus > 0) { + if (eventSlave.analSkill <= 30) { + State.variables.RESSevent.push("obedient shemale"); + } } } } } } - } - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 20) { - if(eventSlave.physicalAge > 37) { - if(eventSlave.anus > 0) { - if(eventSlave.vagina > 0) { - State.variables.RESSevent.push("devoted old"); + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 20) { + if (eventSlave.physicalAge > 37) { + if (eventSlave.anus > 0) { + if (eventSlave.vagina > 0) { + State.variables.RESSevent.push("devoted old"); + } } } } } - } - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(eventSlave.actualAge > 35) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(State.variables.PC.actualAge < 25) { - State.variables.RESSevent.push("young PC age difference"); + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (eventSlave.actualAge > 35) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (State.variables.PC.actualAge < 25) { + State.variables.RESSevent.push("young PC age difference"); + } } } } } - } - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(eventSlave.actualAge < 22) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(State.variables.PC.actualAge >= 50) { - State.variables.RESSevent.push("old PC age difference"); + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (eventSlave.actualAge < 22) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (State.variables.PC.actualAge >= 50) { + State.variables.RESSevent.push("old PC age difference"); + } } } } } - } - if(eventSlave.fetish == "humiliation" || eventSlave.energy > 95) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(eventSlave.vagina != 0) { - if(eventSlave.anus != 0) { - if(eventSlave.fetishKnown == 1) { - State.variables.RESSevent.push("fearful humiliation"); + if (eventSlave.fetish === "humiliation" || eventSlave.energy > 95) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -20) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (eventSlave.vagina !== 0) { + if (eventSlave.anus !== 0) { + if (eventSlave.fetishKnown === 1) { + State.variables.RESSevent.push("fearful humiliation"); + } } } } } } } - } - if(eventSlave.livingRules == "luxurious") { - if(eventSlave.devotion <= 75) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("newly devoted sunrise"); + if (eventSlave.livingRules === "luxurious") { + if (eventSlave.devotion <= 75) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("newly devoted sunrise"); + } } } - } - if(State.variables.PC.dick == 1) { - if(State.variables.PC.belly < 5000) { - if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) { - if(eventSlave.attrXY <= 35 || eventSlave.behavioralFlaw == "hates men" || eventSlave.sexualFlaw == "repressed") { - if(eventSlave.devotion >= -20) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("frightening dick"); + if (State.variables.PC.dick === 1) { + if (State.variables.PC.belly < 5000) { + if (["be a servant", "work as a servant"].includes(eventSlave.assignment)) { + if (eventSlave.attrXY <= 35 || eventSlave.behavioralFlaw === "hates men" || eventSlave.sexualFlaw === "repressed") { + if (eventSlave.devotion >= -20) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("frightening dick"); + } } } } } } - } - if(State.variables.spa > 0) { - if(eventSlave.boobs > 2000) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("spa boobs"); + if (State.variables.spa > 0) { + if (eventSlave.boobs > 2000) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("spa boobs"); + } } } } } - } - if(eventSlave.lactation > 0) { - if(eventSlave.boobs > 800) { - if(eventSlave.nipples != "fuckable") { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("cow milking"); + if (eventSlave.lactation > 0) { + if (eventSlave.boobs > 800) { + if (eventSlave.nipples !== "fuckable") { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("cow milking"); + } } } } } - } - if(State.variables.arcologies[0].FSSubjugationist != "unset") { - if(eventSlave.race != State.variables.arcologies[0].FSSubjugationistRace) { - if(State.variables.week-eventSlave.weekAcquired > 1) { - if(State.variables.week-eventSlave.weekAcquired < 10) { - if(eventSlave.devotion < -20) { - if(eventSlave.trust >= -20) { - if(eventSlave.health > -20) { - if(eventSlave.race == eventSlave.origRace) { - if(eventSlave.indentureRestrictions < 1) { - State.variables.RESSevent.push("subjugation blues"); + if (State.variables.arcologies[0].FSSubjugationist !== "unset") { + if (eventSlave.race !== State.variables.arcologies[0].FSSubjugationistRace) { + if (State.variables.week - eventSlave.weekAcquired > 1) { + if (State.variables.week - eventSlave.weekAcquired < 10) { + if (eventSlave.devotion < -20) { + if (eventSlave.trust >= -20) { + if (eventSlave.health > -20) { + if (eventSlave.race === eventSlave.origRace) { + if (eventSlave.indentureRestrictions < 1) { + State.variables.RESSevent.push("subjugation blues"); + } } } } @@ -2234,19 +2235,19 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(canTalk(eventSlave)) { - if(eventSlave.dietCum > 0) { - if(eventSlave.diet == "fattening") { - if(eventSlave.trust >= -50) { - if(eventSlave.fetish != "cumslut") { - if(eventSlave.weight < -30) { - if(eventSlave.health > -80) { - if(eventSlave.behavioralFlaw != "anorexic") { - if(eventSlave.sexualFlaw != "self hating") { - if(eventSlave.fetishStrength <= 60 || eventSlave.fetishKnown != 1) { - State.variables.RESSevent.push("too thin for cum diet"); + if (canTalk(eventSlave)) { + if (eventSlave.dietCum > 0) { + if (eventSlave.diet === "fattening") { + if (eventSlave.trust >= -50) { + if (eventSlave.fetish !== "cumslut") { + if (eventSlave.weight < -30) { + if (eventSlave.health > -80) { + if (eventSlave.behavioralFlaw !== "anorexic") { + if (eventSlave.sexualFlaw !== "self hating") { + if (eventSlave.fetishStrength <= 60 || eventSlave.fetishKnown !== 1) { + State.variables.RESSevent.push("too thin for cum diet"); + } } } } @@ -2256,45 +2257,45 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(eventSlave.health > 90) { - if(eventSlave.muscles > 5) { - if(eventSlave.weight <= 30) { - if(eventSlave.weight >= -30) { - if(eventSlave.trust > 50) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("passing declaration"); + if (eventSlave.health > 90) { + if (eventSlave.muscles > 5) { + if (eventSlave.weight <= 30) { + if (eventSlave.weight >= -30) { + if (eventSlave.trust > 50) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("passing declaration"); + } } } } } } - } - if(eventSlave.fetish == "sadist") { - if(eventSlave.fetishStrength > 20) { - if(State.variables.arcadeSlaves > 0) { - if(eventSlave.trust >= -20) { - if(eventSlave.devotion > 50) { - if(eventSlave.belly < 300000) { - State.variables.RESSevent.push("arcade sadist"); + if (eventSlave.fetish === "sadist") { + if (eventSlave.fetishStrength > 20) { + if (State.variables.arcadeSlaves > 0) { + if (eventSlave.trust >= -20) { + if (eventSlave.devotion > 50) { + if (eventSlave.belly < 300000) { + State.variables.RESSevent.push("arcade sadist"); + } } } } } } - } - if(State.variables.PC.vagina == 1) { - if(eventSlave.devotion <= 20) { - if((eventSlave.trust >= -20 && eventSlave.behavioralFlaw == "arrogant") || (eventSlave.trust > 20)) { - if(eventSlave.muscles > 30) { - if(eventSlave.health > 20) { - if(eventSlave.energy > 50) { - if(canPenetrate(eventSlave)) { - if(State.variables.Bodyguard == 0) { - State.variables.RESSevent.push("mutinery attempt"); + if (State.variables.PC.vagina === 1) { + if (eventSlave.devotion <= 20) { + if ((eventSlave.trust >= -20 && eventSlave.behavioralFlaw === "arrogant") || (eventSlave.trust > 20)) { + if (eventSlave.muscles > 30) { + if (eventSlave.health > 20) { + if (eventSlave.energy > 50) { + if (canPenetrate(eventSlave)) { + if (State.variables.Bodyguard === 0) { + State.variables.RESSevent.push("mutinery attempt"); + } } } } @@ -2302,355 +2303,355 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - } /* closes mute exempt */ + } /* closes mute exempt */ - if(eventSlave.devotion > 20) { - if(["ball gag", "bit gag", "dildo gag", "massive dildo gag"].includes(eventSlave.collar)) { - State.variables.RESSevent.push("gagged slave"); + if (eventSlave.devotion > 20) { + if (["ball gag", "bit gag", "dildo gag", "massive dildo gag"].includes(eventSlave.collar)) { + State.variables.RESSevent.push("gagged slave"); + } } - } - if(eventSlave.trust > 20) { - if(eventSlave.devotion > 20) { - if(eventSlave.energy > 40) { - if(eventSlave.belly < 300000) { - if(State.variables.PC.belly < 5000 && State.variables.PC.ballsImplant < 3 && State.variables.PC.balls < 3) { - if(canSee(eventSlave)) { - State.variables.RESSevent.push("comfortable seat"); + if (eventSlave.trust > 20) { + if (eventSlave.devotion > 20) { + if (eventSlave.energy > 40) { + if (eventSlave.belly < 300000) { + if (State.variables.PC.belly < 5000 && State.variables.PC.ballsImplant < 3 && State.variables.PC.balls < 3) { + if (canSee(eventSlave)) { + State.variables.RESSevent.push("comfortable seat"); + } } } } } } - } - if(State.variables.seeAge == 1) { - if(eventSlave.actualAge < 18) { - if(eventSlave.devotion > 20) { - if(eventSlave.ovaries == 1) { - if(eventSlave.pubertyXX == 0) { - if(eventSlave.preg == 0) { - if(eventSlave.physicalAge >= eventSlave.pubertyAgeXX-.5) { - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); - State.variables.RESSevent.push("first period"); + if (State.variables.seeAge === 1) { + if (eventSlave.actualAge < 18) { + if (eventSlave.devotion > 20) { + if (eventSlave.ovaries === 1) { + if (eventSlave.pubertyXX === 0) { + if (eventSlave.preg === 0) { + if (eventSlave.physicalAge >= eventSlave.pubertyAgeXX - .5) { + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + State.variables.RESSevent.push("first period"); + } } } } - } - if(canPenetrate(eventSlave)) { - if(eventSlave.balls > 0) { - if(eventSlave.pubertyXY == 0) { - if(eventSlave.physicalAge >= eventSlave.pubertyAgeXY-.5) { - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); - State.variables.RESSevent.push("wet dreams"); + if (canPenetrate(eventSlave)) { + if (eventSlave.balls > 0) { + if (eventSlave.pubertyXY === 0) { + if (eventSlave.physicalAge >= eventSlave.pubertyAgeXY - .5) { + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + State.variables.RESSevent.push("wet dreams"); + } } } } } } - } - } /* closes aging exemption */ + } /* closes aging exemption */ - if(eventSlave.devotion >= -150) { - if(eventSlave.devotion <= 50) { - State.variables.events.push("RE standard punishment"); + if (eventSlave.devotion >= -150) { + if (eventSlave.devotion <= 50) { + State.variables.events.push("RE standard punishment"); + } } - } - if(eventSlave.trust > 20) { - if(eventSlave.devotion > 50) { - if(State.variables.PC.belly < 5000) { - State.variables.RESSevent.push("shower slip"); - } - if(eventSlave.amp < 0) { - State.variables.RESSevent.push("plimb help"); + if (eventSlave.trust > 20) { + if (eventSlave.devotion > 50) { + if (State.variables.PC.belly < 5000) { + State.variables.RESSevent.push("shower slip"); + } + if (eventSlave.amp < 0) { + State.variables.RESSevent.push("plimb help"); + } } } - } - if(eventSlave.devotion <= 20) { - if(eventSlave.devotion >= -50) { - if(eventSlave.trust >= -20) { - if(State.variables.suppository != 0) { - if(eventSlave.fetish != "buttslut") { - State.variables.RESSevent.push("suppository resistance"); + if (eventSlave.devotion <= 20) { + if (eventSlave.devotion >= -50) { + if (eventSlave.trust >= -20) { + if (State.variables.suppository !== 0) { + if (eventSlave.fetish !== "buttslut") { + State.variables.RESSevent.push("suppository resistance"); + } } - } - if(State.variables.cockFeeder != 0) { - if(eventSlave.fetish != "cumslut") { - State.variables.RESSevent.push("cockfeeder resistance"); + if (State.variables.cockFeeder !== 0) { + if (eventSlave.fetish !== "cumslut") { + State.variables.RESSevent.push("cockfeeder resistance"); + } } } } } - } - if(eventSlave.relationship <= -2) { - if(eventSlave.trust > 50) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("bonded love"); + if (eventSlave.relationship <= -2) { + if (eventSlave.trust > 50) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("bonded love"); + } } } - } - if(eventSlave.trust > 20) { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("objectifying visit"); + if (eventSlave.trust > 20) { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("objectifying visit"); + } } - } - if (canWalk(eventSlave)) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > -10) { - if(eventSlave.ID != State.variables.HeadGirl.ID) { - if(eventSlave.ID != State.variables.Concubine.ID) { - State.variables.RESSevent.push("refreshment delivery"); + if (canWalk(eventSlave)) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > -10) { + if (eventSlave.ID !== State.variables.HeadGirl.ID) { + if (eventSlave.ID !== State.variables.Concubine.ID) { + State.variables.RESSevent.push("refreshment delivery"); + } } } } } - } - if(eventSlave.dick > 8) { - if(eventSlave.balls > 0) { - if(eventSlave.energy > 60) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 50) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(eventSlave.belly < 100000) { - State.variables.RESSevent.push("dick wringing"); + if (eventSlave.dick > 8) { + if (eventSlave.balls > 0) { + if (eventSlave.energy > 60) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 50) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (eventSlave.belly < 100000) { + State.variables.RESSevent.push("dick wringing"); + } } } } } } } - } - if(eventSlave.balls > 0) { - if(eventSlave.scrotum > 0) { - if(eventSlave.dickAccessory == "chastity" || eventSlave.dickAccessory == "combined chastity") { - if(eventSlave.devotion <= 95) { - if(eventSlave.energy > 50) { - if(eventSlave.energy < 95) { - if(eventSlave.devotion >= -20 || eventSlave.trust < -20) { - State.variables.RESSevent.push("cage relief"); + if (eventSlave.balls > 0) { + if (eventSlave.scrotum > 0) { + if (eventSlave.dickAccessory === "chastity" || eventSlave.dickAccessory === "combined chastity") { + if (eventSlave.devotion <= 95) { + if (eventSlave.energy > 50) { + if (eventSlave.energy < 95) { + if (eventSlave.devotion >= -20 || eventSlave.trust < -20) { + State.variables.RESSevent.push("cage relief"); + } } } } } } } - } - if(State.variables.PC.dick > 0) { - if(State.variables.PC.boobs > 0) { - if(canSee(eventSlave)) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20) { - if(((eventSlave.attrXY <= 35) && (eventSlave.attrXX > 65)) || ((eventSlave.attrXX <= 35) && (eventSlave.attrXY > 65))) { - State.variables.RESSevent.push("dickgirl PC"); + if (State.variables.PC.dick > 0) { + if (State.variables.PC.boobs > 0) { + if (canSee(eventSlave)) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -20) { + if (((eventSlave.attrXY <= 35) && (eventSlave.attrXX > 65)) || ((eventSlave.attrXX <= 35) && (eventSlave.attrXY > 65))) { + State.variables.RESSevent.push("dickgirl PC"); + } } } } } } - } - if(eventSlave.energy > 40) { - if(canSee(eventSlave)) { - if(eventSlave.trust >= -50) { - if(eventSlave.devotion > 0) { - if(eventSlave.devotion <= 50) { - if(((eventSlave.attrXX >= 50) && (State.variables.PC.boobs == 1 || State.variables.PC.title == 0) && (State.variables.PC.belly < 5000)) - || ((eventSlave.attrXY >= 50) && (State.variables.PC.dick == 1) && (State.variables.PC.boobs == 0) && (State.variables.PC.belly < 1500)) - || (eventSlave.fetish == "pregnancy" && State.variables.PC.belly >= 5000) - || (eventSlave.fetish == "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) { - State.variables.RESSevent.push("hot PC"); + if (eventSlave.energy > 40) { + if (canSee(eventSlave)) { + if (eventSlave.trust >= -50) { + if (eventSlave.devotion > 0) { + if (eventSlave.devotion <= 50) { + if (((eventSlave.attrXX >= 50) && (State.variables.PC.boobs === 1 || State.variables.PC.title === 0) && (State.variables.PC.belly < 5000)) + || ((eventSlave.attrXY >= 50) && (State.variables.PC.dick === 1) && (State.variables.PC.boobs === 0) && (State.variables.PC.belly < 1500)) + || (eventSlave.fetish === "pregnancy" && State.variables.PC.belly >= 5000) + || (eventSlave.fetish === "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) { + State.variables.RESSevent.push("hot PC"); + } } } } } } - } - if(eventSlave.trust <= 20) { - if(eventSlave.trust >= -75) { - if(eventSlave.devotion <= 30) { - if(eventSlave.devotion >= -20) { - State.variables.RESSevent.push("like me"); + if (eventSlave.trust <= 20) { + if (eventSlave.trust >= -75) { + if (eventSlave.devotion <= 30) { + if (eventSlave.devotion >= -20) { + State.variables.RESSevent.push("like me"); + } } } } - } - if(eventSlave.devotion < -20) { - if(eventSlave.trust >= -20) { - if(eventSlave.clothes == "uncomfortable straps") { - State.variables.RESSevent.push("bondage gear"); + if (eventSlave.devotion < -20) { + if (eventSlave.trust >= -20) { + if (eventSlave.clothes === "uncomfortable straps") { + State.variables.RESSevent.push("bondage gear"); + } } } - } - if(eventSlave.labia > 1 && eventSlave.vagina >= 0) { - if(eventSlave.muscles > 5 || eventSlave.diet == "muscle building") { - if(eventSlave.belly < 10000) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - State.variables.RESSevent.push("inconvenient labia"); + if (eventSlave.labia > 1 && eventSlave.vagina >= 0) { + if (eventSlave.muscles > 5 || eventSlave.diet === "muscle building") { + if (eventSlave.belly < 10000) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + State.variables.RESSevent.push("inconvenient labia"); + } } } } } - } - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.addict > 20) { - if(eventSlave.aphrodisiacs > 0 || eventSlave.inflationType == "aphrodisiac") { - State.variables.RESSevent.push("obedient addict"); + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.addict > 20) { + if (eventSlave.aphrodisiacs > 0 || eventSlave.inflationType === "aphrodisiac") { + State.variables.RESSevent.push("obedient addict"); + } } } - } - if(State.variables.seeExtreme == 1) { - if(eventSlave.devotion < -50) { - if(eventSlave.trust >= -50) { - if(eventSlave.assignment != "stay confined") { - if(eventSlave.heels != 1) { - State.variables.RESSevent.push("escapee"); + if (State.variables.seeExtreme === 1) { + if (eventSlave.devotion < -50) { + if (eventSlave.trust >= -50) { + if (eventSlave.assignment !== "stay confined") { + if (eventSlave.heels !== 1) { + State.variables.RESSevent.push("escapee"); + } } } } } - } - if(eventSlave.devotion <= 50) { - if(eventSlave.trust >= -50) { - if(eventSlave.behavioralFlaw == "gluttonous") { - if(eventSlave.diet == "restricted") { - State.variables.RESSevent.push("diet"); + if (eventSlave.devotion <= 50) { + if (eventSlave.trust >= -50) { + if (eventSlave.behavioralFlaw === "gluttonous") { + if (eventSlave.diet === "restricted") { + State.variables.RESSevent.push("diet"); + } } } } - } - if(eventSlave.devotion <= 20) { - if(eventSlave.devotion >= -50) { - State.variables.RESSevent.push("resistant shower"); + if (eventSlave.devotion <= 20) { + if (eventSlave.devotion >= -50) { + State.variables.RESSevent.push("resistant shower"); + } } - } - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.devotion >= -20) { - if(eventSlave.trust >= -20) { - if(eventSlave.energy > 75) { - if(eventSlave.fetish != "buttslut") { - if(eventSlave.vagina != 0 || eventSlave.anus != 0) { - State.variables.RESSevent.push("night visit"); + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.devotion >= -20) { + if (eventSlave.trust >= -20) { + if (eventSlave.energy > 75) { + if (eventSlave.fetish !== "buttslut") { + if (eventSlave.vagina !== 0 || eventSlave.anus !== 0) { + State.variables.RESSevent.push("night visit"); + } } } } } } - } - if(eventSlave.releaseRules == "restrictive") { - if(eventSlave.need) { - if(eventSlave.devotion <= 95) { - if(eventSlave.trust >= -20) { - if((eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") || (eventSlave.dick == 0)) { - State.variables.RESSevent.push("forbidden masturbation"); + if (eventSlave.releaseRules === "restrictive") { + if (eventSlave.need) { + if (eventSlave.devotion <= 95) { + if (eventSlave.trust >= -20) { + if ((eventSlave.dickAccessory !== "chastity" && eventSlave.dickAccessory !== "combined chastity") || (eventSlave.dick === 0)) { + State.variables.RESSevent.push("forbidden masturbation"); + } } } - } - if(eventSlave.devotion >= -20) { - if(eventSlave.trust >= -50) { - State.variables.RESSevent.push("desperately horny"); + if (eventSlave.devotion >= -20) { + if (eventSlave.trust >= -50) { + State.variables.RESSevent.push("desperately horny"); + } } } } - } - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - if(canPenetrate(eventSlave)) { - State.variables.RESSevent.push("slave dick on slave"); + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + if (canPenetrate(eventSlave)) { + State.variables.RESSevent.push("slave dick on slave"); + } } - } - if(eventSlave.muscles > 30) { - if(eventSlave.weight <= 10) { - if(eventSlave.anus != 0 || State.variables.PC.dick == 0) { - if(eventSlave.vagina != 0 || State.variables.PC.dick == 0) { - State.variables.RESSevent.push("muscles"); + if (eventSlave.muscles > 30) { + if (eventSlave.weight <= 10) { + if (eventSlave.anus !== 0 || State.variables.PC.dick === 0) { + if (eventSlave.vagina !== 0 || State.variables.PC.dick === 0) { + State.variables.RESSevent.push("muscles"); + } } } } - } - if(eventSlave.devotion >= -20) { - if(eventSlave.lactation > 1) { - if(canDoVaginal(eventSlave) || canDoAnal(eventSlave)) { - State.variables.RESSevent.push("milkgasm"); + if (eventSlave.devotion >= -20) { + if (eventSlave.lactation > 1) { + if (canDoVaginal(eventSlave) || canDoAnal(eventSlave)) { + State.variables.RESSevent.push("milkgasm"); + } } } - } - if(eventSlave.waist < -95) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust >= -20) { - if(eventSlave.belly < 30000) { - if(eventSlave.weight <= 95) { - State.variables.RESSevent.push("devoted waist"); + if (eventSlave.waist < -95) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust >= -20) { + if (eventSlave.belly < 30000) { + if (eventSlave.weight <= 95) { + State.variables.RESSevent.push("devoted waist"); + } } } } } - } - if(eventSlave.dick > 0) { - if(eventSlave.balls == 0) { - if(eventSlave.ovaries == 0) { - if(eventSlave.devotion <= 50) { - if(eventSlave.trust < -50) { - if(eventSlave.anus > 0) { - if(canDoAnal(eventSlave)) { - State.variables.RESSevent.push("resistant gelding"); + if (eventSlave.dick > 0) { + if (eventSlave.balls === 0) { + if (eventSlave.ovaries === 0) { + if (eventSlave.devotion <= 50) { + if (eventSlave.trust < -50) { + if (eventSlave.anus > 0) { + if (canDoAnal(eventSlave)) { + State.variables.RESSevent.push("resistant gelding"); + } } } } } } } - } - if(isFertile(eventSlave)) { - if(eventSlave.devotion > 50) { - if(State.variables.PC.dick != 0) { - if(eventSlave.fetish == "pregnancy" || eventSlave.energy > 95) { - if(eventSlave.eggType == "human") { - if(eventSlave.fetishKnown == 1) { - if(eventSlave.vagina != 0) { - if(eventSlave.anus > 0) { - State.variables.RESSevent.push("impregnation please"); + if (isFertile(eventSlave)) { + if (eventSlave.devotion > 50) { + if (State.variables.PC.dick !== 0) { + if (eventSlave.fetish === "pregnancy" || eventSlave.energy > 95) { + if (eventSlave.eggType === "human") { + if (eventSlave.fetishKnown === 1) { + if (eventSlave.vagina !== 0) { + if (eventSlave.anus > 0) { + State.variables.RESSevent.push("impregnation please"); + } } } } @@ -2658,338 +2659,338 @@ if(eventSlave.fetish != "mindbroken") { } } } - } - if(["large plug", "long, large plug", "huge plug", "long, huge plug"].includes(eventSlave.buttplug)) { - if(eventSlave.assignment != "stay confined" && isSlaveAvailable(eventSlave)) { - if(eventSlave.devotion <= 20) { - if(eventSlave.trust >= -50) { - if(eventSlave.anus < 3) { - State.variables.RESSevent.push("plug disobedience"); + if (["large plug", "long, large plug", "huge plug", "long, huge plug"].includes(eventSlave.buttplug)) { + if (eventSlave.assignment !== "stay confined" && isSlaveAvailable(eventSlave)) { + if (eventSlave.devotion <= 20) { + if (eventSlave.trust >= -50) { + if (eventSlave.anus < 3) { + State.variables.RESSevent.push("plug disobedience"); + } } } } } - } - } /* closes amp/crawling exempt */ + } /* closes amp/crawling exempt */ - if(canTalk(eventSlave)) { + if (canTalk(eventSlave)) { - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.boobsImplant > 400) { - if(eventSlave.lipsImplant >= 30) { - if(eventSlave.buttImplant > 3) { - if(eventSlave.boobs < 9000 || eventSlave.butt < 8) { - State.variables.RESSevent.push("surgery addict"); + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.boobsImplant > 400) { + if (eventSlave.lipsImplant >= 30) { + if (eventSlave.buttImplant > 3) { + if (eventSlave.boobs < 9000 || eventSlave.butt < 8) { + State.variables.RESSevent.push("surgery addict"); + } } } } } - } - if(eventSlave.speechRules != "restrictive") { - if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount > 900) { - if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount < 1100) { - if(eventSlave.vagina != 0) { - if(eventSlave.anus > 0) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("millenary"); + if (eventSlave.speechRules !== "restrictive") { + if (eventSlave.oralCount + eventSlave.vaginalCount + eventSlave.analCount > 900) { + if (eventSlave.oralCount + eventSlave.vaginalCount + eventSlave.analCount < 1100) { + if (eventSlave.vagina !== 0) { + if (eventSlave.anus > 0) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("millenary"); + } } } } } } - } - if(State.variables.expansionRequestsAllowed > 0) { - if(eventSlave.drugs == "no drugs") { - if(eventSlave.speechRules == "permissive") { - if(eventSlave.health > 20) { - if(eventSlave.devotion >= -20) { - if(eventSlave.trust > 20) { - if(State.variables.arcologies[0].FSSlimnessEnthusiast == "unset") { - State.variables.RESSevent.push("injections please"); + if (State.variables.expansionRequestsAllowed > 0) { + if (eventSlave.drugs === "no drugs") { + if (eventSlave.speechRules === "permissive") { + if (eventSlave.health > 20) { + if (eventSlave.devotion >= -20) { + if (eventSlave.trust > 20) { + if (State.variables.arcologies[0].FSSlimnessEnthusiast === "unset") { + State.variables.RESSevent.push("injections please"); + } } } } } } } - } - if(eventSlave.behavioralFlaw == "bitchy") { - if(canSee(eventSlave)) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust >= -20) { - State.variables.RESSevent.push("obedient bitchy"); + if (eventSlave.behavioralFlaw === "bitchy") { + if (canSee(eventSlave)) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust >= -20) { + State.variables.RESSevent.push("obedient bitchy"); + } } } } - } - } /* closes mute exempt */ + } /* closes mute exempt */ - if(State.variables.cockFeeder == 0) { - if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion >= -20 || eventSlave.trust < -20) { - State.variables.RESSevent.push("obedient idiot"); + if (State.variables.cockFeeder === 0) { + if (eventSlave.intelligence + eventSlave.intelligenceImplant < -50) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion >= -20 || eventSlave.trust < -20) { + State.variables.RESSevent.push("obedient idiot"); + } } } } - } - if(State.variables.assistant > 1) { - if(eventSlave.fetishKnown == 1) { - if(eventSlave.energy > 95) { - if(eventSlave.devotion > 20) { - if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") { - State.variables.RESSevent.push("nympho with assistant"); + if (State.variables.assistant > 1) { + if (eventSlave.fetishKnown === 1) { + if (eventSlave.energy > 95) { + if (eventSlave.devotion > 20) { + if (eventSlave.releaseRules === "permissive" || eventSlave.releaseRules === "masturbation") { + State.variables.RESSevent.push("nympho with assistant"); + } } } } } - } - if(eventSlave.minorInjury == "sore ass") { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("sore ass"); + if (eventSlave.minorInjury === "sore ass") { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("sore ass"); + } } - } - if(eventSlave.sexualFlaw == "hates oral") { - if(State.variables.PC.dick != 0) { - if(eventSlave.devotion <= 50) { - State.variables.RESSevent.push("hates oral"); + if (eventSlave.sexualFlaw === "hates oral") { + if (State.variables.PC.dick !== 0) { + if (eventSlave.devotion <= 50) { + State.variables.RESSevent.push("hates oral"); + } } } - } - if(eventSlave.vagina == 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 20) { - if(eventSlave.speechRules != "restrictive") { - State.variables.RESSevent.push("devoted virgin"); + if (eventSlave.vagina === 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 20) { + if (eventSlave.speechRules !== "restrictive") { + State.variables.RESSevent.push("devoted virgin"); + } } } } - } - if(eventSlave.anus == 0) { - if(eventSlave.devotion > 50) { - if(eventSlave.trust > 20) { - if(eventSlave.speechRules != "restrictive") { - State.variables.RESSevent.push("devoted anal virgin"); + if (eventSlave.anus === 0) { + if (eventSlave.devotion > 50) { + if (eventSlave.trust > 20) { + if (eventSlave.speechRules !== "restrictive") { + State.variables.RESSevent.push("devoted anal virgin"); + } } } } - } - if(eventSlave.devotion <= 50) { - if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") { - State.variables.RESSevent.push("scrubbing"); + if (eventSlave.devotion <= 50) { + if (eventSlave.assignment === "work as a servant" || eventSlave.assignment === "be a servant") { + State.variables.RESSevent.push("scrubbing"); + } } - } - if(eventSlave.devotion <= 20) { - if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") { - if(eventSlave.clothes == "a slutty maid outfit" || eventSlave.clothes == "a nice maid outfit") { - State.variables.RESSevent.push("servant maid"); + if (eventSlave.devotion <= 20) { + if (eventSlave.assignment === "work as a servant" || eventSlave.assignment === "be a servant") { + if (eventSlave.clothes === "a slutty maid outfit" || eventSlave.clothes === "a nice maid outfit") { + State.variables.RESSevent.push("servant maid"); + } } } - } - if(eventSlave.aphrodisiacs > 1 || eventSlave.inflationType == "aphrodisiac") { - if(eventSlave.speechRules == "restrictive" && eventSlave.releaseRules !== "permissive") { - if(eventSlave.amp != 1) { - State.variables.RESSevent.push("extreme aphrodisiacs"); + if (eventSlave.aphrodisiacs > 1 || eventSlave.inflationType === "aphrodisiac") { + if (eventSlave.speechRules === "restrictive" && eventSlave.releaseRules !== "permissive") { + if (eventSlave.amp !== 1) { + State.variables.RESSevent.push("extreme aphrodisiacs"); + } } } - } - if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") { - if(eventSlave.clit > 2) { - State.variables.RESSevent.push("slave clit on slave"); + if (eventSlave.releaseRules !== "restrictive" && eventSlave.releaseRules !== "masturbation" && eventSlave.releaseRules !== "chastity") { + if (eventSlave.clit > 2) { + State.variables.RESSevent.push("slave clit on slave"); + } } - } - if(eventSlave.releaseRules != "restrictive") { - if(eventSlave.dick > 4) { - if(eventSlave.amp != 1){ - if(canAchieveErection(eventSlave)) { - if(eventSlave.belly < 10000) { - if(eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") { - State.variables.RESSevent.push("slave dick huge"); + if (eventSlave.releaseRules !== "restrictive") { + if (eventSlave.dick > 4) { + if (eventSlave.amp !== 1) { + if (canAchieveErection(eventSlave)) { + if (eventSlave.belly < 10000) { + if (eventSlave.dickAccessory !== "chastity" && eventSlave.dickAccessory !== "combined chastity") { + State.variables.RESSevent.push("slave dick huge"); + } } } } } } - } - if(eventSlave.heels == 1) { - if(eventSlave.shoes == "heels" || eventSlave.shoes == "extreme heels") { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("heels"); + if (eventSlave.heels === 1) { + if (eventSlave.shoes === "heels" || eventSlave.shoes === "extreme heels") { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("heels"); + } } } - } - if(eventSlave.releaseRules != "restrictive") { - if(eventSlave.belly < 300000) { - if(eventSlave.anus > 2) { - if(eventSlave.fetish == "buttslut" || eventSlave.energy > 95) { - if(eventSlave.fetish != "none") { - if(canDoAnal(eventSlave)) { - State.variables.RESSevent.push("loose buttslut"); + if (eventSlave.releaseRules !== "restrictive") { + if (eventSlave.belly < 300000) { + if (eventSlave.anus > 2) { + if (eventSlave.fetish === "buttslut" || eventSlave.energy > 95) { + if (eventSlave.fetish !== "none") { + if (canDoAnal(eventSlave)) { + State.variables.RESSevent.push("loose buttslut"); + } } } } } } - } - if(eventSlave.boobs < 500) { - if(eventSlave.butt < 3) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - if(eventSlave.devotion <= 50) { - if(eventSlave.devotion > 20 && eventSlave.trust >= -20) { - if(eventSlave.weight <= 10) { - if(eventSlave.muscles <= 30) { - State.variables.RESSevent.push("obedient girlish"); + if (eventSlave.boobs < 500) { + if (eventSlave.butt < 3) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + if (eventSlave.devotion <= 50) { + if (eventSlave.devotion > 20 && eventSlave.trust >= -20) { + if (eventSlave.weight <= 10) { + if (eventSlave.muscles <= 30) { + State.variables.RESSevent.push("obedient girlish"); + } } } } } } } - } - if(eventSlave.boobs > 1200) { - if(eventSlave.areolaeShape != "circle") { - if(eventSlave.devotion > 50) { - State.variables.RESSevent.push("shaped areolae"); + if (eventSlave.boobs > 1200) { + if (eventSlave.areolaeShape !== "circle") { + if (eventSlave.devotion > 50) { + State.variables.RESSevent.push("shaped areolae"); + } } } - } - if(eventSlave.bellyPreg >= 10000) { - State.variables.RESSevent.push("hugely pregnant"); - } + if (eventSlave.bellyPreg >= 10000) { + State.variables.RESSevent.push("hugely pregnant"); + } - if(eventSlave.hormoneBalance >= 50) { - if(eventSlave.vagina == -1) { - if(eventSlave.balls >= 0) { - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.devotion <= 50) { - if(eventSlave.fetish != "buttslut") { - if(eventSlave.speechRules == "permissive") { - State.variables.RESSevent.push("hormone dysfunction"); + if (eventSlave.hormoneBalance >= 50) { + if (eventSlave.vagina === -1) { + if (eventSlave.balls >= 0) { + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.devotion <= 50) { + if (eventSlave.fetish !== "buttslut") { + if (eventSlave.speechRules === "permissive") { + State.variables.RESSevent.push("hormone dysfunction"); + } } } } } } } - } - if(eventSlave.vaginaPiercing > 1) { - if(eventSlave.nipplesPiercing > 1) { - if(eventSlave.clitPiercing > 1) { - if(eventSlave.devotion > 20 || eventSlave.trust < -20) { - if(eventSlave.devotion <= 50) { - if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { - State.variables.RESSevent.push("heavy piercing"); + if (eventSlave.vaginaPiercing > 1) { + if (eventSlave.nipplesPiercing > 1) { + if (eventSlave.clitPiercing > 1) { + if (eventSlave.devotion > 20 || eventSlave.trust < -20) { + if (eventSlave.devotion <= 50) { + if (canDoAnal(eventSlave) || canDoVaginal(eventSlave)) { + State.variables.RESSevent.push("heavy piercing"); + } } } } } } - } - if(eventSlave.anus == 0) { - if(eventSlave.devotion < -20) { - if(eventSlave.trust >= -20) { - State.variables.RESSevent.push("resistant anal virgin"); + if (eventSlave.anus === 0) { + if (eventSlave.devotion < -20) { + if (eventSlave.trust >= -20) { + State.variables.RESSevent.push("resistant anal virgin"); + } } } - } - if(State.variables.PC.dick != 0) { - if (eventSlave.bellyPreg >= 300000) { - State.variables.RESSevent.push("hyperpreg stuck"); + if (State.variables.PC.dick !== 0) { + if (eventSlave.bellyPreg >= 300000) { + State.variables.RESSevent.push("hyperpreg stuck"); + } } - } - if(eventSlave.devotion >= 50) { - if(eventSlave.trust <= 20) { - if(canWalk(eventSlave)) { - State.variables.RESSevent.push("devoted fearful slave"); + if (eventSlave.devotion >= 50) { + if (eventSlave.trust <= 20) { + if (canWalk(eventSlave)) { + State.variables.RESSevent.push("devoted fearful slave"); + } } } - } - if(eventSlave.relationship == 4) { - if(eventSlave.devotion > 20) { - if(eventSlave.trust > 20) { - State.variables.events.push("RE slave marriage"); + if (eventSlave.relationship === 4) { + if (eventSlave.devotion > 20) { + if (eventSlave.trust > 20) { + State.variables.events.push("RE slave marriage"); + } } } - } - /* NICKNAME EVENTS */ + /* NICKNAME EVENTS */ - if(State.variables.nicknamesAllowed == 1) { - var toSearch = eventSlave.slaveName.toLowerCase(); - if(toSearch.indexOf("'") == -1) { - if(State.variables.week-eventSlave.weekAcquired >= 4) { - State.variables.events.push("RE nickname"); - State.variables.seed = 0; - } - } /* closes nickname check */ - } /* closes no nicknames option */ + if (State.variables.nicknamesAllowed === 1) { + var toSearch = eventSlave.slaveName.toLowerCase(); + if (toSearch.indexOf("'") === -1) { + if (State.variables.week - eventSlave.weekAcquired >= 4) { + State.variables.events.push("RE nickname"); + State.variables.seed = 0; + } + } /* closes nickname check */ + } /* closes no nicknames option */ -} /* closes mindbreak exempt */ + } /* closes mindbreak exempt */ -if(eventSlave.fetish == "mindbroken") { - if(canWalk(eventSlave)) { - State.variables.RESSevent.push("mindbroken morning"); - } - if(eventSlave.kindness != undefined && eventSlave.kindness >= 100) { - if((isSlaveAvailable(eventSlave) && canWalk(eventSlave)) || (["please you", "serve in the master suite", "be your Concubine"].includes(eventSlave.assignment))) { - if(eventSlave.relationship == -3) { - if(jsRandom(1,200) < eventSlave.kindness) { - State.variables.RESSevent.push("surprising wakeup"); + if (eventSlave.fetish === "mindbroken") { + if (canWalk(eventSlave)) { + State.variables.RESSevent.push("mindbroken morning"); + } + if (eventSlave.kindness !== undefined && eventSlave.kindness >= 100) { + if ((isSlaveAvailable(eventSlave) && canWalk(eventSlave)) || (["please you", "serve in the master suite", "be your Concubine"].includes(eventSlave.assignment))) { + if (eventSlave.relationship === -3) { + if (jsRandom(1, 200) < eventSlave.kindness) { + State.variables.RESSevent.push("surprising wakeup"); + } } } } } -} -} +}; -window.populateEventArray = function(RESS = State.variables.RESSevent.length, RESSTR = State.variables.RESSTRevent.length, RETS = State.variables.RETSevent.length, RECI = State.variables.RECIevent.length) { +window.populateEventArray = function (RESS = State.variables.RESSevent.length, RESSTR = State.variables.RESSTRevent.length, RETS = State.variables.RETSevent.length, RECI = State.variables.RECIevent.length) { /* EVENT RANDOMIZATION */ var events = State.variables.events; + var i = 0; - for(var i = 0; i < RESS; i++) { + for (i = 0; i < RESS; i++) { events.push("RESS"); } - for(var i = 0; i < RESSTR; i++) { + for (i = 0; i < RESSTR; i++) { events.push("RESSTR"); } - for(var i = 0; i < RETS; i++) { + for (i = 0; i < RETS; i++) { events.push("RETS"); } - for(var i = 0; i < RECI; i++) { + for (i = 0; i < RECI; i++) { events.push("RECI"); } - if(events.length == 0) { + if (events.length === 0) { events.push("RE no event"); } return events; -} +}; diff --git a/src/js/extendedFamilyModeJS.js b/src/js/extendedFamilyModeJS.js index 64b0ffd1242bbe6dda6c6ea7272cc116ee3bfe01..805f26b5a82fd5e0a56db4942456ad37fc14ecb3 100644 --- a/src/js/extendedFamilyModeJS.js +++ b/src/js/extendedFamilyModeJS.js @@ -1,19 +1,19 @@ /* see documentation for details /devNotes/Extended Family Mode Explained.txt */ window.isMotherP = function isMotherP(daughter, mother) { - return daughter.mother === mother.ID -} + return daughter.mother === mother.ID; +}; window.isFatherP = function isFatherP(daughter, father) { - return daughter.father === father.ID -} + return daughter.father === father.ID; +}; window.isParentP = function isParentP(daughter, parent) { - return isMotherP(daughter,parent) || isFatherP(daughter,parent) -} + return isMotherP(daughter, parent) || isFatherP(daughter, parent); +}; window.sameDad = function(slave1, slave2){ - if ((slave1.father == slave2.father) && (slave1.father != 0 && slave1.father != -2)) { + if ((slave1.father === slave2.father) && (slave1.father !== 0 && slave1.father !== -2)) { return true; } else { return false; @@ -21,7 +21,7 @@ window.sameDad = function(slave1, slave2){ }; window.sameMom = function(slave1, slave2){ - if ((slave1.mother == slave2.mother) && (slave1.mother != 0 && slave1.mother != -2)) { + if ((slave1.mother === slave2.mother) && (slave1.mother !== 0 && slave1.mother !== -2)) { return true; } else { return false; @@ -30,11 +30,11 @@ window.sameMom = function(slave1, slave2){ // testtest catches the case if a mother is a father or a father a mother - thank you familyAnon, for this code window.sameTParent = function(slave1, slave2) { - if (slave1.mother == -1 && slave1.father == -1 && slave2.mother == -1 && slave2.father == -1) { + if (slave1.mother === -1 && slave1.father === -1 && slave2.mother === -1 && slave2.father === -1) { return 1; - } else if (slave1.mother == slave2.father && slave1.father == slave2.mother && slave1.mother != 0 && slave1.mother != -2 && slave1.father != 0 && slave1.father != -2 && slave1.mother != slave1.father) { + } else if (slave1.mother === slave2.father && slave1.father === slave2.mother && slave1.mother !== 0 && slave1.mother !== -2 && slave1.father !== 0 && slave1.father !== -2 && slave1.mother !== slave1.father) { return 2; - } else if ((slave1.mother == slave2.father || slave1.father == slave2.mother) && slave1.mother != 0 && slave1.mother != -2 && slave2.mother != 0 && slave2.mother != -2 && slave1.mother != slave1.father) { + } else if ((slave1.mother === slave2.father || slave1.father === slave2.mother) && slave1.mother !== 0 && slave1.mother !== -2 && slave2.mother !== 0 && slave2.mother !== -2 && slave1.mother !== slave1.father) { return 3; } else { return 0; @@ -56,7 +56,7 @@ window.areTwins = function(slave1, slave2) { return false; } else if (!sameMom(slave1, slave2)) { return false; - } else if (slave1.actualAge == slave2.actualAge && slave1.birthWeek == slave2.birthWeek) { + } else if (slave1.actualAge === slave2.actualAge && slave1.birthWeek === slave2.birthWeek) { return true; } else { return false; @@ -64,21 +64,21 @@ window.areTwins = function(slave1, slave2) { }; window.areSisters = function(slave1, slave2) { - if (slave1.ID == slave2.ID) { + if (slave1.ID === slave2.ID) { return 0; //you are not your own sister - } else if (((slave1.father == 0) || (slave1.father == -2)) && ((slave1.mother == 0) || (slave1.mother == -2))) { + } else if (((slave1.father === 0) || (slave1.father === -2)) && ((slave1.mother === 0) || (slave1.mother === -2))) { return 0; //not related } else { if (!sameDad(slave1, slave2) && sameMom(slave1, slave2)) { return 3; //half sisters } else if (sameDad(slave1, slave2) && !sameMom(slave1, slave2)) { return 3; //half sisters - } else if (sameTParent(slave1, slave2) == 3) { + } else if (sameTParent(slave1, slave2) === 3) { return 3; //half sisters - } else if (sameTParent(slave1, slave2) == 2) { + } else if (sameTParent(slave1, slave2) === 2) { return 2; //sisters } else if (sameDad(slave1, slave2) && sameMom(slave1, slave2)) { - if (slave1.actualAge == slave2.actualAge && slave1.birthWeek == slave2.birthWeek) { + if (slave1.actualAge === slave2.actualAge && slave1.birthWeek === slave2.birthWeek) { return 1; //twins } else { return 2; //sisters @@ -113,57 +113,57 @@ window.areSisters = function(c1, c2) { } */ -window.areRelated = function(slave1, slave2) { - return (slave1.father == slave2.ID || slave1.mother == slave2.ID || slave2.father == slave1.ID || slave2.mother == slave1.ID || areSisters(slave1, slave2) > 0); -} +window.areRelated = function (slave1, slave2) { + return (slave1.father === slave2.ID || slave1.mother === slave2.ID || slave2.father === slave1.ID || slave2.mother === slave1.ID || areSisters(slave1, slave2) > 0); +}; window.totalRelatives = function(slave) { var relatives = 0; if (slave.mother > 0) { - relatives += 1 + relatives += 1; } if (slave.father > 0) { - relatives += 1 + relatives += 1; } if (slave.daughters > 0) { - relatives += slave.daughters + relatives += slave.daughters; } if (slave.sisters > 0) { - relatives += slave.sisters + relatives += slave.sisters; } - return relatives + return relatives; }; -window.mutualChildren = function(slave1, slave2, slaves) { - return slaves.filter(function(s) { return s.ID != slave1.ID && s.ID != slave2.ID && s.mother > 0 && s.father > 0 && ((s.mother == slave1.ID && s.father == slave2.ID) || (s.mother == slave2.ID && s.father == slave1.ID)); }).length; -} +window.mutualChildren = function (slave1, slave2, slaves) { + return slaves.filter(function (s) { return s.ID !== slave1.ID && s.ID !== slave2.ID && s.mother > 0 && s.father > 0 && ((s.mother === slave1.ID && s.father === slave2.ID) || (s.mother === slave2.ID && s.father === slave1.ID)); }).length; +}; window.isSlaveAvailable = function(slave) { if (!slave) { return null; - } else if (slave.assignment == "be your agent") { + } else if (slave.assignment === "be your agent") { return false; - } else if (slave.assignment == "live with your agent") { + } else if (slave.assignment === "live with your agent") { return false; - } else if (slave.assignment == "be confined in the arcade") { + } else if (slave.assignment === "be confined in the arcade") { return false; - } else if (slave.assignment == "work in the dairy" && State.variables.DairyRestraintsSetting >= 2) { + } else if (slave.assignment === "work in the dairy" && State.variables.DairyRestraintsSetting >= 2) { return false; } else { return true; } }; -if (typeof DairyRestraintsSetting == "undefined") { +if (typeof DairyRestraintsSetting === "undefined") { var DairyRestraintsSetting = { setSetting: function (setting) { - setting = Number(setting) - return setting + setting = Number(setting); + return setting; } }; // Raise namespace scope to Global. window.DairyRestraintsSetting = DairyRestraintsSetting; -}; +} /* OLD window.randomRelatedSlave = function(slave, filterFunction) { @@ -173,89 +173,89 @@ window.randomRelatedSlave = function(slave, filterFunction) { } */ -window.randomRelatedSlave = function(slave, filterFunction) { - if(!slave || !SugarCube) { return undefined; } - if(typeof filterFunction !== 'function') { - filterFunction = function(s, index, array) { return true; }; +window.randomRelatedSlave = function (slave, filterFunction) { + if (!slave || !SugarCube) { return undefined; } + if (typeof filterFunction !== 'function') { + filterFunction = function (/*s, index, array*/) { return true; }; } - var arr = State.variables.slaves.filter(filterFunction) - arr.shuffle() - return arr.find(function(s, index, array) { - return areSisters(slave, s) - || slave.ID === s.mother - || slave.ID === s.father - || s.ID === slave.mother - || s.ID === slave.father; - }) -} + var arr = State.variables.slaves.filter(filterFunction); + arr.shuffle(); + return arr.find(function (s) { + return areSisters(slave, s) + || slave.ID === s.mother + || slave.ID === s.father + || s.ID === slave.mother + || s.ID === slave.father; + }); +}; -window.randomRelatedAvailableSlave = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s); }); -} +window.randomRelatedAvailableSlave = function (slave) { + return randomRelatedSlave(slave, function (s) { return isSlaveAvailable(s); }); +}; -window.randomSister = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return areSisters(slave, s); }); -} +window.randomSister = function (slave) { + return randomRelatedSlave(slave, function (s) { return areSisters(slave, s); }); +}; window.randomTwinSister = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return areSisters(slave, s) == 1; }); -} + return randomRelatedSlave(slave, function(s) { return areSisters(slave, s) === 1; }); +}; -window.randomAvailableSister = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && areSisters(slave, s); }); -} +window.randomAvailableSister = function (slave) { + return randomRelatedSlave(slave, function (s) { return isSlaveAvailable(s) && areSisters(slave, s); }); +}; -window.randomAvailableTwinSister = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && areSisters(slave, s) == 1; }); -} +window.randomAvailableTwinSister = function (slave) { + return randomRelatedSlave(slave, function (s) { return isSlaveAvailable(s) && areSisters(slave, s) === 1; }); +}; -window.randomDaughter = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return s.mother == slave.ID || s.father == slave.ID; }); -} +window.randomDaughter = function (slave) { + return randomRelatedSlave(slave, function (s) { return s.mother === slave.ID || s.father === slave.ID; }); +}; -window.randomAvailableDaughter = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && (s.mother == slave.ID || s.father == slave.ID); }); -} +window.randomAvailableDaughter = function (slave) { + return randomRelatedSlave(slave, function (s) { return isSlaveAvailable(s) && (s.mother === slave.ID || s.father === slave.ID); }); +}; -window.randomParent = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return s.ID == slave.mother || s.ID == slave.father; }); -} +window.randomParent = function (slave) { + return randomRelatedSlave(slave, function (s) { return s.ID === slave.mother || s.ID === slave.father; }); +}; -window.randomAvailableParent = function(slave) { - return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && (s.ID == slave.mother || s.ID == slave.father); }); -} +window.randomAvailableParent = function (slave) { + return randomRelatedSlave(slave, function (s) { return isSlaveAvailable(s) && (s.ID === slave.mother || s.ID === slave.father); }); +}; window.totalPlayerRelatives = function(pc) { var relatives = 0; if (pc.mother > 0) { - relatives += 1 + relatives += 1; } if (pc.father > 0) { - relatives += 1 + relatives += 1; } if (pc.daughters > 0) { - relatives += pc.daughters + relatives += pc.daughters; } if (pc.sisters > 0) { - relatives += pc.sisters + relatives += pc.sisters; } - return relatives + return relatives; }; -window.relativeTerm = function(slave1, slave2) { - if(slave2.mother == slave1.ID || slave2.father == slave1.ID) { +window.relativeTerm = function (slave1, slave2) { + if (slave2.mother === slave1.ID || slave2.father === slave1.ID) { return "daughter"; - } else if(slave1.mother == slave2.ID) { + } else if (slave1.mother === slave2.ID) { return "mother"; - } else if(slave1.father == slave2.ID) { + } else if (slave1.father === slave2.ID) { return "father"; - } else if(areSisters(slave2, slave1) == 1) { + } else if (areSisters(slave2, slave1) === 1) { return "twin"; - } else if(areSisters(slave2, slave1) == 2) { + } else if (areSisters(slave2, slave1) === 2) { return "sister"; - } else if(areSisters(slave2, slave1) == 3) { + } else if (areSisters(slave2, slave1) === 3) { return "half-sister"; } else { return "some unknown blood connection"; } -} +}; diff --git a/src/js/familyTreeJS.js b/src/js/familyTreeJS.js index 2a56df06e0424f6913e09cbe5d147c5fb8c05c3c..fb8943b8a05fe46b9b5bde9a4c13867c8ebbc0fb 100644 --- a/src/js/familyTreeJS.js +++ b/src/js/familyTreeJS.js @@ -1,5 +1,3 @@ -'use strict'; - var lastActiveSlave, lastSlaves, lastPC; /* @@ -17,6 +15,7 @@ var lastActiveSlave, lastSlaves, lastPC; */ window.renderFamilyTree = function(slaves, filterID) { + 'use strict'; var ftreeWidth,ftreeHeight; var chartWidth, chartHeight; @@ -27,7 +26,6 @@ window.renderFamilyTree = function(slaves, filterID) { .attr('id','ftree-canvas'); var chartLayer = svg.append('g').classed('chartLayer', true); - var range = 100; var data = buildFamilyTree(slaves, filterID); initFtreeSVG(data); @@ -47,15 +45,15 @@ window.renderFamilyTree = function(slaves, filterID) { ftreeHeight = 1200; } - margin = {top:0, left:0, bottom:0, right:0 } + margin = { top: 0, left: 0, bottom: 0, right: 0 }; - chartWidth = ftreeWidth - (margin.left+margin.right) - chartHeight = ftreeHeight - (margin.top+margin.bottom) + chartWidth = ftreeWidth - (margin.left + margin.right); + chartHeight = ftreeHeight - (margin.top + margin.bottom); - svg.attr('width', ftreeWidth).attr('height', ftreeHeight) + svg.attr('width', ftreeWidth).attr('height', ftreeHeight); - var defs = svg.append('defs'); + svg.append('defs'); svg.append('defs').append('marker') .attr('id','arrowhead') @@ -74,17 +72,17 @@ window.renderFamilyTree = function(slaves, filterID) { chartLayer .attr('width', chartWidth) .attr('height', chartHeight) - .attr('transform', 'translate('+[margin.left, margin.top]+')') + .attr('transform', 'translate('+[margin.left, margin.top]+')'); } function runFtreeSim(data) { var simulation = d3.forceSimulation() - .force('link', d3.forceLink().id(function(d) { return d.index })) - .force('collide',d3.forceCollide( function(d){ return 60; }).iterations(4) ) + .force('link', d3.forceLink().id(function (d) { return d.index; })) + .force('collide', d3.forceCollide(function (d) { return 60; }).iterations(4)) .force('charge', d3.forceManyBody().strength(-200).distanceMin(100).distanceMax(1000)) .force('center', d3.forceCenter(chartWidth / 2, chartHeight / 2)) .force('y', d3.forceY(100)) - .force('x', d3.forceX(200)) + .force('x', d3.forceX(200)); var link = svg.append('g') .attr('class', 'link') @@ -94,9 +92,9 @@ window.renderFamilyTree = function(slaves, filterID) { .append('line') .attr('marker-end','url(#arrowhead)') .attr('stroke', function(d) { - if(d.type == 'homologous') { + if(d.type === 'homologous') { return '#862d59'; - } else if(d.type == 'paternal') { + } else if(d.type === 'paternal') { return '#24478f'; } else { return '#aa909b'; @@ -115,7 +113,7 @@ window.renderFamilyTree = function(slaves, filterID) { .on('end', dragended)); node.append('circle') - .attr('r', function(d){ return d.r }) + .attr('r', function (d) { return d.r; }) .attr('stroke', function(d) { if(d.ID == filterID) { return '#ffff20'; @@ -131,14 +129,14 @@ window.renderFamilyTree = function(slaves, filterID) { var ssym; if(d.ID == -1) { if(d.dick == 1 && d.vagina == 1) { - ssym = '☿' + ssym = '☿'; } else if (d.dick == 1) { ssym = '♂'; } else if (d.vagina == 1) { ssym = '♀'; } } else if (d.dick > 0 && d.vagina > -1) { - ssym = '☿' + ssym = '☿'; } else if (d.dick > 0) { ssym = '♂'; } else if (d.vagina > -1) { @@ -165,19 +163,19 @@ window.renderFamilyTree = function(slaves, filterID) { } }); - var circles = svg.selectAll('.node-circle'); - var texts = svg.selectAll('.node-text'); + svg.selectAll('.node-circle'); + svg.selectAll('.node-text'); - var ticked = function() { + var ticked = function () { link - .attr('x1', function(d) { return d.source.x; }) - .attr('y1', function(d) { return d.source.y; }) - .attr('x2', function(d) { return d.target.x; }) - .attr('y2', function(d) { return d.target.y; }); + .attr('x1', function (d) { return d.source.x; }) + .attr('y1', function (d) { return d.source.y; }) + .attr('x2', function (d) { return d.target.x; }) + .attr('y2', function (d) { return d.target.y; }); node - .attr("transform", function (d) {return "translate(" + d.x + ", " + d.y + ")";}); - } + .attr("transform", function (d) { return "translate(" + d.x + ", " + d.y + ")"; }); + }; simulation.nodes(data.nodes) .on('tick', ticked); @@ -558,12 +556,12 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS return; if (child.father == slave.ID) { if(!spouseToChild[child.mother]) { - spouseToChild[child.mother] = [] + spouseToChild[child.mother] = []; } spouseToChild[child.mother].push(child); } else if (child.mother == slave.ID) { if(!spouseToChild[child.father]) { - spouseToChild[child.father] = [] + spouseToChild[child.father] = []; } spouseToChild[child.father].push(child); } @@ -591,7 +589,7 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS } var marriage = { "spouse": {"name": spouseName, "class": spouse.genes}, - "children": children.map(function(x) { return slaveInfo_(x, activeSlaveId, slavesAdded, depth+1)} ), + "children": children.map(function (x) { return slaveInfo_(x, activeSlaveId, slavesAdded, depth + 1);} ), }; data.marriages.push(marriage); } @@ -599,8 +597,8 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS return data; } - if(activeSlave == PC || activeSlave == null) - activeSlave = getSlave(-1) + if (activeSlave == PC || activeSlave == null) + activeSlave = getSlave(-1); const treeData = [slaveInfo(activeSlave, activeSlave.ID)]; console.log("Family tree is", treeData, 'and has:', numTreeNodes); @@ -619,7 +617,7 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS width: Math.min(200 + 40*numTreeNodes, parentWidth-200) + 200, callbacks: { - nodeClick: function(name, extra) { + nodeClick: function(/*name, extra*/) { } } }); diff --git a/src/js/food.js b/src/js/food.js index 717bf8d0cc7758ea03c90b17e0c06a5497bfd3b3..4cfa12cadfe6b51b0b352904a152f4b4658a65d5 100644 --- a/src/js/food.js +++ b/src/js/food.js @@ -1,5 +1,5 @@ window.foodAmount = function (slave) { - const V = State.variables + const V = State.variables; var food = 400; //kg / food produced by base slave / week if (!slave) { return null; @@ -39,12 +39,12 @@ window.foodAmount = function (slave) { } else if (slave.eyes < -1) { //slave is blind food *= 0.6; } - if (slave.hears == -1) { //slave is hard of hearing + if (slave.hears === -1) { //slave is hard of hearing food *= 0.8; } else if (slave.hears < -1) { //slave is deaf food *= 0.6; } - if (slave.tired == 1) { //slave is tired + if (slave.tired === 1) { //slave is tired food *= 0.8; } food = Math.trunc(food); @@ -56,262 +56,262 @@ window.foodAmount = function (slave) { window.farmShowsIncome = function (slave) { //TODO: incorporate farmyardRestraints const V = State.variables; - let arcology = V.arcologies[0] - let cash = 999 //TODO: this is just a placeholder + let arcology = V.arcologies[0]; + let cash = 999; //TODO: this is just a placeholder if (!slave) { return null; } else { if (V.Farmer !== 0) { //farmer is assigned - cash *= 1.1 + cash *= 1.1; if (V.Farmer.skillFA >= V.masteredXP) { //farmer is master - cash *= 1.1 + cash *= 1.1; } } /* OPEN FS EFFECTS */ - if (arcology.FSSupremacist != "unset") { + if (arcology.FSSupremacist !== "unset") { if (slave.race === arcology.FSSupremacistRace) { //slave is of supreme race - cash *= 0.9 //TODO: should supreme race slaves receive a penalty? - V.rep -= 10 //TODO: should this cause a rep loss + cash *= 0.9; //TODO: should supreme race slaves receive a penalty? + V.rep -= 10; //TODO: should this cause a rep loss } } - if (arcology.FSSubjugationist != "unset") { - if (slave.race == arcology.FSSubjugationistRace) { //slave is of subjugated race - cash *= 1.1 - V.rep += 10 //TODO: should this cause a rep gain? + if (arcology.FSSubjugationist !== "unset") { + if (slave.race === arcology.FSSubjugationistRace) { //slave is of subjugated race + cash *= 1.1; + V.rep += 10; //TODO: should this cause a rep gain? } else { - cash *= 0.9 //TODO: should unsubjugated race slaves receive a penalty? + cash *= 0.9; //TODO: should unsubjugated race slaves receive a penalty? } } - if (arcology.FSRepopulationFocus != "unset") { + if (arcology.FSRepopulationFocus !== "unset") { if (slave.pregWeek > 16) { //slave is visibly pregnant - if (slave.eggType != "human") { //with a non-human - cash *= 1.1 + if (slave.eggType !== "human") { //with a non-human + cash *= 1.1; } - cash *= 1.2 + cash *= 1.2; } else { //slave is not visibly pregnant - cash *= 0.8 //TODO: should non-pregnant slaves receieve a penalty? + cash *= 0.8; //TODO: should non-pregnant slaves receieve a penalty? } } - if (arcology.FSRestart != "unset") { + if (arcology.FSRestart !== "unset") { if (slave.pregWeek > 16) { //slave is visibly pregnant - if (slave.eggType != "human") { //with a non-human - cash *= 0.9 - rep -= 15 + if (slave.eggType !== "human") { //with a non-human + cash *= 0.9; + V.rep -= 15; } - cash *= 0.6 - rep -= 10 + cash *= 0.6; + V.rep -= 10; } } - if (arcology.FSGenderRadicalist != "unset") { - if (slave.genes == "XY") { //TODO: does this make sense? - cash *= 1.1 + if (arcology.FSGenderRadicalist !== "unset") { + if (slave.genes === "XY") { //TODO: does this make sense? + cash *= 1.1; } else { - cash *= 0.8 + cash *= 0.8; } } - if (arcology.FSGenderFundamentalist != "unset") { - if (slave.genes == "XX") { - cash *= 1.1 //TODO: does this make sense? + if (arcology.FSGenderFundamentalist !== "unset") { + if (slave.genes === "XX") { + cash *= 1.1; //TODO: does this make sense? } else { - cash *= 0.8 + cash *= 0.8; } } - if (arcology.FSPaternalist != "unset") { + if (arcology.FSPaternalist !== "unset") { if (V.seeBestiality === 1) { if (V.farmyardBreeding === 1) { //slaves are being bred - cash *= 0.8 + cash *= 0.8; } else { //slaves are putting on shows - cash *= 0.9 + cash *= 0.9; } } } - if (arcology.FSDegradationist != "unset") { + if (arcology.FSDegradationist !== "unset") { if (V.seeBestiality === 1) { if (V.farmyardBreeding === 1) { //slaves are being bred - cash *= 1.2 + cash *= 1.2; } else { //slaves are putting on shows - cash *= 1.1 + cash *= 1.1; } } } - if (arcology.FSBodyPurist != "unset") { + if (arcology.FSBodyPurist !== "unset") { if (slave.boobsImplant > 0) { //slave has breast implants - cash *= 0.9 + cash *= 0.9; } if (slave.buttImplant > 0) { //slave has butt implants - cash *= 0.9 + cash *= 0.9; } if (slave.faceImplant > 0) { //slave has had facial surgery - cash *= 0.9 + cash *= 0.9; } if (slave.lipsImplant > 0) { //slave has lip implants - cash *= 0.9 + cash *= 0.9; } } - if (arcology.FSTransformationFetishist != "unset") { + if (arcology.FSTransformationFetishist !== "unset") { if (slave.boobsImplant > 0) { //slave has breast implants - cash *= 1.1 + cash *= 1.1; } if (slave.buttImplant > 0) { //slave has butt implants - cash *= 1.1 + cash *= 1.1; } if (slave.faceImplant > 0) { //slave has had facial surgery - cash *= 1.1 + cash *= 1.1; } if (slave.lipsImplant > 0) { //slave has lip implants - cash *= 1.1 + cash *= 1.1; } } - if (arcology.FSYouthPreferentialist != "unset") { + if (arcology.FSYouthPreferentialist !== "unset") { if (slave.visualAge > 25) { //slave looks older than 25 - cash *= 0.8 //TODO: not sure what age this should be + cash *= 0.8; //TODO: not sure what age this should be } else { - cash *= 1.2 + cash *= 1.2; } } - if (arcology.FSMaturityPreferentialist != "unset") { + if (arcology.FSMaturityPreferentialist !== "unset") { if (slave.visualAge > 25) { //slave looks older than 25 - cash *= 1.2 //TODO: not sure what age this should be + cash *= 1.2; //TODO: not sure what age this should be } else { - cash *= 0.8 + cash *= 0.8; } } - if (arcology.FSSlimnessEnthusiast != "unset") { + if (arcology.FSSlimnessEnthusiast !== "unset") { if (slave.weight > 10) { //slave is curvy or more - cash *= 0.9 //TODO: not sure what weight this should be + cash *= 0.9; //TODO: not sure what weight this should be } //TODO: should implants affect income? if (slave.boobs > 799) { //slave has larger than a D cup - cash *= 0.9 //TODO: should this be smaller? + cash *= 0.9; //TODO: should this be smaller? } if (slave.butt > 3) { //slave has bigger than a bubble butt - cash *= 0.9 + cash *= 0.9; } } - if (arcology.FSAssetExpanionist != "unset") { + if (arcology.FSAssetExpanionist !== "unset") { if (slave.weight > 10) { //slave is curvy or more - cash *= 1.1 //TODO: not sure what weight this should be + cash *= 1.1; //TODO: not sure what weight this should be } //TODO: should implants affect income? if (slave.boobs > 799) { //slave has larger than a D cup - cash *= 1.1 //TODO: should this be smaller? + cash *= 1.1; //TODO: should this be smaller? } if (slave.butt > 3) { //slave has bigger than a bubble butt - cash *= 1.1 + cash *= 1.1; } } - if (arcology.FSPastoralist != "unset") { + if (arcology.FSPastoralist !== "unset") { if (slave.boobs > 799) { //slave has larger than a D cup - cash *= 1.2 + cash *= 1.2; } if (slave.lactation > 0) { //slave is lactating - cash *= 1.1 + cash *= 1.1; } } - if (arcology.FSPhysicalIdealist != "unset") { + if (arcology.FSPhysicalIdealist !== "unset") { if (slave.height > 169) { //slave is tall or taller - cash *= 1.1 + cash *= 1.1; } else if (slave.height < 160) { //slave is short or shorter - cash *= 0.9 + cash *= 0.9; } } - if (arcology.FSHedonisticDecadence != "unset") { + if (arcology.FSHedonisticDecadence !== "unset") { if (slave.weight > 10) { //slave is curvy or fatter - cash *= 1.1 + cash *= 1.1; } else if (slave.weight < -10) { //slave is thin or thinner - cash *= 0.9 + cash *= 0.9; } } - if (arcology.FSChattelReligionist != "unset") { //TODO: I don't know what to put for this one + if (arcology.FSChattelReligionist !== "unset") { //TODO: I don't know what to put for this one if (slave.devotion < 21) { //if slave is careful or less - cash *= 0.9 + cash *= 0.9; } } //TODO: should I add the ancient cultures FS? /* CLOSE FS EFFECTS */ if (setup.entertainmentCareers.includes(slave.career)) { - cash *= 1.1 + cash *= 1.1; } else if (setup.farmerCareers.includes(slave.career)) { - cash *= 1.1 + cash *= 1.1; } if (slave.prestige === 1) { //slave is prestigious - cash *= 1.1 + cash *= 1.1; } else if (slave.prestige === 2) { //slave is very prestigious - cash *= 1.2 + cash *= 1.2; } else if (slave.prestige === 3) { //slave is extremely prestigious - cash *= 1.3 + cash *= 1.3; } if (slave.pornPrestige === 1) { //slave is prestigious from porn - cash *= 1.1 + cash *= 1.1; } else if (slave.pornPrestige === 2) { //slave is very prestigious from porn - cash *= 1.2 + cash *= 1.2; } else if (slave.pornPrestige === 3) { //slave is extremely prestigious from porn - cash *= 1.3 + cash *= 1.3; } //TODO: add relationship checks if (slave.health > 20) { //slave is very healthy or more - cash *= 1.1 + cash *= 1.1; } else if (slave.health < -20) { //slave is less than unhealthy - cash *= 0.8 + cash *= 0.8; } if (slave.face > 10) { //slave is very pretty or more - cash *= 1.1 + cash *= 1.1; } else if (slave.face < -10) { //slave is less than unattractive - cash *= 0.8 + cash *= 0.8; } if (slave.devotion > 50) { //slave is devoted or more - cash *= 1.1 + cash *= 1.1; } else if (slave.devotion < -50) { //slave is reluctant or less - cash *= 0.8 + cash *= 0.8; } if (slave.trust > 50) { //slave is trusting or more - cash *= 1.1 + cash *= 1.1; } else if (slave.trust < -50) { //slave is less than frightened - cash *= 0.8 //TODO: should trust be a factor? + cash *= 0.8; //TODO: should trust be a factor? } if (slave.weight > 30) { //slave is curvy or more - cash *= 0.8 //TODO: tie in Hedonistic FS + cash *= 0.8; //TODO: tie in Hedonistic FS } else if (slave.weight < -30) { //slave is very thin or less - cash *= 0.8 //TODO: put this on a scale + cash *= 0.8; //TODO: put this on a scale } if (slave.muscles > 30) { //slave is muscular or more - cash *= 0.9 //TODO: tie in height eugenics policy + cash *= 0.9; //TODO: tie in height eugenics policy } else if (slave.muscles < -30) { //slave is very weak or less - cash *= 0.9 //TODO: should this be on a scale? + cash *= 0.9; //TODO: should this be on a scale? } if (slave.eyes < 1) { //slaves eyesight is nearsighted or worse - cash *= 0.9 //TODO: should nearsighted and blind slaves receive a penalty? + cash *= 0.9; //TODO: should nearsighted and blind slaves receive a penalty? } if (slave.hears < 0) { //slave is hard of hearing or less - cash *= 0.9 //TODO: should hard of hearing slaves receive a penalty? + cash *= 0.9; //TODO: should hard of hearing slaves receive a penalty? } if (slave.boobs > 800) { //slave has a DD cup or bigger - cash *= 0.9 //TODO: would this make sense? + cash *= 0.9; //TODO: would this make sense? } if (slave.butt > 4) { //slave has an enormous butt or bigger - cash *= 0.9 //TODO: would this make sense? + cash *= 0.9; //TODO: would this make sense? } if (slave.preg < 0) { //slave is not fertile - cash *= 0.8 //TODO: not sure how to incorporate pregnancy + cash *= 0.8; //TODO: not sure how to incorporate pregnancy } //TODO: incorporate skills - if (slave.tired == 1) { //slave is tired - cash *= 0.9 + if (slave.tired === 1) { //slave is tired + cash *= 0.9; } if (slave.chem > 10) { //slave has high genetic damage - cash *= 0.9 + cash *= 0.9; } if (slave.intelligence > 50) { //slave is very smart or better - cash *= 1.1 + cash *= 1.1; } else if (slave.intelligence < -50) { //slave is very slow or less - cash *= 0.8 + cash *= 0.8; } if (slave.energy < 20) { //slave has poor sex drive or less - cash *= 0.9 - } - if (slave.fetish == "submissive") { - cash *= 1.1 - } else if (slave.fetish == "humiliation") { - cash *= 1.1 - } else if (slave.fetish == "masochist") { - cash *= 1.1 + cash *= 0.9; + } + if (slave.fetish === "submissive") { + cash *= 1.1; + } else if (slave.fetish === "humiliation") { + cash *= 1.1; + } else if (slave.fetish === "masochist") { + cash *= 1.1; } //TODO: tie in quirks and flaws - return cash + return cash; } -}; \ No newline at end of file +}; diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index 4121ddfe06ae529b2bc5e9a10e1f325baeb497c8..98ab81f15c7f4c6123432e818ac86feb9061cba4 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -12,7 +12,7 @@ window.generateGenetics = (function() { V = State.variables; genes = {gender: "XX", name: "blank", surname: 0, mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, faceShape: "cute", eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", clone: 0, cloneID: 0, geneticQuirks: 0}; if (actor1.ID > 0) { - mother = V.genePool.find(function(s) { return s.ID == actor1.ID; }); + mother = V.genePool.find(function(s) { return s.ID === actor1.ID; }); if (mother === undefined) { mother = actor1; } @@ -25,7 +25,7 @@ window.generateGenetics = (function() { mother = V.PC; } if (actor2 > 0) { - father = V.genePool.find(function(s) { return s.ID == actor2.ID; }); + father = V.genePool.find(function(s) { return s.ID === actor2.ID; }); activeFather = V.slaves[V.slaveIndices[actor2]]; if (father === undefined) { father = V.slaves[V.slaveIndices[actor2]]; @@ -33,13 +33,13 @@ window.generateGenetics = (function() { } if (father === undefined) { if (V.incubator > 0) { - father = V.tanks.find(function(s) { return s.ID == actor2.ID; }); + father = V.tanks.find(function(s) { return s.ID === actor2.ID; }); activeFather = 0; // activeFather = father? } } if (father === undefined) { if (V.nursery > 0) { - father = V.cribs.find(function(s) { return s.ID == actor2.ID; }); + father = V.cribs.find(function(s) { return s.ID === actor2.ID; }); activeFather = 0; // activeFather = father? } } @@ -47,7 +47,7 @@ window.generateGenetics = (function() { father = 0; activeFather = 0; } - } else if (actor2 == -1) { + } else if (actor2 === -1) { father = V.PC; activeFather = V.PC; } else { @@ -83,13 +83,13 @@ window.generateGenetics = (function() { // gender function setGender(father, mother) { let gender; - if (V.seeDicksAffectsPregnancy == 1) { + if (V.seeDicksAffectsPregnancy === 1) { gender = Math.floor(Math.random()*100) < V.seeDicks ? "XY" : "XX"; - } else if (V.adamPrinciple == 1) { + } else if (V.adamPrinciple === 1) { if (father !== 0) { - if (father.genes == "XX" && mother.genes == "XX") { + if (father.genes === "XX" && mother.genes === "XX") { gender = "XX"; - } else if (father.genes != mother.genes) { + } else if (father.genes !== mother.genes) { gender = jsEither(["XX", "XY"]); } else { gender = jsEither(["XX", "XY", "XY", "YY"]); @@ -116,12 +116,12 @@ window.generateGenetics = (function() { // motherName function setMotherName(activeMother) { let motherName; - if (activeMother.ID == -1) { + if (activeMother.ID === -1) { motherName = activeMother.name; - if (activeMother.surname !== 0 && activeMother.surname !== "") { motherName + " " + activeMother.surname; } + if (activeMother.surname !== 0 && activeMother.surname !== "") { motherName += " " + activeMother.surname; } } else { motherName = activeMother.slaveName; - if (activeMother.slaveSurname !== 0 && activeMother.slaveSurname !== "") { motherName + " " + activeMother.slaveSurname; } + if (activeMother.slaveSurname !== 0 && activeMother.slaveSurname !== "") { motherName += " " + activeMother.slaveSurname; } } return motherName; } @@ -135,12 +135,12 @@ window.generateGenetics = (function() { function setFatherName(father, activeFather, actor2) { let fatherName; if (father !== 0) { - if (father.ID == -1) { + if (father.ID === -1) { fatherName = activeFather.name; - if (activeFather.surname !== 0 && activeFather.surname !== "") { fatherName + " " + activeFather.surname; } + if (activeFather.surname !== 0 && activeFather.surname !== "") { fatherName += " " + activeFather.surname; } } else { fatherName = activeFather.slaveName; - if (activeFather.slaveSurname !== 0 && activeFather.slaveSurname !== "") { fatherName + " " + activeFather.slaveSurname; } + if (activeFather.slaveSurname !== 0 && activeFather.slaveSurname !== "") { fatherName += " " + activeFather.slaveSurname; } } } else { switch(actor2) { @@ -170,7 +170,7 @@ window.generateGenetics = (function() { // nationality function setNationality(father, mother) { return (father === 0) ? "Stateless" - : (father.nationality == mother.nationality) ? mother.nationality + : (father.nationality === mother.nationality) ? mother.nationality : "Stateless"; } @@ -178,13 +178,13 @@ window.generateGenetics = (function() { function setRace(father, mother, actor2) { let race; if (father !== 0) { - race = (mother.origRace == father.origRace) ? mother.origRace - : (jsRandom(1,4)) == 4 ? jsEither([father.origRace, mother.origRace]) + race = (mother.origRace === father.origRace) ? mother.origRace + : (jsRandom(1,4)) === 4 ? jsEither([father.origRace, mother.origRace]) : "mixed race"; - } else if (actor2 == -2 || actor2 == -5) { - if (V.arcologies[0].FSSupremacist != "unset") { + } else if (actor2 === -2 || actor2 === -5) { + if (V.arcologies[0].FSSupremacist !== "unset") { race = jsEither([mother.origRace, V.arcologies[0].FSSupremacistRace, V.arcologies[0].FSSupremacistRace]); - if (mother.origRace != V.arcologies[0].FSSupremacistRace) { + if (mother.origRace !== V.arcologies[0].FSSupremacistRace) { if (jsRandom(1,100) > 50) { race = "mixed race"; } @@ -210,7 +210,6 @@ window.generateGenetics = (function() { dark: 15, 'dark olive': 14, bronze: 13, - tan: 12, tan: 11, olive: 10, 'light olive': 9, @@ -226,51 +225,33 @@ window.generateGenetics = (function() { let momSkinIndex = mother ? (skinToMelanin[mother.origSkin] || 11) : 8; let dadSkinIndex = father !== 0 ? (skinToMelanin[father.origSkin] || 11) : 8; let skinIndex = Math.round(Math.random() * (dadSkinIndex - momSkinIndex) + momSkinIndex); - return [ - 'pure white', - 'pure white', - 'extremely pale', - 'pale', - 'extremely fair', - 'very fair', - 'fair', - 'white', - 'light', - 'light olive', - 'olive', - 'natural', - 'tan', - 'tan', - 'bronze', - 'dark olive', - 'dark', - 'light brown', - 'brown', - 'dark brown', - 'ebony', - 'black', - 'pure black' - ][skinIndex]; - }; + + var prop = ''; + for (prop in skinToMelanin) { + if (!skinToMelanin.hasOwnProperty(prop)) continue; + if (skinIndex >= skinToMelanin[prop]) return prop; + } + return prop; // skinIndex can be zero + } // eyeColor function setEyeColor(father, mother, actor2) { let eyeColor; if (father !== 0) { - if (mother.origEye == father.origEye) { + if (mother.origEye === father.origEye) { eyeColor = mother.origEye; - } else if (mother.origEye == "red" || mother.origEye == "pale red" || mother.origEye == "light red" || mother.origEye == "pale gray" || mother.origEye == "milky white") { + } else if (mother.origEye === "red" || mother.origEye === "pale red" || mother.origEye === "light red" || mother.origEye === "pale gray" || mother.origEye === "milky white") { eyeColor = father.origEye; - } else if (father.origEye == "red" || father.origEye == "pale red" || father.origEye == "light red" || father.origEye == "pale gray" || father.origEye == "milky white") { + } else if (father.origEye === "red" || father.origEye === "pale red" || father.origEye === "light red" || father.origEye === "pale gray" || father.origEye === "milky white") { eyeColor = mother.origEye; - } else if (mother.origEye == "blue") { - if (jsRandom(1,4) == 2) { + } else if (mother.origEye === "blue") { + if (jsRandom(1,4) === 2) { eyeColor = mother.origEye; } else { eyeColor = father.origEye; } - } else if (father.origEye == "blue") { - if (jsRandom(1,4) == 2) { + } else if (father.origEye === "blue") { + if (jsRandom(1,4) === 2) { eyeColor = father.origEye; } else { eyeColor = mother.origEye; @@ -300,19 +281,19 @@ window.generateGenetics = (function() { function setHColor(father, mother, actor2) { let hairColor; if (father !== 0) { - if (mother.origHColor == father.origHColor) { + if (mother.origHColor === father.origHColor) { hairColor = mother.origHColor; - } else if (mother.origHColor == "white") { - hairColor = jsRandom(1,100) == 69 ? mother.origHColor : father.origHColor; - } else if (father.origHColor == "white") { - hairColor = jsRandom(1,100) == 69 ? father.origHColor : mother.origHColor; - } else if (mother.origHColor == "black") { + } else if (mother.origHColor === "white") { + hairColor = jsRandom(1,100) === 69 ? mother.origHColor : father.origHColor; + } else if (father.origHColor === "white") { + hairColor = jsRandom(1,100) === 69 ? father.origHColor : mother.origHColor; + } else if (mother.origHColor === "black") { hairColor = jsEither([mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, father.origHColor]); - } else if (father.origHColor == "black") { + } else if (father.origHColor === "black") { hairColor = jsEither([father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, mother.origHColor]); - } else if (mother.origHColor == "brown") { + } else if (mother.origHColor === "brown") { hairColor = jsEither([mother.origHColor, mother.origHColor, mother.origHColor, father.origHColor]); - } else if (father.origHColor == "brown") { + } else if (father.origHColor === "brown") { hairColor = jsEither([father.origHColor, father.origHColor, father.origHColor, mother.origHColor]); } else { hairColor = jsEither([mother.origHColor, father.origHColor]); @@ -329,15 +310,15 @@ window.generateGenetics = (function() { function setUnderArmHStyle(father, mother) { let hair; if (father !== 0) { - if (mother.underArmHStyle == "hairless" && father.underArmHStyle == "hairless") { + if (mother.underArmHStyle === "hairless" && father.underArmHStyle === "hairless") { hair = "hairless"; - } else if (mother.underArmHStyle == "hairless" || father.underArmHStyle == "hairless") { - hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); + } else if (mother.underArmHStyle === "hairless" || father.underArmHStyle === "hairless") { + hair = (jsRandom(1,5) === 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } else { hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } - } else if (mother.underArmHStyle == "hairless") { - hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); + } else if (mother.underArmHStyle === "hairless") { + hair = (jsRandom(1,5) === 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } else { hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } @@ -348,15 +329,15 @@ window.generateGenetics = (function() { function setPubicHStyle(father, mother) { let hair; if (father !== 0) { - if (mother.pubicHStyle == "hairless" && father.pubicHStyle == "hairless") { + if (mother.pubicHStyle === "hairless" && father.pubicHStyle === "hairless") { hair = "hairless"; - } else if (mother.pubicHStyle == "hairless" || father.pubicHStyle == "hairless") { - hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); + } else if (mother.pubicHStyle === "hairless" || father.pubicHStyle === "hairless") { + hair = (jsRandom(1,5) === 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } else { hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } - } else if (mother.pubicHStyle == "hairless") { - hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); + } else if (mother.pubicHStyle === "hairless") { + hair = (jsRandom(1,5) === 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } else { hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]); } @@ -366,12 +347,12 @@ window.generateGenetics = (function() { // markings function setMarkings(father, mother) { let markings; - if (jsRandom(1,8) == 1) { + if (jsRandom(1,8) === 1) { markings = jsEither(["beauty mark", "birthmark"]); } else { markings = "none"; } - if (markings == "none") { + if (markings === "none") { if (father !== 0) { markings = jsEither([mother.markings, father.markings, "none", "none"]); } else { @@ -411,15 +392,15 @@ window.generateGenetics = (function() { } else { fetish = jsEither(["none", "none", "none", "none", "none", mother.fetish, mother.fetish]); } - if (fetish == "mindbroken") { fetish = "none"; } + if (fetish === "mindbroken") { fetish = "none"; } return fetish; } //intelligence function setIntelligence(father, mother, activeMother, actor2) { let smarts; - if (mother.ID == -1) { - if (actor2 == -6) { + if (mother.ID === -1) { + if (actor2 === -6) { smarts = jsRandom(90,100); } else if (father !== 0) { if (father.intelligence < mother.intelligence) { @@ -439,15 +420,15 @@ window.generateGenetics = (function() { } else { smarts = jsRandom(mother.intelligence, father.intelligence); } - if (activeMother.breedingMark == 1 && smarts <= 50) { + if (activeMother.breedingMark === 1 && smarts <= 50) { smarts = jsRandom(60,100); } } else { smarts = mother.intelligence; } - if (V.inbreeding == 1) { - if (mother.ID != -1) { - if (father !== 0 && father.ID == -1 && activeMother.breedingMark != 1) { + if (V.inbreeding === 1) { + if (mother.ID !== -1) { + if (father !== 0 && father.ID === -1 && activeMother.breedingMark !== 1) { if (smarts >= -95 && jsRandom(1,100) < 40) { smarts -= jsRandom(1,10); if (smarts >= -95 && jsRandom(1,100) < 20) { @@ -470,8 +451,8 @@ window.generateGenetics = (function() { //face function setFace(father, mother, activeMother, actor2) { let face; - if (mother.ID == -1) { - if (actor2 == -6) { + if (mother.ID === -1) { + if (actor2 === -6) { face = jsRandom(90,100); } else if (father !== 0) { if (father.face < mother.face) { @@ -491,15 +472,15 @@ window.generateGenetics = (function() { } else { face = jsRandom(mother.face, father.face); } - if (activeMother.breedingMark == 1 && face < 60) { + if (activeMother.breedingMark === 1 && face < 60) { face = jsRandom(60,100); } } else { face = mother.face; } - if (V.inbreeding == 1) { - if (mother.ID != -1) { - if (father !== 0 && father.ID == -1 && activeMother.breedingMark != 1) { + if (V.inbreeding === 1) { + if (mother.ID !== -1) { + if (father !== 0 && father.ID === -1 && activeMother.breedingMark !== 1) { if (face > -100 && jsRandom(1,100) > 60) { face -= jsRandom(2,20); } @@ -520,7 +501,7 @@ window.generateGenetics = (function() { function setFaceShape(father, mother) { let shape; if (father !== 0) { - if (mother.faceShape == father.faceShape) { + if (mother.faceShape === father.faceShape) { shape = mother.faceShape; } else { shape = jsEither(["androgynous", "androgynous", "cute", "cute", "exotic", "normal", "normal", "sensual", mother.faceShape, mother.faceShape]); @@ -537,17 +518,17 @@ window.generateGenetics = (function() { let chance = 0; // fertility - if (mother.geneticQuirks.fertility == 2) { - if (sex == "XX") { + if (mother.geneticQuirks.fertility === 2) { + if (sex === "XX") { quirks.fertility = 2; } else { quirks.fertility = 1; } - } else if (mother.geneticQuirks.fertility == 1) { + } else if (mother.geneticQuirks.fertility === 1) { chance = jsRandom(0, 1000); if (father !== 0) { if (father.geneticQuirks.fertility >= 1) { - if (sex == "XX") { + if (sex === "XX") { if (chance > 500) { quirks.fertility = 2; } else if (chance > 50) { @@ -560,7 +541,7 @@ window.generateGenetics = (function() { } } } else { - if (sex == "XX") { + if (sex === "XX") { if (chance > 950) { quirks.fertility = 2; } else if (chance > 200) { @@ -573,19 +554,19 @@ window.generateGenetics = (function() { } } } - + // hyper fertility - if (mother.geneticQuirks.hyperFertility == 2) { - if (sex == "XX") { + if (mother.geneticQuirks.hyperFertility === 2) { + if (sex === "XX") { quirks.hyperFertility = 2; } else { quirks.hyperFertility = 1; } - } else if (mother.geneticQuirks.hyperFertility == 1) { + } else if (mother.geneticQuirks.hyperFertility === 1) { chance = jsRandom(0, 1000); if (father !== 0) { if (father.geneticQuirks.hyperFertility >= 1) { - if (sex == "XX") { + if (sex === "XX") { if (chance > 750) { quirks.hyperFertility = 2; } else if (chance > 500) { @@ -598,7 +579,7 @@ window.generateGenetics = (function() { } } } else { - if (sex == "XX") { + if (sex === "XX") { if (chance > 950) { quirks.hyperFertility = 2; } else if (chance > 700) { @@ -619,7 +600,7 @@ window.generateGenetics = (function() { })(); -window.generateChild = function(mother, ova, destination) { +window.generateChild = function (mother, ova, destination) { let V = State.variables; let genes = ova.genetics; //maybe just argument this? We'll see. @@ -627,11 +608,11 @@ window.generateChild = function(mother, ova, destination) { let child = {}; if (!destination) { //does extra work for the incubator if defined, otherwise builds a simple object - if (genes.gender == "XX") { + if (genes.gender === "XX") { child.genes = "XX"; child.slaveSurname = genes.surname; if (!pregUpgrade) { - if (genes.mother == -1) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your daughter"; } else { @@ -639,7 +620,7 @@ window.generateChild = function(mother, ova, destination) { } child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your daughter`; child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { @@ -669,15 +650,15 @@ window.generateChild = function(mother, ova, destination) { } } else { let childName = genes.name; - if (childName.indexOf("ovum") == 0) { - if (genes.mother == -1) { + if (childName.indexOf("ovum") === 0) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your son"; } else { child.slaveName = `Your and ${genes.fatherName}'s son`; } } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your son`; } else if (genes.father > 0) { child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; @@ -688,10 +669,10 @@ window.generateChild = function(mother, ova, destination) { } else { child.slaveName = genes.name; } - if (genes.mother == -1) { + if (genes.mother === -1) { child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { let currentMother = getSlave(genes.mother); @@ -721,7 +702,7 @@ window.generateChild = function(mother, ova, destination) { child.genes = "XY"; child.slaveSurname = genes.surname; if (!pregUpgrade) { - if (genes.mother == -1) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your son"; } else { @@ -729,7 +710,7 @@ window.generateChild = function(mother, ova, destination) { } child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your son`; child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { @@ -759,15 +740,15 @@ window.generateChild = function(mother, ova, destination) { } } else { let childName = genes.name; - if (childName.indexOf("ovum") == 0) { - if (genes.mother == -1) { + if (childName.indexOf("ovum") === 0) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your son"; } else { child.slaveName = `Your and ${genes.fatherName}'s son`; } } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your son`; } else if (genes.father > 0) { child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; @@ -778,10 +759,10 @@ window.generateChild = function(mother, ova, destination) { } else { child.slaveName = genes.name; } - if (genes.mother == -1) { + if (genes.mother === -1) { child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { let currentMother = getSlave(genes.mother); @@ -817,7 +798,7 @@ window.generateChild = function(mother, ova, destination) { child.intelligence = genes.intelligence; if (mother.prematureBirth > 0) { if (child.intelligence >= -90) { - child.intelligence -= jsRandom(0,10) + child.intelligence -= jsRandom(0, 10); } child.premature = 1; } @@ -839,10 +820,10 @@ window.generateChild = function(mother, ova, destination) { child.faceShape = genes.faceShape; } if (mother.addict > 0) { - child.addict = Math.trunc(mother.addict/2); + child.addict = Math.trunc(mother.addict / 2); } child.weekAcquired = V.week; - if (child.nationality == "Stateless") { + if (child.nationality === "Stateless") { if (V.arcologies[0].FSRomanRevivalist > 90) { child.nationality = "Roman Revivalist"; } else if (V.arcologies[0].FSAztecRevivalist > 90) { @@ -865,12 +846,12 @@ window.generateChild = function(mother, ova, destination) { V.one_time_age_overrides_pedo_mode = 1; V.ageAdjustOverride = 1; - if (genes.gender == "XX") { + if (genes.gender === "XX") { GenerateNewSlave("XX"); child = V.activeSlave; child.slaveSurname = genes.surname; if (!pregUpgrade) { - if (genes.mother == -1) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your daughter"; } else { @@ -878,7 +859,7 @@ window.generateChild = function(mother, ova, destination) { } child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your daughter`; child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { @@ -908,15 +889,15 @@ window.generateChild = function(mother, ova, destination) { } } else { let childName = genes.name; - if (childName.indexOf("ovum") == 0) { - if (genes.mother == -1) { + if (childName.indexOf("ovum") === 0) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your daughter"; } else { child.slaveName = `Your and ${genes.fatherName}'s daughter`; } } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your daughter`; } else if (genes.father > 0) { child.slaveName = `${genes.motherName} and ${genes.fatherName}'s daughter`; @@ -927,10 +908,10 @@ window.generateChild = function(mother, ova, destination) { } else { child.slaveName = genes.name; } - if (genes.mother == -1) { + if (genes.mother === -1) { child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { let currentMother = getSlave(genes.mother); @@ -961,7 +942,7 @@ window.generateChild = function(mother, ova, destination) { child = V.activeSlave; child.slaveSurname = genes.surname; if (!pregUpgrade) { - if (genes.mother == -1) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your son"; } else { @@ -969,7 +950,7 @@ window.generateChild = function(mother, ova, destination) { } child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your son`; child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { @@ -999,15 +980,15 @@ window.generateChild = function(mother, ova, destination) { } } else { let childName = genes.name; - if (childName.indexOf("ovum") == 0) { - if (genes.mother == -1) { + if (childName.indexOf("ovum") === 0) { + if (genes.mother === -1) { if (genes.father <= 0) { child.slaveName = "Your son"; } else { child.slaveName = `Your and ${genes.fatherName}'s son`; } } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveName = `${genes.motherName} and your son`; } else if (genes.father > 0) { child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; @@ -1018,10 +999,10 @@ window.generateChild = function(mother, ova, destination) { } else { child.slaveName = genes.name; } - if (genes.mother == -1) { + if (genes.mother === -1) { child.slaveSurname = V.PC.surname; } else { - if (genes.father == -1) { + if (genes.father === -1) { child.slaveSurname = V.PC.surname; } else if (genes.father > 0) { let currentMother = getSlave(genes.mother); @@ -1064,7 +1045,7 @@ window.generateChild = function(mother, ova, destination) { child.intelligence = genes.intelligence; if (mother.prematureBirth > 0) { if (child.intelligence >= -90) { - child.intelligence -= jsRandom(0,10) + child.intelligence -= jsRandom(0, 10); } child.premature = 1; } @@ -1086,8 +1067,8 @@ window.generateChild = function(mother, ova, destination) { child.birthWeek = 0; child.energy = 0; child.anus = 0; - if (child.vagina > 0) {child.vagina = 0;} - if (child.fetish != "none") {child.fetishStrength = 20;} + if (child.vagina > 0) { child.vagina = 0; } + if (child.fetish !== "none") { child.fetishStrength = 20; } if (child.dick > 0) { child.foreskin = 1; child.balls = 1; @@ -1097,7 +1078,7 @@ window.generateChild = function(mother, ova, destination) { child.faceShape = genes.faceShape; } if (mother.addict > 0) { - child.addict = Math.trunc(mother.addict/2); + child.addict = Math.trunc(mother.addict / 2); } child.career = "a slave since birth"; child.birthName = child.slaveName; @@ -1105,7 +1086,7 @@ window.generateChild = function(mother, ova, destination) { child.devotion = 0; child.trust = 0; child.weekAcquired = V.week; - if (child.nationality == "Stateless") { + if (child.nationality === "Stateless") { if (V.arcologies[0].FSRomanRevivalist > 90) { child.nationality = "Roman Revivalist"; } else if (V.arcologies[0].FSAztecRevivalist > 90) { @@ -1173,7 +1154,7 @@ window.generateChild = function(mother, ova, destination) { child.canRecruit = 0; child.hStyle = "long"; child.hLength = 300; - if (V.incubatorImprintSetting == "terror") { + if (V.incubatorImprintSetting === "terror") { child.origin = "She was conditioned from birth into mindless terror in an aging tank."; child.tankBaby = 2; } else { @@ -1184,4 +1165,4 @@ window.generateChild = function(mother, ova, destination) { child.navelPiercing = 0; } return child; -} \ No newline at end of file +}; diff --git a/src/js/generateNewSlaveJS.js b/src/js/generateNewSlaveJS.js index deabc979139087027ca202f5732d2a466b3c395a..65880d2c4b34a4de8cadd08412facc96b6ff0479 100644 --- a/src/js/generateNewSlaveJS.js +++ b/src/js/generateNewSlaveJS.js @@ -13,9 +13,9 @@ window.GenerateNewSlave = (function(){ GenerateXYSlave(); } else if (V.seeDicks > 0) { var femaleSlaveGen = 80; - if (V.arcologies[0].FSGenderFundamentalistSMR == 1 || V.arcologies[0].FSRepopulationFocusSMR == 1) { + if (V.arcologies[0].FSGenderFundamentalistSMR === 1 || V.arcologies[0].FSRepopulationFocusSMR === 1) { femaleSlaveGen = 90; - } else if (V.arcologies[0].FSGenderRadicalist != "unset") { + } else if (V.arcologies[0].FSGenderRadicalist !== "unset") { femaleSlaveGen = 50; } if (jsRandom(1,100) > femaleSlaveGen && jsRandom(0,99) < V.seeDicks) { @@ -26,14 +26,14 @@ window.GenerateNewSlave = (function(){ } else { GenerateXXSlave(); } - } else if (sex == "XY") { + } else if (sex === "XY") { GenerateXYSlave(); } else { GenerateXXSlave(); } postGenCleanup(); - }; + } function preGenCombinedStats() { slave.ID = V.IDNumber++; @@ -52,7 +52,7 @@ window.GenerateNewSlave = (function(){ generateAccent(); nationalityToName(slave); generateRacialTraits(); - }; + } function postGenCleanup() { generateBoobTweaks(); /* split this up for female vs. male? */ @@ -63,7 +63,7 @@ window.GenerateNewSlave = (function(){ slave.origEye = slave.eyeColor; slave.origHColor = slave.hColor; slave.origSkin = slave.skin; - }; + } function GenerateXXSlave() { slave.ovaries = 1; @@ -83,7 +83,7 @@ window.GenerateNewSlave = (function(){ generateXXBodyHair(); generateXXPuberty(); generateXXGeneticQuirks(); - }; + } function GenerateXYSlave() { slave.genes = "XY"; @@ -106,7 +106,7 @@ window.GenerateNewSlave = (function(){ generateXYBodyHair(); generateXYPuberty(); generateXYGeneticQuirks(); - }; + } function generateXXBodyProportions() { slave.height = Math.round(Height.random(slave)); @@ -133,7 +133,7 @@ window.GenerateNewSlave = (function(){ } else { slave.waist = jsRandom(50,100); } - }; + } function generateXYBodyProportions() { slave.height = Math.round(Height.random(slave)); @@ -165,7 +165,7 @@ window.GenerateNewSlave = (function(){ } else { slave.waist = jsRandom(50,100); } - }; + } function generateVagina() { if (slave.physicalAge <= 13) { @@ -214,7 +214,7 @@ window.GenerateNewSlave = (function(){ slave.vaginaLube = 1; } slave.foreskin = jsRandom(0,4); - }; + } function generateDick() { slave.vagina = -1; @@ -223,7 +223,7 @@ window.GenerateNewSlave = (function(){ if (slave.physicalAge <= 13) { slave.dick = jsEither([1, 1, 1, 1, 2, 2, 2, 3]); - if (V.seeExtreme == 1) { + if (V.seeExtreme === 1) { slave.balls = jsEither([0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3]); } else { slave.balls = jsEither([1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3]); @@ -231,7 +231,7 @@ window.GenerateNewSlave = (function(){ slave.scrotum = slave.balls; } else if (slave.physicalAge <= 15) { slave.dick = jsEither([1, 1, 1, 2, 2, 2, 3]); - if (V.seeExtreme == 1) { + if (V.seeExtreme === 1) { slave.balls = jsEither([0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4]); } else { slave.balls = jsEither([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4]); @@ -239,7 +239,7 @@ window.GenerateNewSlave = (function(){ slave.scrotum = slave.balls; } else if (slave.physicalAge <= 17) { slave.dick = jsEither([1, 1, 2, 2, 3, 3]); - if (V.seeExtreme == 1) { + if (V.seeExtreme === 1) { slave.balls = jsEither([0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5]); } else { slave.balls = jsEither([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5]); @@ -247,12 +247,12 @@ window.GenerateNewSlave = (function(){ slave.scrotum = slave.balls; } else { slave.dick = jsEither([1, 2, 2, 2, 3, 3, 3, 4, 4, 5]); - if (V.seeExtreme == 1) { + if (V.seeExtreme === 1) { slave.balls = jsEither([0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5]); } else { slave.balls = jsEither([1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5]); } - if (slave.balls != 0) { + if (slave.balls !== 0) { slave.scrotum = slave.balls + jsEither([0, 0, 1]); } else { slave.scrotum = 0; @@ -261,7 +261,7 @@ window.GenerateNewSlave = (function(){ slave.vasectomy = 1; } } - }; + } function generateCircumcision() { /* The default rate of 50* is wildly unrepresentative, and there is extreme regional variation. */ @@ -274,7 +274,7 @@ window.GenerateNewSlave = (function(){ It would be better to break it down by both country and race if statistics are available. */ - if (V.seeCircumcision == 0) { + if (V.seeCircumcision === 0) { slave.foreskin = slave.dick + jsRandom(0,1); } else { /* Temporarily use activeSlave.foreskin to store the chance of circumcision. */ @@ -624,10 +624,10 @@ window.GenerateNewSlave = (function(){ slave.foreskin = 38; } /* Second pass for minorities in other countries. */ - if (slave.race == "middle eastern" && slave.foreskin < 76) { + if (slave.race === "middle eastern" && slave.foreskin < 76) { slave.foreskin = 76; } - if (slave.race == "semitic" && slave.foreskin < 90) { + if (slave.race === "semitic" && slave.foreskin < 90) { slave.foreskin = 90; } /* Chance activeSlave.foreskin back to the normal meaning. */ @@ -637,7 +637,7 @@ window.GenerateNewSlave = (function(){ slave.foreskin = slave.dick + jsRandom(0,1); } } - }; + } function generateXXPreferences() { randomizeAttraction(slave); @@ -645,18 +645,18 @@ window.GenerateNewSlave = (function(){ slave.fetish = jsEither(["boobs", "buttslut", "cumslut", "dom", "humiliation", "humiliation", "masochist", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "pregnancy", "sadist", "submissive", "submissive"]); slave.behavioralFlaw = jsEither(["anorexic", "arrogant", "bitchy", "devout", "gluttonous", "hates men", "hates women", "hates women", "liberated", "none", "none", "none", "odd"]); - if (slave.behavioralFlaw == "devout") { + if (slave.behavioralFlaw === "devout") { slave.sexualFlaw = jsEither(["apathetic", "crude", "judgemental", "none", "repressed", "shamefast"]); } else { slave.sexualFlaw = jsEither(["apathetic", "crude", "hates anal", "hates oral", "hates penetration", "idealistic", "judgemental", "none", "none", "none", "none", "repressed", "shamefast"]); } - if (slave.behavioralFlaw == "none" && jsRandom(1,10) == 1) { + if (slave.behavioralFlaw === "none" && jsRandom(1,10) === 1) { slave.behavioralQuirk = jsEither(["adores men", "adores women", "advocate", "confident", "cutting", "fitness", "funny", "insecure", "sinful"]); } - if (slave.sexualFlaw == "none" && jsRandom(1,10) == 1) { + if (slave.sexualFlaw === "none" && jsRandom(1,10) === 1) { slave.sexualQuirk = jsEither(["caring", "gagfuck queen", "painal queen", "perverted", "romantic", "size queen", "strugglefuck queen", "tease", "unflinching"]); } - }; + } function generateXYPreferences() { randomizeAttraction(slave); @@ -664,18 +664,18 @@ window.GenerateNewSlave = (function(){ slave.fetish = jsEither(["boobs", "buttslut", "buttslut", "cumslut", "dom", "humiliation", "masochist", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "sadist", "submissive"]); slave.behavioralFlaw = jsEither(["anorexic", "arrogant", "bitchy", "devout", "gluttonous", "hates men", "hates men", "hates men", "hates women", "liberated", "none", "none", "none", "odd"]); - if (slave.behavioralFlaw == "devout") { + if (slave.behavioralFlaw === "devout") { slave.sexualFlaw = jsEither(["apathetic", "crude", "judgemental", "none", "repressed", "shamefast"]); } else { slave.sexualFlaw = jsEither(["apathetic", "crude", "hates anal", "hates anal", "hates oral", "idealistic", "judgemental", "none", "none", "none", "none", "repressed", "shamefast"]); } - if (slave.behavioralFlaw == "none" && jsRandom(1,10) == 1) { + if (slave.behavioralFlaw === "none" && jsRandom(1,10) === 1) { slave.behavioralQuirk = jsEither(["adores men", "adores women", "advocate", "confident", "cutting", "fitness", "funny", "insecure", "sinful"]); } - if (slave.sexualFlaw == "none" && jsRandom(1,10) == 1) { + if (slave.sexualFlaw === "none" && jsRandom(1,10) === 1) { slave.sexualQuirk = jsEither(["caring", "gagfuck queen", "painal queen", "perverted", "romantic", "size queen", "strugglefuck queen", "tease", "unflinching"]); } - }; + } function generateXXButt() { if (slave.physicalAge <= 11) { @@ -707,7 +707,7 @@ window.GenerateNewSlave = (function(){ slave.butt = jsEither([1, 2, 2, 3, 3, 4]); } } - if (V.weightAffectsAssets != 0) { + if (V.weightAffectsAssets !== 0) { if (slave.weight < -10 && slave.butt > 1) { slave.butt -= 1; } else if (slave.weight > 100 && slave.butt < 6) { @@ -718,7 +718,7 @@ window.GenerateNewSlave = (function(){ } slave.anus = jsEither([0, 0, 1, 1, 2]); slave.analArea = slave.anus + jsEither([0, 0, 0, 1]); - }; + } function generateXYButt() { if (slave.physicalAge <= 13) { @@ -726,7 +726,7 @@ window.GenerateNewSlave = (function(){ } else { slave.butt = jsEither([1, 1, 2, 3]); } - if (V.weightAffectsAssets != 0) { + if (V.weightAffectsAssets !== 0) { if (slave.weight < -10 && slave.butt > 1) { slave.butt -= 1; } else if (slave.weight > 100 && slave.butt < 6) { @@ -749,20 +749,20 @@ window.GenerateNewSlave = (function(){ } } slave.analArea = slave.anus + jsEither([0, 0, 0, 1]); - }; + } function generateXXBoobs() { if (slave.physicalAge <= 10) { slave.boobs = 100; - } else if (slave.physicalAge == 11) { + } else if (slave.physicalAge === 11) { slave.boobs = jsEither([100, 100, 150, 150, 150, 300]); - } else if (slave.physicalAge == 12) { + } else if (slave.physicalAge === 12) { slave.boobs = jsEither([100, 100, 150, 150, 150, 200, 200, 300]); - } else if (slave.physicalAge == 13) { + } else if (slave.physicalAge === 13) { slave.boobs = jsEither([100, 150, 200, 200, 300, 300, 300, 400]); - } else if (slave.physicalAge == 14) { + } else if (slave.physicalAge === 14) { slave.boobs = jsEither([100, 150, 200, 300, 300, 300, 350, 400, 400]); - } else if (slave.physicalAge == 15) { + } else if (slave.physicalAge === 15) { slave.boobs = jsEither([150, 200, 300, 300, 300, 350, 350, 350, 400, 400, 450, 450]); } else { switch (slave.race) { @@ -779,15 +779,15 @@ window.GenerateNewSlave = (function(){ slave.boobs = BoobGenerator.rollBreast(0); } } - }; + } function generateXYBoobs() { slave.boobs = jsEither([100, 200, 200, 300, 300, 400, 500]); - }; + } function generateXXFace() { slave.face = jsRandom(-60,60); - if (jsRandom(0,2) == 0) { + if (jsRandom(0,2) === 0) { slave.face = jsRandom(-10,10); } if (slave.physicalAge > 40) { @@ -816,11 +816,11 @@ window.GenerateNewSlave = (function(){ case "masculine": slave.face += jsRandom(-10,0); } - }; + } function generateXYFace() { slave.face = jsRandom(-70,20); - if (jsRandom(0,2) == 0) { + if (jsRandom(0,2) === 0) { slave.face = jsRandom(-40,-10); } if (slave.physicalAge > 40) { @@ -855,7 +855,7 @@ window.GenerateNewSlave = (function(){ case "masculine": slave.face += jsRandom(-10,0); } - }; + } function generateXXPregAdaptation() { if (slave.physicalAge <= 6) { @@ -873,7 +873,7 @@ window.GenerateNewSlave = (function(){ } else { slave.pregAdaptation = 50; } - }; + } function generateXYPregAdaptation() { if (slave.physicalAge <= 6) { @@ -885,7 +885,7 @@ window.GenerateNewSlave = (function(){ } else { slave.pregAdaptation = 20; } - }; + } function generateXXVoice() { if (slave.physicalAge <= 13) { @@ -895,7 +895,7 @@ window.GenerateNewSlave = (function(){ } else { slave.voice = jsEither([1, 2, 2, 2, 2, 2, 2, 3, 3, 3]); } - }; + } function generateXYVoice() { if (slave.physicalAge <= 11) { @@ -913,11 +913,11 @@ window.GenerateNewSlave = (function(){ slave.voice = jsEither([1, 2, 2]); } } - }; + } function generateXXTeeth() { var femaleCrookedTeethGen = slave.intelligence+slave.intelligenceImplant; - if ("American" == slave.nationality) { + if ("American" === slave.nationality) { femaleCrookedTeethGen += 20; } else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) { /* do nothing */ @@ -934,11 +934,11 @@ window.GenerateNewSlave = (function(){ } else if (slave.physicalAge < 12) { slave.teeth = "mixed"; } - }; + } function generateXYTeeth() { var maleCrookedTeethGen = slave.intelligence+slave.intelligenceImplant; - if ("American" == slave.nationality) { + if ("American" === slave.nationality) { maleCrookedTeethGen += 22; } else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) { /* do nothing */ @@ -955,10 +955,10 @@ window.GenerateNewSlave = (function(){ } else if (slave.physicalAge < 12) { slave.teeth = "mixed"; } - }; + } function generateXXMods() { - if (passage() != "Starting Girls") { + if (passage() !== "Starting Girls") { slave.earPiercing = jsEither([0,1]); slave.nosePiercing = jsEither([0,0,0,1]); slave.eyebrowPiercing = jsEither([0,0,0,0,0,1]); @@ -967,13 +967,13 @@ window.GenerateNewSlave = (function(){ slave.navelPiercing = jsEither([0,0,0,1]); slave.nipplesPiercing = jsEither([0,0,0,0,1]); } - if (slave.anus != 0 && Math.random() < 0.25) { + if (slave.anus !== 0 && Math.random() < 0.25) { slave.anusTat = "bleached"; } - }; + } function generateXYMods() { - if (passage() != "Starting Girls") { + if (passage() !== "Starting Girls") { slave.earPiercing = jsEither([0,0,0,1]); slave.nosePiercing = jsEither([0,0,0,0,1]); slave.eyebrowPiercing = jsEither([0,0,0,0,0,1]); @@ -982,21 +982,21 @@ window.GenerateNewSlave = (function(){ slave.navelPiercing = jsEither([0,0,0,0,1]); slave.nipplesPiercing = jsEither([0,0,0,0,1]); } - if (slave.anus != 0 && Math.random() < 0.25) { + if (slave.anus !== 0 && Math.random() < 0.25) { slave.anusTat = "bleached"; } - }; + } function generateXXBodyHair() { slave.pubicHColor = slave.hColor; slave.underArmHColor = slave.hColor; slave.pubicHStyle = jsEither(["bald", "bald", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless", "in a strip", "in a strip", "in a strip", "in a strip", "in a strip", "neat", "neat", "neat", "neat", "neat", "very bushy", "very bushy", "waxed", "waxed", "waxed", "waxed", "waxed", "waxed"]); slave.underArmHStyle = jsEither(["bald", "bald", "bushy", "bushy", "bushy", "hairless", "neat", "neat", "neat", "neat", "neat", "shaved", "shaved", "shaved", "shaved", "shaved", "waxed", "waxed", "waxed", "waxed"]); - if ((slave.pubicHStyle == "hairless" || slave.underArmHStyle == "hairless") && Math.random() > 0.4) { + if ((slave.pubicHStyle === "hairless" || slave.underArmHStyle === "hairless") && Math.random() > 0.4) { slave.pubicHStyle = "hairless"; slave.underArmHStyle = "hairless"; } - if (slave.hColor == "blonde" && Math.random() > 0.85) { + if (slave.hColor === "blonde" && Math.random() > 0.85) { slave.eyebrowHColor = jsEither(["black", "brown", "brown", "brown", "brown"]); slave.override_Brow_H_Color = 1; } else { @@ -1004,18 +1004,18 @@ window.GenerateNewSlave = (function(){ } slave.eyebrowHStyle = jsEither(["bald", "curved", "curved", "curved", "curved", "curved", "curved", "curved", "elongated", "elongated", "elongated", "high-arched", "high-arched", "high-arched", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "rounded", "rounded", "rounded", "rounded", "rounded", "shaved", "shaved", "shortened", "shortened", "shortened", "slanted inwards", "slanted inwards", "slanted outwards", "slanted outwards", "straight", "straight", "straight", "straight", "straight", "straight"]); slave.eyebrowFullness = jsEither(["bushy", "bushy", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "pencil-thin", "pencil-thin", "tapered", "tapered", "tapered", "tapered", "thick", "thick", "thick", "thin", "thin", "thin", "threaded", "threaded", "threaded", "threaded"]); - }; + } function generateXYBodyHair() { slave.pubicHColor = slave.hColor; slave.underArmHColor = slave.hColor; slave.pubicHStyle = jsEither(["bald", "bald", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless", "in a strip", "in a strip", "in a strip", "neat", "neat", "neat", "neat", "neat", "neat", "very bushy", "very bushy", "waxed", "waxed", "waxed", "waxed", "waxed", "waxed"]); slave.underArmHStyle = jsEither(["bald", "bald", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless", "neat", "neat", "neat", "neat", "neat", "neat", "neat", "shaved", "shaved", "shaved", "shaved", "shaved", "waxed", "waxed", "waxed", "waxed"]); - if ((slave.pubicHStyle == "hairless" || slave.underArmHStyle == "hairless") && Math.random() > 0.4) { + if ((slave.pubicHStyle === "hairless" || slave.underArmHStyle === "hairless") && Math.random() > 0.4) { slave.pubicHStyle = "hairless"; slave.underArmHStyle = "hairless"; } - if (slave.hColor == "blonde" && Math.random() > 0.85) { + if (slave.hColor === "blonde" && Math.random() > 0.85) { slave.eyebrowHColor = jsEither(["black", "brown", "brown", "brown", "brown"]); slave.override_Brow_H_Color = 1; } else { @@ -1023,7 +1023,7 @@ window.GenerateNewSlave = (function(){ } slave.eyebrowHStyle = jsEither(["bald", "curved", "curved", "curved", "curved", "curved", "elongated", "high-arched", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "rounded", "shaved", "shaved", "shortened", "slanted inwards", "slanted outwards", "straight", "straight", "straight", "straight", "straight", "straight"]); slave.eyebrowFullness = jsEither(["bushy", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "pencil-thin", "tapered", "tapered", "tapered", "thick", "thick", "thin", "thin", "threaded", "threaded", "threaded"]); - }; + } function generateXXPuberty() { if (slave.physicalAge >= slave.pubertyAgeXX) { @@ -1043,7 +1043,7 @@ window.GenerateNewSlave = (function(){ } else { slave.pubertyXY = 0; } - }; + } function generateXXGeneticQuirks() { chance = jsRandom(1,1000); @@ -1058,8 +1058,8 @@ window.GenerateNewSlave = (function(){ } else if (chance >= 9900) { slave.geneticQuirks.hyperFertility = 1; } - }; - + } + function generateXYGeneticQuirks() { chance = jsRandom(1,1000); if (chance >= 950) { @@ -1069,7 +1069,7 @@ window.GenerateNewSlave = (function(){ if (chance >= 9900) { slave.geneticQuirks.hyperFertility = 1; } - }; + } function generateAge() { if (V.activeSlaveOneTimeMaxAge > 998) { @@ -1111,12 +1111,12 @@ window.GenerateNewSlave = (function(){ slave.age = slave.actualAge; /*compatibility*/ slave.pubertyAgeXX = V.fertilityAge; slave.pubertyAgeXY = V.potencyAge; - }; + } function generateIntelligence() { const gaussian = gaussianPair(); slave.intelligence = Intelligence.random(); - if (V.AgePenalty == 1 && slave.actualAge <= 24) { + if (V.AgePenalty === 1 && slave.actualAge <= 24) { if (gaussian[0] < gaussian[1] + slave.intelligence/29 + (slave.actualAge - 24)/8 - 0.35) { slave.intelligenceImplant = 15; if (slave.intelligenceImplant > 0 && jsRandom(15,150) < slave.intelligence) { @@ -1131,10 +1131,10 @@ window.GenerateNewSlave = (function(){ } } } - }; + } function generateCareer() { - if (V.AgePenalty == 1) { + if (V.AgePenalty === 1) { if (slave.actualAge < 16) { slave.career = setup.veryYoungCareers.random(); } else if (slave.actualAge <= 24) { @@ -1155,11 +1155,11 @@ window.GenerateNewSlave = (function(){ slave.career = setup.uneducatedCareers.random(); } } - }; + } function generateNationality() { - if (V.fixedRace == 0) { - if (V.fixedNationality == 0) { + if (V.fixedRace === 0) { + if (V.fixedNationality === 0) { slave.nationality = hashChoice(V.nationalities); } else { slave.nationality = V.fixedNationality; @@ -1167,7 +1167,7 @@ window.GenerateNewSlave = (function(){ } nationalityToRace(slave); } else { - if (V.fixedNationality == 0) { + if (V.fixedNationality === 0) { slave.race = V.fixedRace; V.fixedRace = 0; raceToNationality(slave); @@ -1179,14 +1179,14 @@ window.GenerateNewSlave = (function(){ } } - }; + } function generateAccent() { nationalityToAccent(slave); if ((slave.intelligenceImplant >= 15 || slave.intelligence > 95) && slave.accent >= 3 && slave.intelligence > jsRandom(0,100)) { slave.accent -= 1; } - }; + } function generateRacialTraits() { switch (slave.race) { @@ -1198,19 +1198,19 @@ window.GenerateNewSlave = (function(){ break; case "white": slave.lips = jsRandom(5,25); - if (slave.nationality == "German") { + if (slave.nationality === "German") { slave.skin = jsEither(["fair", "light", "pale"]); slave.eyeColor = jsEither(["blue", "blue", "blue", "brown", "green"]); slave.hColor = jsEither(["black", "blonde", "blonde", "blonde", "brown", "red"]); - } else if (slave.nationality == "Icelandic") { + } else if (slave.nationality === "Icelandic") { slave.skin = jsEither(["fair", "light", "pale", "pale"]); slave.eyeColor = jsEither(["blue", "blue", "blue", "brown", "green"]); slave.hColor = jsEither(["black", "blonde", "blonde", "blonde", "brown", "red"]); - } else if (slave.nationality == "Irish") { + } else if (slave.nationality === "Irish") { slave.skin = jsEither(["fair", "light", "pale", "pale"]); slave.eyeColor = jsEither(["blue", "brown", "green", "green", "green"]); slave.hColor = jsEither(["black", "blonde", "brown", "red", "red", "red"]); - } else if (slave.nationality == "Scottish") { + } else if (slave.nationality === "Scottish") { slave.skin = jsEither(["fair", "fair", "light", "pale"]); slave.eyeColor = jsEither(["blue", "brown", "brown", "green", "green", "green"]); slave.hColor = jsEither(["black", "black", "blonde", "red", "red", "red", "brown"]); @@ -1256,17 +1256,17 @@ window.GenerateNewSlave = (function(){ slave.hColor = jsEither(["black", "black", "black", "black", "blonde", "brown", "brown", "red"]); slave.hStyle = "neat"; } - if (slave.skin == "pale" || slave.skin == "fair") { - if (jsRandom(1,4) == 1) { + if (slave.skin === "pale" || slave.skin === "fair") { + if (jsRandom(1,4) === 1) { slave.markings = jsEither(["beauty mark", "beauty mark", "birthmark", "birthmark", "freckles", "freckles", "freckles", "heavily freckled"]); } - } else if (jsRandom(1,8) == 1) { + } else if (jsRandom(1,8) === 1) { slave.markings = jsEither(["beauty mark", "birthmark"]); } - }; + } function generateBoobTweaks() { - if (V.weightAffectsAssets != 0) { + if (V.weightAffectsAssets !== 0) { if (slave.weight < -10 && slave.boobs > 200) { slave.boobs -= 100; } else if (slave.weight > 190 && slave.boobs < 3000) { @@ -1294,12 +1294,12 @@ window.GenerateNewSlave = (function(){ if (slave.boobs > 800 && slave.physicalAge > jsRandom(10,50)) { BoobShapeGen.push("saggy"); } - if (BoobShapeGen.length == 1) { + if (BoobShapeGen.length === 1) { if (Math.random() < 0.5) { slave.boobShape = jsEither(BoobShapeGen); } } else if (BoobShapeGen.length > 1) { - if (jsRandom(1,3) != 1) { + if (jsRandom(1,3) !== 1) { slave.boobShape = jsEither(BoobShapeGen); } } @@ -1313,15 +1313,15 @@ window.GenerateNewSlave = (function(){ } else { slave.nipples = jsEither(["cute", "huge", "inverted", "partially inverted", "puffy"]); } - }; + } function generateSkills() { - slave.vaginalSkill = (slave.vagina == 0 ? 0 : jsRandom(0,15)); - slave.analSkill = (slave.anus == 0 ? 0 : jsRandom(0,15)); + slave.vaginalSkill = (slave.vagina === 0 ? 0 : jsRandom(0,15)); + slave.analSkill = (slave.anus === 0 ? 0 : jsRandom(0,15)); slave.oralSkill = jsRandom(0,15); slave.entertainSkill = jsRandom(0,15); slave.whoreSkill = jsRandom(0,15); - }; + } function generateDisabilities() { if (slave.physicalAge >= jsRandom(0,100)) { @@ -1330,7 +1330,7 @@ window.GenerateNewSlave = (function(){ if (slave.physicalAge >= jsRandom(30,100)) { slave.hears = -1; } - if (V.seeExtreme == 1) { + if (V.seeExtreme === 1) { let disList = []; disList.push("hearNot"); disList.push("seeNot"); @@ -1366,7 +1366,7 @@ window.GenerateNewSlave = (function(){ } V.oneTimeDisableDisability = 0; } - }; + } return GenerateNewSlave; })(); diff --git a/src/js/heroCreator.js b/src/js/heroCreator.js index ae2ef6d1ca40e02d7a0ee7981071ae6cc00325ab..62194ac9182c3397b08e6dbdbba72a9106fbaa93 100644 --- a/src/js/heroCreator.js +++ b/src/js/heroCreator.js @@ -1,7 +1,7 @@ -window.getHeroSlave = function(heroSlave, baseHeroSlave) { +window.getHeroSlave = function (heroSlave, baseHeroSlave) { var newSlave = clone(baseHeroSlave); for (var attrname in heroSlave) { newSlave[attrname] = heroSlave[attrname]; - }; + } return newSlave; -} +}; diff --git a/src/js/pregJS.js b/src/js/pregJS.js index 66360adef48963b94439685140353af968041e6d..1014ba089db7e107db5276e14a266c088b718d6b 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -78,11 +78,11 @@ window.setPregType = function(actor) { */ if(actor.broodmother < 1) { // Broodmothers should be not processed here. Necessary now. - if(typeof actor.readyOva == "number" && actor.readyOva != 0) { + if(typeof actor.readyOva === "number" && actor.readyOva !== 0) { ovum = actor.readyOva; //just single override; for delayed impregnation cases - } else if(actor.ID == -1) { - if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm - if(actor.fertDrugs == 1) { + } else if(actor.ID === -1) { + if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm + if(actor.fertDrugs === 1) { ovum += jsEither([2, 3, 3, 3, 3, 4, 4, 5]); } else { ovum += jsEither([1, 1, 2, 2, 3, 3, 4]); @@ -90,8 +90,8 @@ window.setPregType = function(actor) { if(actor.forcedFertDrugs > 0) { ovum += jsEither([3, 3, 4, 4, 5]); } - } else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples - if(actor.fertDrugs == 1) { + } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples + if(actor.fertDrugs === 1) { ovum += jsEither([1, 2, 2, 2, 2, 3, 3, 4]); } else { ovum += jsEither([0, 1, 1, 1, 1, 1, 2, 3]); @@ -99,8 +99,8 @@ window.setPregType = function(actor) { if(actor.forcedFertDrugs > 0) { ovum += jsEither([2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4]); } - } else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins - if(actor.fertDrugs == 1) { + } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins + if(actor.fertDrugs === 1) { ovum += jsEither([1, 1, 2, 2, 2, 2, 3, 3]); } else { ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 1, 1, 2]); @@ -109,7 +109,7 @@ window.setPregType = function(actor) { ovum += jsEither([1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4]); } } else { - if(actor.fertDrugs == 1) { + if(actor.fertDrugs === 1) { ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3]); } else { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); @@ -119,52 +119,52 @@ window.setPregType = function(actor) { } } ovum = Math.clamp(ovum, 0, 8); - } else if(actor.pregType == 0) { - if(actor.eggType == "horse" || actor.eggType == "cow") { - if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm + } else if(actor.pregType === 0) { + if(actor.eggType === "horse" || actor.eggType === "cow") { + if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([0, 0, 0, 0, 0, 0, 1]); fertilityStack += .8; - } else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples + } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples fertilityStack += .4; - } else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins + } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins fertilityStack += .2; } - if(actor.ovaImplant == "fertility") { + if(actor.ovaImplant === "fertility") { fertilityStack += .3; } - if(actor.hormones == 2) { + if(actor.hormones === 2) { fertilityStack += .2; } if(actor.hormoneBalance >= 200) { fertilityStack += .3; } - if(actor.diet == "fertility") { + if(actor.diet === "fertility") { fertilityStack += .3; } - if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) { + if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { fertilityStack += .5; } - if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) { + if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack += .2; } - if(actor.drugs == "super fertility drugs") { + if(actor.drugs === "super fertility drugs") { fertilityStack += 1.6; - } else if(actor.drugs == "fertility drugs") { + } else if(actor.drugs === "fertility drugs") { fertilityStack += .6; } fertilityStack = Math.floor(fertilityStack); - if(State.variables.seeHyperPreg == 1) { - if(actor.drugs == "super fertility drugs") { + if(State.variables.seeHyperPreg === 1) { + if(actor.drugs === "super fertility drugs") { ovum += jsRandom(0, fertilityStack*2); } else { ovum += jsRandom(0, fertilityStack); } - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; if(ovum > 4) { ovum = 4; @@ -173,25 +173,25 @@ window.setPregType = function(actor) { ovum = 3; } } - } else if(actor.eggType == "dog") { - if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm + } else if(actor.eggType === "dog") { + if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([1, 2, 2, 3]); fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples + } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsEither([0, 1, 1, 2]); fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins + } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } - if(actor.ovaImplant == "fertility") { + if(actor.ovaImplant === "fertility") { ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } - if(actor.hormones == 2) { + if(actor.hormones === 2) { ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 2]); fertilityStack++; } @@ -199,41 +199,41 @@ window.setPregType = function(actor) { ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]); fertilityStack++; } - if(actor.diet == "fertility") { + if(actor.diet === "fertility") { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1]); fertilityStack++; } - if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) { + if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]); fertilityStack++; fertilityStack++; } - if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) { + if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack++; } - if(actor.drugs == "super fertility drugs") { + if(actor.drugs === "super fertility drugs") { ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]); fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.drugs == "fertility drugs") { + } else if(actor.drugs === "fertility drugs") { ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]); fertilityStack++; } - if(State.variables.seeHyperPreg == 1) { - if(actor.drugs == "super fertility drugs") { + if(State.variables.seeHyperPreg === 1) { + if(actor.drugs === "super fertility drugs") { ovum += jsRandom(0, fertilityStack*2); } else { ovum += jsRandom(0, fertilityStack); } - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; if(ovum > 8) { ovum = jsEither([6, 8]); @@ -242,22 +242,22 @@ window.setPregType = function(actor) { ovum = jsRandom(6, 8); } } - } else if(actor.eggType == "pig") { - if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm + } else if(actor.eggType === "pig") { + if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsRandom(4, 8); fertilityStack += 16; - } else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples + } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsRandom(2, 6); fertilityStack += 10; - } else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins + } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsRandom(2, 4); fertilityStack += 6; } - if(actor.ovaImplant == "fertility") { + if(actor.ovaImplant === "fertility") { ovum += jsRandom(4, 12); fertilityStack += 6; } - if(actor.hormones == 2) { + if(actor.hormones === 2) { ovum += jsRandom(0, 4); fertilityStack += 3; } @@ -265,36 +265,36 @@ window.setPregType = function(actor) { ovum += jsRandom(0, 4); fertilityStack += 3; } - if(actor.diet == "fertility") { + if(actor.diet === "fertility") { ovum += jsRandom(4, 10); fertilityStack += 6; } - if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) { + if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { ovum += jsRandom(8, 16); fertilityStack += 10; } - if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) { + if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack += 2; } - if(actor.drugs == "super fertility drugs") { + if(actor.drugs === "super fertility drugs") { ovum += jsRandom(10, 40); fertilityStack += 32; - } else if(actor.drugs == "fertility drugs") { + } else if(actor.drugs === "fertility drugs") { ovum += jsRandom(10, 20); fertilityStack += 16; } - if(State.variables.seeHyperPreg == 1) { - if(actor.drugs == "super fertility drugs") { + if(State.variables.seeHyperPreg === 1) { + if(actor.drugs === "super fertility drugs") { ovum += jsRandom(fertilityStack/2, fertilityStack*2); } else { ovum += jsRandom(fertilityStack/4, fertilityStack); } - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; if(ovum > 76) { ovum = jsEither([70, 72, 74, 76]); @@ -304,27 +304,27 @@ window.setPregType = function(actor) { } } } else { - if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm + if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([1, 2, 2, 3]); fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples + } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsEither([0, 1, 1, 2]); fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins + } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } else { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); //base chance for twins } - if(actor.ovaImplant == "fertility") { + if(actor.ovaImplant === "fertility") { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); fertilityStack++; } - if(actor.hormones == 2) { + if(actor.hormones === 2) { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2]); fertilityStack++; } @@ -332,41 +332,41 @@ window.setPregType = function(actor) { ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]); fertilityStack++; } - if(actor.diet == "fertility") { + if(actor.diet === "fertility") { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); fertilityStack++; } - if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) { + if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]); fertilityStack++; fertilityStack++; } - if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) { + if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack++; } - if(actor.drugs == "super fertility drugs") { + if(actor.drugs === "super fertility drugs") { ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]); fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.drugs == "fertility drugs") { + } else if(actor.drugs === "fertility drugs") { ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]); fertilityStack++; } - if(State.variables.seeHyperPreg == 1) { - if(actor.drugs == "super fertility drugs") { + if(State.variables.seeHyperPreg === 1) { + if(actor.drugs === "super fertility drugs") { ovum += jsRandom(0, fertilityStack*2); } else { ovum += jsRandom(0, fertilityStack); } - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant == "sympathy") { + if(actor.ovaImplant === "sympathy") { ovum *= 2; if(ovum > 12) { ovum = jsEither([10, 12]); @@ -393,7 +393,7 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) { const V = State.variables; let r = ""; if (V.seePreg !== 0) { - if (jsRandom(0,99) < (chance + (V.reproductionFormula*((target.pregSource <= 0) ? ((target.ID == -1) ? 0 : 10) : 20)))) { + if (jsRandom(0,99) < (chance + (V.reproductionFormula*((target.pregSource <= 0) ? ((target.ID === -1) ? 0 : 10) : 20)))) { if (target.mpreg === hole) { target.preg = 1; @@ -451,12 +451,12 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) { return r; }; -window.getIncubatorReserved = function(slaves) { +window.getIncubatorReserved = function(/*slaves*/) { return FetusGlobalReserveCount("incubator"); }; -window.getNurseryReserved = function (slaves) { +window.getNurseryReserved = function (/*slaves*/) { return FetusGlobalReserveCount("nursery"); }; @@ -468,12 +468,12 @@ window.findFather = function(fatherID) { father = V.slaves[V.slaveIndices[fatherID]]; if (father === undefined) { if (V.incubator > 0) { - father = V.tanks.find(function(s) { return s.ID == fatherID; }); + father = V.tanks.find(function(s) { return s.ID === fatherID; }); } } if (father === undefined) { if (V.nursery > 0) { - father = V.cribs.find(function(s) { return s.ID == fatherID; }); + father = V.cribs.find(function(s) { return s.ID === fatherID; }); } } diff --git a/src/js/relationshipChecks.js b/src/js/relationshipChecks.js index c4cea47b7e7cb532bca120125e47af891a954242..4c8cd40cee79a6aa58570f1ba6d1a5338d4ab625 100644 --- a/src/js/relationshipChecks.js +++ b/src/js/relationshipChecks.js @@ -1,4 +1,4 @@ -window.rivalryTerm = function(id) { +window.rivalryTerm = function (id) { if (id.rivalry === 1) { return `growing rival`; } else if (id.rivalry === 2) { @@ -6,21 +6,21 @@ window.rivalryTerm = function(id) { } else { return `bitter rival`; } -} -window.relationshipTerm = function(id) { +}; +window.relationshipTerm = function (id) { if (id.relationship === 1) { return `friend`; } else if (id.relationship === 2) { return `best friend`; } else if (id.relationship === 3) { - return `friend with benefits`; + return `friend with benefits`; } else if (id.relationship === 4) { - return `lover`; + return `lover`; } else { - return `slave wife`; + return `slave wife`; } -} -window.relationshipTermShort = function(id) { +}; +window.relationshipTermShort = function (id) { if (id.relationship === 1) { return `friend`; } else if (id.relationship === 2) { @@ -32,4 +32,4 @@ window.relationshipTermShort = function(id) { } else { return `wife`; } -} \ No newline at end of file +}; diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js index 88ff9b9d5dc08e74b1e8547cc33596ce89b9753f..9d9a6b6552dc354a42d415bbd074bb5701e0e933 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeActiveSlave.js @@ -230,9 +230,9 @@ window.removeActiveSlave = function removeActiveSlave() { vagina : V.activeSlave.vagina, ID : V.missingParentID }; - if (V.traitor.ID == V.activeSlave.ID) { /* To link developing fetuses to their parent */ + if (V.traitor.ID === V.activeSlave.ID) { /* To link developing fetuses to their parent */ V.traitor.missingParentTag = V.missingParentID; - } else if (V.boomerangSlave.ID == V.activeSlave.ID) { + } else if (V.boomerangSlave.ID === V.activeSlave.ID) { V.boomerangSlave.missingParentTag = V.missingParentID; } V.missingParentID--; @@ -246,7 +246,7 @@ window.removeActiveSlave = function removeActiveSlave() { window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { "use strict"; - + const V = State.variables; const ID = removedSlave.ID; let LENGTH = V.slaves.length; @@ -281,7 +281,7 @@ window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { if (INDEX >= 0 && INDEX < LENGTH) { V.slaves.forEach(slave => { - if (slave.assignment == "be imported") { + if (slave.assignment === "be imported") { WombChangeID(slave, ID, V.missingParentID); /* This check is complex, should be done in JS now, all needed will be done here. */ WombChangeGeneID(slave, ID, V.missingParentID); if (slave.pregSource === V.missingParentID) { @@ -359,4 +359,4 @@ window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { removeSlave(INDEX); } -}; \ No newline at end of file +}; diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js index 285bde3f7ffe451fda671d11b7f514820b33ba9c..04f337e56d3cdcb0817ab116ccc331a1284e0146 100644 --- a/src/js/rulesAssistant.js +++ b/src/js/rulesAssistant.js @@ -166,7 +166,7 @@ window.ruleAppliesP = function ruleAppliesP(cond, slave) { cond.data.value[1]); break; case "belongs": // the attribute belongs in the list of values - flag = cond.data.value.includes(slave[cond.data.attribute]) + flag = cond.data.value.includes(slave[cond.data.attribute]); break; case "custom": // user provided JS function flag = eval(cond.data)(slave); @@ -326,4 +326,4 @@ window.RulesDeconfliction = function RulesDeconfliction(slave) { DefaultRules(slave); State.variables.slaveAfterRA = clone(slave); slave = before; -} +}; diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 50d2fbfde1906f65ca78e48f406fca51015498e7..8009942fcfbdc36d704301077f5c23a3b67560bf 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -2936,7 +2936,7 @@ window.rulesAssistantOptions = (function() { if (V.arcologies[0].FSHedonisticDecadence !== "unset") items.push(["(FS) Weight Record", "her highest weigh-in"]); - if (V.arcologies[0].FSHedonisticDecadence && V.PC.refreshmentType == 2) + if (V.arcologies[0].FSHedonisticDecadence && V.PC.refreshmentType === 2) items.push(["(FS) Favorite Food", `a big helping of ${V.PC.refreshment}`]); if (V.arcologies[0].FSRepopulationFocus !== "unset") @@ -3493,7 +3493,7 @@ window.rulesAssistantOptions = (function() { ["dyed gray"], ["tiger striped"], ["camouflage patterned"], - ] + ]; super("Dye or tan skin", items); this.setValue(current_rule.set.skinColor); this.onchange = (x) => current_rule.set.skinColor = x; diff --git a/src/js/rulesAutosurgery.js b/src/js/rulesAutosurgery.js index c74aefbf7146208424f9013d25d95d50d6b41f72..0ed9519c497f3f51b5d1bb2e7cb09f7e73de9829 100644 --- a/src/js/rulesAutosurgery.js +++ b/src/js/rulesAutosurgery.js @@ -112,7 +112,7 @@ window.rulesAutosurgery = (function() { if (thisSurgery.surgery_butt > 8) thisSurgery.surgery_butt = 8; } else if (slave.hips > 1) { - true; + // true } else { if (thisSurgery.surgery_butt > 6) thisSurgery.surgery_butt = 6; @@ -124,56 +124,56 @@ window.rulesAutosurgery = (function() { } function CommitSurgery(slave, thisSurgery, surgeries) { - if ((slave.eyes == -1) && (thisSurgery.surgery_eyes == 1)) { + if ((slave.eyes === -1) && (thisSurgery.surgery_eyes === 1)) { surgeries.push("surgery to correct her vision"); slave.eyes = 1; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.eyes == 1) && (thisSurgery.surgery_eyes == -1)) { + } else if ((slave.eyes === 1) && (thisSurgery.surgery_eyes === -1)) { surgeries.push("surgery to blur her vision"); slave.eyes = -1; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.hears == -1) && (thisSurgery.surgery_hears == 1)) { + } else if ((slave.hears === -1) && (thisSurgery.surgery_hears === 1)) { surgeries.push("surgery to correct her hearing"); slave.hears = 0; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.hears == 0) && (thisSurgery.surgery_hears == -1)) { + } else if ((slave.hears === 0) && (thisSurgery.surgery_hears === -1)) { surgeries.push("surgery to muffle her hearing"); slave.hears = -1; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.lactation == 2) && (thisSurgery.surgery_lactation == 0)) { + } else if ((slave.lactation === 2) && (thisSurgery.surgery_lactation === 0)) { surgeries.push("surgery to remove her lactation implants"); slave.lactation = 0; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if (slave.lactation != 2 && (thisSurgery.surgery_lactation == 1)) { + } else if (slave.lactation !== 2 && (thisSurgery.surgery_lactation === 1)) { surgeries.push("lactation inducing implanted drugs"); slave.lactation = 2; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.prostate == 2) && (thisSurgery.surgery_prostate == 0)) { + } else if ((slave.prostate === 2) && (thisSurgery.surgery_prostate === 0)) { surgeries.push("surgery to remove her prostate implant"); slave.prostate = 0; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if (slave.prostate == 1 && (thisSurgery.surgery_prostate == 1)) { + } else if (slave.prostate === 1 && (thisSurgery.surgery_prostate === 1)) { surgeries.push("a precum production enhancing drug implant"); slave.prostate = 2; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); @@ -200,14 +200,14 @@ window.rulesAutosurgery = (function() { } else if ((slave.faceImplant <= 15) && (slave.face <= 95) && (thisSurgery.surgery_cosmetic > 0)) { surgeries.push("a nicer face"); - if (slave.faceShape == "masculine") slave.faceShape = "androgynous"; + if (slave.faceShape === "masculine") slave.faceShape = "androgynous"; slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade; slave.face = Math.clamp(slave.face+20,-100,100); cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.faceImplant <= 15) && (slave.ageImplant != 1) && (slave.visualAge >= 25) && (thisSurgery.surgery_cosmetic > 0)) { + } else if ((slave.faceImplant <= 15) && (slave.ageImplant !== 1) && (slave.visualAge >= 25) && (thisSurgery.surgery_cosmetic > 0)) { surgeries.push("an age lift"); slave.ageImplant = 1; slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade; @@ -220,13 +220,13 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if (((slave.underArmHStyle != "bald" && slave.underArmHStyle != "hairless") || (slave.pubicHStyle != "bald" && slave.pubicHStyle != "hairless")) && (thisSurgery.surgery_bodyhair == 2)) { + } else if (((slave.underArmHStyle !== "bald" && slave.underArmHStyle !== "hairless") || (slave.pubicHStyle !== "bald" && slave.pubicHStyle !== "hairless")) && (thisSurgery.surgery_bodyhair === 2)) { surgeries.push("body hair removal"); - if (slave.underArmHStyle != "hairless") slave.underArmHStyle = "bald"; - if (slave.pubicHStyle != "hairless") slave.pubicHStyle = "bald"; + if (slave.underArmHStyle !== "hairless") slave.underArmHStyle = "bald"; + if (slave.pubicHStyle !== "hairless") slave.pubicHStyle = "bald"; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); - } else if ((slave.bald == 0 || slave.hStyle != "bald" || slave.eyebrowHStyle != "bald") && (thisSurgery.surgery_hair == 2)) { + } else if ((slave.bald === 0 || slave.hStyle !== "bald" || slave.eyebrowHStyle !== "bald") && (thisSurgery.surgery_hair === 2)) { surgeries.push("hair removal"); slave.eyebrowHStyle = "bald"; slave.hStyle = "bald"; @@ -240,7 +240,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.voice == 1) && (slave.voiceImplant == 0) && (thisSurgery.surgery_cosmetic > 0)) { + } else if ((slave.voice === 1) && (slave.voiceImplant === 0) && (thisSurgery.surgery_cosmetic > 0)) { surgeries.push("a feminine voice"); slave.voice += 1; slave.voiceImplant += 1; @@ -255,14 +255,14 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if (((slave.boobShape == "saggy") || (slave.boobShape == "downward-facing")) && (thisSurgery.surgery_cosmetic > 0) && (slave.breastMesh != 1)) { + } else if (((slave.boobShape === "saggy") || (slave.boobShape === "downward-facing")) && (thisSurgery.surgery_cosmetic > 0) && (slave.breastMesh !== 1)) { surgeries.push("a breast lift"); slave.boobShape = "normal"; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if (((slave.boobShape == "normal") || (slave.boobShape == "wide-set")) && (thisSurgery.surgery_cosmetic > 0) && (slave.breastMesh != 1)) { + } else if (((slave.boobShape === "normal") || (slave.boobShape === "wide-set")) && (thisSurgery.surgery_cosmetic > 0) && (slave.breastMesh !== 1)) { if (slave.boobs > 800) slave.boobShape = "torpedo-shaped"; else @@ -272,7 +272,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((thisSurgery.surgery_lips == 0) && (slave.lipsImplant > 0)) { + } else if ((thisSurgery.surgery_lips === 0) && (slave.lipsImplant > 0)) { surgeries.push("surgery to remove her lip implants"); slave.lips -= slave.lipsImplant; slave.lipsImplant = 0; @@ -294,16 +294,16 @@ window.rulesAutosurgery = (function() { else slave.health -= 10; } - } else if ((slave.faceImplant <= 45) && (slave.face <= 95) && (thisSurgery.surgery_cosmetic == 2)) { + } else if ((slave.faceImplant <= 45) && (slave.face <= 95) && (thisSurgery.surgery_cosmetic === 2)) { surgeries.push("a nicer face"); - if (slave.faceShape == "masculine") slave.faceShape = "androgynous"; + if (slave.faceShape === "masculine") slave.faceShape = "androgynous"; slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade; slave.face = Math.clamp(slave.face+20,-100,100); cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.hips < 1) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade == 1)) { + } else if ((slave.hips < 1) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade === 1)) { surgeries.push("wider hips"); slave.hips++; slave.hipsImplant++; @@ -311,7 +311,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.faceImplant <= 45) && (slave.ageImplant != 1) && (slave.visualAge >= 25) && (thisSurgery.surgery_cosmetic == 2)) { + } else if ((slave.faceImplant <= 45) && (slave.ageImplant !== 1) && (slave.visualAge >= 25) && (thisSurgery.surgery_cosmetic === 2)) { surgeries.push("an age lift"); slave.ageImplant = 1; if (slave.visualAge > 80) { @@ -330,14 +330,14 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.waist >= -95) && (thisSurgery.surgery_cosmetic == 2) && (V.seeExtreme == 1)) { + } else if ((slave.waist >= -95) && (thisSurgery.surgery_cosmetic === 2) && (V.seeExtreme === 1)) { surgeries.push("a narrower waist"); slave.waist = Math.clamp(slave.waist-20,-100,100); cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.voice < 3) && (slave.voiceImplant == 0) && (thisSurgery.surgery_cosmetic == 2)) { + } else if ((slave.voice < 3) && (slave.voiceImplant === 0) && (thisSurgery.surgery_cosmetic === 2)) { surgeries.push("a bimbo's voice"); slave.voice += 1; slave.voiceImplant += 1; @@ -345,7 +345,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((thisSurgery.surgery_butt == 0) && (slave.buttImplant > 0)) { + } else if ((thisSurgery.surgery_butt === 0) && (slave.buttImplant > 0)) { surgeries.push("surgery to remove her butt implants"); slave.butt -= slave.buttImplant; slave.buttImplant = 0; @@ -354,7 +354,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((thisSurgery.surgery_boobs == 0) && (slave.boobsImplant > 0)) { + } else if ((thisSurgery.surgery_boobs === 0) && (slave.boobsImplant > 0)) { surgeries.push("surgery to remove her boob implants"); slave.boobs -= slave.boobsImplant; slave.boobsImplant = 0; @@ -410,7 +410,7 @@ window.rulesAutosurgery = (function() { else slave.health -= 10; } - } else if ((slave.anus > 0) && (V.surgeryUpgrade == 1) && (thisSurgery.surgery_holes == 2)) { + } else if ((slave.anus > 0) && (V.surgeryUpgrade === 1) && (thisSurgery.surgery_holes === 2)) { surgeries.push("a virgin anus"); slave.anus = 0; if (slave.analSkill > 10) { @@ -420,7 +420,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.vagina > 0) && (V.surgeryUpgrade == 1) && (thisSurgery.surgery_holes == 2)) { + } else if ((slave.vagina > 0) && (V.surgeryUpgrade === 1) && (thisSurgery.surgery_holes === 2)) { surgeries.push("a virgin pussy"); slave.vagina = 0; if (slave.vaginalSkill > 10) @@ -429,7 +429,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.hips < 2) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade == 1)) { + } else if ((slave.hips < 2) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade === 1)) { surgeries.push("wider hips"); slave.hips++; slave.hipsImplant++; @@ -437,7 +437,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.anus > 1) && (thisSurgery.surgery_holes == 1)) { + } else if ((slave.anus > 1) && (thisSurgery.surgery_holes === 1)) { surgeries.push("a tighter anus"); slave.anus = 1; if (slave.analSkill > 10) { @@ -447,7 +447,7 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if ((slave.vagina > 1) && (thisSurgery.surgery_holes == 1)) { + } else if ((slave.vagina > 1) && (thisSurgery.surgery_holes === 1)) { surgeries.push("a tighter pussy"); slave.vagina = 1; if (slave.vaginalSkill > 10) { @@ -477,7 +477,7 @@ window.rulesAutosurgery = (function() { else slave.health -= 10; } - } else if ((slave.hips < 3) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade == 1)) { + } else if ((slave.hips < 3) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade === 1)) { surgeries.push("wider hips"); slave.hips++; slave.hipsImplant++; @@ -485,11 +485,11 @@ window.rulesAutosurgery = (function() { if (V.PC.medicine >= 100) slave.health -= 5; else slave.health -= 10; - } else if (slave.bellyImplant < 0 && V.bellyImplants > 0 && thisSurgery.surgery_bellyImplant == "install" && slave.womb.length == 0 && slave.broodmother == 0) { + } else if (slave.bellyImplant < 0 && V.bellyImplants > 0 && thisSurgery.surgery_bellyImplant === "install" && slave.womb.length === 0 && slave.broodmother === 0) { slave.bellyImplant = 100; slave.preg = -2; cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); - if (slave.ovaries == 1 || slave.mpreg == 1) { + if (slave.ovaries === 1 || slave.mpreg === 1) { surgeries.push("belly implant"); V.surgeryType = "bellyIn"; if (V.PC.medicine >= 100) slave.health -= 5; @@ -502,7 +502,7 @@ window.rulesAutosurgery = (function() { } bellyIn(slave); - } else if (slave.bellyImplant >= 0 && thisSurgery.surgery_bellyImplant == "remove") { + } else if (slave.bellyImplant >= 0 && thisSurgery.surgery_bellyImplant === "remove") { surgeries.push("belly implant removal"); V.surgeryType = "bellyOut"; if (V.PC.medicine >= 100) diff --git a/src/js/sexActsJS.js b/src/js/sexActsJS.js index 362f66bba30497d3c39b4cb0cd957359d249619b..b6307e9e08fb227f01fbb25a20ff809bf43348b0 100644 --- a/src/js/sexActsJS.js +++ b/src/js/sexActsJS.js @@ -7,23 +7,23 @@ window.AnalVCheck = function AnalVCheck(times) { const slave = V.activeSlave; let pronouns = getPronouns(slave); let he = pronouns.pronoun, - him = pronouns.object, - his = pronouns.possessive, - hers = pronouns.possessivePronoun, - himself = pronouns.objectReflexive, - boy = pronouns.noun; + //him = pronouns.object, + his = pronouns.possessive; + // hers = pronouns.possessivePronoun, + // himself = pronouns.objectReflexive, + // boy = pronouns.noun; let He = capFirstChar(he), His = capFirstChar(his); let r = ``; if (canDoAnal(slave) && slave.anus === 0) { r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `; - if (slave.devotion > 50 || slave.career == "a slave since birth") { + if (slave.devotion > 50 || slave.career === "a slave since birth") { r += `Since it's ${his} first time, you gently ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. Before long ${he}'s moaning loudly as you continue working away at ${his} butthole. `; - if (slave.tankBaby == 2) { + if (slave.tankBaby === 2) { r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`; } else { r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. `; - if ((slave.fetishKnown && slave.fetish == "buttslut") || (slave.energy > 95) || (slave.attrXX >= 85 && V.PC.dick === 0)) { + if ((slave.fetishKnown && slave.fetish === "buttslut") || (slave.energy > 95) || (slave.attrXX >= 85 && V.PC.dick === 0)) { r += `${He} can't wait to be fucked in the ass by you again.`; } else { r += `${He} looks forward to having ${his} asshole fucked by you again.`; @@ -55,7 +55,7 @@ window.AnalVCheck = function AnalVCheck(times) { } } return r; -} +}; /* times is how many times to increment the vaginal counts. @@ -68,21 +68,21 @@ window.VaginalVCheck = function VaginalVCheck(times) { let he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, - hers = pronouns.possessivePronoun, - himself = pronouns.objectReflexive, - boy = pronouns.noun; - let He = capFirstChar(he), - His = capFirstChar(his); + hers = pronouns.possessivePronoun, + himself = pronouns.objectReflexive, + boy = pronouns.noun; + let He = capFirstChar(he); + let His = capFirstChar(his); let r = ``; if (canDoVaginal(slave) && slave.vagina === 0) { r += `@@.lime;This breaks in ${slave.slaveName}'s virgin pussy.@@ `; - if (slave.devotion > 50 || slave.career == "a slave since birth") { + if (slave.devotion > 50 || slave.career === "a slave since birth") { r += `You ease yourself into ${his} pussy, since it's ${his} first time, then gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `; - if (slave.tankBaby == 2) { + if (slave.tankBaby === 2) { r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity to be happy.@@ ${He} expects ${his} pussy to be seeing a lot more attention in the future.`; } else { r += `@@.hotpink;${He} enjoys losing ${his} cherry to you.@@ `; - if ((slave.fetishKnown && slave.fetish == "pregnancy") || (slave.energy > 95) || (slave.attrXY >= 85 && V.PC.dick === 1)) { + if ((slave.fetishKnown && slave.fetish === "pregnancy") || (slave.energy > 95) || (slave.attrXY >= 85 && V.PC.dick === 1)) { r += `${He} can't wait to have ${his} pussy fucked by you again.`; } else { r += `${He} looks forward to having ${his} pussy fucked by you again.`; @@ -116,7 +116,7 @@ window.VaginalVCheck = function VaginalVCheck(times) { } return r; -} +}; /* analTimes is how many times to increment the anal counts, if there is no vagina available. @@ -130,19 +130,19 @@ window.BothVCheck = function BothVCheck(analTimes, bothTimes) { let he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, - hers = pronouns.possessivePronoun, - himself = pronouns.objectReflexive, - boy = pronouns.noun; - let He = capFirstChar(he), - His = capFirstChar(his); + hers = pronouns.possessivePronoun, + himself = pronouns.objectReflexive, + boy = pronouns.noun; + let He = capFirstChar(he); + let His = capFirstChar(his); let r = ``; if (canDoVaginal(slave)) { if (slave.vagina === 0) { - if (canDoAnal(slave) && slave.anus == 0) { + if (canDoAnal(slave) && slave.anus === 0) { r += `@@.lime;This breaks in ${slave.slaveName}'s virgin holes.@@ `; - if (slave.devotion > 50 || slave.career == "a slave since birth") { + if (slave.devotion > 50 || slave.career === "a slave since birth") { r += `As it's ${his} first time, you ease yourself into ${his} pussy before gradually working your way into ${his} ass and alternate between the two holes while ${he} moans. `; - if (slave.tankBaby == 2) { + if (slave.tankBaby === 2) { r += `${He} believes you taking ${his} virgin holes @@.hotpink;will keep ${him} from suffering.@@ ${He} expects you to require ${his} holes as tribute again soon.`; } else { r += `@@.hotpink;${He}'s so devoted ${he} enjoys being fucked in both holes for the first time.@@ ${He} looks forward to having ${his} holes fucked by you again.`; @@ -158,9 +158,9 @@ window.BothVCheck = function BothVCheck(analTimes, bothTimes) { slave.anus = 1; } else { r += `@@.lime;This breaks in ${slave.slaveName}'s virgin pussy.@@ `; - if (slave.devotion > 50 || slave.career == "a slave since birth") { + if (slave.devotion > 50 || slave.career === "a slave since birth") { r += `As it's ${his} first time, you ease yourself into ${his} pussy and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `; - if (slave.tankBaby == 2) { + if (slave.tankBaby === 2) { r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity to be happy.@@ ${He} expects ${his} pussy to be seeing a lot more attention in the future.`; } else { r += `@@.hotpink;${He} enjoys losing ${his} cherry to you.@@ ${He} looks forward to having ${his} pussy fucked by you again.`; @@ -175,17 +175,17 @@ window.BothVCheck = function BothVCheck(analTimes, bothTimes) { } } slave.vagina = 1; - } else if (canDoAnal(slave) && slave.anus == 0) { + } else if (canDoAnal(slave) && slave.anus === 0) { r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `; - if (slave.devotion > 50 || slave.career == "a slave since birth") { + if (slave.devotion > 50 || slave.career === "a slave since birth") { r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `; - if (slave.tankBaby == 2) { + if (slave.tankBaby === 2) { r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`; } else { - r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.` + r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`; } slave.devotion += 4; - } else if (slave.devotion > 20){ + } else if (slave.devotion > 20) { r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. ${He} accepts the pain and humiliation of anal sex as part of ${his} sexual servitude, though ${he} hopes that ${his} next time will be less painful.`; } else if (slave.devotion >= -20) { r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`; @@ -225,11 +225,11 @@ window.BothVCheck = function BothVCheck(analTimes, bothTimes) { } } } else if (canDoAnal(slave)) { - if (slave.anus == 0) { + if (slave.anus === 0) { r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `; - if (slave.devotion > 50 || slave.career == "a slave since birth") { + if (slave.devotion > 50 || slave.career === "a slave since birth") { r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `; - if (slave.tankBaby == 2) { + if (slave.tankBaby === 2) { r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`; } else { r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`; @@ -241,7 +241,7 @@ window.BothVCheck = function BothVCheck(analTimes, bothTimes) { r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`; slave.trust -= 5; } else { - r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.` + r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`; slave.trust -= 5; slave.devotion -= 5; } @@ -259,7 +259,7 @@ window.BothVCheck = function BothVCheck(analTimes, bothTimes) { } } return r; -} +}; /* times is how many times to increment either the Vaginal or the Anal counts, if there is no Vagina available. @@ -273,7 +273,7 @@ window.SimpleVCheck = function SimpleVCheck(times) { r += AnalVCheck(times); } return r; -} +}; /* Before using this function, set $partner to the index of the partner in the $slaves array @@ -288,13 +288,13 @@ window.PartnerVCheck = function PartnerVCheck(analTimes, bothTimes) { const partner = V.slaves[V.partner]; let pronouns = getPronouns(partner); let he = pronouns.pronoun, - him = pronouns.object, - his = pronouns.possessive, - hers = pronouns.possessivePronoun, - himself = pronouns.objectReflexive, - boy = pronouns.noun; - let He = capFirstChar(he), - His = capFirstChar(his); + him = pronouns.object, + his = pronouns.possessive, + hers = pronouns.possessivePronoun, + himself = pronouns.objectReflexive, + boy = pronouns.noun; + let He = capFirstChar(he); + let His = capFirstChar(his); let r = ``; if (V.partner < 0 || V.partner >= V.slaves.length) { r += `@@.red;PartnerVCheck called with invalid partner '$partner' from passage ${passage()}.@@`; @@ -308,7 +308,7 @@ window.PartnerVCheck = function PartnerVCheck(analTimes, bothTimes) { r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} pussy before gradually increasing the intensity of your thrusts. @@.lime;This breaks in ${partner.slaveName}'s virgin pussy.@@ `; partner.vagina = 1; } - } else if (canDoAnal(partner) && partner.anus == 0) { + } else if (canDoAnal(partner) && partner.anus === 0) { r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} butthole before gradually increasing the intensity of your thrusts into ${his} ass. @@.lime;This breaks in ${partner.slaveName}'s virgin ass.@@ `; partner.anus = 1; } @@ -357,7 +357,7 @@ window.PartnerVCheck = function PartnerVCheck(analTimes, bothTimes) { } } return r; -} +}; /* count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave. @@ -373,8 +373,8 @@ window.SimpleSexAct = function SimpleSexAct(slave, count) { fuckCount = count; } for (var i = 0; i < fuckCount; i++) { - fuckTarget = jsRandom(1,100); - if (slave.nipples == "fuckable" && V.PC.dick === 1 && fuckTarget > 80) { + fuckTarget = jsRandom(1, 100); + if (slave.nipples === "fuckable" && V.PC.dick === 1 && fuckTarget > 80) { V.mammaryTotal += 1; slave.mammaryCount += 1; } else if (canDoVaginal(slave) && slave.vagina > 0 && fuckTarget > 33) { @@ -395,7 +395,7 @@ window.SimpleSexAct = function SimpleSexAct(slave, count) { } } return r; -} +}; /* count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave. @@ -411,8 +411,8 @@ window.SimpleSlaveFucking = function SimpleSlaveFucking(slave, count) { fuckCount = count; } for (var i = 0; i < fuckCount; i++) { - fuckTarget = jsRandom(1,100); - if (slave.nipples == "fuckable" && fuckTarget > 80) { + fuckTarget = jsRandom(1, 100); + if (slave.nipples === "fuckable" && fuckTarget > 80) { V.mammaryTotal += 1; slave.mammaryCount += 1; } else if (canDoVaginal(slave) && slave.vagina > 0 && fuckTarget > 33) { @@ -427,7 +427,7 @@ window.SimpleSlaveFucking = function SimpleSlaveFucking(slave, count) { } } return; -} +}; /* count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave. @@ -444,10 +444,10 @@ window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, doms } for (var j = 0; j < fuckCount; j++) { //there is a reason randomization happens inside cycle - to spread fuck around, otherwise cycle isn't even needed - fuckTarget = jsRandom(1,100); + fuckTarget = jsRandom(1, 100); if (subslave.nipples === "fuckable" && canPenetrate(domslave) && fuckTarget > 80) { if (passage() === "SA serve your other slaves") { - if (subslave.ID == V.slaves[V.i].ID) { + if (subslave.ID === V.slaves[V.i].ID) { V.slaves[V.i].mammaryCount++; V.mammaryTotal++; domslave.penetrativeCount++; @@ -466,7 +466,7 @@ window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, doms } } else if (canDoVaginal(subslave) && subslave.vagina > 0 && canPenetrate(domslave) && fuckTarget > 33) { if (passage() === "SA serve your other slaves") { - if (subslave.ID == V.slaves[V.i].ID) { + if (subslave.ID === V.slaves[V.i].ID) { V.slaves[V.i].vaginalCount++; V.vaginalTotal++; V.penetrativeTotal++; @@ -488,11 +488,11 @@ window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, doms } } else if (canDoAnal(subslave) && subslave.anus > 0 && canPenetrate(domslave) && fuckTarget > 10) { //i think would impregnate from anal here even without .mpreg? same in original widget too - if (canImpreg(subslave, domslave) && subslave.mpreg == 1) { + if (canImpreg(subslave, domslave) && subslave.mpreg === 1) { r += knockMeUp(subslave, 3, 1, domslave.ID, 1); } if (passage() === "SA serve your other slaves") { - if (subslave.ID == V.slaves[V.i].ID) { + if (subslave.ID === V.slaves[V.i].ID) { V.slaves[V.i].analCount++; V.analTotal++; V.penetrativeTotal++; @@ -515,7 +515,7 @@ window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, doms } } return r; -} +}; window.SimpleVaginaFuck = function SimpleVaginaFuck(slave, count) { if (count) { @@ -525,7 +525,7 @@ window.SimpleVaginaFuck = function SimpleVaginaFuck(slave, count) { State.variables.vaginalTotal++; slave.vaginalCount++; } -} +}; window.SimpleAssFuck = function SimpleAssFuck(slave, count) { if (count) { @@ -535,4 +535,4 @@ window.SimpleAssFuck = function SimpleAssFuck(slave, count) { State.variables.analTotal++; slave.analCount++; } -} +}; diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index 4a562f3f88fbc766dd7c2ea51aa9014b0e341da0..0bcdefa256fa343f0f02405493592da5242ce406 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -65,7 +65,7 @@ window.Beauty = (function() { beauty = Math.max(1, Math.trunc(0.5*beauty)); return beauty; - }; + } function calcInitBeauty(slave) { beauty -= slave.waist/20; @@ -81,7 +81,7 @@ window.Beauty = (function() { beauty -= 10 + (slave.vagina*2); /*-20*/ } - }; + } function calcFaceBeauty(slave) { beauty += slave.face/5; @@ -114,7 +114,7 @@ window.Beauty = (function() { beauty += 8/3; break; } - }; + } function calcTeethBeauty(slave) { switch (slave.teeth) { @@ -122,7 +122,7 @@ window.Beauty = (function() { beauty -= 3; break; case "gapped": - if (slave.faceShape == "cute") { + if (slave.faceShape === "cute") { beauty += 1; } else { beauty -= 1; @@ -141,9 +141,9 @@ window.Beauty = (function() { beauty -= 1; break; } - }; + } - function calcModBeauty(slave) { + function calcModBeauty(/*slave*/) { if (arcology.FSTransformationFetishist > 20 || arcology.FSDegradationist > 20) { if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { beauty += 8 + (V.modScore*0.25); @@ -165,7 +165,7 @@ window.Beauty = (function() { beauty += 7 + (0.5*(V.modScore - 7)); } } - }; + } function calcCosmeticsBeauty(slave) { if (slave.brand !== 0) { @@ -212,7 +212,7 @@ window.Beauty = (function() { } break; } - }; + } function calcFSNotFuckdollBeauty(slave) { if (arcology.FSSupremacist !== "unset") { @@ -281,7 +281,7 @@ window.Beauty = (function() { } } } - }; + } function calcMiscNotFuckdollBeauty(slave) { beauty += Math.min(slave.health, 100)/5; @@ -300,7 +300,7 @@ window.Beauty = (function() { } else if (slave.race === "white") { beauty += 2; } - }; + } function calcDickBeauty(slave) { if (arcology.FSAssetExpansionist > 20 && arcology.FSGenderFundamentalist === "unset") { @@ -326,7 +326,7 @@ window.Beauty = (function() { } else { beauty -= 2*slave.dick; } - }; + } function calcBallsBeauty(slave) { if (arcology.FSAssetExpansionist > 20 && arcology.FSGenderFundamentalist === "unset") { @@ -365,7 +365,7 @@ window.Beauty = (function() { beauty -= slave.balls*(1 + (arcology.FSRestart/100)); } } - }; + } function calcButtBeauty(slave) { if (slave.butt <= 10) { @@ -417,7 +417,7 @@ window.Beauty = (function() { } } } - }; + } function calcHipsBeauty(slave) { /* butts in general may need buffs */ switch (slave.hips) { @@ -484,7 +484,7 @@ window.Beauty = (function() { } break; } - }; + } function calcBoobsBeauty(slave) { if ((arcology.FSTransformationFetishist > 20 && arcology.FSSlimnessEnthusiast === "unset") || arcology.FSAssetExpansionist > 20) { @@ -591,7 +591,7 @@ window.Beauty = (function() { beauty += arcology.FSTransformationFetishist/10; } } - }; + } function calcWeightBeauty(slave) { if (arcology.FSHedonisticDecadence > 20) { @@ -648,7 +648,7 @@ window.Beauty = (function() { } } } - }; + } function calcMusclesBeauty(slave) { if (arcology.FSPhysicalIdealist !== "unset") { @@ -674,7 +674,7 @@ window.Beauty = (function() { } } } - }; + } function calcBodyHairBeauty(slave) { if (slave.physicalAge < 11) { @@ -724,7 +724,7 @@ window.Beauty = (function() { break; } } - }; + } function calcImplantBeauty(slave) { if (arcology.FSTransformationFetishist !== "unset") { @@ -752,7 +752,7 @@ window.Beauty = (function() { beauty -= (slave.faceImplant - 30)/10; } } - }; + } function calcRepopulationPregBeauty(slave) { if (slave.preg > slave.pregData.normalBirth/1.33) { /*limited huge boost for full term */ @@ -795,7 +795,7 @@ window.Beauty = (function() { } else { beauty += slave.births*(arcology.FSRepopulationFocus/75); } - }; + } function calcTrendyPregBeauty(slave) { if (slave.preg > slave.pregData.normalBirth/1.33) { /*limited huge boost for full term */ @@ -803,7 +803,7 @@ window.Beauty = (function() { } else if (slave.bellyPreg >= 1500) { beauty += 10; } - }; + } function calcRestartPregBeauty(slave) { if (slave.breedingMark === 1 && V.propOutcome === 1) { @@ -848,7 +848,7 @@ window.Beauty = (function() { beauty -= slave.births*(arcology.FSRestart/50); } } - }; + } function calcTrendyMilfBeauty(slave) { if (slave.births > 50) { @@ -856,7 +856,7 @@ window.Beauty = (function() { } else { beauty += Math.ceil(slave.births/10); } - }; + } function calcFutaLawBeauty(slave) { switch (arcology.FSGenderRadicalistLawFuta) { @@ -881,7 +881,7 @@ window.Beauty = (function() { } break; } - }; + } function calcFutaLawTrueFutaBeauty(slave) { if (slave.dick <= 10) { @@ -891,7 +891,7 @@ window.Beauty = (function() { } else { beauty += 4; } - }; + } function calcFutaLawBigDickBeauty(slave) { beauty += slave.dick; @@ -912,7 +912,7 @@ window.Beauty = (function() { } else { beauty += slave.balls; } - }; + } function calcFutaLawBigBootyBeauty(slave) { if (slave.hips >= 1) { @@ -923,14 +923,14 @@ window.Beauty = (function() { } if (slave.analSkill > 60 && slave.anus >= 2) { beauty += 2*(slave.anus-2); /*6*/ - if (arcology.FSSlimnessEnthusiast != "unset") { + if (arcology.FSSlimnessEnthusiast !== "unset") { beauty += 2*(slave.anus-2); /*6*/ /* offsets the malus for big butts */ } } if (slave.butt >= 5) { beauty += (slave.butt - 5); /*15*/ } - }; + } function calcFutaLawFemboyBeauty(slave) { if (arcology.FSSlimnessEnthusiast === "unset") { /*balance with slimness*/ @@ -959,7 +959,7 @@ window.Beauty = (function() { } else { beauty -= 5; } - }; + } function calcBodyProportionBeauty(slave) { if (arcology.FSGenderFundamentalist !== "unset") { @@ -975,7 +975,7 @@ window.Beauty = (function() { } } } - }; + } function calcVoiceBeauty(slave) { if (canTalk(slave)) { @@ -987,7 +987,7 @@ window.Beauty = (function() { } else { beauty -= 2; } - }; + } function calcLimbsBeauty(slave) { switch (slave.amp) { @@ -1000,7 +1000,7 @@ window.Beauty = (function() { beauty -= 2; break; } - }; + } function calcPubertyBeauty(slave) { if (slave.pubertyXX === 1) { @@ -1012,7 +1012,7 @@ window.Beauty = (function() { beauty += 5; } } - }; + } function calcFSMiscBeauty(slave) { if (arcology.FSTransformationFetishist > 20) { @@ -1047,7 +1047,7 @@ window.Beauty = (function() { beauty += 2*V.nicaeaPower; } } - }; + } function calcPurityBeauty(slave) { if (isPure(slave)) { @@ -1061,7 +1061,7 @@ window.Beauty = (function() { } else if (arcology.FSTransformationFetishist !== "unset") { beauty += arcology.FSTransformationFetishist/40; } - }; + } function calcPhysiqueBeauty(slave) { let physiquePass = 0; @@ -1102,7 +1102,7 @@ window.Beauty = (function() { } } } - }; + } function calcSlimBeauty(slave) { if (slimPass(slave) === 1) { @@ -1110,7 +1110,7 @@ window.Beauty = (function() { } else { beauty -= arcology.FSSlimnessEnthusiast/20; } - }; + } function calcGenderLawBeauty(slave) { V.genderLawPass = 1; @@ -1137,7 +1137,7 @@ window.Beauty = (function() { } else { beauty -= 10; } - }; + } function calcMultipliersBeauty(slave) { calcBellyBeauty(slave); @@ -1154,7 +1154,7 @@ window.Beauty = (function() { if (slave.prestige + slave.pornPrestige > 0) { calcPrestigeBeauty(slave); } - }; + } function calcBellyBeauty(slave) { if (slave.bellySag > 0) { @@ -1202,7 +1202,7 @@ window.Beauty = (function() { } } } - }; + } function calcAgeBeauty(slave) { if (slave.physicalAge === V.minimumSlaveAge) { @@ -1228,7 +1228,7 @@ window.Beauty = (function() { beauty += 0.1*beauty; } } - }; + } function calcPrestigeBeauty(slave) { /* multipliers */ if (slave.prestige >= 3) { @@ -1245,7 +1245,7 @@ window.Beauty = (function() { } else if (slave.pornPrestige === 1) { beauty += 0.1*beauty; } - }; + } return Beauty; })(); @@ -1411,7 +1411,7 @@ window.FResult = (function() { function calcSexAttributes(slave) { if (slave.clitPiercing > 2) result += 1; - if (slave.fetishKnown === 1 && slave.fetishStrength > 60 && slave.fetish != "none") + if (slave.fetishKnown === 1 && slave.fetishStrength > 60 && slave.fetish !== "none") result += slave.fetishStrength/5; if (slave.attrKnown === 1) { @@ -1569,7 +1569,7 @@ window.slaveCost = (function() { calcStartingSlaveCost(slave); } return cost; - }; + } function calcGenitalsCost(slave) { if (slave.vagina === 0) { @@ -1600,7 +1600,7 @@ window.slaveCost = (function() { } } } - }; + } function calcDevotionTrustCost(slave) { if (V.specialSlavesPriceOverride === 1) { @@ -1622,7 +1622,7 @@ window.slaveCost = (function() { } } } - }; + } function calcPreferencesCost(slave) { if (slave.behavioralFlaw !== "none") { @@ -1653,7 +1653,7 @@ window.slaveCost = (function() { multiplier += 0.2; } } - }; + } function calcPregCost(slave) { if (slave.mpreg === 1) { @@ -1686,11 +1686,11 @@ window.slaveCost = (function() { multiplier -= 1.5; } else if (V.activeSlave.bellyPreg >= 120000) { multiplier -= 0.5; - } else if (slave.bellyPreg >= 500 || slave.pregKnown == 1) { + } else if (slave.bellyPreg >= 500 || slave.pregKnown === 1) { multiplier -= 0.1; } } - }; + } function calcPrestigeCost(slave) { if (slave.prestige > 0) { @@ -1703,7 +1703,7 @@ window.slaveCost = (function() { } else if (slave.pornPrestige === 1) { multiplier += 0.2; } - }; + } function calcFSCost(slave) { if (arcology.FSSupremacistLawME !== 0) { @@ -1757,7 +1757,7 @@ window.slaveCost = (function() { if (arcology.FSArabianRevivalist > 50) { multiplier += 0.1; } - }; + } function calcAgeCost(slave) { if (slave.physicalAge === V.minimumSlaveAge && slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset")) { @@ -1779,7 +1779,7 @@ window.slaveCost = (function() { multiplier -= 0.05; } } - }; + } function calcCareersCost(slave) { if (slave.career !== 0) { @@ -1876,7 +1876,7 @@ window.slaveCost = (function() { if (!setup.whoreCareers.includes(slave.career) && slave.skillW >= V.masteredXP) { multiplier += 0.05; } - }; + } function calcMiscCost(slave) { let totalInt = Math.clamp(slave.intelligence + slave.intelligenceImplant,-130,130); /* make absolutely certain we do not use +-131 in the next line */ @@ -1897,7 +1897,7 @@ window.slaveCost = (function() { if (slave.eyes === -2) { multiplier -= 0.2; } - }; + } function calcIndentureCost(slave) { if (slave.indenture > -1) { @@ -1911,9 +1911,9 @@ window.slaveCost = (function() { multiplier *= (V.retirementAge-slave.actualAge)/5; } } - }; + } - function calcCost(slave) { + function calcCost(/*slave*/) { cost *= multiplier*50; cost = Number(cost) || 0; if (cost < V.minimumSlaveCost) { @@ -1935,7 +1935,7 @@ window.slaveCost = (function() { cost = 1000; } cost = 500*Math.trunc(cost/500); - }; + } function calcStartingSlaveCost(slave) { let startingSlaveMultiplier = 0; @@ -1975,7 +1975,7 @@ window.slaveCost = (function() { if (V.PC.career === "slaver") { cost = cost/2; } - }; + } return slaveCost; })(); diff --git a/src/js/slaveGenerationJS.js b/src/js/slaveGenerationJS.js index 9e03b7e2e94cc8a78a6af1f306a7683fa6c9bfc9..053ec95d862cf7fe2910c73281eed4a1498dd486 100644 --- a/src/js/slaveGenerationJS.js +++ b/src/js/slaveGenerationJS.js @@ -11,7 +11,7 @@ window.raceToNationality = function raceToNationality(slave) { slave.nationality = hashChoice(V.nationalities); } /* No success after 100 attempts, so just randomize according to race */ - if (setup.raceSelector[slave.nationality] && !(slave.race in setup.raceSelector[slave.nationality]) && i == 100) { + if (setup.raceSelector[slave.nationality] && !(slave.race in setup.raceSelector[slave.nationality]) && i === 100) { slave.nationality = hashChoice(setup[slave.race.toLowerCase().replace(/[ -]/g, '')+'Nationalities']); } }; @@ -66,15 +66,15 @@ window.nationalityToName = function nationalityToName(slave) { slave.slaveSurname = slave.birthSurname; if (V.useFSNames === 1) { if (V.arcologies[0].FSChattelReligionist > 20) { - slave.slaveName = jsEither(setup.chattelReligionistSlaveNames), slave.slaveSurname = 0; + slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); slave.slaveSurname = 0; } else if (V.arcologies[0].FSRomanRevivalist > 20) { - slave.slaveName = jsEither(setup.romanSlaveNames), slave.slaveSurname = jsEither(setup.romanSlaveSurnames); + slave.slaveName = jsEither(setup.romanSlaveNames); slave.slaveSurname = jsEither(setup.romanSlaveSurnames); } else if (V.arcologies[0].FSAztecRevivalist > 20) { - slave.slaveName = jsEither(setup.aztecSlaveNames), slave.slaveSurname = 0; + slave.slaveName = jsEither(setup.aztecSlaveNames); slave.slaveSurname = 0; } else if (V.arcologies[0].FSEgyptianRevivalist > 20) { - slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames), slave.slaveSurname = 0; + slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); slave.slaveSurname = 0; } else if (V.arcologies[0].FSEdoRevivalist > 20) { - slave.slaveName = jsEither(setup.edoSlaveNames), slave.slaveSurname = jsEither(setup.edoSlaveSurnames); + slave.slaveName = jsEither(setup.edoSlaveNames); slave.slaveSurname = jsEither(setup.edoSlaveSurnames); } else if (V.arcologies[0].FSDegradationist !== "unset") { DegradingName(slave); } @@ -1231,7 +1231,7 @@ window.checkForGingering = function checkForGingering() { const His = capFirstChar(his); /* reset in case gingered slaves were viewed but not purchased (no newSlaveIntro) */ - V.gingering = 0, V.gingeringDetected = 0, V.gingeringDetection = 0, V.toSearch = V.activeSlave.origin; + V.gingering = 0; V.gingeringDetected = 0; V.gingeringDetection = 0; V.toSearch = V.activeSlave.origin; if (V.applyLaw === 1 && V.HonestySMR === 1) { /* SMR prohibits gingering and is enforced for this slave - do nothing */ } else if (V.activeSlave.indenture > 0) { @@ -1271,7 +1271,7 @@ window.checkForGingering = function checkForGingering() { } if (V.gingering !== 0) { if (V.PC.slaving >= 100) { - V.gingeringDetected = 1, V.gingeringDetection = "slaver"; + V.gingeringDetected = 1; V.gingeringDetection = "slaver"; switch (V.gingering) { case "antidepressant": r += `${He} is acting dazed and unfocused. ${He}'s obviously been given antidepressants to make ${him} appear less fearful, and will be considerably less trusting than ${he} seems.`; @@ -1298,9 +1298,9 @@ window.checkForGingering = function checkForGingering() { } else { /* not slaver */ if (V.PC.warfare >= 100 && jsRandom(1, 2) === 1) { - V.gingeringDetected = 1, V.gingeringDetection = "mercenary"; + V.gingeringDetected = 1; V.gingeringDetection = "mercenary"; } else if (V.PC.rumor === "force" && jsRandom(1, 2) === 1) { - V.gingeringDetected = 1, V.gingeringDetection = "force"; + V.gingeringDetected = 1; V.gingeringDetection = "force"; } else if (jsRandom(1, 3) === 1) { V.gingeringDetected = 1; } @@ -1347,10 +1347,10 @@ window.removeGingering = function removeGingering() { const V = State.variables; if (V.gingering !== 0 && V.beforeGingering !== 0 && V.activeSlave !== 0 && V.beforeGingering.ID === V.activeSlave.ID) { /* extra checks to ensure gingering state is not left over from a different slave that was inspected but not purchased */ - V.activeSlave = V.beforeGingering, V.beforeGingering = 0; + V.activeSlave = V.beforeGingering; V.beforeGingering = 0; } else { /* clear left over state from a different slave without modifying activeSlave */ - V.gingering = 0, V.beforeGingering = 0; + V.gingering = 0; V.beforeGingering = 0; } }; @@ -1764,7 +1764,7 @@ window.generatePronouns = function generatePronouns(slave) { slave.object = "it"; slave.objectReflexive = "itself"; slave.noun = "toy"; - } else if (slave.dick > 0 && slave.vagina == -1 && State.variables.diversePronouns == 1) { + } else if (slave.dick > 0 && slave.vagina === -1 && State.variables.diversePronouns === 1) { slave.pronoun = "he"; slave.possessivePronoun = "his"; slave.possessive = "his"; @@ -1779,4 +1779,4 @@ window.generatePronouns = function generatePronouns(slave) { slave.objectReflexive = "herself"; slave.noun = "girl"; } -}; \ No newline at end of file +}; diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index 9da602b0a2362154697b5951716dc5506719019c..e151473be1930989a1f28ef841e6b59f1203d2d4 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -958,7 +958,7 @@ window.SlaveSummaryUncached = (function(){ r += `twins.`; } } - if (slave.preg > slave.pregData.normalBirth && slave.broodmother == 0) { + if (slave.preg > slave.pregData.normalBirth && slave.broodmother === 0) { r += ` (Overdue.)`; } } @@ -3709,7 +3709,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s daughter`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTermShort(slave) + var friendShipShort = relationshipTermShort(slave); r += ` & ${friendShipShort}`; handled = 1; } @@ -3735,7 +3735,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s daughter`; if (slave.relationshipTarget === V.slaves[_ssj].ID && handled !== 1) { - var friendShipShort = relationshipTermShort(slave) + var friendShipShort = relationshipTermShort(slave); r += ` & ${friendShipShort}`; handled = 1; } @@ -3761,7 +3761,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s mother`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTermShort(slave) + var friendShipShort = relationshipTermShort(slave); r += ` & ${friendShipShort}`; handled = 1; } @@ -3773,7 +3773,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s father`; if (slave.relationshipTarget === V.slaves[_ssj].ID && handled !== 1) { - var friendShipShort = relationshipTermShort(slave) + var friendShipShort = relationshipTermShort(slave); r += ` & ${friendShipShort}`; handled = 1; } @@ -3789,7 +3789,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s sister`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTermShort(slave) + var friendShipShort = relationshipTermShort(slave); r += `& ${friendShipShort}`; handled = 1; } @@ -3804,7 +3804,7 @@ window.SlaveSummaryUncached = (function(){ }); if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; - var friendShipShort = relationshipTermShort(slave) + var friendShipShort = relationshipTermShort(slave); r += ` ${friendShipShort}`; } } else if (slave.relationship === -3 && slave.mother !== -1 && slave.father !== -1) { @@ -3831,13 +3831,13 @@ window.SlaveSummaryUncached = (function(){ return s.ID === slave.relationshipTarget; }); if (_ssj !== -1) { - var friendship = relationshipTerm(slave) - if (slave.relationshipTarget !== slave.relationTarget) { - r += `${SlaveFullName(V.slaves[_ssj])}'s`; - } else { - r += ` &`; - } - r += ` ${friendship}`; + var friendship = relationshipTerm(slave); + if (slave.relationshipTarget !== slave.relationTarget) { + r += `${SlaveFullName(V.slaves[_ssj])}'s`; + } else { + r += ` &`; + } + r += ` ${friendship}`; } } else if (slave.relationship === -3) { r += `Your wife`; @@ -3849,7 +3849,7 @@ window.SlaveSummaryUncached = (function(){ } function short_clone(slave) { - if (slave.clone != 0) { + if (slave.clone !== 0) { r += ` Clone`; } } @@ -3883,7 +3883,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">daughter`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave) + var friendShipShort = relationshipTerm(slave); r += ` and ${friendShipShort}`; handled = 1; } @@ -3910,7 +3910,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">daughter`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave) + var friendShipShort = relationshipTerm(slave); r += ` and ${friendShipShort}`; handled = 1; } @@ -3937,7 +3937,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">mother`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave) + var friendShipShort = relationshipTerm(slave); r += ` and ${friendShipShort}`; handled = 1; } @@ -3949,7 +3949,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">father`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave) + var friendShipShort = relationshipTerm(slave); r += ` and ${friendShipShort}`; handled = 1; } @@ -3971,7 +3971,7 @@ window.SlaveSummaryUncached = (function(){ if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">sister`; if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave) + var friendShipShort = relationshipTerm(slave); r += ` and ${friendShipShort}`; handled = 1; } @@ -3991,7 +3991,7 @@ window.SlaveSummaryUncached = (function(){ return s.ID === slave.relationshipTarget; }); if (_ssj !== -1) { - var friendship = relationshipTerm(slave) + var friendship = relationshipTerm(slave); r += `${SlaveFullName(V.slaves[_ssj])}'s `; r += `<span class="lightgreen">${friendship}.</span> `; } @@ -4026,7 +4026,7 @@ window.SlaveSummaryUncached = (function(){ return s.ID === slave.relationshipTarget; }); if (_ssj !== -1) { - var friendship = relationshipTerm(slave) + var friendship = relationshipTerm(slave); if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s `; } else { @@ -4044,7 +4044,7 @@ window.SlaveSummaryUncached = (function(){ } function long_clone(slave) { - if (slave.clone != 0) { + if (slave.clone !== 0) { r += ` <span class="skyblue">Clone of ${slave.clone}.</span>`; } } diff --git a/src/js/storyJS.js b/src/js/storyJS.js index 4c0f9739373299f4b3523d7fe498381b1f94c06b..2955def2ffc70ff6ce64a382eb7d8e89c030448d 100644 --- a/src/js/storyJS.js +++ b/src/js/storyJS.js @@ -1,9 +1,9 @@ /*config.history.tracking = false;*/ -State.expired.disable; +// State.expired.disable; window.variableAsNumber = function(x, defaultValue, minValue, maxValue) { - x = Number(x) - if (x != x) {//NaN + x = Number(x); + if (x !== x) {//NaN return defaultValue || 0;//In case the default value was not supplied. } if (x < minValue) {//Works even if minValue is undefined. @@ -24,7 +24,7 @@ window.isSexuallyPure = function(slave) { return false; } }; -if (typeof interpolate == "undefined") { +if (typeof interpolate === "undefined") { var interpolate = function(x0,y0,x1,y1,x) { if(x <= x0) { return y0; @@ -35,12 +35,12 @@ if (typeof interpolate == "undefined") { } }; window.interpolate = interpolate; -}; +} window.isFullyPotent = function(slave) { if (!slave) { return null; - } else if (slave.dick > 0 && slave.balls > 0 && slave.ballType != 'sterile' && slave.hormoneBalance < 100 && slave.drugs !== 'hormone blockers') { + } else if (slave.dick > 0 && slave.balls > 0 && slave.ballType !== 'sterile' && slave.hormoneBalance < 100 && slave.drugs !== 'hormone blockers') { return true; } else { return false; @@ -55,18 +55,18 @@ if (typeof BoobGenerator === "undefined") { rollBreast: function (modif) { var volume = [0, 300, 500, 650, 800, 1000, 1200, 1400, 1600, 1800, 2050, 2300, 2600, 2900, 3250, 3600, 3950, 4300, 4700, 5100, 5500, 5900]; var volume_dist = [90000, 470000, 720000, 840000, 908574, 947759, 970151, 982946, 990258, 994436, 996824, 998188, 998968, 999414, 999669, 999814, 999897, 999945, 999972, 999987, 999995, 1000000]; - var randomRoll = Math.floor(Math.random() * 1000000) + 1 - var actualSize = 0 + var randomRoll = Math.floor(Math.random() * 1000000) + 1; + var actualSize = 0; while (randomRoll > volume_dist[actualSize]) { - actualSize = actualSize + 1 + actualSize = actualSize + 1; } - var minorSizeAdjustment = 0 + var minorSizeAdjustment = 0; if (Math.random()<.5) { - minorSizeAdjustment = (Math.floor(Math.random() * 2) + 1) * 50 + minorSizeAdjustment = (Math.floor(Math.random() * 2) + 1) * 50; } - var volResult = volume[actualSize] + minorSizeAdjustment + modif - if (volResult < 0) {volResult = 0} - return volResult + var volResult = volume[actualSize] + minorSizeAdjustment + modif; + if (volResult < 0) { volResult = 0;} + return volResult; } }; // Raise namespace scope to Global. @@ -79,12 +79,12 @@ if (typeof BoobGenerator === "undefined") { if (typeof SlaveStatsChecker === "undefined") { var SlaveStatsChecker = { checkForLisp: function (slave) { - /* Begin mod section: toggle whether slaves lisp. */ - if (State && State.variables.disableLisping == 1) { - return false; - } - /* End mod section: toggle whether slaves lisp. */ - return ((slave.lips > 70) || (slave.lipsPiercing + slave.tonguePiercing > 2) || (slave.teeth == "gapped")) + /* Begin mod section: toggle whether slaves lisp. */ + if (State && State.variables.disableLisping === 1) { + return false; + } + /* End mod section: toggle whether slaves lisp. */ + return ((slave.lips > 70) || (slave.lipsPiercing + slave.tonguePiercing > 2) || (slave.teeth === "gapped")); } }; // Raise namespace scope to Global. @@ -93,7 +93,7 @@ if (typeof SlaveStatsChecker === "undefined") { window.removeFromArray = function(arr, val) { for (var i = 0; i < arr.length; i++) { - if (val == arr[i]) + if (val === arr[i]) return arr.splice(i,1); } return null; @@ -115,7 +115,7 @@ if (typeof FertilityAge === "undefined") { var FertilityAge = { setAge: function (age) { age = Number(age); - if (age != age) { + if (age !== age) { return 13; } else { return age; @@ -129,13 +129,13 @@ if (typeof FertilityAge === "undefined") { window.canGetPregnant = function(slave) { if (!slave) { return null; - } else if (slave.preg == -1) { /* contraceptives check */ + } else if (slave.preg === -1) { /* contraceptives check */ return false; } else if (!isFertile(slave)) { /* check other fertility factors */ return false; - } else if ((slave.ovaries == 1) && (canDoVaginal(slave))) { + } else if ((slave.ovaries === 1) && (canDoVaginal(slave))) { return true; - } else if ((slave.mpreg == 1) && (canDoAnal(slave))) { /* pregmod */ + } else if ((slave.mpreg === 1) && (canDoAnal(slave))) { /* pregmod */ return true; } else { return false; @@ -146,7 +146,7 @@ window.canGetPregnant = function(slave) { window.canBreed = function(slave1, slave2) { if (!slave1 || !slave2) { return null; - } else if (slave1.eggType == slave2.ballType) { + } else if (slave1.eggType === slave2.ballType) { return true; } else { return false; @@ -160,7 +160,7 @@ window.canImpreg = function(slave1, slave2) { } else if (slave2.dick < 1) { return false; } else if (slave2.ID === -1) { - if (slave1.eggType != "human") { + if (slave1.eggType !== "human") { return false; } else if (!canGetPregnant(slave1)) { /* includes chastity checks */ return false; @@ -169,16 +169,16 @@ window.canImpreg = function(slave1, slave2) { } } else if (slave2.balls < 1) { return false; - } else if (slave2.dickAccessory == "chastity") { + } else if (slave2.dickAccessory === "chastity") { return false; - } else if (slave2.dickAccessory == "combined chastity") { + } else if (slave2.dickAccessory === "combined chastity") { return false; - } else if (slave2.pubertyXY == 0) { /* pregmod start */ + } else if (slave2.pubertyXY === 0) { /* pregmod start */ return false; - } else if (slave2.vasectomy == 1) { + } else if (slave2.vasectomy === 1) { return false; } else if (slave1.ID === -1) { - if (slave2.ballType != "human") { + if (slave2.ballType !== "human") { return false; } else if (!isPlayerFertile(slave1)) { return false; @@ -210,17 +210,17 @@ window.isFertile = function(slave) { return false; } else if (slave.pregWeek < 0) { /* postpartum */ return false; - } else if (slave.pubertyXX == 0) { /* pregmod start */ + } else if (slave.pubertyXX === 0) { /* pregmod start */ return false; } else if (slave.ovaryAge >= 47) { return false; } else if (slave.inflation > 2) { return false; - } else if (slave.bellyImplant != -1) { + } else if (slave.bellyImplant !== -1) { return false; - } else if (slave.mpreg == 1) { + } else if (slave.mpreg === 1) { return true; /* pregmod end */ - } else if (slave.ovaries == 1) { + } else if (slave.ovaries === 1) { return true; } else { return false; @@ -230,11 +230,11 @@ window.isFertile = function(slave) { window.isPlayerFertile = function(PC) { if (!PC) { return null; - } else if (PC.preg != 0) { /* currently pregnant, sterile, menopausal or on contraceptives */ + } else if (PC.preg !== 0) { /* currently pregnant, sterile, menopausal or on contraceptives */ return false; } else if (PC.pregWeek < 0) { /* postpartum */ return false; - } else if (PC.vagina == 1) { + } else if (PC.vagina === 1) { return true; } else { return false; @@ -244,7 +244,7 @@ window.isPlayerFertile = function(PC) { window.canAchieveErection = function(slave) { if (!slave) { return null; - } else if (slave.dick < 7 && slave.dick > 0 && slave.drugs !== 'hormone blockers' && (slave.balls > 0 ? slave.hormoneBalance < 100 : slave.hormoneBalance <= -100) && slave.ballType != 'sterile') { + } else if (slave.dick < 7 && slave.dick > 0 && slave.drugs !== 'hormone blockers' && (slave.balls > 0 ? slave.hormoneBalance < 100 : slave.hormoneBalance <= -100) && slave.ballType !== 'sterile') { return true; } else { return false; @@ -256,9 +256,9 @@ window.canPenetrate = function(slave) { return null; } else if (!canAchieveErection(slave)) { return false; - } else if (slave.dickAccessory == "chastity") { + } else if (slave.dickAccessory === "chastity") { return false; - } else if (slave.dickAccessory == "combined chastity") { + } else if (slave.dickAccessory === "combined chastity") { return false; } else if (slave.dick > 7) { return false; @@ -279,7 +279,7 @@ window.canSee = function(slave) { window.canHear = function(slave) { if (!slave) { return null; - } else if ((slave.hears > -2) && (slave.earwear != "deafening ear plugs")) { + } else if ((slave.hears > -2) && (slave.earwear !== "deafening ear plugs")) { return true; } else { return false; @@ -289,7 +289,7 @@ window.canHear = function(slave) { window.canWalk = function(slave) { if (!slave) { return null; - } else if (slave.amp == 1) { + } else if (slave.amp === 1) { return false; } else if (tooFatSlave(slave)) { return false; @@ -303,13 +303,13 @@ window.canWalk = function(slave) { return false; } else if (tooBigBelly(slave)) { return false; - } else if (slave.heels == 0) { + } else if (slave.heels === 0) { return true; - } else if (slave.shoes == "heels") { + } else if (slave.shoes === "heels") { return true; - } else if (slave.shoes == "extreme heels") { + } else if (slave.shoes === "extreme heels") { return true; - } else if (slave.shoes == "boots") { + } else if (slave.shoes === "boots") { return true; } else { return false; @@ -321,17 +321,17 @@ window.canTalk = function(slave) { return null; } else if (slave.accent > 2) { return false; - } else if (slave.voice == 0) { + } else if (slave.voice === 0) { return false; } else if (slave.lips > 95) { return false; - } else if (slave.collar == "dildo gag") { + } else if (slave.collar === "dildo gag") { return false; - } else if (slave.collar == "massive dildo gag") { + } else if (slave.collar === "massive dildo gag") { return false; - } else if (slave.collar == "ball gag") { + } else if (slave.collar === "ball gag") { return false; - } else if (slave.collar == "bit gag") { + } else if (slave.collar === "bit gag") { return false; } else { return true; @@ -341,13 +341,13 @@ window.canTalk = function(slave) { window.canDoAnal = function(slave) { if (!slave) { return null; - } else if (slave.vaginalAccessory == "anal chastity") { + } else if (slave.vaginalAccessory === "anal chastity") { return false; - } else if (slave.dickAccessory == "anal chastity") { + } else if (slave.dickAccessory === "anal chastity") { return false; - } else if (slave.vaginalAccessory == "combined chastity") { + } else if (slave.vaginalAccessory === "combined chastity") { return false; - } else if (slave.dickAccessory == "combined chastity") { + } else if (slave.dickAccessory === "combined chastity") { return false; } return true; @@ -358,9 +358,9 @@ window.canDoVaginal = function(slave) { return null; } else if (slave.vagina < 0) { return false; - } else if (slave.vaginalAccessory == "chastity belt") { + } else if (slave.vaginalAccessory === "chastity belt") { return false; - } else if (slave.vaginalAccessory == "combined chastity") { + } else if (slave.vaginalAccessory === "combined chastity") { return false; } return true; @@ -457,9 +457,9 @@ window.tooBigButt = function(slave){ window.relationTargetWord = function(slave) { if (!slave) { return null; - } else if (slave.relation == "daughter") { + } else if (slave.relation === "daughter") { return "mother"; - } else if (slave.relation == "mother") { + } else if (slave.relation === "mother") { return "daughter"; } return slave.relation; @@ -471,44 +471,44 @@ window.milkAmount = function(slave) { if (!slave) { return null; } else { - calcs = slave.boobs-slave.boobsImplant-slave.boobsMilk + calcs = slave.boobs - slave.boobsImplant - slave.boobsMilk; if (calcs > 40000) { - milk = (158+((calcs-10000)/600)) + milk = (158 + ((calcs - 10000) / 600)); } else if (calcs > 25000) { - milk = (128+((calcs-10000)/500)) + milk = (128 + ((calcs - 10000) / 500)); } else if (calcs > 10000) { - milk = (78+((calcs-10000)/300)) + milk = (78 + ((calcs - 10000) / 300)); } else if (calcs > 5000) { - milk = (53+((calcs-5000)/200)) + milk = (53 + ((calcs - 5000) / 200)); } else if (calcs > 2000) { - milk = (29+((calcs-2000)/125)) + milk = (29 + ((calcs - 2000) / 125)); } else if (calcs > 800) { - milk = (16+((calcs-800)/80)) + milk = (16 + ((calcs - 800) / 80)); } else { - milk = (8+((calcs-400)/50)) + milk = (8 + ((calcs - 400) / 50)); } - if (slave.lactation == 2) { - milk *= 1.2 + if (slave.lactation === 2) { + milk *= 1.2; } - milk += (milk*((slave.devotion-50)/200)) + milk += (milk * ((slave.devotion - 50) / 200)); if (slave.boobsImplant > 200) { - milk *= 0.9 + milk *= 0.9; } - calcs = (slave.hormoneBalance/50) - if (slave.balls != 0 && calcs > -2) { - calcs -= 1 - } else if (slave.ovaries != 1 && calcs < 2) { - calcs += 1 + calcs = (slave.hormoneBalance / 50); + if (slave.balls !== 0 && calcs > -2) { + calcs -= 1; + } else if (slave.ovaries !== 1 && calcs < 2) { + calcs += 1; } - milk *= (1+(calcs*0.1)) - milk *= (1+(slave.preg/100)) - milk *= (1+(slave.health/50)) - milk *= (1+(slave.weight/500)) - milk *= (1+(slave.lactationAdaptation/500)) - milk += (slave.boobsMilk/100) - milk = Math.trunc(milk) - milk = Math.clamp(milk,1,1000000000000000000) - return milk + milk *= (1 + (calcs * 0.1)); + milk *= (1 + (slave.preg / 100)); + milk *= (1 + (slave.health / 50)); + milk *= (1 + (slave.weight / 500)); + milk *= (1 + (slave.lactationAdaptation / 500)); + milk += (slave.boobsMilk / 100); + milk = Math.trunc(milk); + milk = Math.clamp(milk, 1, 1000000000000000000); + return milk; } }; @@ -520,49 +520,48 @@ window.cumAmount = function(slave) { if (!slave) { return null; } else { - if (slave.drugs == "testicle enhancement") { - cum = ((slave.balls*3.5)+1) - } else if (slave.drugs == "hyper testicle enhancement") { - cum = ((slave.balls*5)+1) + if (slave.drugs === "testicle enhancement") { + cum = ((slave.balls * 3.5) + 1); + } else if (slave.drugs === "hyper testicle enhancement") { + cum = ((slave.balls * 5) + 1); } else { - cum = ((slave.balls*2.5)+1) + cum = ((slave.balls * 2.5) + 1); } - if (slave.ballType == "sterile") { - cum *= 0.8 + if (slave.ballType === "sterile") { + cum *= 0.8; } - if (slave.diet == "cum production") { - cum *= 1.2 + if (slave.diet === "cum production") { + cum *= 1.2; } - calcs = (slave.hormoneBalance/50) - cum *= (1-(calcs*0.1)) - if (slave.scrotum == 0) { - cum *= 0.8 + calcs = (slave.hormoneBalance / 50); + cum *= (1 - (calcs * 0.1)); + if (slave.scrotum === 0) { + cum *= 0.8; } - if (slave.prostate == 0) { - cum *= 0.2 // being generous here - } else if (slave.prostate == 2) { - cum *= 1.2 - } else if (slave.prostate == 3) { - cum *= 1.5 + if (slave.prostate === 0) { + cum *= 0.2; // being generous here + } else if (slave.prostate === 2) { + cum *= 1.2; + } else if (slave.prostate === 3) { + cum *= 1.5; } if (slave.devotion > 50) { - cum += (cum*(slave.devotion/100)) + cum += (cum * (slave.devotion / 100)); } else if (slave.devotion < -50) { - cum += (cum*(slave.devotion/100)) + cum += (cum * (slave.devotion / 100)); } if (slave.health > 50) { - cum += (cum*(slave.health/50)) + cum += (cum * (slave.health / 50)); } else if (slave.health < -50) { - cum += (cum*(slave.health/50)) + cum += (cum * (slave.health / 50)); } - cum = Math.trunc(cum) - cum = Math.clamp(cum,1,1000000000000000000) - return cum + cum = Math.trunc(cum); + cum = Math.clamp(cum, 1, 1000000000000000000); + return cum; } }; -window.lispReplace = function(text) -{ +window.lispReplace = function (text) { text = text.replace(/Sh/g, "Th"); text = text.replace(/SS/g, "Th"); text = text.replace(/Ss/g, "Th"); @@ -643,7 +642,7 @@ window.lispReplace = function(text) text = text.replace(/cE/g, "thE"); text = text.replace(/cY/g, "thY"); return text; -} +}; window.isVegetable = function(slave) { slave = slave || State.variables.activeSlave; @@ -664,7 +663,7 @@ window.repGainSacrifice = function(slave, arcology) { window.bodyguardSuccessorEligible = function(slave) { if(!slave) { return false; } - return (slave.devotion > 50 && slave.muscles >= 0 && slave.weight < 100 && slave.boobs < 8000 && slave.butt < 10 && slave.belly < 5000 && slave.balls < 10 && slave.dick < 10 && slave.preg < 20 && slave.fuckdoll == 0 && slave.fetish != "mindbroken" && canWalk(slave)); + return (slave.devotion > 50 && slave.muscles >= 0 && slave.weight < 100 && slave.boobs < 8000 && slave.butt < 10 && slave.belly < 5000 && slave.balls < 10 && slave.dick < 10 && slave.preg < 20 && slave.fuckdoll === 0 && slave.fetish !== "mindbroken" && canWalk(slave)); }; window.ngUpdateGenePool = function(genePool) { @@ -733,13 +732,13 @@ window.nippleColor = function(slave) { window.overpowerCheck = function(slave, PC) { var strength; - if(State.variables.arcologies[0].FSPhysicalIdealist != "unset") { - if(PC.title == 1) { + if(State.variables.arcologies[0].FSPhysicalIdealist !== "unset") { + if(PC.title === 1) { strength = 130; } else { strength = 100; } - } else if(PC.title == 1) { + } else if(PC.title === 1) { strength = 50; } else { strength = 30; diff --git a/src/js/summaryWidgets.js b/src/js/summaryWidgets.js index b55dd53271467e82bce356b34525d3a96e157aac..66563b9ae6a42101fd3b9a3a1cdff5373dc7ddf0 100644 --- a/src/js/summaryWidgets.js +++ b/src/js/summaryWidgets.js @@ -48,11 +48,10 @@ window.SlaveStatClamp = function SlaveStatClamp(slave) { } if (slave.foreskin === undefined) slave.foreskin = 0; - if (slave.amp != 0 && slave.heels == 1) + if (slave.amp !== 0 && slave.heels === 1) slave.heels = 0; - if (slave.vagina < 0 && slave.mpreg == 0 && slave.preg == -1) { + if (slave.vagina < 0 && slave.mpreg === 0 && slave.preg === -1) { slave.preg = 0; WombFlush(slave); } - }; diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 0b4178234b1e75d381ac2d858f0e58e63644942e..b39be0d3b56144bd16d4c7d8f142d54c0fdc8ab6 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -458,7 +458,7 @@ As a categorizer window.Categorizer = function() { this.cats = Array.prototype.slice.call(arguments) .filter(function(e, i, a) { - return e instanceof Array && e.length == 2 && typeof e[0] === 'number' && !isNaN(e[0]) && + return e instanceof Array && e.length === 2 && typeof e[0] === 'number' && !isNaN(e[0]) && a.findIndex(function(val) { return e[0] === val[0]; }) === i; /* uniqueness test */ }) .sort(function(a, b) { return b[0] - a[0]; /* reverse sort */ }); }; @@ -480,7 +480,7 @@ window.Categorizer.prototype.cat = function(val, def) { window.commaNum = function(s) { if(!s) { return 0; } - if(State.variables.formatNumbers != 1) { return s; } + if(State.variables.formatNumbers !== 1) { return s; } return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }; @@ -492,8 +492,8 @@ window.cashFormat = function(s) { window.massFormat = function(s) { if(!s) { s = 0; } if(s >= 1000) { - s = commaNum(Math.trunc(s/1000)) - if(s != 1) { + s = commaNum(Math.trunc(s / 1000)); + if(s !== 1) { return s+" tons"; } else { return s+" ton"; @@ -517,83 +517,84 @@ window.numberWithCommas = function(x) { window.numberToWords = function(x) { if (x === 0) { - return "zero" - } else { - var ONE_TO_NINETEEN = [ - "one", "two", "three", "four", "five", - "six", "seven", "eight", "nine", "ten", - "eleven", "twelve", "thirteen", "fourteen", "fifteen", - "sixteen", "seventeen", "eighteen", "nineteen" - ]; - - var TENS = [ - "ten", "twenty", "thirty", "forty", "fifty", - "sixty", "seventy", "eighty", "ninety" - ]; - - var SCALES = ["thousand", "million", "billion", "trillion"]; - - // helper function for use with Array.filter - function isTruthy(item) { - return !!item; - } + return "zero"; + } - // convert a number into "chunks" of 0-999 - function chunk(number) { - var thousands = []; + var ONE_TO_NINETEEN = [ + "one", "two", "three", "four", "five", + "six", "seven", "eight", "nine", "ten", + "eleven", "twelve", "thirteen", "fourteen", "fifteen", + "sixteen", "seventeen", "eighteen", "nineteen" + ]; - while (number > 0) { - thousands.push(number % 1000); - number = Math.floor(number / 1000); - } + var TENS = [ + "ten", "twenty", "thirty", "forty", "fifty", + "sixty", "seventy", "eighty", "ninety" + ]; - return thousands; - } + var SCALES = ["thousand", "million", "billion", "trillion"]; - // translate a number from 1-999 into English - function inEnglish(number) { - var thousands, hundreds, tens, ones, words = []; + // helper function for use with Array.filter + function isTruthy(item) { + return !!item; + } - if (number < 20) { - return ONE_TO_NINETEEN[number - 1]; // may be undefined - } + // convert a number into "chunks" of 0-999 + function chunk(number) { + var thousands = []; + + while (number > 0) { + thousands.push(number % 1000); + number = Math.floor(number / 1000); + } - if (number < 100) { - ones = number % 10; - tens = number / 10 | 0; // equivalent to Math.floor(number / 10) + return thousands; + } - words.push(TENS[tens - 1]); - words.push(inEnglish(ones)); + // translate a number from 1-999 into English + function inEnglish(number) { + var thousands, hundreds, tens, ones, words = []; - return words.filter(isTruthy).join("-"); - } + if (number < 20) { + return ONE_TO_NINETEEN[number - 1]; // may be undefined + } - hundreds = number / 100 | 0; - words.push(inEnglish(hundreds)); - words.push("hundred"); - words.push(inEnglish(number % 100)); + if (number < 100) { + ones = number % 10; + tens = number / 10 | 0; // equivalent to Math.floor(number / 10) - return words.filter(isTruthy).join(" "); + words.push(TENS[tens - 1]); + words.push(inEnglish(ones)); + + return words.filter(isTruthy).join("-"); } - // append the word for a scale. Made for use with Array.map - function appendScale(chunk, exp) { - var scale; - if (!chunk) { - return null; - } - scale = SCALES[exp - 1]; - return [chunk, scale].filter(isTruthy).join(" "); + hundreds = number / 100 | 0; + words.push(inEnglish(hundreds)); + words.push("hundred"); + words.push(inEnglish(number % 100)); + + return words.filter(isTruthy).join(" "); + } + + // append the word for a scale. Made for use with Array.map + function appendScale(chunk, exp) { + var scale; + if (!chunk) { + return null; } + scale = SCALES[exp - 1]; + return [chunk, scale].filter(isTruthy).join(" "); + } - var string = chunk(x) - .map(inEnglish) - .map(appendScale) - .filter(isTruthy) - .reverse() - .join(" "); + var string = chunk(x) + .map(inEnglish) + .map(appendScale) + .filter(isTruthy) + .reverse() + .join(" "); - } if (x > 0) { + if (x > 0) { return string; } else { return "negative " + string; @@ -690,7 +691,7 @@ window.generateNewID = function generateNewID() { let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { let r = (date + Math.random()*16)%16 | 0; date = Math.floor(date/16); - return (c=='x' ? r : (r & 0x3 | 0x8)).toString(16); + return (c==='x' ? r : (r & 0x3 | 0x8)).toString(16); }); return uuid; }; @@ -727,7 +728,7 @@ window.capFirstChar = function capFirstChar(string) { window.getSlaveDevotionClass = function (slave) { if ((!slave) || (!State)) return undefined; - if ('mindbroken' == slave.fetish) + if ('mindbroken' === slave.fetish) return 'mindbroken'; if (slave.devotion < -95) return 'very-hateful'; @@ -749,7 +750,7 @@ window.getSlaveTrustClass = function (slave) { if ((!slave) || (!State)) return undefined; - if ('mindbroken' == slave.fetish) + if ('mindbroken' === slave.fetish) return ''; if (slave.trust < -95) @@ -1130,13 +1131,13 @@ window.FSChangePorn = function FSChangePorn(FS, magnitude) { window.ordinalSuffix = function ordinalSuffix(i) { var j = i % 10, k = i % 100; - if (j == 1 && k != 11) { + if (j === 1 && k !== 11) { return i + "st"; } - if (j == 2 && k != 12) { + if (j === 2 && k !== 12) { return i + "nd"; } - if (j == 3 && k != 13) { + if (j === 3 && k !== 13) { return i + "rd"; } return i + "th"; @@ -1152,7 +1153,7 @@ window.induceLactation = function induceLactation(slave) { let r = ``; if (slave.induceLactation >= 10) { if (jsRandom(1,100) < slave.induceLactation) { - r += `${His} breasts have been stimulated often enough to @@.lime;induce lactation.@@` + r += `${His} breasts have been stimulated often enough to @@.lime;induce lactation.@@`; slave.induceLactation = 0; slave.lactationDuration = 2; slave.lactation = 1; diff --git a/src/js/vignettes.js b/src/js/vignettes.js index e4c7fa6bb3d303befab58418579447454e432373..7402b866e21df6c83c7649f8a68e2d45f51e98ae 100644 --- a/src/js/vignettes.js +++ b/src/js/vignettes.js @@ -10,7 +10,7 @@ window.GetVignette = function GetVignette(slave) { const himself = pronouns.objectReflexive; const boy = pronouns.noun; const He = capFirstChar(he); - const His = capFirstChar(his); + // const His = capFirstChar(his); if (slave.assignment === "whore" || slave.assignment === window.Job.BROTHEL || slave.assignment === window.Job.MADAM) { let seed = jsRandom(1, 10); @@ -876,7 +876,7 @@ window.GetVignette = function GetVignette(slave) { effect: -2, }); } - if ((slave.hormoneBalance >= 100 || slave.ballType == "sterile") && !canAchieveErection(slave)) { + if ((slave.hormoneBalance >= 100 || slave.ballType === "sterile") && !canAchieveErection(slave)) { if (slave.dick > 0) { vignettes.push({ text: `${he} disappointed a customer who was sure they could get ${slave.slaveName}'s cock erect,`, @@ -922,7 +922,7 @@ window.GetVignette = function GetVignette(slave) { effect: -1, }); } - if (slave.balls == 0 && slave.dick > 0) { + if (slave.balls === 0 && slave.dick > 0) { vignettes.push({ text: `a slave trainer privately studied ${him} as an example of a slave with well done gelding surgery,`, type: "cash", @@ -973,7 +973,7 @@ window.GetVignette = function GetVignette(slave) { } } if (slave.visualAge > 40) { - if (slave.face > 10 && slave.race == "asian") { + if (slave.face > 10 && slave.race === "asian") { vignettes.push({ text: `${he} got repeat business from a customer who loves well-preserved asian ladies,`, type: "cash", @@ -1345,7 +1345,7 @@ window.GetVignette = function GetVignette(slave) { }); } } - if (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSRepopulationFocusSMR == 1) { + if (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSRepopulationFocusSMR === 1) { if (slave.pregType > 1 && slave.pregKnown > 1 && slave.belly >= 10000) { vignettes.push({ text: `${he} got repeat business from a customer who loves fucking ${boy}s with wombs filled by more than a single child,`, @@ -1539,7 +1539,7 @@ window.GetVignette = function GetVignette(slave) { } } if (V.arcologies[0].FSChineseRevivalist !== "unset") { - if (slave.dick > 0 && slave.balls == 2) { + if (slave.dick > 0 && slave.balls === 2) { vignettes.push({ text: `a citizen admired ${his} lack of balls and praised ${him} for being like the eunuchs in Chinese history,`, type: "cash", @@ -1563,7 +1563,7 @@ window.GetVignette = function GetVignette(slave) { type: "rep", effect: 0, }); - if (V.seeDicks != 100) { + if (V.seeDicks !== 100) { vignettes.push({ text: "a woman dragged her angry husband along so he could watch her get eaten out by a whore,", type: "rep", @@ -2460,7 +2460,7 @@ window.GetVignette = function GetVignette(slave) { effect: -2, }); } - if ((slave.hormoneBalance >= 100 || slave.ballType == "sterile") && !canAchieveErection(slave)) { + if ((slave.hormoneBalance >= 100 || slave.ballType === "sterile") && !canAchieveErection(slave)) { if (slave.dick > 0) { vignettes.push({ text: `${he} disappointed a citizen who was sure they could get ${slave.slaveName}'s cock erect,`, @@ -2499,7 +2499,7 @@ window.GetVignette = function GetVignette(slave) { }); } } - if (slave.balls == 0 && slave.dick > 0) { + if (slave.balls === 0 && slave.dick > 0) { vignettes.push({ text: `a slave trainer pointed ${him} out as an example of a slave with well done gelding surgery,`, type: "rep", @@ -2570,7 +2570,7 @@ window.GetVignette = function GetVignette(slave) { }); } if (slave.visualAge > 40) { - if (slave.face > 10 && slave.race == "asian") { + if (slave.face > 10 && slave.race === "asian") { vignettes.push({ text: `${he} got extra gratitude from a citizen who loves well-preserved asian ladies,`, type: "rep", @@ -2922,7 +2922,7 @@ window.GetVignette = function GetVignette(slave) { }); } } - if (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSRepopulationFocusSMR == 1) { + if (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSRepopulationFocusSMR === 1) { if (slave.pregType > 1 && slave.pregKnown > 1 && slave.belly >= 10000) { vignettes.push({ text: `${he} gratified a citizen who enjoys the feeling of a womb filled with more than a single child,`, @@ -3116,7 +3116,7 @@ window.GetVignette = function GetVignette(slave) { } } if (V.arcologies[0].FSChineseRevivalist !== "unset") { - if (slave.dick > 0 && slave.balls == 2) { + if (slave.dick > 0 && slave.balls === 2) { vignettes.push({ text: `a citizen admired ${his} lack of balls and praised ${him} for being like the eunuchs in Chinese history,`, type: "rep", @@ -3140,7 +3140,7 @@ window.GetVignette = function GetVignette(slave) { type: "rep", effect: 0, }); - if (V.seeDicks != 100) { + if (V.seeDicks !== 100) { vignettes.push({ text: "a woman dragged her angry husband along so he could watch his wife get eaten out by a public slut,", type: "rep", @@ -3337,7 +3337,7 @@ window.GetVignette = function GetVignette(slave) { }); } else if (slave.assignment === "work as a farmhand" || slave.assignment === window.Job.FARMYARD || slave.assignment === window.Job.FARMER) { //TODO: add more vignettes - if ((V.farmyardShows == 1) && (V.seeBestiality == 1)) { + if ((V.farmyardShows === 1) && (V.seeBestiality === 1)) { vignettes.push({ text: `a citizen didn't realize how disgusting he found bestiality until he attended one of ${V.farmyardName}'s shows,`, type: "rep", diff --git a/src/js/walkPastJS.js b/src/js/walkPastJS.js index 6636d9892ba2aa39ffb92508521eac6a3284c17f..5066089d4d7e842b53c5ab04d3327afee1dbd196 100644 --- a/src/js/walkPastJS.js +++ b/src/js/walkPastJS.js @@ -11,7 +11,7 @@ window.primeSlave = function(activeSlave, seed) { let t = ""; let race = (V.seeRace ? activeSlave.race : ""); - if (V.partner !== "relationship" || activeSlave.relationship == 1 || activeSlave.relationship == 2 || activeSlave.releaseRules == "restrictive") { + if (V.partner !== "relationship" || activeSlave.relationship === 1 || activeSlave.relationship === 2 || activeSlave.releaseRules === "restrictive") { t += `${activeSlave.slaveName} `; t += walkPasts(activeSlave, seed); /* WALKPASTS END */ @@ -27,11 +27,11 @@ window.rivalSlave = function(activeSlave, seed) { const he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun; const He = capFirstChar(he), His = capFirstChar(his); let _partnerSlave = getSlave(activeSlave.rivalryTarget); - let _target = ""; let t = ""; + let _target = ""; - if (_partnerSlave != undefined) { /* potential problem point */ - let race2 = (V.seeRace ? _partnerSlave.race : ""); + if (_partnerSlave !== undefined) { /* potential problem point */ + // let race2 = (V.seeRace ? _partnerSlave.race : ""); t += " Meanwhile, "; if (activeSlave.rivalry >= 3) { @@ -43,7 +43,6 @@ window.rivalSlave = function(activeSlave, seed) { } t += walkPasts(_partnerSlave, 100-seed); - _target = "FRival"; _partnerSlave = null; V.target = "FRival"; /*potentially removed later*/ } @@ -72,14 +71,14 @@ window.walkPasts = function(slave, _seed) { case "work in the dairy": if (V.dairyRestraintsSetting > 1) { t += `is strapped to a milking machine in ${V.dairyName}, `; - if (slave.ovaries == 1 && V.dairyPregSetting > 0 && jsRandom(1,2) == 2) { + if (slave.ovaries === 1 && V.dairyPregSetting > 0 && jsRandom(1,2) === 2) { if (isFertile(slave)) { t += `and is wincing in pain as the machine forces another load of cum into ${his} womb. As you watch, ${his} ${race} stomach steadily swells with baby batter.`; } else { t += `giving you a good view of ${his} ${race} body and heavy belly on the feeds.`; } } else if (slave.lactation > 0) { - if (slave.balls > 0 && jsRandom(1,2) == 1) { + if (slave.balls > 0 && jsRandom(1,2) === 1) { if (slave.dick > 0) { if (_seed > 50) { t += `and is having ${his} cock sucked dry. As you watch, `; @@ -164,7 +163,7 @@ window.walkPasts = function(slave, _seed) { } else { t += `is working in ${V.dairyName}, `; if (slave.lactation > 0) { - if (slave.balls > 0 && jsRandom(1,2) == 1) { + if (slave.balls > 0 && jsRandom(1,2) === 1) { if (slave.dick > 0) { if (_seed > 50) { t += `and is having ${his} cock milked. As you watch, `; @@ -250,14 +249,14 @@ window.walkPasts = function(slave, _seed) { break; case "work in the brothel": t += `is working in ${V.brothelName}, and is `; - if (Beauty(slave) > 100 && jsRandom(1,2) == 1) { + if (Beauty(slave) > 100 && jsRandom(1,2) === 1) { if (_seed > 80) { if (canDoAnal(slave) || canDoVaginal(slave)) { t += `riding one customer's dick while ${he} gives another a blowjob.`; } else { t += "deep throating a pair of customer's dicks."; } - } else if (_seed > 60 && slave.amp != 1) { + } else if (_seed > 60 && slave.amp !== 1) { t += "sucking one customer's cock while giving another a handjob."; } else if (_seed > 40) { t += "eating out one customer's cunt while another "; @@ -323,13 +322,13 @@ window.walkPasts = function(slave, _seed) { case "serve in the master suite": if (slave.fuckdoll > 0) { t += `waiting for use in ${V.masterSuiteName}, next to a display case full of other sex toys.`; - } else if (V.masterSuiteUpgradeLuxury == 1) { + } else if (V.masterSuiteUpgradeLuxury === 1) { if (_seed > 50) { t += `is sitting on the big bed in ${V.masterSuiteName}, awaiting your return.`; } else { t += `is beautifying ${himself} in ${V.masterSuiteName} so ${he}'ll be pretty when you return.`; } - } else if (V.masterSuiteUpgradeLuxury == 2) { + } else if (V.masterSuiteUpgradeLuxury === 2) { t += `is in ${V.masterSuiteName}'s fuckpit, `; if (_seed > 80) { t += `with a pair of ${his} fellow fucktoys industriously sucking on ${his} nipples.`; @@ -343,7 +342,7 @@ window.walkPasts = function(slave, _seed) { } else if (_seed > 40) { if (canPenetrate(slave)) { t += `with ${his} dick inside `; - } else if (slave.dick > 0 && slave.dickAccessory != "chastity" && slave.dick != "combined chastity") { + } else if (slave.dick > 0 && slave.dickAccessory !== "chastity" && slave.dick !== "combined chastity") { t += `getting ${his} soft dick sucked by `; } else if (canDoVaginal(slave) || canDoAnal(slave)) { t += "getting eaten out by "; @@ -370,7 +369,7 @@ window.walkPasts = function(slave, _seed) { t += `is having enthusiastic sex with your other pets while waiting for you to ravish ${him}.`; } else { t += "is having idle sex with several of your other toys while they await your pleasure."; - if (slave.fetishKnown == 1) { + if (slave.fetishKnown === 1) { switch (slave.fetish) { case "buttslut": if (canDoAnal(slave) && slave.anus > 0) { @@ -389,7 +388,7 @@ window.walkPasts = function(slave, _seed) { t += `${He}'s letting another slave have her way with ${him}.`; break; case "sadist": - if (slave.amp != 1) { + if (slave.amp !== 1) { t += `${He}'s spanking another slave with one hand and fingering her with the other.`; } else { t += `${He}'s painfully teasing another slave's nipple with ${his} teeth.`; @@ -400,7 +399,7 @@ window.walkPasts = function(slave, _seed) { break; case "boobs": t += `${He} has a slave sucking on each of ${his} nipples`; - if (slave.amp != 1) { + if (slave.amp !== 1) { t += ` while ${he} gives each a handjob.`; } else { t += "."; @@ -435,7 +434,7 @@ window.walkPasts = function(slave, _seed) { case "be confined in the arcade": case "work a glory hole": t += "is confined in "; - if (slave.assignment == "be confined in the arcade") { + if (slave.assignment === "be confined in the arcade") { t += `${V.arcadeName}; `; } else { t += "a glory hole; "; @@ -456,7 +455,7 @@ window.walkPasts = function(slave, _seed) { t += `is managing ${V.brothelName}: ${he} is making sure all the customers are satisfied and all the whores are working hard.`; break; case "be your Concubine": - if (jsRandom(1,2) == 1) { + if (jsRandom(1,2) === 1) { t += `is looking after ${himself}; ${he} spends many hours every day on ${his} beauty regimen.`; } else { t += "is checking over the appearance of your harem, making sure everyone looks perfect."; @@ -471,7 +470,7 @@ window.walkPasts = function(slave, _seed) { } break; case "live with your Head Girl": - if (V.HeadGirl != 0) { + if (V.HeadGirl !== 0) { t += `is getting the Head Girl's suite cleaned up while ${V.HeadGirl.slaveName} is out working.`; } else { t += "is making sure the Head Girl's suite is in order for your next Head Girl."; @@ -502,17 +501,17 @@ window.walkPasts = function(slave, _seed) { t += `is working in ${V.dairyName}, looking after your stock.`; break; default: /* WALKPASTS START HERE */ - if (slave.heels == 1 && !["flats", "none"].includes(slave.shoes)) { + if (slave.heels === 1 && !["flats", "none"].includes(slave.shoes)) { t += `walks past your desk with the tiny swaying steps ${he} must take in order to walk on ${his} surgically altered legs. ${He} is on ${his} way to `; } else if (["heels", "pumps"].includes(slave.shoes)) { t += `walks past your desk with the swaying steps ${he} must take in ${his} high heels. ${He} is on ${his} way to `; - } else if (slave.shoes == "boots") { + } else if (slave.shoes === "boots") { t += `walks past your desk with the confident gait encouraged by ${his} high heeled boots. ${He} is on ${his} way to `; - } else if (slave.shoes == "extreme heels") { + } else if (slave.shoes === "extreme heels") { t += `walks past your desk with the tiny swaying steps ${he} must take in ${his} ridiculous heels. ${He} is on ${his} way to `; - } else if (slave.heels == 1) { + } else if (slave.heels === 1) { t += `crawls past your desk on all fours, since ${he} has not been allowed the heels ${he} needs to walk upright. ${He} is on ${his} way to `; - } else if (slave.amp == 1) { + } else if (slave.amp === 1) { t += `is carried past your desk by one of your other slaves. ${He} is on ${his} way to `; } else if (!canWalk(slave)) { t += `is helped past your desk by one of your other slaves. ${He} is on ${his} way to `; @@ -520,9 +519,9 @@ window.walkPasts = function(slave, _seed) { t += `walks past your desk on ${his} way to `; } if (slave.inflation > 0 && jsRandom(1,100) > 70) { - if (slave.inflationMethod == 1) { + if (slave.inflationMethod === 1) { t += `gorge ${himself} with ${slave.inflationType}; `; - } else if (slave.inflationMethod == 2) { + } else if (slave.inflationMethod === 2) { t += `fill ${his} rear with `; switch (slave.inflationType) { case "water": @@ -535,8 +534,8 @@ window.walkPasts = function(slave, _seed) { t += `${slave.inflationType}s; `; break; } - } else if (slave.inflationMethod == 3) { - if (slave.inflationType == "milk") { + } else if (slave.inflationMethod === 3) { + if (slave.inflationType === "milk") { t += `suckle from ${his} assigned nipple until ${he} is sufficiently filled with milk; `; } else { t += `suck ${his} assigned dick until ${he} is sufficiently filled with cum; `; @@ -594,7 +593,7 @@ window.walkPasts = function(slave, _seed) { break; case "learn in the schoolroom": t += "attend classes "; - if (V.Schoolteacher == 0) { + if (V.Schoolteacher === 0) { t += `in ${V.schoolroomName}; `; } else { t += `under ${V.Schoolteacher.slaveName}, perhaps literally; `; @@ -620,7 +619,7 @@ window.walkPasts = function(slave, _seed) { break; } } /* end inflation blurb */ - if (slave.fetish == "mindbroken") { + if (slave.fetish === "mindbroken") { t += `${he} does not even glance at you as ${he} goes mindlessly to ${his} next task.`; } else if (slave.devotion < -50) { t += `${he} directs a look of pure hatred at where you sit as ${he} passes.`; diff --git a/src/js/wombJS.js b/src/js/wombJS.js index 4525654c12cfbb1dc6f552cbe20d0546706b1de5..a4f88a287b44901131a43e2faacc341811bb2f9b 100644 --- a/src/js/wombJS.js +++ b/src/js/wombJS.js @@ -34,16 +34,16 @@ window.WombInit = function(actor) { //console.log("broodmother:" + typeof actor.broodmother); - if ( typeof actor.broodmother != "number" ) { + if ( typeof actor.broodmother !== "number" ) { actor.broodmother = 0; actor.broodmotherFetuses = 0; } - if ( typeof actor.readyOva != "number" ) { + if ( typeof actor.readyOva !== "number" ) { actor.readyOva = 0; } - if ( actor.pregData == undefined) + if ( actor.pregData === undefined) { actor.pregData = clone( setup.pregData.human ); //Setup should be through deep copy, so in future, if we like, these values can be changed individually. Gameplay expansion possibilities. But for dev time to simplify debugging: @@ -51,15 +51,15 @@ window.WombInit = function(actor) { } //backward compatibility setup. Fully accurate for normal pregnancy only. - if (actor.womb.length > 0 && actor.womb[0].genetics == undefined && actor.eggType == "human") { + if (actor.womb.length > 0 && actor.womb[0].genetics === undefined && actor.eggType === "human") { i=0; actor.womb.forEach(function(ft){ ft.genetics = generateGenetics(actor, actor.pregSource, i); i++; }); - } else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother == 0) { + } else if (actor.womb.length === 0 && actor.pregType > 0 && actor.broodmother === 0) { WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg); - } else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) { + } else if (actor.womb.length === 0 && actor.pregType > 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) { //sorry but for already present broodmothers it's impossible to calculate fully, approximation used. var pw = actor.preg, bCount, bLeft; if (pw > actor.pregData.normalBirth) pw = actor.pregData.normalBirth; //to avoid disaster. @@ -92,19 +92,19 @@ window.WombImpregnate = function(actor, fCount, fatherID, age, surrogate) { tf.splitted = 0; //marker for already splitted fetus. if (surrogate) { tf.motherID = surrogate.ID; //Initial biological mother ID setup. - if(actor.eggType == "human"){ + if(actor.eggType === "human"){ tf.genetics = generateGenetics(surrogate, fatherID, i+1); //Stored genetic information. } } else { tf.motherID = actor.ID; //Initial biological mother ID setup. - if(actor.eggType == "human"){ + if(actor.eggType === "human"){ tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information. } } tf.ID = generateNewID(); try { - if (actor.womb.length == 0) { + if (actor.womb.length === 0) { actor.pregWeek = age; actor.preg = age; } @@ -153,7 +153,7 @@ window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age tf.genetics.gender = mother.genes; tf.genetics.mother = mother.mother; tf.genetics.father = mother.father; - if (mother.ID == -1) { + if (mother.ID === -1) { tf.genetics.motherName = mother.name; tf.genetics.fatherName = mother.name; tf.genetics.clone = PlayerName(mother); @@ -171,7 +171,7 @@ window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age tf.genetics.skin = motherOriginal.skin; try { - if (actor.womb.length == 0) { + if (actor.womb.length === 0) { actor.pregWeek = age; actor.preg = age; actor.pregSource = -7; @@ -235,11 +235,11 @@ window.WombBirthReady = function(actor, readyAge) { window.WombGetVolume = function(actor) { //most legacy code from pregJS.tw with minor adaptation. - if (actor.pregData.sizeType == 0) + if (actor.pregData.sizeType === 0) return getVolByLen(actor); - else if (actor.pregData.sizeType == 1) + else if (actor.pregData.sizeType === 1) return getVolByWeight(actor); - else if (actor.pregData.sizeType == 2) + else if (actor.pregData.sizeType === 2) return getVolByRaw(actor); else return 0; @@ -409,7 +409,7 @@ window.WombNormalizePreg = function(actor) WombInit(actor); // this is broodmother on hold. - if (actor.womb.length == 0 && actor.broodmother >= 1) { + if (actor.womb.length === 0 && actor.broodmother >= 1) { actor.pregType = 0; actor.pregKnown = 0; @@ -446,7 +446,7 @@ window.WombNormalizePreg = function(actor) actor.pregType = actor.womb.length; actor.pregSource = actor.womb[0].fatherID; - } else if (actor.womb.length == 0 && actor.broodmother < 1) { + } else if (actor.womb.length === 0 && actor.broodmother < 1) { //not broodmother // console.log("preg fixing"); actor.pregType = 0; @@ -516,7 +516,7 @@ window.fetalSplit = function(actor, chance) { nft.identical = 1; //this is marker that this fetus has at least one twin. s.identical = 1; //this is marker that this fetus has at least one twin. - if (s.twinID == "" || s.twinID == undefined) + if (s.twinID === "" || s.twinID === undefined) s.twinID = generateNewID(); nft.twinID = s.twinID; @@ -602,7 +602,7 @@ window.WombCleanYYFetuses = function(actor) { ft = actor.womb[i]; - if (ft.genetics.gender == "YY") + if (ft.genetics.gender === "YY") { reserved.push(ft); actor.womb.splice(i, 1); @@ -620,18 +620,18 @@ window.FetusGlobalReserveCount = function(reserveType) var cnt = 0; var SV = State.variables; - if (typeof reserveType != 'string' ) + if (typeof reserveType !== 'string' ) return 0; SV.slaves.forEach(function(slave){ slave.womb.forEach(function(ft){ - if (ft.reserve == reserveType) + if (ft.reserve === reserveType) cnt++; }); }); SV.PC.womb.forEach(function(ft){ - if (ft.reserve == reserveType) + if (ft.reserve === reserveType) cnt++; }); @@ -643,7 +643,7 @@ window.WombSetGenericReserve = function(actor, type, count) //console.log ("actor: " + actor + " type: " + type + " typeof: " + typeof type + " count: " + count); actor.womb.forEach(function(ft){ //console.log (" type: " + ft.reserve + " typeof: " + typeof ft.reserve); - if ((ft.reserve == "" || ft.reserve == type) && count > 0) + if ((ft.reserve === "" || ft.reserve === type) && count > 0) { //console.log ("!trigger"); ft.reserve = type; @@ -655,18 +655,16 @@ window.WombSetGenericReserve = function(actor, type, count) window.WombAddToGenericReserve = function(actor, type, count) { - WombSetGenericReserve(actor, type, (WombReserveCount(actor, type)+count)); }; window.WombChangeReserveType = function(actor, oldType, newType) { - var count = 0; actor.womb.forEach(function(ft){ - if (ft.reserve == oldType) + if (ft.reserve === oldType) { ft.reserve = newType; count++; @@ -678,10 +676,9 @@ window.WombChangeReserveType = function(actor, oldType, newType) window.WombCleanGenericReserve = function(actor, type, count) { - actor.womb.forEach(function(ft){ - if (ft.reserve == type && count > 0) + if (ft.reserve === type && count > 0) { ft.reserve = ""; count--; @@ -697,7 +694,7 @@ window.WombReserveCount = function(actor, type) actor.womb.forEach(function(ft){ - if (ft.reserve == type) /* the lazy equality will catch "" case */ + if (ft.reserve === type) /* the lazy equality will catch "" case */ { cnt++; } @@ -713,7 +710,7 @@ window.WombGetReservedFetuses = function(actor, type) actor.womb.forEach(function(ft){ - if (ft.reserve == type) + if (ft.reserve === type) { reserved.push(ft); } @@ -734,7 +731,7 @@ window.WombRemoveReservedFetuses = function(actor, type) { ft = actor.womb[i]; - if (ft.reserve == type) + if (ft.reserve === type) { reserved.push(ft); actor.womb.splice(i, 1); @@ -763,17 +760,17 @@ window.BCReserveInit = function() { slave.womb.forEach(function(ft) { - if (typeof ft.reserve != 'string') + if (typeof ft.reserve !== 'string') ft.reserve = ""; - if (typeof ft.motherID != 'number') //setting missing biological mother ID for fetus. + if (typeof ft.motherID !== 'number') //setting missing biological mother ID for fetus. ft.motherID = slave.ID; - if (ft.ID == undefined) + if (ft.ID === undefined) ft.ID = generateNewID(); }); }); SV.PC.womb.forEach(function(ft){ - if (typeof ft.reserve != 'string') + if (typeof ft.reserve !== 'string') ft.reserve = ""; if (typeof ft.motherID !== 'number') ft.motherID = SV.PC.ID;