diff --git a/src/004-base/facility.js b/src/004-base/facility.js index 779bdfa2d955f9e4a43822c144f58ffc60344cbb..26f7eff13e2c4f0abe06f8015468de96db7b70f4 100644 --- a/src/004-base/facility.js +++ b/src/004-base/facility.js @@ -454,7 +454,7 @@ App.Entity.Facilities.Facility = class { if (jobArray.length === 1) { return jobArray[0].employees(); } - return V.slaves.filter(s => jobArray.some(j => j.isEmployed(s))); + return [].concat(...jobArray.map(j => j.employees())); } /** @@ -462,9 +462,9 @@ App.Entity.Facilities.Facility = class { * @returns {Set<number>} */ employeesIDs() { - const jobArray = Object.values(this._jobs); + const jobArray = this.jobs; if (jobArray.length === 1) { - return this.job().employeesIDs(); + return jobArray[0].employeesIDs(); } const res = new Set(); for (const j of jobArray) { diff --git a/src/endWeek/brothelReport.js b/src/endWeek/brothelReport.js index a7df34a613a6ae9de947f566c4052414ed32a003..a2bc80d7005478afb69c74f6a1cb97fd79bea695 100644 --- a/src/endWeek/brothelReport.js +++ b/src/endWeek/brothelReport.js @@ -1,4 +1,4 @@ -globalThis.brothelReport = function() { +App.EndWeek.brothelReport = function() { const el = document.createElement("p"); let r; @@ -103,11 +103,11 @@ globalThis.brothelReport = function() { } App.Events.addParagraph(el, r); + r = []; for (const slave of slaves) { const { he2, him2, his2 } = getPronouns(slave).appendSuffix('2'); - r = []; if (S.Madam.rivalryTarget === slave.ID) { r.push(`${He} forces ${his} ${rivalryTerm(S.Madam)}, to service all the men in the brothel.`); @@ -208,8 +208,8 @@ globalThis.brothelReport = function() { } } } - App.Events.addNode(el, r); } + App.Events.addNode(el, r); if ((SL + V.brothelSlavesGettingHelp < 10) && V.MadamNoSex !== 1 && !slaveResting(S.Madam)) { let oldCash = V.cash; @@ -236,11 +236,9 @@ globalThis.brothelReport = function() { oldCash = V.cash; } } - return r.join(" "); } - const madamEffects = App.UI.DOM.appendNewElement("p", el, '', "indent"); - $(madamEffects).append(madamText()); + madamText(); if (SL > 0) { const whoreNumber = document.createElement("p"); @@ -256,11 +254,10 @@ globalThis.brothelReport = function() { if (S.Madam) { const slave = S.Madam; + tired(slave); if (V.showEWD !== 0) { const madamEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", madamEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(madamEntry, slave); madamEntry.append(App.EndWeek.favoriteIcon(slave), " "); App.Events.addNode( madamEntry, @@ -332,9 +329,7 @@ globalThis.brothelReport = function() { if (V.showEWD !== 0) { const {He} = getPronouns(slave); const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); r = []; r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name")); @@ -353,7 +348,7 @@ globalThis.brothelReport = function() { App.SlaveAssignment.standardSlaveReport(slave, false) ], "div", - "indented" + "indent" ); } else { // discard return values silently diff --git a/src/endWeek/clinicReport.js b/src/endWeek/clinicReport.js index b741896901b99e518f6093c35ed09ae52080da62..6246921be24a5e6490da43325781fbfcd03f694a 100644 --- a/src/endWeek/clinicReport.js +++ b/src/endWeek/clinicReport.js @@ -240,15 +240,14 @@ App.EndWeek.clinicReport = function() { if (S.Nurse) { const slave = S.Nurse; + tired(slave); /* apply following SA passages to facility leader */ if (V.showEWD !== 0) { const nurseEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", nurseEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(nurseEntry, slave); nurseEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(nurseEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> is serving as the clinical nurse.`); - $(nurseEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + nurseEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { App.SlaveAssignment.standardSlaveReport(slave, true); } @@ -375,9 +374,7 @@ App.EndWeek.clinicReport = function() { if (V.showEWD !== 0) { const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(slaveEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> `); if (slave.choosesOwnAssignment === 2) { @@ -388,7 +385,7 @@ App.EndWeek.clinicReport = function() { const patientContent = App.UI.DOM.appendNewElement("div", slaveEntry, '', "indent"); $(patientContent).append(`${He} ${App.SlaveAssignment.rest(slave)} `); $(patientContent).append(remainReason); - $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { // discard return values silently App.SlaveAssignment.choosesOwnJob(slave); diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js index 899cb539ae480e300e8b6781dca74e6608ceee09..7a6d2a912b656f46c361f206dc3864a0310d6049 100644 --- a/src/endWeek/economics/neighborsDevelopment.js +++ b/src/endWeek/economics/neighborsDevelopment.js @@ -3,9 +3,8 @@ */ App.EndWeek.neighborsDevelopment = function() { const el = document.createElement("p"); - let He, his; - const averageProsperity = _.mean(V.arcologies.map(a => Math.min(a.prosperity, 10))); + const averageProsperity = _.mean(V.arcologies.map(a => a.prosperity)); const corpBonus = V.corp.Incorporated ? Math.trunc(1000 * Math.pow(App.Corporate.value, 0.1)) : 0; let agentBonusValue = 0; let desc; @@ -57,7 +56,7 @@ App.EndWeek.neighborsDevelopment = function() { } const agent = App.currentAgent(i); if (arc.government === "your agent") { - ({He} = getPronouns(agent)); + const {He} = getPronouns(agent); r.push(`is being run by your agent <span class="deeppink">${SlaveFullName(agent)}.</span>`); if (agent && agent.assignment !== "be your agent") { r.push(`<span class="red">BUG: ${agent} also was ${agent.assignment}!</span>`); @@ -93,7 +92,7 @@ App.EndWeek.neighborsDevelopment = function() { } r.push(`<span class="yellow">After a brief power struggle, it undergoes a change of government.</span>`); if (agent) { - ({his} = getPronouns(agent)); + const {his} = getPronouns(agent); r.push(`<span class="deeppink">${agent.slaveName}</span> manages to escape with the help of a few loyal citizens and returns to you <span class="gold">fearing your displeasure at ${his} failure.</span>`); agent.trust -= 40; assignJob(agent, "rest"); // this takes care of necessary cleanup for agent and agent companion (if any) @@ -2567,41 +2566,41 @@ App.EndWeek.neighborsDevelopment = function() { /* AGENT ADOPTION*/ if (arc.government === "your agent") { const leader = App.currentAgent(i); - const {he, himself, woman, him, hers} = getPronouns(leader); + const {he, his, himself, woman, him, hers} = getPronouns(leader); if (validFSes.includes("FSRepopulationFocus") && leader.fetish === "pregnancy" && V.seePreg === 1) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Repopulationism,</span> since as a pregnancy fetishist, ${he} can't wait to see the female population's bellies swell with life.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Repopulationism,</span> since as a pregnancy fetishist, ${he} can't wait to see the female population's bellies swell with life.`); arc.FSRepopulationFocus = 5; return; } else if (validFSes.includes("FSRestart") && (leader.preg < -1 || (leader.ovaries === 0 && leader.mpreg !== 1)) && leader.genes === "XX") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Eugenics,</span> since if no-one can get pregnant, ${he} won't be alone.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Eugenics,</span> since if no-one can get pregnant, ${he} won't be alone.`); arc.FSRestart = 5; return; } if (validFSes.includes("FSGenderRadicalist") && leader.dick > 0) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Gender Radicalism,</span> since ${he}'s a walking, swinging argument for dickgirls.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Gender Radicalism,</span> since ${he}'s a walking, swinging argument for dickgirls.`); arc.FSGenderRadicalist = 5; return; - } else if (validFSes.includes("FSGenderFundamentalist") && leader.pregKnown === 1 || leader.bellyPreg > 1500) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Gender Fundamentalism,</span> since its citizens find leadership by a pregnant ${woman} fascinating.`); + } else if (validFSes.includes("FSGenderFundamentalist") && (leader.pregKnown === 1 || leader.bellyPreg > 1500)) { + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Gender Fundamentalism,</span> since its citizens find leadership by a pregnant ${woman} fascinating.`); arc.FSGenderFundamentalist = 5; return; } if (validFSes.includes("FSPaternalist") && leader.behavioralQuirk === "advocate") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Paternalism,</span> since as an advocate for slavery, ${he} believes in its benefits.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Paternalism,</span> since as an advocate for slavery, ${he} believes in its benefits.`); arc.FSPaternalist = 5; return; } else if (validFSes.includes("FSDegradationist") && leader.fetish === "sadist") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Degradationism,</span> since as a sexual sadist, ${he}'s excited by the idea of leading a society that applauds ${his} cruelest impulses.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Degradationism,</span> since as a sexual sadist, ${he}'s excited by the idea of leading a society that applauds ${his} cruelest impulses.`); arc.FSDegradationist = 5; return; } if (validFSes.includes("FSSlaveProfessionalism") && (leader.intelligence + leader.intelligenceImplant >= 120) && (leader.skill.vaginal + leader.skill.oral + leader.skill.anal + leader.skill.whoring + leader.skill.entertainment >= 400)) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Slave Professionalism,</span> since ${he} wishes to produce slaves you can be proud of.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Slave Professionalism,</span> since ${he} wishes to produce slaves you can be proud of.`); arc.FSSlaveProfessionalism = 5; return; } else if (validFSes.includes("FSIntellectualDependency") && (leader.intelligence + leader.intelligenceImplant >= 120) && (leader.behavioralFlaw === "arrogant" || leader.behavioralQuirk === "insecure")) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Intellectual Dependency,</span>`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Intellectual Dependency,</span>`); if (leader.behavioralQuirk === "insecure") { r.push(`since, due to ${his} own insecurities, needs to be frequently reassured that ${he} is smarter than the masses.`); } else { @@ -2611,125 +2610,125 @@ App.EndWeek.neighborsDevelopment = function() { return; } if (validFSes.includes("FSBodyPurist") && leader.chem > 50) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Body Purism,</span> since ${he} knows what long term drug damage feels like, and doesn't want any slave to ever experience it again.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Body Purism,</span> since ${he} knows what long term drug damage feels like, and doesn't want any slave to ever experience it again.`); arc.FSBodyPurist = 5; return; } else if (validFSes.includes("FSTransformationFetishist") && leader.boobsImplant > 1000) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Transformation Fetishism,</span> out of a perverse desire to subject all slaves to massive implants like ${hers}.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Transformation Fetishism,</span> out of a perverse desire to subject all slaves to massive implants like ${hers}.`); arc.FSTransformationFetishist = 5; return; } if (validFSes.includes("FSYouthPreferentialist") && leader.actualAge <= 25) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Youth Preferentialism,</span> to buttress acceptance of ${his} own young age.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Youth Preferentialism,</span> to buttress acceptance of ${his} own young age.`); arc.FSYouthPreferentialist = 5; return; } else if (validFSes.includes("FSMaturityPreferentialist") && leader.actualAge > 35) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Maturity Preferentialism,</span> since ${he} has a certain personal interest in promoting the idea that MILFs are sexy.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Maturity Preferentialism,</span> since ${he} has a certain personal interest in promoting the idea that MILFs are sexy.`); arc.FSMaturityPreferentialist = 5; return; } if (validFSes.includes("FSSlimnessEnthusiast") && leader.behavioralQuirk === "insecure") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Slimness Enthusiasm,</span> since ${his} history of anorexia has deeply impacted ${his} idea of beauty.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Slimness Enthusiasm,</span> since ${his} history of anorexia has deeply impacted ${his} idea of beauty.`); arc.FSSlimnessEnthusiast = 5; return; } else if (validFSes.includes("FSAssetExpansionist") && leader.fetish === "boobs") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Asset Expansionism,</span> since ${he}'s a breast expansion fetishist in addition to being a mere breast fetishist.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Asset Expansionism,</span> since ${he}'s a breast expansion fetishist in addition to being a mere breast fetishist.`); arc.FSAssetExpansionist = 5; return; } else if (validFSes.includes("FSAssetExpansionist") && leader.sexualQuirk === "size queen" && leader.vagina > 3) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Asset Expansionism,</span> since ${he}'s a stickler for big dicks and seeks to find one large enough to push ${him} to ${his} very limit.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Asset Expansionism,</span> since ${he}'s a stickler for big dicks and seeks to find one large enough to push ${him} to ${his} very limit.`); arc.FSAssetExpansionist = 5; return; } if (validFSes.includes("FSCummunism") && leader.fetish === "cumslut") { // this will become the cum focused condition, being replaced with breast focus for milk - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Cummunism,</span> since ${he} already loves sucking down huge loads of cum.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Cummunism,</span> since ${he} already loves sucking down huge loads of cum.`); arc.FSCummunism = 5; return; } else if (validFSes.includes("FSPastoralist") && leader.fetish === "boobs") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Pastoralism,</span> since ${he} loves boobs and adores suckling them.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Pastoralism,</span> since ${he} loves boobs and adores suckling them.`); arc.FSPastoralist = 5; return; } if (validFSes.includes("FSHedonisticDecadence") && leader.behavioralFlaw === "gluttonous") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Decadent Hedonism,</span> since ${he} already loves over-eating.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Decadent Hedonism,</span> since ${he} already loves over-eating.`); arc.FSHedonisticDecadence = 5; return; } else if (validFSes.includes("FSPhysicalIdealist") && leader.behavioralQuirk === "fitness") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Physical Idealism,</span> since ${he}'s a fitness fanatic ${himself}.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Physical Idealism,</span> since ${he}'s a fitness fanatic ${himself}.`); arc.FSPhysicalIdealist = 5; return; } else if (validFSes.includes("FSHedonisticDecadence") && leader.fetish !== "none" && leader.fetishStrength >= 100) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Decadent Hedonism,</span> since ${he} seeks to satisfy ${his} powerful fetish.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Decadent Hedonism,</span> since ${he} seeks to satisfy ${his} powerful fetish.`); arc.FSHedonisticDecadence = 5; return; } if (validFSes.includes("FSStatuesqueGlorification") && leader.height >= 200) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Statuesque Glorification,</span> since ${he} is tired of being one of the tallest in arcology.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Statuesque Glorification,</span> since ${he} is tired of being one of the tallest in arcology.`); arc.FSStatuesqueGlorification = 5; return; } else if (validFSes.includes("FSPetiteAdmiration") && leader.height >= 170 && leader.fetish === "dom") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Petite Admiration,</span> since it is far easier to dominate someone much smaller than oneself.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Petite Admiration,</span> since it is far easier to dominate someone much smaller than oneself.`); arc.FSPetiteAdmiration = 5; return; } if (validFSes.includes("FSIncestFetishist")) { const lover = V.slaves.find(s => (s.ID === leader.relationshipTarget && areRelated(s, leader) && s.assignment === "live with your agent")); if ((leader.behavioralQuirk === "sinful" || leader.sexualQuirk === "perverted") && lover && V.seeIncest === 1) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Incest Festishism,</span> to share the love and joy ${he} holds with ${his} ${relativeTerm(leader, lover)}.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Incest Festishism,</span> to share the love and joy ${he} holds with ${his} ${relativeTerm(leader, lover)}.`); arc.FSIncestFetishist = 5; return; } } if (validFSes.includes("FSChattelReligionist") && leader.behavioralFlaw === "devout") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Chattel Religionism,</span> to share and spread ${his} deeply held beliefs about the holiness of sexual service.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Chattel Religionism,</span> to share and spread ${his} deeply held beliefs about the holiness of sexual service.`); arc.FSChattelReligionist = 5; return; } else if (validFSes.includes("FSChattelReligionist") && leader.behavioralQuirk === "sinful") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Chattel Religionism,</span> since ${he}'s excited by the prospect of getting away with horrible sins against old religions in public.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Chattel Religionism,</span> since ${he}'s excited by the prospect of getting away with horrible sins against old religions in public.`); arc.FSChattelReligionist = 5; return; } if (validFSes.includes("FSEgyptianRevivalist") && leader.relationshipTarget !== 0) { const lover = getSlave(leader.relationshipTarget); if (lover && areRelated(leader, lover)) { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Egyptian Revivalism,</span> since ${he}'s already part of a gloriously incestuous relationship.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Egyptian Revivalism,</span> since ${he}'s already part of a gloriously incestuous relationship.`); arc.FSEgyptianRevivalist = 5; return; } } else if (validFSes.includes("FSChineseRevivalist") && leader.nationality === "Chinese") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Chinese Revivalism,</span> since ${he}'s Chinese ${himself} and can claim high honor in such a society.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Chinese Revivalism,</span> since ${he}'s Chinese ${himself} and can claim high honor in such a society.`); arc.FSChineseRevivalist = 5; return; } else if (validFSes.includes("FSEdoRevivalist") && leader.nationality === "Japanese") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Edo Revivalism,</span> since ${he}'s Japanese ${himself} and can claim high honor in such a society.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Edo Revivalism,</span> since ${he}'s Japanese ${himself} and can claim high honor in such a society.`); arc.FSEdoRevivalist = 5; return; } else if (validFSes.includes("FSAztecRevivalist") && leader.nationality === "Mexican") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Aztec Revivalism,</span> since ${he}'s Mexican ${himself} and can claim high honor in such a society.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Aztec Revivalism,</span> since ${he}'s Mexican ${himself} and can claim high honor in such a society.`); arc.FSAztecRevivalist = 5; return; } else if (validFSes.includes("FSNeoImperialist") && leader.nationality === "German") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s German ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s German ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); arc.FSNeoImperialist = 5; return; } else if (validFSes.includes("FSNeoImperialist") && leader.nationality === "French") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s French ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s French ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); arc.FSNeoImperialist = 5; return; } else if (validFSes.includes("FSNeoImperialist") && leader.nationality === "Spanish") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s Spanish ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s Spanish ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); arc.FSNeoImperialist = 5; return; } else if (validFSes.includes("FSNeoImperialist") && leader.nationality === "English") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s English ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Neo-Imperialism,</span> since ${he}'s English ${himself} and can easily cement ${his} rule with Imperial directives in your name.`); arc.FSNeoImperialist = 5; return; } else if (validFSes.includes("FSRomanRevivalist") && leader.behavioralQuirk === "confident") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Roman Revivalism,</span> since it appeals to ${his} confident, patrician nature.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Roman Revivalism,</span> since it appeals to ${his} confident, patrician nature.`); arc.FSRomanRevivalist = 5; return; } else if (validFSes.includes("FSArabianRevivalist") && leader.fetish === "dom") { - r.push(`Your agent <span class="pink">leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Arabian Revivalism,</span> since ${he}'s sexually dominant and quite likes the idea of overseeing slave bazaars.`); + r.push(`Your agent <span class="pink">${leader.slaveName}</span> successfully pushes it to <span class="yellow">adopt Arabian Revivalism,</span> since ${he}'s sexually dominant and quite likes the idea of overseeing slave bazaars.`); arc.FSArabianRevivalist = 5; return; } diff --git a/src/endWeek/incubatorReport.js b/src/endWeek/incubatorReport.js new file mode 100644 index 0000000000000000000000000000000000000000..4b61119b2ad0ecdff0889b7dd1901a6a5936dbf8 --- /dev/null +++ b/src/endWeek/incubatorReport.js @@ -0,0 +1,835 @@ +App.EndWeek.incubatorReport = function() { + const frag = document.createDocumentFragment(); + V.readySlaves = 0; + + for (const tank of V.tanks) { + const entry = App.UI.DOM.appendNewElement('p', frag); + let r = []; + const {He, he, His, his, him} = getPronouns(tank); + tank.birthWeek += 1; + if (tank.birthWeek >= 52) { + tank.birthWeek = 0; + if (V.seeAge === 1) { + tank.actualAge++; + tank.ovaryAge++; + } + } + if (tank.growTime > 0) { + tank.growTime -= V.incubatorUpgradeSpeed; + r.push(`<span class="pink">${tank.slaveName}'s</span> growth is currently being accelerated. ${He}`); + if (Math.round(tank.growTime/V.incubatorUpgradeSpeed) <= 0) { + r.push(`is <span class="lime">ready for release.</span> ${He} will be ejected from ${his} tank upon your approach.`); + } else { + r.push(`will be ready for release in about ${Math.round(tank.growTime/V.incubatorUpgradeSpeed)} weeks.`); + } + } else { + r.push(`<span class="pink">${tank.slaveName}</span> is <span class="lime">ready for release.</span> ${He} will be ejected from ${his} tank upon your approach.`); + V.readySlaves = 1; + } + App.Events.addNode(entry, r, "div"); + + r = []; + if (V.incubatorUpgradeWeight === 1) { + if (V.incubatorWeightSetting === 1) { + if (tank.weight < 200) { + if (V.incubatorUpgradeSpeed === 52) { + tank.weight += 70; + } else if (V.incubatorUpgradeSpeed === 18) { + tank.weight += 40; + } else if (V.incubatorUpgradeSpeed === 9) { + tank.weight += 20; + } else if (V.incubatorUpgradeSpeed === 6) { + tank.weight += 10; + } else if (V.incubatorUpgradeSpeed === 5) { + tank.weight += 5; + } + } + r.push(`The weight monitoring systems are overloading ${his} intake causing <span class="red">rapid weight gain.</span>`); + } else if (V.incubatorWeightSetting === 2) { + if (tank.weight > 10) { + if (V.incubatorUpgradeSpeed === 52) { + tank.weight -= 30; + } else if (V.incubatorUpgradeSpeed === 18) { + tank.weight -= 10; + } else if (V.incubatorUpgradeSpeed === 9) { + tank.weight -= 5; + } else if (V.incubatorUpgradeSpeed === 6) { + tank.weight -= 2; + } else if (V.incubatorUpgradeSpeed === 5) { + tank.weight -= 1; + } + r.push(`The weight monitoring systems detect ${he} is overweight and <span class="green">decrease ${his} caloric intake.</span>`); + } else if (tank.weight < -10) { + if (V.incubatorUpgradeSpeed === 52) { + tank.weight += 30; + } else if (V.incubatorUpgradeSpeed === 18) { + tank.weight += 10; + } else if (V.incubatorUpgradeSpeed === 9) { + tank.weight += 5; + } else if (V.incubatorUpgradeSpeed === 6) { + tank.weight += 2; + } else if (V.incubatorUpgradeSpeed === 5) { + tank.weight += 1; + } + r.push(`The weight monitoring systems detect ${he} is underweight and <span class="green">increase ${his} caloric intake.</span>`); + } else { + r.push(`${He} is <span class="lime">currently at a healthy weight;</span> efforts will be made to maintain it.`); + } + } else if (V.incubatorWeightSetting === 0) { + if (tank.weight > -100) { + r.push(`${His} developing body <span class="red">quickly sheds its gained weight.</span>`); + tank.weight -= 40; + } + } + } else { + if (tank.weight > -100) { + r.push(`${His} developing body <span class="red">quickly sheds its gained weight.</span>`); + tank.weight -= 40; + } + } + App.Events.addNode(entry, r, "div"); + + r = []; + if (V.incubatorUpgradeMuscles === 1) { + if (V.incubatorMusclesSetting === 2) { + if (tank.muscles < 100) { + if (V.incubatorUpgradeSpeed === 52) { + tank.muscles += 70; + } else if (V.incubatorUpgradeSpeed === 18) { + tank.muscles += 40; + } else if (V.incubatorUpgradeSpeed === 9) { + tank.muscles += 20; + } else if (V.incubatorUpgradeSpeed === 6) { + tank.muscles += 10; + } else if (V.incubatorUpgradeSpeed === 5) { + tank.muscles += 5; + } + } + r.push(`The strength monitoring systems are overloading ${him} with steroids causing <span class="green">rapid muscle development.</span>`); + } else if (V.incubatorMusclesSetting === 1) { + if (tank.muscles > 10) { + if (V.incubatorUpgradeSpeed === 52) { + tank.muscles -= 30; + } else if (V.incubatorUpgradeSpeed === 18) { + tank.muscles -= 10; + } else if (V.incubatorUpgradeSpeed === 9) { + tank.muscles -= 5; + } else if (V.incubatorUpgradeSpeed === 6) { + tank.muscles -= 2; + } else if (V.incubatorUpgradeSpeed === 5) { + tank.muscles--; + } + r.push(`The strength monitoring systems detect ${he} is overly muscular and <span class="green">decrease ${his} steroid dosage.</span>`); + } else if (tank.muscles < -10) { + if (V.incubatorUpgradeSpeed === 52) { + tank.muscles += 30; + } else if (V.incubatorUpgradeSpeed === 18) { + tank.muscles += 10; + } else if (V.incubatorUpgradeSpeed === 9) { + tank.muscles += 5; + } else if (V.incubatorUpgradeSpeed === 6) { + tank.muscles += 2; + } else if (V.incubatorUpgradeSpeed === 5) { + tank.muscles++; + } + r.push(`The strength monitoring systems detect ${he} is weak and <span class="green">increase ${his} steroid dosage.</span>`); + } else { + r.push(`${He} has <span class="lime">a healthy musculature;</span> efforts will be made to maintain it.`); + } + } else if (V.incubatorMusclesSetting === 0) { + if (tank.muscles > -100) { + r.push(`${His} developing body <span class="red">quickly loses its gained muscle.</span>`); + tank.muscles -= 40; + } + } + } else { + if (tank.muscles > -100) { + r.push(`${His} developing body <span class="red">quickly loses its gained muscle.</span>`); + tank.muscles -= 40; + } + } + App.Events.addNode(entry, r, "div"); + + r = []; + if (V.incubatorUpgradeGrowthStims === 1 && V.incubatorGrowthStimsSetting !== 0) { + let heightLimit = Math.trunc(Math.clamp((Height.mean(tank) * 1.25), 0, 274)); + let heightLimitAge = Height.forAge(tank.height, tank); + if (tank.geneticQuirks.dwarfism === 2 && tank.geneticQuirks.gigantism !== 2) { + heightLimit = Math.min(heightLimit, 160); + } + if (tank.geneMods.NCS === 1) { + /* NCS should block physical growth beyond that of a toddler, but some players might like + * a little more or less. So using V.minimumSlaveAge or 8, whichever is lesser. */ + const _limitAge = Math.min(8, V.minimumSlaveAge); + heightLimitAge = Height.forAge(tank.height, _limitAge, tank.genes); + heightLimit = heightLimitAge; + } else if (tank.geneticQuirks.neoteny === 2 && tank.actualAge > 12) { + heightLimitAge = Height.forAge(tank.height, 12, tank.genes); + heightLimit = heightLimitAge; + } + if (tank.height >= heightLimit) { + r.push(`The monitoring system detects ${his} body is not able to support further increases in height, so it carefully regulates stimulant injections to <span class="yellow">maintain ${his} current stature.</span>`); + tank.height = heightLimit; + } else if (V.incubatorGrowthStimsSetting === 2) { + if (tank.geneMods.NCS === 1) { + r.push(`The monitoring system floods ${his} body with growth stimulants, but ${his} <span class="orange">NCS prevents an increase in ${his} growth rate.</span>`); + tank.height = heightLimitAge; + } else { + r.push(`The monitoring system floods ${his} body with growth stimulants, causing <span class="green">a sharp increase in growth rate.</span>`); + if (V.incubatorWeightSetting >= 1 && V.incubatorMusclesSetting <= 1 && V.incubatorReproductionSetting <= 1) { + if (V.incubatorUpgradeSpeed === 52) { + tank.height += random(3, 6); + } else if (V.incubatorUpgradeSpeed === 18) { + tank.height += random(2, 5); + } else if (V.incubatorUpgradeSpeed === 9) { + tank.height += random(1, 4); + } else if (V.incubatorUpgradeSpeed === 6) { + tank.height += random(1, 3); + } else if (V.incubatorUpgradeSpeed === 5) { + tank.height += random(1, 2); + } + } else { + if (V.incubatorUpgradeSpeed === 52) { + tank.height += random(2, 5); + } else if (V.incubatorUpgradeSpeed === 18) { + tank.height += random(1, 4); + } else if (V.incubatorUpgradeSpeed === 9) { + tank.height += random(1, 3); + } else if (V.incubatorUpgradeSpeed === 6) { + tank.height += random(1, 2); + } else if (V.incubatorUpgradeSpeed === 5) { + tank.height += random(0, 1); + } + } + } + } else if (V.incubatorGrowthStimsSetting === 1) { + if (tank.geneMods.NCS === 1) { + r.push(`The monitoring system detects ${he} is near the expected height for ${his} <span class="orange">NCS</span> condition, so it carefully regulates stimulant injections to <span class="yellow">maintain ${his} current stature.</span>`); + tank.height = heightLimitAge; + } else if (tank.height > heightLimitAge) { + r.push(`The monitoring systems detect ${he} is near the expected height, so it carefully regulates stimulant injections to <span class="yellow">maintain ${his} current stature.</span>`); + if (random(1, 10) === 10) { + if (V.incubatorUpgradeSpeed === 52) { + tank.height += random(1, 4); + } else if (V.incubatorUpgradeSpeed === 18) { + tank.height += random(1, 3); + } else if (V.incubatorUpgradeSpeed === 9) { + tank.height += random(1, 2); + } else if (V.incubatorUpgradeSpeed === 6) { + tank.height += random(0, 1); + } else if (V.incubatorUpgradeSpeed === 5) { + tank.height += random(0, 1); + } + } + } else { + r.push(`The monitoring systems detect ${his} body is capable of developing more rapidly and <span class="green">increase ${his} growth stimulant dosage.</span>`); + if (V.incubatorUpgradeSpeed === 52) { + tank.height += random(1, 4); + } else if (V.incubatorUpgradeSpeed === 18) { + tank.height += random(1, 3); + } else if (V.incubatorUpgradeSpeed === 9) { + tank.height += random(1, 2); + } else if (V.incubatorUpgradeSpeed === 6) { + tank.height += random(0, 1); + } else if (V.incubatorUpgradeSpeed === 5) { + tank.height += random(0, 1); + } + } + } + tank.height = Math.clamp(tank.height, 0, heightLimit); + } else { + r.push(`With the growth stimulant injections offline, ${his} body is left to develop naturally.`); + } + App.Events.addNode(entry, r, "div"); + + r = []; + if (V.incubatorUpgradeReproduction === 1) { + const rearQuirk = tank.geneticQuirks.rearLipedema === 2 ? 2 : 1; + if (V.incubatorReproductionSetting === 2) { + r.push(`${His} developing body is being flooded with hormones.`); + if (V.incubatorWeightSetting === 1) { + r.push(`Combined with the abundant food provided to ${him}, ${his} body grows rapidly.`); + if (tank.ovaries === 1) { + tank.pubertyXX = 1; + if (tank.hormoneBalance < 500) { + tank.hormoneBalance += 100; + } + tank.readyOva = V.seeHyperPreg === 1 ? random(25, 45) : random(3, 8); + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks all growth</span> despite the excess estrogen-laced growth hormones flooding ${his} body.`); + } else if (V.incubatorUpgradeSpeed === 52) { + if (tank.boobs < 8000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 2000; + } + if (tank.hips < 2 && random(1, 100) > 50) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips += 2; + } + if (tank.butt < 12*rearQuirk && random(1, 100) > 30/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt += 4; + } + } else if (V.incubatorUpgradeSpeed === 18) { + if (tank.boobs < 8000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 500; + } + if (tank.hips < 2 && random(1, 100) > 50) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 12*rearQuirk && random(1, 100) > 50/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt += 3; + } + } else if (V.incubatorUpgradeSpeed === 9) { + if (tank.boobs < 8000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 200; + } + if (tank.hips < 2 && random(1, 100) > 60) { + r.push(`The excess estrogen-laced growth hormones <span class="green">causes ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 12*rearQuirk && random(1, 100) > 50/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear grow fatter.</span>`); + tank.butt += 2; + } + } else if (V.incubatorUpgradeSpeed === 6) { + if (tank.boobs < 8000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 100; + } + if (tank.hips < 2 && random(1, 100) > 70) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 12*rearQuirk && random(1, 100) > 60/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } else if (V.incubatorUpgradeSpeed === 5) { + if (tank.boobs < 8000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 100; + } + if (tank.hips < 2 && random(1, 100) > 80) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 12*rearQuirk && random(1, 100) > 70/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } + } else if (tank.balls > 0) { + tank.pubertyXY = 1; + if (tank.hormoneBalance > -500) { + tank.hormoneBalance -= 100; + } + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks all growth</span> despite the excess testosterone-laced growth hormones flooding ${his} body.`); + } else if (V.incubatorUpgradeSpeed === 52) { + if (tank.balls < 40) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls += 16; + } + if (tank.dick < 10 && random(1, 100) > 20) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick += 4; + } + } else if (V.incubatorUpgradeSpeed === 18) { + if (tank.balls < 40 && random(1, 100) > 10) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls += 9; + } + if (tank.dick < 10 && random(1, 100) > 30) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick += 3; + } + } else if (V.incubatorUpgradeSpeed === 9) { + if (tank.balls < 40 && random(1, 100) > 20) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls += 4; + } + if (tank.dick < 10 && random(1, 100) > 50) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick += 2; + } + } else if (V.incubatorUpgradeSpeed === 6) { + if (tank.balls < 40 && random(1, 100) > 30) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls += 2; + } + if (tank.dick < 10 && random(1, 100) > 70) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } else if (V.incubatorUpgradeSpeed === 5) { + if (tank.balls < 40 && random(1, 100) > 30) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 10 && random(1, 100) > 80) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } + } + } else if (V.incubatorWeightSetting === 2) { + r.push(`Combined with the healthy food provided to ${him}, ${his} body grows readily.`); + if (tank.ovaries === 1) { + tank.pubertyXX = 1; + if (tank.hormoneBalance < 500) { + tank.hormoneBalance += 100; + } + tank.readyOva = V.seeHyperPreg === 1 ? random(15, 25) : random(2, 6); + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks all growth</span> despite the excess estrogen-laced growth hormones flooding ${his} body.`); + } else if (V.incubatorUpgradeSpeed === 52) { + if (tank.boobs < 4000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 1000; + } + if (tank.hips < 2 && random(1, 100) > 70) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 8*rearQuirk && random(1, 100) > 50/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt += 3; + } + } else if (V.incubatorUpgradeSpeed === 18) { + if (tank.boobs < 4000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 500; + } + if (tank.hips < 2 && random(1, 100) > 80) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 8*rearQuirk && random(1, 100) > 50/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } else if (V.incubatorUpgradeSpeed === 9) { + if (tank.boobs < 4000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 200; + } + if (tank.hips < 2 && random(1, 100) > 90) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 8*rearQuirk && random(1, 100) > 60/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } else if (V.incubatorUpgradeSpeed === 6) { + if (tank.boobs < 4000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 100; + } + if (tank.hips < 2 && random(1, 100) > 95) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 8*rearQuirk && random(1, 100) > 70/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } else if (V.incubatorUpgradeSpeed === 5) { + if (tank.boobs < 4000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 100; + } + if (tank.hips < 2 && random(1, 100) > 95) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 8*rearQuirk && random(1, 100) > 80/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } + } else if (tank.balls > 0) { + tank.pubertyXY = 1; + if (tank.hormoneBalance > -500) { + tank.hormoneBalance -= 100; + } + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks all growth</span> despite the excess testosterone-laced growth hormones flooding ${his} body.`); + } else if (V.incubatorUpgradeSpeed === 52) { + if (tank.balls < 10) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls += 3; + } + if (tank.dick < 7 && random(1, 100) > 20) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick += 2; + } + } else if (V.incubatorUpgradeSpeed === 18) { + if (tank.balls < 10 && random(1, 100) > 10) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls += 2; + } + if (tank.dick < 7 && random(1, 100) > 30) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } else if (V.incubatorUpgradeSpeed === 9) { + if (tank.balls < 10 && random(1, 100) > 20) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 7 && random(1, 100) > 50) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } else if (V.incubatorUpgradeSpeed === 6) { + if (tank.balls < 10 && random(1, 100) > 30) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 7 && random(1, 100) > 70) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } else if (V.incubatorUpgradeSpeed === 5) { + if (tank.balls < 10 && random(1, 100) > 30) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 7 && random(1, 100) > 80) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } + } + } else { + r.push(`Since ${his} body has little to work with, ${his} growth is fairly minor.`); + if (tank.ovaries === 1) { + tank.pubertyXX = 1; + if (tank.hormoneBalance < 500) { + tank.hormoneBalance += 100; + } + tank.readyOva = V.seeHyperPreg === 1 ? random(10, 15) : random(2, 4); + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks all growth</span> despite the excess estrogen-laced growth hormones flooding ${his} body.`); + } else if (V.incubatorUpgradeSpeed === 52) { + if (tank.boobs < 2000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 700; + } + if (tank.hips < 2 && random(1, 100) > 90) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips += 2; + } + if (tank.butt < 6*rearQuirk && random(1, 100) > 70/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt += 2; + } + } else if (V.incubatorUpgradeSpeed === 18) { + if (tank.boobs < 2000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 200; + } + if (tank.hips < 2 && random(1, 100) > 80) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 6*rearQuirk && random(1, 100) > 70/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } else if (V.incubatorUpgradeSpeed === 9) { + if (tank.boobs < 2000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly balloon ${his} breasts.</span>`); + tank.boobs += 50; + } + if (tank.hips < 2 && random(1, 100) > 80) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 6*rearQuirk && random(1, 100) > 90/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } else if (V.incubatorUpgradeSpeed === 6) { + if (tank.boobs < 2000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly grow ${his} breasts.</span>`); + tank.boobs += 20; + } + if (tank.hips < 2 && random(1, 100) > 90) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 6*rearQuirk && random(1, 100) > 90/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } else if (V.incubatorUpgradeSpeed === 5) { + if (tank.boobs < 2000) { + r.push(`The excess estrogen-laced growth hormones <span class="green">rapidly grow ${his} breasts.</span>`); + tank.boobs += 10; + } + if (tank.hips < 2 && random(1, 100) > 95) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} hips to widen for childbirth.</span>`); + tank.hips++; + } + if (tank.butt < 6*rearQuirk && random(1, 100) > 90/rearQuirk) { + r.push(`The excess estrogen-laced growth hormones <span class="green">cause ${his} rear to grow fatter.</span>`); + tank.butt++; + } + } + } else if (tank.balls > 0) { + tank.pubertyXY = 1; + if (tank.hormoneBalance > -500) { + tank.hormoneBalance -= 100; + } + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks all growth</span> despite the excess testosterone-laced growth hormones flooding ${his} body.`); + } else if (V.incubatorUpgradeSpeed === 52) { + if (tank.balls < 6) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to grow for extra cum production.</span>`); + tank.balls += 2; + } + if (tank.dick < 4 && random(1, 100) > 60) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } else if (V.incubatorUpgradeSpeed === 18) { + if (tank.balls < 6 && random(1, 100) > 50) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to grow for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 4 && random(1, 100) > 60) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } else if (V.incubatorUpgradeSpeed === 9) { + if (tank.balls < 6 && random(1, 100) > 60) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to balloon for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 4 && random(1, 100) > 70) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick += 2; + } + } else if (V.incubatorUpgradeSpeed === 6) { + if (tank.balls < 6 && random(1, 100) > 70) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to grow for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 4 && random(1, 100) > 80) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } else if (V.incubatorUpgradeSpeed === 5) { + if (tank.balls < 6 && random(1, 100) > 80) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} balls to grow for extra cum production.</span>`); + tank.balls++; + } + if (tank.dick < 4 && random(1, 100) > 90) { + r.push(`The excess testosterone-laced growth hormones <span class="green">cause ${his} penis to swell.</span>`); + tank.dick++; + } + } + } + } + } else if (V.incubatorReproductionSetting === 1) { + r.push(`${His} hormone levels are being carefully managed, <span class="green">encouraging early puberty.</span>`); + if (tank.ovaries === 1) { + tank.pubertyXX = 1; + tank.hormoneBalance = 250; + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks growth</span> despite the added estrogen.`); + } else { + if (tank.boobs < 400 && random(1, 100) > 60) { + r.push(`The added estrogen <span class="green">causes ${his} breasts to swell.</span>`); + tank.boobs += 50; + } + if (tank.hips < 2 && random(1, 100) > 90) { + r.push(`The added estrogen <span class="green">causes ${his} hips to widen.</span>`); + tank.hips++; + } + if (tank.butt < 5*rearQuirk && random(1, 100) > 80/rearQuirk) { + r.push(`The added estrogen <span class="green">causes ${his} butt to grow.</span>`); + tank.butt++; + } + } + } else if (tank.balls > 0) { + tank.pubertyXY = 1; + tank.hormoneBalance = -250; + if (tank.geneMods.NCS === 1) { + /* NCS blocks hormonal growth of all secondary sexual characteristics */ + r.push(`${His} <span class="orange">NCS blocks all growth</span> despite the added testosterone.`); + } else { + if (tank.balls < 3 && random(1, 100) > 80) { + r.push(`The added testosterone <span class="green">causes ${his} balls to swell.</span>`); + tank.balls++; + } + if (tank.dick < 3 && random(1, 100) > 60) { + r.push(`The added testosterone <span class="green">causes ${his} penis to grow.</span>`); + tank.dick++; + } + } + } + } else { + if (tank.hormoneBalance > 100) { + tank.hormoneBalance -= 50; + } else if (tank.hormoneBalance < -100) { + tank.hormoneBalance += 50; + } + if (tank.balls > 0) { + if (tank.balls > 1) { + tank.balls -= 5; + } + if (tank.dick > 1) { + tank.dick -= 5; + } + if (tank.balls <= 0) { + tank.balls = 1; + } + if (tank.dick <= 0) { + tank.dick = 1; + } + } + if (tank.boobs > 0) { + tank.boobs -= 500; + } + if (tank.butt > 0) { + tank.butt -= 4; + } + } + } else { + if (tank.hormoneBalance > 100) { + tank.hormoneBalance -= 50; + } else if (tank.hormoneBalance < -100) { + tank.hormoneBalance += 50; + } + if (tank.balls > 0) { + if (tank.balls > 1) { + tank.balls -= 5; + } + if (tank.dick > 1) { + tank.dick -= 5; + } + if (tank.balls <= 0) { + tank.balls = 1; + } + if (tank.dick <= 0) { + tank.dick = 1; + } + } + if (tank.boobs > 0) { + tank.boobs -= 500; + } + if (tank.butt > 0) { + tank.butt -= 4; + } + } + App.Events.addNode(entry, r, "div"); + + if (V.incubatorReproductionSetting === 2) { + tank.energy = 80; + tank.need = 100; + } else if (V.incubatorReproductionSetting === 1) { + tank.energy = 50; + tank.need = 20; + } else { + tank.energy = 0; + tank.need = 0; + } + + r = []; + if (((V.incubatorPregAdaptationSetting === 1 && tank.genes === "XX") || (V.incubatorPregAdaptationSetting === 2 && tank.genes === "XY") || V.incubatorPregAdaptationSetting === 3) && tank.growTime > 0) { + r.push(`The incubator is working on adapting ${his} abdomen and reproductive organs for future pregnancies.`); + + let _weekAdapt = tank.incubatorPregAdaptationInWeek * V.incubatorUpgradeSpeed; + if (isNaN(_weekAdapt)) { + /* NaN check AFTER multiply operation, against it result is critical here. Need to be absolutely sure about this operation, not about just tank property itself. This give me two very unpleasant hours to catch this */ + tank.incubatorPregAdaptationInWeek = (15000 / 2000 - tank.pregAdaptation) / tank.growTime; + } + _weekAdapt = tank.incubatorPregAdaptationInWeek * V.incubatorUpgradeSpeed; + /* Now it should be fine */ + _weekAdapt *= 1 + (V.incubatorReproductionSetting / 5); + _weekAdapt *= 1 + (tank.hormoneBalance / 1500); + tank.pregAdaptation += _weekAdapt; + /* here goes side effect from intense and extreme settings: */ + if (random(0, 100) <= (tank.incubatorPregAdaptationPower - 1) * (V.incubatorUpgradeSpeed / 2 + 1)) { + switch (random(1, 9)) { /* side effect selection*/ + case 1: + tank.preg = -2; + r.push(`It caused <span class="red">reproductive damage</span> when excessive meddling damaged an organ.`); + break; + case 2: + if (tank.ovaries === 1 || tank.mpreg === 1) { + tank.preg = -3; + } + if (tank.balls > 0) { + tank.ballType = "sterile"; + } + r.push(`It caused <span class="red">severe reproductive damage</span> when excessive hormones shut down the associated organs.`); + break; + case 3: + tank.lactation = 1; + r.push(`It has <span class="orange">triggered a hormonal disorder,</span> causing ${his} breast glands begin producing milk.`); + break; + case 4: + tank.bellySag = 100; + tank.bellySagPreg = 100; + r.push(`It activated <span class="red">emergency protocols</span> when overpressure to ${his} abdominal tissues and skin reached critical levels. ${His} belly has lost muscle tone and has begun to strongly sag.`); + break; + case 5: + tank.health.condition -= 15; + r.push(`Overzealous prodding caused some <span class="red">internal bleeding.</span>`); + break; + case 6: + tank.weight += 50; + r.push(`An unexpected shift in hormones spurred <span class="red">massive weight gain</span> before it could be corrected.`); + break; + case 7: + tank.weight -= 50; + r.push(`An unexpected shift in hormones spurred <span class="red">massive weight loss</span> before it could be corrected.`); + break; + case 8: + tank.boobs += 5000; + tank.boobShape = "saggy"; + r.push(`An unexpected shift in hormones encouraged <span class="green">explosive breast growth</span> before it could be corrected.`); + break; + case 9: + tank.hips = 3; + r.push(`A malfunction in the skeletal reconstruction software caused it to <span class="green">overwiden ${his} hips.</span>`); + break; + } + } + } + App.Events.addNode(entry, r, "div"); + + if (tank.preg > 0) { + App.UI.DOM.appendNewElement("span", entry, `The incubator is displaying an alert that ${he} may be pregnant.`, 'red'); + } + + tank.weight = Math.clamp(tank.weight, -100, 200); + tank.muscles = Math.clamp(tank.muscles, -100, 100); + tank.dick = Math.clamp(tank.dick, 0, 10); + tank.hips = Math.clamp(tank.hips, -2, 2); + tank.balls = Math.clamp(tank.balls, 0, 40); + tank.boobs = Math.clamp(tank.boobs, 25, 30000); + tank.height = Math.clamp(tank.height, 0, 274); + tank.hormoneBalance = Math.clamp(tank.hormoneBalance, -500, 500); + tank.foreskin = tank.dick; /* simple, clean way of making sure foreskins and scrotums grow appropriately */ + tank.scrotum = tank.balls; /* if we want dicks/balls to outgrow foreskins/scrotums, this will have to be removed */ + } + + return frag; +}; diff --git a/src/endWeek/masterSuiteReport.js b/src/endWeek/masterSuiteReport.js index e038db401dc6a3150eeec16cd35ced52f24c1e04..4678dac4dbf40f282843373dc9ce6f64c737a5ff 100644 --- a/src/endWeek/masterSuiteReport.js +++ b/src/endWeek/masterSuiteReport.js @@ -426,19 +426,16 @@ App.EndWeek.masterSuiteReport = function() { } if (S.Concubine) { + tired(S.Concubine); const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(S.Concubine, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, S.Concubine); slaveEntry.append(App.EndWeek.favoriteIcon(S.Concubine), " "); $(slaveEntry).append(concubineText(), commonText(S.Concubine)); } for (const slave of slaves) { const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(slaveEntry).append(nonConcubineText(slave), commonText(slave)); } diff --git a/src/endWeek/reports/arcadeReport.js b/src/endWeek/reports/arcadeReport.js index 4b7455f76a72c7197828b7cbb75f8eba182e8baa..4f0320b1402584589ef1aa5c7c250bacff1ab348 100644 --- a/src/endWeek/reports/arcadeReport.js +++ b/src/endWeek/reports/arcadeReport.js @@ -80,9 +80,7 @@ App.EndWeek.arcadeReport = function() { if (V.showEWD !== 0) { const {He} = getPronouns(slave); const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); r = []; r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name")); @@ -100,7 +98,7 @@ App.EndWeek.arcadeReport = function() { App.SlaveAssignment.workAGloryHole(slave), ], "div", - "indented" + "indent" ); } else { // discard return values silently @@ -129,7 +127,9 @@ App.EndWeek.arcadeReport = function() { } 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; @@ -176,11 +176,10 @@ App.EndWeek.arcadeReport = function() { deflate(slave); } if (V.showEWD !== 0) { - r.push(App.SlaveAssignment.standardSlaveReport(slave, false)); + el.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { App.SlaveAssignment.standardSlaveReport(slave, true); } - App.Events.addNode(el, r, "div", "indent"); } if (slavesLength + V.fuckdolls > 0) { diff --git a/src/endWeek/reports/cellblockReport.js b/src/endWeek/reports/cellblockReport.js index 4411600773899e36146c69c6abeea6e3655c900c..9ca2d1e6c1f39b92e1a19957e8f83796f8641e9f 100644 --- a/src/endWeek/reports/cellblockReport.js +++ b/src/endWeek/reports/cellblockReport.js @@ -168,12 +168,11 @@ App.EndWeek.cellblockReport = function() { if (S.Wardeness) { const slave = S.Wardeness; + tired(slave); /* apply following SA passages to facility leader */ if (V.showEWD !== 0) { const wardenessEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", wardenessEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(wardenessEntry, slave); wardenessEntry.append(App.EndWeek.favoriteIcon(slave), " "); App.Events.addNode( wardenessEntry, @@ -292,9 +291,7 @@ App.EndWeek.cellblockReport = function() { if (V.showEWD !== 0) { const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); r = []; r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name")); diff --git a/src/endWeek/reports/clubReport.js b/src/endWeek/reports/clubReport.js index 9f43989a3e6505c5a6476491c91ebc4da4903766..a17b960a166ea0e8f978b4f13c6a895ef17941b4 100644 --- a/src/endWeek/reports/clubReport.js +++ b/src/endWeek/reports/clubReport.js @@ -138,12 +138,11 @@ App.EndWeek.clubReport = function() { if (S.DJ) { const slave = S.DJ; + tired(slave); /* apply following SA passages to facility leader */ if (V.showEWD !== 0) { const DJEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", DJEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(DJEntry, slave); DJEntry.append(App.EndWeek.favoriteIcon(slave), " "); App.Events.addNode( DJEntry, @@ -195,9 +194,7 @@ App.EndWeek.clubReport = function() { if (V.showEWD !== 0) { const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); r = []; r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name")); @@ -217,7 +214,7 @@ App.EndWeek.clubReport = function() { App.SlaveAssignment.standardSlaveReport(slave, false) ], "div", - "indented" + "indent" ); } else { // discard return values silently @@ -227,7 +224,7 @@ App.EndWeek.clubReport = function() { } } - App.Events.addNode(el, [App.Ads.report("club")], "p", "indented"); + App.Events.addNode(el, [App.Ads.report("club")], "p", "indent"); // Record statistics gathering const b = V.facility.club; @@ -253,7 +250,7 @@ App.EndWeek.clubReport = function() { `${capFirstChar(V.clubName)}'s customers enjoy <span class="green">having sex in ${V.clubDecoration} surroundings.</span>` ], "p", - "indented" + "indent" ); } diff --git a/src/endWeek/reports/dairyReport.js b/src/endWeek/reports/dairyReport.js index 78b75d9d63353f74f24a0ee70f0da9298894f467..bf6bd68443716c2182612854efeb733ec0300ecc 100644 --- a/src/endWeek/reports/dairyReport.js +++ b/src/endWeek/reports/dairyReport.js @@ -365,9 +365,7 @@ App.EndWeek.dairyReport = function() { /* apply following SA passages to facility leader */ if (V.showEWD !== 0) { const milkMaidEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", milkMaidEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(milkMaidEntry, slave); milkMaidEntry.append(App.EndWeek.favoriteIcon(slave), " "); App.Events.addNode( milkMaidEntry, @@ -490,9 +488,7 @@ App.EndWeek.dairyReport = function() { cumWeek += milkResults.cum; if (V.showEWD !== 0) { const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); r = []; r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name")); diff --git a/src/endWeek/reports/nurseryReport.js b/src/endWeek/reports/nurseryReport.js index 13d315fe65c1d9ec2e980f3b7ec9c2e782fc4410..aee524cb6f5b6968fc9f335f504a03ed4c6e5365 100644 --- a/src/endWeek/reports/nurseryReport.js +++ b/src/endWeek/reports/nurseryReport.js @@ -135,19 +135,14 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { } if (S.Matron) { - /** @type {App.Entity.SlaveState} */ const slave = S.Matron; if (V.showEWD !== 0) { const matronEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", matronEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } - + App.SlaveAssignment.appendSlaveArt(matronEntry, slave); matronEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(matronEntry).append(`<span class="slave-name">${SlaveFullName(slave)}</span> is serving as your Matron.`); - $(matronEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + matronEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { App.SlaveAssignment.standardSlaveReport(slave, true); } @@ -200,11 +195,7 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { if (V.showEWD) { const {He} = getPronouns(slave); const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } - + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(slaveEntry).append(`<span class="slave-name">${SlaveFullName(slave)}</span> `); @@ -218,7 +209,7 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { $(nannyContent).append(`${He} ${App.SlaveAssignment.nanny(slave, matronBonus)}`); // FIXME: nanny() takes one argument - $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { // silently discard return values App.SlaveAssignment.nanny(slave, matronBonus); // FIXME: nanny() takes one argument App.SlaveAssignment.standardSlaveReport(slave, true); diff --git a/src/endWeek/reports/penthouseReport.js b/src/endWeek/reports/penthouseReport.js index 776b0e6cf67bd4a21d324de2cb12a13826c923ff..bfc2e5e8d508abdba50cec15fbf92cd94ecc820d 100644 --- a/src/endWeek/reports/penthouseReport.js +++ b/src/endWeek/reports/penthouseReport.js @@ -1,38 +1,49 @@ App.EndWeek.penthouseReport = function() { const el = document.createElement("p"); - let r; const HGSuiteSlaves = App.Utils.jobForAssignment(Job.HEADGIRLSUITE).employees(); + const hgSlave = HGSuiteSlaves.length > 0 ? HGSuiteSlaves[0] : null; const HGTrainSlavesIDs = slavesToTrain(); + // penthouse images are larger and on the right (for some reason), so we need to initialize a second batch renderer instead of using the global SA Report one + let penthouseArtRenderer = null; + if (V.seeImages && V.seeReportImages) { + const penthouseArtSlaveIDs = V.slaves.filter(s => assignmentVisible(s)).map(s => s.ID); + if (hgSlave) { + penthouseArtSlaveIDs.push(hgSlave.ID); + } + penthouseArtRenderer = new App.Art.SlaveArtBatch(penthouseArtSlaveIDs, 2); + el.append(penthouseArtRenderer.writePreamble()); + } + for (const slave of V.slaves) { if (assignmentVisible(slave)) { - r = []; const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); + if (penthouseArtRenderer) { + App.UI.DOM.appendNewElement("div", slaveEntry, penthouseArtRenderer.render(slave), ["imageRef", "medImg"]); } slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); - r.push(fullReport(slave)); - App.Events.addNode(el, r, "p"); + slaveEntry.append(fullReport(slave)); - if (slave.ID === V.HeadGirlID && HGSuiteSlaves.length > 0) { - /* We found the Head Girl, now let's find her slave */ - const hgSlave = getSlave(HGSuiteSlaves[0].ID); + if (slave.ID === V.HeadGirlID && hgSlave) { + /* Output the HG's slave immediately after the hg */ const {He2, he2} = getPronouns(hgSlave).appendSuffix("2"); - r = []; - if (hgSlave.assignment !== "live with your Head Girl") { + const r = []; + if (hgSlave.assignment !== Job.HEADGIRLSUITE) { r.push(`<span class="red">${hgSlave.slaveName} had been assigned to live with your Head Girl, but this week ${he2} was assigned to ${hgSlave.assignment}. ${He2} has been released to your penthouse for reassignment.</span>`); - removeJob(hgSlave, "live with your Head Girl"); + removeJob(hgSlave, Job.HEADGIRLSUITE); } else { r.push(App.UI.DOM.makeElement("span", SlaveFullName(hgSlave), "slave-name")); if (hgSlave.choosesOwnAssignment === 2) { r.push(App.SlaveAssignment.choosesOwnJob(hgSlave)); r.push(He2); } + if (penthouseArtRenderer) { + r.push(App.UI.DOM.makeElement("div", penthouseArtRenderer.render(hgSlave), ["imageRef", "medImg"])); + } r.push(App.SlaveAssignment.liveWithHG(hgSlave)); } - App.Events.addNode(el, r, "p"); + App.Events.addNode(el, r, "div", "slave-report"); } } } @@ -56,7 +67,6 @@ App.EndWeek.penthouseReport = function() { } = getPronouns(slave); let r = []; let milkResults; - let milkResult; r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name")); if (slave.choosesOwnAssignment === 2) { @@ -125,7 +135,7 @@ App.EndWeek.penthouseReport = function() { r.push(`is forced to use`); } r.push(`the penthouse milkers frequently,`); - milkResult = App.SlaveAssignment.getMilked(slave, 0.5); + milkResults = App.SlaveAssignment.getMilked(slave, 0.5); } else { r.push(`keeps ${him} busy, but ${he}`); if (slave.devotion > 20) { @@ -139,25 +149,29 @@ App.EndWeek.penthouseReport = function() { r.push(`is forced to use`); } r.push(`the penthouse milkers whenever ${he} can,`); - milkResult = App.SlaveAssignment.getMilked(slave, 0.25); + milkResults = App.SlaveAssignment.getMilked(slave, 0.25); } - r.push(`and ${he} gives ${milkResult.milk} liters of milk over the week, which is sold for <span class="yellowgreen">${cashFormat(milkResult.milkSale)}.</span>`); + r.push(`and ${he} gives ${milkResults.milk} liters of milk over the week, which is sold for <span class="yellowgreen">${cashFormat(milkResults.milkSale)}.</span>`); } App.Events.addNode(el, r, "div"); - r = []; - if (slave.minorInjury !== 0) { - r.push(`${His} ${slave.minorInjury} will heal by the end of the week.`); - } if (V.showEWD !== 0) { - r.push(App.SlaveAssignment.standardSlaveReport(slave, false)); + r = []; + if (slave.minorInjury !== 0) { + r.push(`${His} ${slave.minorInjury} will heal by the end of the week.`); + } + r.push(App.SlaveAssignment.choosesOwnClothes(slave)); + r.push(...App.SlaveAssignment.individualSlaveReport(slave)); + App.Events.addNode(el, r, "div", "indent"); } else { // discard return values silently - App.SlaveAssignment.standardSlaveReport(slave, true); + App.SlaveAssignment.choosesOwnClothes(slave); + App.SlaveAssignment.individualSlaveReport(slave); } - if (V.PC.health.shortDamage < 30 && Array.isArray(V.personalAttention) && V.personalAttention.findIndex(function(s) { return s.ID === slave.ID; }) !== -1) { + r = []; + if (V.PC.health.shortDamage < 30 && Array.isArray(V.personalAttention) && V.personalAttention.some(s => s.ID === slave.ID)) { r.push(personalAttention(slave)); } @@ -168,7 +182,7 @@ App.EndWeek.penthouseReport = function() { } } - r.push(App.SlaveAssignment.devotion(slave)); + r.push(`<div class="indent">${App.SlaveAssignment.devotion(slave)}</div>`); App.Events.addNode(el, r); return el; } @@ -615,6 +629,9 @@ App.EndWeek.penthouseReport = function() { } } + /** + * @returns {FC.HeadGirlTrainee[]} + */ function slavesToTrain() { if (S.HeadGirl) { /** @type {FC.HeadGirlTrainee[][]} */ @@ -676,6 +693,7 @@ App.EndWeek.penthouseReport = function() { } } } + // @ts-ignore - SC's flatten() is not typed correctly return HGPossibleSlaves.flatten().slice(0, App.EndWeek.saVars.HGEnergy); } else { return []; diff --git a/src/endWeek/reports/spaReport.js b/src/endWeek/reports/spaReport.js index b1cbd22ac63c7dda95ec86f27fd9482ce8aba24e..d1b9eee884326939d6862e1792dda986beb843d6 100644 --- a/src/endWeek/reports/spaReport.js +++ b/src/endWeek/reports/spaReport.js @@ -283,12 +283,11 @@ App.EndWeek.spaReport = function() { if (S.Attendant) { const slave = S.Attendant; + tired(slave); /* apply following SA passages to facility leader */ if (V.showEWD !== 0) { const attendantEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", attendantEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(attendantEntry, slave); attendantEntry.append(App.EndWeek.favoriteIcon(slave), " "); App.Events.addNode( attendantEntry, @@ -373,9 +372,7 @@ App.EndWeek.spaReport = function() { if (V.showEWD !== 0) { const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); r = []; r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name")); diff --git a/src/endWeek/reportsTW/arcadeReport.tw b/src/endWeek/reportsTW/arcadeReport.tw deleted file mode 100644 index 148369a2fec675ff39744ceb9110aad1d82f191c..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/arcadeReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Arcade Report [nobr] - -<<includeDOM App.EndWeek.arcadeReport()>> diff --git a/src/endWeek/reportsTW/brothelReport.tw b/src/endWeek/reportsTW/brothelReport.tw deleted file mode 100644 index 933e96f16f578fec98c6942a03cf9cd7f0223036..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/brothelReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Brothel Report [nobr] - -<<includeDOM brothelReport()>> diff --git a/src/endWeek/reportsTW/cellblockReport.tw b/src/endWeek/reportsTW/cellblockReport.tw deleted file mode 100644 index 7982248f27c1b82c67f742f925b2cec4f66f0de7..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/cellblockReport.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Cellblock Report [nobr] - -/* This passage probably isn't really necessary but it helps organize the profiler output. - * TODO: Once all the facility reports look like this, we should probably get rid of these intermediate passages. */ -<<includeDOM App.EndWeek.cellblockReport()>> diff --git a/src/endWeek/reportsTW/childrenReport.tw b/src/endWeek/reportsTW/childrenReport.tw deleted file mode 100644 index 25e61aba4a5364839ca02d639891c2e218bf7350..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/childrenReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Children Report [nobr] - -<<includeDOM App.Facilities.Nursery.childrenReport()>> diff --git a/src/endWeek/reportsTW/clinicReport.tw b/src/endWeek/reportsTW/clinicReport.tw deleted file mode 100644 index 8478322d5f928bfaa5782fe62866fe04b2d7989d..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/clinicReport.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Clinic Report [nobr] - -/* This passage probably isn't really necessary but it helps organize the profiler output. - * TODO: Once all the facility reports look like this, we should probably get rid of these intermediate passages. */ -<<includeDOM App.EndWeek.clinicReport()>> diff --git a/src/endWeek/reportsTW/clubReport.tw b/src/endWeek/reportsTW/clubReport.tw deleted file mode 100644 index c345a8117e0533450cebafdeec7c0338106ce2b7..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/clubReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Club Report [nobr] - -<<includeDOM App.EndWeek.clubReport()>> diff --git a/src/endWeek/reportsTW/dairyReport.tw b/src/endWeek/reportsTW/dairyReport.tw deleted file mode 100644 index c299f843e0c2d1a866783854c32efe328bb221be..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/dairyReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Dairy Report [nobr] - -<<includeDOM App.EndWeek.dairyReport()>> diff --git a/src/endWeek/reportsTW/farmyardReport.tw b/src/endWeek/reportsTW/farmyardReport.tw deleted file mode 100644 index f1f3443c0b0576a383498b8498646cc3c34cac52..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/farmyardReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Farmyard Report [nobr] - -<<includeDOM App.Facilities.Farmyard.farmyardReport()>> diff --git a/src/endWeek/reportsTW/masterSuiteReport.tw b/src/endWeek/reportsTW/masterSuiteReport.tw deleted file mode 100644 index de0391e8f8020139f88db5f4421f60af6b01f701..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/masterSuiteReport.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Master Suite Report [nobr] - -/* This passage probably isn't really necessary but it helps organize the profiler output. - * TODO: Once all the facility reports look like this, we should probably get rid of these intermediate passages. */ -<<includeDOM App.EndWeek.masterSuiteReport()>> diff --git a/src/endWeek/reportsTW/nurseryReport.tw b/src/endWeek/reportsTW/nurseryReport.tw deleted file mode 100644 index 4f318e0e1c9fdfb0c96f0fbea11a23034881c267..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/nurseryReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Nursery Report [nobr] - -<<includeDOM App.Facilities.Nursery.nurseryReport()>> diff --git a/src/endWeek/reportsTW/penthouseReport.tw b/src/endWeek/reportsTW/penthouseReport.tw deleted file mode 100644 index 76857d1b84df48b6af0145a9a63d34104bf78731..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/penthouseReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Penthouse Report [nobr] - -<<includeDOM App.EndWeek.penthouseReport()>> diff --git a/src/endWeek/reportsTW/schoolroomReport.tw b/src/endWeek/reportsTW/schoolroomReport.tw deleted file mode 100644 index 2d651a8e6642991fa209ba41e731453c85bff245..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/schoolroomReport.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Schoolroom Report [nobr] - -/* This passage probably isn't really necessary but it helps organize the profiler output. - * TODO: Once all the facility reports look like this, we should probably get rid of these intermediate passages. */ -<<includeDOM App.EndWeek.schoolroomReport()>> diff --git a/src/endWeek/reportsTW/servantsQuartersReport.tw b/src/endWeek/reportsTW/servantsQuartersReport.tw deleted file mode 100644 index 6abf6fc4e9d59aec7819e2b6c0eaa63e013633f6..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/servantsQuartersReport.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Servants' Quarters Report [nobr] - -/* This passage probably isn't really necessary but it helps organize the profiler output. - * TODO: Once all the facility reports look like this, we should probably get rid of these intermediate passages. */ -<<includeDOM App.EndWeek.servantsQuartersReport()>> diff --git a/src/endWeek/reportsTW/spaReport.tw b/src/endWeek/reportsTW/spaReport.tw deleted file mode 100644 index 66addcfb79267c42028517494fb0128cb299fc59..0000000000000000000000000000000000000000 --- a/src/endWeek/reportsTW/spaReport.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Spa Report [nobr] - -<<includeDOM App.EndWeek.spaReport()>> diff --git a/src/endWeek/saChoosesOwnJob.js b/src/endWeek/saChoosesOwnJob.js index 5291eb2344ea5b066f5800391c37ef6365be8464..a4d853fcfcadd45bf222189bdece0b6f05b1da76 100644 --- a/src/endWeek/saChoosesOwnJob.js +++ b/src/endWeek/saChoosesOwnJob.js @@ -82,7 +82,7 @@ App.SlaveAssignment.choosesOwnJob = (function() { choice.push(removeJob(slave, slave.assignment)); } } else { - choice.push(`<span class="job change">decides to rest</span>, taking advantage of your permission to <span class="devotion dec">remain indolent.</span>`); + choice.push(`<span class="job change">decides to rest,</span> taking advantage of your permission to <span class="devotion dec">remain indolent.</span>`); choice.push(removeJob(slave, slave.assignment)); } slave.devotion -= 5; diff --git a/src/endWeek/saLiveWithHG.js b/src/endWeek/saLiveWithHG.js index bd6c5eb51b69c7149e92987115ce40d674ab77f3..2e6b5d27777e4581746bed545b083eac9a068071 100644 --- a/src/endWeek/saLiveWithHG.js +++ b/src/endWeek/saLiveWithHG.js @@ -49,10 +49,6 @@ App.SlaveAssignment.liveWithHG = (function() { penetrativeUse = 0; cervixPump = 0; - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", el, App.Art.SlaveArtElement(slave, 2, 0), ["imageRef", "medImg"]); - } - HGSetsDiet(slave, S.HeadGirl); if (V.HGSuiteHormones !== 0) { HGSetsHormones(slave, S.HeadGirl); @@ -1625,24 +1621,14 @@ App.SlaveAssignment.liveWithHG = (function() { function slaveReport(slave) { if (V.showEWD === 0) { /* App.SlaveAssignment.choosesOwnClothes(slave) */ - App.SlaveAssignment.rules(slave); - App.SlaveAssignment.diet(slave); - App.SlaveAssignment.longTermEffects(slave); - App.SlaveAssignment.drugs(slave); - App.SlaveAssignment.relationships(slave); - App.SlaveAssignment.rivalries(slave); + App.SlaveAssignment.individualSlaveReport(slave); App.SlaveAssignment.devotion(slave); } else { /* App.SlaveAssignment.choosesOwnClothes(slave) */ const content = App.UI.DOM.makeElement("div", '', "indent"); $(content).append( - App.SlaveAssignment.rules(slave), - App.SlaveAssignment.diet(slave), - App.SlaveAssignment.longTermEffects(slave), - App.SlaveAssignment.drugs(slave), - App.SlaveAssignment.relationships(slave), - App.SlaveAssignment.rivalries(slave), - `<div class="indent">${App.SlaveAssignment.devotion(slave)}</span>`); + ...App.Events.spaceSentences(App.SlaveAssignment.individualSlaveReport(slave)), + `<div class="indent">${App.SlaveAssignment.devotion(slave)}</div>`); r.push(content); } } diff --git a/src/endWeek/saRelationships.js b/src/endWeek/saRelationships.js index 38cf71f30eebc29217eb33b9a90439f20a4c727c..2fa47bd4136b865d927f72b97694b5c5429a68ae 100644 --- a/src/endWeek/saRelationships.js +++ b/src/endWeek/saRelationships.js @@ -5,8 +5,6 @@ App.SlaveAssignment.relationships = (function() { // eslint-disable-next-line no-unused-vars let he, him, his, himself, He, His, wife, woman; - // eslint-disable-next-line no-unused-vars - let he2, him2, his2, girl2, wife2, He2; let playerPronouns; let PC; @@ -154,10 +152,8 @@ App.SlaveAssignment.relationships = (function() { if (randomSeed > 75) { let resentment = 0; for (const potentialFriend of V.slaves) { - ({ - he2, him2, his2, girl2, He2 - } = getPronouns(potentialFriend).appendSuffix("2")); if (canStartFriendship(slave, potentialFriend) && potentialFriend.assignment !== Job.CONFINEMENT) { + const {him2, He2} = getPronouns(potentialFriend).appendSuffix("2"); if (potentialFriend.ID === V.MadamID && slave.assignment === Job.BROTHEL) { if (potentialFriend.rules.relationship !== "restrictive" && silverTongue(potentialFriend, manipulationSkill)) { r.push(`${slave.slaveName} manages to ingratiate ${himself} with the Madam, ${potentialFriend.slaveName}. The two slaves have <span class="relationship">struck up a friendship.</span>`); @@ -285,10 +281,10 @@ App.SlaveAssignment.relationships = (function() { } } } else if (mutualChildren(slave, potentialFriend, V.slaves) > 0) { - if (App.Utils.sexAllowed(slave, potentialFriend)) { - if (potentialFriend.rules.relationship === "permissive") { + if (App.Utils.sexAllowed(slave, potentialFriend)) { + if (potentialFriend.rules.relationship === "permissive") { r.push(`${slave.slaveName} and ${potentialFriend.slaveName} have`); - if (mutualChildren(slave, potentialFriend, V.slaves) === 0) { + if (mutualChildren(slave, potentialFriend, V.slaves) === 1) { r.push(`a child`); } else { r.push(`children`); @@ -350,10 +346,11 @@ App.SlaveAssignment.relationships = (function() { * */ function existingRelationship(slave) { + let him2, his2, wife2; if (slave.relationship > 0) { friend = getSlave(slave.relationshipTarget); ({ - he2, him2, his2, girl2, He2 + him2, his2 } = getPronouns(friend).appendSuffix("2")); } if (slave.fetish === "mindbroken" && slave.relationship !== -3) { @@ -972,9 +969,9 @@ App.SlaveAssignment.relationships = (function() { */ function consummateRelationship(slave) { let lover = getSlave(slave.relationshipTarget); - ({ - he2, him2, his2, girl2, He2, wife2 - } = getPronouns(lover).appendSuffix("2")); + const { + he2, him2, his2, girl2, wife2 + } = getPronouns(lover).appendSuffix("2"); incestReactions(slave, lover); if (App.Utils.sexAllowed(slave, lover)) { @@ -1180,36 +1177,154 @@ App.SlaveAssignment.relationships = (function() { * */ function familyFeelings(slave) { + /** @param {Map<string, Array<App.Entity.SlaveState>>} map + * @param {App.Entity.SlaveState} relative */ + function addToRelativeMap(map, relative) { + const term = relativeTerm(slave, relative); + if (!map.has(term)) { + map.set(term, [relative]); + } else { + map.get(term).push(relative); + } + } + + /** @param {Map<string, Array<App.Entity.SlaveState>>} map + * @returns {Array<string>} */ + function relativeMapToGroupArray(map) { + let groups = []; + for (const [type, people] of map) { + if (people.length > 1) { + groups.push(`${his} ${type}s ${arrayToSentence(people.map(s => s.slaveName))}`); + } else { + groups.push(`${his} ${type} ${people[0].slaveName}`); + } + } + return groups; + } + + /** @param {Map<string, Array<App.Entity.SlaveState>>} map + * @returns {App.Entity.SlaveState} */ + function singleRelativeInMap(map) { + if (map.size !== 1) { + return null; + } + /** @type {App.Entity.SlaveState[]} */ + const slavesOfType = map.values().next().value; + if (slavesOfType.length !== 1) { + return null; + } + return slavesOfType[0]; + } + + /** @param {Map<string, Array<App.Entity.SlaveState>>} map + * @returns {number} */ + function relativeMapTotalSize(map) { + let size = 0; + for (const people of map.values()) { + size += people.length; + } + return size; + } + + const overwhelmed = 5; if (slave.trust <= 95) { - let relatives = V.slaves.filter((s) => areRelated(slave, s)); // Is it possible to move this into the loop? - for (const relative of relatives) { - ({ - he2, him2 - } = getPronouns(relative).appendSuffix("2")); - if (slave.trust < -20) { + let relatives = V.slaves.filter((s) => areRelated(slave, s)); + if (slave.trust < -20) { + /** @type {Array<App.Entity.SlaveState>} */ + const worriedAboutChildren = []; + /** @type {Map<string, Array<App.Entity.SlaveState>>} */ + const worriedAboutRelatives = new Map(); + for (const relative of relatives) { if (slave.rivalryTarget !== relative.ID) { if (isParentP(relative, slave)) { - r.push(`${slave.slaveName} is <span class="trust dec">agonizingly aware</span> that ${his} child ${relative.slaveName} is also your slave and might suffer if either of them angers you, and <span class="devotion inc">does ${his} best</span> to protect ${him2}.`); - slave.trust -= 2; - slave.devotion += 6; + worriedAboutChildren.push(relative); + if (worriedAboutChildren.length <= overwhelmed) { + slave.trust -= 2; + slave.devotion += 6; + } } else { - r.push(`${slave.slaveName} is <span class="trust dec">painfully conscious</span> that ${his} ${relativeTerm(slave, relative)} ${relative.slaveName} is also your slave and might suffer if either of them displeases you, and <span class="devotion inc">tries to obey</span> as best ${he} can.`); - slave.trust -= 1; - slave.devotion += 3; + addToRelativeMap(worriedAboutRelatives, relative); + if (relativeMapTotalSize(worriedAboutRelatives) <= overwhelmed) { + slave.trust -= 1; + slave.devotion += 3; + } } } - } else { - r.push(`${slave.slaveName} knows that ${his} ${relativeTerm(slave, relative)} ${relative.slaveName}`); + } + if (worriedAboutChildren.length > 1) { + r.push(`${slave.slaveName} is <span class="trust dec">agonizingly aware</span> that ${his} children ${arrayToSentence(worriedAboutChildren.map(s => s.slaveName))} are also your slaves and might suffer if any of them angers you, and <span class="devotion inc">does ${his} best</span> to protect them.`); + } else if (worriedAboutChildren.length > 0) { + const {him2} = getPronouns(worriedAboutChildren[0]).appendSuffix("2"); + r.push(`${slave.slaveName} is <span class="trust dec">agonizingly aware</span> that ${his} child ${worriedAboutChildren[0].slaveName} is also your slave and might suffer if either of them angers you, and <span class="devotion inc">does ${his} best</span> to protect ${him2}.`); + } + if (worriedAboutChildren.length > overwhelmed) { + r.push(`${He} has so many children to worry about that ${he} is overwhelmed with fear and <span class="trust inc">forced to trust you.</span>`); + } + let singleRelative = singleRelativeInMap(worriedAboutRelatives); + if (singleRelative) { + r.push(`${slave.slaveName} is <span class="trust dec">painfully conscious</span> that ${his} ${relativeTerm(slave, singleRelative)} ${singleRelative.slaveName} is also your slave and might suffer if either of them displeases you, and <span class="devotion inc">tries to obey</span> as best ${he} can.`); + } else if (worriedAboutRelatives.size > 0) { + const groups = relativeMapToGroupArray(worriedAboutRelatives); + r.push(`${slave.slaveName} is <span class="trust dec">painfully conscious</span> that ${arrayToSentence(groups)} are also your slaves and might suffer if any of them displeases you, and <span class="devotion inc">tries to obey</span> as best ${he} can.`); + } + if (relativeMapTotalSize(worriedAboutRelatives) > overwhelmed) { + r.push(`${He} has so many relatives to worry about that ${he} is overwhelmed with fear and <span class="trust inc">forced to trust you.</span>`); + } + } else { + /** @type {Map<string, Array<App.Entity.SlaveState>>} */ + const devotedRelatives = new Map(); + /** @type {Map<string, Array<App.Entity.SlaveState>>} */ + const obedientRelatives = new Map(); + /** @type {Map<string, Array<App.Entity.SlaveState>>} */ + const hatefulRelatives = new Map(); + for (const relative of relatives) { if (relative.devotion > 50) { - r.push(`loves being your sex slave, and is <span class="devotion inc">happy</span> for ${him2}.`); - slave.devotion += 4; + addToRelativeMap(devotedRelatives, relative); + if (relativeMapTotalSize(devotedRelatives) <= overwhelmed) { + slave.devotion += 4; + } } else if (relative.devotion > 20 || relative.trust < -20) { - r.push(`is an obedient sex slave, and hopes ${he2}'ll avoid punishment.`); + addToRelativeMap(obedientRelatives, relative); } else { - r.push(`hates being a sex slave, and is <span class="trust dec">afraid</span> for ${him2}.`); - slave.trust -= 1; + addToRelativeMap(hatefulRelatives, relative); + if (relativeMapTotalSize(hatefulRelatives) <= overwhelmed) { + slave.trust -= 1; + } } } + let singleRelative = singleRelativeInMap(devotedRelatives); + if (singleRelative) { + const {him2} = getPronouns(singleRelative).appendSuffix('2'); + r.push(`${slave.slaveName} knows that ${his} ${relativeTerm(slave, singleRelative)} ${singleRelative.slaveName} loves being your sex slave, and is <span class="devotion inc">happy</span> for ${him2}.`); + } else if (devotedRelatives.size > 0) { + const groups = relativeMapToGroupArray(devotedRelatives); + r.push(`${slave.slaveName} knows that ${arrayToSentence(groups)} all love being your sex slaves, and is <span class="devotion inc">happy</span> for them.`); + } + if (relativeMapTotalSize(devotedRelatives) > overwhelmed) { + r.push(`${He} has so many relatives that love being your slaves that ${he} is sometimes overwhelmed with joy and <span class="devotion dec">neglects ${his} duties.</span>`); + } + singleRelative = singleRelativeInMap(obedientRelatives); + if (singleRelative) { + const {he2} = getPronouns(singleRelative).appendSuffix('2'); + r.push(`${slave.slaveName} knows that ${his} ${relativeTerm(slave, singleRelative)} ${singleRelative.slaveName} is an obedient sex slave, and hopes ${he2}'ll avoid punishment.`); + } else if (obedientRelatives.size > 0) { + const groups = relativeMapToGroupArray(obedientRelatives); + r.push(`${slave.slaveName} knows that ${arrayToSentence(groups)} are obedient sex slaves, and hopes they'll avoid punishment.`); + } + if (relativeMapTotalSize(obedientRelatives) > overwhelmed) { + r.push(`${He} has so many obedient relatives that ${he} sometimes forgets about some of them.`); + } + singleRelative = singleRelativeInMap(hatefulRelatives); + if (singleRelative) { + const {him2} = getPronouns(singleRelative).appendSuffix('2'); + r.push(`${slave.slaveName} knows that ${his} ${relativeTerm(slave, singleRelative)} ${singleRelative.slaveName} hates being a sex slave, and is <span class="trust dec">afraid</span> for ${him2}.`); + } else if (hatefulRelatives.size > 0) { + const groups = relativeMapToGroupArray(hatefulRelatives); + r.push(`${slave.slaveName} knows that ${arrayToSentence(groups)} all hate being sex slaves, and is <span class="trust dec">afraid</span> for them.`); + } + if (relativeMapTotalSize(hatefulRelatives) > overwhelmed) { + r.push(`${He} has so many relatives that hate being your sex slaves that ${he} is overwhelmed with fear and <span class="trust inc">just has to trust you to take care of them.</span>`); + } } } } diff --git a/src/endWeek/saSharedVariables.js b/src/endWeek/saSharedVariables.js index 8fc356b65590ba174514ca70dc37f606a8d39e32..81608508ffef26ba0ac0ef0768900c84b5ac28bf 100644 --- a/src/endWeek/saSharedVariables.js +++ b/src/endWeek/saSharedVariables.js @@ -34,6 +34,8 @@ App.EndWeek.SASharedVariables = class { * @type {Map<number, Array<number>>} - key is sub target, value is list of sub slaves (by ID) assigned to that target */ this.subSlaveMap = new Map(); + /** Slave art manager */ + this.slaveArt = null; } /** diff --git a/src/endWeek/schoolroomReport.js b/src/endWeek/schoolroomReport.js index 9e675864fcd23d341a6c07bfe82b079bf6ec48ef..5d315659318314ca212d75e3290b5a3c069a2f2e 100644 --- a/src/endWeek/schoolroomReport.js +++ b/src/endWeek/schoolroomReport.js @@ -146,15 +146,14 @@ App.EndWeek.schoolroomReport = function() { if (S.Schoolteacher) { const slave = S.Schoolteacher; + tired(slave); /* apply following SA passages to facility leader */ if (V.showEWD !== 0) { const schoolteacherEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", schoolteacherEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(schoolteacherEntry, slave); schoolteacherEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(schoolteacherEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> is serving as your Schoolteacher.`); - $(schoolteacherEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + schoolteacherEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { App.SlaveAssignment.standardSlaveReport(slave, true); } @@ -224,9 +223,7 @@ App.EndWeek.schoolroomReport = function() { if (V.showEWD !== 0) { const {He} = getPronouns(slave); const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(slaveEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> `); if (slave.choosesOwnAssignment === 2) { @@ -242,7 +239,7 @@ App.EndWeek.schoolroomReport = function() { } const studentContent = App.UI.DOM.appendNewElement("div", slaveEntry, '', "indent"); $(studentContent).append(`${He} ${App.SlaveAssignment.takeClasses(slave)}`); - $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { // discard return values silently App.SlaveAssignment.choosesOwnJob(slave); diff --git a/src/endWeek/servantsQuartersReport.js b/src/endWeek/servantsQuartersReport.js index 75a67b0b63ebbe5938e3eb7b0f912a9201302f96..ed62fd974357a2d83461cbddee1cca40c44c5067 100644 --- a/src/endWeek/servantsQuartersReport.js +++ b/src/endWeek/servantsQuartersReport.js @@ -204,17 +204,15 @@ App.EndWeek.servantsQuartersReport = function() { } if (S.Stewardess) { - /** @type {App.Entity.SlaveState} */ const slave = S.Stewardess; + tired(slave); /* apply following SA passages to facility leader */ if (V.showEWD !== 0) { const stewardessEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", stewardessEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(stewardessEntry, slave); stewardessEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(stewardessEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> is serving as your Stewardess.`); - $(stewardessEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + stewardessEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { App.SlaveAssignment.standardSlaveReport(slave, true); } @@ -284,9 +282,7 @@ App.EndWeek.servantsQuartersReport = function() { if (V.showEWD !== 0) { const {He} = getPronouns(slave); const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(slaveEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> `); if (slave.choosesOwnAssignment === 2) { @@ -303,7 +299,7 @@ App.EndWeek.servantsQuartersReport = function() { SQMilk += milkResults.milk; SQMilkSale += milkResults.milkSale; } - $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { // discard return values silently App.SlaveAssignment.choosesOwnJob(slave); diff --git a/src/endWeek/slaveAssignmentReport.js b/src/endWeek/slaveAssignmentReport.js index ae7220bd60721c1f53d29463e153c8e261b7436c..50d790cfc378cfce2a45af9bc62caf335216100f 100644 --- a/src/endWeek/slaveAssignmentReport.js +++ b/src/endWeek/slaveAssignmentReport.js @@ -232,6 +232,16 @@ App.EndWeek.slaveAssignmentReport = function() { } } + // initialize slave art + if (V.seeImages && V.seeReportImages) { + // agents and partners are not drawn; penthouse partners and the head girl's slave will be drawn via a different mechanism (since they are larger and right-aligned) + const undrawnJobs = [Job.AGENT, Job.AGENTPARTNER, ...App.Entity.facilities.penthouse.jobsNames, Job.HEADGIRLSUITE]; + const drawnSlaveIDs = V.slaves.filter(s => !undrawnJobs.includes(s.assignment)).map(s => s.ID); + // this batch renderer object will be accessible to all the facility reports + App.EndWeek.saVars.slaveArt = new App.Art.SlaveArtBatch(drawnSlaveIDs, 0); + res.append(App.EndWeek.saVars.slaveArt.writePreamble()); + } + /** * Accordion * @version 0.7RC @@ -239,7 +249,7 @@ App.EndWeek.slaveAssignmentReport = function() { * * @param array _facListArr * Multidimensional temporary array - * 0: The SC passage name or DOM function for the facility's report + * 0: The DOM function for the facility's report * 1: A facility object, or the title of the report if there is no facility object * 2: If there is no facility object, a truthy value indicating whether the facility exists * 3: If there is no facility object, the maximum capacity of the facility @@ -251,21 +261,21 @@ App.EndWeek.slaveAssignmentReport = function() { */ const facListArr = [ - ["Arcade Report", App.Entity.facilities.arcade], - ["Brothel Report", App.Entity.facilities.brothel], - ["Cellblock Report", App.Entity.facilities.cellblock], - ["Clinic Report", App.Entity.facilities.clinic], - ["Club Report", App.Entity.facilities.club], - ["Dairy Report", App.Entity.facilities.dairy], - ["Farmyard Report", App.Entity.facilities.farmyard], - ["Schoolroom Report", App.Entity.facilities.schoolroom], - ["Spa Report", App.Entity.facilities.spa], - ["Servants' Quarters Report", App.Entity.facilities.servantsQuarters], - ["Nursery Report", App.Entity.facilities.nursery], - ["Children Report", "Nursery Children", V.nursery, V.nurseryChildren], - ["Incubator Report", App.Entity.facilities.incubator], - ["Master Suite Report", App.Entity.facilities.masterSuite], - ["Penthouse Report", "The Penthouse"], + [App.EndWeek.arcadeReport, App.Entity.facilities.arcade], + [App.EndWeek.brothelReport, App.Entity.facilities.brothel], + [App.EndWeek.cellblockReport, App.Entity.facilities.cellblock], + [App.EndWeek.clinicReport, App.Entity.facilities.clinic], + [App.EndWeek.clubReport, App.Entity.facilities.club], + [App.EndWeek.dairyReport, App.Entity.facilities.dairy], + [App.Facilities.Farmyard.farmyardReport, App.Entity.facilities.farmyard], + [App.EndWeek.schoolroomReport, App.Entity.facilities.schoolroom], + [App.EndWeek.spaReport, App.Entity.facilities.spa], + [App.EndWeek.servantsQuartersReport, App.Entity.facilities.servantsQuarters], + [App.Facilities.Nursery.nurseryReport, App.Entity.facilities.nursery], + [App.Facilities.Nursery.childrenReport, "Nursery Children", V.nursery, V.nurseryChildren], + [App.EndWeek.incubatorReport, App.Entity.facilities.incubator], + [App.EndWeek.masterSuiteReport, App.Entity.facilities.masterSuite], + [App.EndWeek.penthouseReport, "The Penthouse"], [App.EndWeek.rulesAssistantReport, "Rules Assistant", V.rulesAssistantAuto], /** should be last — may reassign slaves **/ [App.EndWeek.labReport, "Lab", V.researchLab.level] ]; @@ -307,12 +317,8 @@ App.EndWeek.slaveAssignmentReport = function() { // TODO: this call should be in the individual reports' slave loops so slaves don't leak data to their coworkers if someone fucks up App.EndWeek.saVars.nextSlave(); - const reportContent = document.createElement("div"); - if (typeof facSubArr[0] === "function") { - reportContent.append(facSubArr[0]()); - } else if (typeof facSubArr[0] === "string") { - App.UI.DOM.includePassage(reportContent, facSubArr[0]); - } + // @ts-ignore - the first element of the subarray is always callable but TS isn't smart enough to figure that out + const reportContent = App.UI.DOM.makeElement("div", facSubArr[0]()); // needs to be inside the loop after the report passage to get the employees number after re-assignments const stats = _getReportElementStats(facSubArr); diff --git a/src/endWeek/standardSlaveReport.js b/src/endWeek/standardSlaveReport.js index 5ed4a6d9b43f2f8129093671ce28c516ed8e1fe3..b2792a7f077d2dc6efa6f7c54992143b99890eaa 100644 --- a/src/endWeek/standardSlaveReport.js +++ b/src/endWeek/standardSlaveReport.js @@ -1,27 +1,48 @@ /** * Generates (and returns if not silent) a standard slave report + * This is the part after the slave's job in most facilities. * @param {App.Entity.SlaveState} slave * @param {boolean} silent * @returns {HTMLElement|null} */ App.SlaveAssignment.standardSlaveReport = function(slave, silent=false) { const clothes = App.SlaveAssignment.choosesOwnClothes(slave); - - tired(slave); - - const rules = App.SlaveAssignment.rules(slave); - const diet = App.SlaveAssignment.diet(slave); - const ltEffects = App.SlaveAssignment.longTermEffects(slave); - const drugs = App.SlaveAssignment.drugs(slave); - const relationships = App.SlaveAssignment.relationships(slave); - const rivalries = App.SlaveAssignment.rivalries(slave); + const individualReport = App.SlaveAssignment.individualSlaveReport(slave); const devotion = App.SlaveAssignment.devotion(slave); if (!silent) { const content = App.UI.DOM.makeElement("div", '', "indent"); - $(content).append(clothes, rules, diet, ltEffects, drugs, relationships, rivalries, `<div class="indent">${devotion}</div>`); + $(content).append(...App.Events.spaceSentences([clothes, ...individualReport]), `<div class="indent">${devotion}</div>`); return content; } }; + +/** + * Generates the main part of the standard slave report for an individual slave. + * This is the section that's identical for all slaves regardless of facility. + * @param {App.Entity.SlaveState} slave + * @returns {Array<DocumentFragment|string>} + */ +App.SlaveAssignment.individualSlaveReport = function(slave) { + return [ + App.SlaveAssignment.rules(slave), + App.SlaveAssignment.diet(slave), + App.SlaveAssignment.longTermEffects(slave), + App.SlaveAssignment.drugs(slave), + App.SlaveAssignment.relationships(slave), + App.SlaveAssignment.rivalries(slave), + ]; +}; + +/** + * Render slave assignment report art + * @param {ParentNode} node + * @param {App.Entity.SlaveState} slave + */ +App.SlaveAssignment.appendSlaveArt = function(node, slave) { + if (V.seeImages && V.seeReportImages) { + App.UI.DOM.appendNewElement("div", node, App.EndWeek.saVars.slaveArt.render(slave), ["imageRef", "tinyImg"]); + } +}; diff --git a/src/events/PE/concubineInterview.js b/src/events/PE/concubineInterview.js index 9d64498a8df7c4bd0deebc08769dd33166690d4e..ad77e938425fd369c003c5cecc0397ebc13954e9 100644 --- a/src/events/PE/concubineInterview.js +++ b/src/events/PE/concubineInterview.js @@ -31,7 +31,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. const rep = val => repX(val, "concubine", eventSlave); const speak = string => Spoken(eventSlave, string); - V.nextLink = "Next Week"; + V.nextLink = "RIE Eligibility Check"; App.Events.drawEventArt(node, eventSlave); diff --git a/src/facilities/farmyard/reports/farmyardReport.js b/src/facilities/farmyard/reports/farmyardReport.js index 7d646bf9f79726cfb9e0ee169169e07ea67e87b7..defb1d0e84996156141e633161ea523361e51399 100644 --- a/src/facilities/farmyard/reports/farmyardReport.js +++ b/src/facilities/farmyard/reports/farmyardReport.js @@ -254,14 +254,10 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { if (V.showEWD) { const farmerEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", farmerEntry, App.Art.SlaveArtElement(Farmer, 0, 0), ["imageRef", "tinyImg"]); - } - + App.SlaveAssignment.appendSlaveArt(farmerEntry, Farmer); farmerEntry.append(App.EndWeek.favoriteIcon(Farmer), " "); $(farmerEntry).append(`<span class="slave-name">${SlaveFullName(Farmer)}</span> is serving as the Farmer.`); - $(farmerEntry).append(App.SlaveAssignment.standardSlaveReport(Farmer, false)); + farmerEntry.append(App.SlaveAssignment.standardSlaveReport(Farmer, false)); } else { App.SlaveAssignment.standardSlaveReport(Farmer, true); } @@ -353,11 +349,7 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { if (V.showEWD) { const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - - if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); - } - + App.SlaveAssignment.appendSlaveArt(slaveEntry, slave); slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); $(slaveEntry).append(`<span class="slave-name">${SlaveFullName(slave)}</span> `); @@ -379,7 +371,7 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { const farmhandContent = App.UI.DOM.appendNewElement("div", slaveEntry, '', "indent"); $(farmhandContent).append(App.SlaveAssignment.workTheFarm(slave)); - $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { // silently discard return values App.SlaveAssignment.workTheFarm(slave); App.SlaveAssignment.standardSlaveReport(slave, true); diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index 2dde6978006d862b17d7bd4a7295547e699e1052..0b0c0886c2aa7bba25b5ed5a517fb8093fae896c 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -1898,8 +1898,8 @@ globalThis.DefaultRules = (function() { r += `<br>${slave.slaveName}'s living standard has been set to ${rule.livingRules}.`; } } + penthouseCensus(); } - penthouseCensus(); } /** diff --git a/src/js/releaseRules.js b/src/js/releaseRules.js index e16e71cac7e98ea7233a9e7f3156962923b418a5..b029004c3b2edd4bf6437706322092bf9f45da9b 100644 --- a/src/js/releaseRules.js +++ b/src/js/releaseRules.js @@ -42,7 +42,18 @@ App.Utils.hasFamilySex = function hasFamilySex(slave) { if (V.seeIncest === 0 || slave.rules.release.family === 0) { return false; } - return jsDef(randomRelatedSlave(slave, (s) => this.sexAllowed(slave, s))); + // check fast cases first + if (slave.mother > 0 && this.sexAllowed(slave, getSlave(slave.mother))) { + return true; + } + if (slave.father > 0 && this.sexAllowed(slave, getSlave(slave.father))) { + return true; + } + // search exhaustively for sisters/daughters only if necessary + if (slave.sisters + slave.daughters === 0) { + return false; + } + return V.slaves.some(s => areRelated(slave, s) && this.sexAllowed(slave, s)); }; /** diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index 3cf15015d3fa36147fa0f9063df63f57f415a021..8fa439431bee7656bf5e06ddf22e294c43372a04 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -1811,26 +1811,28 @@ globalThis.FResultArray = (function() { * @param {App.Entity.SlaveState} slave */ function calcWorksWithRelatives(slave) { - V.slaves.forEach(potentialRel => { - if (isParentP(slave, potentialRel) && sameAssignmentP(slave, potentialRel)) { - adjustFResult(`Works with their parent(s)`, 1); - if (incestBonus) { - adjustFResult(`Works with their parent(s): incest bonus`, 1); + for (const potentialRel of V.slaves) { + if (sameAssignmentP(slave, potentialRel)) { + if (isParentP(slave, potentialRel)) { + adjustFResult(`Works with their parent(s)`, 1); + if (incestBonus) { + adjustFResult(`Works with their parent(s): incest bonus`, 1); + } } - } - if (isParentP(potentialRel, slave) && sameAssignmentP(slave, potentialRel)) { - adjustFResult(`Works with their kid(s)`, 1); - if (incestBonus) { - adjustFResult(`Works with their kid(s): incest bonus`, 1); + if (isParentP(potentialRel, slave)) { + adjustFResult(`Works with their kid(s)`, 1); + if (incestBonus) { + adjustFResult(`Works with their kid(s): incest bonus`, 1); + } } - } - if (areSisters(slave, potentialRel) > 0 && sameAssignmentP(slave, potentialRel)) { - adjustFResult(`Works with their sibling(s)`, 1); - if (incestBonus) { - adjustFResult(`Works with their sibling(s): incest bonus`, 1); + if (areSisters(slave, potentialRel) > 0) { + adjustFResult(`Works with their sibling(s)`, 1); + if (incestBonus) { + adjustFResult(`Works with their sibling(s): incest bonus`, 1); + } } } - }); + } } /** diff --git a/src/pregmod/incubatorReport.tw b/src/pregmod/incubatorReport.tw deleted file mode 100644 index d4c6d6d4bcd0f1537afd2e022fcfa07a36fdb145..0000000000000000000000000000000000000000 --- a/src/pregmod/incubatorReport.tw +++ /dev/null @@ -1,829 +0,0 @@ -:: Incubator Report [nobr] - -<<set $readySlaves = 0>> -<<if $incubatorImprintSetting == 0>><<set $incubatorImprintSetting = "trust">><</if>> - -<<for _inc = 0; _inc < $tanks.length; _inc++>> - <<setLocalPronouns $tanks[_inc]>> - <<set $tanks[_inc].birthWeek += 1>> - <<if $tanks[_inc].birthWeek >= 52>> - <<set $tanks[_inc].birthWeek = 0>> - <<if $seeAge == 1>> - <<set $tanks[_inc].actualAge++, $tanks[_inc].ovaryAge++>> - <</if>> - <</if>> - <<if $tanks[_inc].growTime > 0>> - <<set $tanks[_inc].growTime -= $incubatorUpgradeSpeed>> - <br>@@.pink;<<print $tanks[_inc].slaveName>>'s@@ growth is currently being accelerated. $He <<if Math.round($tanks[_inc].growTime/$incubatorUpgradeSpeed) <= 0>>is @@.lime;ready for release.@@ $He will be ejected from $his tank upon your approach<<else>>will be ready for release in about <<print Math.round($tanks[_inc].growTime/$incubatorUpgradeSpeed)>> weeks<</if>>. - <<else>> - @@.pink;$tanks[_inc].slaveName@@ is @@.lime;ready for release.@@ $He will be ejected from $his tank upon your approach. - <<set $readySlaves = 1>> - <</if>> - - <<if $incubatorUpgradeWeight == 1>> - <br> - <<if $incubatorWeightSetting == 1>> - <<if $tanks[_inc].weight < 200>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].weight += 70>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].weight += 40>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].weight += 20>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].weight += 10>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].weight += 5>> - <</if>> - <</if>> - The weight monitoring systems are overloading $his intake causing @@.red;rapid weight gain.@@ - <<elseif $incubatorWeightSetting == 2>> - <<if $tanks[_inc].weight > 10>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].weight -= 30>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].weight -= 10>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].weight -= 5>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].weight -= 2>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].weight -= 1>> - <</if>> - The weight monitoring systems detect $he is overweight and @@.green;decrease $his caloric intake.@@ - <<elseif $tanks[_inc].weight < -10>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].weight += 30>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].weight += 10>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].weight += 5>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].weight += 2>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].weight += 1>> - <</if>> - The weight monitoring systems detect $he is underweight and @@.green;increase $his caloric intake.@@ - <<else>> - $He is @@.lime;currently at a healthy weight;@@ efforts will be made to maintain it. - <</if>> - <<elseif $incubatorWeightSetting == 0>> - <<if $tanks[_inc].weight > -100>> - $His developing body @@.red;quickly sheds its gained weight.@@ - <<set $tanks[_inc].weight -= 40>> - <</if>> - <</if>> - <<else>> - <<if $tanks[_inc].weight > -100>> - $His developing body @@.red;quickly sheds its gained weight.@@ - <<set $tanks[_inc].weight -= 40>> - <</if>> - <</if>> - - <<if $incubatorUpgradeMuscles == 1>> - <br> - <<if $incubatorMusclesSetting == 2>> - <<if $tanks[_inc].muscles < 100>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].muscles += 70>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].muscles += 40>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].muscles += 20>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].muscles += 10>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].muscles += 5>> - <</if>> - <</if>> - The strength monitoring systems are overloading $him with steroids causing @@.green;rapid muscle development.@@ - <<elseif $incubatorMusclesSetting == 1>> - <<if $tanks[_inc].muscles > 10>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].muscles -= 30>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].muscles -= 10>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].muscles -= 5>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].muscles -= 2>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].muscles-->> - <</if>> - The strength monitoring systems detect $he is overly muscular and @@.green;decrease $his steroid dosage.@@ - <<elseif $tanks[_inc].muscles < -10>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].muscles += 30>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].muscles += 10>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].muscles += 5>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].muscles += 2>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].muscles++>> - <</if>> - The strength monitoring systems detect $he is weak and @@.green;increase $his steroid dosage.@@ - <<else>> - $He has @@.lime;a healthy musculature;@@ efforts will be made to maintain it. - <</if>> - <<elseif $incubatorMusclesSetting == 0>> - <<if $tanks[_inc].muscles > -100>> - $His developing body @@.red;quickly loses its gained muscle.@@ - <<set $tanks[_inc].muscles -= 40>> - <</if>> - <</if>> - <<else>> - <<if $tanks[_inc].muscles > -100>> - $His developing body @@.red;quickly loses its gained muscle.@@ - <<set $tanks[_inc].muscles -= 40>> - <</if>> - <</if>> - - <<if $incubatorUpgradeGrowthStims == 1 && $incubatorGrowthStimsSetting != 0>> - <br> - <<set _heightLimit = Math.trunc(Math.clamp((Height.mean($tanks[_inc]) * 1.25),0,274))>> - <<set _heightLimitAge = Height.forAge($tanks[_inc].height, $tanks[_inc])>> - <<if $tanks[_inc].geneticQuirks.dwarfism == 2 && $tanks[_inc].geneticQuirks.gigantism != 2>> - <<set _heightLimit = Math.min(_heightLimit, 160)>> - <</if>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* - ** NCS should block physical growth beyond that of a toddler, but some players might like - ** a little more or less. So using $minimumSlaveAge or 8, whichever is lesser. - */ - <<set _limitAge = Math.min(8, $minimumSlaveAge)>> - <<set _heightLimitAge = Height.forAge($tanks[_inc].height, _limitAge, $tanks[_inc].genes)>> - <<set _heightLimit = _heightLimitAge>> - <<elseif ($tanks[_inc].geneticQuirks.neoteny === 2 && $tanks[_inc].actualAge > 12)>> - <<set _heightLimitAge = Height.forAge($tanks[_inc].height, 12, $tanks[_inc].genes)>> - <<set _heightLimit = _heightLimitAge>> - <</if>> - <<if $tanks[_inc].height >= _heightLimit>> - The monitoring system detects $his body is not able to support further increases in height, so it carefully regulates stimulant injections to @@.yellow;maintain $his current stature.@@ - <<set $tanks[_inc].height = _heightLimit>> - <<elseif $incubatorGrowthStimsSetting == 2>> - <<if $tanks[_inc].geneMods.NCS == 1>> - The monitoring system floods $his body with growth stimulants, but $his @@.orange;NCS prevents an increase in $his growth rate.@@ - <<set $tanks[_inc].height = _heightLimitAge>> - <<else>> - The monitoring system floods $his body with growth stimulants, causing @@.green;a sharp increase in growth rate.@@ - <<if $incubatorWeightSetting >= 1 && $incubatorMusclesSetting <= 1 && $incubatorReproductionSetting <= 1>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].height += random(3,6)>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].height += random(2,5)>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].height += random(1,4)>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].height += random(1,3)>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].height += random(1,2)>> - <</if>> - <<else>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].height += random(2,5)>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].height += random(1,4)>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].height += random(1,3)>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].height += random(1,2)>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].height += random(0,1)>> - <</if>> - <</if>> - <</if>> - <<elseif $incubatorGrowthStimsSetting == 1>> - <<if $tanks[_inc].geneMods.NCS == 1>> - The monitoring system detects $he is near the expected height for $his @@.orange;NCS@@ condition, so it carefully regulates stimulant injections to @@.yellow;maintain $his current stature.@@ - <<set $tanks[_inc].height = _heightLimitAge>> - <<elseif $tanks[_inc].height > _heightLimitAge>> - The monitoring systems detect $he is near the expected height, so it carefully regulates stimulant injections to @@.yellow;maintain $his current stature.@@ - <<if random(1,10) == 10>> - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].height += random(1,4)>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].height += random(1,3)>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].height += random(1,2)>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].height += random(0,1)>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].height += random(0,1)>> - <</if>> - <</if>> - <<else>> - The monitoring systems detect $his body is capable of developing more rapidly and @@.green;increase $his growth stimulant dosage.@@ - <<if $incubatorUpgradeSpeed == 52>> - <<set $tanks[_inc].height += random(1,4)>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<set $tanks[_inc].height += random(1,3)>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<set $tanks[_inc].height += random(1,2)>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<set $tanks[_inc].height += random(0,1)>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<set $tanks[_inc].height += random(0,1)>> - <</if>> - <</if>> - <</if>> - <<set $tanks[_inc].height = Math.clamp($tanks[_inc].height, 0, _heightLimit)>> - <<else>> - <br> - With the growth stimulant injections offline, $his body is left to develop naturally. - <</if>> - - <<if $incubatorUpgradeReproduction == 1>> - <br> - <<set _rearQuirk = $tanks[_inc].geneticQuirks.rearLipedema == 2 ? 2 : 1>> - <<if $incubatorReproductionSetting == 2>> - $His developing body is being flooded with hormones. - <<if $incubatorWeightSetting == 1>> - Combined with the abundant food provided to $him, $his body grows rapidly. - <<if $tanks[_inc].ovaries == 1>> - <<set $tanks[_inc].pubertyXX = 1>> - <<if $tanks[_inc].hormoneBalance < 500>> - <<set $tanks[_inc].hormoneBalance += 100>> - <</if>> - <<if $seeHyperPreg == 1>> - <<set $tanks[_inc].readyOva = random(25,45)>> - <<else>> - <<set $tanks[_inc].readyOva = random(3,8)>> - <</if>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks all growth@@ despite the excess estrogen-laced growth hormones flooding $his body. - <<elseif $incubatorUpgradeSpeed == 52>> - <<if $tanks[_inc].boobs < 8000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 2000>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 50>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips += 2>> - <</if>> - <<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 30/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt += 4>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<if $tanks[_inc].boobs < 8000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 500>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 50>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 50/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt += 3>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<if $tanks[_inc].boobs < 8000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 200>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 60>> - The excess estrogen-laced growth hormones @@.green;causes $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 50/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear grow fatter.@@ - <<set $tanks[_inc].butt += 2>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<if $tanks[_inc].boobs < 8000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 100>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 70>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 60/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<if $tanks[_inc].boobs < 8000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 100>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 80>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 70/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <</if>> - <<elseif $tanks[_inc].balls > 0>> - <<set $tanks[_inc].pubertyXY = 1>> - <<if $tanks[_inc].hormoneBalance > -500>> - <<set $tanks[_inc].hormoneBalance -= 100>> - <</if>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks all growth@@ despite the excess testosterone-laced growth hormones flooding $his body. - <<elseif $incubatorUpgradeSpeed == 52>> - <<if $tanks[_inc].balls < 40>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls += 16>> - <</if>> - <<if $tanks[_inc].dick < 10 && random(1,100) > 20>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick += 4>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<if $tanks[_inc].balls < 40 && random(1,100) > 10>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls += 9>> - <</if>> - <<if $tanks[_inc].dick < 10 && random(1,100) > 30>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick += 3>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<if $tanks[_inc].balls < 40 && random(1,100) > 20>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls += 4>> - <</if>> - <<if $tanks[_inc].dick < 10 && random(1,100) > 50>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick += 2>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<if $tanks[_inc].balls < 40 && random(1,100) > 30>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls += 2>> - <</if>> - <<if $tanks[_inc].dick < 10 && random(1,100) > 70>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<if $tanks[_inc].balls < 40 && random(1,100) > 30>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 10 && random(1,100) > 80>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <</if>> - <</if>> - <<elseif $incubatorWeightSetting == 2>> - Combined with the healthy food provided to $him, $his body grows readily. - <<if $tanks[_inc].ovaries == 1>> - <<set $tanks[_inc].pubertyXX = 1>> - <<if $tanks[_inc].hormoneBalance < 500>> - <<set $tanks[_inc].hormoneBalance += 100>> - <</if>> - <<if $seeHyperPreg == 1>> - <<set $tanks[_inc].readyOva = random(15,25)>> - <<else>> - <<set $tanks[_inc].readyOva = random(2,6)>> - <</if>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks all growth@@ despite the excess estrogen-laced growth hormones flooding $his body. - <<elseif $incubatorUpgradeSpeed == 52>> - <<if $tanks[_inc].boobs < 4000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 1000>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 70>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 50/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt += 3>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<if $tanks[_inc].boobs < 4000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 500>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 80>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 50/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<if $tanks[_inc].boobs < 4000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 200>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 90>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 60/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<if $tanks[_inc].boobs < 4000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 100>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 95>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 70/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<if $tanks[_inc].boobs < 4000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 100>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 95>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 80/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <</if>> - <<elseif $tanks[_inc].balls > 0>> - <<set $tanks[_inc].pubertyXY = 1>> - <<if $tanks[_inc].hormoneBalance > -500>> - <<set $tanks[_inc].hormoneBalance -= 100>> - <</if>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks all growth@@ despite the excess testosterone-laced growth hormones flooding $his body. - <<elseif $incubatorUpgradeSpeed == 52>> - <<if $tanks[_inc].balls < 10>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls += 3>> - <</if>> - <<if $tanks[_inc].dick < 7 && random(1,100) > 20>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick += 2>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<if $tanks[_inc].balls < 10 && random(1,100) > 10>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls += 2>> - <</if>> - <<if $tanks[_inc].dick < 7 && random(1,100) > 30>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<if $tanks[_inc].balls < 10 && random(1,100) > 20>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 7 && random(1,100) > 50>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<if $tanks[_inc].balls < 10 && random(1,100) > 30>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 7 && random(1,100) > 70>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<if $tanks[_inc].balls < 10 && random(1,100) > 30>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 7 && random(1,100) > 80>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <</if>> - <</if>> - <<else>> - Since $his body has little to work with, $his growth is fairly minor. - <<if $tanks[_inc].ovaries == 1>> - <<set $tanks[_inc].pubertyXX = 1>> - <<if $tanks[_inc].hormoneBalance < 500>> - <<set $tanks[_inc].hormoneBalance += 100>> - <</if>> - <<if $seeHyperPreg == 1>> - <<set $tanks[_inc].readyOva = random(10,15)>> - <<else>> - <<set $tanks[_inc].readyOva = random(2,4)>> - <</if>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks all growth@@ despite the excess estrogen-laced growth hormones flooding $his body. - <<elseif $incubatorUpgradeSpeed == 52>> - <<if $tanks[_inc].boobs < 2000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 700>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 90>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips += 2>> - <</if>> - <<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 70/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt += 2>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<if $tanks[_inc].boobs < 2000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 200>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 80>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 70/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<if $tanks[_inc].boobs < 2000>> - The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@ - <<set $tanks[_inc].boobs += 50>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 80>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 90/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<if $tanks[_inc].boobs < 2000>> - The excess estrogen-laced growth hormones @@.green;rapidly grow $his breasts.@@ - <<set $tanks[_inc].boobs += 20>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 90>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 90/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<if $tanks[_inc].boobs < 2000>> - The excess estrogen-laced growth hormones @@.green;rapidly grow $his breasts.@@ - <<set $tanks[_inc].boobs += 10>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 95>> - The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 90/_rearQuirk>> - The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <</if>> - <<elseif $tanks[_inc].balls > 0>> - <<set $tanks[_inc].pubertyXY = 1>> - <<if $tanks[_inc].hormoneBalance > -500>> - <<set $tanks[_inc].hormoneBalance -= 100>> - <</if>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks all growth@@ despite the excess testosterone-laced growth hormones flooding $his body. - <<elseif $incubatorUpgradeSpeed == 52>> - <<if $tanks[_inc].balls < 6>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to grow for extra cum production.@@ - <<set $tanks[_inc].balls += 2>> - <</if>> - <<if $tanks[_inc].dick < 4 && random(1,100) > 60>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 18>> - <<if $tanks[_inc].balls < 6 && random(1,100) > 50>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to grow for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 4 && random(1,100) > 60>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 9>> - <<if $tanks[_inc].balls < 6 && random(1,100) > 60>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to balloon for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 4 && random(1,100) > 70>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick += 2>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 6>> - <<if $tanks[_inc].balls < 6 && random(1,100) > 70>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to grow for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 4 && random(1,100) > 80>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <<elseif $incubatorUpgradeSpeed == 5>> - <<if $tanks[_inc].balls < 6 && random(1,100) > 80>> - The excess testosterone-laced growth hormones @@.green;cause $his balls to grow for extra cum production.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 4 && random(1,100) > 90>> - The excess testosterone-laced growth hormones @@.green;cause $his penis to swell.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <</if>> - <</if>> - <</if>> - <<elseif $incubatorReproductionSetting == 1>> - $His hormone levels are being carefully managed, @@.green;encouraging early puberty.@@ - <<if $tanks[_inc].ovaries == 1>> - <<set $tanks[_inc].pubertyXX = 1>> - <<set $tanks[_inc].hormoneBalance = 250>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks growth@@ despite the added estrogen. - <<else>> - <<if $tanks[_inc].boobs < 400 && random(1,100) > 60>> - The added estrogen @@.green;causes $his breasts to swell.@@ - <<set $tanks[_inc].boobs += 50>> - <</if>> - <<if $tanks[_inc].hips < 2 && random(1,100) > 90>> - The added estrogen @@.green;causes $his hips to widen.@@ - <<set $tanks[_inc].hips++>> - <</if>> - <<if $tanks[_inc].butt < 5*_rearQuirk && random(1,100) > 80/_rearQuirk>> - The added estrogen @@.green;causes $his butt to grow.@@ - <<set $tanks[_inc].butt++>> - <</if>> - <</if>> - <<elseif $tanks[_inc].balls > 0>> - <<set $tanks[_inc].pubertyXY = 1>> - <<set $tanks[_inc].hormoneBalance = -250>> - <<if $tanks[_inc].geneMods.NCS == 1>> - /* NCS blocks hormonal growth of all secondary sexual characteristics */ - $His @@.orange;NCS blocks all growth@@ despite the added testosterone. - <<else>> - <<if $tanks[_inc].balls < 3 && random(1,100) > 80>> - The added testosterone @@.green;causes $his balls to swell.@@ - <<set $tanks[_inc].balls++>> - <</if>> - <<if $tanks[_inc].dick < 3 && random(1,100) > 60>> - The added testosterone @@.green;causes $his penis to grow.@@ - <<set $tanks[_inc].dick++>> - <</if>> - <</if>> - <</if>> - <<else>> - <<if $tanks[_inc].hormoneBalance > 100>> - <<set $tanks[_inc].hormoneBalance -= 50>> - <<elseif $tanks[_inc].hormoneBalance < -100>> - <<set $tanks[_inc].hormoneBalance += 50>> - <</if>> - <<if $tanks[_inc].balls > 0>> - <<if $tanks[_inc].balls > 1>> - <<set $tanks[_inc].balls -= 5>> - <</if>> - <<if $tanks[_inc].dick > 1>> - <<set $tanks[_inc].dick -= 5>> - <</if>> - <<if $tanks[_inc].balls <= 0>> - <<set $tanks[_inc].balls = 1>> - <</if>> - <<if $tanks[_inc].dick <= 0>> - <<set $tanks[_inc].dick = 1>> - <</if>> - <</if>> - <<if $tanks[_inc].boobs > 0>> - <<set $tanks[_inc].boobs -= 500>> - <</if>> - <<if $tanks[_inc].butt > 0>> - <<set $tanks[_inc].butt -= 4>> - <</if>> - <</if>> - <<else>> - <<if $tanks[_inc].hormoneBalance > 100>> - <<set $tanks[_inc].hormoneBalance -= 50>> - <<elseif $tanks[_inc].hormoneBalance < -100>> - <<set $tanks[_inc].hormoneBalance += 50>> - <</if>> - <<if $tanks[_inc].balls > 0>> - <<if $tanks[_inc].balls > 1>> - <<set $tanks[_inc].balls -= 5>> - <</if>> - <<if $tanks[_inc].dick > 1>> - <<set $tanks[_inc].dick -= 5>> - <</if>> - <<if $tanks[_inc].balls <= 0>> - <<set $tanks[_inc].balls = 1>> - <</if>> - <<if $tanks[_inc].dick <= 0>> - <<set $tanks[_inc].dick = 1>> - <</if>> - <</if>> - <<if $tanks[_inc].boobs > 0>> - <<set $tanks[_inc].boobs -= 500>> - <</if>> - <<if $tanks[_inc].butt > 0>> - <<set $tanks[_inc].butt -= 4>> - <</if>> - <</if>> - - <<if $incubatorReproductionSetting == 2>> - <<set $tanks[_inc].energy = 80, $tanks[_inc].need = 100>> - <<elseif $incubatorReproductionSetting == 1>> - <<set $tanks[_inc].energy = 50, $tanks[_inc].need = 20>> - <<else>> - <<set $tanks[_inc].energy = 0, $tanks[_inc].need = 0>> - <</if>> - - <<if (($incubatorPregAdaptationSetting == 1 && $tanks[_inc].genes == "XX") || ($incubatorPregAdaptationSetting == 2 && $tanks[_inc].genes == "XY") || $incubatorPregAdaptationSetting == 3) && $tanks[_inc].growTime > 0>> - <br> - The incubator is working on adapting $his abdomen and reproductive organs for future pregnancies. - - <<set _weekAdapt = $tanks[_inc].incubatorPregAdaptationInWeek * $incubatorUpgradeSpeed>> - <<if isNaN(_weekAdapt)>> /* NaN check AFTER multiply operation, against it result is critical here. Need to be absolutely sure about this operation, not about just tank[x] property itself. This give me two very unpleasant hours to catch this */ - <<set $tanks[_inc].incubatorPregAdaptationInWeek = (15000 / 2000 - $tanks[_inc].pregAdaptation) / $tanks[_inc].growTime>> - <</if>> - <<set _weekAdapt = $tanks[_inc].incubatorPregAdaptationInWeek * $incubatorUpgradeSpeed>> /* Now it's should be fine */ - <<set _weekAdapt *= 1 + ($incubatorReproductionSetting / 5)>> - <<set _weekAdapt *= 1 + ($tanks[_inc].hormoneBalance / 1500)>> - /*And now we done*/ - <<set $tanks[_inc].pregAdaptation += _weekAdapt>> - /* here goes side effect from intense and extreme settings: */ - <<if (random(0, 100) <= ($tanks[_inc].incubatorPregAdaptationPower - 1) * ($incubatorUpgradeSpeed / 2 + 1))>> - <<switch random(1, 9)>> /*side effect selection*/ - <<case 1>> - <<set $tanks[_inc].preg = -2>> - It caused @@.red;reproductive damage@@ when excessive meddling damaged an organ. - <<case 2>> - <<if $tanks[_inc].ovaries == 1 || $tanks[_inc].mpreg == 1>> - <<set $tanks[_inc].preg = -3>> - <</if>> - <<if $tanks[_inc].balls > 0>> - <<set $tanks[_inc].ballType = "sterile">> - <</if>> - It caused @@.red;severe reproductive damage@@ when excessive hormones shut down the associated organs. - <<case 3>> - <<set $tanks[_inc].lactation = 1>> - It has @@.orange;triggered a hormonal disorder,@@ causing $his breast glands begin producing milk. - <<case 4>> - <<set $tanks[_inc].bellySag = 100, $tanks[_inc].bellySagPreg = 100>> - It activated @@.red;emergency protocols@@ when overpressure to $his abdominal tissues and skin reached critical levels. $His belly has lost muscle tone and has begun to strongly sag. - <<case 5>> - <<set $tanks[_inc].health.condition -= 15>> - Overzealous prodding caused some @@.red;internal bleeding.@@ - <<case 6>> - <<set $tanks[_inc].weight += 50>> - An unexpected shift in hormones spurred @@.red;massive weight gain@@ before it could be corrected. - <<case 7>> - <<set $tanks[_inc].weight -= 50>> - An unexpected shift in hormones spurred @@.red;massive weight loss@@ before it could be corrected. - <<case 8>> - <<set $tanks[_inc].boobs += 5000>> - <<set $tanks[_inc].boobShape = "saggy">> - An unexpected shift in hormones encouraged @@.green;explosive breast growth@@ before it could be corrected. - <<case 9>> - <<set $tanks[_inc].hips = 3>> - A malfunction in the skeletal reconstruction software caused it to @@.green;overwiden $his hips.@@ - <</switch>> - <</if>> - <</if>> - - <<if $tanks[_inc].preg > 0>> - @@.red;The incubator is displaying an alert that $he may be pregnant.@@ - <</if>> - - <<set $tanks[_inc].weight = Math.clamp($tanks[_inc].weight, -100, 200)>> - <<set $tanks[_inc].muscles = Math.clamp($tanks[_inc].muscles, -100, 100)>> - <<set $tanks[_inc].dick = Math.clamp($tanks[_inc].dick, 0, 10)>> - <<set $tanks[_inc].hips = Math.clamp($tanks[_inc].hips, -2, 2)>> - <<set $tanks[_inc].balls = Math.clamp($tanks[_inc].balls, 0, 40)>> - <<set $tanks[_inc].boobs = Math.clamp($tanks[_inc].boobs, 25, 30000)>> - <<set $tanks[_inc].height = Math.clamp($tanks[_inc].height, 0, 274)>> - <<set $tanks[_inc].hormoneBalance = Math.clamp($tanks[_inc].hormoneBalance, -500, 500)>> - <<set $tanks[_inc].foreskin = $tanks[_inc].dick>> /*simple, clean way of making sure foreskins and scrotums grow appropriately*/ - <<set $tanks[_inc].scrotum = $tanks[_inc].balls>> /*if we want dicks/balls to outgrow foreskins/scrotums, this will have to be removed*/ - -<br><br> -<</for>> -/* -<<if $tanks.length == 0>> -<<= capFirstChar($incubatorName)>> is currently unused. -<</if>> -*/ - -<br><br>