diff --git a/.eslintrc.json b/.eslintrc.json index fd889e0a70f535af9add62fd261fd87dd7158446..3fe9eace77d6a5a42ed8d69d173d9f5243854c21 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -87,14 +87,27 @@ "block-scoped-var": "error", "dot-notation": "warn", "eol-last": "warn", - "unicode-bom": ["error", "never"], - "brace-style": ["warn", "1tbs", + "unicode-bom": [ + "error", + "never" + ], + "brace-style": [ + "warn", + "1tbs", { "allowSingleLine": true } ], "no-sequences": "warn", "no-unreachable-loop": "warn", + "generator-star-spacing": [ + "warn", + { + "before": false, + "after": true, + "anonymous": "neither" + } + ], "jsdoc/check-alignment": 1, "jsdoc/check-examples": 0, // interferes with SugarCube examples "jsdoc/check-indentation": 0, diff --git a/js/003-data/constants.js b/js/003-data/constants.js index 758933ca182820c50a839a8e98c4d7b3cf676f1b..96a0787e125cb69614140bc1bb931afc99846b62 100644 --- a/js/003-data/constants.js +++ b/js/003-data/constants.js @@ -7,7 +7,9 @@ globalThis.LivingRule = Object.freeze({LUXURIOUS: 'luxurious', NORMAL: 'normal', * @type {FC.Rules.RestFreezed} * @enum {string} */ -globalThis.RestRule = Object.freeze({MANDATORY: 'mandatory', MAX: 'permissive', MID: 'restrictive', MIN: 'cruel', NONE: 'none'}); +globalThis.RestRule = Object.freeze({ + MANDATORY: 'mandatory', MAX: 'permissive', MID: 'restrictive', MIN: 'cruel', NONE: 'none' +}); /** * @type {FC.AssignmentFreeze} * @enum {string} diff --git a/js/003-data/futureSocietyData.js b/js/003-data/futureSocietyData.js index c0983c1961684f68d8061c75650a1d3190d694c2..33c41d900ad69cd0b82c4599bf49ca6e3a26fa98 100644 --- a/js/003-data/futureSocietyData.js +++ b/js/003-data/futureSocietyData.js @@ -1,7 +1,7 @@ App.Data.FutureSociety = { - /** Each future society contains a record here, along with a noun and adjective form for use in printed text, and the decoration string (normally also an adjective form). - * Most of the automatic mechanics for FS adoption, influence, facility decoration, etc, are handled directly from this data; flavor text is not. - * @type {Record<FC.FutureSociety, {noun: FC.FutureSocietyNoun, adj: FC.FutureSocietyAdj, deco: FC.FutureSocietyDeco, NPCOnly?: boolean}>} */ + /** Each future society contains a record here, along with a noun and adjective form for use in printed text, and the decoration string (normally also an adjective form). + * Most of the automatic mechanics for FS adoption, influence, facility decoration, etc, are handled directly from this data; flavor text is not. + * @type {Record<FC.FutureSociety, {noun: FC.FutureSocietyNoun, adj: FC.FutureSocietyAdj, deco: FC.FutureSocietyDeco, NPCOnly?: boolean}>} */ records: ({ FSSupremacist: {noun: "Racial Supremacism", adj: "Supremacist", deco: "Supremacist"}, FSSubjugationist: {noun: "Racial Subjugationism", adj: "Subjugationist", deco: "Subjugationist"}, @@ -40,24 +40,24 @@ App.Data.FutureSociety = { /** Each subarray in this array contains a set of Future Societies which are to be considered mutually exclusive. * They cannot be adopted at the same time by the same arcology, and if adopted by different arcologies, * will automatically conflict and reduce diplomatic relations. */ - mutexGroups: ( /** @returns {FC.FutureSociety[][]} */ function() { + mutexGroups: (/** @returns {FC.FutureSociety[][]} */ function() { /* this tiny-but-hideous IIFE is the only way I can get typechecking to work properly here, without a JSDoc equivalent to TS "as const" to prevent literal type widening */ return [ - [ "FSSupremacist" ], - [ "FSSubjugationist" ], - [ "FSGenderRadicalist", "FSGenderFundamentalist" ], - [ "FSDegradationist", "FSPaternalist" ], - [ "FSBodyPurist", "FSTransformationFetishist" ], - [ "FSYouthPreferentialist", "FSMaturityPreferentialist" ], - [ "FSSlimnessEnthusiast", "FSAssetExpansionist" ], - [ "FSPastoralist", "FSCummunism" ], - [ "FSPhysicalIdealist", "FSHedonisticDecadence" ], - [ "FSChattelReligionist", "FSNull" ], - [ "FSIncestFetishist" ], - [ "FSRomanRevivalist", "FSNeoImperialist", "FSEgyptianRevivalist", "FSEdoRevivalist", "FSArabianRevivalist", "FSChineseRevivalist", "FSAztecRevivalist" ], - [ "FSRepopulationFocus", "FSRestart" ], - [ "FSIntellectualDependency", "FSSlaveProfessionalism" ], - [ "FSPetiteAdmiration", "FSStatuesqueGlorification"] + ["FSSupremacist"], + ["FSSubjugationist"], + ["FSGenderRadicalist", "FSGenderFundamentalist"], + ["FSDegradationist", "FSPaternalist"], + ["FSBodyPurist", "FSTransformationFetishist"], + ["FSYouthPreferentialist", "FSMaturityPreferentialist"], + ["FSSlimnessEnthusiast", "FSAssetExpansionist"], + ["FSPastoralist", "FSCummunism"], + ["FSPhysicalIdealist", "FSHedonisticDecadence"], + ["FSChattelReligionist", "FSNull"], + ["FSIncestFetishist"], + ["FSRomanRevivalist", "FSNeoImperialist", "FSEgyptianRevivalist", "FSEdoRevivalist", "FSArabianRevivalist", "FSChineseRevivalist", "FSAztecRevivalist"], + ["FSRepopulationFocus", "FSRestart"], + ["FSIntellectualDependency", "FSSlaveProfessionalism"], + ["FSPetiteAdmiration", "FSStatuesqueGlorification"] ]; })(), diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 2e1759390cf7e323f4218f2c122c585e553ccf14..19b93893e47e53725e32754e3f04e945fb82b20f 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -21,7 +21,7 @@ App.Data.defaultGameStateVariables = { // PC /** @type {App.Entity.PlayerState} */ - PC: {}, + PC: null, freshPC: 0, IsInPrimePC: 3, IsPastPrimePC: 5000, @@ -163,7 +163,7 @@ App.Data.defaultGameStateVariables = { summaryStats: 0, surnameOrder: 0, /** @type {Object.<string, string>} */ - tabChoice: { Main: "all" }, + tabChoice: {Main: "all"}, universalRulesAssignsSelfFacility: 0, universalRulesBirthing: 0, universalRulesCSec: 0, @@ -341,8 +341,8 @@ App.Data.resetOnNGPlus = { weekEnabled: 0 }, /** @type {assistant} */ - assistant: {}, - targetArcology: { fs: "New" }, + assistant: null, + targetArcology: {fs: "New"}, readySlaves: 0, plot: 1, @@ -423,7 +423,7 @@ App.Data.resetOnNGPlus = { upgradeMultiplierTrade: 0, nationalities: {}, /** @type {Record<FC.Assignment, Set<number>>} */ - JobIDMap: {}, + JobIDMap: null, averageTrust: 0, averageDevotion: 0, enduringTrust: 0, @@ -915,11 +915,11 @@ App.Data.resetOnNGPlus = { ui: "start", tooltipsEnabled: 0, - brandTarget: { primary: "left buttock", secondary: "left buttock", local: "left buttock" }, - brandDesign: { primary: "your initials", official: "your initials", local: "your initials" }, + brandTarget: {primary: "left buttock", secondary: "left buttock", local: "left buttock"}, + brandDesign: {primary: "your initials", official: "your initials", local: "your initials"}, - scarTarget: { primary: "left cheek", secondary: "left cheek", local: "left cheek" }, - scarDesign: { primary: "generic", local: "generic" }, + scarTarget: {primary: "left cheek", secondary: "left cheek", local: "left cheek"}, + scarDesign: {primary: "generic", local: "generic"}, oralTotal: 0, vaginalTotal: 0, @@ -1155,16 +1155,19 @@ App.Data.resetOnNGPlus = { weatherType: 0, weatherRemaining: 0, - customSlaveOrdered: 0, /** * I am not a slave object! Do not treat me like one! * @type {App.Entity.CustomSlaveOrder} */ - customSlave: {}, + customSlave: null, + customSlaveOrdered: 0, + /** + * I am not a slave object! Do not treat me like one! + * @type {App.Entity.CustomSlaveOrder} + * */ + huskSlave: null, huskSlaveOrdered: 0, - /** @type {App.Entity.CustomSlaveOrder} */ - huskSlave: {}, /* non-vanilla shit*/ diff --git a/js/003-data/slaveMods.js b/js/003-data/slaveMods.js index 70e41dc98207ee1a087d7d818a4444a53e2896be..885401b115068bd5ef88ff31e886a154c1bb628e 100644 --- a/js/003-data/slaveMods.js +++ b/js/003-data/slaveMods.js @@ -198,7 +198,6 @@ App.Medicine.Modification.Brands = { } }; - App.Medicine.Modification.Color = { Primary: [ {value: "auburn"}, diff --git a/js/003-data/slaveSummaryData.js b/js/003-data/slaveSummaryData.js index 61dc7a1bf53a06392e6b06b74c90b803363c5ab0..82896614a8fa6ad834f7b34fdb6b4ee56e1ca74d 100644 --- a/js/003-data/slaveSummaryData.js +++ b/js/003-data/slaveSummaryData.js @@ -178,7 +178,7 @@ App.Data.SlaveSummary = { 1: {desc: "Disproportionately big butt.", style: "red"} }, muscles: { // indices: [muscles + 100, FSPhysicalIdealist(0,1) ] - 4: {desc:"Frail", style:"red"}, + 4: {desc: "Frail", style: "red"}, 69: { 0: {desc: "Very weak"}, 1: {desc: "Very weak", style: "red"} @@ -692,7 +692,7 @@ App.Data.SlaveSummary = { 195: {desc: "Wst--", style: "red"}, 200: {desc: "Wst---", style: "red"} }, - genitalia:{ + genitalia: { dickBalls: { // indices [dick, balls] 3: { 3: null, @@ -765,12 +765,12 @@ App.Data.SlaveSummary = { 999: {desc: "T&A+", style: "pink"} }, 11999: { - 8:{desc: "Boobs++", style: "pink"}, + 8: {desc: "Boobs++", style: "pink"}, 999: {desc: "T&A++", style: "pink"}, }, 100000: { 9: {desc: "Boobs+++", style: "pink"}, - 999: {desc: "T&A+++", style: "pink"} + 999: {desc: "T&A+++", style: "pink"} } }, weight: { // indices: [weigh + 100, FSHedonisticDecadence (0,1), hips + 2] @@ -816,7 +816,7 @@ App.Data.SlaveSummary = { 1: {desc: "Disp+", style: "red"} }, muscles: { // indices: [muscles + 100, FSPhysicalIdealist(0,1) ] - 4: {desc:"Weak++", style:"red"}, + 4: {desc: "Weak++", style: "red"}, 69: { 0: {desc: "Soft+"}, 1: {desc: "Weak+", style: "red"} @@ -990,7 +990,7 @@ App.Data.SlaveSummary = { 95: "Preg+", 100: "Preg++" }, - "none" : "Vanilla" + "none": "Vanilla" }, prestige: { 0: null, diff --git a/js/003-data/slaveTradePresets.js b/js/003-data/slaveTradePresets.js index 57123fbb4a4e0e002b44ddba3fd85e240f3e25af..99e7e92ff247a68e4728d3d639a41540919bcde9 100644 --- a/js/003-data/slaveTradePresets.js +++ b/js/003-data/slaveTradePresets.js @@ -1,6 +1,6 @@ App.Data.NationalityPresets = {}; -App.Data.NationalityPresets.Vanilla = new Map ([ +App.Data.NationalityPresets.Vanilla = new Map([ ["Vanilla Global", { Afghan: 2, Albanian: 1, diff --git a/js/003-data/slaveWearData.js b/js/003-data/slaveWearData.js index 76d321f1d93f4451834aab3225c26303a47485a7..3c660cebb523e37a71d4b2865816be382f19056a 100644 --- a/js/003-data/slaveWearData.js +++ b/js/003-data/slaveWearData.js @@ -1496,7 +1496,7 @@ App.Data.vaginalAccessory = new Map([ /** * @typedef {slaveWear} bellyAccessory - * @property {1|2|3|4?} empathyBelly + * @property {1|2|3|4} [empathyBelly] */ /** @type {Map<string, bellyAccessory>} */ App.Data.bellyAccessory = new Map([ diff --git a/js/utils.js b/js/utils.js index 63c971338adf66471fe004496ea5919e303cc09c..6f40c2bcfe984c7b01c501bc0b17b1b41213dc9c 100644 --- a/js/utils.js +++ b/js/utils.js @@ -1,4 +1,5 @@ /* eslint no-unused-vars: [2, { "vars": "local" }] */ + /* This file contains only JS functions without dependencies on FC specific variables/conventions and do not rely on * custom functions outside this file */ @@ -9,10 +10,7 @@ * @returns {boolean} */ function jsDef(x) { - if (typeof x === "undefined" || x === null || x === undefined) { - return false; - } - return true; + return !(typeof x === "undefined" || x === null || x === undefined); } /** @@ -424,7 +422,5 @@ function median(arr = []) { const mid = Math.floor(arr.length / 2); const nums = [...arr].sort((a, b) => a - b); - return arr.length % 2 === 0 ? - (nums[mid] + nums[mid - 1]) / 2 : - nums[mid]; + return arr.length % 2 === 0 ? (nums[mid] + nums[mid - 1]) / 2 : nums[mid]; } diff --git a/src/005-passages/endWeekPassages.js b/src/005-passages/endWeekPassages.js index b039a2bed3eb32f3585a4b7c80ac6461bed695eb..e42545598c14c10cf5f15bf42aeb578aa3bc6208 100644 --- a/src/005-passages/endWeekPassages.js +++ b/src/005-passages/endWeekPassages.js @@ -22,6 +22,7 @@ new App.DomPassage("Next Week", App.EndWeek.nextWeek(); // simulate <<goto "Main">> macro behaviour + // @ts-ignore setTimeout(() => Engine.play("Main"), Engine.minDomActionDelay); return document.createDocumentFragment(); diff --git a/src/arcologyBuilding/base.js b/src/arcologyBuilding/base.js index ccb978502ef34b9ef487706016d48b83b85efd4c..3cfb869b8f01008982d4857eb827bc27aef80f5a 100644 --- a/src/arcologyBuilding/base.js +++ b/src/arcologyBuilding/base.js @@ -66,10 +66,9 @@ App.Arcology.sectionOrder = ["fountain", "penthouse", "spire", "shops", "ravine- /** * @param {App.Entity.Facilities.Facility} facility * @param {string} [passageName] - * @param {string} [statsStr] * @returns {Node} */ -App.Arcology.facilityCellContent = function(facility, passageName, statsStr) { +App.Arcology.facilityCellContent = function(facility, passageName) { const res = document.createDocumentFragment(); res.append(App.UI.DOM.passageLink(facility.UIName, passageName || facility.genericName)); const report = facility.occupancyReport(false); diff --git a/src/art/artJS.js b/src/art/artJS.js index f86bdb5b94435fc0c65640b7915cbea7e35e159a..5e4b1fc326a96f5649212c1d4df808d490122976 100644 --- a/src/art/artJS.js +++ b/src/art/artJS.js @@ -156,8 +156,8 @@ App.Art.SlaveArtElement = function(artSlave, artSize, UIDisplay) { * @param {string} elementID the html element that is being updated * @param {number} [UIDisplay] (optional, only used by legacy art): icon UI Display for vector art, 1 for on */ -App.Art.refreshSlaveArt = function(artSlave, artSize, elementID, UIDisplay=0) { - if ($('#'+elementID).length) { +App.Art.refreshSlaveArt = function(artSlave, artSize, elementID, UIDisplay = 0) { + if ($('#' + elementID).length) { if (V.seeImages === 1) { let image = document.createElement('div'); if (artSize === 3) { @@ -176,10 +176,9 @@ App.Art.refreshSlaveArt = function(artSlave, artSize, elementID, UIDisplay=0) { image.className = "imageRef smlImg"; } image.appendChild(App.Art.SlaveArtElement(artSlave, artSize, UIDisplay)); - return jQuery('#'+elementID).empty().append(image); + return jQuery('#' + elementID).empty().append(image); } } - return; }; globalThis.ArtControlRendered = function(slave, sizePlacement) { diff --git a/src/descriptions/familySummaries.js b/src/descriptions/familySummaries.js index f46d88c11776178917116fd91cec4750a7decdbf..31a9e6344233150edca68b8976c969d51d035228 100644 --- a/src/descriptions/familySummaries.js +++ b/src/descriptions/familySummaries.js @@ -281,7 +281,8 @@ App.Desc.family = (function() { /* PC niece and nephew - determines how many nieces and nephews you have*/ if (isAunt(slave, V.PC)) { - const {m: nephews, f: nieces} = splitBySex(V.slaves.filter((s) => s.ID !== slave.ID && isAunt(s, V.PC))); + const {m: nephews, f: nieces} = + splitBySex(V.slaves.filter((s) => s.ID !== slave.ID && isAunt(s, V.PC))); r.push(`${He} is`); if (slave.genes === "XX") { @@ -324,7 +325,7 @@ App.Desc.family = (function() { } } /* end distant relatives toggle check */ - let twins = []; + let twins = []; let sisters = []; let brothers = []; let halfSisters = []; @@ -568,7 +569,7 @@ App.Desc.family = (function() { } } - let twins = []; + let twins = []; let sisters = []; let brothers = []; let halfSisters = []; diff --git a/src/descriptions/officeDescription.js b/src/descriptions/officeDescription.js index 3fcb4dcf7ecfe50ad2b6b8b347621fa13672a040..35aeed12cad40401c50ae908d670e00e07dba667 100644 --- a/src/descriptions/officeDescription.js +++ b/src/descriptions/officeDescription.js @@ -470,32 +470,34 @@ App.Desc.officeDescription = function(lastElement) { } const trinkets = weightedArray2HashMap(V.trinkets); - let trinketString = []; + /** @type {Array<string>} */ + let trinketStrings = []; let plurals = false; for (const trinketDesc in trinkets) { if (trinkets[trinketDesc] === 1) { - trinketString.push(trinketDesc); + trinketStrings.push(trinketDesc); } else if (trinkets[trinketDesc] > 1) { - trinketString.push(trinketPluralReplacer(trinketDesc)); + trinketStrings.push(trinketPluralReplacer(trinketDesc)); plurals = true; } } + let r; // depending on length of trinketString, add necessary conjunctions - if (trinketString.length === 1) { + if (trinketStrings.length === 1) { if (plurals === false) { - trinketString = `a single item: ${trinketString[0]}`; + r = `a single item: ${trinketStrings[0]}`; } else { - trinketString = trinketString[0]; + r = trinketStrings[0]; } - } else if (trinketString.length === 2 && plurals === false) { - trinketString = `a couple of items: ${trinketString[0]}, and ${trinketString[1]}`; + } else if (trinketStrings.length === 2 && plurals === false) { + r = `a couple of items: ${trinketStrings[0]}, and ${trinketStrings[1]}`; } else { - trinketString[trinketString.length - 1] = `and ${trinketString[trinketString.length - 1]}`; - trinketString = trinketString.join(", "); + trinketStrings[trinketStrings.length - 1] = `and ${trinketStrings[trinketStrings.length - 1]}`; + r = trinketStrings.join(", "); } - return `There's a display case behind your desk, with ${trinketString}.`; + return `There's a display case behind your desk, with ${r}.`; } function trinketPluralReplacer(desc) { diff --git a/src/endWeek/endWeek.js b/src/endWeek/endWeek.js index afa7d21b13553468f6755adac8d1117b86d7d053..fe3aaf631cab28b8e72fda2aebb58335f363974a 100644 --- a/src/endWeek/endWeek.js +++ b/src/endWeek/endWeek.js @@ -99,7 +99,6 @@ globalThis.endWeek = (function() { } } - function organs() { function advanceOrgan(o) { if (o.weeksToCompletion > 0) { @@ -180,7 +179,8 @@ globalThis.endWeek = (function() { } if (V.foodMarket > 0) { - V.foodConsumption = ((V.lowerClass*V.foodRate.lower) + (V.middleClass*V.foodRate.middle) + (V.upperClass*V.foodRate.upper) + (V.topClass*V.foodRate.top)); + V.foodConsumption = ((V.lowerClass * V.foodRate.lower) + (V.middleClass * V.foodRate.middle) + + (V.upperClass * V.foodRate.upper) + (V.topClass * V.foodRate.top)); V.foodConsumption += V.slaves.reduce((acc, cur) => acc += foodConsumption(cur), 0); V.food -= Math.max(V.foodConsumption, V.food); V.foodConsumption = 0; diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index 87990123e9a63950b635248b491057824b7ecfbf..cbd9f697a2c08e616ab405e8a6e0a606777becf9 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -62,12 +62,10 @@ globalThis.illness = function(slave) { let r = ``; let assignBonus = 0; // bonus for healthy assignments - // eslint-disable-next-line no-unused-vars - let he, him, his, hers, himself, girl, loli, He, His; - ({ - // eslint-disable-next-line no-unused-vars - he, him, his, hers, himself, girl, He, His, loli - } = getPronouns(slave)); + const { + he, his, He, His + } = getPronouns(slave); + let sicknessDegree = ["fine", "minor illness", "illness", "bad illness", "severe illness", "life-threatening illness"]; // On the macro side of things disease could also happen to the arcology's population as the arcology becomes crowded, killing citizens and putting slaves at greater risk of getting ill. Again with upgrades/policies to mitigate the issue made available TODO? @@ -709,7 +707,7 @@ globalThis.tired = function(slave) { * @param {number} [exhaustion=0] * @returns {number} */ -globalThis.restEffects = function(slave, exhaustion=0) { +globalThis.restEffects = function(slave, exhaustion = 0) { // exhaustion holds the weekly .tired gain from the assignment. if (!slave.fuckdoll) { if (slave.rules.rest === "mandatory") { diff --git a/src/endWeek/minorInjuryResponse.js b/src/endWeek/minorInjuryResponse.js index 4abe972651182c5550315914117d07cc869d816a..e5884279ca8b44a104efef4b2ff880d4adf40d28 100644 --- a/src/endWeek/minorInjuryResponse.js +++ b/src/endWeek/minorInjuryResponse.js @@ -6,35 +6,36 @@ globalThis.minorInjuryResponse = function(slave) { const arcology = V.arcologies[0]; const arcologyUpgrade = V.arcologyUpgrade; const {he, himself, He} = getPronouns(slave); - let r = ""; - let trackedCategory = ""; - switch (slave.assignment) { - case Job.WHORE: - trackedCategory = "slaveAssignmentWhore"; - break; - case Job.MADAM: - trackedCategory = "slaveAssignmentMadam"; - break; - case Job.BROTHEL: - trackedCategory = "slaveAssignmentBrothel"; - break; - case Job.PUBLIC: - trackedCategory = "slaveAssignmentPublic"; - break; - case Job.DJ: - trackedCategory = "slaveAssignmentDj"; - break; - case Job.CLUB: - trackedCategory = "slaveAssignmentClub"; - break; - default: - trackedCategory = "slaveAssignmentUndefined"; - break; + return responseWithTracking(trackedCategory()); + + /** + * @returns {string} + */ + function trackedCategory() { + switch (slave.assignment) { + case Job.WHORE: + return "slaveAssignmentWhore"; + case Job.MADAM: + return "slaveAssignmentMadam"; + case Job.BROTHEL: + return "slaveAssignmentBrothel"; + case Job.PUBLIC: + return "slaveAssignmentPublic"; + case Job.DJ: + return "slaveAssignmentDj"; + case Job.CLUB: + return "slaveAssignmentClub"; + default: + return "slaveAssignmentUndefined"; + } } - r = responseWithTracking(slave, trackedCategory); - function responseWithTracking(s, category) { + /** + * @param {string} category + * @returns {string} + */ + function responseWithTracking(category) { let o = ""; if (arcology.FSDegradationist > 20) { o += ` ${He} carries on, knowing that in your degradationist arcology, this is accepted behavior.`; @@ -69,6 +70,4 @@ globalThis.minorInjuryResponse = function(slave) { } return o; } - - return r; }; diff --git a/src/endWeek/nextWeek/nextWeek.js b/src/endWeek/nextWeek/nextWeek.js index 811c6f040364b9519b5c1f98ff92e4bffc68eedd..ac272771ac373f41bd7afcd4fa08879131f82cdf 100644 --- a/src/endWeek/nextWeek/nextWeek.js +++ b/src/endWeek/nextWeek/nextWeek.js @@ -28,6 +28,7 @@ App.EndWeek.nextWeek = function() { } } if (V.menstruation === 1) { + // TODO } else if (V.PC.geneticQuirks.superfetation === 2 && V.PC.womb.length > 0) { if (V.PC.fertPeak === 0) { V.PC.fertPeak = 1; @@ -129,6 +130,7 @@ App.EndWeek.nextWeek = function() { } } if (V.menstruation === 1) { + // TODO } else if (slave.geneticQuirks.superfetation === 2 && slave.womb.length > 0) { if (slave.fertPeak === 0) { slave.fertPeak = 1; @@ -334,6 +336,7 @@ App.EndWeek.nextWeek = function() { App.EndWeek.resetGlobals(); if (V.autosave !== 0) { + // @ts-ignore Save.autosave.save("Week Start Autosave"); } diff --git a/src/endWeek/reports/arcadeReport.js b/src/endWeek/reports/arcadeReport.js index a15d9d6fe775844fa6e335145e1f9778ca1fbdb3..01601f365e98c079cb48805c50f15bf4e3cfcf33 100644 --- a/src/endWeek/reports/arcadeReport.js +++ b/src/endWeek/reports/arcadeReport.js @@ -10,7 +10,10 @@ App.EndWeek.arcadeReport = function() { const slaves = App.Utils.sortedEmployees(App.Entity.facilities.arcade); const slavesLength = slaves.length; - let cockmilked = 0, milked = 0, milkProfits = 0, profits = 0, boobsImplanted = 0, prostatesImplanted = 0, vasectomiesUndone = 0, mSlave, bSlave, pSlave, cSlave, milkResults, growth; + + const cockMilkedSlaves = [], milkedSlaves = [], boobsImplantedSlaves = [], prostatesImplantedSlaves = []; + let vasectomiesUndone = 0; + let milkProfits = 0, profits = 0; // Statistics gathering V.facility = V.facility || {}; @@ -38,7 +41,6 @@ App.EndWeek.arcadeReport = function() { } for (const slave of App.SlaveAssignment.reportSlaves(slaves)) { - const {He} = getPronouns(slave); r = []; /* for the included passages */ @@ -108,70 +110,7 @@ App.EndWeek.arcadeReport = function() { profits += V.cash - oldCash; if (V.arcadeUpgradeCollectors > 0) { - if (slave.vasectomy === 1) { - slave.vasectomy = 0; - vasectomiesUndone++; - cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); - surgeryDamage(slave, 10); - } else if (slave.lactation < 2) { - slave.lactation = 2; - boobsImplanted++; - bSlave = slave; - cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); - surgeryDamage(slave, 10); - } else if (slave.prostate === 1) { - slave.prostate = 2; - prostatesImplanted++; - pSlave = slave; - cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); - surgeryDamage(slave, 10); - } else if (slave.lactation > 0 || slave.balls > 0) { - milkResults = App.SlaveAssignment.getMilked(slave, 1.0); - if (V.showEWD !== 0) { - r = []; - r.push(App.UI.DOM.makeElement("div", `${He} ${milkResults.text}`, "indent")); - App.Events.addNode(el, r, "div", "indent"); - } - milkProfits += milkResults.cash; - growth = 0; - const gigantomastiaMod = slave.geneticQuirks.gigantomastia === 2 ? (slave.geneticQuirks.macromastia === 2 ? 3 : 2) : 1; - if (slave.boobs < 2000) { - growth = 100; - } else if (slave.boobs < 5000 * gigantomastiaMod) { - growth = 50; - } else if (slave.boobs < 10000 * gigantomastiaMod) { - growth = 25; - } - if (slave.geneMods.NCS === 1) { - /* - ** NCS will allow some growth for Arcade milking, but not as much as the Dairy. - */ - growth = Math.trunc(growth / 3.5); - } - slave.boobs += growth; - if ( - (slave.balls > 0) && - (slave.balls < 10) && - (random(1, 100) > (40 + (10 * (slave.balls + (2 * slave.geneMods.NCS))))) - ) { - slave.balls++; - } - if ( - (slave.dick > 0) && - (slave.dick < 10) && - (random(1, 100) > (40 + (10 * slave.dick + (2 * slave.geneMods.NCS)))) - ) { - slave.dick++; - } - if (slave.lactation > 0) { - milked++; - mSlave = slave; - } - if (slave.balls > 0) { - cockmilked++; - cSlave = slave; - } - } + applyCollectors(slave); } if (slave.inflation > 0) { deflate(slave); @@ -185,14 +124,16 @@ App.EndWeek.arcadeReport = function() { if (slavesLength + V.fuckdolls > 0) { r = []; - if (milked === 1) { - const {his} = getPronouns(mSlave); - r.push(`One of them is lactating and spends ${his} time in ${V.arcadeName} being simultaneously milked and fucked.`); - } else if (milked > 1) { - r.push(`${capFirstChar(num(milked))} of them are lactating and spend their time in ${V.arcadeName} being simultaneously milked and fucked.`); + if (milkedSlaves.length > 0) { + if (milkedSlaves.length === 1) { + const {his} = getPronouns(milkedSlaves[0]); + r.push(`One of them is lactating and spends ${his} time in ${V.arcadeName} being simultaneously milked and fucked.`); + } else { + r.push(`${capFirstChar(num(milkedSlaves.length))} of them are lactating and spend their time in ${V.arcadeName} being simultaneously milked and fucked.`); + } } - if (vasectomiesUndone) { + if (vasectomiesUndone > 0) { if (vasectomiesUndone === 1) { r.push(`One`); } else { @@ -200,29 +141,34 @@ App.EndWeek.arcadeReport = function() { } r.push(`of them had severed vas deferens, so they were reattached to allow sperm through, costing <span class="red">${cashFormat(V.surgeryCost * vasectomiesUndone)}.</span>`); } - if (boobsImplanted) { - if (boobsImplanted === 1) { - const {he} = getPronouns(bSlave); + + if (boobsImplantedSlaves.length > 0) { + if (boobsImplantedSlaves.length === 1) { + const {he} = getPronouns(boobsImplantedSlaves[0]); r.push(`One of them was not lactating, so ${he} was`); } else { - r.push(`${capFirstChar(num(boobsImplanted))} of them were not lactating, so they were`); + r.push(`${capFirstChar(num(boobsImplantedSlaves.length))} of them were not lactating, so they were`); } - r.push(`implanted with long-acting lactation inducing drugs, costing <span class="red">${cashFormat(V.surgeryCost * boobsImplanted)}.</span>`); + r.push(`implanted with long-acting lactation inducing drugs, costing <span class="red">${cashFormat(V.surgeryCost * boobsImplantedSlaves.length)}.</span>`); } - if (prostatesImplanted) { - if (prostatesImplanted === 1) { - const {he} = getPronouns(pSlave); + + if (prostatesImplantedSlaves.length > 0) { + if (prostatesImplantedSlaves.length === 1) { + const {he} = getPronouns(prostatesImplantedSlaves[0]); r.push(`One of them was not producing the maximum possible amount of precum, so ${he} was`); } else { - r.push(`${capFirstChar(num(prostatesImplanted))} of them were not producing the maximum possible amount of precum, so they were`); + r.push(`${capFirstChar(num(prostatesImplantedSlaves.length))} of them were not producing the maximum possible amount of precum, so they were`); } - r.push(`implanted with long-acting prostate stimulation drugs, costing <span class="red">${cashFormat(V.surgeryCost * prostatesImplanted)}.</span>`); + r.push(`implanted with long-acting prostate stimulation drugs, costing <span class="red">${cashFormat(V.surgeryCost * prostatesImplantedSlaves.length)}.</span>`); } - if (cockmilked === 1) { - const {he} = getPronouns(cSlave); - r.push(`One of them retains testicles and is brutally cockmilked as ${he} is used.`); - } else if (cockmilked > 1) { - r.push(`${capFirstChar(num(cockmilked))} of them retain testicles and are brutally cockmilked as they are used.`); + + if (cockMilkedSlaves.length > 0) { + if (cockMilkedSlaves.length === 1) { + const {he} = getPronouns(cockMilkedSlaves[0]); + r.push(`One of them retains testicles and is brutally cockmilked as ${he} is used.`); + } else { + r.push(`${capFirstChar(num(cockMilkedSlaves.length))} of them retain testicles and are brutally cockmilked as they are used.`); + } } r.push(`The arcade makes you`); @@ -281,7 +227,6 @@ App.EndWeek.arcadeReport = function() { b.totalExpenses = b.whoreCosts + b.maintenance; b.profit = b.totalIncome - b.totalExpenses; - // Arcade stats el.append(App.Facilities.Arcade.Stats(false)); arcadeStats.append(App.Facilities.Arcade.Stats(true)); @@ -301,4 +246,87 @@ App.EndWeek.arcadeReport = function() { } } } + + /** + * @param {App.Entity.SlaveState} slave + */ + function applyCollectors(slave) { + if (slave.vasectomy === 1) { + slave.vasectomy = 0; + vasectomiesUndone++; + cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); + surgeryDamage(slave, 10); + } else if (slave.lactation < 2) { + slave.lactation = 2; + boobsImplantedSlaves.push(slave); + cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); + surgeryDamage(slave, 10); + } else if (slave.prostate === 1) { + slave.prostate = 2; + prostatesImplantedSlaves.push(slave); + cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); + surgeryDamage(slave, 10); + } else if (slave.lactation > 0 || slave.balls > 0) { + milkProfits += milk(slave); + slave.boobs += boobGrowth(slave); + if ( + (slave.balls > 0) && + (slave.balls < 10) && + (random(1, 100) > (40 + (10 * (slave.balls + (2 * slave.geneMods.NCS))))) + ) { + slave.balls++; + } + if ( + (slave.dick > 0) && + (slave.dick < 10) && + (random(1, 100) > (40 + (10 * slave.dick + (2 * slave.geneMods.NCS)))) + ) { + slave.dick++; + } + if (slave.lactation > 0) { + milkedSlaves.push(slave); + } + if (slave.balls > 0) { + cockMilkedSlaves.push(slave); + } + } + } + + /** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ + function milk(slave) { + const {He} = getPronouns(slave); + const milkResults = App.SlaveAssignment.getMilked(slave, 1.0); + if (V.showEWD !== 0) { + r = []; + r.push(App.UI.DOM.makeElement("div", `${He} ${milkResults.text}`, "indent")); + App.Events.addNode(el, r, "div", "indent"); + } + return milkResults.cash; + } + + /** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ + function boobGrowth(slave) { + let growth = 0; + const gigantomastiaMod = slave.geneticQuirks.gigantomastia === 2 ? (slave.geneticQuirks.macromastia === 2 ? 3 : 2) : 1; + if (slave.boobs < 2000) { + growth = 100; + } else if (slave.boobs < 5000 * gigantomastiaMod) { + growth = 50; + } else if (slave.boobs < 10000 * gigantomastiaMod) { + growth = 25; + } + if (slave.geneMods.NCS === 1) { + /* + ** NCS will allow some growth for Arcade milking, but not as much as the Dairy. + */ + growth = Math.trunc(growth / 3.5); + } + return growth; + } }; diff --git a/src/endWeek/reports/cellblockReport.js b/src/endWeek/reports/cellblockReport.js index ec560052dc75b0f58187201f0da095e6681f3693..148b09e67dd3cdef1e6cd330ae0df74e80f6eaf7 100644 --- a/src/endWeek/reports/cellblockReport.js +++ b/src/endWeek/reports/cellblockReport.js @@ -168,7 +168,6 @@ App.EndWeek.cellblockReport = function() { } } - if (S.Wardeness) { const slave = App.SlaveAssignment.reportSlave(S.Wardeness); tired(slave); diff --git a/src/endWeek/reports/dairyReport.js b/src/endWeek/reports/dairyReport.js index e067c4733065f1ae4d493b52330e7048e213c1a6..11c056000cb14a0da29e27470598d17999b42fcf 100644 --- a/src/endWeek/reports/dairyReport.js +++ b/src/endWeek/reports/dairyReport.js @@ -9,8 +9,8 @@ App.EndWeek.dairyReport = function() { const BF = App.Data.misc.bioreactorFluids; const slaves = App.Utils.sortedEmployees(App.Entity.facilities.dairy); const DL = slaves.length; - let anusesStretched = 0, cumWeek = 0, femCumWeek = 0, FLsFetish = 0, milkWeek = 0, balltacular = 0, boobtacular = 0, careerForgotten = 0, chemMinor = 0, chemSevere = 0, desterilized = 0, hateFilled = 0, horrified = 0, intelligenceLost = 0, mindbroken = 0, skillsLost = 0, stupidified = 0, vaginasStretched = 0; - let cmSlave, dsSlave, hfSlave, hrSlave, slSlave, cfSlave, stSlave, btSlave; + const balltacular = [], careerForgotten = [], desterilized = [], hateFilled = [], horrified = [], skillsLost = [], stupidified = [], chemMinor = []; + let anusesStretched = 0, cumWeek = 0, femCumWeek = 0, milkWeek = 0, boobtacular = 0, chemSevere = 0, intelligenceLost = 0, mindbroken = 0, vaginasStretched = 0; const inflatedSlaves = App.Facilities.Dairy.inflation(); const dairySettings = V.dairyStimulatorsSetting + V.dairyFeedersSetting + V.dairyPregSetting; const restrainedInjected = V.dairyRestraintsSetting + V.injectionUpgrade; @@ -131,6 +131,7 @@ App.EndWeek.dairyReport = function() { if (S.Milkmaid.rules.rest !== "restrictive") { S.Milkmaid.rules.rest = "restrictive"; } + let FLsFetish = 0; if (S.Milkmaid.fetishStrength <= 95) { if (milkers >= cummers && milkers >= breeders) { if (S.Milkmaid.fetish !== "boobs") { @@ -376,7 +377,6 @@ App.EndWeek.dairyReport = function() { } } - /* Perform facility based rule changes */ // Set diet @@ -689,8 +689,7 @@ App.EndWeek.dairyReport = function() { slave.balls++; } if (slave.balls >= 125) { - balltacular++; - btSlave = slave; + balltacular.push(slave); } } else if (slave.balls < 10) { if (slave.geneMods.NCS === 0 && random(1, 100) > (40 + ballFormula)) { @@ -700,8 +699,7 @@ App.EndWeek.dairyReport = function() { slave.balls++; } if (slave.balls >= 10) { - balltacular++; - btSlave = slave; + balltacular.push(slave); } } if (slave.dick > 0) { @@ -838,8 +836,7 @@ App.EndWeek.dairyReport = function() { if (slave.chem > 250) { chemSevere++; } else if (slave.chem > 100) { - chemMinor++; - cmSlave = slave; + chemMinor.push(slave); } } @@ -850,35 +847,28 @@ App.EndWeek.dairyReport = function() { if (slave.devotion > -75) { slave.devotion -= 10; if (slave.devotion < -65) { - hateFilled++; - hfSlave = slave; + hateFilled.push(slave); } } else if (slave.trust > -75) { slave.trust -= 10; if (slave.trust < -65) { - horrified++; - hrSlave = slave; + horrified.push(slave); } } else if (slave.skill.vaginal > 0) { slave.skill.vaginal -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.skill.oral > 0) { slave.skill.oral -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.skill.anal > 0) { slave.skill.anal -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.career !== "a bioreactor") { slave.career = "a bioreactor"; - careerForgotten++; - cfSlave = slave; + careerForgotten.push(slave); } else if (slave.intelligenceImplant > 0) { slave.intelligenceImplant = Math.clamp(slave.intelligenceImplant - 5, 0, 30); - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.intelligence >= -15) { slave.intelligence -= 5; intelligenceLost++; @@ -888,17 +878,14 @@ App.EndWeek.dairyReport = function() { slave.trust -= 10; } else if (slave.skill.whoring > 0) { slave.skill.whoring -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.skill.entertainment > 0) { slave.skill.entertainment -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.intelligence >= -50) { slave.intelligence -= 5; if (slave.intelligence < -50) { - stupidified++; - stSlave = slave; + stupidified.push(slave); } } else if (slave.fetish !== "mindbroken") { slave.fetish = "mindbroken"; @@ -913,8 +900,7 @@ App.EndWeek.dairyReport = function() { ) ) { slave.career = "a bioreactor"; - careerForgotten++; - cfSlave = slave; + careerForgotten.push(slave); } if (V.arcologies[0].FSBodyPuristLaw === 0 && V.healthyDrugsUpgrade === 0) { slave.chem += 5; @@ -926,35 +912,28 @@ App.EndWeek.dairyReport = function() { if (slave.devotion > -75) { slave.devotion -= 5; if (slave.devotion < -70) { - hateFilled++; - hfSlave = slave; + hateFilled.push(slave); } } else if (slave.trust > -75) { slave.trust -= 5; if (slave.trust < -70) { - horrified++; - hrSlave = slave; + horrified.push(slave); } } else if (slave.skill.vaginal >= 20) { slave.skill.vaginal -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.skill.oral >= 20) { slave.skill.oral -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.skill.anal >= 20) { slave.skill.anal -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.career !== "a bioreactor") { slave.career = "a bioreactor"; - careerForgotten++; - cfSlave = slave; + careerForgotten.push(slave); } else if (slave.intelligenceImplant > 0) { slave.intelligenceImplant = Math.clamp(slave.intelligenceImplant - 5, 0, 30); - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.intelligence >= -15) { slave.intelligence -= 5; intelligenceLost++; @@ -964,17 +943,14 @@ App.EndWeek.dairyReport = function() { slave.trust -= 8; } else if (slave.skill.whoring >= 20) { slave.skill.whoring -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.skill.entertainment >= 20) { slave.skill.entertainment -= 10; - skillsLost++; - slSlave = slave; + skillsLost.push(slave); } else if (slave.intelligence >= -50) { slave.intelligence -= 5; if (slave.intelligence < -50) { - stupidified++; - stSlave = slave; + stupidified.push(slave); } } else if (slave.fetish !== "mindbroken") { slave.fetish = "mindbroken"; @@ -987,8 +963,7 @@ App.EndWeek.dairyReport = function() { ) ) { slave.career = "a bioreactor"; - careerForgotten++; - cfSlave = slave; + careerForgotten.push(slave); } if (V.arcologies[0].FSBodyPuristLaw === 0 && V.healthyDrugsUpgrade === 0) { slave.chem += 2; @@ -1003,8 +978,7 @@ App.EndWeek.dairyReport = function() { femCumWeek += girlCumAmount(slave); if (slave.preg === -2) { slave.preg = 0; - desterilized++; - dsSlave = slave; + desterilized.push(slave); } if (isFertile(slave)) { if (slave.eggType === "human") { @@ -1120,45 +1094,45 @@ App.EndWeek.dairyReport = function() { r.push(`One cow's productivity is being reduced by the long term effects of industrial use.`); } - if (chemMinor > 1) { - r.push(`${chemMinor} cows have been drugged and used long enough that they require increased curative doses, slightly reducing their output.`); - } else if (chemMinor > 0) { - const {he, his} = getPronouns(cmSlave); + if (chemMinor.length > 1) { + r.push(`${chemMinor.length} cows have been drugged and used long enough that they require increased curative doses, slightly reducing their output.`); + } else if (chemMinor.length > 0) { + const {he, his} = getPronouns(chemMinor[0]); r.push(`One cow has been drugged and used long enough that ${he} requires increased curative doses, slightly reducing ${his} output.`); } - if (desterilized > 1) { - r.push(`${desterilized} cows had minor health issues preventing their fertile womb from conceiving; the issues have been resolved and they have been impregnated.`); - } else if (desterilized > 0) { - const {he, his} = getPronouns(dsSlave); + if (desterilized.length > 1) { + r.push(`${desterilized.length} cows had minor health issues preventing their fertile womb from conceiving; the issues have been resolved and they have been impregnated.`); + } else if (desterilized.length > 0) { + const {he, his} = getPronouns(desterilized[0]); r.push(`One cow had minor health issues preventing ${his} fertile womb from conceiving; they have been resolved and ${he} has been impregnated.`); } - if (hateFilled > 1) { - r.push(`${hateFilled} cows stopped struggling so much when fucked by the machines; it seems they have sunk into a fugue.`); - } else if (hateFilled > 0) { - const {he} = getPronouns(hfSlave); + if (hateFilled.length > 1) { + r.push(`${hateFilled.length} cows stopped struggling so much when fucked by the machines; it seems they have sunk into a fugue.`); + } else if (hateFilled.length > 0) { + const {he} = getPronouns(hateFilled[0]); r.push(`One cow stopped struggling so much when fucked by the machines; it seems ${he} has sunk into a fugue.`); } - if (horrified > 1) { - r.push(`${horrified} cows' emotional activity dropped significantly; this indicates acceptance that they are not likely to leave ${V.dairyName}, ever again.`); - } else if (horrified > 0) { - const {he} = getPronouns(hrSlave); + if (horrified.length > 1) { + r.push(`${horrified.length} cows' emotional activity dropped significantly; this indicates acceptance that they are not likely to leave ${V.dairyName}, ever again.`); + } else if (horrified.length > 0) { + const {he} = getPronouns(horrified[0]); r.push(`One cow's emotional activity dropped significantly; this indicates acceptance that ${he} is not likely to leave ${V.dairyName}, ever again.`); } - if (skillsLost > 1) { - r.push(`${skillsLost} cows forgot skills due to their inability to focus on anything but machine rape.`); - } else if (skillsLost > 0) { - const {his} = getPronouns(slSlave); + if (skillsLost.length > 1) { + r.push(`${skillsLost.length} cows forgot skills due to their inability to focus on anything but machine rape.`); + } else if (skillsLost.length > 0) { + const {his} = getPronouns(skillsLost[0]); r.push(`One cow forgot skills due to ${his} inability to focus on anything but machine rape.`); } - if (careerForgotten > 1) { - r.push(`${careerForgotten} cows forgot the details of their past professional lives; all they can remember now is this.`); - } else if (careerForgotten > 0) { - const {he, his} = getPronouns(cfSlave); + if (careerForgotten.length > 1) { + r.push(`${careerForgotten.length} cows forgot the details of their past professional lives; all they can remember now is this.`); + } else if (careerForgotten.length > 0) { + const {he, his} = getPronouns(careerForgotten[0]); r.push(`One cow forgot the details of ${his} past professional life; all ${he} can remember now is this.`); } @@ -1180,10 +1154,10 @@ App.EndWeek.dairyReport = function() { r.push(`One cow suffered some loss of intelligence due to accumulated mental stress from life attached to a milking machine.`); } - if (stupidified > 1) { - r.push(`${stupidified} cows were so mentally dulled by use as biological factories that they were reduced to a very low level of intelligence.`); - } else if (stupidified > 0) { - const {he} = getPronouns(stSlave); + if (stupidified.length > 1) { + r.push(`${stupidified.length} cows were so mentally dulled by use as biological factories that they were reduced to a very low level of intelligence.`); + } else if (stupidified.length > 0) { + const {he} = getPronouns(stupidified[0]); r.push(`One cow was so mentally dulled by use as biological factories that ${he} was reduced to a very low level of intelligence.`); } @@ -1199,10 +1173,10 @@ App.EndWeek.dairyReport = function() { r.push(`One cow grew past 30 kilograms of breasts, a remarkable advance in capacity.`); } - if (balltacular > 1) { - r.push(`${balltacular} cows' testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking them with extra force.`); - } else if (balltacular > 0) { - const {him} = getPronouns(btSlave); + if (balltacular.length > 1) { + r.push(`${balltacular.length} cows' testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking them with extra force.`); + } else if (balltacular.length > 0) { + const {him} = getPronouns(balltacular[0]); r.push(`One cow's testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking ${him} with extra force.`); } diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js index 5579ccc7f898afb39ceff07759064bdea2ab631a..64bb9e809ee76cfd1e9245bc270639d0871b025c 100644 --- a/src/endWeek/saChoosesOwnClothes.js +++ b/src/endWeek/saChoosesOwnClothes.js @@ -98,7 +98,8 @@ App.SlaveAssignment.choosesOwnClothes = (function() { if (V.arcologies[0].FSChattelReligionist > 0) { selection = {text: `${he} commonly sees others wearing chattel habits and is drawn to doing so ${himself}.`, clothes: "a chattel habit"}; } else { - let text = ''; + /** @type {string} */ + let text; /** @type {Array<FC.FutureSociety|"panties">} */ const clothingFS = ["panties"]; for (const FS of App.Data.FutureSociety.fsNames) { diff --git a/src/endWeek/saClothes.js b/src/endWeek/saClothes.js index 7f89c2ed433228de85fbf7cc362d0f23b526d34a..4c6914b722af2787eca20414ddb4a2e24da1c87c 100644 --- a/src/endWeek/saClothes.js +++ b/src/endWeek/saClothes.js @@ -1025,7 +1025,7 @@ App.SlaveAssignment.clothes = (function() { } else { r.push(`${His} cavernous pussy accommodates the huge dildo ${he}'s required to wear.`); } - } else { + } else { if (slave.vagina < 4) { if (slave.fuckdoll === 0) { if (slave.fetish !== "mindbroken") { diff --git a/src/endWeek/saDevotion.js b/src/endWeek/saDevotion.js index 700a5eb1e6425bc63660334a5f7c3d1144ace209..060a87bdaf8b119d8d3f8cb34e4404cefc0af856 100644 --- a/src/endWeek/saDevotion.js +++ b/src/endWeek/saDevotion.js @@ -70,7 +70,7 @@ App.SlaveAssignment.devotion = (function() { */ function fuckdollDevotion(slave) { r.push(`${He} is confined in a suit that limits ${his} perception of the outside world to tonal commands from the suit itself and things that are inserted into ${his}`); - if (slave.vagina > -1) { + if (slave.vagina > -1) { r.push(`mouth, vagina,`); } else { r.push(`mouth`); @@ -83,7 +83,7 @@ App.SlaveAssignment.devotion = (function() { r.push(`${He} still hopes you'll ${him} out of ${his} suit so ${he} can be your good slave again, but <span class="trust dec">fear and doubt creep in</span> by the minute. And there are a lot of them.`); } else { r.push(`With little to do but`); - if (slave.fuckdoll <= 60) { + if (slave.fuckdoll <= 60) { r.push(`wonder if ${he}'s about to be used,`); } else { r.push(`desperately hope ${he}'ll be used soon,`); @@ -107,7 +107,7 @@ App.SlaveAssignment.devotion = (function() { * */ function hostageDevotion(slave) { - if (slave.origin === "You were acquainted with $him before you were an arcology owner; your rival tried to use $him to manipulate you, but you rescued $him." && slave.newGamePlus === 0 && V.rivalryFS !== "Slave Professionalism" && V.rivalryFS !== "Intellectual Dependency") { + if (slave.origin === "You were acquainted with $him before you were an arcology owner; your rival tried to use $him to manipulate you, but you rescued $him." && slave.newGamePlus === 0 && V.rivalryFS !== "Slave Professionalism" && V.rivalryFS !== "Intellectual Dependency") { if (V.rivalryDuration <= 10 || V.rivalryFS === "Racial Supremacism" || V.rivalryFS === "Paternalism") { r.push(`You <span class="trust inc">saved ${slave.slaveName} from a living nightmare</span> under your rival's rule. ${He} <span class="devotion inc">tries ${his} best to adapt to ${his} savior's wishes.</span>`); slave.devotion += 10; @@ -117,7 +117,7 @@ App.SlaveAssignment.devotion = (function() { slave.devotion += 5; slave.trust += 5; } else if (V.rivalryDuration > 20 && slave.devotion < 5) { - if (gettingPersonalAttention) { + if (gettingPersonalAttention) { r.push(`You took everything from ${slave.slaveName} and <span class="devotion dec">${he} hates you for it.</span> Since you won't give ${him} what ${he} wants, ${he} <span class="trust dec">refuses to trust you.</span> Since you are putting such a personal touch into ${his} care, ${he} can't find it in ${him} to rebel as strongly.`); slave.devotion -= 5; slave.trust -= 5; @@ -127,7 +127,7 @@ App.SlaveAssignment.devotion = (function() { slave.trust -= 25; } } else if (V.rivalryDuration > 10 && slave.devotion < 5) { - if (gettingPersonalAttention) { + if (gettingPersonalAttention) { r.push(`${He} is <span class="trust dec">horrified by you.</span> Your rival taught ${him} a great deal about slave life in your arcology and indulged ${his} deepest fantasies. ${slave.slaveName} considers being your pet <span class="devotion dec">a fate worse than death.</span> Since you are putting such a personal touch into ${his} care, maybe you aren't the monster ${he} thought you were. ${He} can't find it in ${him} to hate and fear you as much.`); slave.devotion -= 3; slave.trust -= 3; @@ -145,7 +145,7 @@ App.SlaveAssignment.devotion = (function() { * */ function playerPregnancyThoughts(slave) { - if (PC.preg >= 20 || (PC.preg >= 16 && PC.career === "escort")) { // switch to .belly + if (PC.preg >= 20 || (PC.preg >= 16 && PC.career === "escort")) { // switch to .belly if (slave.devotion > 60) { if (PC.pregMood === 2) { r.push(`${He} is devoted to you and does ${his} best to satisfy your demanding, hormone driven libido, no matter what you want from ${him}. ${His} efforts to give ${himself} you to <span class="devotion inc">further ${his} submission</span> to you.`); @@ -211,10 +211,10 @@ App.SlaveAssignment.devotion = (function() { } const effectiveInt = (slave.intelligence + slave.intelligenceImplant); if (effectiveInt > 95) { - if (gettingPersonalAttention) { + if (gettingPersonalAttention) { r.push(`${slave.slaveName}'s <span class="intelligent">brilliant mind</span> strongly resists slavery, but since you are giving ${him} personal attention you are able to compensate for ${his} genius.`); } else { - if (slave.trust < -20) { + if (slave.trust < -20) { r.push(`${slave.slaveName}'s <span class="intelligent">brilliant mind</span> strongly resists slavery, but ${he} fears you deeply enough that ${he} consciously forces ${himself} to obey out of self-preservation.`); } else { r.push(`${slave.slaveName}'s <span class="intelligent">brilliant mind</span> strongly <span class="devotion dec">resists</span> slavery and encourages ${him} to <span class="trust dec">fear you.</span>`); @@ -223,10 +223,10 @@ App.SlaveAssignment.devotion = (function() { } } } else if (effectiveInt > 50) { - if (gettingPersonalAttention) { + if (gettingPersonalAttention) { r.push(`${slave.slaveName}'s <span class="intelligent">highly acute mind</span> naturally resists slavery, but since you are giving ${him} personal attention you are able to compensate for ${his} intelligence.`); } else { - if (slave.trust < -20) { + if (slave.trust < -20) { r.push(`${slave.slaveName}'s <span class="intelligent">highly acute mind</span> naturally resists slavery, but ${he} fears you deeply enough that ${he} consciously forces ${himself} to obey out of self-preservation.`); } else { r.push(`${slave.slaveName}'s <span class="intelligent">highly acute mind</span> naturally <span class="devotion dec">resists</span> slavery and encourages ${him} to <span class="trust dec">fear you.</span>`); @@ -235,10 +235,10 @@ App.SlaveAssignment.devotion = (function() { } } } else if (effectiveInt > 15) { - if (gettingPersonalAttention) { + if (gettingPersonalAttention) { r.push(`${slave.slaveName}'s <span class="intelligent">intelligent mind</span> naturally resists slavery, but since you are giving ${him} personal attention you are able to compensate for ${his} cleverness.`); } else { - if (slave.trust < -20) { + if (slave.trust < -20) { r.push(`${slave.slaveName}'s <span class="intelligent">intelligent mind</span> naturally resists slavery, but ${he} fears you deeply enough that ${he} consciously forces ${himself} to obey out of self-preservation.`); } else { r.push(`${slave.slaveName}'s <span class="intelligent">intelligent mind</span> naturally <span class="devotion dec">resists</span> slavery.`); @@ -387,7 +387,7 @@ App.SlaveAssignment.devotion = (function() { r.push(`${His} retirement from sexual slavery into citizenship is on the horizon.`); if (slave.devotion > 95) { r.push(`Since ${he} loves you, ${he} has mixed feelings about the prospect, but ${he} prefers to think of it as your way of looking after ${him}. This`); - if (V.arcologies[0].FSPaternalist !== "unset") { + if (V.arcologies[0].FSPaternalist !== "unset") { r.push(`advances paternalistic ideals and <span class="reputation inc">improves your reputation.</span>`); FutureSocieties.Change("Paternalist", 2); } else { @@ -444,7 +444,7 @@ App.SlaveAssignment.devotion = (function() { } } else { r.push(`${He} knows that ${his} ultimate fate as a Fuckdoll is not far off.`); - if (slave.devotion > 95) { + if (slave.devotion > 95) { r.push(`Since ${he} loves you, ${he} tries not to think about it, though ${he} occasionally seems preoccupied.`); } else if (slave.devotion > 20) { r.push(`The prospect <span class="trust dec">scares ${him}.</span>`); @@ -727,7 +727,7 @@ App.SlaveAssignment.devotion = (function() { } } } - if (collectiveDevotionEffect === 1) { + if (collectiveDevotionEffect === 1) { if (collectiveTrustEffect === 1) { r.push(`Since ${he}'s ambivalent and fearful, the <span class="devotion inc">collective devotion</span> <span class="trust inc">and trust</span> of your slaves affect ${him} slightly.`); } else if (collectiveTrustEffect === 0) { @@ -753,9 +753,9 @@ App.SlaveAssignment.devotion = (function() { } if (assignmentVisible(slave)) { if (V.arcade !== 0 || (V.dairy !== 0 && V.dairyRestraintsSetting >= 2)) { - if (slave.devotion <= 95) { + if (slave.devotion <= 95) { r.push(`${He} knows about`); - if (V.arcade !== 0) { + if (V.arcade !== 0) { if (V.dairy !== 0 && V.dairyRestraintsSetting >= 2) { r.push(`${V.arcadeName} and ${V.dairyName},`); } else { @@ -880,7 +880,7 @@ App.SlaveAssignment.devotion = (function() { } // CAPS ON DEVOTION GAIN - if (slave.tankBaby === 1) { + if (slave.tankBaby === 1) { r.push(`The incubation facility conditioned ${his} mind for total subservience to ${his} owner; ${he} cannot resist ${his} progress.`); } else if (slave.tankBaby === 2) { r.push(`The incubation facility conditioned ${his} mind for total reverence of ${his} owner; ${he} cannot resist ${his} progress.`); @@ -896,8 +896,8 @@ App.SlaveAssignment.devotion = (function() { } } } else { - if (slave.devotion >= (slave.oldDevotion+5)) { - if (slave.behavioralFlaw === "arrogant") { + if (slave.devotion >= (slave.oldDevotion + 5)) { + if (slave.behavioralFlaw === "arrogant") { r.push(`Though ${he} made progress this week, <span class="devotion dec">it is limited by ${his} arrogance.</span>`); slave.devotion = (slave.oldDevotion + 5); } else if (slave.behavioralFlaw === "bitchy" && canTalk(slave)) { @@ -970,7 +970,7 @@ App.SlaveAssignment.devotion = (function() { slave.devotion = -100; } if (slave.trust > 100) { - if (slave.devotion < 100 && slave.devotion > 20) { + if (slave.devotion < 100 && slave.devotion > 20) { slave.devotion += Math.trunc(slave.trust - 100); } else if (slave.devotion < -50) { r.push(`${His} blatant disregard for your rule <span class="reputation dec">damages your reputation.</span>`); diff --git a/src/endWeek/saDiet.js b/src/endWeek/saDiet.js index a50a8e7157846134fb8b21b5b75e661f5c1eb4c3..cdff72b68a092fd147f73004a2b618a4c46e6c9c 100644 --- a/src/endWeek/saDiet.js +++ b/src/endWeek/saDiet.js @@ -54,7 +54,6 @@ App.SlaveAssignment.diet = (function() { } } - return r.join(" "); } @@ -150,9 +149,9 @@ App.SlaveAssignment.diet = (function() { if (slave.fetishKnown === 0) { r.push(`clearly <span class="fetish gain">obviously likes cum,</span>`); slave.fetishKnown = 1; - } else if (slave.fetishStrength < 20 ) { + } else if (slave.fetishStrength < 20) { r.push(`is developing a taste for cum,`); - } else if (slave.fetishStrength < 60 ) { + } else if (slave.fetishStrength < 60) { r.push(`is used to eating cum,`); } else { r.push(`loves eating cum,`); diff --git a/src/endWeek/saDrugs.js b/src/endWeek/saDrugs.js index c6081130168b2b1a933d0d04ec6babefc57001f0..0dbabbd97e390bc3319705312cba96c01c308a21 100644 --- a/src/endWeek/saDrugs.js +++ b/src/endWeek/saDrugs.js @@ -52,7 +52,6 @@ App.SlaveAssignment.drugs = (function() { return r; } - /** * @param {App.Entity.SlaveState} slave * @@ -80,7 +79,7 @@ App.SlaveAssignment.drugs = (function() { healthDamage(slave, 5); if (slave.dick >= 7) { r += ` The amount of blood needed to keep ${his} oversized cock hard has <span class="health dec">severe effects on ${his} health!</span>`; - healthDamage(slave, slave.dick*5); + healthDamage(slave, slave.dick * 5); } } break; @@ -1187,7 +1186,7 @@ App.SlaveAssignment.drugs = (function() { } else if (jsRandom(1, 100) > 110 - (slave.vagina * 10) && slave.geneMods.rapidCellGrowth !== 1) { r += ` The steroids ${he}'s on have an effect on ${his} vaginal muscles, giving ${him} a <span class="lime">tighter pussy.</span>`; slave.vagina -= 1; - } else if (slave.face-slave.faceImplant > 10 && jsRandom(1, 100) > 95) { + } else if (slave.face - slave.faceImplant > 10 && jsRandom(1, 100) > 95) { r += ` The gear ${he}'s on <span class="orange">hardens ${his} pretty face a little.</span>`; slave.face -= 5; } @@ -1678,7 +1677,7 @@ App.SlaveAssignment.drugs = (function() { healthDamage(slave, 20); induce(slave); V.birthee = 1; - r += ` ${He} has been ready to give birth for some time now. Suppressing birth for so long <span class="health dec">greatly affects ${his} health.</span> ${He} may <span class="health dec">have trouble</span> giving birth to ${his} oversized ${(slave.pregType === 1) ? `child`:`children`}. ${He} seems to be in distress, ${his} body is <span class="health dec">forcing ${his} ${(slave.pregType === 1) ? `child`:`children`} out!</span>`; + r += ` ${He} has been ready to give birth for some time now. Suppressing birth for so long <span class="health dec">greatly affects ${his} health.</span> ${He} may <span class="health dec">have trouble</span> giving birth to ${his} oversized ${(slave.pregType === 1) ? `child` : `children`}. ${He} seems to be in distress, ${his} body is <span class="health dec">forcing ${his} ${(slave.pregType === 1) ? `child` : `children`} out!</span>`; } else if (WombBirthReady(slave, slave.pregData.normalBirth * 1.25) > 0) { healthDamage(slave, 20); r += ` ${He} has been ready to give birth for some time now. Suppressing birth for so long <span class="health dec">greatly affects ${his} health.</span> ${He} may <span class="health dec">have trouble</span> giving birth to ${his} oversized ${(slave.pregType === 1) ? `child` : `children`}. `; @@ -1765,7 +1764,7 @@ App.SlaveAssignment.drugs = (function() { * */ function healthAndWellness(slave) { - slave.chem = Math.clamp(slave.chem-0.5, 0, 1000); + slave.chem = Math.clamp(slave.chem - 0.5, 0, 1000); // illness if (slave.curatives < 2 && slave.inflationType !== "curative" && slave.assignment !== Job.SPA && slave.assignment !== Job.REST && slave.assignment !== Job.CLINIC) { if (slave.health.illness > 0) { diff --git a/src/endWeek/saGetMilked.js b/src/endWeek/saGetMilked.js index 78c7aab4898b4800dd973e10d55540badf64c510..7ae4fc0e5b406ded47faed735663e0f28c7f7b76 100644 --- a/src/endWeek/saGetMilked.js +++ b/src/endWeek/saGetMilked.js @@ -47,7 +47,7 @@ App.SlaveAssignment.getMilked = (function() { * @param {boolean} [preview=false] are we trying to preview milking income, or may we make changes to the slave? * @returns {MilkingResults} */ - function saGetMilked(slave, multiplier=1.0, preview=false) { + function saGetMilked(slave, multiplier = 1.0, preview = false) { arcology = V.arcologies[0]; r = new MilkingResults(); vignetteCash = 0; @@ -653,7 +653,7 @@ App.SlaveAssignment.getMilked = (function() { r.fluidSale = (r.fluid * jsRandom(40, 50)); r.text += ` ${capFirstChar(numberWithPluralOne(r.fluid, "deciliter"))} of uncommon ejaculate is gathered during ${his} milkings.`; if (arcology.FSPastoralist !== "unset" && arcology.FSPastoralist > 30) { - r.fluidSale = (Math.trunc(r.fluidSale*(1 + (arcology.FSPastoralist - 30) / 140))); /* fully accepted pastoralism gives +50% on the price*/ + r.fluidSale = (Math.trunc(r.fluidSale * (1 + (arcology.FSPastoralist - 30) / 140))); /* fully accepted pastoralism gives +50% on the price*/ r.text += ` Because of your arcology's cultural preferences, it comes with extra value.`; } r.text += ` It is sold for <span class="cash inc">${cashFormat(r.fluidSale)}.</span>`; @@ -834,7 +834,7 @@ App.SlaveAssignment.getMilked = (function() { } else { r.text += `an incident without lasting effect.`; } - slave.devotion += (1 * vignette.effect); + slave.devotion += vignette.effect; } else if (vignette.type === "trust") { if (vignette.effect > 0) { if (slave.trust > 20) { @@ -855,7 +855,7 @@ App.SlaveAssignment.getMilked = (function() { } else { r.text += `an incident without lasting effect.`; } - slave.trust += (1 * vignette.effect); + slave.trust += vignette.effect; } else if (vignette.type === "health") { if (vignette.effect > 0) { r.text += `<span class="health inc">improving ${his} health.</span>`; diff --git a/src/endWeek/saLongTermEffects.js b/src/endWeek/saLongTermEffects.js index e47ce1a0fc976ed8d8dae749b52f811475ceb9ce..f6af3c8f8ed155598b9097d81e1bb44bf3a988d8 100644 --- a/src/endWeek/saLongTermEffects.js +++ b/src/endWeek/saLongTermEffects.js @@ -2446,8 +2446,8 @@ App.SlaveAssignment.longTermEffects = (function() { r.push(`It appears ${he} was more attached to ${his} baby bump than ${he} let on and is hurting even more for it.`); } const fetishModifier = slave.fetishStrength / 2; - slave.devotion -= 1 * fetishModifier; - slave.trust -= 1 * fetishModifier; + slave.devotion -= fetishModifier; + slave.trust -= fetishModifier; } else if (slave.devotion <= 20) { r.push(`${He} is <span class="devotion dec">consumed by enduring sorrow</span> and <span class="trust dec">horror.</span> Even though ${he} knew ${his}`); if (slave.pregType > 1) { diff --git a/src/endWeek/saLongTermMentalEffects.js b/src/endWeek/saLongTermMentalEffects.js index 5a8383c56b1e4bbff85114b97b96e51fc42d3d22..f5abed09c27c70fbbe0f482319fce3a40ccaaaa6 100644 --- a/src/endWeek/saLongTermMentalEffects.js +++ b/src/endWeek/saLongTermMentalEffects.js @@ -942,15 +942,15 @@ App.SlaveAssignment.longTermMentalEffects = (function() { if (slave.devotion <= 20) { if (slave.trust < -20) { r.push(`${He} is inwardly <span class="trust dec">terrified</span> by living in what ${he} sees as a powerful theocratic society inimical to ${his} old world faith.`); - slave.trust -= 1 * Math.trunc(V.arcologies[0].FSChattelReligionist / 25); + slave.trust -= Math.trunc(V.arcologies[0].FSChattelReligionist / 25); } else { r.push(`${He} is filled with <span class="devotion dec">hatred and disgust</span> by Chattel Religionism, which ${he} believes to be heretical and wrong.`); - slave.devotion -= 1 * Math.trunc(V.arcologies[0].FSChattelReligionist / 35); + slave.devotion -= Math.trunc(V.arcologies[0].FSChattelReligionist / 35); } } else if (slave.devotion <= 50) { if (slave.trust > 20) { r.push(`${He} is experiencing considerable spiritual anguish as ${he} is torn between obedience and conviction that Chattel Religionism is heretical and wrong. This <span class="trust dec">hinders ${his} acceptance of ${his} place</span> in slave society.`); - slave.trust -= 1 * Math.trunc(V.arcologies[0].FSChattelReligionist / 25); + slave.trust -= Math.trunc(V.arcologies[0].FSChattelReligionist / 25); } else { r.push(`${He} is badly torn between Chattel Religionism and ${his} old world faith, but ${he} is doing ${his} best to defer these spiritual issues for now.`); } diff --git a/src/endWeek/saRecruitGirls.js b/src/endWeek/saRecruitGirls.js index 74a91e991f7b0198ce21db44ed3b28490c846000..182e9eae15ce930e516a7af27ada3da43fa4d597 100644 --- a/src/endWeek/saRecruitGirls.js +++ b/src/endWeek/saRecruitGirls.js @@ -842,7 +842,7 @@ App.SlaveAssignment.recruitGirls = (function() { const clubSlaves = App.Utils.sortedEmployees(App.Entity.facilities.club); if (V.clubUpgradePDAs === 1 && clubSlaves.length > 0) { r.push(`The slaves in ${V.clubName} help ${him} by passing ${him} tips they pick up while working the crowds.`); - clubSlaves.forEach((s) => V.recruiterProgress += 0.5); + clubSlaves.forEach(() => V.recruiterProgress += 0.5); } if (V.recruiterTarget === "desperate whores") { @@ -1149,7 +1149,7 @@ App.SlaveAssignment.recruitGirls = (function() { } seed += 1; FSdefend++; - arcology.FSDegradationist += 0.01 * V.FSSingleSlaveRep*FSIntMod; + arcology.FSDegradationist += 0.01 * V.FSSingleSlaveRep * FSIntMod; } else { if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) { pushFS(`Just the sight of ${slave.slaveName}'s provocatively decorated body entices ${his} online "friends" to share multiple scenarios for raping ${him}, although the honor is wasted on the dumb fucktoy.`); @@ -1202,7 +1202,7 @@ App.SlaveAssignment.recruitGirls = (function() { } seed += 2; FSdefend++; - arcology.FSSlaveProfessionalism += 0.01 * V.FSSingleSlaveRep*FSIntMod; + arcology.FSSlaveProfessionalism += 0.01 * V.FSSingleSlaveRep * FSIntMod; } else if (slave.skill.entertainment + slave.skill.whoring + slave.skill.oral + slave.skill.anal + slave.skill.vaginal >= 400) { pushFS(`${He} participates in a weekly article showcasing skills every slave needs. However, only being able to recite learned information limits ${him}.`); seed += 1; diff --git a/src/endWeek/saRelationships.js b/src/endWeek/saRelationships.js index ec6dcb0bd3fd5a47af549a662644d2fb446b490c..a2cdf131945dbedafa96eaf52a6c21f4a31f37ce 100644 --- a/src/endWeek/saRelationships.js +++ b/src/endWeek/saRelationships.js @@ -438,7 +438,7 @@ App.SlaveAssignment.relationships = (function() { break; default: r.push(`Being your ${wife} is wasted on ${his} empty mind. If it weren't for the ring`); - if (hasAnyArms(slave)) { + if (hasAnyArms(slave)) { r.push(`around ${his} finger,`); } else { r.push(`hanging from ${his} neck,`); @@ -559,7 +559,7 @@ App.SlaveAssignment.relationships = (function() { r.push(`${friend.slaveName} knows ${slave.slaveName} isn't allowed to be in a relationship with ${him2}, but keeps seeing ${him} anyway.`); } else { r.push(`Since the rules forbid the relationship between ${slave.slaveName} and ${friend.slaveName}, they are <span class="relationship dec">forced apart.</span>`); - if (slave.relationship > 1) { + if (slave.relationship > 1) { slave.relationship--; friend.relationship = slave.relationship; } else { @@ -638,7 +638,7 @@ App.SlaveAssignment.relationships = (function() { r.push(`They build on their family relationship and become <span class="relationship">best friends.</span>`); slave.relationship++; friend.relationship = slave.relationship; - } else if (mutualChildren(slave, friend, V.slaves) > 0 && (random(1, 100) < (50+ (10 * mutualChildren(slave, friend, V.slaves))))) { + } else if (mutualChildren(slave, friend, V.slaves) > 0 && (random(1, 100) < (50 + (10 * mutualChildren(slave, friend, V.slaves))))) { r.push(`Hoping to benefit their mutual children, they draw closer together, becoming <span class="relationship">best friends.</span>`); slave.relationship++; friend.relationship = slave.relationship; @@ -662,7 +662,7 @@ App.SlaveAssignment.relationships = (function() { break; case 2: // BFFs; r.push(`maintains a close friendship with ${friend.slaveName}.`); - if (slave.sexualQuirk === "romantic") { + if (slave.sexualQuirk === "romantic") { r.push(`${His} romantic bent drives ${him} to search for a regular sexual partner.`); seed = 10; } @@ -694,7 +694,7 @@ App.SlaveAssignment.relationships = (function() { r.push(`Having already had kids together, their relationship turns sexual once again, turning them into <span class="relationship">friends with benefits.</span>`); slave.relationship++; friend.relationship = slave.relationship; - } else if (V.seeIncest === 1 && slave.energy > 95 && areRelated(slave, friend) && random(1, 100) > (90-seed)) { + } else if (V.seeIncest === 1 && slave.energy > 95 && areRelated(slave, friend) && random(1, 100) > (90 - seed)) { r.push(`Driven by nymphomania to attempt to have sex with everyone, ${slave.slaveName} successfully seduces ${his} ${relativeTerm(slave, friend)}, ${friend.slaveName}, making them <span class="relationship">friends with benefits.</span>`); slave.relationship++; friend.relationship = slave.relationship; @@ -738,7 +738,7 @@ App.SlaveAssignment.relationships = (function() { break; case 3: // FWB r.push(`keeps up a sexual friendship with ${friend.slaveName}.`); - if (slave.sexualQuirk === "romantic") { + if (slave.sexualQuirk === "romantic") { r.push(`${His} romantic bent drives ${him} to do ${his} best to advance ${his} relationship to an emotional level.`); seed = 10; } @@ -756,7 +756,7 @@ App.SlaveAssignment.relationships = (function() { friend.relationship = slave.relationship; } else if (mutualChildren(slave, friend, V.slaves) > 0 && random(1, 100) < (50 + (10 * mutualChildren(slave, friend, V.slaves)) + seed)) { r.push(`Between their children and common sexual flings, they begin seeing each other as a traditional couple. Their relationship becomes <span class="relationship">strongly emotional</span> as well as physical.`); - if (slave.pregSource === friend.ID && friend.pregSource === slave.ID && slave.pregKnown === 1 && friend.pregKnown === 1) { + if (slave.pregSource === friend.ID && friend.pregSource === slave.ID && slave.pregKnown === 1 && friend.pregKnown === 1) { r.push(`Not very surprising, since they both have the other's child growing in their womb.`); } else if (slave.pregSource === friend.ID && slave.pregKnown === 1) { r.push(`Not very surprising, since ${slave.slaveName} is carrying another of ${friend.slaveName}'s children.`); @@ -788,7 +788,7 @@ App.SlaveAssignment.relationships = (function() { break; default: // married r.push(`has a slave ${wife2}, ${friend.slaveName}.`); - if (V.arcologies[0].FSChattelReligionist !== "unset") { + if (V.arcologies[0].FSChattelReligionist !== "unset") { r.push(`Society <span class="reputation inc">approves</span> of their marriage, which advances the slave sacrament.`); V.arcologies[0].FSChattelReligionist += 0.05 * V.FSSingleSlaveRep; repX(V.FSSingleSlaveRep * (V.arcologies[0].FSChattelReligionist / V.FSLockinLevel), "SlaveRelationships", slave); @@ -845,7 +845,7 @@ App.SlaveAssignment.relationships = (function() { slave.devotion += slave.relationship; } else { r.push(`<span class="trust inc">trusts you</span>`); - if (slave.relationship <= 2) { + if (slave.relationship <= 2) { r.push(`a little more for allowing ${him} to have a friend.`); } else if (slave.relationship === 3) { r.push(`for letting ${him} have a fuckbuddy.`); diff --git a/src/endWeek/saRest.js b/src/endWeek/saRest.js index 9b7dcbd1e93b3f4be7e6753b35e6ad6711adcb40..1e3846d7c94279736061b11877a8a6066519c2ed 100644 --- a/src/endWeek/saRest.js +++ b/src/endWeek/saRest.js @@ -5,7 +5,7 @@ App.SlaveAssignment.rest = function(slave) { /* eslint-disable no-unused-vars*/ const { - he, him, his, hers, himself, boy, + he, him, his, He, His } = getPronouns(slave); /* eslint-enable */ @@ -130,7 +130,7 @@ App.SlaveAssignment.rest = function(slave) { } else { t += `an incident without lasting effect.`; } - slave.devotion += (1 * vignette.effect); + slave.devotion += vignette.effect; } else if (vignette.type === "trust") { if (vignette.effect > 0) { if (slave.trust > 20) { @@ -151,7 +151,7 @@ App.SlaveAssignment.rest = function(slave) { } else { t += `an incident without lasting effect.`; } - slave.trust += (1 * vignette.effect); + slave.trust += vignette.effect; } else if (vignette.type === "health") { if (vignette.effect > 0) { t += `<span class="health inc">improving ${his} health.</span>`; diff --git a/src/endWeek/saRewardAndPunishment.js b/src/endWeek/saRewardAndPunishment.js index 79978e8ffe7c475501847fbb6949c173dbd0d7f2..4b9ec7faf3441b23de0b03f150bd3eddf983a4f4 100644 --- a/src/endWeek/saRewardAndPunishment.js +++ b/src/endWeek/saRewardAndPunishment.js @@ -42,7 +42,7 @@ App.SlaveAssignment.rewardAndPunishment = (function() { roomActivity = ` with the softest cow available`; } else if (slave.assignment === Job.FARMER && App.Entity.facilities.farmyard.employeesIDs().size > 0) { roomActivity = ` with the softest cow available`; // FIXME: needs improvement - } else if (canSee(slave) && (slave.intelligence+slave.intelligenceImplant > 50)) { + } else if (canSee(slave) && (slave.intelligence + slave.intelligenceImplant > 50)) { roomActivity = ` reading books`; } else if (canSee(slave) && canHear(slave)) { roomActivity = ` watching television`; @@ -72,7 +72,7 @@ App.SlaveAssignment.rewardAndPunishment = (function() { r.push(`${His} patrons don't complain either.`); } healthDamage(slave, rewards); - slave.devotion += rewards*2; + slave.devotion += rewards * 2; return r; }, @@ -101,7 +101,7 @@ App.SlaveAssignment.rewardAndPunishment = (function() { if (slave.energy < 98) { slave.energy += rewards; } - slave.need -= (rewards*10); + slave.need -= (rewards * 10); slave.devotion += rewards; return r; }, @@ -151,7 +151,7 @@ App.SlaveAssignment.rewardAndPunishment = (function() { } r.push(`<span class="gold">whipped,</span> not hard enough to mark ${him}${slave.assignment === Job.CLINIC ? `or complicate ${his} stay` : ``}, but hard enough to <span class="health dec">hurt,</span> breaking ${him} quickly.`); healthDamage(slave, punishments); - slave.trust -= 2*punishments; + slave.trust -= 2 * punishments; return r; }, @@ -175,7 +175,7 @@ App.SlaveAssignment.rewardAndPunishment = (function() { } r.push(`<span class="libido dec">reducing ${his} libido</span> but breaking ${him} to <span class="hotpink">sexual obedience.</span>`); if (slave.energy > 2) { - slave.energy -= 2*punishments; + slave.energy -= 2 * punishments; } slave.devotion += punishments; slave.trust -= punishments; diff --git a/src/endWeek/saRivalries.js b/src/endWeek/saRivalries.js index a3aaf8c05152cac8da42ebba621a92be5758ca20..2c665042b94ac128249c9ae3f0aa74f2d67d2a52 100644 --- a/src/endWeek/saRivalries.js +++ b/src/endWeek/saRivalries.js @@ -61,7 +61,7 @@ App.SlaveAssignment.rivalries = (function() { if (foundRival !== 1 && slave.behavioralFlaw !== "none") { switch (slave.behavioralFlaw) { case "arrogant": - if (potentialRival.intelligence > slave.intelligence+slave.intelligenceImplant) { + if (potentialRival.intelligence > slave.intelligence + slave.intelligenceImplant) { r.push(`${slave.slaveName} is an arrogant bitch, and ${SlaveFullName(potentialRival)} is authentically smarter than ${he} is, which of course ${he} cannot stand. <span class="rivalry inc">They start to dislike each other.</span>`); foundRival = 1; } @@ -80,7 +80,7 @@ App.SlaveAssignment.rivalries = (function() { break; case "hates men": if (potentialRival.attrXX > 35) { - if (potentialRival.faceShape === "masculine" || potentialRival.faceShape === "androgynous" ) { + if (potentialRival.faceShape === "masculine" || potentialRival.faceShape === "androgynous") { if (potentialRival.muscles > 10) { if (potentialRival.vagina > -1) { r.push(`${slave.slaveName} hates men, and poor butch ${SlaveFullName(potentialRival)} really gets to ${him}, despite having a pussy and everything. <span class="rivalry inc">They start to dislike each other.</span>`); @@ -256,7 +256,7 @@ App.SlaveAssignment.rivalries = (function() { slave.need = 0; slave.devotion += 3; rival.devotion -= 3; - if (slave.rivalry < 3) { + if (slave.rivalry < 3) { r.push(`Of course, this <span class="rivalry inc">worsens their rivalry.</span>`); increase(slave, rival); } diff --git a/src/endWeek/saServant.js b/src/endWeek/saServant.js index 9b4d6a1ecd02bb545797895927f4480e8ab8000a..f46bdcad9ca79540578c06dab4ef7d7060c7e9ea 100644 --- a/src/endWeek/saServant.js +++ b/src/endWeek/saServant.js @@ -17,7 +17,7 @@ App.SlaveAssignment.servant = (function() { * @param {number} [bonus=0] - bonus from facility leader effects * @returns {string} */ - function saServant(slave, bonus=0) { + function saServant(slave, bonus = 0) { r = []; stewardessBonus = bonus; @@ -330,7 +330,7 @@ App.SlaveAssignment.servant = (function() { } else { r.push(`an incident without lasting effect.`); } - slave.devotion += (1 * vignette.effect); + slave.devotion += vignette.effect; } else if (vignette.type === "trust") { if (vignette.effect > 0) { if (slave.trust > 20) { @@ -351,7 +351,7 @@ App.SlaveAssignment.servant = (function() { } else { r.push(`an incident without lasting effect.`); } - slave.trust += (1 * vignette.effect); + slave.trust += vignette.effect; } else if (vignette.type === "health") { if (vignette.effect > 0) { r.push(`<span class="health inc">improving ${his} health.</span>`); diff --git a/src/endWeek/saServeThePublic.js b/src/endWeek/saServeThePublic.js index 149be8fd13ee257dd1e1da5eba062758a30ab11c..e4497d6bdb75ad1ed50410120f8df4f6d7caee5d 100644 --- a/src/endWeek/saServeThePublic.js +++ b/src/endWeek/saServeThePublic.js @@ -90,7 +90,6 @@ App.SlaveAssignment.serveThePublic = (function() { r += ` the public.`; } - /** * @param {App.Entity.SlaveState} slave * @@ -1498,7 +1497,7 @@ App.SlaveAssignment.serveThePublic = (function() { } else { r += `an incident without lasting effect.`; } - slave.devotion += (1 * vignette.effect); + slave.devotion += vignette.effect; } else if (vignette.type === "trust") { if (vignette.effect > 0) { if (slave.trust > 20) { @@ -1519,7 +1518,7 @@ App.SlaveAssignment.serveThePublic = (function() { } else { r += `an incident without lasting effect.`; } - slave.trust += (1 * vignette.effect); + slave.trust += vignette.effect; } else if (vignette.type === "health") { if (vignette.effect > 0) { r += `<span class="health inc">improving ${his} health.</span>`; diff --git a/src/endWeek/saSocialEffects.js b/src/endWeek/saSocialEffects.js index be05b5c49d2cfa24f35c26a8abf9682ca27a167f..3a3269591290daf1c3e089498b9bad68242cb806 100644 --- a/src/endWeek/saSocialEffects.js +++ b/src/endWeek/saSocialEffects.js @@ -12,7 +12,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { * @param {string} longDesc for expanded mode (HTML string) * @param {boolean} [creditFacility=false] true if the effect is only due to the facility she's assigned to */ - function SocialEffect(FS, magnitude, shortDesc, longDesc, creditFacility=false) { + function SocialEffect(FS, magnitude, shortDesc, longDesc, creditFacility = false) { this.FS = FS; this.magnitude = magnitude; this.shortDesc = shortDesc; @@ -30,7 +30,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { if (slave.race === V.arcologies[0].FSSupremacistRace) { if ([Job.ARCADE, Job.PUBLIC, Job.CLUB, Job.WHORE, Job.GLORYHOLE, Job.BROTHEL].includes(slave.assignment)) { t.push(new SocialEffect("Supremacist", -1, "Degrading job for race", - `Society <span class="red">${V.arcologies[0].FSSupremacist >= V.FSLockinLevel*0.6 ? "strongly " : ''}disapproves</span> of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race in a degrading, public role; this also holds back acceptance of ${V.arcologies[0].FSSupremacistRace} superiority.`, true)); + `Society <span class="red">${V.arcologies[0].FSSupremacist >= V.FSLockinLevel * 0.6 ? "strongly " : ''}disapproves</span> of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race in a degrading, public role; this also holds back acceptance of ${V.arcologies[0].FSSupremacistRace} superiority.`, true)); } else if (slave.assignment === Job.HEADGIRL) { t.push(new SocialEffect("Supremacist", 2, "Headgirl race", `Society <span class="green">strongly approves</span> of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race in a position of leadership as your Head Girl, advancing the notion that those of the ${V.arcologies[0].FSSupremacistRace} race should be in positions of authority over others.`)); @@ -114,13 +114,13 @@ App.SlaveAssignment.saSocialEffects = function(slave) { t.push(new SocialEffect("Youth Preferentialist", 2, "NCS Youthening", `Society <span class="green">strongly approves</span> of you keeping ${slave.slaveName} forever young and youthening; this furthers the fashion for young slaves.`)); } else if (slave.visualAge < 30) { - const youthRepChange = ((30-slave.visualAge)/5); + const youthRepChange = ((30 - slave.visualAge) / 5); t.push(new SocialEffect("Youth Preferentialist", youthRepChange, "Young-looking slave", `Society <span class="green">approves</span> of ${slave.slaveName}'s youthful body; ${he} furthers the fashion for young slaves.`)); } } else if (V.arcologies[0].FSMaturityPreferentialist !== "unset") { if (slave.visualAge >= 30) { - const matureRepChange = ((slave.visualAge-25)/5); + const matureRepChange = ((slave.visualAge - 25) / 5); t.push(new SocialEffect("Maturity Preferentialist", matureRepChange, "Mature-looking slave", `Society <span class="green">approves</span> of ${slave.slaveName}'s mature body; ${he} furthers the fashion for older ladies.`)); } @@ -145,7 +145,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { } if (V.arcologies[0].FSGenderRadicalist !== "unset") { - if ((slave.balls > 0) && (slave.pubertyXY === 0) && (slave.physicalAge >= V.potencyAge)) { + if ((slave.balls > 0) && (slave.pubertyXY === 0) && (slave.physicalAge >= V.potencyAge)) { t.push(new SocialEffect("Gender Radicalist", 2, "Avoiding male puberty", `Society <span class="green">approves</span> of you keeping ${slave.slaveName} from going through puberty; this advances public interest in ${girl}s with soft little dicks.`)); } else if ((slave.balls > 0) && (slave.dick > 0) && (slave.hormoneBalance >= 100)) { @@ -162,10 +162,10 @@ App.SlaveAssignment.saSocialEffects = function(slave) { if (V.arcologies[0].FSRestart === "unset") { if (slave.bellyPreg >= 1500) { t.push(new SocialEffect("Gender Fundamentalist", 1, "Pregnant", - `Society <span class="green">${V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel*0.5 ? "strongly " : ""}approves</span> of your keeping a pregnant slave; this also supports the idea that slave women should bear babies.`)); + `Society <span class="green">${V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel * 0.5 ? "strongly " : ""}approves</span> of your keeping a pregnant slave; this also supports the idea that slave women should bear babies.`)); } else if ((slave.preg === 0) && isFertile(slave)) { t.push(new SocialEffect("Gender Fundamentalist", 1, "Fertile", - `Society <span class="green">${V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel*0.5 ? "strongly " : ""}approves</span> of your keeping a slave fertile; this also supports the idea that slave women should bear babies.`)); + `Society <span class="green">${V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel * 0.5 ? "strongly " : ""}approves</span> of your keeping a slave fertile; this also supports the idea that slave women should bear babies.`)); } } else { if (slave.hips > slave.shoulders) { @@ -194,7 +194,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { } if (V.arcologies[0].FSRepopulationFocus !== "unset") { - if (slave.preg > slave.pregData.normalBirth/1.33) { + if (slave.preg > slave.pregData.normalBirth / 1.33) { if (slave.pregType >= 20) { t.push(new SocialEffect("Repopulationist", 5, "Broodmother", `Society is <span class="green">very pleased</span> at ${slave.slaveName}'s dedication to pregnancy.`)); @@ -305,7 +305,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { } } } else { - if (slave.preg > slave.pregData.normalBirth/1.33) { + if (slave.preg > slave.pregData.normalBirth / 1.33) { if (slave.pregType >= 10) { t.push(new SocialEffect("Eugenics", -10, "Broodmother carrying unapproved babies", `Society is <span class="red">furious</span> at ${slave.slaveName}'s infested womb.`)); @@ -380,7 +380,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { t.push(new SocialEffect("Paternalist", 1, "Healthy", `Society <span class="green">approves</span> of ${his} shining health; this advances belief in a slaveowner's duty.`)); } - if (slave.devotion+slave.trust > 180) { + if (slave.devotion + slave.trust > 180) { if (slave.relationship === -3) { t.push(new SocialEffect("Paternalist", 5, `Happy slave ${wife}`, `Society <span class="green">approves very strongly</span> of ${his} happiness as your ${wife}; this advances paternalistic ideals.`)); @@ -488,9 +488,8 @@ App.SlaveAssignment.saSocialEffects = function(slave) { let hasScar = 0; for (const scarPlace in slave.scar) { for (const scarType in slave.scar[scarPlace]) { - if (scarType === "exotic") { - continue; // exotic scars don't count - } else { + // exotic scars don't count + if (scarType !== "exotic") { if (V.arcologies[0].FSDegradationist !== "unset") { t.push(new SocialEffect("Degradationist", 1, `Scarred`, `Society <span class="green">mildly approves</span> of your slave's scarring; this encourages the further abuse of slaves.`)); @@ -515,13 +514,13 @@ App.SlaveAssignment.saSocialEffects = function(slave) { `Society <span class="green">is delighted</span> by ${slave.slaveName}'s perfect bimbo appearance.`)); } } - if (slave.intelligence+slave.intelligenceImplant < -10) { + if (slave.intelligence + slave.intelligenceImplant < -10) { t.push(new SocialEffect("Intellectual Dependency", 1, `Dimwitted`, `Society <span class="green">approves</span> of ${slave.slaveName}'s dimwitted mind; this supports the idea that slaves should be entirely dependent on their owner.`)); } else if ([Job.HEADGIRL, Job.ATTENDANT, Job.FARMER, Job.MADAM, Job.MATRON, Job.NURSE, Job.TEACHER, Job.STEWARD, Job.BODYGUARD].includes(slave.assignment)) { t.push(new SocialEffect("Intellectual Dependency", 0, `Intelligence required by job`, `Society understands the value of intelligence in ${his} appointed position and is willing to overlook it.`)); - } else if ((slave.intelligence+slave.intelligenceImplant > 10)) { + } else if ((slave.intelligence + slave.intelligenceImplant > 10)) { t.push(new SocialEffect("Intellectual Dependency", -1, `Too smart`, `Society <span class="red">disapproves</span> of ${slave.slaveName}'s sharp mind; this holds back acceptance of the idea that slaves should be dumb and dependent.`)); } @@ -533,7 +532,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { `Society <span class="red">disapproves</span> of ${slave.slaveName}'s restrained libido; to the public, this gives ${him} too much freedom to focus on things other than sex.`)); } } else if (V.arcologies[0].FSSlaveProfessionalism !== "unset") { - if (slave.intelligence+slave.intelligenceImplant > 95) { + if (slave.intelligence + slave.intelligenceImplant > 95) { t.push(new SocialEffect("Slave Professionalism", 1, `Brilliant`, `Society <span class="green">strongly approves</span> of ${slave.slaveName}'s brilliance; ${his} sharp wit is the foundation of slave perfectionism.`)); } else if (slave.intelligenceImplant >= 30) { @@ -606,7 +605,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { `Society <span class="green">approves</span> of ${slave.slaveName}'s thoroughly modified body; this supports the fashion for surgically upgraded slaves.`)); transformed++; } - if ((slave.lipsImplant/slave.lips >= .50) || (slave.buttImplant/slave.butt >= .50 && slave.butt >= 6) || (slave.buttImplant/slave.butt >= .25 && slave.butt >= 3) || (slave.boobsImplant/slave.boobs >= .75 && slave.boobs >= 10000) || (slave.boobsImplant/slave.boobs >= .50 && slave.boobs >= 2000) || (slave.boobsImplant/slave.boobs >= .25 && slave.boobs >= 1000) || (slave.boobsImplant/slave.boobs >= .10 && slave.boobs >= 400)) { + if ((slave.lipsImplant / slave.lips >= .50) || (slave.buttImplant / slave.butt >= .50 && slave.butt >= 6) || (slave.buttImplant / slave.butt >= .25 && slave.butt >= 3) || (slave.boobsImplant / slave.boobs >= .75 && slave.boobs >= 10000) || (slave.boobsImplant / slave.boobs >= .50 && slave.boobs >= 2000) || (slave.boobsImplant / slave.boobs >= .25 && slave.boobs >= 1000) || (slave.boobsImplant / slave.boobs >= .10 && slave.boobs >= 400)) { t.push(new SocialEffect("Transformation Fetishist", 1, `Big implants`, `Society <span class="green">approves</span> of ${his} obvious implants.`)); transformed++; @@ -712,7 +711,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { assets++; } if (slave.dick > 8) { - t.push(new SocialEffect("Asset Expansionist", Math.ceil(slave.dick/10), `Massive member`, + t.push(new SocialEffect("Asset Expansionist", Math.ceil(slave.dick / 10), `Massive member`, `Society <span class="green">approves</span> of ${his} massive member, which might be nonfunctional, but is a wonder of expansionism.`)); assets++; } else if (slave.dick >= 6) { @@ -975,7 +974,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { if (V.FSAnnounced > 0) { if (V.studio === 1) { if (slave.porn.viewerCount > 0) { - slave.pornFameBonus += (Math.ceil(slave.porn.viewerCount/100000)); + slave.pornFameBonus += (Math.ceil(slave.porn.viewerCount / 100000)); if (slave.porn.viewerCount >= 100000) { frag.append(`${His} near-ubiquitous presence in arcology pornography greatly increases ${his} impact on society. `); } else if ((slave.porn.viewerCount >= 10000)) { diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js index e019cacd79360b45642e4f8308021805615e597e..5581ef6bdd135c5335041e1a007d4ca349cc63de 100644 --- a/src/endWeek/saStayConfined.js +++ b/src/endWeek/saStayConfined.js @@ -11,8 +11,7 @@ App.SlaveAssignment.stayConfined = function(slave) { /* eslint-disable no-unused-vars*/ const { - he, him, his, hers, himself, boy, - He, His + he, him, his, He, His } = getPronouns(slave); /* eslint-enable */ diff --git a/src/endWeek/saWorkAGloryHole.js b/src/endWeek/saWorkAGloryHole.js index 56e2731edf69ec034659ac8a013fabb25f01db42..16e1bc0cf32481fca023b57ff5e26a5be32f5a4e 100644 --- a/src/endWeek/saWorkAGloryHole.js +++ b/src/endWeek/saWorkAGloryHole.js @@ -65,7 +65,7 @@ App.SlaveAssignment.workAGloryHole = (function() { } else { r += `set out for use.`; } - r += ` ${beauty} customers (${Math.trunc(beauty/7)} a day) `; + r += ` ${beauty} customers (${Math.trunc(beauty / 7)} a day) `; if (V.policies.publicFuckdolls === 1) { r += `enjoyed ${his} holes free of charge thanks to your gracious policies.`; } else { @@ -425,7 +425,7 @@ App.SlaveAssignment.workAGloryHole = (function() { * */ function profitReport(slave) { - let cash = 0; + let cash; if (V.policies.publicFuckdolls === 0) { cash = Math.trunc(beauty * FResult); } else { diff --git a/src/endWeek/slaveAssignmentReport.js b/src/endWeek/slaveAssignmentReport.js index 522a6ee067cf2897faa34eca5b81521136c03cc9..2c5745850af6ed89473dd911639d797bf9185eb7 100644 --- a/src/endWeek/slaveAssignmentReport.js +++ b/src/endWeek/slaveAssignmentReport.js @@ -708,8 +708,7 @@ App.EndWeek.slaveAssignmentReport = function() { } } break; - case Job.AGENT: - { + case Job.AGENT: { const arc = V.arcologies.find((a) => a.leaderID === slave.ID); if (!arc) { _printSlaveUnassignedNote(slave, "is not assigned to an arcology"); diff --git a/src/endWeek/standardSlaveReport.js b/src/endWeek/standardSlaveReport.js index 4bd31d4a942a436a3814dfdbb5749be2eaf958b0..a76d7a14d0142457c7bf7d86e817a2d97afa63c6 100644 --- a/src/endWeek/standardSlaveReport.js +++ b/src/endWeek/standardSlaveReport.js @@ -5,7 +5,7 @@ * @param {boolean} silent * @returns {DocumentFragment|null} */ -App.SlaveAssignment.standardSlaveReport = function(slave, silent=false) { +App.SlaveAssignment.standardSlaveReport = function(slave, silent = false) { const clothes = App.SlaveAssignment.choosesOwnClothes(slave); const individualReport = App.SlaveAssignment.individualSlaveReport(slave); const devotion = App.SlaveAssignment.devotion(slave);