code:
/**
 * @returns {HTMLElement}
 */
App.EndWeek.personalBusiness = function() {
	const el = document.createElement("p");
	let r = [];
	let he;
	let him;
	let income;
	let cal;
	let X;
	let windfall;
	let catchTChance;
	let upgradeCount;
	let dataGain;
	if (V.useTabs === 0) {
		App.UI.DOM.appendNewElement("h2", el, `Personal Business`);
	}

	if (V.cash < 0) {
		const interest = 1 + Math.trunc(Math.abs(V.cash) / 100);
		cashX(forceNeg(interest), "personalBusiness");
		r.push(`<span class="red">You are in debt.</span> This week, interest came to ${cashFormat(interest)}.`);
		if (V.arcologies[0].FSRomanRevivalist !== "unset") {
			r.push(`Society <span class="red">very strongly disapproves</span> of your being in debt; this damages the idea that you model yourself on what a Roman leader should be.`);
			FutureSocieties.Change("Roman Revivalist", -10);
		}
		if (V.cash < 0 && V.cash > -25000 && V.arcologies[0].FSRestartDecoration === 100) {
			if (V.eugenicsFullControl !== 1) {
				r.push(`Money is quickly shifted to bring you out of debt, though <span class="red">the Societal Elite are left doubting</span> your worth.`);
				V.cash = 0;
				V.failedElite += 100;
			} else {
				r.push(`Money is quickly shifted to bring you out of debt, though the Societal Elite grumble all the while.`);
				V.cash = 0;
			}
		} else if (V.cash < -9000) {
			r.push(`<span class="red">WARNING: you are dangerously indebted.</span>`);
			if (V.debtWarned > 0) {
				V.gameover = "debt";
				V.nextLink = "Gameover";
				r.push(`Another slaveholder purchased your debt this week, and it doesn't look like you're getting out of this safely.`);
			} else {
				V.debtWarned++;
				r.push(`Immediately acquire more liquid assets or you will be in danger of being enslaved yourself.`);
			}
		}
	}
	if (V.mods.food.market) {
		if (V.mods.food.amount < App.Facilities.Farmyard.foodConsumption() && V.cash < (App.Facilities.Farmyard.foodConsumption() * V.mods.food.cost)) {
			r.push(`<span class="red">WARNING: your arcology will starve in the coming week unless action is taken.</span>`);
			if (V.mods.food.warned) {
				V.gameover = "starving citizens";
				V.nextLink = "Gameover";
			} else {
				V.mods.food.warned = true;
				r.push(
					`Immediately purchase more food or acquire enough capital to purchase the required amount.`,
					`You can also renege on your deal to provide a marketplace for food, but your citizens may hate you for it,`,
				);
			}
		}
	}
	if (V.PC.health.shortDamage >= 30) {
		endWeekHealthDamage(V.PC);
		r.push(`The injuries received in the recent battle prevents you from engaging in tiring endeavors.`);
		if (V.PC.health.shortDamage >= 51) {
			r.push(`Your trusted physician believes it will still take a few weeks to fully recover.`);
		} else if (V.PC.health.shortDamage >= 39) {
			r.push(`You are starting to feel better. It's very likely you will be back to full working order within the next week.`);
		} else {
			r.push(`You have finally recovered from your injuries.`);
		}
	} else if (V.personalAttention.task === PersonalAttention.WHORING) {
		income = random(2000, 4500);
		if (V.PC.belly >= 1500) {
			if (V.arcologies[0].FSRepopulationFocus !== "unset") {
				r.push(`You focus on finding "dates" this week and earn ${cashFormat(Math.trunc((income * (V.rep / 500)) + (V.PC.belly)))} for your body, much more than usual; you guess your pregnancy-focused population wants your baby-rounded body more than ever. However, doing such things damages your reputation.`);
				cashX(Math.trunc((income * (V.rep / 500)) + (V.PC.belly)), "personalBusiness");
				repX((V.rep * .95) - V.rep, "personalBusiness");
			} else if (V.arcologies[0].FSRepopulationFocusPregPolicy === 1) {
				r.push(`You focus on finding "dates" this week and earn ${cashFormat(Math.trunc((income * (V.rep / 500)) + (V.PC.belly / 2)))} for your body, more than usual; but that's to be expected, after all, pregnancy is trendy right now. Event still, doing such things damages your reputation.`);
				cashX(Math.trunc((income * (V.rep / 500)) + (V.PC.belly / 2)), "personalBusiness");
				repX((V.rep * .95) - V.rep, "personalBusiness");
			} else if (V.arcologies[0].FSRestart !== "unset") {
				if (V.PC.pregSource !== -1 && V.PC.pregSource !== -6) {
					r.push(`You focus on finding "dates" this week and earn ${cashFormat(25)}, barely enough to cover the abortion the john that gave it to you told you to get. Showing off your gravid body infuriates your citizens and cripples your reputation.`);
					cashX(25, "personalBusiness");
					repX((V.rep * .5) - V.rep, "personalBusiness");
					if (V.eugenicsFullControl !== 1) {
						V.failedElite += 25;
					}
				} else {
					r.push(`You focus on finding "dates" this week and earn ${cashFormat(Math.trunc(income * (V.rep / 500)))} for your body. However, doing such things damages your reputation.`);
					cashX(Math.trunc(income * (V.rep / 500)), "personalBusiness");
					repX((V.rep * .9) - V.rep, "personalBusiness");
				}
			} else {
				income = random(5, 2500);
				r.push(`You focus on finding "dates" this week and earn ${cashFormat(Math.trunc(income * (V.rep / 800)))} for your body, much less than usual; your pregnancy must be turning off potential clients. However, doing such things damages your reputation.`);
				cashX(Math.trunc(income * (V.rep / 800)), "personalBusiness");
				repX((V.rep * .9) - V.rep, "personalBusiness");
			}
		} else {
			r.push(`You focus on finding "dates" this week and earn ${cashFormat(Math.trunc(income * (V.rep / 500)))} for your body. However, doing such things damages your reputation.`);
			cashX(Math.trunc(income * (V.rep / 500)), "personalBusiness");
			repX((V.rep * .9) - V.rep, "personalBusiness");
			if (canGetPregnant(V.PC)) {
				if (V.arcologies[0].FSRepopulationFocus !== "unset" && random(1, 100) > 80) {
					r.push(`A horny client offered you an extra <span class="yellowgreen">${cashFormat(1000)}</span> for downing some fertility drugs. You're already forgoing birth control, so what harm could an extra baby do?`);
					cashX(1000, "personalBusiness");
					V.PC.forcedFertDrugs += 2;
				} else if (random(1, 100) > 90) {
					if (V.PC.skill.medicine >= 25) {
						r.push(`Your client this week tried to trick you into taking fertility supplements disguised as party drugs. You still took them, of course, but made sure he paid extra for the privilege.`);
						cashX(1000, "personalBusiness");
					} else {
						r.push(`Your client this week offered you some free pills to make sex more fun. He was right; it made bareback sex feel amazing.`);
					}
					V.PC.forcedFertDrugs += 2;
				}
				r.push(knockMeUp(V.PC, 20, 0, -5));
			}
		}
		V.enduringRep *= .5;
	} else if (V.personalAttention.task === PersonalAttention.MAID) {
		if (V.PC.belly >= 5000) {
			r.push(`You spend your free time hustling around your penthouse, cleaning and making sure everything is in order. You manage to reduce your upkeep by 20%. Your`);
			if (V.PC.preg > 0) {
				r.push(`pregnancy`);
			} else {
				r.push(`big belly`);
			}
			r.push(`slows you down some${(V.PC.counter.birthMaster > 0) ? `, but you're used to working around it` : ``}.`);
		} else {
			r.push(`You spend your free time hustling around your penthouse, cleaning and making sure everything is in order. You manage to reduce your upkeep by 25%.`);
			if (V.PC.counter.birthMaster > 0) {
				r.push(`This is much easier to do without a big baby bump in the way.`);
			}
		}
	} else if (V.personalAttention.task === PersonalAttention.SURVEY) {
		r.push(`This week you focus on surveying your defenses in person, <span class="green">making yourself more known throughout ${V.arcologies[0].name}.</span>`);
		repX(50 * V.PC.skill.warfare, "personalBusiness");
		if (V.PC.skill.warfare < 100) {
			r.push(`${IncreasePCSkills('warfare', 0.5)}`);
		}
	} else if (V.personalAttention.task === PersonalAttention.DEVELOPMENT) {
		if ((V.arcologies[0].prosperity + 1 * (1 + Math.ceil(V.PC.skill.engineering / 100))) < V.AProsperityCap) {
			r.push(`This week you focus on contributing to a local development project, <span class="green">boosting prosperity.</span>`);
			V.arcologies[0].prosperity += 1 * (1 + Math.ceil(V.PC.skill.engineering / 100));
			if (V.PC.skill.engineering < 100) {
				r.push(`${IncreasePCSkills('engineering', 0.5)}`);
			}
		} else {
			r.push(`Contributing to a local development project this week <span class="yellow">would be futile.</span>`);
			V.personalAttention.task = PersonalAttention.BUSINESS;
		}
	} else if (V.personalAttention.task === PersonalAttention.PROCLAMATION) {
		/* handled after this if chain */
	} else if (V.personalAttention.task === PersonalAttention.SMUGGLING) {
		const qualifiedFS = [];
		if (V.arcologies[0].FSDegradationistDecoration >= 80) {
			qualifiedFS.push("degradationist");
		}
		if (V.arcologies[0].FSPaternalistDecoration >= 80) {
			qualifiedFS.push("paternalist");
		}
		if (V.arcologies[0].FSHedonisticDecadenceDecoration >= 80) {
			qualifiedFS.push("hedonistic");
		}
		if (V.arcologies[0].FSSlaveProfessionalismLaw === 1) {
			qualifiedFS.push("professionalism");
		}
		if (V.arcologies[0].FSIntellectualDependencyLaw === 1) {
			qualifiedFS.push("dependency");
		}
		if (V.arcologies[0].FSPetiteAdmiration >= 80) {
			qualifiedFS.push("petite");
		}
		if (V.arcologies[0].FSStatuesqueGlorification >= 80) {
			qualifiedFS.push("statuesque");
		}
		if (V.arcologies[0].FSPastoralistDecoration >= 80 && V.arcologies[0].FSPastoralistLaw === 1) {
			qualifiedFS.push("pastoralist");
		}
		if (V.arcologies[0].FSSupremacistDecoration >= 80) {
			qualifiedFS.push("supremacist");
		}
		if (V.arcologies[0].FSBodyPuristDecoration >= 80) {
			qualifiedFS.push("body purist");
		}
		if (V.arcologies[0].FSRestartDecoration >= 80) {
			qualifiedFS.push("eugenics");
		}
		if (V.arcologies[0].FSRepopulationFocusDecoration >= 80) {
			qualifiedFS.push("repopulation");
		}
		if (V.arcologies[0].FSGenderFundamentalistDecoration >= 80) {
			qualifiedFS.push("fundamentalist");
		}
		if (V.arcologies[0].FSSubjugationistDecoration >= 80) {
			qualifiedFS.push("subjugationist");
		}
		if (V.arcologies[0].FSGenderRadicalistResearch === 1) {
			qualifiedFS.push("radicalist");
		}
		if (V.arcologies[0].FSTransformationFetishistResearch === 1) {
			qualifiedFS.push("transformation");
		}
		if (V.arcologies[0].FSYouthPreferentialistDecoration >= 80) {
			qualifiedFS.push("youth");
		}
		if (V.arcologies[0].FSMaturityPreferentialistDecoration >= 80) {
			qualifiedFS.push("maturity");
		}
		if (V.arcologies[0].FSSlimnessEnthusiastDecoration >= 80) {
			qualifiedFS.push("slimness");
		}
		if (V.arcologies[0].FSAssetExpansionistResearch === 1) {
			qualifiedFS.push("expansionist");
		}
		if (V.arcologies[0].FSPhysicalIdealistDecoration >= 80) {
			qualifiedFS.push("idealist");
		}
		if (V.arcologies[0].FSChattelReligionistLaw === 1) {
			qualifiedFS.push("religion");
		}
		if (V.arcologies[0].FSRomanRevivalistLaw === 1) {
			qualifiedFS.push("roman law");
		} else if (V.arcologies[0].FSRomanRevivalistDecoration >= 80) {
			qualifiedFS.push("roman");
		} else if (V.arcologies[0].FSEgyptianRevivalistDecoration >= 80) {
			qualifiedFS.push("egyptian");
		} else if (V.arcologies[0].FSAztecRevivalistLaw === 1) {
			qualifiedFS.push("aztec law");
		} else if (V.arcologies[0].FSAztecRevivalistDecoration >= 80) {
			qualifiedFS.push("aztec");
		} else if (V.arcologies[0].FSNeoImperialistLaw1 === 1) {
			qualifiedFS.push("imperial law");
		} else if (V.arcologies[0].FSNeoImperialistDecoration >= 80) {
			qualifiedFS.push("imperial");
		} else if (V.arcologies[0].FSArabianRevivalistLaw === 1) {
			qualifiedFS.push("arabian law");
		} else if (V.arcologies[0].FSArabianRevivalistDecoration >= 80) {
			qualifiedFS.push("arabian");
		} else if (V.arcologies[0].FSEdoRevivalistLaw === 1) {
			qualifiedFS.push("edo law");
		} else if (V.arcologies[0].FSEdoRevivalistDecoration >= 80) {
			qualifiedFS.push("edo");
		} else if (V.arcologies[0].FSChineseRevivalistLaw === 1) {
			qualifiedFS.push("chinese law");
		} else if (V.arcologies[0].FSChineseRevivalistDecoration >= 80) {
			qualifiedFS.push("chinese");
		}
		let caught = 0;
		if (V.rep >= 18000) { /* prestigious */
			income = random(8500, 9000);
		} else if (V.rep >= 9000) { /* well known */
			income = random(4500, 5000);
		} else {
			income = random(1500, 2000);
		}
		switch (qualifiedFS.random()) {
			case "eugenics":
				income += random(2500, 4000);
				if (V.eugenicsFullControl !== 1) {
					r.push(`You are smuggling`);
					if (V.PC.dick !== 0) {
						r.push(`your`);
					} else {
						r.push(`one of the Societal Elite's`);
					}
					r.push(`semen to allow some desperate girls to be pregnant. Anonymity is really hard to attain, and it is easy to find out what you've been doing. Even if you did manage to make ${cashFormat(income)}, the Societal Elite are quite displeased by your actions.`);
					V.failedElite += 50;
					caught = 1;
				} else {
					r.push(`You are smuggling`);
					if (V.PC.dick !== 0) {
						r.push(`your`);
					} else {
						r.push(`one of the Societal Elite's`);
					}
					r.push(`semen to allow some desperate girls to be pregnant. Anonymity is really hard to attain, and it is easy to find out what you've been doing. Even if you did manage to make ${cashFormat(income)}, the Societal Elite are quite displeased by your actions, even though they know how little they can do about it now.`);
					caught = 1;
				}
				break;
			case "paternalist":
				income += random(1000, 1500);
				r.push(`You manage to find a few low-standards slavers without any problem, but when you actually try to do business, you are quickly recognized. You only manage to make ${cashFormat(income)} before you are sent away. The people of your arcology are outraged by your lack of respect for slave rights.`);
				caught = 1;
				break;
			case "supremacist":
				income += random(2000, 3000);
				r.push(`When it comes to smuggling in your arcology, there is no better target than ${V.arcologies[0].FSSupremacistRace} slaves, and there is a high demand for them, making you a nice ${cashFormat(income)}. Participating in this slave trade means you can control who is set. Your people do not see things in the same light though, and your reputation takes a big hit.`);
				caught = 1;
				break;
			case "degradationist":
				income += random(2000, 3000);
				r.push(`During your free time, you make business with a few low-standards slavers and manage to buy stolen slaves and sell them at a profit. Even if people recognized you, such treatment of slaves is normal, and only a few people would really complain about it. Your dealings have made you ${cashFormat(income)}.`);
				break;
			case "repopulation":
				income += random(1500, 2500);
				r.push(`You manage to discreetly rent out your remote surgery services for abortions. You make sure the people do not recognize your penthouse, having them come blindfolded or unconscious, should the abortion request does not come from themselves. With this, you make ${cashFormat(income)}.`);
				break;
			case "fundamentalist":
				income += random(1500, 2500);
				r.push(`You manage to arrange a few sex-changes and geldings in your own remote surgery for some powerful people to accommodate your arcology's sense of power, but also for people who want to transform others into females so that they lose all the power they have. This makes you ${cashFormat(income)}.`);
				break;
			case "hedonistic":
				income += random(1500, 2500);
				r.push(`Since most of what the old world considered to be illegal is legal in your arcology, "smuggling" is quite common, and you easily find people ready to pay for your help with dealing with their competition. With this, you manage to make ${cashFormat(income)}.`);
				break;
			case "pastoralist":
				income += random(1500, 2500);
				r.push(`You take advantage of your own laws, making sure that animal products still come into your arcology. But you also make sure to make them as disgusting as possible so that people would rather turn to slave-produced ones instead. This allows you to make ${cashFormat(income)}.`);
				break;
			case "body purist":
				income += random(1500, 2500);
				r.push(`In your arcology, people are expected to be all natural, but this doesn't mean the same thing applies outside. By buying slaves, giving them implants and quickly selling them before anyone notices, you manage to make ${cashFormat(income)}.`);
				break;
			case "subjugationist":
				income += random(1500, 2500);
				r.push(`You manage to work with some slavers that deal exclusively in ${V.arcologies[0].FSSubjugationistRace} slaves, and you export them from the arcology at a cost, bringing in ${cashFormat(income)}. Considering most people do not care about the fate of the slaves, they are simply mildly annoyed at the short-term raise of prices due to the exportation.`);
				break;
			case "radicalist":
				income += random(2500, 4000);
				r.push(`Anal pregnancy may be accepted in your arcology, but seeing how it goes against the laws of nature makes it a gold mine for dirty businesses; you have rich slaveowners and well-known slavers come to you with their best sissies so that you can implant them with artificial uteri. This flourishing business made you ${cashFormat(income)}.`);
				break;
			case "transformation":
				income += random(2500, 4000);
				r.push(`Your arcology is well known for its implants, and usually, one would have to pay a fortune simply to have a clinic implant them with normal implants. You take advantage of this trend to rent your remote surgery and your knowledge of gigantic implants to slavers for a cut of their profit. This gets you ${cashFormat(income)}.`);
				break;
			case "youth":
				income += random(1500, 2500);
				r.push(`Youth is more important than anything in your arcology, yet some people who are not really in their prime are rich and powerful, enough that renting your remote surgery to them for age lifts and total body rework is quite worth it, both for them and for you. You get paid ${cashFormat(income)} for these services.`);
				break;
			case "maturity":
				income += random(1500, 2500);
				r.push(`In your arcology, the older the slave, the better. This also means that your arcology deals a lot in curatives and preventatives, as well as less-than-legal drugs that are supposed to extend one's lifespan. You manage to ship in a few of these drugs and sell them at a high price, making you ${cashFormat(income)}.`);
				break;
			case "slimness":
				income += random(1500, 2500);
				r.push(`Your arcology treats chubby people quite poorly, so they are ready to spend a lot of money on surgeries and supposed "miracle" solutions. When they can't afford legal and efficient methods, they have to turn to other drugs. The sales bring you ${cashFormat(income)}.`);
				break;
			case "expansionist":
				income += random(2500, 4000);
				r.push(`Your arcology likes its slaves nice and stacked and you have exactly the drugs for it. But you always make sure to produce just a bit more, enough to not alarm anybody who might be watching, but also enough to sell to other prominent slaveowners outside your arcology, who pay you ${cashFormat(income)} for them.`);
				break;
			case "idealist":
				income += random(1500, 2500);
				r.push(`Your society's obsession with fit and muscular slaves has developed a particular interest in steroids and all kinds of drugs to tone one's body. As an arcology owner, you always have access to the most potent of them, but this is not the case for lower class citizens; some of them just aren't willing to pay a lot for them, so they buy experimental drugs off the black market. Participating in these activities made you ${cashFormat(income)}.`);
				break;
			case "professionalism":
				income += random(2500, 5500);
				r.push(`Your arcology has strict laws when it comes to who may be stay within its walls and those that don't cut it are often desperate for a loop hole; one you can easily provide. ${cashFormat(income)} for your pocket and another taxable citizen. Win, win.`);
				break;
			case "dependency":
				income += random(5500, 15000);
				r.push(`Your arcology has strict laws when it comes to who may be claimed as a dependent and thusly excused from taxation. Of course, there are always those looking to cheat the system for their own benefit and more than willing to slip you a sum of credits to make it happen. While in the long term it may cost you, but for now you rake in a quick ${cashFormat(income)} for the forged documents.`);
				break;
			case "statuesque":
				income += random(1500, 3500);
				r.push(`Your arcology likes its slaves tall, but even then there is the occasional outlier. An outlier usually keen on paying a lovely sum to have a tiny embarrassment of a slave slipped discreetly into their possession. All that is seen is a pair of suitcases changing hands and you walk away with ${cashFormat(income)}.`);
				break;
			case "petite":
				income += random(1500, 3000);
				r.push(`Your arcology prefer a couple with a sizable gap between their heights. When they can't quite achieve that goal, they turn to any means they can. A few discreet surgeries and growth inhibitor sales net you ${cashFormat(income)} this week.`);
				break;
			case "religion":
				income += random(2000, 3000);
				r.push(`The best smugglers know how to use the law to its advantage, and not only are you a really good smuggler, you're also the law itself. You have word spread that some company has done something blasphemous, and have them pray and pay for forgiveness. Panicked at the word of their Prophet, the higher-ups of the company give you ${cashFormat(income)} for salvation.`);
				break;
			case "roman law":
				income += random(2000, 3000);
				r.push(`Every citizen of your arcology is trained in the art of war and supposed to defend its arcology when the time comes. This, of course, also means that people are supposed to be able to defend themselves. By arranging with the best fighters around, you manage to make some citizens face outrageous losses; so bad, in fact, that they are forced to pay ${cashFormat(income)} for you to forget the shame they've put on your arcology.`);
				break;
			case "roman":
				income += random(1500, 2500);
				r.push(`Slaveowners from all around your arcology are rushing to the pit, eager to show their most recent training. Some of them, having more cunning than experience, are ready to sway the fight in their direction, no matter what it takes. You make sure to catch such people, and only agree to let them do their dirty tricks if they pay you. By the times the bribes and betting are done, you have made ${cashFormat(income)}.`);
				break;
			case "egyptian":
				income += random(1500, 2500);
				r.push(`Having a society that likes incest often means that people are ready to go to great lengths to get their hands on people related to their slaves. In the smuggling business, this means that kidnapped relatives are common, and as an arcology owner with access to data on most of the slaves, you are able to control this trade a bit in exchange for ${cashFormat(income)}.`);
				break;
			case "aztec law":
				income += random(2000, 3000);
				r.push(`People that inherit trades are sometimes too lazy to take classes in an academy, but at the same time, they fear what might happen were they to go against you. To solve both problems, you arrange a trade of fake diplomas, making sure that there is always a small detail to recognize them, so that they will get exposed in due time. This has made you ${cashFormat(income)}.`);
				break;
			case "aztec":
				income += random(1500, 2500);
				r.push(`There are a lot of slaveowners in your arcology that tend to grow quickly attached to the slaves they planned on sacrificing to sate the blood thirst of other important citizens, and such owners often come to you, begging you to swap two of their slaves' appearance. You accept, but not for free. After the surgery, this has made you ${cashFormat(income)}.`);
				break;
			case "imperial law":
				income += random(2000, 3000);
				r.push(`With Imperial Knights constantly patrolling the streets and a strict noble hierarchy flowing up from your Barons directly to you, you have a great deal of room to play with legal codes and edifices - which, of course, are constantly being modified to be eternally in your favor. The Barons and Knights who maintain your arcology happily turn a blind eye as you skim trade income directly into your pockets - after all, they're going to benefit from your success too. Sly manipulation of trade codes has earned you ${cashFormat(income)}.`);
				break;
			case "imperial":
				income += random(1500, 2500);
				r.push(`Your new Imperial culture fosters a particularly large amount of trade, given its fascination with high technology and old world culture. The constant influx of new fashions, materials, and technologies allows for one of the rarest opportunities for an ultra-wealthy plutocrat such as yourself; the chance to earn an honest dollar. By spending time at the bustling marketplace and trading in fashion, you've made ${cashFormat(income)}.`);
				break;
			case "arabian law":
				income += random(2000, 3000);
				r.push(`You have a lot of persons scared of the consequences of not being a part of your society; even if they pay the Jizya, other citizens are not forced to accept them. So if they were to get mugged in some dark alley, people would not get outraged, and there probably wouldn't be any investigations. After buying everyone's silence, you still had ${cashFormat(income)} to put in your pockets.`);
				break;
			case "arabian":
				income += random(1500, 2500);
				r.push(`People in your arcology are supposed to keep a myriad of slaves as their personal harem, and failure to do so is considered to be highly dishonorable. This opens up some opportunities for smuggling, as people are ready to go to great length to get an edge against their competitors. Becoming a part for this business has made you ${cashFormat(income)}.`);
				break;
			case "edo law":
				income += random(2000, 3000);
				r.push(`Outside culture is banned in your arcology. Your citizens do not need anything other than what you have inside. But this doesn't help with their curiosity — they always want to discover what the outside world is like. So you let some news and a few books from other cultures slip in, but not before you made sure they would disgust your citizens and reinforce their love for the Edo culture. The sales brought you ${cashFormat(income)}.`);
				break;
			case "edo":
				income += random(1500, 2500);
				r.push(`During important meetings with higher society, it is wise to have a lot of slaves to put at the disposition of others. But some slaveowners grow really attached to their slaves, and so they'd much rather rent out unknown slaves from an anonymous owner's stock than use their own. This is a good opportunity to make some money, as shown by the ${cashFormat(income)} you managed to make.`);
				break;
			case "chinese law":
				income += random(2000, 3000);
				({he, him} = getPronouns(S.HeadGirl));
				r.push(`This time, you have a good idea that will also make use of your Head Girl. You coax ${him} into thinking ${he} should accept bribes for the time being, making up a good reason on the spot, and ${he} ends up bringing back ${cashFormat(income)} from all the bribes people gave for ${him} to turn the other way.`);
				break;
			case "chinese":
				income += random(1500, 2500);
				r.push(`Being under what people call the Mandate of Heaven means you have a crucial importance in society, and some desperate people are willing to pay just for you to throw a word or small gesture in their direction, such as simply acknowledging a child or a slave, thinking that such things will make sure the Heavens smile upon them. For these services, you get ${cashFormat(income)}.`);
				break;
			default:
				income += random(500, 2000);
				r.push(`You use former contacts to get you some opportunities in your arcology and deal with them. You make little money, only <span class="yellowgreen">${cashFormat(income)}.</span>`);
		}
		/* reputation effects */
		if (V.rep >= 18000) { /* prestigious */
			r.push(`Your strong reputation makes it both really easy to find opportunities to gain quite a bit of money, but at the same time, it makes it hard to do so anonymously.`);
			if (caught || random(1, 100) >= 25) {
				r.push(`Even with your attempts at discretion, people somehow manage to recognize you, and rumors that you're back in the gang business are spreading through your arcology like wildfire.`);
				repX((V.rep * .8) - V.rep, "personalBusiness");
				V.enduringRep *= .5;
			} else if (random(1, 100) >= 50) {
				r.push(`You are as discreet as possible, but yet some people seem to have doubts about who you are, and for quite some time, you can hear whispers that you may be helping the shadier businesses in your arcology.`);
				repX((V.rep * .9) - V.rep, "personalBusiness");
				V.enduringRep *= .75;
			} else {
				r.push(`You fool almost everyone with your`);
				if (V.PC.actualAge >= 30) {
					r.push(`experience and`);
				}
				r.push(`cunning, but the sole fact that smugglers are in your arcology <span class="red">damages your reputation.</span>`);
				repX((V.rep * .95) - V.rep, "personalBusiness");
				V.enduringRep *= .9;
			}
		} else if (V.rep >= 9000) { // well known
			r.push(`Your reputation helps you find opportunities that need people who have proved discreet. But even when taking precautions, nothing guarantees you can stay anonymous.`);
			if (caught || random(1, 100) >= 40) {
				r.push(`Try as you might, people notice who you are, and the next day, <span class="red">rumors about your business affairs</span> are already spreading everywhere in your arcology.`);
				repX((V.rep * .9) - V.rep, "personalBusiness");
				V.enduringRep *= .65;
			} else if (random(1, 100) >= 50) {
				r.push(`You manage to fool some people, but not everyone, and soon enough, people are <span class="red">discussing whether you're smuggling or not.</span>`);
				repX((V.rep * .95) - V.rep, "personalBusiness");
				V.enduringRep *= .9;
			} else {
				r.push(`You somehow manage to hide your identity for all but the most cunning of people, so the only thing that really damages your reputation is the fact that people associate you with gangs all the time.`);
				repX((V.rep * .98) - V.rep, "personalBusiness");
			}
		} else { /* low reputation */
			if (!caught && random(1, 100) >= 90) {
				r.push(`You work efficiently, not spending any time talking to people more than you need. Your efficiency even managed to earn you quite a few good words from some people who were leading double lives like you were, and they made sure to get a word in about you in their business conversations.`);
				repX((V.rep * 1.05) - V.rep, "personalBusiness");
			} else if (!caught && random(1, 100) >= 50) {
				r.push(`You get a few curious glances from some people here and there, but most people do not care about who you are, or maybe they don't know, and it's better this way. Though your regular absences have not gone unnoticed and some baseless rumors are spreading.`);
				repX((V.rep * .95) - V.rep, "personalBusiness");
				V.enduringRep *= .95;
			} else {
				r.push(`Some people whisper when you pass by them. They seem to know who you are, and you know that after a bit of alcohol, their tongue will come loose, and you can't afford to shut them up right here, right now.`);
				repX((V.rep * .9) - V.rep, "personalBusiness");
				V.enduringRep *= .8;
			}
		}
		income += Math.trunc(Math.min(3000 * Math.log(V.cash + 1), V.cash * 0.07));
		r.push(`This week, your illicit and legitimate business dealings earned you a combined total of <span class="yellowgreen">${cashFormat(income)}.</span>`);
		cashX(income, "personalBusiness");
	} else if ((V.cash > 1000) && (V.personalAttention.task === PersonalAttention.BUSINESS)) {
		if (V.PC.belly >= 1500) {
			income = random(500, 1000);
		} else {
			income = random(1000, 1500);
		}
		if (V.PC.skill.trading >= 100) {
			r.push(`You focus on business and leverage your <span class="skill player">venture capital experience</span> to make good money:`);
			income += random(5000, 10000) + Math.trunc(Math.min(4000 * Math.log(V.cash), V.cash * 0.07));
		} else if (V.PC.career === "arcology owner") {
			r.push(`You focus on business and leverage your <span class="skill player">Free Cities experience</span> to make good money:`);
			income += random(5000, 10000) + Math.trunc(Math.min(4000 * Math.log(V.cash), V.cash * 0.07));
		} else {
			r.push(`You focus on business this week and make some money:`);
			income += Math.trunc(Math.min(3500 * Math.log(V.cash), V.cash * 0.07));
		}
		r.push(`<span class="yellowgreen">${cashFormat(income)}.</span>`);
		cashX(income, "personalBusiness");
		if (V.arcologies[0].FSRomanRevivalist !== "unset") {
			r.push(`Society <span class="green">approves</span> of your close attention to your own affairs; this advances your image as a`);
			if (V.PC.title === 1) {
				r.push(`well-rounded Roman man.`);
			} else {
				r.push(`responsible Roman lady.`);
			}
			FutureSocieties.Change("Roman Revivalist", 2);
		}
	} else if (V.cash > 1000) {
		income = Math.trunc(Math.min(3000 * Math.log(V.cash), V.cash * 0.07));
		r.push(`This week, your business endeavors made you <span class="yellowgreen">${cashFormat(income)}.</span>`);
		cashX(income, "personalBusiness");
	} else {
		r.push(`You have enough cash to manage your affairs, but not enough to do much business.`);
	}

	if (V.personalAttention.task === PersonalAttention.PROCLAMATION) {
		if ((V.SecExp.proclamation.currency === "authority" && V.SecExp.core.authority >= 2000) || (V.SecExp.proclamation.currency === "reputation" && V.rep >= 4000) || (V.SecExp.proclamation.currency === "cash" && V.cash >= 8000)) {
			r.push(`After several days of preparation you are ready to issue the proclamation. You announce to the arcology your plans and in short order you use`);
			if (V.SecExp.proclamation.currency === "authority") {
				r.push(`control over the arcology`);
			} else if (V.SecExp.proclamation.currency === "reputation") {
				r.push(`great influence`);
			} else if (V.SecExp.proclamation.currency === "cash") {
				r.push(`vast financial means`);
			}
			r.push(`to`);
			if (V.SecExp.proclamation.type === "security") {
				r.push(`gather crucial information for your security department. In just a few many hours holes are plugged and most moles are eliminated. <span class="green">Your security greatly increased.</span>`);
				V.SecExp.core.security = Math.clamp(V.SecExp.core.security + 25, 0, 100);
			} else if (V.SecExp.proclamation.type === "crime") {
				r.push(`force the arrest of many suspected citizens. Their personal power allowed them to avoid justice for a long time, but this day is their end. <span class="green">Your crime greatly decreased.</span>`);
				V.SecExp.core.crimeLow = Math.clamp(V.SecExp.core.crimeLow - 25, 0, 100);
			}
			if (V.SecExp.proclamation.currency === "authority") {
				App.SecExp.authorityX(-2000);
			} else if (V.SecExp.proclamation.currency === "reputation") {
				repX(Math.clamp(V.rep - 2000, 0, 20000), "personalBusiness");
			} else {
				cashX(-8000, "personalBusiness");
			}
			V.SecExp.proclamation.cooldown = 4;
			V.personalAttention.task = PersonalAttention.BUSINESS;
		} else {
			r.push(`As you currently lack the minimum amount of your chosen proclamation currency, ${V.SecExp.proclamation.currency}, it would be unwise to attempt execution of your ${V.SecExp.proclamation.type} this week.`);
		}
	}

	if (V.PC.actualAge >= V.IsInPrimePC && V.PC.actualAge < V.IsPastPrimePC) {
		cal = Math.ceil(random(V.AgeTrainingLowerBoundPC, V.AgeTrainingUpperBoundPC) * V.AgeEffectOnTrainerEffectivenessPC);
		X = 1;
	}
	/*
	if V.PC.actualAge >= V.IsPastPrimePC {
		cal = Math.ceil(random(V.AgeTrainingLowerBoundPC,V.AgeTrainingUpperBoundPC)*V.AgeEffectOnTrainerEffectivenessPC);
		X = 0;
	}
	*/

	if (V.PC.health.shortDamage < 30) {
		let oldSkill;
		switch (V.personalAttention.task) {
			case PersonalAttention.TRADE:
				oldSkill = V.PC.skill.trading;
				if (X === 1) {
					V.PC.skill.trading += cal;
				} else {
					V.PC.skill.trading -= cal;
				}
				if (oldSkill <= 10) {
					if (V.PC.skill.trading > 10) {
						r.push(`You now have <span class="green">basic knowledge</span> about how to be a venture capitalist.`);
					} else {
						r.push(`You have made progress towards a basic knowledge of venture capitalism.`);
					}
				} else if (oldSkill <= 30) {
					if (V.PC.skill.trading > 30) {
						r.push(`You now have <span class="green">some skill</span> as a venture capitalist.`);
					} else {
						r.push(`You have made progress towards being skilled in venture capitalism.`);
					}
				} else if (oldSkill <= 60) {
					if (V.PC.skill.trading > 60) {
						r.push(`You are now an <span class="green">expert venture capitalist.</span>`);
					} else {
						r.push(`You have made progress towards being an expert in venture capitalism.`);
					}
				} else {
					if (V.PC.skill.trading >= 100) {
						V.personalAttention.task = PersonalAttention.SEX;
						V.PC.skill.trading = 100;
						r.push(`You are now a <span class="green">master venture capitalist.</span>`);
					} else {
						r.push(`You have made progress towards mastering venture capitalism.`);
					}
				}

				break;
			case PersonalAttention.WAR:
				oldSkill = V.PC.skill.warfare;
				if (X === 1) {
					V.PC.skill.warfare += cal;
				} else {
					V.PC.skill.warfare -= cal;
				}
				if (oldSkill <= 10) {
					if (V.PC.skill.warfare > 10) {
						r.push(`You now have <span class="green">basic knowledge</span> about how to be a mercenary.`);
					} else {
						r.push(`You have made progress towards a basic knowledge of mercenary work.`);
					}
				} else if (oldSkill <= 30) {
					if (V.PC.skill.warfare > 30) {
						r.push(`You now have <span class="green">some skill</span> as a mercenary.`);
					} else {
						r.push(`You have made progress towards being skilled in mercenary work.`);
					}
				} else if (oldSkill <= 60) {
					if (V.PC.skill.warfare > 60) {
						r.push(`You are now an <span class="green">expert mercenary.</span>`);
					} else {
						r.push(`You have made progress towards being an expert in mercenary work.`);
					}
				} else {
					if (V.PC.skill.warfare >= 100) {
						V.personalAttention.task = PersonalAttention.SEX;
						V.PC.skill.warfare = 100;
						r.push(`You are now a <span class="green">master mercenary.</span>`);
					} else {
						r.push(`You have made progress towards mastering mercenary work.`);
					}
				}

				break;
			case PersonalAttention.SLAVING:
				oldSkill = V.PC.skill.slaving;
				if (X === 1) {
					V.PC.skill.slaving += cal;
				} else {
					V.PC.skill.slaving -= cal;
				}
				if (oldSkill <= 10) {
					if (V.PC.skill.slaving > 10) {
						r.push(`You now have <span class="green">basic knowledge</span> about how to be a slaver.`);
					} else {
						r.push(`You have made progress towards a basic knowledge of slaving.`);
					}
				} else if (oldSkill <= 30) {
					if (V.PC.skill.slaving > 30) {
						r.push(`You now have <span class="green">some skill</span> as a slaver.`);
					} else {
						r.push(`You have made progress towards being skilled in slaving.`);
					}
				} else if (oldSkill <= 60) {
					if (V.PC.skill.slaving > 60) {
						r.push(`You are now an <span class="green">expert slaver.</span>`);
					} else {
						r.push(`You have made progress towards being an expert in slaving.`);
					}
				} else {
					if (V.PC.skill.slaving >= 100) {
						V.personalAttention.task = PersonalAttention.SEX;
						V.PC.skill.slaving = 100;
						r.push(`You are now a <span class="green">master slaver.</span>`);
					} else {
						r.push(`You have made progress towards mastering slaving.`);
					}
				}

				break;
			case PersonalAttention.ENGINEERING:
				oldSkill = V.PC.skill.engineering;
				if (X === 1) {
					V.PC.skill.engineering += cal;
				} else {
					V.PC.skill.engineering -= cal;
				}
				if (oldSkill <= 10) {
					if (V.PC.skill.engineering > 10) {
						r.push(`You now have <span class="green">basic knowledge</span> about how to be an arcology engineer.`);
					} else {
						r.push(`You have made progress towards a basic knowledge of arcology engineering.`);
					}
				} else if (oldSkill <= 30) {
					if (V.PC.skill.engineering > 30) {
						r.push(`You now have <span class="green">some skill</span> as an arcology engineer.`);
					} else {
						r.push(`You have made progress towards being skilled in arcology engineering.`);
					}
				} else if (oldSkill <= 60) {
					if (V.PC.skill.engineering > 60) {
						r.push(`You are now an <span class="green">expert arcology engineer.</span>`);
					} else {
						r.push(`You have made progress towards being an expert in arcology engineering.`);
					}
				} else {
					if (V.PC.skill.engineering >= 100) {
						V.personalAttention.task = PersonalAttention.SEX;
						V.PC.skill.engineering = 100;
						r.push(`You are now a <span class="green">master arcology engineer.</span>`);
					} else {
						r.push(`You have made progress towards mastering arcology engineering.`);
					}
				}

				break;
			case PersonalAttention.MEDICINE:
				oldSkill = V.PC.skill.medicine;
				if (X === 1) {
					V.PC.skill.medicine += cal;
				} else {
					V.PC.skill.medicine -= cal;
				}
				if (oldSkill <= 10) {
					if (V.PC.skill.medicine > 10) {
						r.push(`You now have <span class="green">basic knowledge</span> about how to be a slave surgeon.`);
					} else {
						r.push(`You have made progress towards a basic knowledge of slave surgery.`);
					}
				} else if (oldSkill <= 30) {
					if (V.PC.skill.medicine > 30) {
						r.push(`You now have <span class="green">some skill</span> as a slave surgeon.`);
					} else {
						r.push(`You have made progress towards being skilled in slave surgery.`);
					}
				} else if (oldSkill <= 60) {
					if (V.PC.skill.medicine > 60) {
						r.push(`You are now an <span class="green">expert slave surgeon.</span>`);
					} else {
						r.push(`You have made progress towards being an expert in slave surgery.`);
					}
				} else {
					if (V.PC.skill.medicine >= 100) {
						V.personalAttention.task = PersonalAttention.SEX;
						V.PC.skill.medicine = 100;
						r.push(`You are now a <span class="green">master slave surgeon.</span>`);
					} else {
						r.push(`You have made progress towards mastering slave surgery.`);
					}
				}

				break;
			case PersonalAttention.HACKING:
				oldSkill = V.PC.skill.hacking;
				if (X === 1) {
					V.PC.skill.hacking += cal;
				} else {
					V.PC.skill.hacking -= cal;
				}
				if (oldSkill <= 10) {
					if (V.PC.skill.hacking > 10) {
						r.push(`You now have <span class="green">basic knowledge</span> about how to hack and manipulate data.`);
					} else {
						r.push(`You have made progress towards a basic knowledge of hacking and data manipulation.`);
					}
				} else if (oldSkill <= 30) {
					if (V.PC.skill.hacking > 30) {
						r.push(`You now have <span class="green">some skill</span> as a hacker.`);
					} else {
						r.push(`You have made progress towards being skilled in hacking and data manipulation.`);
					}
				} else if (oldSkill <= 60) {
					if (V.PC.skill.hacking > 60) {
						r.push(`You are now an <span class="green">expert hacker.</span>`);
					} else {
						r.push(`You have made progress towards being an expert in hacking and data manipulation.`);
					}
				} else {
					if (V.PC.skill.hacking >= 100) {
						V.personalAttention.task = PersonalAttention.SEX;
						V.PC.skill.hacking = 100;
						r.push(`You are now a <span class="green">master hacker.</span>`);
					} else {
						r.push(`You have made progress towards mastering hacking and data manipulation.`);
					}
				}

				break;
			case PersonalAttention.TECH:
				windfall = Math.trunc((150 * V.PC.skill.hacking) + random(100, 2500));
				X = 0;
				if (V.PC.skill.hacking === -100) {
					catchTChance = 10;
				} else if (V.PC.skill.hacking <= -75) {
					catchTChance = 30;
				} else if (V.PC.skill.hacking <= -50) {
					catchTChance = 40;
				} else if (V.PC.skill.hacking <= -25) {
					catchTChance = 45;
				} else if (V.PC.skill.hacking === 0) {
					catchTChance = 50;
				} else if (V.PC.skill.hacking <= 25) {
					catchTChance = 60;
				} else if (V.PC.skill.hacking <= 50) {
					catchTChance = 70;
				} else if (V.PC.skill.hacking <= 75) {
					catchTChance = 85;
				} else if (V.PC.skill.hacking >= 100) {
					catchTChance = 100;
				}
				r.push(`This week your services to the highest bidder earned you <span class="yellowgreen">${cashFormat(windfall)}.</span>`);
				if (random(0, 100) >= catchTChance) {
					r.push(`However, since the source of the attack was traced back to your arcology, your`);
					if (V.secExpEnabled > 0) {
						X = 1;
						r.push(`<span class="red">authority,</span>`);
						App.SecExp.authorityX(random(-100, -500));
						r.push(`<span class="red">crime rate</span>`);
						V.SecExp.core.crimeLow = Math.clamp(V.SecExp.core.crimeLow + random(10, 25), 0, 100);
						r.push(`and`);
					}
					r.push(`<span class="red">reputation</span>`);
					repX(forceNeg(random(50, 500)), "event");
					if (X !== 1) {
						r.push(`has`);
					} else {
						r.push(`have all`);
					}
					r.push(`been negatively affected.`);
				}
				if (V.PC.skill.hacking < 100) {
					r.push(`${IncreasePCSkills('hacking', 0.5)}`);
				}
				cashX(windfall, "personalBusiness");
		}
	}

	if (V.policies.cashForRep === 1) {
		if (V.cash > 1000) {
			r.push(`This week you gave up business opportunities worth ${cashFormat(policies.cost())} to help deserving citizens, <span class="green">burnishing your reputation.</span>`);
			repX(1000, "personalBusiness");
			cashX(forceNeg(policies.cost()), "policies");
			if (V.PC.degeneracy > 1) {
				r.push(`This also helps <span class="green">offset any rumors</span> about your private actions.`);
				V.PC.degeneracy -= 1;
			}
		} else {
			r.push(`Money was too tight this week to risk giving up any business opportunities.`);
		}
	}
	if (V.policies.goodImageCampaign === 1) {
		if (V.cash > 5000) {
			r.push(`This week you paid ${cashFormat(policies.cost())} to have positive rumors spread about you, <span class="green">making you look`);
			if (V.PC.degeneracy > 1) {
				r.push(`good and weakening existing undesirable rumors.</span>`);
				V.PC.degeneracy -= 2;
			} else {
				r.push(`good.</span>`);
			}
			repX(500, "personalBusiness");
			cashX(forceNeg(policies.cost()), "policies");
		} else {
			r.push(`You lacked enough extra ¤ to pay people to spread positive rumors about you this week.`);
		}
	}
	if (V.rep > 20) {
		if (V.policies.cashForRep === -1) {
			r.push(`This week you used your position to secure business opportunities worth ${cashFormat(policies.cost())} at the expense of citizens, <span class="red">damaging your reputation.</span>`);
			repX(-20, "personalBusiness");
			cashX(policies.cost(), "personalBusiness");
		}
	}
	if (V.rep <= 18000) {
		if (V.policies.regularParties === 0) {
			if (V.rep > 3000) {
				r.push(`Your <span class="red">reputation is damaged</span> by your not`);
				r.push(App.UI.DOM.spanWithTooltip("hosting regular social events", "Regular Social Events is a domestic policy costing ¤5000 a week that you can adopt."));
				r.push(`for your leading citizens.`);
				repX(-50, "personalBusiness");
			} else {
				r.push(`Though you are not`);
				r.push(App.UI.DOM.spanWithTooltip("hosting regular social events", "Regular Social Events is a domestic policy costing ¤5000 a week that you can adopt."));
				r.push(`for your leading citizens, your lack of renown prevents this from damaging your reputation; they don't expect someone so relatively unknown to be throwing parties.`);
			}
		}
	}
	if (V.mods.food.enabled && V.mods.food.market && V.mods.food.amount < App.Facilities.Farmyard.foodConsumption()) {
		const foodCost = (App.Facilities.Farmyard.foodConsumption() - V.mods.food.amount) * V.mods.food.cost;
		r.push(`You also spent ${cashFormat(Math.trunc(foodCost))} this week buying enough food to keep your citizens fed, as you promised.`);
		cashX(forceNeg(foodCost), "food");
	}
	App.Events.addParagraph(el, r);
	r = [];

	if (V.secExpEnabled > 0) {
		if (V.SecExp.smilingMan.progress === 10 && random(1, 100) >= 85) {
			r.push(`This week one of the offside adventures of The Smiling Man produced a copious amount of money, of which <span class="yellowgreen">you receive your share.</span>`);
			cashX(random(10, 20) * 1000, "personalBusiness");
		}

		if (V.SecExp.buildings.secHub && V.SecExp.edicts.sellData === 1) {
			upgradeCount = 0;
			upgradeCount += Object.values(V.SecExp.buildings.secHub.upgrades.security).reduce((a, b) => a + b);
			upgradeCount += Object.values(V.SecExp.buildings.secHub.upgrades.crime).reduce((a, b) => a + b);
			upgradeCount += Object.values(V.SecExp.buildings.secHub.upgrades.intel).reduce((a, b) => a + b);

			dataGain = upgradeCount * 200;
			if (!Number.isInteger(dataGain)) {
				r.push(App.UI.DOM.makeElement("div", `Error, dataGain is NaN`, "red"));
			} else {
				r.push(`You are selling the data collected by your security department, which earns a discreet sum of <span class="yellowgreen">${cashFormat(dataGain)}.</span>`);
				cashX(dataGain, "personalBusiness");
				r.push(`Many of your citizens are not enthusiastic of this however, <span class="red">damaging your authority.</span>`);
				App.SecExp.authorityX(-50);
			}
		}

		if (V.SecExp.buildings.propHub && V.SecExp.buildings.propHub.upgrades.marketInfiltration > 0) {
			const blackMarket = random(7000, 8000);
			r.push(`Your secret service makes use of black markets and illegal streams of goods to make a profit, making you ${cashFormat(blackMarket)}. This however allows crime to flourish in the underbelly of the arcology.`);
			V.SecExp.core.crimeLow = Math.clamp(V.SecExp.core.crimeLow + random(1, 3), 0, 100);
			cashX(blackMarket, "personalBusiness");
		}

		const arcDamaged = App.SecExp.updateFacilityDamage("arc");
		r.push(arcDamaged.text);

		App.Events.addParagraph(el, r);

		if (V.SecExp.buildings.weapManu) {
			r = [];
			r.push(`The weapons manufacturing complex produces armaments`);
			if (V.SecExp.buildings.weapManu.productivity <= 2) {
				r.push(`at a steady pace.`);
			} else {
				r.push(`with great efficiency.`);
			}
			income = 0;
			const price = Math.trunc(Math.clamp(random(1, 2) + (V.arcologies[0].prosperity / 15) - (V.week / 30), 2, 8));
			const factoryMod = Math.round(1 + (V.SecExp.buildings.weapManu.productivity + V.SecExp.buildings.weapManu.lab) / 2 + (V.SecExp.buildings.weapManu.menials / 100));
			if (V.SecExp.buildings.weapManu.sellTo.citizen === 1) {
				if (V.SecExp.edicts.weaponsLaw === 3) {
					r.push(`Your lax regulations regarding weapons allows your citizens to buy much of what you are capable of producing.`);
					income += Math.round((V.ACitizens * 0.1) * price * factoryMod);
				} else if (V.SecExp.edicts.weaponsLaw >= 1) {
					r.push(`Your policies allow your citizen to buy your weaponry and they buy much of what you are capable of producing.`);
					income += Math.round(((V.ACitizens * 0.1) * price * factoryMod) / (3 - V.SecExp.edicts.weaponsLaw));
				} else {
					r.push(`Your policies do allow your citizen to buy weaponry, meaning all your income will come from exports.`);
				}
			}
			if (V.SecExp.buildings.weapManu.sellTo.raiders === 1) {
				r.push(`Some weapons are sold to the various raider gangs infesting the wastelands.`);
				income += Math.round(V.week / 3 * (price / 2) * 10 * factoryMod);
			}
			if (V.SecExp.buildings.weapManu.sellTo.oldWorld === 1) {
				r.push(`Part of our production is sold to some old world nations.`);
				income += Math.round(V.week / 3 * price * 10 * factoryMod);
			}
			if (V.SecExp.buildings.weapManu.sellTo.FC === 1) {
				r.push(`A share of our weapons production is sold to other Free Cities.`);
				income += Math.round(V.week / 3 * price * 10 * factoryMod);
			}
			if (V.peacekeepers !== 0 && V.peacekeepers.strength >= 50) {
				r.push(`The peacekeeping force is always in need of new armaments and is happy to be supplied by their ally.`);
				income += Math.round(V.peacekeepers.strength * price * 10 * factoryMod);
			}
			income = Math.trunc(income * 0.5);
			r.push(`This week we made <span class="yellowgreen">${cashFormat(income)}.</span>`);
			if (!Number.isInteger(income)) {
				r.push(App.UI.DOM.makeElement("div", `Error failed to calculate income`, "red"));
			} else {
				cashX(income, "personalBusiness");
			}
			App.Events.addParagraph(el, r);
		}

		if (V.SecExp.edicts.taxTrade === 1) {
			const tradeTax = Math.ceil(V.SecExp.core.trade * random(80, 120));
			App.Events.addNode(
				el,
				[
					`Fees on transitioning goods this week made`,
					App.UI.DOM.makeElement("span", `${cashFormat(tradeTax)}.`, "yellowgreen")
				],
				"div"
			);
			cashX(Math.ceil(tradeTax), "personalBusiness");
		}
	}
	r = [];
	r.push(`Routine upkeep of your demesne costs <span class="yellow">${cashFormat(V.costs)}.</span>`);
	if (V.plot === 1) {
		if (V.week > 10) {
			if (V.weatherToday.severity - V.weatherCladding > 2) {
				V.weatherAwareness = 1;
				let weatherRepairCost;
				if (V.weatherCladding === 1) {
					weatherRepairCost = Math.trunc(((V.weatherToday.severity - 3) * (V.arcologies[0].prosperity * random(50, 100))) + random(1, 100));
					IncreasePCSkills('engineering', 0.1);
					r.push(`${V.arcologies[0].name}'s hardened exterior only partially resisted the extreme weather this week, and it requires repairs costing ${cashFormat(weatherRepairCost)}. Your citizens are grateful to you for upgrading ${V.arcologies[0].name} to provide a safe haven from the terrible climate.`);
					repX(500, "architecture");
				} else if (V.weatherCladding === 2) {
					weatherRepairCost = Math.trunc(((V.weatherToday.severity - 4) * (V.arcologies[0].prosperity * random(50, 100))) + random(1, 100));
					IncreasePCSkills('engineering', 0.1);
					r.push(`${V.arcologies[0].name}'s hardened exterior only partially resisted the extreme weather this week, and it requires repairs costing ${cashFormat(weatherRepairCost)}. Your citizens are grateful to you for upgrading ${V.arcologies[0].name} to provide a safe haven from the terrible climate.`);
					repX(500, "architecture");
				} else {
					weatherRepairCost = Math.trunc(((V.weatherToday.severity - 2) * (V.arcologies[0].prosperity * random(50, 100))) + random(1, 100));
					IncreasePCSkills('engineering', 0.1);
					r.push(`Severe weather damaged the arcology this week, requiring repairs costing ${cashFormat(weatherRepairCost)}. Your citizens are unhappy that the arcology has proven vulnerable to the terrible climate.`);
					repX(-50, "architecture");
				}
				if (V.cash > 0) {
					cashX(forceNeg(Math.trunc(weatherRepairCost)), "weather");
				} else if (V.arcologies[0].FSRestartDecoration === 100) {
					r.push(`Since you lack the resources to effect prompt repairs yourself, the Societal Elite cover for you. The arcology's prosperity is is damaged, but your public reputation is left intact.`);
					if (V.eugenicsFullControl !== 1) {
						r.push(`The Societal Elite <span class="red">are troubled by your failure.</span>`);
						V.failedElite += 100;
					}
					if (V.arcologies[0].prosperity > 50) {
						V.arcologies[0].prosperity -= random(5, 10);
						IncreasePCSkills('engineering', 0.1);
					}
					cashX(forceNeg(Math.trunc(weatherRepairCost / 4)), "weather");
				} else {
					r.push(`Since you lack the resources to effect prompt repairs yourself, prominent citizens step in to repair their own parts of the arcology. This is terrible for your reputation, and it also severely reduces the arcology's prosperity.`);
					if (V.arcologies[0].prosperity > 50) {
						V.arcologies[0].prosperity -= random(5, 10);
						IncreasePCSkills('engineering', 0.1);
					}
					repX((Math.trunc(V.rep * 0.9)) - V.rep, "weather");
					r.push(`${IncreasePCSkills('engineering', 0.1)}`);
					cashX(forceNeg(Math.trunc(weatherRepairCost / 4)), "weather");
				}
			} else if (V.weatherToday.severity - V.weatherCladding <= 2) {
				if (V.weatherToday.severity > 2) {
					V.weatherAwareness = 1;
					r.push(`The arcology's hardened exterior resisted severe weather this week. Your citizens are <span class="green">grateful</span> to you for maintaining the arcology as a safe haven from the terrible climate.`);
					repX(500, "architecture");
				}
			}
		}
	}
	V.costs = Math.trunc(Math.abs(calculateCosts.bill()) * 100) / 100;
	/* overwrite the prediction and actually pay the bill. GetCost should return a negative. Round to two decimal places.*/
	if (isNaN(V.costs)) {
		r.push(App.UI.DOM.makeElement("div", `Error, costs is NaN`, "red"));
	}
	App.Events.addParagraph(el, r);

	/* Adding random changes to slave demand and supply*/
	endWeekSlaveMarket();
	r = [];
	if (V.menialDemandFactor <= -35000) {
		r.push(`Demand for slaves is approaching a <span class="red bold">historic low,</span> forecasts predict`);
		if (V.deltaDemand > 0) {
			r.push(`the market will turn soon and <span class="green bold">demand will rise.</span>`);
		} else if (V.deltaDemand < 0) {
			r.push(`<span class="red bold">demand will continue to weaken,</span> but warn the bottom is in sight.`);
		} else {
			r.push(`the current demand will <span class="yellow bold">stabilize.</span>`);
		}
	} else if (V.menialDemandFactor <= -20000) {
		r.push(`Demand for slaves is <span class="red bold">very low,</span> forecasts predict`);
		if (V.deltaDemand > 0) {
			r.push(`the market will turn soon and <span class="green bold">demand will rise.</span>`);
		} else if (V.deltaDemand < 0) {
			r.push(`<span class="red bold">demand will continue to weaken.</span>`);
		} else {
			r.push(`the current demand will <span class="yellow bold">stabilize.</span>`);
		}
	} else if (V.menialDemandFactor >= 35000) {
		r.push(`Demand for slaves is approaching a <span class="green bold">historic high,</span> forecasts predict`);
		if (V.deltaDemand > 0) {
			r.push(`<span class="green bold">demand will continue to rise,</span> but warn the peak is in sight.`);
		} else if (V.deltaDemand < 0) {
			r.push(`the market will turn soon and <span class="red bold">demand will weaken.</span>`);
		} else {
			r.push(`the current demand will <span class="yellow bold">stabilize.</span>`);
		}
	} else if (V.menialDemandFactor >= 20000) {
		r.push(`Demand for slaves is <span class="green bold">very high,</span> forecasts predict`);
		if (V.deltaDemand > 0) {
			r.push(`<span class="green bold">demand will continue to rise.</span>`);
		} else if (V.deltaDemand < 0) {
			r.push(`the market will turn soon and <span class="red bold">demand will weaken.</span>`);
		} else {
			r.push(`the current demand will <span class="yellow bold">stabilize.</span>`);
		}
	} else {
		r.push(`Demand for slaves is <span class="yellow bold">average,</span> forecasts predict`);
		if (V.deltaDemand > 0) {
			r.push(`the market will see <span class="green bold">rising demand.</span>`);
		} else if (V.deltaDemand < 0) {
			r.push(`the market will see <span class="red bold">weakening demand.</span>`);
		} else {
			r.push(`it will <span class="yellow bold">remain stable</span> for the coming months.`);
		}
	}
	App.Events.addParagraph(el, r);
	r = [];
	if (V.menialSupplyFactor <= -35000) {
		r.push(`Supply of slaves is approaching a <span class="green bold">historic low,</span> forecasts predict`);
		if (V.deltaSupply > 0) {
			r.push(`the market will turn soon and <span class="red bold">supply will rise.</span>`);
		} else if (V.deltaSupply < 0) {
			r.push(`<span class="green bold">supply will continue to weaken,</span> but warn the bottom is in sight.`);
		} else {
			r.push(`the current supply will <span class="yellow bold">stabilize.</span>`);
		}
	} else if (V.menialSupplyFactor <= -20000) {
		r.push(`Supply for slaves is <span class="green bold">very low,</span> forecasts predict`);
		if (V.deltaSupply > 0) {
			r.push(`the market will turn soon and <span class="red bold">supply will rise.</span>`);
		} else if (V.deltaSupply < 0) {
			r.push(`<span class="green bold">supply will continue to weaken.</span>`);
		} else {
			r.push(`the current supply will <span class="yellow bold">stabilize.</span>`);
		}
	} else if (V.menialSupplyFactor >= 35000) {
		r.push(`Supply for slaves is approaching a <span class="red bold">historic high,</span> forecasts predict`);
		if (V.deltaSupply > 0) {
			r.push(`<span class="red bold">supply will continue to rise,</span> but warn the peak is in sight.`);
		} else if (V.deltaSupply < 0) {
			r.push(`the market will turn soon and <span class="green bold">supply will weaken.</span>`);
		} else {
			r.push(`the current supply will <span class="yellow bold">stabilize.</span>`);
		}
	} else if (V.menialSupplyFactor >= 20000) {
		r.push(`Supply for slaves is <span class="red bold">very high,</span> forecasts predict`);
		if (V.deltaSupply > 0) {
			r.push(`<span class="red bold">supply will continue to rise.</span>`);
		} else if (V.deltaSupply < 0) {
			r.push(`the market will turn soon and <span class="green bold">supply will weaken.</span>`);
		} else {
			r.push(`the current supply will <span class="yellow bold">stabilize.</span>`);
		}
	} else {
		r.push(`Supply for slaves is <span class="yellow bold">average,</span> forecasts predict`);
		if (V.deltaSupply > 0) {
			r.push(`the market will see <span class="red bold">rising supply.</span>`);
		} else if (V.deltaSupply < 0) {
			r.push(`the market will see <span class="green bold">weakening supply.</span>`);
		} else {
			r.push(`it will <span class="yellow bold">remain stable</span> for the coming months.`);
		}
	}
	App.Events.addParagraph(el, r);
	r = [];

	/* Menial and regular slave markets are part of the same market, e.a. if (menial)slave supply goes up, all slave prices fall.
	The RomanFS may need further tweaking (it probably got weaker). Could increase the slave supply cap if this FS is chosen to fix. */

	V.slaveCostFactor = menialSlaveCost() / 1000;
	if (V.arcologies[0].FSRomanRevivalist > random(1, 150)) {
		if (V.slaveCostFactor > 0.8) {
			r.push(`<span class="yellow">Your Roman Revivalism is having an effect on the slave market and has driven local prices down</span> by convincing slave traders that this is a staunchly pro-slavery area.`);
			V.menialSupplyFactor += 2000;
		} else {
			r.push(`<span class="yellow">Your Roman Revivalism is having an effect on the slave market and is holding local prices down</span> by convincing slave traders that this is a staunchly pro-slavery area.`);
		}
		App.Events.addParagraph(el, r);
		r = [];
	}

	if (V.difficultySwitch === 1) {
		if (V.econWeatherDamage > 0) {
			const repairSeed = random(1, 3);
			if (V.disasterResponse === 0) {
				if (repairSeed === 3) {
					V.econWeatherDamage -= 1;
					V.localEcon += 1;
				}
			} else if (V.disasterResponse === 1) {
				if (repairSeed > 1) {
					V.econWeatherDamage -= 1;
					V.localEcon += 1;
				}
			} else {
				if (repairSeed === 3) {
					if (V.econWeatherDamage > 1) {
						V.econWeatherDamage -= 2;
						V.localEcon += 2;
					} else {
						V.econWeatherDamage -= 1;
						V.localEcon += 1;
					}
				} else {
					V.econWeatherDamage -= 1;
					V.localEcon += 1;
				}
			}
		}
		if (V.terrain !== "oceanic") {
			if (V.weatherToday.severity === 3) {
				V.localEcon -= 1;
				V.econWeatherDamage += 1;
				r.push(`This week's terrible weather did a number on the region, <span class="red">hurting the local economy.</span>`);
				if (V.disasterResponse === 0) {
					r.push(App.UI.DOM.makeElement("span", `Investing in a disaster response unit will speed up recovery`, "note"));
				}
			} else if (V.weatherToday.severity > 3) {
				V.localEcon -= 3;
				V.econWeatherDamage += 3;
				r.push(`This week's extreme weather ravaged the region, <span class="red">the local economy is seriously disrupted.</span>`);
				if (V.disasterResponse === 0) {
					r.push(App.UI.DOM.makeElement("span", `Investing in a disaster response unit will speed up recovery`, "note"));
				}
			}
		}
	}
	App.Events.addParagraph(el, r);

	if (V.SF.Toggle && V.SF.Active >= 1) {
		el.append(App.SF.AAR()[0]);
	}
	return el;
};

repo_name: Banyanael/fc

license: mit


code:
/**
 * @returns {HTMLElement}
 */
App.EndWeek.personalNotes = function() {
	const el = document.createElement("p");
	let r = [];
	let milk;
	let milkSale;
	if (V.useTabs === 0) {
		App.UI.DOM.appendNewElement("h2", el, `Personal Notes`);
	}
	if (V.playerAging !== 0) {
		let birthday = `Your birthday is `;
		if (V.PC.birthWeek === 51) {
			birthday += `next week`;
			if (V.playerAging === 2) {
				birthday += `; you'll be turning ${V.PC.actualAge + 1}`;
			}
		} else {
			birthday += `in ${52 - V.PC.birthWeek} weeks`;
		}
		birthday += `.`;
		r.push(birthday);
	}
	r.push(App.Desc.Player.pNotesBoobs());
	r.push(App.Desc.Player.pNotesBelly());
	r.push(App.Desc.Player.pNotesCrotch());
	r.push(App.Desc.Player.pNotesButt());
	if (V.PC.lactation > 0) {
		if (V.PC.rules.lactation !== "none" && V.PC.rules.lactation !== "induce") {
			V.PC.lactationDuration = 2;
			if (V.PC.rules.lactation === "sell") {
				/* watch this be a disaster */
				milk = milkAmount(V.PC);
				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 the ${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>`);
				}
				cashX(milkSale, "personalBusiness");
			} else {
				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.`);
			}
		} else {
			if (V.PC.belly < 1500) {
				V.PC.lactationDuration--;
				if (V.PC.lactationDuration === 0) {
					r.push(`With no reason to continue production, your <span class="yellow">lactation has stopped.</span>`);
					V.PC.lactation = 0;
				}
			}
		}
	}
	if (V.PC.preg > 0) {
		const oldCount = V.PC.pregType;
		if (V.PC.preg <= 2) {
			fetalSplit(V.PC, 1000);
			WombCleanYYFetuses(V.PC);
		}
		if (V.pregnancyMonitoringUpgrade === 1) {
			if (oldCount < V.PC.pregType) {
				r.push(`While making use of the advanced pregnancy monitoring equipment, you are surprised to find <span class="lime">your womb is a little more occupied than last checkup.</span>`);
			} else if (oldCount > V.PC.pregType) {
				r.push(`While making use of the advanced pregnancy monitoring equipment, you are surprised to find <span class="orange">your womb houses less life than last checkup.</span>`);
				if (V.PC.pregType === 0) {
					r.push(`For all intents and purposes, <span class="yellow">you are no longer pregnant.</span>`);
					TerminatePregnancy(V.PC);
				}
			}
		} else if (oldCount > V.PC.pregType && V.PC.pregType === 0) {
			TerminatePregnancy(V.PC);
		}
		if (V.PC.preg === 15) {
			if (V.PC.pregKnown === 0) {
				r.push(`Your areolae have gotten dark. Some cursory tests reveal <span class="lime">you are about fifteen weeks pregnant.</span> How did that manage to slip past you?`);
				V.PC.pregKnown = 1;
			} else {
				r.push(`Your areolae have gotten dark. Just another step along your pregnancy.`);
			}
		} else if (V.PC.belly >= 1500) {
			if ((V.PC.preg > 20) && (V.PC.lactation === 0)) {
				if (V.PC.preg > random(18, 30)) {
					r.push(`A moist sensation on your breasts draws your attention; <span class="lime">your milk has come in.</span>`);
					V.PC.lactation = 1;
				}
			}
			if (V.PC.lactation === 1) {
				V.PC.lactationDuration = 2;
			}
		}
		if (V.PC.preg >= V.PC.pregData.normalBirth / 4) {
			const gigantomastiaMod = V.PC.geneticQuirks.gigantomastia === 2 ? (V.PC.geneticQuirks.macromastia === 2 ? 3 : 2) : 1; // TODO: 'gigantomastiaMod' is assigned a value but never used
			/* trim this down */
			let boobTarget;
			if (V.PC.geneMods.NCS === 1) {
				boobTarget = 100;
			} else if (V.PC.geneticQuirks.androgyny === 2) {
				boobTarget = 400;
			} else if (V.PC.physicalAge >= 18) {
				if (V.PC.pregType >= 8) {
					boobTarget = 1500;
					/* 2000 */
				} else if (V.PC.pregType >= 5) {
					boobTarget = 1400;
				} else if (V.PC.pregType >= 2) {
					boobTarget = 1000;
				} else {
					boobTarget = 800;
				}
			} else if (V.PC.physicalAge >= 13) {
				if (V.PC.pregType >= 8) {
					boobTarget = 1500;
					/* 1800 */
				} else if (V.PC.pregType >= 5) {
					boobTarget = 1400;
				} else if (V.PC.pregType >= 2) {
					boobTarget = 1000;
				} else {
					boobTarget = 800;
				}
			} else if (V.PC.physicalAge >= 8) {
				if (V.PC.pregType >= 8) {
					boobTarget = 1400;
				} else if (V.PC.pregType >= 5) {
					boobTarget = 1000;
				} else if (V.PC.pregType >= 2) {
					boobTarget = 800;
				} else {
					boobTarget = 600;
				}
			} else {
				if (V.PC.pregType >= 8) {
					boobTarget = 1000;
				} else if (V.PC.pregType >= 5) {
					boobTarget = 8000;
				} else if (V.PC.pregType >= 2) {
					boobTarget = 600;
				} else {
					boobTarget = 400;
				}
			}
			/* boobTarget *= gigantomastiaMod;*/
			if (V.PC.geneMods.NCS === 0) {
				/*
				if (V.PC.pregType >= 30) {
					if (V.PC.weight <= 65) {
						r.push(`${He} has <span class="lime">gained weight</span> in order to better sustain ${himself} and ${his} children.`);
						V.PC.weight += 1;
					}
					if (random(1,100) > 60) {
						if ((V.PC.boobs - V.PC.boobsImplant) < boobTarget) {
							r.push(`${His} breasts <span class="lime">greatly swell</span> to meet the upcoming demand.`);
							V.PC.boobs += 100;
							if (V.PC.boobShape !== "saggy" && V.PC.preg > V.PC.pregData.normalBirth/1.25 && (V.PC.boobsImplant / V.PC.boobs < 0.5) && (V.PC.breastMesh !== 1) && (V.PC.drugs !== "sag-B-gone")) {
								r.push(`${His} immensely engorged <span class="orange">breasts become saggy</span> in the last stages of ${his} pregnancy as ${his} body undergoes changes in anticipation of the forthcoming birth.`);
								V.PC.boobShape = "saggy";
							}
						}
						if (V.PC.geneticQuirks.androgyny !== 2) {
							if (V.PC.hips < 2) {
								r.push(`${His} hips <span class="lime">widen</span> for ${his} upcoming birth.`);
								V.PC.hips += 1;
							}
							if (V.PC.butt < 14) {
								r.push(`${His} butt <span class="lime">swells with added fat</span> from ${his} changing body.`);
								V.PC.butt += 1;
							}
						}
					}
				} else if (V.PC.pregType >= 10) {
					if (random(1,100) > 80 && ((V.PC.boobs - V.PC.boobsImplant) < boobTarget)) {
						V.PC.boobs += 50;
						if (V.PC.boobShape !== "saggy" && (V.PC.breastMesh !== 1) && (V.PC.drugs !== "sag-B-gone") && (V.PC.boobsImplant / V.PC.boobs < 0.5)) {
							if (V.PC.preg > random(V.PC.pregData.normalBirth/1.25, V.PC.pregData.normalBirth*2.05)) {
								r.push(`${His} swollen <span class="orange">breasts become saggy</span> in the last stages of ${his} pregnancy as ${his} body undergoes changes in anticipation of the forthcoming birth.`);
								V.PC.boobShape = "saggy";
							}
						}
					}
				}
				*/
				if ((V.PC.boobs - V.PC.boobsImplant) < boobTarget) {
					if (V.PC.boobs >= 1400) {
						if (random(1, 100) > 90) {
							r.push(`Unsurprisingly, your cow tits <span class="lime">have swollen even larger</span> with your pregnancy.`);
							V.PC.boobs += 25;
						}
					} else if (V.PC.boobs >= 1200) {
						if (random(1, 100) > 90) {
							r.push(`Your already huge breasts have <span class="lime">grown even heavier</span> with your pregnancy.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 1400) {
								r.push(`Your desk is steadily starting to disappear; <span class="lime">H-cups will do that.</span>`);
							}
						}
					} else if (V.PC.boobs >= 1000) {
						if (random(1, 100) > 75) {
							r.push(`Your already large breasts have <span class="lime">grown even larger</span> with your pregnancy.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 1200) {
								r.push(`Nothing fits comfortably now; your tailor says <span class="lime">it's your G-cup knockers.</span> Your back agrees.`);
							}
						}
					} else if (V.PC.boobs >= 800) {
						if (random(1, 100) > 75) {
							r.push(`Your breasts have <span class="lime">grown a bit larger</span> to feed your coming ${(V.PC.pregType === 1) ? `child` : `children`}.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 1000) {
								r.push(`You popped your bra when you put it on; <span class="lime">time to order some F-cups.</span>`);
							}
						}
					} else if (V.PC.boobs >= 650) {
						if (random(1, 100) > 80) {
							r.push(`Your breasts have <span class="lime">grown a bit larger</span> to feed your coming ${(V.PC.pregType === 1) ? `child` : `children`}.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 800) {
								r.push(`Their prominence, and a quick measuring, reveals <span class="lime">you now sport DDs.</span>`);
							}
						}
					} else if (V.PC.boobs >= 500) {
						if (random(1, 100) > 80) {
							r.push(`Your breasts have <span class="lime">grown a bit larger</span> to feed your coming ${(V.PC.pregType === 1) ? `child` : `children`}.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 650) {
								r.push(`They're big, sensitive, <span class="lime">and now a D-cup.</span>`);
							}
						}
					} else if (V.PC.boobs >= 400) {
						if (random(1, 100) > 80) {
							r.push(`Your breasts have <span class="lime">gotten heavier</span> alongside your pregnancy.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 500) {
								r.push(`They spill dramatically out of your bra now, which means <span class="lime">you've graduated to a C-cup.</span>`);
							}
						}
					} else if (V.PC.boobs >= 300) {
						if (random(1, 100) > 75) {
							r.push(`Your breasts have <span class="lime">swollen</span> alongside your pregnancy.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 400) {
								r.push(`A quick measuring after your top started to feel too constricting reveals <span class="lime">you are now a B-cup!</span>`);
							}
						}
					} else {
						if (random(1, 100) > 75) {
							r.push(`Your chest <span class="lime">has filled out slightly</span> with your pregnancy.`);
							V.PC.boobs += 25;
							if (V.PC.boobs >= 300) {
								r.push(`They've gotten so big that <span class="lime">you can now fill an A-cup bra.</span>`);
							}
						}
					}
					if (V.PC.boobShape !== "saggy" && V.PC.preg > random(V.PC.pregData.normalBirth / 1.25, V.PC.pregData.normalBirth * 2.5) && (V.PC.boobsImplant / V.PC.boobs < 0.5) && (V.PC.breastMesh !== 1) && (V.PC.drugs !== "sag-B-gone")) {
						r.push(`Your <span class="orange">breasts become saggy</span> in the last stages of pregnancy as your body undergoes changes in anticipation of the forthcoming birth.`);
						V.PC.boobShape = "saggy";
					}
				}
				/*
				if (V.PC.preg > V.PC.pregData.normalBirth/1.25 && V.PC.physicalAge >= 18 && V.PC.hips === 1 && V.PC.hipsImplant === 0 && random(1,100) > 90) {
					r.push(`${His} hips <span class="lime">widen</span> to better support ${his} gravidity.`);
					V.PC.hips += 1;
				} else if (V.PC.preg > V.PC.pregData.normalBirth/1.42 && V.PC.physicalAge >= 18 && V.PC.hips === 0 && V.PC.hipsImplant === 0 && random(1,100) > 70) {
					r.push(`${His} hips <span class="lime">widen</span> to better support ${his} gravidity.`);
					V.PC.hips += 1;
				}
				*/
			}
		}
		/* --------------- main labor triggers: -------- */
		if (V.PC.preg > V.PC.pregData.normalBirth / 8) {
			if (WombBirthReady(V.PC, V.PC.pregData.normalBirth * 1.075) > 0) { // check for really ready fetuses - 43 weeks - max, overdue
				V.PC.labor = 1;
			} else if (WombBirthReady(V.PC, V.PC.pregData.normalBirth) > 0 && (random(1, 100) > 50)) { // check for really ready fetuses - 40 weeks - normal*/
				V.PC.labor = 1;
			} else if (WombBirthReady(V.PC, V.PC.pregData.normalBirth / 1.1111) > 0 && (random(1, 100) > 90)) { // check for really ready fetuses - 36 weeks minimum */
				V.PC.labor = 1;
			}
			if (V.PC.labor === 1) {
				App.Events.addParagraph(el, r);
				r = [];
				if (V.PC.counter.birthsTotal > 0) {
					r.push(App.UI.DOM.makeElement("span", `A dull cramp runs down your middle.`, "red"));
					r.push(`You'll be giving birth soon.`);
				} else {
					r.push(`You begin to experience`);
					r.push(App.UI.DOM.makeElement("span", `odd cramps`, "red"));
					r.push(`in your lower body. Contractions, more than likely.`);
				}
				App.Events.addNode(el, r, "div");
				r = [];
			}
			/*
			if (V.dangerousPregnancy === 1 && V.PC.labor !== 1) {
				if (V.PC.pregAdaptation < 500) {
					miscarriageChance = -10;
					miscarriageChance += ((V.PC.bellyPreg / 1000) - V.PC.pregAdaptation);
					// this could use to not be linear
					if (V.PC.inflation > 0) {
						miscarriageChance += 10;
					}
					miscarriageChance -= (V.PC.curatives === 1 ? 100 : 0);
					if (V.PC.health.health < -20) {
						miscarriageChance -= (V.PC.health.health);
					} else if (V.PC.health.health > 80) {
						miscarriageChance -= (V.PC.health.health / 10);
					}
					if (V.PC.weight < -50) {
						miscarriageChance -= (V.PC.weight);
					}
					if (V.PC.bellyAccessory === "a support band") {
						miscarriageChance -= 30;
					}
					miscarriageChance = Math.round(miscarriageChance);
					if (miscarriageChance > random(0, 100)) {
						chance = random(1, 100);
						if (V.PC.preg >= V.PC.pregData.normalBirth / 1.33) {
							V.PC.labor = 1;
							miscarriage = 1;
						} else if (V.PC.preg > V.PC.pregData.normalBirth / 1.48) {
							V.PC.labor = 1, V.PC.prematureBirth = 1;
							miscarriage = 1;
						} else if (V.PC.preg > V.PC.pregData.normalBirth / 1.6 && chance > 10) {
							V.PC.labor = 1, V.PC.prematureBirth = 1;
							miscarriage = 1;
						} else if (V.PC.preg > V.PC.pregData.normalBirth / 1.73 && chance > 40) {
							V.PC.labor = 1, V.PC.prematureBirth = 1;
							miscarriage = 1;
						} else if (V.PC.preg > V.PC.pregData.normalBirth / 1.81 && chance > 75) {
							V.PC.labor = 1, V.PC.prematureBirth = 1;
							miscarriage = 1;
						} else {
							r.push(`${His} overwhelmed body has <span class="orange">forced ${him} to miscarry,</span> possibly saving ${his} life.`);
							V.PC.preg = 0;
							if (V.PC.sexualFlaw === "breeder") {
								r.push(`${He} is <span class="mediumorchid">filled with violent, all-consuming hatred</span> at ${himself} for failing to carry to term and you for allowing this to happen.`);
								if (V.PC.pregType > 4) {
									r.push(`The loss of so many children at once <span class="red">shatters the distraught breeder's mind.</span>`);
									V.PC.fetish = "mindbroken", V.PC.behavioralQuirk = "none", V.PC.behavioralFlaw = "none", V.PC.sexualQuirk = "none", V.PC.sexualFlaw = "none", V.PC.devotion = 0, V.PC.trust = 0;
								} else {
									r.push(`${He} cares little for what punishment awaits ${his} actions.`);
									V.PC.devotion -= 25 * V.PC.pregType;
								}
							} else if (V.PC.devotion < -50) {
								r.push(`${He} is <span class="mediumorchid">filled with violent, consuming hatred</span> and <span class="gold">fear.</span> Even though ${he} knew ${his} bab`);
								if (V.PC.pregType > 1) {
									r.push(`ies were`);
								} else {
									r.push(`y was`);
								}
								r.push(` likely destined for a slave orphanage, it seems ${he} cared for `);
								if (V.PC.pregType > 1) {
									r.push(`them`);
								} else {
									r.push(`it`);
								}
								r.push(` and blames you for the loss.`);
								V.PC.devotion -= 25, V.PC.trust -= 25;
							} else if (V.PC.devotion < -20) {
								r.push(`${He} is <span class="mediumorchid">afflicted by desperate, inconsolable grief</span> and <span class="gold">horror.</span> Even though ${he} knew ${his} bab`);
								if (V.PC.pregType > 1) {
									r.push(`ies were`);
								} else {
									r.push(`y was`);
								}
								r.push(` likely destined for a slave orphanage, it seems ${he} cared for `);
								if (V.PC.pregType > 1) {
									r.push(`them`);
								} else {
									r.push(`it`);
								}
								r.push(`.`);
								V.PC.devotion -= 10, V.PC.trust -= 20;
							} else if (V.PC.fetish === "pregnancy") {
								r.push(`${He} is <span class="mediumorchid">filled with deep regret</span> and <span class="gold">fear.</span>`);
								if (V.PC.fetishKnown === 1) {
									r.push(`To a pregnancy fetishist, ending it like this hurts far worse than birth ever would.`);
								} else {
									r.push(`It appears ${he} was more attached to ${his} baby bump than ${he} let on and is hurting even more for it.`);
								}
								fetishModifier = V.PC.fetishStrength / 2;
								V.PC.devotion -= 1 * fetishModifier, V.PC.trust -= 1 * fetishModifier;
							} else if (V.PC.devotion <= 20) {
								r.push(`${He} is <span class="mediumorchid">consumed by enduring sorrow</span> and <span class="gold">horror.</span> Even though ${he} knew ${his} bab`);
								if (V.PC.pregType > 1) {
									r.push(`ies were`);
								} else {
									r.push(`y was`);
								}
								r.push(` likely destined for a slave orphanage, it seems ${he} cared for `);
								if (V.PC.pregType > 1) {
									r.push(`them`);
								} else {
									r.push(`it`);
								}
								r.push(`.`);
								V.PC.devotion -= 5, V.PC.trust -= 5;
							} else if (V.PC.devotion <= 50) {
								r.push(`${He} is dully obedient. ${He} has been broken to slave life so thoroughly that even this is neither surprising nor affecting.`);
							} else {
								r.push(`${He} is <span class="mediumorchid">disappointed by this development</span> and <span class="gold">afraid</span> of your reaction. By failing to carry to term, ${he} has failed your will.`);
								V.PC.devotion -= 10, V.PC.trust -= 10;
							}
							TerminatePregnancy(V.PC);
							actX(V.PC, "abortions");
							if (V.PC.abortionTat > -1) {
								V.PC.abortionTat++;
								r.push(`The temporary tattoo of a child has been replaced with ${his} `);
								V.ordinalSuffix(V.PC.abortionTat)
								r.push(` crossed out infant.`);
								cashX(forceNeg(V.modCost), "slaveMod", V.PC);
							}
							miscarriage = 1;
						}
					}
				}
				if (V.seeExtreme === 1) {
					if (miscarriage !== 1 && V.PC.bellyPreg >= 100000 && V.PC.geneMods.rapidCellGrowth !== 1) {
						// If he can't relieve the pressure that way, will he hold?
						if (V.PC.bellyPreg >= 500000 || V.PC.wombImplant !== "restraint") {
							if ((V.PC.belly > (V.PC.pregAdaptation * 3200)) || V.PC.bellyPreg >= 500000) {
								burstChance = -80;
								burstChance += ((V.PC.belly / 1000) - V.PC.pregAdaptation);
								// this could use to not be linear
								if (V.PC.health.health < -20) {
									burstChance -= (V.PC.health.health);
								} else if (V.PC.health.health > 80) {
									burstChance -= (V.PC.health.health / 10);
								}
								if (V.PC.weight < 0) {
									burstChance -= V.PC.weight;
								}
								burstChance -= V.PC.bellySag;
								burstChance -= V.PC.muscles;
								if (V.PC.bellyAccessory === "a support band") {
									burstChance -= 10;
								}
								if (V.PC.pregControl === "slow gestation") {
									burstChance -= 20;
								}
								if (V.PC.assignment === "get treatment in the clinic") {
									if (S.Nurse) {
										burstChance -= 100;
									} else {
										burstChance -= 30;
									}
								} else if (V.PC.assignment === "work in the dairy" && V.dairyPregSetting === 3) {
									burstChance -= 250;
								}
								if (V.PC.pregControl === "speed up") {
									if (burstChance > 0) {
										burstChance *= 4;
									}
								}
								burstChance = Math.round(burstChance);
								if (burstChance > random(0, 100)) {
									V.PC.burst = 1;
								} else {
									r.push(`Constant <span class="red">`);
									if (V.PC.geneticQuirks.uterineHypersensitivity === 2) {
										r.push(`painful orgasms`);
									} else {
										r.push(`sharp pains`);
									}
									r.push(`</span> from ${his} womb strongly suggest <span class="red">${his} body is beginning to break.</span>`);
								}
							}
						}
					}
				}
			}
			*/
		}
	}
	App.Events.addParagraph(el, r);
	return el;
};