diff --git a/src/endWeek/facilityLeaderSex.js b/src/endWeek/facilityLeaderSex.js index bc82fd9e9d2e8a3fa0a51d907594bc587745b69c..cc397cf952a06ae247ef9e0ad9a27d51ff39e520 100644 --- a/src/endWeek/facilityLeaderSex.js +++ b/src/endWeek/facilityLeaderSex.js @@ -37,7 +37,7 @@ App.EndWeek.getFLSex = function(facility) { /** @type {Set<number>} */ const employeeSex = new Set(); const fl = facility.manager ? facility.manager.currentEmployee : null; - if (fl && App.Data.misc.sexFromDevelopmentLeaders.includes[fl.assignment]) { + if (fl && App.Data.misc.sexFromDevelopmentLeaders.includes(fl.assignment)) { facility.employees().filter(s => flWillFuck(s)).forEach(s => employeeSex.add(s.ID)); } return employeeSex; diff --git a/src/endWeek/saRules.js b/src/endWeek/saRules.js index 0773271fe34b427805e4760aa16f361c65234451..4d7f5e43add07dd9a651d8c6c4618d3c1184b714 100644 --- a/src/endWeek/saRules.js +++ b/src/endWeek/saRules.js @@ -15,9 +15,7 @@ App.SlaveAssignment.rules = function(slave) { he, his, him, himself, girl, wife } = getPronouns(slave); const hands = (hasBothArms(slave)) ? `hands` : `hand`; - let wife2; let milkResult; - let wardenFunTimes; r.push(`${He}`); if (slave.fetish === "mindbroken") { r.push(`is mentally broken so none of the rules have any impact.`); @@ -573,9 +571,6 @@ App.SlaveAssignment.rules = function(slave) { } break; case "lover": - ({ - wife2 - } = getPronouns(partner.slave).appendSuffix("2")); slave.need = 0; r.push(`is well taken care of during ${his} stay in ${V.clinicName}; ${his}`); if (slave.relationship === 3) { @@ -583,7 +578,7 @@ App.SlaveAssignment.rules = function(slave) { } else if (slave.relationship === 4) { r.push(`sweetheart`); } else { - r.push(wife2); + r.push(getPronouns(partner.slave).wife); } r.push(`frequently stops by when ${he} gets the chance to make sure ${his} sexual needs are properly handled.`); seX(partner.slave, "oral", slave, "penetrative", 14); @@ -875,17 +870,32 @@ App.SlaveAssignment.rules = function(slave) { r.push(App.SlaveAssignment.rewardAndPunishment(slave)); break; - case "be confined in the cellblock": - wardenFunTimes = 0; + case "be confined in the cellblock": { + let wardenFunTimes = 0; + let pregNotice = ``; if (App.EndWeek.saVars.flSex.has(slave.ID)) { wardenFunTimes = random(0, 5); slave.need -= (10 * wardenFunTimes); + SimpleSexAct.Slaves(slave, S.Wardeness, wardenFunTimes); + if (canImpreg(slave, S.Wardeness) && (V.cellblockWardenCumsInside === 1 || S.Wardeness.fetish === "mindbroken")) { + pregNotice = knockMeUp(slave, 3 * wardenFunTimes, 2, V.WardenessID); + } } if (slave.devotion < -50) { r.push(`is so unhappy that ${he} has little interest in getting off, making the rule restricting ${his} sexual outlets superfluous.`); + if (wardenFunTimes > 0) { + r.push(`${His} unhappiness doesn't stop ${S.Wardeness.slaveName} from raping ${him}, of course, which <span class="trust dec">contributes to ${his} growing fear</span>.`); + r.push(pregNotice); + slave.trust--; + } slave.need = 0; } else if (slave.energy <= 20) { r.push(`is frigid and has little interest in getting off, making the rule restricting ${his} sexual outlets superfluous.`); + if (wardenFunTimes > 0) { + r.push(`${His} disinterest doesn't stop ${S.Wardeness.slaveName} from raping ${him}, of course, which <span class="trust dec">contributes to ${his} growing fear</span>.`); + r.push(pregNotice); + slave.trust--; + } slave.need = 0; } else if (slave.relationship === -3) { r.push(`You make sure your troublesome ${wife}'s sexual needs are handled, openly, in the middle of ${V.cellblockName}, where everyone can see, hear, and smell your dominance.`); @@ -905,35 +915,28 @@ App.SlaveAssignment.rules = function(slave) { } } else { if (wardenFunTimes > 0) { - SimpleSexAct.Slaves(slave, S.Wardeness, wardenFunTimes); - if (wardenFunTimes > 0 && canImpreg(slave, S.Wardeness) && (V.cellblockWardenCumsInside === 1 || S.Wardeness.fetish === "mindbroken")) { - if (canDoVaginal(slave) && slave.vagina > 0 && slave.ovaries === 1) { - knockMeUp(slave, 10, 0, V.WardenessID); - } else if (canDoAnal(slave) && slave.anus > 0 && slave.mpreg === 1) { - knockMeUp(slave, 10, 1, V.WardenessID); - } - } + r.push(`is regularly raped to climax by ${S.Wardeness.slaveName}.`); + r.push(pregNotice); } - if (slave.need < App.EndWeek.saVars.needCapPerSlave[slave.ID] * 0.5) { - if (slave.devotion <= 20) { - r.push(`gets off despite ${his} reluctance, <span class="hotpink">habituating ${him} to sexual slavery.</span>`); - slave.devotion += 1; - if (slave.trust >= -20 && slave.devotion <= 20) { - r.push(`${He} hates ${himself} for climaxing, and knows the mild aphrodisiacs in the food are forcing ${his} arousal, <span class="gold">frightening ${him}.</span>`); - slave.trust -= 1; - } - slave.need -= 20; + if (slave.need < App.EndWeek.saVars.needCapPerSlave[slave.ID] * 0.5 && wardenFunTimes > 0) { + r.push(`${He} gets off despite ${his} reluctance, <span class="hotpink">habituating ${him} to sexual slavery.</span>`); + slave.devotion += 1; + if (slave.trust >= -20 && slave.devotion <= 20) { + r.push(`${He} hates ${himself} for climaxing, and knows the mild aphrodisiacs in the food are forcing ${his} arousal, <span class="gold">frightening ${him}.</span>`); + slave.trust -= 1; } + slave.need -= 20; } else { + if (wardenFunTimes > 0) { + r.push(`It's not enough to satisfy ${his} needs, and ${he}`); + } if (random(-100, 0) > slave.devotion) { r.push(`refuses to not touch ${himself} and is <span class="gold">severely punished</span> for illicit masturbation.`); slave.trust -= 2; slave.need -= 10; } else { r.push(`<span class="gold">fears</span> trying to`); - if (slave.chastityPenis) { - r.push(`touch ${himself}`); - } else if (canAchieveErection(slave)) { + if (canAchieveErection(slave) && !slave.chastityPenis) { r.push(`jack off`); } else { r.push(`touch ${himself}`); @@ -1002,6 +1005,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(App.SlaveAssignment.rewardAndPunishment(slave)); break; + } case "be the Attendant": slave.need -= App.EndWeek.saVars.flSex.size * 3; if (slave.energy <= 20) { diff --git a/src/endWeek/saSharedVariables.js b/src/endWeek/saSharedVariables.js index 3bd4691282a027cf9f6cf3ee829f53d6654e3e15..3b7255854e87076ded393192b5e12fc77c9852b0 100644 --- a/src/endWeek/saSharedVariables.js +++ b/src/endWeek/saSharedVariables.js @@ -35,9 +35,10 @@ App.EndWeek.SASharedVariables = class { /** Need cap per slave. Array indices are the slave IDs (resulting in a sparse array, but that's ok, because we never save this array) */ this.needCapPerSlave = []; /** Which employees the leader of the currently processed facility is having sex with this week + * @type {Set<number>} * @see App.EndWeek.getFLSex */ - this.flSex = 0; + this.flSex = new Set(); } /** Compute shared subslave ratio (subslaves per ordinary slave) */ diff --git a/src/events/intro/acquisition.js b/src/events/intro/acquisition.js index 19e6afd9fb78d5a0463d697cd7ad1b5ad1b619e9..9a59c6ba9643b1d2ee35900987fabd81ba9a31ba 100644 --- a/src/events/intro/acquisition.js +++ b/src/events/intro/acquisition.js @@ -32,7 +32,6 @@ App.Intro.acquisition = function() { r.push(`The previous owner seems to have left in something of a hurry.`); let valueGiven = 0; - const heroSlaves = App.Utils.buildHeroArray().shuffle(); if (V.cheatMode === 1) { r.push(`Since you've elected to take over an arcology with special advantages, you've acquired a very special group of slaves.`); r.push(App.Intro.cheatModeSlaves()); @@ -152,6 +151,7 @@ App.Intro.acquisition = function() { r.push(`did not have the time in control of the arcology to develop a specific stable of sex slaves,`); } r.push(`their slaves were quite varied.`); + const heroSlaves = App.Utils.buildHeroArray().shuffle(); for (let j = 0; j < heroSlaves.length; j++) { if (valueOwed - valueGiven <= 5000) { break; diff --git a/src/facilities/facilityRetrievalWorkaround.js b/src/facilities/facilityRetrievalWorkaround.js index 864638388abd43dd3485abac205ebe5804441876..992825e8a280710423d93ea130400d7ec2df57aa 100644 --- a/src/facilities/facilityRetrievalWorkaround.js +++ b/src/facilities/facilityRetrievalWorkaround.js @@ -115,15 +115,12 @@ App.UI.facilityRetrievalWorkaround = function(facility) { } function checkOrgans(slave) { - if (V.incubator.organs.length > 0) { - for (const organ of V.incubator.organs.filter(o => o.ID === slave.ID)) { - const newOrgan = {type: organ.type, weeksToCompletion: organ.weeksToCompletion, ID: slave.ID}; - if (newOrgan.weeksToCompletion <= 0) { - V.completedOrgans.push(organ); - } else { - V.organs.push(newOrgan); - } - V.incubator.organs.deleteAt(organ); + const movedOrgans = V.incubator.organs.deleteWith(o => o.ID === slave.ID) + for (const organ of movedOrgans) { + if (organ.weeksToCompletion <= 0) { + V.completedOrgans.push(organ); + } else { + V.organs.push(organ); } } } diff --git a/src/facilities/surgery/analyzePregnancy.js b/src/facilities/surgery/analyzePregnancy.js index 26d217cb4ece8dc01152b916166802db56c90713..285359e7840179d9c2228224945c5db7d00a82e5 100644 --- a/src/facilities/surgery/analyzePregnancy.js +++ b/src/facilities/surgery/analyzePregnancy.js @@ -326,7 +326,7 @@ App.UI.analyzePregnancy = function() { } if (nurseryReservations < WL && (FetusGlobalReserveCount("nursery") + WL - nurseryReservations <= freeCribs)) { linkArray.push(App.UI.DOM.link( - `Keep all of ${his} children in ${V.incubator.name}`, + `Keep all of ${his} children in ${V.nurseryName}`, () => { WombChangeReserveType(slave, "incubator", "nursery"); WombChangeReserveType(slave, "", "nursery");