code:
App.EndWeek.Player.longTermPhysicalEffects = function(PC = V.PC) {
	const r = [];

	const gigantomastiaMod = PC.geneticQuirks.gigantomastia === 2 ? (PC.geneticQuirks.macromastia === 2 ? 3 : 2) : 1;
	const boobSize = PC.boobs - PC.boobsImplant - PC.boobsMilk;
	const buttSize = PC.butt - PC.buttImplant;
	const faceValue = PC.face - PC.faceImplant;
	const averageDicking = V.slaves.filter(s => canAchieveErection(s) && isSlaveAvailable(s) && ((V.policies.sexualOpenness === 1 && s.devotion > 20 && App.Utils.sexAllowed(V.PC, s)) || s.toyHole === "dick"));
	const isNull = PC.dick === 0 && PC.vagina === -1;

	teeth();
	if (V.weightAffectsAssets !== 0) {
		weightAffectsAssets();
	}
	if (PC.anus > 0 || PC.vagina > 2) {
		holeRelaxation();
	}
	malenessAdjustments();
	if ((PC.balls === 0 || PC.ballType === "sterile") && PC.ovaries === 0 && PC.mpreg === 0) {
		noHormoneProduction();
	}
	if (isNull) {
		nullSexualFrustration();
	}
	adjustSexualAppetite();
	sexualSatisfaction();
	ageEffects();
	if (PC.geneMods.NCS === 1) {
		NCSEffects();
	}
	geneticQuirkEffects();
	lactationEffects();
	boobsEffects(); // Moved up from middle of the mobility and oversized asset set of text.
	bellyEffects(); // Moved up from middle of the mobility and oversized asset set of text.
	// player mobility function goes here.
	if (PC.diet !== "medicinal") {
		healthBlips();
	}

	return r.join(" ");

	function teeth() {
		if (PC.teeth === "straightening braces") {
			r.push(`Your orthodontia are aggravating, but a perfect smile goes a long way in business.`);
			if (random(1, 10) === 1) {
				r.push(`Your braces <span class="improvement">have straightened your teeth</span> at last. They can now be safely removed, or left on if you're into that sort of thing.`);
				PC.teeth = "cosmetic braces";
			}
		} else if (PC.teeth === "baby") {
			if (V.seeAge === 1 && PC.physicalAge >= 6 && random(0, (PC.birthWeek * 2))) {
				PC.teeth = "mixed";
				r.push(`Your loose tooth fell out. You're beginning your path to adulthood.`);
			}
		} else if (PC.teeth === "mixed") {
			if (V.seeAge === 1 && PC.physicalAge >= 12 && random(0, (PC.birthWeek * 2))) {
				r.push(`The last of your baby teeth has fallen out this week.`);
				if (PC.race === "catgirl") {
					PC.teeth = "fangs";
					r.push(`You now have a pretty, but intimidatingly sharp, set of feline fangs.`);
				} else {
					const crookedTeethGen = ((faceValue + 100) / 10);
					if (random(0, crookedTeethGen) < 5) {
						r.push(`Unfortunately,`);
						if (random(0, 5) < 1) {
							PC.teeth = "gapped";
							r.push(`they left you a large <span class="noteworthy">gap</span> between your front teeth that`);
						} else {
							PC.teeth = "crooked";
							r.push(`your teeth came in <span class="noteworthy">crooked</span> and`);
						}
						r.push(`will require braces to correct.`);
					} else {
						r.push(`Such a <span class="noteworthy">lovely smile</span> will be a boon when business deals.`);
						PC.teeth = "normal";
					}
				}
			}
		}
	}

	function weightAffectsAssets() {
		if (PC.weight <= 10) {
			if (PC.diet !== "fattening") {
				const rearQuirk = PC.geneticQuirks.rearLipedema === 2 ? 2 : 0;
				let normBreasts;
				let normButt;
				let adj1;
				let adj2;
				let adj3;
				if (PC.hormoneBalance > 30 && PC.geneMods.NCS !== 1) { // 'Expected' breast size based on weight for feminine-bodied slaves
					normBreasts = Math.trunc((100 + (PC.weight + 100) * 5 + 2 * PC.lactationAdaptation) * (0.85 + PC.hormoneBalance / 400) * gigantomastiaMod);
					normButt = ((PC.weight + 100) * .025 * ( 0.9 + PC.hormoneBalance / 600) * ( rearQuirk / 2 + 1));
				} else { // For masculine-and childish-bodied slaves
					normBreasts = ((PC.weight + 100) * 2 + PC.lactationAdaptation) * gigantomastiaMod;
					normButt = ((PC.weight + 100) * .0125 * (rearQuirk / 2 + 1));
				}
				if (PC.weight < -95) {
					adj1 = "desperately underweight";
					adj2 = "plush";
					adj3 = "healthy";
				} else if (PC.weight <= -30) {
					adj1 = "underweight";
					adj2 = "big";
					adj3 = "plush";
				} else if (PC.weight < -10) {
					adj1 = "skinny";
					adj2 = "huge";
					adj3 = "big";
				} else {
					adj1 = "thin";
					adj2 = "monstrous";
					adj3 = "huge";
				}
				if (boobSize > (4 * normBreasts + 400) && gigantomastiaMod !== 3) {
					r.push(`Your ${adj1} body <span class="change negative">burns fat off your ${adj2} boobs.</span>`);
					PC.boobs -= 50 / gigantomastiaMod;
				} else if (buttSize > (3 * normButt + 3) && rearQuirk !== 2) {
					r.push(`Your ${adj1} body <span class="change negative">burns fat off your ${adj2} butt.</span>`);
					PC.butt -= 0.4;
				} else if (boobSize > (3 * normBreasts + 200) && gigantomastiaMod !== 3) {
					r.push(`Your ${adj1} body <span class="change negative">burns some fat off your ${adj3} boobs.</span>`);
					PC.boobs -= 25;
				} else if (buttSize > (2 * normButt + 2) && rearQuirk !== 2) {
					r.push(`Your ${adj1} body <span class="change negative">burns some fat off your ${adj3} butt.</span>`);
					PC.butt -= 0.2;
				}
			}
		}
	}

	function holeRelaxation() {
		let averageDickSize = 0;
		if (averageDicking.length > 0) {
			averageDicking.forEach(s => averageDickSize += s.dick);
			averageDickSize = averageDickSize / averageDicking.length;
		}
		if (PC.geneMods.rapidCellGrowth !== 1) {
			if (PC.vagina >= 3 && averageDickSize < 4) {
				if (averageDicking.length > 0) {
					r.push(`Taking a break from big dicks`);
				} else {
					r.push(`A bit of rest`);
				}
				r.push(`lets <span class="improvement">your loose vagina recover a little.</span>`);
				PC.vagina -= 1;
			} else if (PC.anus >= 3 && averageDickSize < 4) {
				if (averageDicking.length > 0) {
					r.push(`A rest from taking big dicks up the ass`);
				} else {
					r.push(`A bit of rest`);
				}
				r.push(`lets <span class="improvement">your gaping anus recover a little.</span>`);
				PC.anus -= 1;
			}
		}
		if (PC.anus >= PC.analArea) {
			if (random(1, 100) > (80 - (20 * (PC.anus - PC.analArea)))) {
				PC.analArea += 1;
				r.push(`Your anal area is becoming accustomed to being`);
				if (PC.analArea > 3) {
					r.push(`permanently gaped, and the puckered skin around your butthole now runs from your tailbone all the way down to the`);
					if (PC.vagina > -1) {
						r.push(`bottom of your pussy.`);
					} else {
						r.push(`base of your dick.`);
					}
				} else if (PC.analArea > 2) {
					r.push(`very loose, and the puckered skin around your butthole now covers more of the space between your buttocks.`);
				} else if (PC.analArea > 1) {
					r.push(`used, and it now looks quite lewd.`);
				} else {
					r.push(`penetrated, and to put it delicately, is beginning to look a little lewd.`);
				}
			}
		}
	}

	function malenessAdjustments() {
		if (PC.dick > 0) {
			if (PC.foreskin > 0) {
				if (PC.foreskin - PC.dick < -1) {
					if (canAchieveErection(PC)) {
						r.push(`Your cock is much too fat for your foreskin, making your erections so uncomfortably constrictive that your appetite for sex is reduced by the reluctance to undergo the discomfort.`);
						PC.energy -= 2;
						if (random(1, 300) < PC.energy || PC.geneMods.rapidCellGrowth === 1) {
							r.push(`But you power through it, steadily <span class="change positive">stretching your foreskin</span> until it fits snugly rather than acting as a noose for your dick.`);
							PC.foreskin += 1;
						}
					}
				} else if (PC.foreskin - PC.dick < 0) {
					if (canAchieveErection(PC)) {
						r.push(`Your cockhead is a bit too fat for your foreskin, making erections uncomfortable to achieve; your arousal is slightly impeded by the reluctance to undergo the discomfort.`);
						PC.energy -= 1;
						if (random(1, 500) < PC.energy || PC.geneMods.rapidCellGrowth === 1) {
							r.push(`But you power through it, steadily <span class="change positive">stretching your foreskin</span> until it fits your dick snugly like it should.`);
							PC.foreskin += 1;
						}
					}
				} else if (PC.foreskin - PC.dick > 1 && PC.geneMods.rapidCellGrowth !== 1) {
					if (canAchieveErection(PC)) {
						if (random(30, 110) > PC.energy) {
							r.push(`Your penis is so small that even when hard, your loose foreskin rarely retracts. Despite your regular erections, <span class="change negative">your foreskin atrophies.</span>`);
							PC.foreskin -= 1;
						}
					} else {
						if (random(40, 120) > PC.energy) {
							r.push(`<span class="change negative">Your foreskin atrophies,</span> which is not surprising, since your penis has shrunk and you can't get it up.`);
							PC.foreskin -= 1;
						}
					}
				}
			}
			if (PC.clit > 0) {
				r.push(`Since you have a penis atop your vagina in place of a clitoris, you <span class="change negative">can't really say you have a clit anymore.</span>`);
				PC.clit = 0;
			}
		}
		// balls but no dick
		if (PC.balls > 0) {
			if (PC.scrotum > 0) {
				const extraScrotum = PC.scrotum - PC.balls;
				if (extraScrotum < -1) {
					r.push(`Your nuts are much too big for your ballsack, and a source of constant discomfort. Your <span class="libido dec">appetite for sex is reduced</span> by how much humping makes your junk hurt.`);
					PC.energy -= 2;
					if (random(0, 2) === 0 || PC.geneMods.rapidCellGrowth === 1) {
						r.push(`Your scrotum <span class="change positive">stretches out naturally</span> as your balls force it to accept their size.`);
						PC.scrotum += 1;
					}
				} else if (extraScrotum < 0 && PC.balls > 5) {
					if (random(0, 4) === 0 || PC.geneMods.rapidCellGrowth === 1) {
						r.push(`Your heavy balls tug your scrotum downward, and it <span class="change positive">stretches out naturally</span> under their weight.`);
						PC.scrotum += 1;
					}
				} else if (extraScrotum === -1) {
					if (random(0, 5) === 0 || PC.geneMods.rapidCellGrowth === 1) {
						r.push(`Your scrotum <span class="change positive">stretches out naturally</span> as it adapts to your newly expanded balls.`);
						PC.scrotum += 1;
					}
				} else if (extraScrotum > 1 && PC.geneMods.rapidCellGrowth !== 1) {
					if (PC.hormoneBalance >= 100) {
						if (random(0, 2) === 0) {
							r.push(`<span class="change negative">Your ballsack atrophies,</span> which is not surprising, since you're on female hormones and your balls have gotten so small.`);
							PC.scrotum -= 1;
						}
					}
				}
			} else {
				if (PC.balls > 2 && PC.diet !== "cum production") {
					r.push(`Your balls reside inside your abdomen, and while they still work there, it's not where they're designed to be. Routine scans show that <span class="change negative">they've atrophied,</span>`);
					if (PC.balls > 3) {
						r.push(`and will probably continue to do so until they stabilize at a below-average size.`);
					} else {
						r.push(`but are not likely to get any smaller.`);
					}
					PC.balls -= 1;
				}
			}
		}
	}

	function noHormoneProduction() {
		if (PC.energy > 5) {
			if (PC.energy <= 95) {
				r.push(`Since you lack the means of producing natural sex hormones, <span class="change negative">your sex drive suffers</span> accordingly.`);
				PC.energy -= 1;
			} else {
				r.push(`You're such a nymphomaniac that your lack of natural sex hormones doesn't really bother you.`);
			}
		}
	}

	function nullSexualFrustration() {
		let frustration = 0;
		if (PC.energy > 20) {
			r.push(`You`);
			if (averageDicking.length > 0 && PC.anus > 0) {
				if (PC.prostate !== 0) {
					r.push(`lack`);
					if (V.seeDicks > 0) {
						r.push(`a dick or`);
					}
					r.push(`a pussy, but you do have a prostate and ${averageDicking.length > 1 ? "slaves" : "a slave"} to work it, giving you at least one sexual outlet.`);
					frustration = 1;
				} else {
					r.push(`have no`);
					if (V.seeDicks > 0) {
						r.push(`dick, pussy, or prostate`);
					} else {
						r.push(`pussy`);
					}
					r.push(`and no easy way to get off.`);
					frustration = 2;
				}
			} else {
				r.push(`have no`);
				if (V.seeDicks > 0) {
					r.push(`dick, no`);
				}
				r.push(`pussy, and are above sticking things in your ass, leaving you no easy way to get off.`);
				frustration = 2;
			}
		}
		if (frustration > 0) {
			r.push(`This <span class="change negative">impacts your libido</span> and is just really irritating.`);
			PC.energy -= frustration * 3;
		}
	}

	function adjustSexualAppetite() {
		if (PC.energy > 20 && PC.energy < 70 && PC.diet !== "weaning") {
			r.push(`The sexually charged atmosphere of the arcology rubs off on you, <span class="libido inc">steadily bolstering your appetite for sex.</span>`);
			PC.energy++;
		}
		PC.energy = Math.max(PC.energy, 0);
	}

	function sexualSatisfaction() {
		const sexPartners = V.slaves.filter(s => App.Utils.sexAllowed(V.PC, s) && isSlaveAvailable(s)).shuffle();
		const wives = sexPartners.filter(s => s.relationship === -3);
		// Fuck wives every week
		wives.forEach(s => {
			if (averageDicking.includes(s)) {
				if (PC.vagina > 0) {
					seX(PC, "vaginal", s, "penetrative");
					PC.need -= 3;
				} else if (PC.anus > 0) {
					seX(PC, "anal", s, "penetrative");
					if (PC.prostate > 0) {
						PC.need -= 2;
					}
				} else {
					seX(PC, "oral", s, "penetrative");
				}
			} else if (!isNull) {
				SimpleSexAct.Player(s, 2);
				PC.need -= 2;
			}
		});
		// Still horny? Fuck your chattel.
		let prLTPE = 0;
		while (PC.need > 0 && sexPartners.length !== prLTPE) {
			if (averageDicking.includes(sexPartners[prLTPE])) {
				if (PC.vagina > 0) {
					seX(PC, "vaginal", sexPartners[prLTPE], "penetrative");
					PC.need -= 2;
				} else if (PC.anus > 0) {
					seX(PC, "anal", sexPartners[prLTPE], "penetrative");
					if (PC.prostate > 0) {
						PC.need--;
					}
				} else {
					seX(PC, "oral", sexPartners[prLTPE], "penetrative");
				}
			} else if (!isNull) {
				SimpleSexAct.Player(sexPartners[prLTPE]);
				PC.need--;
			}
			prLTPE++;
		}
		// Needs more holes to fuck, or more dedicated fucktoys.
		if (PC.need) {
			if (PC.need > PC.energy / 2) {
				const decay = 1 + Math.trunc(PC.need / 20);
				r.push(`You just can't get off enough to sate your`);
				if (PC.aphrodisiacs > 0 || PC.inflationType === "aphrodisiac") {
					r.push(`aphrodisiac fueled sex drive's demands, and the constant, distracting frustration`);
					if (PC.balls > 0) {
						r.push(`leaves you with <span class="health dec">a painful case of blue balls.</span>`);
					} else {
						r.push(`<span class="health dec">stresses your body considerably.</span>`);
					}
					healthDamage(PC, decay);
				} else if (PC.need > PC.energy && PC.energy >= 70) {
					r.push(`powerful sex drive's demands, and the constant, distracting frustration`);
					if (PC.balls > 0) {
						r.push(`leaves you with <span class="health dec">a painful case of blue balls.</span>`);
					} else {
						r.push(`<span class="health dec">stresses your body considerably.</span>`);
					}
					r.push(`Unable to achieve the release you need, your <span class="libido dec">runaway libido is damaged.</span>`);
					healthDamage(PC, decay);
					PC.energy -= decay;
				} else {
					r.push(`healthy sex drive's demands, and the constant, distracting frustration <span class="libido dec">wears away at your libido.</span>`);
					PC.energy -= decay;
				}
			}
		}
	}

	function ageEffects() {
		if (PC.geneMods.immortality !== 1) {
			if (PC.physicalAge >= 45) {
				if (PC.physicalAge >= 70) {
					if (PC.health.condition >= -90) {
						if (PC.diet !== "medicinal") {
							if (PC.diet !== "healthy" || !canEatFood(PC) || PC.chem > 0) {
								if (PC.physicalAge - 30 > random(1, 100)) {
									r.push(`Your advanced age comes hand in hand with increased health complications. <span class="health dec">This was not a good week for you.</span>`);
									healthDamage(PC, 10);
								}
							}
						}
					}
				} else {
					if (PC.health.condition > 20) {
						if (PC.diet !== "medicinal") {
							if (PC.diet !== "healthy" || !canEatFood(PC) || PC.chem > 0) {
								if (PC.physicalAge - 30 > random(1, 100)) {
									r.push(`This was a rough week for you. It seems your <span class="health dec">age</span> is catching up to you.`);
									healthDamage(PC, 10);
								}
							}
						}
					}
				}
				if (PC.geneticQuirks.neoteny !== 2) {
					if (PC.health.condition < random(1, 100) || PC.chem > 0) {
						if (PC.physicalAge - 30 > random(1, 100)) {
							r.push(`Your face looks <span class="change negative">just a little older</span> than it did last week. Stress is starting to take its toll on you.`);
							PC.face -= 2;
						}
					}
				}
			}
			if (V.seeAge === 1) {
				if (PC.visualAge > 15 && PC.physicalAge > 15 && PC.geneticQuirks.neoteny !== 2) {
					if (PC.health.condition < random(-50, 0) || PC.chem > 0 || PC.tired > 90) {
						if (PC.ageAdjust === -40) {
							r.push(`Life has been hard on you lately, leaving you <span class="change negative">looking a little older</span> than you should.`);
							PC.visualAge++;
							PC.ageAdjust = 0;
						} else if (random(1, 100) > 40) {
							PC.ageAdjust--;
						}
					}
				}
			}
		} else {
			if (PC.physicalAge > 26 || PC.visualAge > 26) {
				r.push(`A side effect of the immortality treatment is steady reversal of old age; <span class="change positive">you look a little younger</span> than you did last week.`);
			}
			if (PC.physicalAge > 26) {
				PC.physicalAge--;
			}
			if (PC.visualAge > 26) {
				PC.visualAge--;
			}
		}
		if (PC.geneticQuirks.progeria === 2 && PC.birthWeek > 2) {
			if (((PC.birthWeek - 2) % 5) === 0) { // progeria should increase age on every fifth week but not zeroth week as the birthday age up has already handled that.
				if (V.geneticMappingUpgrade >= 1 || (PC.physicalAge >= PC.actualAge + 5)) {
					r.push(`You watch your body rapidly degrade due to your progeria. <span class="change negative">Death will not have to wait long for you.</span>`);
				} else {
					r.push(`You seem <span class="change negative">a little older</span> this week than the last, and not the way you'd expect; you seem to be aging in years, not weeks.`);
				}
				PC.physicalAge++;
				PC.visualAge++;
				PC.ovaryAge += 5; // Since we are using .physicalAge, we need to manipulate things to prevent the possibility of pregnancy.
			}
		}
	}

	function NCSEffects() {
		// NCS youthening and shrinkage of giant organs and regular shrinking for regular organs happening when not youthening
		let countNCS = 0;
		let youthening = 0;
		const youtheningLevel = Math.round(Math.clamp(((PC.physicalAge - 8) / 4) + .25, 0, 10));
		/*
		**	To prevent the NCS from firing on every attribute in one year, this variable counts the
		**	number of NCS affects that fire. Most affects will only trigger if one or two other
		**	have already fired, but won't fire beyond. There are two exceptions to that, first,
		**	massively oversized growth assets, which will fire always, e.g. boobs > 5000, dick > 10,
		**	etc. Second, Body structure, hips/shoulders may fire any time, (decreasing random).
		**
		**	Youthening (visual age year number reduction)
		**	Happens on a sliding scale, the older a slave is, the faster the de-aging goes.
		**	Consequently, it goes slower as the visual age approaches an 8 year old loli/shota body.
		**	Age 45+=> auto age reduction 1 year per 1 week.
		**	Age 41-44=> age reduction 1 year per 2 weeks.
		**	Age 37-40=> age reduction 1 year per 3 weeks.
		**	Age 33-36=> age reduction 1 year per 4 weeks.
		**	Age 29-32=> age reduction 1 year per 5 weeks.
		**	Age 25-28=> age reduction 1 year per 6 weeks.
		**	Age 21-24=> age reduction 1 year per 7 weeks.
		**	Age 17-20=> age reduction 1 year per 8 weeks.
		**	Age 13-16=> age reduction 1 year per 9 weeks.
		**	Age 9-12=> slowest age reduction 1 year per 10 weeks.
		**
		**	To track this, the slave.NCSyouthening field counts the *charge* of youthening the slave
		**	currently has, and if it's over the youthening requirements, the slave will become younger.
		**
		**	Additionally while years fly off quickly in the beginning for older slaves, and oversized body parts
		**	shrink away, other secondary characteristics slowly but surely drop off, but based on the above
		**	*charge* of youthening.
		**
		**	Note that with this system a 45 year old slave given NCS would be indistinguishable from an 8 year
		**	old in a little over 4 years time.
		*/
		PC.NCSyouthening++;
		if (PC.visualAge > 8 && PC.NCSyouthening >= (11 - youtheningLevel)) {
			// NCS: youthening fires!
			if (V.seeAge === 1) {
				r.push(`The accumulated effects of your <span class="ncs">NCS</span> grant you a <span class="change positive">slightly more youthful appearance.</span>`);
			}
			PC.visualAge--;
			countNCS++;
			youthening++;
		}
		/*
		**	height always fires if over 176 cm,
		**	also fires if the slave is tall for their visual age
		**	also if they are in * NCSyouthening 3-5 (reverse teen years) and
		**	over 126 cm
		**	or over height (30% chance)
		*/
		const heightDelta = PC.height - Height.mean(PC);
		let shrinkage;
		if ((PC.height > 176) || (heightDelta > 5) || ((PC.NCSyouthening >= 6) && ((PC.height > 126) || (heightDelta > 0)) && (random(1, 100) < 30))) {
			if (heightDelta > 15) {
				shrinkage = 5;
			} else if (heightDelta > 5) {
				shrinkage = 4;
			} else if (heightDelta > -5) {
				shrinkage = 3;
			} else if (heightDelta > -15) {
				shrinkage = 2;
			} else {
				shrinkage = 1;
			}
			r.push(`Your <span class="ncs">NCS</span> gradually <span class="ncs">reduces your stature, leaving you a little shorter.</span>`);
			PC.height -= shrinkage;
			countNCS++;
		}
		/*
		**	Boobs, nipples and areolae.
		**	Boobs always fires for over 5000 cc,
		**	nipples/areolae shrinkage will fire for boobs under 5000,
		**	where nipples are tiny/cute at 30% chance.
		**	anything over 300 will fire if
		**	the slave's accumulated youthening is 6 or higher,
		**	or by a 50% chance.
		*/
		let nipplesString;
		if ((boobSize >= 5000) && (random(1, 100) < 90) && gigantomastiaMod !== 3) {
			r.push(`Your <span class="ncs">NCS</span> <span class="change negative">reduces the size of your heaving breasts.</span>`);
			PC.boobs -= Math.round(boobSize * .11);
			countNCS++;
		} else if ((boobSize <= 5000) && (!["cute", "fuckable", "tiny", "flat"].includes(PC.nipples)) && (random(1, 100) < 30)) {
			if (PC.nipples === "inverted") {
				nipplesString = "partially inverted";
			} else if (PC.nipples === "partially inverted") {
				nipplesString = "puffy";
			} else {
				nipplesString = either("cute", "tiny");
			}
			r.push(`Your <span class="ncs">NCS</span> has <span class="change positive">rendered your nipples ${nipplesString}.</span>`);
			PC.nipples = nipplesString;
			if (PC.areolae > 1) {
				r.push(`Your areolae have also shrunk down to a more normal`);
				if (PC.areolaeShape !== "circle") {
					r.push(`size while retaining their unique ${PC.areolaeShape} shapes.`);
				} else {
					r.push(`size.`);
				}
				PC.areolae = 1;
				countNCS++;
			}
		} else if ((boobSize >= 300) && ((PC.NCSyouthening >= 6) || (random(1, 100) < 50)) && gigantomastiaMod !== 3) {
			r.push(`Your <span class="ncs">NCS</span> <span class="change negative">trims down your chest.</span>`);
			PC.boobs -= Math.round(PC.boobs * .09);
			countNCS++;
		}
		/*
		**	Hips and Shoulders reshaping
		**	One or the other can happen per week as long as the hips and shoulders are bigger than the smallest
		**	level, though the chances get much more likely for the widest sizes.
		*/
		if (((PC.hips - Math.abs(PC.hipsImplant)) > -2) && (random(1, 100) < ((PC.hips + 3) * 18))) {
			r.push(`Your <span class="ncs">NCS</span> works to <span class="change negative">narrow the size of your`);
			if (PC.hips >= 2) {
				r.push(`freakish`);
			} else if (PC.hips >= 0) {
				r.push(`wide`);
			} else if (PC.hips >= -2) {
				r.push(`already slender`);
			}
			r.push(`hips.</span>`);
			PC.hips -= 1;
			countNCS++;
		} else if (((PC.shoulders - Math.abs(PC.shouldersImplant)) > -2) && (random(1, 100) < ((PC.shoulders + 3) * 18))) {
			r.push(`Your <span class="ncs">NCS</span> works to <span class="change negative">narrow the size of your`);
			if (PC.shoulders >= 2) {
				r.push(`domineering`);
			} else if (PC.shoulders >= -2 && PC.shoulders < 0) {
				r.push(`already slender`);
			}
			r.push(`shoulders.</span>`);
			PC.shoulders -= 1;
			countNCS++;
		}
		/*
		**	Dick and clit shrinkage
		**	Massive 10+ Dicks or 5+ Clits always fire, and at double power.
		**	Below that by chance, (reducing chances by current size). In general clits shrink faster.
		*/
		if (PC.dick >= 10) {
			r.push(`Your <span class="ncs">NCS</span> tries its best to <span class="change negative">reduce the size of your giant dick</span> to something more fitting of a child.`);
			PC.dick -= 2;
			countNCS++;
		} else if (PC.clit >= 5) {
			r.push(`Your <span class="ncs">NCS</span> tries its best to <span class="change negative">reduce the size of your enormous clit-dick</span> to something more appropriate for a child.`);
			PC.clit -= 2;
			countNCS++;
		} else if ((countNCS < 3) && (PC.dick > 2) && (random(1, 100) < ((PC.dick + 1) * 9))) {
			r.push(`Your <span class="ncs">NCS</span> tries its best to <span class="change negative">reduce the size of your dick</span> to something more fitting of a child.`);
			PC.dick -= 1;
			countNCS++;
		} else if ((countNCS < 3) && (PC.clit >= 1) && (random(1, 100) < ((PC.clit + 2) * 16))) {
			r.push(`Your <span class="ncs">NCS</span> has <span class="change negative">reduced the size of your clit.</span>`);
			PC.clit -= 1;
			countNCS++;
		}
		/*
		**	Balls.
		**	Massive testicles (10+) drop by 2 levels,
		**	Others decrease by chance based on current size.
		*/
		if (PC.balls >= 10) {
			r.push(`Your <span class="ncs">NCS</span> gets busy <span class="change negative">reducing the size of your titanic balls.</span>`);
			PC.balls -= 2;
			countNCS++;
		} else if ((countNCS < 3) && (PC.balls > 2) && (random(1, 100) < ((PC.balls + 1) * 8))) {
			r.push(`Your <span class="ncs">NCS</span> gets busy <span class="change negative">reducing the size of your balls.</span>`);
			PC.balls -= 1;
			countNCS++;
		}
		/*
		**	Butt.
		**	Tremendous butts burn of by 2 points.
		**	Regular butts based on chances, decrease as the size does.
		*/
		if (buttSize >= 10) {
			r.push(`Your <span class="ncs">NCS</span> <span class="change negative">reduces the size of your bulbous butt</span> to something more reasonable.`);
			PC.butt -= 2;
			countNCS++;
		} else if ((countNCS < 3) && (buttSize >= 1) && (random(1, 100) < (PC.butt * 9))) {
			r.push(`Your <span class="ncs">NCS</span> <span class="change negative">reduces the size of your butt a little.</span>`);
			PC.butt -= 1;
			countNCS++;
		}
		/*
		**	Scrotum and Labia
		**	One or the other can fire per week.
		**	Pendulous ballsacks or sagging labia will always fire.
		**	Otherwise by reducing chance based on current sizes, but labias are a little more likely.
		*/
		if (PC.geneMods.rapidCellGrowth !== 1) {
			if (PC.scrotum >= 5) {
				r.push(`Your <span class="ncs">NCS</span> helps <span class="change negative">tighten your pendulous scrotum.</span>`);
				PC.scrotum -= 2;
				countNCS++;
			} else if (PC.labia >= 5) {
				r.push(`Your <span class="ncs">NCS</span> kicks in and <span class="change negative">reduces the size of your sagging labia.</span>`);
				PC.labia -= 2;
				countNCS++;
			} else if ((countNCS < 3) && (PC.labia >= 1) && (random(1, 100) < (PC.labia * 11))) {
				r.push(`Your <span class="ncs">NCS</span> kicks in and <span class="change negative">reduces the size of your labia.</span>`);
				PC.labia -= 1;
				countNCS++;
			} else if ((countNCS < 3) && (PC.scrotum > 1) && (random(1, 100) < (PC.scrotum * 8.5))) {
				r.push(`Your <span class="ncs">NCS</span> helps <span class="change negative">tighten up your scrotum.</span>`);
				PC.scrotum -= 1;
				countNCS++;
			}
		}
		/*
		**	Voice.
		**	Small chance for any non-childlike voice.
		*/
		if ((countNCS < 3) && (PC.voice < 3) && PC.voice !== 0 && (random(1, 100) > (PC.voice * 15))) {
			r.push(`Your <span class="ncs">NCS</span> has <span class="change positive">raised the pitch of your voice; you now sounds more childlike.</span>`);
			PC.voice += 1;
			countNCS++;
		}
		/*
		**	Pussy/Ass-Pussy rejuvenation.
		**	10% chance of either one rejuvenating per week. (The Child Whore's delight!)
		*/
		if (PC.geneMods.rapidCellGrowth !== 1) {
			if ((countNCS < 2) && (PC.vagina > 1) && (random(1, 100) < (PC.vagina * 10))) {
				r.push(`Your <span class="ncs">NCS</span> manages to <span class="change positive">reverse the stretch in your vagina, leaving it more childlike.</span>`);
				PC.vagina -= 1;
				countNCS++; // These are in case anything is ever added after.
			} else if ((countNCS < 2) && (PC.anus > 1) && (random(1, 100) < (PC.anus * 10))) {
				r.push(`Your <span class="ncs">NCS</span> effectively <span class="change positive">reverses the stretching in your anus, leaving your rear a little more youthful.</span>`);
				PC.anus -= 1;
				countNCS++;
			}
		}
		/*
		**	reset youthening for those that just got younger (see age above) or for already lolified slaves.
		*/
		if (youthening > 0 || PC.NCSyouthening > 9) {
			PC.NCSyouthening = 0;
		}
	}

	function geneticQuirkEffects() {
		/* progeria and neoteny triggers */
		if (PC.geneticQuirks.neoteny === 3 && PC.physicalAge >= 12) {
			PC.geneticQuirks.neoteny = 2;
		}
		if (PC.geneticQuirks.progeria === 3 && PC.physicalAge >= 3) {
			PC.geneticQuirks.progeria = 2;
		}
		/* macromastia random trigger + growth */
		if (PC.geneticQuirks.gigantomastia === 3 && random(70 - PC.physicalAge, 300) < PC.hormoneBalance) {
			PC.geneticQuirks.gigantomastia = 2;
		}
		if (PC.geneticQuirks.macromastia === 3 && random(70 - PC.physicalAge, 300) < PC.hormoneBalance) {
			PC.geneticQuirks.macromastia = 2;
		}
		if (PC.geneticQuirks.macromastia === 2 && PC.geneticQuirks.gigantomastia === 2) {
			if (boobSize < 100000 && PC.weight >= -95) {
				if (V.geneticMappingUpgrade >= 1) {
					r.push(`Your <span class="change positive">breasts grow ever larger</span> due to your abnormal strain of gigantomastia.`);
				} else {
					r.push(`Your <span class="change positive">breasts are spilling out of your bra</span> and you just purchased it last week; there is no clear reason for why you should be experiencing growth like this.`);
				}
				PC.boobs += 30;
			}
		} else if (PC.geneticQuirks.gigantomastia === 2) {
			if (boobSize < 25000 && PC.weight >= -95) {
				if (V.geneticMappingUpgrade >= 1) {
					r.push(`Your <span class="change positive">breasts have grown larger</span> due to your gigantomastia.`);
				} else {
					r.push(`Your new bra is tight around your chest. It seems your <span class="change positive">breasts have grown slightly</span> since last week, but you cannot account for why.`);
				}
				PC.boobs += 20;
			}
		} else if (PC.geneticQuirks.macromastia === 2) {
			if (boobSize < 5000 && PC.weight >= -95) {
				if (V.geneticMappingUpgrade >= 1) {
					r.push(`You <span class="change positive">experience slight breast growth</span> from your macromastia.`);
				}
				PC.boobs += 10;
			}
		}
		if (PC.geneticQuirks.galactorrhea === 2 && PC.inappropriateLactation === 1) {
			if (V.geneticMappingUpgrade >= 1) {
				r.push(`You have galactorrhea, and now <span class="change positive">your breasts produce milk.</span> It was inevitable, really.`);
			} else {
				r.push(`You have <span class="change positive">spontaneously begun lactating.</span> You'll have to run tests on your food and drink, some hormones must have gotten mixed in somehow.`);
			}
			PC.lactation = 1;
			PC.lactationDuration = 2;
		}
		if (PC.geneticQuirks.rearLipedema === 2 && PC.butt < 20 && PC.weight >= -95) {
			if (V.geneticMappingUpgrade >= 1) {
				r.push(`It won't be long until your lipedema <span class="change positive">expands your ass</span> to the point nothing will fit it again.`);
			} else {
				r.push(`Every week <span class="change positive">your underwear feels a little smaller;</span> the menials that handle your wash clearly need to learn how to do their job.`);
			}
			PC.butt += .1;
		}

		if (PC.geneticQuirks.uterineHypersensitivity === 2) {
			if (PC.vaginaLube < 2 && PC.preg >= PC.pregData.normalBirth * .75) {
				r.push(`You're so pregnant and so horny${V.geneticMappingUpgrade >= 1 ? ", thanks to your hypersensitive uterus," : ""} that it comes as little surprise when your cunt starts producing more sexual fluids.`);
				PC.vaginaLube += 1;
			}
		}
	}

	function lactationEffects() {
		if (PC.lactation > 1) {
			if (PC.geneMods.NCS === 1) {
				// Power struggle for sure
				if (PC.boobs < 500) {
					r.push(`The powerful lactation drugs implanted in your chest <span class="change positive">slowly swell your petite breasts.</span>`);
					PC.boobs += 10;
				}
			} else if (PC.boobs < 800) {
				r.push(`Your <span class="change positive">small breasts rapidly swell</span> to meet the production demanded by your lactation implants.`);
				PC.boobs += 100;
			} else if (PC.boobs < 1600) {
				r.push(`Your <span class="change positive">big breasts slowly swell</span> under your lactation implants' pressure to produce even more milk.`);
				PC.boobs += 50;
			} else if (PC.boobs < 3000 * gigantomastiaMod) {
				r.push(`Your <span class="change positive">enormous breasts grow little by little</span> as your lactation implants push them to produce even more milk.`);
				PC.boobs += 25;
			}
			PC.lactationDuration = 2;
		}
		if (PC.rules.lactation === "induce") {
			if (PC.lactation > 0) {
				PC.rules.lactation = "maintain";
			} else {
				r.push(`You pay a lot of attention to your breasts, and insist that your slaves do as well during sex.`);
				r.push(induceLactation(PC, 3));
				if (PC.lactation === 1) {
					r.push(`Now it is just a matter of <span class="noteworthy">maintaining production.</span>`);
					PC.rules.lactation = "maintain";
				}
			}
		} else if (PC.lactation === 0) {
			PC.rules.lactation = "none";
		} else if (PC.rules.lactation === "maintain") {
			r.push(`You regularly see to your breasts to make sure your milk production doesn't dry up; be it by hand, milker, or mouth, you keep yourself comfortably drained.`);
			PC.lactationDuration = 2;
		} else if (PC.rules.lactation === "sell") {
			const milk = milkAmount(PC);
			let milkSale;
			r.push(`Whenever you have a free moment and a chest swollen with milk, you spend your time attached to the nearest milker. As a result, you produce ${milk} liters of sellable milk over the week.`);
			if (V.arcologies[0].FSPastoralist !== "unset") {
				if (V.arcologies[0].FSPastoralistLaw === 1) {
					milkSale = Math.round(milk * ((28 * (V.rep/1000)) + Math.trunc(V.arcologies[0].FSPastoralist / 30)));
					r.push(`Since breast milk is ${V.arcologies[0].name}'s only legal dairy product, and yours is in a class all of its own, society can't get enough of it and you make ${cashFormat(milkSale)}.`);
				} else {
					milkSale = Math.round(milk * ((12 * (V.rep/1000)) + Math.trunc(V.arcologies[0].FSPastoralist / 30)));
					r.push(`Since milk is fast becoming a major part of ${V.arcologies[0].name}'s dietary culture, and yours is in a class all of its own, you make <span class="yellowgreen">${cashFormat(milkSale)}.</span>`);
				}
			} else {
				milkSale = milk * 8;
				r.push(`Your milk is sold for <span class="yellowgreen">${cashFormat(milkSale)}.</span>`);
			}
			PC.lactationDuration = 2;
			cashX(milkSale, "personalBusiness");
		}
		if (PC.lactation === 1) {
			if (PC.boobsMilk > 0) {
				if (PC.boobs - PC.boobsImplant + PC.boobsMilk > PC.boobs - PC.boobsImplant * 2) {
					r.push(`Your breasts <span class="health dec">feel like they are going to explode with milk.</span> Spending the week like this is excruciating,`);
					healthDamage(PC, 20);
				} else if (PC.boobs - PC.boobsImplant + PC.boobsMilk > PC.boobs - PC.boobsImplant * .5) {
					r.push(`Having breasts so swollen with milk that every motion hurts is <span class="health dec">very unpleasant.</span> Spending a week like this only makes it worse,`);
					healthDamage(PC, 5);
				} else {
					r.push(`You spend the week with breasts aching for release,`);
				}
			}
			if (PC.lactationDuration === 0) {
				if (PC.geneticQuirks.galactorrhea === 2 && random(1, 100) <= PC.lactationAdaptation) {
					r.push(`and eventually you lose control, thoroughly soaking yourself in an amusingly lewd display.`);
					if (V.geneticMappingUpgrade >= 1) {
						r.push(`Normally this would spell the end of your lactation, but your galactorrhea won't let that come to pass and maintains your production despite the lack of demand.`);
					}
					PC.boobsMilk = Math.round(PC.boobsMilk / 2);
					PC.boobs -= PC.boobsMilk;
					PC.lactationDuration = 1;
				} else {
					if (PC.boobsMilk > 0) {
						r.push(`but without regular use, your <span class="change negative">lactation finally ends</span> and you can drain your remaining milk without encouraging it.`);
					} else {
						r.push(`With no reason to continue production, your <span class="yellow">lactation has stopped.</span>`);
					}
					PC.boobs -= PC.boobsMilk;
					PC.boobsMilk = 0;
					PC.lactation = 0;
				}
			}
		}
	}

	function boobsEffects() {
		if (PC.breastMesh !== 1) {
			if (PC.boobs - (PC.muscles * 30) > 5000 && PC.boobs <= 8000 && PC.boobsImplant / PC.boobs < .50) { // Check now requires breasts to be less than half implant to sag.
				if (PC.physicalAge < random(10, 200)) {
					if (PC.boobShape === "perky") {
						r.push(`Breasts of your size and weight just <span class="change negative">cannot remain perky;</span> your nipples now point forward as your boobs rest heavily against the chest beneath them.`);
						PC.boobShape = "torpedo-shaped";
					} else if (PC.boobShape !== "saggy") {
						r.push(`Your breasts are so heavy that gravity forces them to become saggy. Your nipples now point downward and your bosom sways pendulously with every motion unless you restrain it.`);
						PC.boobShape = "saggy";
					}
				}
			} else if (PC.boobsImplant / PC.boobs >= .90 && PC.boobs > 2000 && !["saggy", "downward-facing", "spherical"].includes(PC.boobShape) && random(1, 100) > 70) {
				r.push(`Your massive implants take up so much of your breasts that they become firm and round. Your nipples now point forward, if not a little downward and to the side, as your boobs begin to pull away from your chest under their weight.`);
				PC.boobShape = "spherical";
			}
		}
		// Oversized breast shrinkage
		let triggerSize;
		if (PC.physicalAge <= 12) {
			triggerSize = (gigantomastiaMod === 2 ? 25000 : 15000);
		} else {
			triggerSize = 30000;
		}
		if (boobSize > triggerSize) {
			if (V.arcologies[0].FSAssetExpansionistResearch === 0) {
				if (PC.drugs !== "breast injections") { // add non-slave drug as well in the future
					if (PC.bellyPreg < 300000 && PC.hormoneBalance < 300 && gigantomastiaMod !== 3) {
						if (boobSize < triggerSize * 2) {
							r.push(`Your breasts are larger than your body can possibly sustain without pharmaceutical intervention, and they <span class="change negative">naturally lose mass.</span>`);
							PC.boobs -= 25;
						} else {
							r.push(`Your breasts are far, far beyond what a human body can sustain without pharmaceutical intervention, and they <span class="change negative">naturally lose mass.</span>`);
							PC.boobs -= 50 / gigantomastiaMod;
						}
						if (PC.geneMods.NCS === 1 && random(1, 100) > 50 * gigantomastiaMod) {
							r.push(`This effect is massively compounded by your <span class="ncs">NCS.</span>`);
							PC.boobs -= Math.round(boobSize * .1);
						}
					}
				}
			}
		}
		// boobs size nipple effects
		if (PC.nipples === "fuckable" && (PC.boobs - PC.boobsImplant < 500)) {
			r.push(`Without the necessary flesh to support them, your fuckable nipples pop out and stay out. They have <span class="change negative">reverted to being huge.</span>`);
			PC.nipples = "huge";
		} else if (PC.nipples === "flat" && (PC.boobsImplant / PC.boobs < 0.75)) {
			r.push(`With your breasts no longer being overstretched by implants, your flat nipples have a chance to relax and adopt a more natural shape. They now <span class="change positive">protrude hugely.</span>`);
			PC.nipples = "huge";
		} else if (PC.boobShape === "spherical" && PC.nipples !== "flat" && PC.lactation === 0 && PC.piercing.nipple.weight === 0) { // Lactation and piercings discourage flattening and convert flat nipples to huge ones.
			r.push(`With your implants stretching the skin of your breasts thin, it's only natural that your nipples are also <span class="change negative">pulled flat</span> by the tension.`);
			PC.nipples = "flat";
		}
	}

	function bellyEffects() {
		if (PC.pregAdaptation > 40 && (PC.belly < 5000 && PC.preg < 1 && PC.pregWeek === 0) && PC.geneticQuirks.uterineHypersensitivity !== 2) {
			if (PC.pregAdaptation > 1001) { // TODO: Compact, or expand useless branches below
				PC.pregAdaptation--;
			} else if (PC.pregAdaptation >= 751 && PC.pregAdaptation < 1000) {
				PC.pregAdaptation--;
			} else if (PC.pregAdaptation >= 501 && PC.pregAdaptation < 750) {
				PC.pregAdaptation--;
			} else if (PC.pregAdaptation >= 251 && PC.pregAdaptation < 500) {
				PC.pregAdaptation--;
			} else if (PC.pregAdaptation >= 101 && PC.pregAdaptation < 250) {
				PC.pregAdaptation--;
			} else if (PC.pregAdaptation >= 51 && PC.pregAdaptation < 100) {
				PC.pregAdaptation--;
			}
		}
		if (PC.cervixImplant >= 1) {
			if (PC.bellyImplant >= 800000 || (PC.bellyImplant > 130000 && V.arcologies[0].FSTransformationFetishistResearch !== 1)) {
				r.push(`Your cervix implant detected that the volume of filler in your belly its implant's threshold, and <span class="change negative">opens backflow</span> several times throughout week.`);
				if (V.arcologies[0].FSTransformationFetishistResearch !== 1) {
					PC.bellyImplant = 120000;
				} else {
					PC.bellyImplant = 750000;
				}
			}
		}
	}

	function healthBlips() {
		if (PC.chem > 5) {
			if (random(1, 220) < (PC.chem * 2) + PC.physicalAge - PC.health.condition) {
				healthDamage(PC, 5);
				switch (random(1, 10)) {
					case 1:
						r.push(`A bout of foreplay was interrupted when your partner discovered a small lump in your ${PC.boobs >= 300 ? "breast" : "chest"}. Your doctor removed it easily enough, for a small fee, with testing revealing it as benign.`);
						cashX(forceNeg(500), "PCmedical");
						break;
					case 2:
						r.push(`A bout of intense virtigo kept you stuck in bed, unwilling to move. Eventually the feeling passes on it's own, just as suddenly as it arrived.`);
						break;
					case 3:
						r.push(`You spent the morning experiencing an unshakable sense of dread. Eventually the feeling passes on it's own, just as suddenly as it arrived.`);
						break;
					case 4:
						r.push(`You're plagued by a series of severe headaches that are calmed easily enough by a dose of aspirin each.`);
						break;
					case 5:
						r.push(`You experience recurrent nausea each morning this week.`);
						if (PC.preg.isBetween(0, 4)) {
							if (PC.pregKnown === 0) {
								r.push(`It turns out <span class="pregnant">you're pregnant,</span> but it still didn't feel like ${PC.counter.birthsTotal > 0 ? "your morning sickness did last pregnancy" : "morning sickness to you"}.`);
								PC.pregKnown = 1;
							} else {
								r.push(`You have been experiencing morning sickness already, and this is not helping matters.`);
							}
						} else {
							r.push(`Your stomach is soothed with a little medication, but it was still unpleasant.`);
						}
						break;
					case 6:
						r.push(`You had trouble sleeping without taking anything before bed, several nights in a row.`);
						break;
					case 7:
						r.push(`After a vigorous lovemaking session, you discover your heart rate is not coming down. A minor dose of medication resolves it, but it was still alarming.`);
						break;
					case 8:
						r.push(`Much to your dismay, you discover that your blood isn't clotting properly. Eventually the cut stops bleeding on its own, but it does not bode well should anything worse happen to you.`);
						break;
					case 9:
						r.push(`You've developed several ugly little ${PC.skin} skin tags. The autosurgery has everything you need to trivially remove them, but they are still annoying.`);
						break;
					default:
						r.push(`Often you just feel wrong for a short spell before recovering.`);
				}
				r.push(`This likely was <span class="health dec">a side effect</span> of some treatment you've undergone.`);
			}
		}

		if (PC.weight > 190) {
			r.push(`Your extreme obesity <span class="health dec">directly impacts</span> your health, but since you let yourself get this large, it's not really that bothersome.`);
			healthDamage(PC, 2);
			if (random(1, 100 + PC.health.condition) < 5) {
				r.push(`Unfortunately, this week ushered in severe health complications related to it. After extensive, and very costly, heart surgery, your life was saved, though you'd better set aside some ¤ for when it happens again.`);
				cashX(forceNeg(15000), "PCmedical");
				healthDamage(PC, 80);
			}
		} else if (PC.weight > 160) {
			if (random(1, 150 + PC.health.condition) < 5) {
				r.push(`Your obesity has brought severe health complications upon you this week. They required extensive, and costly, surgery to correct, so it may be time to pay more mind to your wellbeing.`);
				cashX(forceNeg(5000), "PCmedical");
				healthDamage(PC, 40);
			}
		} else if (PC.weight > 130) {
			if (random(1, 175 + PC.health.condition) < 5) {
				r.push(`Your weight caused you some <span class="health dec">severe health complications</span> this week. They passed after some time, but are rather concerning.`);
				healthDamage(PC, 20);
			}
		} else if (PC.weight > 95) {
			if (random(1, 200 + PC.health.condition) < 5) {
				r.push(`Your weight caused you some <span class="health dec">minor health complications</span> this week. It passed quickly enough, and shouldn't be a real problem.`);
				healthDamage(PC, 5);
			}
		}
	}
};


code:
App.EndWeek.Player.pregnancy = function(PC = V.PC) {
	const r = [];

	const gigantomastiaMod = PC.geneticQuirks.gigantomastia === 2 ? (PC.geneticQuirks.macromastia === 2 ? 3 : 2) : 1;
	const rearQuirk = PC.geneticQuirks.rearLipedema === 2 ? 2 : 0;
	const uterineHypersensitivityMod = PC.geneticQuirks.uterineHypersensitivity === 2 ? 2 : 1;
	const boobSize = PC.boobs - PC.boobsImplant - PC.boobsMilk;
	const oldBoobs = PC.boobs;
	const buttSize = PC.butt - PC.buttImplant;
	const hipSize = PC.hips - PC.hipsImplant;
	const child = (PC.pregType > 1 ? "children" : "child");

	if (PC.preg > 0) {
		pregnancyEffects();
	}
	if (V.seePreg !== 0) {
		preconception();
		pregnancySanityCheck();
	}

	return r.join(" ");

	function pregnancyEffects() {
		pregnancyDiscovery();
		pregnancyLibido();
		fetalAdjustment();
		if (PC.preg >= PC.pregData.normalBirth / 4) {
			pregnancyAdjustments();
			laborText();
			pregnancyPhysicalEffects();
		}
		if (PC.pregType === 0) { // Catch for strange cases - now with checking.
			failSafe();
		}
	}

	function pregnancyDiscovery() {
		// Add passive discovery to this once periods are added
		if (PC.bellyFluid > 2000) {
			if (PC.inflation > 1) {
				r.push(`While trying to inflate yourself with ${PC.inflationType}, you discover that you can't hold more <span class="noteworthy">two liters</span> without feeling seriously ill.`);
				PC.inflation = 1;
			} else {
				r.push(`While pleasuring yourself by inflating with ${PC.inflationType}, you're forced to stop due to a sudden bout of extreme nausea.`);
				PC.bellyFluid = 2000;
			}
			SetBellySize(PC);
			if (PC.pregKnown === 0) {
				r.push(`It turns out <span class="pregnancy">you're`);
				if (PC.preg > PC.pregData.normalBirth / 4) {
					r.push(`pregnant and have been for some time.</span>`);
				} else {
					r.push(`pregnant.</span>`);
				}
			} else {
				r.push(`Unfortunately, this will likely be the case for the duration of your pregnancy; at least you'll still steadily swell, if a little slowly for your taste.`);
			}
		}
	}

	function pregnancyLibido() {
		// .need needs to consider this
		// drop .energy on birth for uterine hypersensitivity
		if (PC.geneticQuirks.uterineHypersensitivity === 2 && V.geneticMappingUpgrade >= 1) {
			if (PC.preg >= PC.pregData.normalBirth) {
				r.push(`Your pregnancy is nearing its end and you're overwhelmed with arousal. Your uterine hypersensitivity combined with a full womb and upcoming birth confers a huge improvement to your sexual appetite.`);
				PC.energy += 7;
			} else if (PC.preg > PC.pregData.normalBirth / 1.33) {
				r.push(`Being hugely pregnant with uterine hypersensitivity confers an <span class="libido inc">improvement to your sexual appetite</span> as your womb steadily stretches.`);
				PC.energy += 5;
			} else if (PC.preg > PC.pregData.normalBirth / 2) {
				r.push(`Being pregnant with uterine hypersensitivity confers a <span class="libido inc">slow improvement to your sexual appetite</span> as your womb grows ever fuller.`);
				PC.energy += 3;
			} else if (PC.preg > PC.pregData.normalBirth / 4) {
				r.push(`You eagerly anticipate the growth of your pregnancy, producing <span class="libido inc">a very slow improvement to your sexual appetite.</span>`);
				PC.energy += 1;
			} else if (PC.preg <= PC.pregData.normalBirth / 4 && PC.preg > PC.pregData.normalBirth / 13.33) {
				if (PC.counter.birthsTotal > 0) {
					r.push(`The rigors of early pregnancy are easily tolerable when you can only quiver in anticipation of what's to come.`);
				} else {
					r.push(`The rigors of early pregnancy <span class="libido dec">slightly reduce your sexual appetite.</span>`);
					PC.energy -= 1;
				}
			}
		} else if (PC.geneticQuirks.uterineHypersensitivity === 2) {
			if (PC.preg >= PC.pregData.normalBirth) {
				r.push(`Your pregnancy is nearing its end and you're overwhelmed with arousal. The sensation of your womb stretched so full ${PC.counter.birthsTotal > 0 ? "and the anticipation of another orgasmic birth " : ""}sends your sexual appetite skyrocketing.`);
				PC.energy += 7;
			} else if (PC.preg > PC.pregData.normalBirth / 1.33) {
				r.push(`The feeling of your womb steadily expanding drives you wild, <span class="libido inc">improving your sexual appetite.</span>`);
				PC.energy += 5;
			} else if (PC.preg > PC.pregData.normalBirth / 2) {
				r.push(`The life growing in your womb leaves you feeling especially energetic, granting a <span class="libido inc">slow improvement to your sexual appetite.</span>`);
				PC.energy += 3;
			} else if (PC.preg > PC.pregData.normalBirth / 4) {
				r.push(`You feel a rush from your growing pregnancy, granting a <span class="libido inc">very slow improvement to your sexual appetite.</span>`);
				PC.energy += 1;
			} else if (PC.preg <= PC.pregData.normalBirth / 4 && PC.preg > PC.pregData.normalBirth / 13.33) {
				if (PC.counter.birthsTotal > 0) {
					r.push(`The rigors of early pregnancy are easily tolerable when you can only quiver in anticipation of what's to come.`);
				} else {
					r.push(`The rigors of early pregnancy <span class="libido dec">slightly reduce your sexual appetite.</span>`);
					PC.energy -= 1;
				}
			}
		} else if (PC.pregMood === 2) {
			if (PC.preg <= PC.pregData.normalBirth / 4 && PC.preg > PC.pregData.normalBirth / 13.33) {
				r.push(`The rigors of early pregnancy <span class="libido dec">take their toll on your sexual appetite.</span>`);
				PC.energy -= 3;
			} else if (PC.preg >= PC.pregData.normalBirth) {
				r.push(`Your pregnancy is nearing its end and you're <span class="libido inc">horny as hell.</span> Your hormones are out of control, driving you to fuck like a beast in heat despite your condition.`);
				PC.energy += 4;
			} else if (PC.preg > PC.pregData.normalBirth / 1.33) {
				r.push(`With your pregnancy hormones raging, you <span class="libido inc">find your thoughts focusing on sex</span> more than usual.`);
				PC.energy += 2;
			} else if (PC.preg > PC.pregData.normalBirth / 2) {
				r.push(`As your pregnancy grows, so does your desire for sex.`);
			}
		// } else if (PC.pregMood === 4) { unattractive
		} else if (PC.energy >= 90) {
			if (PC.preg <= PC.pregData.normalBirth / 4 && PC.preg > PC.pregData.normalBirth / 13.33) {
				r.push(`The rigors of early pregnancy <span class="libido dec">take their toll on your sexual appetite.</span>`);
				PC.energy -= 3;
			} else if (PC.preg >= PC.pregData.normalBirth) {
				r.push(`Your pregnancy is nearing its end and you're horny as hell. Between your hormones and already high libido, you're acting like you haven't had a good fuck in nine months.`);
				PC.energy += 2;
			} else if (PC.preg > PC.pregData.normalBirth / 1.33) {
				r.push(`Your advanced pregnancy, combined with your already high libido, leaves you aching to be filled throughout the day.`);
			} else if (PC.preg > PC.pregData.normalBirth / 2) {
				r.push(`Your growing pregnancy, combined with your already high libido, has you always itching for some sex.`);
			}
		// } else if (PC.pregMood === 3) { frigid
		// } else if (PC.pregMood === 5) { hotnhorny
		} else if (PC.energy > 60) {
			if (PC.preg <= PC.pregData.normalBirth / 4 && PC.preg > PC.pregData.normalBirth / 13.33) {
				r.push(`The rigors of early pregnancy <span class="libido dec">take their toll on your sexual appetite.</span>`);
				PC.energy -= 3;
			} else if (PC.preg >= PC.pregData.normalBirth) {
				r.push(`Your pregnancy is nearing its end and you're suffering from an <span class="libido inc">unquenchable need to be filled.</span>`);
				PC.energy += 4;
			} else if (PC.preg > PC.pregData.normalBirth / 1.33) {
				r.push(`Your advanced pregnancy comes with a hugely increased libido, <span class="libido inc">greatly increasing your sexual drive.</span>`);
				PC.energy += 3;
			} else if (PC.preg > PC.pregData.normalBirth / 2) {
				r.push(`Your growing pregnancy comes with an increased libido, <span class="libido inc">spurring your sexual appetite.</span>`);
				PC.energy += 2;
			}
		} else if (PC.energy > 40) {
			if (PC.preg <= PC.pregData.normalBirth / 4 && PC.preg > PC.pregData.normalBirth / 13.33) {
				r.push(`The rigors of early pregnancy <span class="libido dec">slightly reduce your sexual appetite.</span>`);
				PC.energy -= 1;
			} else if (PC.preg >= PC.pregData.normalBirth) {
				r.push(`Your pregnancy is nearing its end and you're <span class="libido inc">feeling rather frisky.</span>`);
				PC.energy += 2;
			} else if (PC.preg > PC.pregData.normalBirth / 1.33) {
				r.push(`As your pregnancy grows, so does that<span class="libido inc">tingling feeling</span> in your crotch.`);
				PC.energy += 1;
			}
		} else {
			if (PC.preg <= PC.pregData.normalBirth / 4 && PC.preg > PC.pregData.normalBirth / 13.33) {
				r.push(`The rigors of early pregnancy <span class="libido dec">take their toll on your sexual appetite.</span>`);
				PC.energy -= 3;
			} else if (PC.preg >= PC.pregData.normalBirth) {
				r.push(`Your pregnancy is nearing its end and you're feeling way too full for sex, <span class="libido dec">greatly suppressing your sexual appetite.</span>`);
				PC.energy -= 3;
			} else if (PC.preg > PC.pregData.normalBirth / 1.33) {
				r.push(`Your advanced pregnancy <span class="libido dec">greatly hinders your sexual appetite.</span>`);
				PC.energy -= 2;
			} else if (PC.preg > PC.pregData.normalBirth / 2) {
				r.push(`Your growing pregnancy <span class="libido dec">suppresses your sexual appetite slightly.</span>`);
				PC.energy -= 1;
			}
		}
	}

	function fetalAdjustment() {
		const oldCount = PC.pregType;
		if (PC.preg <= 2 && PC.broodmother === 0) {
			fetalSplit(PC, 1000);
			WombCleanYYFetuses(PC);
		}
		if (V.pregnancyMonitoringUpgrade === 1 && PC.pregKnown) {
			if (oldCount < PC.pregType) {
				r.push(`While exploring your new pregnancy with the monitoring tools, you get quite the surprise; <span class="pregnancy">you are more pregnant than previously thought!</span>`);
			} else if (oldCount > PC.pregType) {
				r.push(`While exploring your new pregnancy with the monitoring tools, you make an unfortunate discovery; <span class="change negative">some of your fertilized ova have not made it.</span>`);
				if (PC.pregType === 0) {
					r.push(`Since there are now none present in your womb, <span class="noteworthy">you are technically no longer pregnant.</span>`);
					TerminatePregnancy(PC);
				}
			}
		} else if (oldCount > PC.pregType && PC.pregType === 0) {
			TerminatePregnancy(PC);
		}
	}

	function pregnancyAdjustments() {
		if (PC.geneticQuirks.gigantomastia === 3 && random(1, 200) < PC.hormoneBalance) {
			PC.geneticQuirks.gigantomastia = 2;
		}
		if (PC.geneticQuirks.macromastia === 3 && random(1, 200) < PC.hormoneBalance) {
			PC.geneticQuirks.macromastia = 2;
		}
		if (PC.geneticQuirks.galactorrhea === 2 && random(1, 100) < PC.hormoneBalance && PC.lactation === 0) {
			PC.inappropriateLactation = 1;
		}
		// MOVE THIS
		/*
		if (PC.preg > PC.pregData.normalBirth / 2) {
			if (PC.belly >= 300000) {
				PC.need *= 0.5;
			} else if (PC.belly >= 120000) {
				PC.need *= 0.7;
			} else if (PC.belly >= 60000) {
				PC.need *= 0.9;
			} else {
				PC.need *= 1.5;
			}
		}
		*/
	}

	function laborText() {
		const childIs = (PC.pregType > 1 ? "children are" : "child is");
		if (isInduced(PC)) {
			r.push(`Your child${PC.pregType > 1 ? "ren stir" : "stirs"} restlessly as ${PC.pregType > 1 ? "they prepare" : "it prepares"} to enter the world. You experience several`);
			if (PC.geneticQuirks.uterineHypersensitivity === 2) {
				r.push(`${PC.counter.birthsTotal > 0 ? "overwhelmingly" : "unexpectedly"} orgasmic`);
			}
			r.push(`contractions, so it's best to stay put until it's time.`);
		} else if (PC.pregControl === "labor suppressors") {
			r.push(`Your ${childIs} far calmer that one would expect for their stage of development; it is unlikely you will give birth soon, despite being overdue.`);
		} else {
			if (PC.preg > PC.pregData.normalBirth + 1) {
				r.push(`You are constantly beset by your squirming`);
				if (PC.geneticQuirks.uterineHypersensitivity === 2) {
					r.push(`${child} and uncontrollable orgasms.`);
				} else {
					r.push(`${child}.`);
				}
				r.push(`They're overdue, so your water could break at any moment, but for now they aren't quite ready to leave their home.`);
			} else if (PC.preg > PC.pregData.normalBirth - 1 && PC.preg > PC.pregData.minLiveBirth) {
				r.push(`You are constantly beset by your squirming`);
				if (PC.geneticQuirks.uterineHypersensitivity === 2) {
					r.push(`${child} and uncontrollable orgasms.`);
				} else {
					r.push(`${child}.`);
				}
				r.push(`Given their liveliness, and how far along you are, it is likely that you will go into labor at any time now.`);
			} else if (PC.preg > PC.pregData.normalBirth - 2 && PC.preg > PC.pregData.minLiveBirth) {
				r.push(`You often have to pause and soothe your kicking`);
				if (PC.geneticQuirks.uterineHypersensitivity === 2) {
					r.push(`${child}, to spontaneously orgasm,`);
				} else {
					r.push(`${child}`);
				}
				r.push(`or to catch your breath. With how far along you are, it's possible you may go into labor any day now.`);
			} else if (PC.preg > PC.pregData.normalBirth - 3 && PC.preg > PC.pregData.minLiveBirth) {
				r.push(`You often have to pause to soothe your kicking`);
				if (PC.geneticQuirks.uterineHypersensitivity === 2) {
					r.push(`${child} or to spontaneously orgasm.`);
				} else {
					r.push(`${child}.`);
				}
				r.push(`You are far enough along that you could enter labor early.`);
			}
		}
	}

	function pregnancyPhysicalEffects() {
		let boobTarget;
		if (PC.geneMods.NCS === 1) {
			// NCS: always working against secondary sexual characteristics even in pregnancies.
			boobTarget = 0;
		} else if (PC.geneticQuirks.androgyny === 2) {
			boobTarget = 400;
		} else if (PC.physicalAge >= 18) {
			if (PC.pregType >= 50) {
				boobTarget = 10000;
			} else if (PC.pregType >= 30) {
				boobTarget = 5000;
			} else if (PC.pregType >= 10) {
				boobTarget = 2000;
			} else if (PC.pregType >= 2) {
				boobTarget = 1000;
			} else {
				boobTarget = 800;
			}
		} else if (PC.physicalAge >= 13) {
			if (PC.pregType >= 50) {
				boobTarget = 5000;
			} else if (PC.pregType >= 30) {
				boobTarget = 3200;
			} else if (PC.pregType >= 10) {
				boobTarget = 1800;
			} else if (PC.pregType >= 2) {
				boobTarget = 1000;
			} else {
				boobTarget = 700;
			}
		} else if (PC.physicalAge >= 8) {
			if (PC.pregType >= 50) {
				boobTarget = 1800;
			} else if (PC.pregType >= 30) {
				boobTarget = 1400;
			} else if (PC.pregType >= 10) {
				boobTarget = 1000;
			} else if (PC.pregType >= 2) {
				boobTarget = 800;
			} else {
				boobTarget = 600;
			}
		} else {
			if (PC.pregType >= 50) {
				boobTarget = 1000;
			} else if (PC.pregType >= 30) {
				boobTarget = 800;
			} else if (PC.pregType >= 10) {
				boobTarget = 600;
			} else {
				boobTarget = 400;
			}
		}
		boobTarget *= gigantomastiaMod;
		if (PC.geneMods.NCS === 0) {
			if (PC.pregType >= 30) {
				if (PC.weight <= 65) {
					r.push(`With the amount of food you eat to sustain your brood, <span class="change positive">you put on a little baby weight.</span>`);
					PC.weight += 1;
				}
				if (random(1, 100) > 60) {
					if (boobSize < boobTarget) {
						boobsUpText(100);
						if (PC.boobShape !== "saggy" && PC.preg > PC.pregData.normalBirth / 1.25 && (PC.boobsImplant / PC.boobs < 0.5) && PC.breastMesh !== 1 && PC.drugs !== "sag-B-gone") {
							r.push(`Your immensely engorged <span class="change negative">mammaries begin to sag</span> as your body continues its motherly transformation in anticipation of breastfeeding.`);
							PC.boobShape = "saggy";
						}
					}
					if (PC.geneticQuirks.androgyny !== 2) {
						if (hipSize < 2) {
							r.push(`Your hips <span class="change positive">widen</span> in preparation for the upcoming births.`);
							PC.hips += 1;
						}
						if (buttSize < 14 + (rearQuirk * 3)) {
							r.push(`Your butt <span class="change positive">swells with added fat</span> from your ripening body.`);
							PC.butt += 1;
						}
					}
				}
			} else if (PC.pregType >= 10) {
				if (random(1, 100) > 80 && boobSize < boobTarget) {
					boobsUpText(50);
					if (PC.boobShape !== "saggy" && (PC.boobsImplant / PC.boobs < 0.5) && PC.breastMesh !== 1 && PC.drugs !== "sag-B-gone") {
						if (PC.preg > random(PC.pregData.normalBirth / 1.25, PC.pregData.normalBirth * 2.05)) {
							r.push(`Your swollen <span class="change negative">mammaries begin to sag</span> as your body continues its motherly transformation in anticipation of breastfeeding.`);
							PC.boobShape = "saggy";
						}
					}
				}
			} else if (boobSize < boobTarget) {
				if (random(1, 100) > 80) {
					boobsUpText(25);
					if (PC.boobShape !== "saggy" && PC.preg > random(PC.pregData.normalBirth / 1.25, PC.pregData.normalBirth * 2.5) && (PC.boobsImplant / PC.boobs < 0.5) && PC.breastMesh !== 1 && PC.drugs !== "sag-B-gone") {
						r.push(`Your <span class="change negative">mammaries begin to sag</span> as your body continues its motherly transformation in anticipation of breastfeeding.`);
						PC.boobShape = "saggy";
					}
				}
			}
			if (PC.preg > PC.pregData.normalBirth / 1.25 && PC.physicalAge >= 18 && PC.hips === 1 && PC.hipsImplant === 0 && random(1, 100) > 90 / uterineHypersensitivityMod) {
				r.push(`Your hips <span class="change positive">widen</span> to better support your gravidity.`);
				PC.hips += 1;
			} else if (PC.preg > PC.pregData.normalBirth / 1.42 && PC.physicalAge >= 16 && PC.hips === 0 && PC.hipsImplant === 0 && random(1, 100) > 70 / uterineHypersensitivityMod) {
				r.push(`Your hips <span class="change positive">widen</span> to better support your gravidity.`);
				PC.hips += 1;
			}
			if (PC.preg > PC.pregData.normalBirth / 1.42 && PC.physicalAge >= 12 && buttSize < (4 + (rearQuirk * 3)) && PC.weight >= -30 && random(1, 100) > 70) {
				r.push(`Your butt <span class="change positive">gets a little bigger</span> as your body ripens.`);
				PC.butt += 1;
			}
		}
		if (PC.preg === PC.pregData.normalBirth / 2.66) { // change me when nipple color gets hardset
			if (PC.pregKnown === 0) {
				r.push(`Your areolae have gotten dark. Some cursory tests reveal <span class="pregnant">you are about fifteen weeks pregnant.</span> How did that manage to slip past you?`);
				PC.pregKnown = 1;
			} else {
				r.push(`Your areolae have gotten dark. Just another step along your pregnancy.`);
			}
		} else if (PC.bellyPreg >= 1500) {
			if (PC.preg > PC.pregData.normalBirth / 2 && PC.lactation === 0) {
				if (PC.preg > random(PC.pregData.normalBirth / 2.22, PC.pregData.normalBirth / 1.33) && PC.health.condition >= -20 && PC.weight > -30) {
					r.push(`A moist sensation on your breasts draws your attention; <span class="lime">your milk has come in.</span>`);
					PC.lactation = 1;
				}
			}
			if (PC.lactation === 1) { // If natural lactation, constantly refresh it.
				PC.lactationDuration = 2;
			}
		}
	}

	function boobsUpText(bustUp) {
		if (PC.boobs >= 90000) {
			r.push(`It's nearly impossible to tell if your inhuman breasts have gotten larger from your pregnancy, but your nipples sitting <span class="lime">further out of reach than ever</span> sure confirms they are.`);
		} else if (PC.boobs >= 25000) {
			r.push(`It's nearly impossible to tell if your obscene breasts are getting larger from your pregnancy, but as your nipples <span class="lime">slowly become harder to reach, you can't deny their growth.</span>`);
		} else if (PC.boobs >= 15000) {
			r.push(`It may be difficult to gauge growth in breasts as enormous as yours, but your back can sure feel <span class="lime">the extra weight on your chest</span> caused by your pregnancy.`);
		} else if (PC.boobs >= 7500) {
			r.push(`It may be difficult to gauge growth in breasts as large as yours, but you can still feel <span class="lime">the extra weight on your chest</span> caused by your pregnancy.`);
		} else if (PC.boobs >= 3950) {
			r.push(`Like the cow you are, your udders <span class="lime">have gotten even larger</span> with your pregnancy.`);
		} else if (PC.boobs >= 1400) {
			r.push(`Unsurprisingly, your cow tits <span class="lime">have swollen even larger</span> with your pregnancy.`);
		} else if (PC.boobs >= 1200) {
			r.push(`Your already huge breasts have <span class="lime">grown even heavier</span> with your pregnancy.`);
		} else if (PC.boobs >= 1000) {
			r.push(`Your already large breasts have <span class="lime">grown even larger</span> with your pregnancy.`);
		} else if (PC.boobs >= 800) {
			r.push(`Your breasts have <span class="lime">grown a bit larger</span> to feed your coming ${child}.`);
		} else if (PC.boobs >= 650) {
			r.push(`Your breasts have <span class="lime">grown a bit larger</span> to feed your coming ${child}.`);
		} else if (PC.boobs >= 500) {
			r.push(`Your breasts have <span class="lime">grown a bit larger</span> to feed your coming ${child}.`);
		} else if (PC.boobs >= 400) {
			r.push(`Your breasts have <span class="lime">gotten heavier</span> alongside your pregnancy.`);
		} else if (PC.boobs >= 300) {
			r.push(`Your breasts have <span class="lime">swollen</span> alongside your pregnancy.`);
		} else {
			r.push(`Your chest <span class="lime">has filled out slightly</span> with your pregnancy.`);
		}
		PC.boobs += bustUp;
		r.push(App.EndWeek.Player.bustUp(PC, oldBoobs));
	}

	function failSafe() {
		PC.pregType = setPregType(PC);
		WombImpregnate(PC, PC.pregType, PC.pregSource, PC.preg);
	}

	function preconception() {
		if (isFertile(PC)) { // && PC.pregMood === 5
			needToBreed();
		}
		if (canGetPregnant(PC)) {
			impregnation();
		}
		if (PC.ovaImplant === "asexual" && isFertile(PC) && (PC.preg === 0 || (PC.preg >= 0 && PC.geneticQuirks.superfetation === 2))) {
			autoImpregnation();
		}
	}

	function needToBreed() {
		// Empty for now. Will be used for "breeder" .pregMood.
	}

	function impregnation() {
		if (PC.vagina === 0 || (PC.anus === 0 && PC.mpreg > 0)) {
			// You aren't putting out.
		} else if (random(1, 100) > (70 - (V.reproductionFormula * 10))) {
			/** @type {Map<FC.Assignment, number>} */
			const assignmentWeight = new Map([
				[Job.CONCUBINE, 7],
				[Job.MASTERSUITE, 4],
				[Job.FUCKTOY, 3],
				[Job.HOUSE, 1],
				[Job.QUARTER, 1],
				[Job.MILKED, 1],
				[Job.BODYGUARD, 1],
				[Job.HEADGIRL, 1],
				[Job.RECRUITER, 1],
				[Job.MATRON, 1],
				[Job.NURSERY, 1],
				[Job.ATTENDANT, 1],
				[Job.STEWARD, 1],
				[Job.TEACHER, 1]
			]);
			const undesirableRace = (s) => (V.arcologies[0].FSSupremacist !== "unset" && (s.race !== V.arcologies[0].FSSupremacistRace)) ||
				(V.arcologies[0].FSSubjugationist !== "unset" && (s.race === V.arcologies[0].FSSubjugationistRace));
			const raceIsAcceptable = (s) => !undesirableRace(s) ||
				(s.relationship === -3) ||
				[Job.CONCUBINE, Job.MASTERSUITE, Job.FUCKTOY].includes(s.assignment);
			const score = (/** @type {App.Entity.SlaveState} */s) => {
				let weight = (assignmentWeight.get(s.assignment) || 0);
				if (s.relationship === -3 && isSlaveAvailable(s)) { // assumes player will seek relations with slavewife if available
					weight += 3;
				}
				if (onBedRest(PC) && weight < 3) {
					weight = 0;
				}
				return weight;
			};

			let dadHash;
			if (V.policies.sexualOpenness === 1) {
				dadHash = V.slaves.filter(s => canImpreg(V.PC, s) && App.Utils.sexAllowed(V.PC, s) && isSlaveAvailable(s) && canAchieveErection(s) && s.devotion > 20 && raceIsAcceptable);
			} else {
				dadHash = V.slaves.filter(s => canImpreg(V.PC, s) && isSlaveAvailable(s) && s.toyHole === "dick");
			}
			dadHash.reduce((acc, cur) => Object.assign(acc, {[cur.ID]: score(cur)}), {});
			const chosenDadID = hashChoice(dadHash);
			if (chosenDadID) {
				knockMeUp(PC, 100, 2, chosenDadID);
			}
		}
	}

	function autoImpregnation() {
		knockMeUp(PC, 100, 2, PC.ID);
		if (PC.geneticQuirks.superfetation === 2 && PC.pregKnown === 1) {
			if (V.geneticMappingUpgrade === 0 && PC.counter.birthsTotal === 0) {
				r.push(`You are wracked with frequent spontaneous orgasms from your asexual reproduction modifications despite already being pregnant.`);
			} else {
				r.push(`Your asexual reproduction modifications don't care that you've already got a bun in the oven, a fact made clear as they force you into adding yet another child into your increasingly crowded womb. At this rate, you will spend the rest of your fertile years as a constantly pregnant broodmother.`);
			}
		} else {
			r.push(`Your asexual reproduction modifications leaves you writhing in constant orgasm for a short time. You are only released once you've <span class="pregnant">thoroughly impregnated yourself.</span>`);
			PC.pregKnown = 1;
		}
	}

	function pregnancySanityCheck() { // PREGNANCY TYPE SANITY CHECK (not for pregnancies started above)
		if (PC.preg <= 0) {
			if (PC.pregType !== 0) {
				WombFlush(PC);
			}
		} else if (PC.preg > 0 && PC.pregType === 0) {
			PC.pregType = setPregType(PC);
			WombImpregnate(PC, PC.pregType, PC.pregSource, 1);
		}
		if (PC.readyOva !== 0) {
			PC.readyOva = 0;
		}
	}
};

repo_name: Mirarara/fc

license: mit


code:
/**
 * @returns {DocumentFragment}
 */
App.EndWeek.arcadeReport = function() {
	const el = new DocumentFragment();
	let r;

	const arcadeStats = document.createElement("span");
	el.append(arcadeStats);

	const slaves = App.Utils.sortedEmployees(App.Entity.facilities.arcade);
	const slavesLength = slaves.length;

	const cockMilkedSlaves = [];
	const milkedSlaves = [];
	const boobsImplantedSlaves = [];
	const prostatesImplantedSlaves = [];
	let vasectomiesUndone = 0;
	let milkProfits = 0;
	let profits = 0;

	// Statistics gathering
	V.facility = V.facility || {};
	V.facility.arcade = initFacilityStatistics(V.facility.arcade);
	const arcadeNameCaps = capFirstChar(V.arcadeName);

	if (slavesLength > 1) {
		App.UI.DOM.appendNewElement("p", el, `There are ${slavesLength} inmates confined in ${V.arcadeName}.`, ["bold", "indent"]);
	} else {
		App.UI.DOM.appendNewElement("p", el, `There is one inmate confined in ${V.arcadeName}.`, ["bold", "indent"]);
	}
	r = [];
	if (V.arcologies[0].FSDegradationist > 20) {
		if (V.arcologies[0].FSDegradationistLaw === 1) {
			r.push(`The tenants located near the arcade consider the facility a normal part of their surroundings, including the crowd of menial slaves waiting their turn spills out into the hallway, 24 hours a day.`);
		} else {
			r.push(`The tenants located near the arcade consider the facility a normal part of their surroundings.`);
		}
	} else if (V.arcologies[0].FSPaternalist > 20) {
		r.push(`The tenants located near the arcade consider it an <span class="red">intolerable</span> establishment.`);
	}
	App.Events.addNode(el, r, "div", "indent");
	if (V.arcadeDecoration !== "standard") {
		App.Events.addNode(el, [`${arcadeNameCaps}'s customers enjoy <span class="green">getting off in ${V.arcadeDecoration} surroundings.</span>`], "p", "indent");
	}

	for (const slave of App.SlaveAssignment.reportSlaves(slaves)) {
		r = [];
		/* for the included passages */

		/* Perform facility based rule changes */
		slave.clothes = "no clothing";
		/* Health */
		if (V.arcadeUpgradeHealth === 2 && slave.health.condition < 40) {
			improveCondition(slave, 2);
		} else if (slave.health.condition > 20) {
			healthDamage(slave, 5);
		} else if (V.arcadeUpgradeHealth === 1 && slave.health.condition < -30) {
			improveCondition(slave, 2);
		} else if (slave.health.condition > -50) {
			healthDamage(slave, 3);
		} else if (slave.health.condition > -90) {
			healthDamage(slave, 1);
		}
		/* Curatives */
		if (V.arcadeUpgradeHealth === 2) {
			slave.curatives = 2;
		} else if (V.arcadeUpgradeHealth === 1) {
			slave.curatives = 1;
		}
		/* Stimulation or lack thereof trust/devotion effect */
		if (V.arcadeUpgradeInjectors > 0) {
			if (V.arcadeUpgradeInjectors === 2) {
				slave.aphrodisiacs = 2;
			}
			slave.devotion -= 5;
			slave.trust -= 10;
		} else {
			slave.trust -= 5;
		}
		/* Muscles */
		if (slave.muscles > -100) {
			slave.muscles--;
		}
		const oldCash = V.cash;
		if (V.showEWD !== 0) {
			const {He} = getPronouns(slave);
			const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report");
			const artSpan = App.UI.DOM.appendNewElement("span", slaveEntry);
			App.SlaveAssignment.appendSlaveLinks(slaveEntry, slave);
			r = [];
			r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name"));
			if (slave.choosesOwnAssignment === 2) {
				r.push(App.SlaveAssignment.choosesOwnJob(slave));
			} else {
				r.push(`is confined in ${V.arcadeName}.`);
			}
			App.Events.addNode(slaveEntry, r);

			App.Events.addNode(
				slaveEntry,
				[
					He,
					App.SlaveAssignment.workAGloryHole(slave),
				],
				"div",
				"indent"
			);
			App.SlaveAssignment.appendSlaveArt(artSpan, slave);
		} else {
			// discard return values silently
			App.SlaveAssignment.choosesOwnJob(slave);
			App.SlaveAssignment.workAGloryHole(slave);
		}
		profits += V.cash - oldCash;

		if (V.arcadeUpgradeCollectors > 0) {
			applyCollectors(slave);
		}
		if (slave.inflation > 0) {
			deflate(slave);
		}
		if (V.showEWD !== 0) {
			el.append(App.SlaveAssignment.standardSlaveReport(slave, false));
		} else {
			App.SlaveAssignment.standardSlaveReport(slave, true);
		}
	}

	if (slavesLength + V.fuckdolls > 0) {
		r = [];
		if (milkedSlaves.length > 0) {
			if (milkedSlaves.length === 1) {
				const {his} = getPronouns(milkedSlaves[0]);
				r.push(`One of them is lactating and spends ${his} time in ${V.arcadeName} being simultaneously milked and fucked.`);
			} else {
				r.push(`${capFirstChar(num(milkedSlaves.length))} of them are lactating and spend their time in ${V.arcadeName} being simultaneously milked and fucked.`);
			}
		}

		if (vasectomiesUndone > 0) {
			if (vasectomiesUndone === 1) {
				r.push(`One`);
			} else {
				r.push(capFirstChar(num(vasectomiesUndone)));
			}
			r.push(`of them had severed vas deferens, so they were reattached to allow sperm through, costing <span class="red">${cashFormat(V.surgeryCost * vasectomiesUndone)}.</span>`);
		}

		if (boobsImplantedSlaves.length > 0) {
			if (boobsImplantedSlaves.length === 1) {
				const {he} = getPronouns(boobsImplantedSlaves[0]);
				r.push(`One of them was not lactating, so ${he} was`);
			} else {
				r.push(`${capFirstChar(num(boobsImplantedSlaves.length))} of them were not lactating, so they were`);
			}
			r.push(`implanted with long-acting lactation inducing drugs, costing <span class="red">${cashFormat(V.surgeryCost * boobsImplantedSlaves.length)}.</span>`);
		}

		if (prostatesImplantedSlaves.length > 0) {
			if (prostatesImplantedSlaves.length === 1) {
				const {he} = getPronouns(prostatesImplantedSlaves[0]);
				r.push(`One of them was not producing the maximum possible amount of precum, so ${he} was`);
			} else {
				r.push(`${capFirstChar(num(prostatesImplantedSlaves.length))} of them were not producing the maximum possible amount of precum, so they were`);
			}
			r.push(`implanted with long-acting prostate stimulation drugs, costing <span class="red">${cashFormat(V.surgeryCost * prostatesImplantedSlaves.length)}.</span>`);
		}

		if (cockMilkedSlaves.length > 0) {
			if (cockMilkedSlaves.length === 1) {
				const {he} = getPronouns(cockMilkedSlaves[0]);
				r.push(`One of them retains testicles and is brutally cockmilked as ${he} is used.`);
			} else {
				r.push(`${capFirstChar(num(cockMilkedSlaves.length))} of them retain testicles and are brutally cockmilked as they are used.`);
			}
		}

		r.push(`The arcade makes you`);
		if (V.policies.publicFuckdolls === 0) {
			r.push(`<span class="yellowgreen">${cashFormat(profits)}</span> from selling the inmates' holes`);
		} else {
			r.push(`<span class="green">more reputable</span> from freely providing the inmates' holes`);
		}
		if (V.arcadeUpgradeCollectors > 0 && V.policies.publicFuckdolls === 0) {
			r.push(`and`);
		}
		if (V.arcadeUpgradeCollectors > 0) {
			r.push(`<span class="yellowgreen">${cashFormat(milkProfits)}</span> from selling the fluids they produced`);
		}
		r.push(`this week.`);
		if (V.arcologies[0].FSPaternalist > 20) {
			repX(forceNeg(Math.trunc(profits / 20)), "arcade");
		}
		App.Events.addNode(el, r, "div", "indent");
	}

	if (V.arcadeUpgradeFuckdolls > 1) {
		const fuckdolls = slaves.filter(s => fuckdollQualifier(s));
		if (fuckdolls.length > 0) {
			// ascending sort by sexAmount...least popular slaves are converted first
			fuckdolls.sort((a, b) => b.sexAmount - a.sexAmount);
			for (const fuckdoll of fuckdolls) {
				const {he} = getPronouns(fuckdoll);
				App.UI.DOM.appendNewElement("div", el, `${fuckdoll.slaveName} is low-quality merchandise, so ${he} has been converted into a Fuckdoll.`, "indent");
				removeSlave(fuckdoll);
				V.fuckdolls++;
				if (V.arcadeUpgradeFuckdolls === 2) {
					break; // convert at most one per week on this setting
				}
			}
		} else {
			App.UI.DOM.appendNewElement("div", el, `No slaves have failed quality inspection for Fuckdoll conversion. ${arcadeNameCaps} will remain overcrowded this week.`, "indent");
		}
	}

	if (slavesLength > 0) {
		// Record statistics gathering
		let b = V.facility.arcade;
		b.whoreIncome = 0;
		b.customers = 0;
		b.whoreCosts = 0;
		b.rep = 0;
		for (let si of b.income.values()) {
			b.whoreIncome += si.income;
			b.customers += si.customers;
			b.whoreCosts += si.cost;
			b.rep += si.rep;
		}
		b.maintenance = V.arcade * V.facilityCost * (0.05 + 0.02 * V.arcadeUpgradeInjectors + 0.05 * V.arcadeUpgradeCollectors);
		b.totalIncome = b.whoreIncome;
		b.totalExpenses = b.whoreCosts + b.maintenance;
		b.profit = b.totalIncome - b.totalExpenses;

		// Arcade stats
		el.append(App.Facilities.Arcade.Stats(false));
		arcadeStats.append(App.Facilities.Arcade.Stats(true));
	}
	return el;

	/**
	 *
	 * @param {App.Entity.SlaveState} slave
	 */
	function fuckdollQualifier(slave) {
		if (slave.sentence === 0 && slave.fuckdoll === 0 && slave.fetish === "mindbroken") {
			if (slave.physicalAge > 35) {
				return true;
			} else if (slave.vagina >= 4 || slave.anus >= 4) {
				return true;
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 */
	function applyCollectors(slave) {
		if (slave.vasectomy === 1) {
			slave.vasectomy = 0;
			vasectomiesUndone++;
			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
			surgeryDamage(slave, 10);
		} else if (slave.lactation < 2) {
			slave.lactation = 2;
			boobsImplantedSlaves.push(slave);
			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
			surgeryDamage(slave, 10);
		} else if (slave.prostate === 1) {
			slave.prostate = 2;
			prostatesImplantedSlaves.push(slave);
			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
			surgeryDamage(slave, 10);
		} else if (slave.lactation > 0 || slave.balls > 0) {
			milkProfits += milk(slave);
			slave.boobs += boobGrowth(slave);
			if (
				slave.balls.isBetween(0, 10) &&
				(random(1, 100) > (40 + (10 * (slave.balls + (2 * slave.geneMods.NCS)))))
			) {
				slave.balls++;
			}
			if (
				(slave.dick > 0) &&
				(slave.dick < 10) &&
				(random(1, 100) > (40 + (10 * slave.dick + (2 * slave.geneMods.NCS))))
			) {
				slave.dick++;
			}
			if (slave.lactation > 0) {
				milkedSlaves.push(slave);
			}
			if (slave.balls > 0) {
				cockMilkedSlaves.push(slave);
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {number}
	 */
	function milk(slave) {
		const {He} = getPronouns(slave);
		const milkResults = App.SlaveAssignment.getMilked(slave, 1.0);
		if (V.showEWD !== 0) {
			App.Events.addNode(el, [He, milkResults.text], "div", "indent");
		}
		return milkResults.cash;
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {number}
	 */
	function boobGrowth(slave) {
		let growth = 0;
		const gigantomastiaMod = slave.geneticQuirks.gigantomastia === 2 ? (slave.geneticQuirks.macromastia === 2 ? 3 : 2) : 1;
		if (slave.boobs < 2000) {
			growth = 100;
		} else if (slave.boobs < 5000 * gigantomastiaMod) {
			growth = 50;
		} else if (slave.boobs < 10000 * gigantomastiaMod) {
			growth = 25;
		}
		if (slave.geneMods.NCS === 1) {
			/*
			** NCS will allow some growth for Arcade milking, but not as much as the Dairy.
			*/
			growth = Math.trunc(growth / 3.5);
		}
		return growth;
	}
};


code:
App.EndWeek.brothelReport = function() {
	const el = document.createElement("p");
	let r;

	const brothelStats = document.createElement("span");
	el.append(brothelStats);

	const madam = S.Madam ? App.SlaveAssignment.reportSlave(S.Madam) : undefined;
	const slaves = App.Utils.sortedEmployees(App.Entity.facilities.brothel);
	const SL = slaves.length;
	let profits = 0;

	// Statistics gathering
	V.facility = V.facility || {};
	V.facility.brothel = initFacilityStatistics(V.facility.brothel);
	const brothelNameCaps = capFirstChar(V.brothelName);

	function madamText() {
		let FLsFetish = 0;
		let r = [];
		if (V.MadamID !== 0) {
			if (S.Madam.health.condition < -80) {
				improveCondition(S.Madam, 20);
			} else if (S.Madam.health.condition < -40) {
				improveCondition(S.Madam, 15);
			} else if (S.Madam.health.condition < 0) {
				improveCondition(S.Madam, 10);
			} else if (S.Madam.health.condition < 90) {
				improveCondition(S.Madam, 7);
			}
			if (S.Madam.devotion <= 45) {
				S.Madam.devotion += 5;
			}
			if (S.Madam.trust < 45) {
				S.Madam.trust += 5;
			}
			if (S.Madam.rules.living !== "luxurious") {
				S.Madam.rules.living = "luxurious";
			}
			if (S.Madam.rules.rest !== "restrictive") {
				S.Madam.rules.rest = "restrictive";
			}
			if (S.Madam.fetishStrength <= 95) {
				if (S.Madam.fetish !== "dom") {
					if (fetishChangeChance(S.Madam) > random(0, 100)) {
						FLsFetish = 1;
						S.Madam.fetishKnown = 1;
						S.Madam.fetish = "dom";
						S.Madam.fetishStrength = 10;
					}
				} else if (S.Madam.fetishKnown === 0) {
					FLsFetish = 1;
					S.Madam.fetishKnown = 1;
				} else {
					FLsFetish = 2;
					S.Madam.fetishStrength += 4;
				}
			}
			/* Make sure we have registered living expenses as for any other slave */
			getSlaveStatisticData(S.Madam, V.facility.brothel);
			const {
				he, him, his, himself, He, His, wife
			} = getPronouns(S.Madam);

			r = [];
			r.push(`${SlaveFullName(S.Madam)} is serving as the madam.`);
			if (S.Madam.relationship === -3 && S.Madam.devotion > 50) {
				r.push(`As your loving ${wife}, ${he} does ${his} best to attract attention to your brothel.`);
			}
			if (FLsFetish === 1) {
				r.push(`${He} isn't above sampling the merchandise ${himself}; before long it's obvious to ${his} girls that ${he}`);
				r.push(App.UI.DOM.makeElement("span", `really likes fucking them.`, "fetish-gain"));
			} else if (FLsFetish === 2) {
				r.push(`${He}'s careful that all of the whores under ${his} supervision are all warmed up and ready to get fucked every morning, and ${he}`);
				r.push(App.UI.DOM.makeElement("span", `really likes fucking them.`, ["fetish", "inc"]));
			}
			const improve = App.UI.DOM.makeElement("span", "improve", ["cash", "inc"]);
			if (S.Madam.skill.whoring <= 10) {
				r.push(`Though ${S.Madam.slaveName} does ${his} best to manage the brothel, with ${his} lack of skill ${he} can do little.`);
			} else if (S.Madam.skill.whoring <= 30) {
				r.push(`${S.Madam.slaveName}'s basic skills marginally`, improve, `business at ${V.brothelName}.`);
			} else if (S.Madam.skill.whoring <= 60) {
				r.push(`${S.Madam.slaveName}'s skills`, improve, `business at ${V.brothelName}.`);
			} else if (S.Madam.skill.whoring < 100) {
				r.push(`${S.Madam.slaveName}'s skills greatly`, improve, `business at ${V.brothelName}.`);
			} else {
				r.push(`${S.Madam.slaveName}'s mastery immensely`, improve, `business at ${V.brothelName}.`);
			}
			if (S.Madam.actualAge > 35) {
				r.push(`${His} age and experience also contribute.`);
			}
			if (App.Data.Careers.Leader.madam.includes(S.Madam.career)) {
				r.push(`${He} has experience from ${his} life before ${he} was a slave that helps ${him} in the seedy business of selling other people's bodies for sex.`);
			} else if (S.Madam.skill.madam >= V.masteredXP) {
				r.push(`${He} has experience from working for you that helps ${him} in the seedy business of selling other people's bodies for sex.`);
			} else if (S.Madam.skill.madam > 120) {
				r.push(`${He} understands how to handle whores while keeping customers happy.`);
			} else if (S.Madam.skill.madam > 60) {
				r.push(`${He} understands how to read the customer and please them effectively.`);
			} else if (S.Madam.skill.madam > 20) {
				r.push(`${He} has basic knowledge of how to run a whorehouse.`);
			}
			if (S.Madam.skill.madam < V.masteredXP) {
				const skillIncrease = jsRandom(1, Math.ceil((S.Madam.intelligence + S.Madam.intelligenceImplant) / 15) + 8);
				r.push(slaveSkillIncrease('madam', S.Madam, skillIncrease));
			}
			if (S.Madam.intelligence + S.Madam.intelligenceImplant > 15) {
				r.push(`${He} is a clever manager.`);
			}
			if (S.Madam.dick > 2 && canPenetrate(S.Madam)) {
				r.push(`${His} turgid dick helps ${him} manage the bitches.`);
			}
			App.Events.addParagraph(el, r);

			r = [];
			for (const slave of slaves) {
				const {
					he2, him2, his2
				} = getPronouns(slave).appendSuffix('2');

				if (S.Madam.rivalryTarget === slave.ID) {
					r.push(`${He} forces ${his} ${rivalryTerm(S.Madam)}, ${slave.slaveName}, to service all the men in the brothel.`);
					slave.devotion -= 2;
					slave.trust -= 2;
					if (canDoVaginal(slave)) {
						seX(slave, "vaginal", "public", "penetrative", 10);
					}
					if (canDoAnal(slave)) {
						seX(slave, "anal", "public", "penetrative", 12);
					}
					seX(slave, "anal", "public", "penetrative", 10);
					if (random(1, 100) > 65) {
						S.Madam.rivalry++;
						slave.rivalry++;
					}
				} else if (S.Madam.relationshipTarget === slave.ID) {
					r.push(`${He} dotes over ${his} ${relationshipTerm(S.Madam)}, ${slave.slaveName}, making sure ${he2} is safe, but unfortunately driving potential customers away from ${him2}.`);
					slave.devotion++;
				} else if (areRelated(S.Madam, slave)) {
					r.push(`${He} pays special attention to ${his} ${relativeTerm(S.Madam, slave)}, ${slave.slaveName}, making sure ${he2} is treated well and showing off ${his2} skills.`);
					slave.trust++;
				}
				if (slave.prestigeDesc === "$He is a famed Free Cities whore, and commands top prices.") {
					r.push(`${He} makes sure to promote ${slave.slaveName}, the famed whore, in order to capitalize on ${his2} popularity.`);
				} else if (slave.prestigeDesc === "$He is a famed Free Cities slut, and can please anyone.") {
					r.push(`${He} makes sure to promote ${slave.slaveName}, the famed entertainer, in order to capitalize on ${his2} popularity.`);
				} else if (slave.prestigeDesc === "$He is remembered for winning best in show as a dairy cow.") {
					if (V.arcologies[0].FSPhysicalIdealist !== "unset") {
						if (slave.muscles > 60 && slave.weight < 30 && slave.lactation > 0 && (slave.boobs - slave.boobsImplant) > 6000) {
							r.push(`${He} shows off how even a cow like ${slave.slaveName} can achieve physical perfection.`);
						} else {
							if (slave.muscles < 30) {
								r.push(`An unmuscled,`);
							} else {
								r.push(`A`);
							}
							if (slave.weight > 30) {
								r.push(`fat,`);
							}
							r.push(`'prestigious'`);
							if (slave.lactation > 0) {
								r.push(`cow`);
							} else if ((slave.boobs - slave.boobsImplant) > 6000) {
								r.push(`mass of titflesh`);
							} else {
								r.push(`slave`);
							}
							r.push(`like ${slave.slaveName} is woefully out of fashion, so ${S.Madam.slaveName} tries to draw attention away from ${him2}.`);
						}
					} else {
						if (slave.lactation > 0 && (slave.boobs - slave.boobsImplant) > 6000) {
							r.push(`${He} makes sure to massage ${slave.slaveName}'s huge breasts to get the milk flowing before enticing clients to suckle and play with ${him2}.`);
						} else {
							r.push(`${He} would like to show off ${slave.slaveName}'s huge udders, but ${slave.slaveName}`);
							if (slave.lactation === 0) {
								r.push(`isn't producing milk anymore.`);
							} else {
								r.push(`doesn't exactly have huge udders anymore.`);
							}
						}
					}
				} else if (slave.prestigeDesc === "$He is remembered for winning best in show as a cockmilker.") {
					if (V.arcologies[0].FSGenderFundamentalist !== "unset") {
						/* this needs review - doesn't fit right. An XY slave would be expected to be masculine. */
						if (slave.balls === 0 && slave.dick === 0 && slave.vagina > -1) {
							r.push(`${He} uses ${slave.slaveName} as an example of how even a huge-balled freak like ${him2} can be restored to proper femininity.`);
						} else {
							r.push(`${He} tries to hide ${slave.slaveName}, 'her' body being notorious for its defiance of conventional femininity.`);
						}
					} else {
						if (((slave.balls > 5) && (slave.dick !== 0)) || ((slave.balls > 4) && (slave.dick !== 0) && (slave.prostate > 1))) {
							r.push(`${He} shows off ${slave.slaveName}'s copious loads by putting a condom over ${his2} dick and teasing ${him2} till ${he2} bursts it. The show draws multiple clients that want to play with ${his2} oversized junk and messy orgasms.`);
						} else {
							r.push(`${He} would love to show off ${slave.slaveName}'s copious loads, but`);
							if (slave.dick === 0) {
								r.push(`${slave.slaveName} doesn't have a dick.`);
							} else if (slave.balls === 0) {
								r.push(`${slave.slaveName}'s not producing cum.`);
							} else {
								r.push(`${slave.slaveName}'s orgasms just aren't messy enough.`);
							}
						}
					}
				} else if (slave.prestigeDesc === "$He is remembered for winning best in show as a breeder.") {
					if (slave.bellyPreg >= 5000) {
						r.push(`${He} makes sure ${slave.slaveName}'s growing pregnancy is well taken care of, even if it means driving away potential customers away when the mother-to-be needs a rest.`);
					} else if (canGetPregnant(slave)) {
						r.push(`${He} makes sure to play off ${slave.slaveName}'s fame and fertility by enticing potential customers to be the one to claim ${his2} womb by filling it with their child.`);
					} else {
						r.push(`${He} would love to play off of ${slave.slaveName}'s fame and fertility, but unfortunately ${he2}`);
						if (slave.pregKnown === 1 && slave.bellyPreg < 1500) {
							r.push(`is already pregnant and not far enough along to show it.`);
						} else if (slave.pregKnown === 1 && slave.bellyPreg < 5000) {
							r.push(`already pregnant, but not enough to be exciting.`);
						} else {
							r.push(`is unable to get knocked up.`);
						}
					}
				}
			}
			App.Events.addNode(el, r);

			if ((SL + V.brothelSlavesGettingHelp < 10) && V.MadamNoSex !== 1 && !slaveResting(madam)) {
				const oldCash = V.cash;
				if (V.showEWD !== 0) {
					App.Events.addParagraph(
						el,
						[
							He,
							App.SlaveAssignment.whore(madam)
						]
					);
				} else {
					App.SlaveAssignment.whore(madam);
				}
				App.Events.addParagraph(
					el,
					[
						`${He} whores ${himself} because ${he} doesn't have enough whores to manage to keep ${him} busy, and makes`,
						App.UI.DOM.makeElement("span", `${cashFormat(S.Madam.lastWeeksCashIncome)}.`, ["cash", "inc"]),
						`${He} can charge more for ${his} time, since many citizens find it erotic to fuck the Madam.`
					]
				);
				profits += V.cash - oldCash;
			}
		}
	}

	madamText();

	if (SL > 0) {
		const whoreNumber = document.createElement("p");
		whoreNumber.classList.add("indent", "bold");

		if (SL === 1) {
			whoreNumber.append(`There is one slave whore working out of ${V.brothelName}.`);
		} else {
			whoreNumber.append(`There are ${SL} slave whores working out of ${V.brothelName}.`);
		}
		el.append(whoreNumber);
	}

	if (madam) {
		tired(madam);
		if (V.showEWD !== 0) {
			const madamEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report");
			const artSpan = App.UI.DOM.appendNewElement("span", madamEntry);
			App.SlaveAssignment.appendSlaveLinks(madamEntry, madam);
			App.Events.addNode(
				madamEntry,
				[
					App.UI.DOM.makeElement("span", SlaveFullName(madam), "slave-name"),
					`is serving as the Madam.`
				]
			);
			madamEntry.append(App.SlaveAssignment.standardSlaveReport(madam, false));
			App.SlaveAssignment.appendSlaveArt(artSpan, madam);
		} else {
			App.SlaveAssignment.standardSlaveReport(madam, true);
		}
	}

	if (SL > 0) {
		let healthBonus = 0;
		let aphrodisiacs = 0;
		if (V.brothelUpgradeDrugs === 1) {
			healthBonus += 1;
			aphrodisiacs = 1;
		} else if (V.brothelUpgradeDrugs === 2) {
			healthBonus += 3;
			aphrodisiacs = 2;
		}
		let oldCash = V.cash;
		for (const slave of App.SlaveAssignment.reportSlaves(slaves)) {
			/* Perform facility based rule changes */
			improveCondition(slave, healthBonus);
			slave.aphrodisiacs = aphrodisiacs;
			switch (V.brothelDecoration) {
				case "Degradationist":
				case "standard":
					slave.rules.living = "spare";
					break;
				default:
					slave.rules.living = "normal";
			}
			if (slave.health.condition < -80) {
				improveCondition(slave, 20);
			} else if (slave.health.condition < -40) {
				improveCondition(slave, 15);
			} else if (slave.health.condition < 0) {
				improveCondition(slave, 10);
			} else if (slave.health.condition < 90) {
				improveCondition(slave, 7);
			}
			if (slave.devotion <= 20 && slave.trust >= -20) {
				slave.devotion -= 5;
				slave.trust -= 5;
			} else if (slave.devotion < 45) {
				slave.devotion += 4;
			} else if (slave.devotion > 50) {
				slave.devotion -= 4;
			}
			if (slave.trust < 30) {
				slave.trust += 5;
			}
			if (slave.energy.isBetween(40, 95)) {
				slave.energy++;
			}

			if (V.showEWD !== 0) {
				const {He} = getPronouns(slave);
				const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report");
				const artSpan = App.UI.DOM.appendNewElement("span", slaveEntry);
				App.SlaveAssignment.appendSlaveLinks(slaveEntry, slave);
				r = [];
				r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name"));
				if (slave.choosesOwnAssignment === 2) {
					r.push(App.SlaveAssignment.choosesOwnJob(slave));
				} else {
					r.push(`is working out of ${V.brothelName}.`);
				}
				App.Events.addNode(slaveEntry, r);

				App.Events.addNode(
					slaveEntry,
					[
						He,
						App.SlaveAssignment.whore(slave),
					],
					"div",
					"indent"
				);
				slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false));
				App.SlaveAssignment.appendSlaveArt(artSpan, slave);
			} else {
				// discard return values silently
				App.SlaveAssignment.choosesOwnJob(slave);
				App.SlaveAssignment.whore(slave);
				App.SlaveAssignment.standardSlaveReport(slave, true);
			}

			const seed = Math.max(App.Ads.getMatchedCategoryCount(slave, "brothel"), 1);
			const adsIncome = seed * random(50, 60) * Math.trunc(V.brothelAdsSpending / 1000);
			getSlaveStatisticData(slave, V.facility.brothel).adsIncome += adsIncome;
			cashX(adsIncome, "brothelAds");
		}
		App.Events.addNode(el, [App.Ads.report("brothel", false)]);

		profits += V.cash - oldCash;

		// Record statistics gathering
		const b = V.facility.brothel;
		b.whoreIncome = 0;
		b.customers = 0;
		b.whoreCosts = 0;
		b.rep = 0;
		for (const si of b.income.values()) {
			b.whoreIncome += si.income + si.adsIncome;
			b.customers += si.customers;
			b.whoreCosts += si.cost;
			b.rep += si.rep;
		}
		b.adsCosts = V.brothelAdsSpending;
		b.maintenance = V.brothel * V.facilityCost * (1.0 + 0.2 * V.brothelUpgradeDrugs);
		b.totalIncome = b.whoreIncome + b.adsIncome;
		b.totalExpenses = b.whoreCosts + b.adsCosts + b.maintenance;
		b.profit = b.totalIncome - b.totalExpenses;

		App.Events.addNode(
			el,
			[
				`${brothelNameCaps} makes you`,
				App.UI.DOM.makeElement("span", cashFormat(profits), ["cash", "inc"]),
				`this week.`
			]
		);

		if (V.brothelDecoration !== "standard") {
			App.Events.addParagraph(
				el,
				[
					`${brothelNameCaps}'s customers enjoyed`,
					App.UI.DOM.makeElement("span", `fucking whores in ${V.brothelDecoration} surroundings.`, ["reputation", "inc"])
				]
			);
		}

		// Brothel stats
		el.append(App.Facilities.Brothel.Stats(false));
		brothelStats.append(App.Facilities.Brothel.Stats(true));
	}
	return el;
};