code:
App.Corporate.manage = function() {
	const wrapper = document.createElement("div");
	wrapper.append(structure());
	return wrapper;

	/**
	 * @returns {DocumentFragment}
	 */
	function structure() {
		const f = new DocumentFragment();

		if (App.Corporate.getStored("Incorporated") === 0) {
			f.append(foundingPage());
		} else {
			App.UI.DOM.appendNewElement("h1", f, "Corporation Overview");
			if (App.Corporate.getStored("Founded")) {
				App.UI.DOM.appendNewElement("div", f, `Founded on ${asDateString(App.Corporate.getStored("Founded"))}.`, "founding");
			}

			f.append(App.Corporate.writeLedger(App.Corporate.ledger.old, V.week - 1));

			f.append(divisionManagement());
			if (App.Corporate.getStored("ExpandToken") === 1) {
				// Is the corporation large enough to expand into another division?
				f.append(newDivision());
			}
			f.append(financials());
			f.append(specializations());
			f.append(dissolveLink());
		}

		return f;
	}

	function refresh() {
		App.UI.DOM.replace(wrapper, structure());
	}

	/**
	 * @returns {DocumentFragment}
	 */
	function foundingPage() {
		const el = new DocumentFragment();
		App.UI.DOM.appendNewElement("h1", el, "Incorporation");
		App.UI.DOM.appendNewElement("p", el, "Please consider that the market price of slaves has quite the impact on the profitability of your corporation. Focus on acquisition when prices are high, exploitation if prices are low. Slave improvement is a safe choice either way. Also note the option for a 8 - 7 share split instead of the vanilla 2 - 1, this makes the initial investment cheaper but leaves you with relatively less shares.", "intro");

		const divisionsByFoundingCost = App.Corporate.divisionList.concat().sort(function(a, b) { return a.founding.startingPrice - b.founding.startingPrice; });
		const optionsText = ["to found a slave corporation", "for most options", "for many options", "for some options", "for the final option"];

		// Picking a starting division
		let personalShares = 8000;
		let publicShares = 7000;
		if (V.vanillaShareSplit === 1) {
			personalShares = 2000;
			publicShares = 1000;
		}

		for (let i = 0; i < divisionsByFoundingCost.length; i++) {
			const division = divisionsByFoundingCost[i];
			const divisionCost = App.Corporate.foundingCostToPlayer(division, personalShares, publicShares);
			if (V.cash >= divisionCost) {
				if (i === 0) {
					App.UI.DOM.appendNewElement("div", el, `You can lay the groundwork for a slave corporation and choose to start out with:`);
				}
				addDiv(el,
					App.UI.DOM.link(division.name, () => {
						App.Corporate.create(division.id, personalShares, publicShares);
						refresh();
					}),
					" (",
					App.UI.DOM.makeElement("span", cashFormat(divisionCost), "cash"),
					"): Focuses on ", division.focusDescription, "."
				);
			} else {
				const r = [];
				r.push("You lack the funds");
				r.push(optionsText[App.Utils.mapIndexBetweenLists(i, divisionsByFoundingCost, optionsText)] + ".");
				r.push(`You need at least`);
				r.push(App.UI.DOM.makeElement("span", cashFormat(divisionCost), "cash"));

				if (i !== 0) {
					if (i < divisionsByFoundingCost.length - 1) {
						r.push(`for the next option and at most`);
						r.push(App.UI.DOM.makeElement("span",
							cashFormat(App.Corporate.foundingCostToPlayer(
								divisionsByFoundingCost[divisionsByFoundingCost.length - 1],
								personalShares, publicShares)),
							"cash"));
					} else {
						r.push(`for it.`);
					}
				}
				App.Events.addParagraph(el, r);
				break;
			}
		}

		const options = new App.UI.OptionsGroup().customRefresh(refresh);
		options.addOption("Share split", "vanillaShareSplit")
			.addValue("2-1", 1).addValue("8-7", 0);
		el.append(options.render());
		return el;
	}

	/**
	 * @returns {DocumentFragment}
	 */
	function divisionManagement() {
		const el = new DocumentFragment();
		App.UI.DOM.appendNewElement("h1", el, "Division Management");

		const tabBar = new App.UI.Tabs.TabBar("ManageDivisions");

		for (let division of App.Corporate.divisionList) {
			if (!division.founded) {
				continue;
			}
			const frag = new DocumentFragment();
			if (division.foundedDate !== 0) {
				App.UI.DOM.appendNewElement("div", frag, `Founded on ${asDateString(division.foundedDate)}.`, "founding");
			}

			App.UI.DOM.appendNewElement("div", frag, `This division focuses on ${division.focusDescription}.`);

			let div = document.createElement("div");
			$(div).append(division.messageSlaveCount());
			frag.append(div);

			let divMaint = division.getDisplayMaintenanceCost();
			addDiv(frag, "It costs ",
				App.UI.DOM.makeElement("span", cashFormat(Math.trunc(divMaint.cost)), ["cash", "dec"]),
				" to run. On average that is ",
				App.UI.DOM.makeElement("span", cashFormat(Math.trunc(divMaint.perUnit)), ["cash", "dec"]),
				" per slave.");

			div = document.createElement("div");
			$(div).append(division.messageSlaveOutput());
			frag.append(div);

			let divSentenceStart = ["Currently the division", "It also"];
			App.UI.DOM.appendNewElement("h3", frag, "Direct Control");

			if (division.fromMarket) {
				addDiv(frag, `${divSentenceStart.shift()} is ${division.slaveAction.present} `,
					App.UI.DOM.makeElement("span", numberWithPlural(division.activeSlaves, "slave"), "green"));

				if (division.activeSlaves < division.developmentCount) {
					let fillSlaveCount = division.availableRoom;
					addDiv(frag, `There is room to ${division.slaveAction.future} ${numberWithPluralOne(fillSlaveCount, "more slave")}.`);

					let buySlaveArray = [
						{'name': 'Buy Slave', 'count': 1},
						{'name': 'Buy x10', 'count': 10}
					];

					if (!buySlaveArray.some(function(x) { return x.count === fillSlaveCount; })) {
						buySlaveArray.push({'name': 'Fill', 'count': fillSlaveCount});
					}
					let singleSlaveCost = App.Corporate.slaveMarketPurchaseValue(division, 1);
					if (V.corp.Cash > singleSlaveCost) {
						addDiv(frag, `The corporation can purchase slaves directly from the market for about `,
							cashFormatColor(singleSlaveCost), ".");

						const links = [];

						for (const slaveNum of buySlaveArray.filter(num => division.availableRoom >= num.count)) {
							let slaveSetCost = App.Corporate.slaveMarketPurchaseValue(division, slaveNum.count);
							if (V.corp.Cash < slaveSetCost) {
								continue;
							}
							links.push(App.UI.DOM.link(slaveNum.name, () => {
								App.Corporate.buySlaves(division.id, slaveNum.count);
								refresh();
							}));
						}
						frag.append(App.UI.DOM.generateLinksStrip(links));
					} else {
						addDiv(frag, App.UI.DOM.makeElement("span", "The corporation cannot afford to purchase any slaves from the market.", "note"), " It requires about ",
							App.UI.DOM.makeElement("span", cashFormat(singleSlaveCost), "cash"), ` to buy a ${asSingular(division.slaveAction.market)}.`);
					}
				} else {
					addDiv(frag, "There is ", App.UI.DOM.makeElement("em", "no room"), ` to ${division.slaveAction.future} more slaves.`);
				}
			}
			if (division.toMarket) {
				let finishedSlaveNoun = division.nounFinishedSlave;
				if (division.heldSlaves > 0) {
					addDiv(frag, `${divSentenceStart.shift()} holds `,
						App.UI.DOM.makeElement("span", numberWithPlural(division.heldSlaves, finishedSlaveNoun), "green"),
						".");
					for (const nextDiv of division.relatedDivisions.to
						.filter(div => div.availableRoom > 0 &&
							!App.Corporate.ownsIntermediaryDivision(division, div))) {
						addDiv(frag, `The ${nextDiv.name} Division can accept up to `, App.UI.DOM.makeElement("span", numberWithPlural(nextDiv.availableRoom, "slave"), "green"), ".");

						let sendSlaveArray = [
							{'name': 'Send Slave', 'count': 1},
							{'name': 'Send x10', 'count': 10}
						];
						if (division.heldSlaves >= nextDiv.availableRoom) {
							sendSlaveArray.push({
								'name': `Fill ${nextDiv.name} Division`,
								'count': nextDiv.availableRoom
							});
						} else {
							sendSlaveArray.push({'name': 'Send All', 'count': division.heldSlaves});
						}
						const links = [];
						for (const slaveNum of sendSlaveArray.filter(slaveNum => slaveNum.count <= nextDiv.availableRoom && slaveNum.count <= division.heldSlaves)) {
							links.push(App.UI.DOM.link(slaveNum.name, () => {
								App.Corporate.transferSlaves(division.id, nextDiv.id, slaveNum.count);
								refresh();
							}));
						}
						frag.append(App.UI.DOM.generateLinksStrip(links));
					}

					App.UI.DOM.appendNewElement("div", frag, "The corporation can sell these slaves to the market.");

					let sellSlaveArray = [
						{'name': 'Sell Slave', 'count': 1},
						{'name': 'Sell x10', 'count': 10},
						{'name': 'Sell x100', 'count': 100},
						{'name': 'Sell All', 'count': division.heldSlaves}
					];

					const links = [];
					for (const slaveNum of sellSlaveArray.filter(slaveNum => division.heldSlaves >= slaveNum.count)) {
						links.push(App.UI.DOM.link(slaveNum.name, () => {
							App.Corporate.sellSlaves(division.id, slaveNum.count);
							refresh();
						}));
					}
					frag.append(App.UI.DOM.generateLinksStrip(links));
				} else {
					App.UI.DOM.appendNewElement("div", frag, `The division is not holding any ${asPlural(finishedSlaveNoun)}.`);
				}
			}

			// Division size
			const links = [];

			/* Expanding the division*/
			let depExpandCost = division.sizeCost * 1000;
			addDiv(frag, "Expanding the division costs ", App.UI.DOM.makeElement("span", `${cashFormat(depExpandCost)}.`, ["cash", "dec"]), " Downsizing recoups 80% of the investment; slaves will be sold at the going rate.");

			let buyDevArray = [
				{'name': 'Expand Division', 'count': 1},
				{'name': 'Expand x10', 'count': 10}
			];

			for (const buySet of buyDevArray.filter(buySet => App.Corporate.getStored("Cash") >= buySet.count * depExpandCost)) {
				links.push(App.UI.DOM.link(buySet.name, () => {
					App.Corporate.buyDevelopment(division.id, buySet.count);
					refresh();
				}));
			}

			/* Downsize the division*/
			const sellDevArray = [
				{'name': 'Downsize Division', 'count': 1},
				{'name': 'Downsize x10', 'count': 10}
			];

			for (const sellSet of sellDevArray.filter(divNum => division.developmentCount > divNum.count)) {
				links.push(App.UI.DOM.link(sellSet.name, () => {
					App.Corporate.sellDevelopment(division.id, sellSet.count);
					refresh();
				}));
			}

			frag.append(App.UI.DOM.generateLinksStrip(links));

			App.UI.DOM.appendNewElement("h3", frag, "Rules");

			const options = new App.UI.OptionsGroup().customRefresh(refresh);
			for (const nextDiv of division.relatedDivisions.to
				.filter(nextDiv => nextDiv.founded && !App.Corporate.ownsIntermediaryDivision(division, nextDiv))) {
				// TODO: Originally this had a bit of flavor per nextDep. ie, Surgery said "to undergo surgery"
				const o = {send: division.getAutoSendToDivision(nextDiv)};
				options.addOption(`Auto send slaves to ${nextDiv.name} Division`, "send", o)
					.addValue("Enabled", true, () => {
						App.Corporate.setAutoSendToDivision(division.id, nextDiv.id, true);
						refresh();
					}).on()
					.addValue("Disabled", false, () => {
						App.Corporate.setAutoSendToDivision(division.id, nextDiv.id, false);
						refresh();
					}).off();
			}

			if (division.toMarket) {
				const o = {send: division.getAutoSendToMarket()};
				options.addOption("Auto send to market", "send", o)
					.addValue("Enabled", true, () => {
						App.Corporate.setAutoSendToMarket(division.id, 1);
						refresh();
					}).on()
					.addValue("Disabled", false, () => {
						App.Corporate.setAutoSendToMarket(division.id, 0);
						refresh();
					}).off();
			}

			if (division.fromMarket) {
				const o = {buy: division.getAutoBuyFromMarket()};
				options.addOption("Auto buy slaves from the market", "buy", o)
					.addValue("Enabled", true, () => {
						App.Corporate.setAutoBuyFromMarket(division.id, 1);
						refresh();
					}).on()
					.addValue("Disabled", false, () => {
						App.Corporate.setAutoBuyFromMarket(division.id, 0);
						refresh();
					}).off();
			}
			frag.append(options.render());

			if (App.Corporate.getStored("Div") > 1) {
				// Cannot dissolve the last division
				addDiv(frag,
					App.UI.DOM.link("Dissolve Division", () => {
						if (Dialog.isOpen()) {
							Dialog.close();
						}

						Dialog.setup("Dissolve Division");
						const frag = new DocumentFragment();
						App.UI.DOM.appendNewElement("p", frag, "Dissolving the division will destroy all of its assets!", "note");
						App.UI.DOM.appendNewElement("p", frag, "This decision cannot be reverted!", ["warning", "note"]);
						frag.append(App.UI.DOM.link("Dissolve", () => {
							App.Corporate.divisions[division.id].dissolve();
							refresh();
							Dialog.close();
						}));
						$(Dialog.body()).empty().append(frag);
						Dialog.open();
					})
				);
			}
			tabBar.addTab(division.name, division.name.replace(/\s/g, ''), frag);
		}
		el.append(tabBar.render());
		return el;
	}

	/**
	 * @returns {DocumentFragment}
	 */
	function newDivision() {
		const el = new DocumentFragment();
		App.UI.DOM.appendNewElement("h1", el, "Found New Division");

		addDiv(el, `The corporation can expand by founding a new division related to its current ${onlyPlural(App.Corporate.divisionList.filter(div => div.founded).length, "division")}.`);

		for (const division of App.Corporate.divisionList.filter(x => !x.founded && x.relatedDivisions.anyFounded)) {
			const depCost = division.foundingCost * 1000;

			if (App.Corporate.getStored("Cash") >= depCost) {
				addDiv(el,
					App.UI.DOM.link("Add " + division.name + " Division", () => {
						App.Corporate.divisions[division.id].create(App.Corporate);
						refresh();
					}),
					" (",
					App.UI.DOM.makeElement("span", cashFormat(depCost), "cash"),
					`): A division focusing on ${division.focusDescription}.`);
			} else {
				addDiv(el, `${division.name} (`,
					App.UI.DOM.makeElement("span", cashFormat(depCost), ["cash", "dec"]),
					`): The corporation cannot afford to start a division focusing on ${division.focusDescription}.`);
			}
		}
		return el;
	}

	/**
	 * @returns {DocumentFragment}
	 */
	function financials() {
		const el = new DocumentFragment();

		App.UI.DOM.appendNewElement("h1", el, "Financials");
		App.UI.DOM.appendNewElement("h2", el, "Dividend");

		const div = document.createElement("div");
		let dividends = App.Corporate.dividendOptions;
		let index = dividends.findIndex(element => V.dividendRatio >= element);
		let dividend = dividends[index];
		if (index >= 0) {
			let nextIndex = index + 1;
			V.dividendRatio = dividend;/* Normalize */
			div.append(`The corporation is currently reserving ${Math.trunc(dividend * 100)}% of its profit to be paid out as dividends. `);
			const links = [];
			if (index > 0) {
				links.push(App.UI.DOM.link("Increase Ratio", () => {
					V.dividendRatio = dividends[index - 1];
					refresh();
				}));
			}
			if (nextIndex !== dividends.length) {
				links.push(App.UI.DOM.link("Reduce Ratio", () => {
					V.dividendRatio = dividends[nextIndex];
					refresh();
				}));
			} else {
				links.push(App.UI.DOM.link("None", () => {
					V.dividendRatio = 0;
					refresh();
				}));
			}
			div.append(App.UI.DOM.generateLinksStrip(links));
		} else {
			div.append(`The corporation is currently not reserving a portion of its profit to be paid out as dividends. `);
			div.append(App.UI.DOM.link("Increase Ratio", () => {
				V.dividendRatio = dividends[dividends.length - 1];
				refresh();
			}));
		}
		el.append(div);

		if (App.Corporate.getStored("CashDividend") === 1) {
			addDiv(el, "The corporation will payout unused cash reserves over ", App.UI.DOM.makeElement("span", cashFormat(App.Corporate.payoutAfterCash()), "yellowgreen"), " as dividends. ", App.UI.DOM.link("Stop", () => {
				App.Corporate.setStored("CashDividend", 0);
				refresh();
			}));
		} else {
			addDiv(el, "You can direct the corporation to reserve cash over ", App.UI.DOM.makeElement("span", cashFormat(App.Corporate.payoutAfterCash()), "yellowgreen"), " to be paid out as dividends as well. ", App.UI.DOM.link("Payout Cash Reserves", () => {
				App.Corporate.setStored("CashDividend", 1);
				refresh();
			}));
		}

		App.UI.DOM.appendNewElement("h2", el, "Shares");
		let r = [];

		r.push(`You own`);
		r.push(num(V.personalShares));
		r.push(`shares while another`);
		r.push(num(V.publicShares));
		r.push(`shares are traded publicly. The going rate on the market for 1000 shares is currently`);
		r.push(App.UI.DOM.makeElement("span", `${cashFormat(corpSharePrice())}.`, "cash"));
		addDiv(el, ...App.Events.spaceSentences(r));

		r = [];
		r.push(`The corporation can buyback 1000 shares for`);
		r.push(App.UI.DOM.makeElement("span", cashFormat(corpSharePrice(-1000)), ["cash", "dec"]));
		r.push(`or issue 1000 shares and net`);
		r.push(App.UI.DOM.makeElement("span", `${cashFormat(corpSharePrice(1000))}.`, "cash"));
		r.push(`The corporation will prefer to round shares to the nearest 1000 and will issue or buy shares toward that goal first.`);
		addDiv(el, ...App.Events.spaceSentences(r));

		if (V.corp.Cash > corpSharePrice(-1000)) {
			if (V.publicShares <= V.personalShares - 2000 && V.publicShares > 0) {
				// It won't buy back player shares if the corporation is entirely owned by the player
				let persExtraShares = V.personalShares % 1000 || 1000;
				addDiv(el, "The corporation can buyback some of your shares. ",
					App.UI.DOM.link(`Buyback ${persExtraShares}`, () => {
						cashX(corpSharePrice(-persExtraShares), 'stocksTraded');
						V.corp.Cash -= corpSharePrice(-persExtraShares);
						V.personalShares -= persExtraShares;
						refresh();
					}));
			}
			if (V.publicShares >= 1000) {
				let pubExtraShares = V.publicShares % 1000 || 1000;
				addDiv(el, "The corporation can buyback some of the public shares. ",
					App.UI.DOM.link(`Buyback ${pubExtraShares}`, () => {
						V.corp.Cash -= corpSharePrice(-pubExtraShares);
						V.corp.Cash -= corpSharePrice(-pubExtraShares);
						V.publicShares -= pubExtraShares;
						refresh();
					}));
			}
		}

		let persLeftoverShares = 1000 - (V.personalShares % 1000);
		if (V.cash > corpSharePrice(persLeftoverShares)) {
			addDiv(el, `The corporation can issue ${persLeftoverShares} shares to you. `,
				App.UI.DOM.link(`Issue ${persLeftoverShares}`, () => {
					cashX(forceNeg(corpSharePrice(persLeftoverShares)), 'stocksTraded');
					V.corp.Cash += corpSharePrice(persLeftoverShares);
					V.personalShares += persLeftoverShares;
					refresh();
				}));
		}
		let pubLeftoverShares = 1000 - (V.publicShares % 1000);
		if (V.publicShares <= V.personalShares - 2000) {
			addDiv(el, `The corporation can issue ${pubLeftoverShares} shares onto the stock market. `,
				App.UI.DOM.link(`Issue ${pubLeftoverShares}`, () => {
					V.corp.Cash += corpSharePrice(pubLeftoverShares);
					V.publicShares += pubLeftoverShares;
					refresh();
				}));
		}
		if (V.publicShares <= V.personalShares - 3000) {
			addDiv(el, `You can sell some of your shares on the stock market. `,
				App.UI.DOM.link("Sell 1000", () => {
					cashX(corpSharePrice(), "stocksTraded");
					V.personalShares -= 1000;
					V.publicShares += 1000;
					refresh();
				}));
		}

		if (V.cash > corpSharePrice() && V.publicShares >= 1000) {
			addDiv(el, "You can buy some shares from the stock market. ",
				App.UI.DOM.link("Buy 1000", () => {
					cashX(forceNeg(corpSharePrice()), "stocksTraded");
					V.personalShares += 1000;
					V.publicShares -= 1000;
					refresh();
				}));
		}

		App.UI.DOM.appendNewElement("h3", el, "Stock Split");
		// Splitting shares when they're unwieldy
		let splitFeeInitial = 10000;
		let splitFeeValue = splitFeeInitial - Math.floor((splitFeeInitial * (V.PC.skill.trading / 100.0) / 2.0) / 1000) * 1000;
		let splitStockConstants = App.Corporate.stockSplits;

		r = [];
		r.push(`The corporation can perform a stock split to increase the number of stocks while maintaining the same owned value. This requires paying a market fee of`);
		r.push(App.UI.DOM.makeElement("span", cashFormat(splitFeeValue), ["cash", "dec"]));
		r.push(`plus a per-share fee depending on the type of split being done.`);

		if (splitFeeValue < splitFeeInitial) {
			r.push(App.UI.DOM.makeElement("span", "You negotiated lower fees due to your", "note"));
			r.push(App.UI.DOM.makeElement("span", "business acumen", ["skill", "player", "note"]));
		}
		addDiv(el, ...App.Events.spaceSentences(r));

		if (V.corp.SpecTimer > 0) {
			App.UI.DOM.appendNewElement("div", el, "The corporation has restructured too recently.", "note");
		}

		const ul = document.createElement("ul");
		for (const stockType of splitStockConstants) {
			let splitValue = stockType.cost;
			let splitDenom = stockType.oldStocks || 1;
			let splitNumerator = stockType.newStocks || 1;
			let splitMultiplier = splitNumerator / splitDenom;
			let splitTotal = splitValue * (V.publicShares + V.personalShares) + splitFeeValue;
			let splitWeek = stockType.weeks;

			const li = document.createElement("li");
			r = [];
			r.push(`${splitNumerator}-for-${splitDenom}`);
			if (splitDenom > splitNumerator) {
				r.push(`inverse`);
			}
			r.push(`stock split at`);
			r.push(App.UI.DOM.makeElement("span", cashFormat(splitValue), ["cash", "dec"]));
			r.push(`per share. Including market fees, this will cost the corporation a total of`);
			r.push(App.UI.DOM.makeElement("span", `${cashFormat(splitTotal)},`, ["cash", "dec"]));
			r.push(`leaving the going rate for stock at`);
			r.push(App.UI.DOM.makeElement("span", cashFormat(Math.floor(corpSharePrice(0, V.personalShares * splitMultiplier, V.publicShares * splitMultiplier))), "cash"));
			r.push(`per 1000 shares.`);
			if (V.corp.SpecTimer === 0) {
				if (V.publicShares % splitDenom !== 0 || V.personalShares % splitDenom !== 0) {
					r.push(App.UI.DOM.makeElement("span", "The number of shares cannot be evenly split", "note"));
				} else if (V.corp.Cash > splitTotal) {
					r.push(App.UI.DOM.link("Split Shares", () => {
						V.corp.Cash -= splitTotal;
						V.publicShares *= splitMultiplier;
						V.personalShares *= splitMultiplier;
						V.corp.SpecTimer = splitWeek;
						refresh();
					}));
				} else {
					r.push(App.UI.DOM.makeElement("span", "The corporation cannot afford the fees.", "note"));
				}
			}
			li.append(...App.Events.spaceSentences(r));
			ul.append(li);
		}
		el.append(ul);
		return el;
	}

	/**
	 * @returns {DocumentFragment}
	 */
	function specializations() {
		const el = new DocumentFragment();
		App.UI.DOM.appendNewElement("h1", el, "Slave specialization");
		if (V.corp.SpecToken > 0) {
			// Spending tokens on new specializations
			const r = [];
			if (V.corp.SpecToken > 1) {
				r.push(`Your corporation has ${V.corp.SpecToken} specializations left.`);
			} else {
				r.push(`Your corporation has one specialization left.`);
			}
			if (V.corp.SpecTimer > 0) {
				r.push(`You have recently changed specializations and the corporation needs`);
				if (V.corp.SpecTimer > 1) {
					r.push(`${V.corp.SpecTimer} more weeks`);
				} else {
					r.push(`another week`);
				}

				r.push(`before it can comply with another directive.`);
				if (V.cheatMode === 1) {
					r.push(App.UI.DOM.link("Skip wait", () => {
						V.corp.SpecTimer = 0;
						refresh();
					}));
				}
				addDiv(el, ...App.Events.spaceSentences(r));
			} else {
				addDiv(el, ...App.Events.spaceSentences(r));
				addDiv(el, "Choosing to specialize your corporation uses a specialization. The corporation can be directed to focus on the following:");
				if (V.corp.SpecRaces.length === 0 && (V.corp.DivExtra > 0 || V.corp.DivLegal > 0)) {
					// This used to be V.captureUpgradeRace, it is a general acquisition specialization

					const links = [];
					for (const [key, race] of App.Data.misc.filterRacesPublic) {
						if (V.arcologies[0].FSSubjugationistRace !== key || V.arcologies[0].FSSubjugationist === "unset") {
							links.push(App.UI.DOM.link(race, () => {
								V.corp.SpecRaces = corpBlacklistRace(key, 1);
								V.corp.SpecToken -= 1;
								refresh();
							}));
						}
					}
					addDiv(el, "Slaves who are not ",
						App.UI.DOM.generateLinksStrip(links), "— ",
						App.UI.DOM.makeElement("span", "additional races can be excluded. 4 races per token.", "note"));

					if (V.corp.SpecToken >= 3) {
						const links = [];
						for (const [key, race] of App.Data.misc.filterRacesPublic) {
							if (V.arcologies[0].FSSupremacistRace !== key || V.arcologies[0].FSSupremacist === "unset") {
								links.push(App.UI.DOM.link(race, () => {
									V.corp.SpecRaces = corpBlacklistRace(key, 0);
									V.corp.SpecToken -= 3;
									V.corp.SpecTimer = 2;
									refresh();
								}));
							}
						}
						addDiv(el, "Only slaves who are ", App.UI.DOM.generateLinksStrip(links));
					} else {
						addDiv(el, "Only slaves of a particular race requires 3 tokens.");
					}
				}

				if ((!jsDef(V.corp.SpecNationality)) && V.corp.DivExtra > 0 && (V.arcologies[0].FSEdoRevivalist !== "unset" || V.arcologies[0].FSChineseRevivalist !== "unset")) {
					if (V.arcologies[0].FSEdoRevivalist !== "unset") {
						addDiv(el, `Since you are pursuing Edo Revivalism, slaves who are `, App.UI.DOM.link("Japanese", () => {
							V.corp.SpecNationality = "Japanese";
							V.corp.SpecToken -= 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					if (V.arcologies[0].FSChineseRevivalist !== "unset") {
						addDiv(el, `Since you are pursuing Chinese Revivalism, slaves who are `, App.UI.DOM.link("Chinese", () => {
							V.corp.SpecNationality = "Chinese";
							V.corp.SpecToken -= 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				}
				if (V.seeDicks !== 0 && !jsDef(V.corp.SpecGender) && (V.corp.DivExtra > 0 || V.corp.DivLegal > 0)) {
					// This used to be V.captureUpgradeGender, it is a general acquisition specialization
					const links = [];
					links.push(App.UI.DOM.link("Pussies", () => {
						V.corp.SpecGender = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Dicks", () => {
						V.corp.SpecGender = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Train only slaves with ", App.UI.DOM.generateLinksStrip(links));
				}
				if (!jsDef(V.corp.SpecHeight) && (V.corp.DivExtra > 0 || V.corp.DivLegal > 0)) {
					// This is a general acquisition specialization
					const links = [];
					links.push(App.UI.DOM.link("Short", () => {
						V.corp.SpecHeight = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Tall", () => {
						V.corp.SpecHeight = 4;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves that are ", App.UI.DOM.generateLinksStrip(links), "- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecVirgin) && (V.corp.DivExtra > 0 || V.corp.DivLegal > 0)) {
					// This is a general acquisition specialization
					addDiv(el, "Slaves that are ", App.UI.DOM.link("Virgins", () => {
						V.corp.SpecVirgin = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				if (!jsDef(V.corp.SpecIntelligence) && V.corp.DivLegal > 0) {
					// This used to be V.entrapmentUpgradeIntelligence, it is a legal enslavement specialization
					const links = [];
					links.push(App.UI.DOM.link("Stupid", () => {
						V.corp.SpecIntelligence = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Intelligent", () => {
						V.corp.SpecIntelligence = 3;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves who are ", App.UI.DOM.generateLinksStrip(links), "- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecAge) && V.corp.DivExtra > 0) {
					// This used to be V.captureUpgradeAge, it is the extralegal enslavement specialization
					const links = [];
					links.push(App.UI.DOM.link("Younger", () => {
						V.corp.SpecAge = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Older", () => {
						V.corp.SpecAge = 3;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves who are ", App.UI.DOM.generateLinksStrip(links));
				}
				if (!jsDef(V.corp.SpecWeight) && (V.corp.DivBreak > 0 || V.corp.DivSurgery > 0 || V.corp.DivTrain > 0)) {
					// This used to be V.generalUpgradeWeight, it is a general improvement specialization
					const links = [];
					links.push(App.UI.DOM.link("Thin Slaves", () => {
						V.corp.SpecWeight = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Fat nor Thin Slaves", () => {
						V.corp.SpecWeight = 3;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Fat Slaves", () => {
						V.corp.SpecWeight = 5;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Managing slaves' diets to achieve ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecDevotion) && (V.corp.DivBreak > 0 || V.corp.DivSurgery > 0 || V.corp.DivTrain > 0)) {
					// This used to be V.entrapmentUpgradeDevotionOne/Two, it is a general improvement specialization
					const links = [];
					links.push(App.UI.DOM.link("Reluctant", () => {
						V.corp.SpecDevotion = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Obedient", () => {
						V.corp.SpecDevotion = 4;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves who are ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecAccent) && (V.corp.DivBreak > 0 || V.corp.DivSurgery > 0 || V.corp.DivTrain > 0)) {
					// This used to be V.trainingUpgradeAccent, it is a general improvement specialization
					const links = [];
					links.push(App.UI.DOM.link("Speak the Language", () => {
						V.corp.SpecAccent = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Speak without Accent", () => {
						V.corp.SpecAccent = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves are taught to ", App.UI.DOM.generateLinksStrip(links));
				}
				if (!jsDef(V.corp.SpecHormones) && (V.corp.DivBreak > 0 || V.corp.DivSurgery > 0 || V.corp.DivTrain > 0)) {
					// This used to be V.drugUpgradeHormones, it is a general improvement specialization
					const links = [];
					links.push(App.UI.DOM.link("Feminize", () => {
						V.corp.SpecHormones = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Masculinize", () => {
						V.corp.SpecHormones = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves are given hormones to ", App.UI.DOM.generateLinksStrip(links));
				}
				if (!jsDef(V.corp.SpecInjection) && (V.corp.DivBreak > 0 || V.corp.DivSurgery > 0 || V.corp.DivTrain > 0)) {
					// This used to be V.drugUpgradeInjectionOne, it is a general improvement specialization
					const links = [];
					links.push(App.UI.DOM.link("Petite", () => {
						V.corp.SpecInjection = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Tasteful", () => {
						V.corp.SpecInjection = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Huge", () => {
						V.corp.SpecInjection = 3;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slave assets are made to be ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecCosmetics) && (V.corp.DivBreak > 0 || V.corp.DivSurgery > 0 || V.corp.DivTrain > 0)) {
					// This used to be V.surgicalUpgradeCosmetics, it is a general improvement specialization
					const links = [];
					links.push(App.UI.DOM.link("Applied", () => {
						V.corp.SpecCosmetics = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Not Applied", () => {
						V.corp.SpecCosmetics = 0;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Straightforward cosmetic procedures are ", App.UI.DOM.generateLinksStrip(links));
				}
				if (!jsDef(V.corp.SpecEducation) && V.corp.DivTrain > 0) {
					// This used to be V.trainingUpgradeEducation, it is the training specialization
					const links = [];
					links.push(App.UI.DOM.link("No Education", () => {
						V.corp.SpecEducation = 0;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Basic Education", () => {
						V.corp.SpecEducation = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves are given ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecImplants) && V.corp.DivSurgery > 0) {
					// This used to be V.surgicalUpgradeImplants, it is the surgery specialization
					const links = [];
					links.push(App.UI.DOM.link("Applied", () => {
						V.corp.SpecImplants = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Not Applied", () => {
						V.corp.SpecImplants = 0;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slave implants are ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecGenitalia) && V.corp.DivSurgeryDev > 100) {
					// This used to be V.surgicalUpgradeGenitalia, it is the surgery specialization
					const links = [];
					links.push(App.UI.DOM.link("Add Pussy", () => {
						V.corp.SpecPussy = 1;
						V.corp.SpecGenitalia = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Remove Pussy", () => {
						V.corp.SpecPussy = -1;
						V.corp.SpecGenitalia = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Add Dick", () => {
						V.corp.SpecDick = 1;
						V.corp.SpecGenitalia = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Remove Dick", () => {
						V.corp.SpecDick = -1;
						V.corp.SpecGenitalia = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Add Balls", () => {
						V.corp.SpecBalls = 1;
						V.corp.SpecGenitalia = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Remove Balls", () => {
						V.corp.SpecBalls = -1;
						V.corp.SpecGenitalia = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves get their genitalia reconfigured ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecTrust) && V.corp.DivBreak > 0) {
					// This used to be V.generalUpgradeBreaking, it is the slave breaking specific specialization
					const links = [];
					links.push(App.UI.DOM.link("Brutality", () => {
						V.corp.SpecTrust = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Care", () => {
						V.corp.SpecTrust = 4;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Breaking slaves with ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecAmputee) && V.corp.DivArcade > 0 && V.corp.DivSurgeryDev > 100) {
					// This is the arcade specialization
					addDiv(el, "Slave limbs are categorically ", App.UI.DOM.link("Removed", () => {
						V.corp.SpecAmputee = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				if (!jsDef(V.corp.SpecMuscle) && V.corp.DivMenial > 0) {
					// This used to be V.generalUpgradeMuscle, it is the Menial division's specialization
					const links = [];
					if (V.arcologies[0].FSPhysicalIdealist === "unset") {
						links.push(App.UI.DOM.link("Weak", () => {
							V.corp.SpecMuscle = 2;
							V.corp.SpecToken -= 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					links.push(App.UI.DOM.link("Soft", () => {
						V.corp.SpecMuscle = 3;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Toned", () => {
						V.corp.SpecMuscle = 4;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves with muscles that are ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
				if (!jsDef(V.corp.SpecMilk) && V.corp.DivDairy > 0) {
					// This is the dairy specialization
					const links = [];
					links.push(App.UI.DOM.link("Naturally", () => {
						V.corp.SpecMilk = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Through Implant", () => {
						V.corp.SpecMilk = 2;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves are made to be lactating ", App.UI.DOM.generateLinksStrip(links));
				}
				if (!jsDef(V.corp.SpecSexEd) && V.corp.DivWhore > 0) {
					// This used to be V.trainingUpgradeSexEd, it is the escort division specialization
					const links = [];
					links.push(App.UI.DOM.link("Clueless", () => {
						V.corp.SpecSexEd = 0;
						V.corp.SpecToken -= 0;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					links.push(App.UI.DOM.link("Competent", () => {
						V.corp.SpecSexEd = 1;
						V.corp.SpecToken -= 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
					addDiv(el, "Slaves are sexually ", App.UI.DOM.generateLinksStrip(links), " -- ", App.UI.DOM.makeElement("span", "Further specializations possible", "note"));
				}
			}
		} else {
			const div = App.UI.DOM.makeElement("div", "Your corporation cannot pick a new specialization at this time.");
			if (V.cheatMode === 1) {
				div.append(" ", App.UI.DOM.link("Unlock specialization", () => {
					V.corp.Spec++;
					V.corp.SpecToken++;
					V.corp.SpecTimer = 0;
					refresh();
				}));
				div.append(" ", App.UI.DOM.link("Reset Timer", () => {
					V.corp.SpecTimer = 0;
					refresh();
				}));
			}
			el.append(div);
		}

		if (V.corp.Spec > V.corp.SpecToken) {
			const p = document.createElement("p");
			// Modifying specializations
			p.append(`You have chosen the following specializations:`);
			App.UI.DOM.appendNewElement("div", p, `You can choose to specialize further with additional tokens, specialize less, end the specialization or sometimes tweak them for free.`, "note");

			if (V.corp.SpecRaces.length === App.Data.misc.filterRacesPublic.size) {
				V.corp.SpecRaces = [];
			}
			if (V.corp.SpecRaces.length > 0) {
				p.append(corpRaces());
			}
			if (V.corp.SpecNationality) {
				const div = App.UI.DOM.makeElement("div", `The corporation trains slaves who are ${V.corp.SpecNationality}.`);
				if (V.corp.SpecTimer === 0) {
					div.append(" ", App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecNationality;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				p.append(div);
			}

			if (V.corp.SpecGender) {
				const r = [];
				r.push("The corporation trains slaves with");
				if (V.corp.SpecGender === 1) {
					r.push("pussies.");
				} else if (V.corp.SpecGender === 2) {
					r.push("dicks.");
				}
				if (V.corp.SpecTimer === 0) {
					r.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecGender;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecHeight !== undefined) {
				const r = [];
				const links = [];
				r.push("The corporation is targeting");
				let tokenGain = 1;
				if (V.corp.SpecHeight === 1) {
					r.push("tiny");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Short Slaves", () => {
							V.corp.SpecHeight = 2;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						tokenGain = 2;
					}
				} else if (V.corp.SpecHeight === 2) {
					r.push("short");
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && ((V.corp.DivExtraDev || 0) + (V.corp.DivLegalDev || 0)) > 50) {
							links.push(App.UI.DOM.link("Tiny Slaves", () => {
								V.corp.SpecHeight = 1;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecHeight === 4) {
					r.push("tall");
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && ((V.corp.DivExtraDev || 0) + (V.corp.DivLegalDev || 0)) > 50) {
							links.push(App.UI.DOM.link("Giant Slaves", () => {
								V.corp.SpecHeight = 5;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecHeight === 5) {
					r.push("giant");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Tall Slaves", () => {
							V.corp.SpecHeight = 4;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					tokenGain = 2;
				}
				r.push("slaves.");
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecHeight;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecVirgin === 1) {
				const div = App.UI.DOM.makeElement("div", `The corporation is ensuring slaves remain virgins.`);
				if (V.corp.SpecTimer === 0) {
					div.append(" ", App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecVirgin;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				p.append(div);
			}

			if (V.corp.SpecTrust) {
				const r = [];
				const links = [];
				r.push("The corporation is breaking slaves with");
				let tokenGain = 1;
				if (V.corp.SpecTrust === 1) {
					r.push("extreme brutality.");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Apply Less Brutality", () => {
							V.corp.SpecTrust = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecTrust === 2) {
					r.push("brutality.");
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && V.arcologies[0].FSDegradationist > 20 && V.corp.DivBreakDev > 50) {
							links.push(App.UI.DOM.link("Apply Extreme Brutality", () => {
								V.corp.SpecTrust = 1;
								// Don't think this deserves the added cost of a token, unlike the 'utmost care' one.
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecTrust === 4) {
					r.push("care.");
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && V.arcologies[0].FSPaternalist > 20 && V.corp.DivBreakDev > 50) {
							links.push(App.UI.DOM.link("Use the Utmost Care", () => {
								V.corp.SpecTrust = 5;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecTrust === 5) {
					r.push("the utmost care.");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Use Less Care", () => {
							V.corp.SpecTrust = 4;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						tokenGain = 2;
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecTrust;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecWeight) {
				const r = [];
				const links = [];
				r.push("The corporation");
				if (V.corp.SpecWeight === 1) {
					r.push("makes slaves follow incredibly strict diets.");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Apply Looser Diet", () => {
							V.corp.SpecWeight = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecWeight === 2) {
					r.push("makes slaves diet.");
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && V.arcologies[0].FSHedonisticDecadence === "unset") {
							links.push(App.UI.DOM.link("Apply Strict Diet", () => {
								V.corp.SpecWeight = 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						links.push(App.UI.DOM.link("Aim for Healthy Weight", () => {
							V.corp.SpecWeight = 3;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecWeight === 3) {
					r.push("is aiming for slaves with a healthy weight.");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Apply Diet", () => {
							V.corp.SpecWeight = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						// TODO: Perhaps 'plump up' is not the right phrase
						links.push(App.UI.DOM.link("Plump up Slaves", () => {
							V.corp.SpecWeight = 5;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecWeight === 5) {
					r.push("aims for plump slaves.");
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && V.arcologies[0].FSPhysicalIdealist === "unset") {
							links.push(App.UI.DOM.link("Fatten Slaves", () => {
								V.corp.SpecWeight = 6;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						links.push(App.UI.DOM.link("Aim for Healthy Weight", () => {
							V.corp.SpecWeight = 3;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecWeight === 6) {
					r.push("aims for fat slaves.");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Settle for Plump", () => {
							V.corp.SpecWeight = 5;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecWeight;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecMuscle) {
				const r = [];
				r.push("The corporation");
				const links = [];
				let tokenGain = 1;
				if (V.corp.SpecMuscle === 1) {
					r.push("aims to have frail slaves.");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Aim for Weak", () => {
							V.corp.SpecMuscle = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecMuscle === 2) {
					// Don't think this deserves the added cost of a token, unlike slaves getting ripped
					r.push("aims to have weak slaves.");
					if (V.corp.SpecTimer === 0) {
						if (V.arcologies[0].FSPhysicalIdealist === "unset") {
							links.push(App.UI.DOM.link("Aim for Frail", () => {
								V.corp.SpecMuscle = 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecMuscle === 3) {
					r.push("is aiming for slaves with soft muscles.");
					if (V.corp.SpecTimer === 0) {
						if (V.arcologies[0].FSPhysicalIdealist === "unset") {
							links.push(App.UI.DOM.link("Aim for Weak", () => {
								V.corp.SpecMuscle = 2;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						links.push(App.UI.DOM.link("Aim for Toned", () => {
							V.corp.SpecMuscle = 4;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecMuscle === 4) {
					r.push("aims for toned muscles.");
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 &&
							((V.corp.DivBreakDev || 0) + (V.corp.DivSurgeryDev || 0) + (V.corp.DivTrainDev || 0) > 100)) {
							links.push(App.UI.DOM.link("Aim for Ripped", () => {
								V.corp.SpecMuscle = 5;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecMuscle === 5) {
					r.push("aims for ripped slaves.");
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Aim for Toned", () => {
							V.corp.SpecMuscle = 4;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						tokenGain = 2;
					}
				}
				if (V.corp.SpecTimer === 0) {
					if (V.corp.SpecMuscle === 4 || V.corp.SpecMuscle === 2) {
						links.push(App.UI.DOM.link("Aim for Soft", () => {
							V.corp.SpecMuscle = 3;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecWeight;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecDevotion) {
				const r = [];
				const links = [];
				let tokenGain = 1;
				if (V.corp.SpecDevotion === 1) {
					r.push(`The corporation keeps slaves extremely defiant.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Less Defiant", () => {
							V.corp.SpecDevotion = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecDevotion === 2) {
					r.push(`The corporation keeps slaves reluctant.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Make them Defiant", () => {
							V.corp.SpecDevotion = 1;
							// Don't think this deserves the added cost of a token, unlike the 'devoted' one
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecDevotion === 4) {
					r.push(`The corporation is fostering obedience.`);
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && V.corp.DivTrainDev > 100) {
							links.push(App.UI.DOM.link("Foster Devotion", () => {
								V.corp.SpecDevotion = 5;
								V.corp.SpecToken += 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecDevotion === 5) {
					r.push(`The corporation is fostering devotion.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Settle for Obedience", () => {
							V.corp.SpecDevotion = 4;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecDevotion;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecIntelligence !== undefined) {
				let div = document.createElement("div");
				if (V.corp.SpecIntelligence === 1) {
					div.append(`The corporation keeps stupid slaves.`);
				} else if (V.corp.SpecIntelligence === 3) {
					div.append(`The corporation keeps intelligent slaves.`);
				}
				if (V.corp.SpecTimer === 0) {
					div.append(" ", App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecIntelligence;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				p.append(div);
			}

			if (V.corp.SpecAge) {
				let div = document.createElement("div");
				if (V.corp.SpecAge === 1) {
					div.append(`The corporation focuses on young slaves.`);
				} else if (V.corp.SpecAge === 3) {
					div.append(`The corporation focuses on older slaves.`);
				}
				if (V.corp.SpecTimer === 0) {
					div.append(" ", App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecAge;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				p.append(div);
			}

			if (V.corp.SpecAccent !== undefined) {
				const r = [];
				const links = [];
				if (V.corp.SpecAccent === 1) {
					r.push(`The corporation teaches slaves to speak the lingua franca.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Eliminate Accents", () => {
							V.corp.SpecAccent = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecAccent === 2) {
					r.push(`The corporation teaches slaves to speak the lingua franca without an accent.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Just Teach Language", () => {
							V.corp.SpecAccent = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecAccent;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecEducation !== undefined) {
				const r = [];
				const links = [];
				let tokenGain = 1;
				if (V.corp.SpecEducation === 0) {
					r.push(`The corporation focuses on uneducated slaves.`);
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0) {
							links.push(App.UI.DOM.link("Basic Education", () => {
								V.corp.SpecEducation = 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecEducation === 1) {
					r.push(`The corporation makes sure all slaves have a basic education.`);
					if (V.corp.SpecTimer === 0) {
						if (V.corp.DivTrainDev > 200 && V.corp.SpecToken > 0) {
							links.push(App.UI.DOM.link("Advanced Education", () => {
								V.corp.SpecEducation = 2;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						links.push(App.UI.DOM.link("No Education", () => {
							V.corp.SpecEducation = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecEducation === 2) {
					r.push(`The corporation makes sure all slaves have an advanced education.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Basic Education", () => {
							V.corp.SpecEducation = 1;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						tokenGain = 2;
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecEducation;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecCosmetics !== undefined) {
				const r = [];
				const links = [];
				let tokenGain = 0;
				if (V.corp.SpecCosmetics === 1) {
					r.push(`The corporation applies straightforward cosmetic procedures.`);
					tokenGain = 1;
				} else if (V.corp.SpecCosmetics === 0) {
					r.push(`The corporation doesn't apply cosmetic procedures.`);
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0) {
							links.push(App.UI.DOM.link("Applied", () => {
								V.corp.SpecCosmetics = 1;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecCosmetics;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecImplants !== undefined) {
				const r = [];
				const links = [];
				let tokenGain = 1;
				if (V.corp.SpecImplants === 1) {
					r.push(`The corporation applies tasteful implants to all slaves.`);
					if (V.corp.SpecTimer === 0) {
						if (V.corp.DivSurgeryDev > 100 && V.corp.SpecToken > 0) {
							links.push(App.UI.DOM.link("Absurd Implants", () => {
								V.corp.SpecImplants = 2;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecImplants === 2) {
					r.push(`The corporation applies absurd implants to all slaves.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Tasteful Implants", () => {
							V.corp.SpecImplants = 1;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						tokenGain = 2;
					}
				} else if (V.corp.SpecImplants === 0) {
					r.push(`The corporation keeps their slaves entirely implant free.`);
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0) {
							links.push(App.UI.DOM.link("Tasteful Implants", () => {
								V.corp.SpecImplants = 1;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						tokenGain = 0;
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecImplants;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (!jsDef(V.corp.SpecPussy) && !jsDef(V.corp.SpecDick) && !jsDef(V.corp.SpecBalls) && V.corp.SpecGenitalia === 1) {
				delete V.corp.SpecGenitalia;
				V.corp.SpecToken += 1;
			}
			if (V.corp.SpecGenitalia === 1) {
				if (V.corp.SpecPussy === 1) {
					const div = App.UI.DOM.makeElement("div", `The corporation adds a pussy to all slaves.`);
					if (V.corp.SpecTimer === 0) {
						div.append(" ", App.UI.DOM.link("Stop", () => {
							delete V.corp.SpecPussy;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					p.append(div);
				} else if (V.corp.SpecPussy === -1) {
					const div = App.UI.DOM.makeElement("div", `The corporation removes pussies from all slaves.`);
					if (V.corp.SpecTimer === 0) {
						div.append(" ", App.UI.DOM.link("Stop", () => {
							delete V.corp.SpecPussy;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					p.append(div);
				} else {
					const div = App.UI.DOM.makeElement("div", `The corporation has no plans for pussies.`);
					if (V.corp.SpecTimer === 0) {
						const links = [];
						links.push(App.UI.DOM.link("Add Pussy", () => {
							V.corp.SpecPussy = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						links.push(App.UI.DOM.link("Remove Pussy", () => {
							V.corp.SpecPussy = -1;
							V.corp.SpecToken -= 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						div.append(" ", App.UI.DOM.generateLinksStrip(links));
					}
					p.append(div);
				}
				if (V.corp.SpecDick === 1) {
					const div = App.UI.DOM.makeElement("div", `The corporation adds a dick to all slaves.`);
					if (V.corp.SpecTimer === 0) {
						div.append(" ", App.UI.DOM.link("Stop", () => {
							delete V.corp.SpecDick;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					p.append(div);
				} else if (V.corp.SpecDick === -1) {
					const div = App.UI.DOM.makeElement("div", `The corporation removes dicks from all slaves.`);
					if (V.corp.SpecTimer === 0) {
						div.append(" ", App.UI.DOM.link("Stop", () => {
							delete V.corp.SpecDick;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					p.append(div);
				} else {
					const div = App.UI.DOM.makeElement("div", `The corporation has no plans for dicks.`);
					if (V.corp.SpecTimer === 0) {
						const links = [];
						links.push(App.UI.DOM.link("Add Dick", () => {
							V.corp.SpecDick = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						links.push(App.UI.DOM.link("Remove Dick", () => {
							V.corp.SpecDick = -1;
							V.corp.SpecToken -= 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						div.append(" ", App.UI.DOM.generateLinksStrip(links));
					}
					p.append(div);
				}
				if (V.corp.SpecBalls === 1) {
					const div = App.UI.DOM.makeElement("div", `The corporation adds balls to all slaves (penis required).`);
					if (V.corp.SpecTimer === 0) {
						div.append(" ", App.UI.DOM.link("Stop", () => {
							delete V.corp.SpecBalls;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					p.append(div);
				} else if (V.corp.SpecBalls === -1) {
					const div = App.UI.DOM.makeElement("div", `The corporation removes balls from all slaves.`);
					if (V.corp.SpecTimer === 0) {
						div.append(" ", App.UI.DOM.link("Stop", () => {
							delete V.corp.SpecBalls;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
					p.append(div);
				} else {
					const div = App.UI.DOM.makeElement("div", `The corporation has no plans for balls.`);
					if (V.corp.SpecTimer === 0) {
						const links = [];
						links.push(App.UI.DOM.link("Add Balls", () => {
							V.corp.SpecBalls = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						links.push(App.UI.DOM.link("Remove Balls", () => {
							V.corp.SpecBalls = -1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						div.append(" ", App.UI.DOM.generateLinksStrip(links));
					}
					p.append(div);
				}
			}

			if (V.corp.SpecInjection) {
				const r = [];
				const links = [];
				let tokenGain = 1;
				if (V.corp.SpecInjection === 1) {
					r.push(`The corporation aims for petite assets.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Tasteful Size", () => {
							V.corp.SpecInjection = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						links.push(App.UI.DOM.link("Huge Size", () => {
							V.corp.SpecInjection = 3;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecInjection === 2) {
					r.push(`The corporation aims for tasteful assets.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Small Size", () => {
							V.corp.SpecInjection = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						links.push(App.UI.DOM.link("Huge Size", () => {
							V.corp.SpecInjection = 3;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecInjection === 3) {
					r.push(`The corporation aims for huge assets.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Small Size", () => {
							V.corp.SpecInjection = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						links.push(App.UI.DOM.link("Tasteful Size", () => {
							V.corp.SpecInjection = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						if (V.corp.DivSurgeryDev > 100 && V.corp.SpecToken > 0) {
							links.push(App.UI.DOM.link("Supermassive Size", () => {
								V.corp.SpecInjection = 4;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						if (V.corp.DivDairyDev > 200 && V.corp.SpecToken > 0) {
							links.push(App.UI.DOM.link("Pastoral Size", () => {
								V.corp.SpecInjection = 5;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecInjection === 4) {
					r.push(`The corporation aims for supermassive assets.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Huge Size", () => {
							V.corp.SpecInjection = 3;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						if (V.corp.DivDairyDev > 200) {
							links.push(App.UI.DOM.link("Pastoral Size", () => {
								V.corp.SpecInjection = 5;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						tokenGain = 2;
					}
				} else if (V.corp.SpecInjection === 5) {
					r.push(`The corporation aims for pastoral assets.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Huge Size", () => {
							V.corp.SpecInjection = 3;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						if (V.corp.DivSurgeryDev > 50) {
							links.push(App.UI.DOM.link("Supermassive Size", () => {
								V.corp.SpecInjection = 4;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
						tokenGain = 2;
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecInjection;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecHormones) {
				const r = [];
				const links = [];
				if (V.corp.SpecHormones === 1) {
					r.push(`The corporation feminizes slaves with hormones.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Masculinize", () => {
							V.corp.SpecHormones = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecHormones === 2) {
					r.push(`The corporation masculinize slaves with hormones.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Feminize", () => {
							V.corp.SpecHormones = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecHormones;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecAmputee === 1) {
				const div = App.UI.DOM.makeElement("div", `The corporation removes all limbs from its slaves.`);
				if (V.corp.SpecTimer === 0) {
					div.append(" ", App.UI.DOM.link("Stop", () => {
						delete V.corp.SpecAmputee;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				p.append(div);
			}

			if (V.corp.SpecMilk) {
				const r = [];
				const links = [];
				if (V.corp.SpecMilk === 1) {
					r.push(`The corporation makes sure all slaves are naturally lactating.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Lactation Implant", () => {
							V.corp.SpecMilk = 2;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				} else if (V.corp.SpecMilk === 2) {
					r.push(`The corporation equips all slaves with lactation implants.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Natural Lactation", () => {
							V.corp.SpecMilk = 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecMilk;
						V.corp.SpecToken += 1;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			if (V.corp.SpecSexEd !== undefined) {
				const r = [];
				const links = [];
				let tokenGain = 1;
				if (V.corp.SpecSexEd === 1) {
					r.push(`The corporation familiarizes slaves with sexual service.`);
					if (V.corp.SpecTimer === 0) {
						if (V.corp.SpecToken > 0 && V.corp.DivWhoreDev > 200) {
							links.push(App.UI.DOM.link("Advanced Training", () => {
								V.corp.SpecSexEd = 2;
								V.corp.SpecToken -= 1;
								V.corp.SpecTimer = 2;
								refresh();
							}));
						}
					}
				} else if (V.corp.SpecSexEd === 2) {
					r.push(`The corporation teaches advanced sexual techniques to its slaves.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Basic Training", () => {
							V.corp.SpecSexEd = 1;
							V.corp.SpecToken += 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						tokenGain = 2;
					}
				} else if (V.corp.SpecSexEd === 0) {
					r.push(`The corporation teaches no sexual techniques to its slaves.`);
					if (V.corp.SpecTimer === 0) {
						links.push(App.UI.DOM.link("Basic Training", () => {
							V.corp.SpecSexEd = 1;
							V.corp.SpecToken -= 1;
							V.corp.SpecTimer = 2;
							refresh();
						}));
						tokenGain = 0;
					}
				}
				if (V.corp.SpecTimer === 0) {
					links.push(App.UI.DOM.link("No Focus", () => {
						delete V.corp.SpecSexEd;
						V.corp.SpecToken += tokenGain;
						V.corp.SpecTimer = 2;
						refresh();
					}));
				}
				r.push(App.UI.DOM.generateLinksStrip(links));
				App.Events.addNode(p, r, "div");
			}

			el.append(p);
		}

		return el;
	}

	/**
	 * @returns {HTMLParagraphElement}
	 */
	function dissolveLink() {
		const p = document.createElement("p");
		p.append(App.UI.DOM.link("Dissolve the corporation", () => {
			if (Dialog.isOpen()) {
				Dialog.close();
			}

			Dialog.setup("Dissolve Corporation");
			const frag = new DocumentFragment();
			App.UI.DOM.appendNewElement("p", frag, "Dissolving the corporation will destroy all assets your corporation owns!", "note");
			App.UI.DOM.appendNewElement("p", frag, "This decision cannot be reverted!", ["warning", "note"]);
			frag.append(App.UI.DOM.link("Dissolve", () => {
				cashX(Math.min(corpSharePrice() * V.personalShares / 1000, 1000000), "stocksTraded");
				App.Corporate.dissolve();
				refresh();
				Dialog.close();
			}));
			$(Dialog.body()).empty().append(frag);
			Dialog.open();
		}));
		return p;
	}

	/**
	 * @returns {DocumentFragment}
	 */
	function corpRaces() {
		const el = new DocumentFragment();
		App.UI.DOM.appendNewElement("div", el, `The corporation enslaves people of the following race${V.corp.SpecRaces.length === 1 ? `` : `s`}:`);
		for (const [race, capRace] of App.Data.misc.filterRacesPublic) {
			const r = [];
			if (V.corp.SpecRaces.includes(race)) {
				r.push(capRace);
				if (!(V.arcologies[0].FSSubjugationist !== "unset" && V.arcologies[0].FSSubjugationistRace !== race)) {
					if (V.corp.SpecRaces.length > 1 && V.corp.SpecTimer === 0) {
						const blacklistLength = App.Data.misc.filterRacesPublic.size - V.corp.SpecRaces.length;
						const needsToken = blacklistLength % 4 === 0;

						if (!needsToken || V.corp.SpecToken > 0) {
							r.push(
								App.UI.DOM.link(
									"Blacklist",
									() => {
										V.corp.SpecRaces = corpBlacklistRace(race, 1);
										if (needsToken) {
											V.corp.SpecToken -= 1;
										}
										if (blacklistLength % 4 === 3) {
											V.corp.SpecTimer = 1;
										}
										refresh();
									},
								)
							);
						}
					}
				}
			} else {
				r.push(App.UI.DOM.makeElement("span", capFirstChar(capRace), "strikethrough"));
				if (V.corp.SpecTimer === 0) {
					r.push(
						App.UI.DOM.link(
							"Whitelist",
							() => {
								V.corp.SpecRaces = corpBlacklistRace(race, 0);
								const blacklistLength = App.Data.misc.filterRacesPublic.size - V.corp.SpecRaces.length;
								if (blacklistLength % 4 === 0) {
									V.corp.SpecToken += 1;
									V.corp.SpecTimer = 1;
								}
								if (blacklistLength === 0) {
									V.corp.SpecRaces = [];
								}
								refresh();
							},
						)
					);
				}
			}
			App.Events.addNode(el, r, "div");
		}
		return el;
	}

	/**
	 * @param {HTMLElement|DocumentFragment} parent
	 * @param {Array<string|Node>} children
	 */
	function addDiv(parent, ...children) {
		const div = document.createElement("div");
		// @ts-ignore
		$(div).append(...children);
		parent.append(div);
	}
};


code:
App.Events.refsTotallyLegitCatgirls = class refsTotallyLegitCatgirls extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.projectN.public === 1,
			() => !!V.seeCats, // TODO: was not hooked up in TW, what else should gate be? Project N something?
		];
	}

	execute(node) {
		const slave = GenerateNewSlave("XX", {minAge: 16, maxAge: 24});
		slave.origin = "You purchased $him from a reputable street merchant selling you completely legitimate catgirls.";
		slave.tailShape = "cat";
		slave.tailColor = slave.hColor;
		slave.collar = "uncomfortable leather";
		slave.clothes = "kitty lingerie";
		setHealth(slave, jsRandom(30, 60), 0, 0, 0, 0);

		App.Events.drawEventArt(node, slave);

		App.Events.addParagraph(node, [`The novelty of catgirls is still very much present in the marketplaces of your arcology. Across the stands, you see magazines proudly advertising new transformative trends, featuring ways to graft on cat ears or 'home-engineer' catgirls with stripped-down versions of the Project N technologies, and various gear and equipment tailored towards catlike slave bodies, mostly for people who can't afford one.`]);

		App.Events.addParagraph(node, [`Of course, part of this enduring trend is the fact that catgirls are so exclusive, with the Project N tech so expensive and difficult to employ and generally requiring hundreds of thousands of credits worth of equipment and trained scientific teams. That's why it perks your attention when you notice one market vendor selling, as it says on the shop's outer sign, "DISCOUNT CATGIRLS".`]);

		App.Events.addParagraph(node, [`The second you step inside a lanky man with slick black hair practically intercepts you with greetings and praise, nearly blocking your path and stopping you from getting a good look at the cages behind him. But even with the slick salesman in your way, you can tell that these are pretty obviously just normal women with surgical alternations to make them look vaguely like catgirls, although you can't imagine anyone other than a total idiot would be fooled considering none of them have fur or actual cat ears.`]);

		App.Events.addParagraph(node, [`"For you, a special price of just two thousand credits! What a steal! Normally, catgirls cost six, seven, twenty times that price! But I'm sure you of all people know that, no? Haha..."`]);

		const cash = 2000;
		const choices = [];
		if (V.cash >= cash) {
			choices.push(new App.Events.Result(`Buy a "catgirl"`, buy, `Will cost ${cashFormat(cash)}`));
		}

		choices.push(new App.Events.Result(`Decline to purchase the obviously fake catgirls`, refuse));

		App.Events.addResponses(node, choices);

		function buy() {
			cashX(-cash, "slaveTransfer", slave);
			return [
				`You sigh and hand the merchant a few thousand credits. He seems overjoyed, if slightly shocked, to have actually made a sale on his 'discount' catgirls, but rushes over to the cages and leads out your new slave with an ear-to-ear smile. "Have fun with her!" He shouts out at you as you leave. The 'catgirl' adjusts her headband and attempts a very human sounding meow as you lead her out of the shop.`,
				App.UI.newSlaveIntro(slave)
			];
		}

		function refuse() {
			return `You ask the salesman if he thinks you're an idiot and tell him that these are clearly not legitimate catgirls. He smiles bashfully and shrugs his shoulder like a child being scolded. "Sure, sure, but they're still pretty good girls. And besides, it's something for all the people who can't afford a real one, right? Haha. So, anyway, you wanna buy one, or..?" You roll your eyes at the persistent salesman. He's still making pitches at you as you leave.`;
		}
	}
};

repo_name: Fanatey/fc

license: mit


code:
App.Events.CMRESSAnnoyingCat = class CMRESSAnnoyingCat extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [];
	}

	actorPrerequisites() {
		return [
			[ // single event slave
				s => s.fetish !== "mindbroken",
				hasAnyArms,
				canMove,
				s => s.race === "catgirl",
				s => s.trust > 35,
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			He, he, his, him, girl
		} = getPronouns(eventSlave);
		const {title} = getEnunciation(eventSlave);
		const PC = V.PC;

		App.Events.drawEventArt(node, eventSlave);

		let t = [];
		t.push(`Although your catgirl slaves are beautiful, intelligent, and move across your penthouse with an almost supernatural grace, their feline charm and beauty comes at the expense of a number of less desirable feline traits coded deeply into their spliced DNA. One of these irritating genetic leftovers is their exceptional neediness, which, when combined with their playful nature, gives them an unfortunate tendency to attempt to get your attention through minor annoyances. Well, when they aren't terrified of you, at least.`);
		App.Events.addParagraph(node, t);

		t = [];
		t.push(`Sometimes this comes in the form of erotic teasing, offering calculated, teasing glimpses of their butts or tits to try and win your eye when they want attention. Other times, like when ${eventSlave.slaveName} loudly meows when you walk by, it's just by being a nuisance. Normally, such a little thing would be totally beneath your notice, but ${he}'s been purring annoyingly at your heels all day, flicking ${his} tail up against the base of your hips, and mrowling whenever you come close. ${He} doesn't even seem to want anything in particular, and the minor catlike annoyances have finally gotten on your nerves.`);
		App.Events.addParagraph(node, t);

		App.Events.addResponses(node, [
			canDoAnal(eventSlave)
				? new App.Events.Result(`Roughly fuck ${his} ass to shut ${him} up`, annoyedFuck, analVirginWarning())
				: new App.Events.Result(),
			new App.Events.Result(`Tell ${him} to stop being such a nuisance`, stopit),
			new App.Events.Result(`Ignore ${him}`, ignore),
		]);

		function analVirginWarning() {
			if (eventSlave.anus === 0) {
				return `This option will take ${his} anal virginity`;
			}
		}

		function annoyedFuck() {
			t = [];
			t.push(`As ${eventSlave.slaveName} meows at you, you order the irritating cat${girl} to turn around, drop ${his} bottoms, lift ${his} tail and spread ${his} cheeks. As though to make the command's intent even more obvious, you ${PC.dick !== 0 ? "pull your cock free from your pants" : "take a strapon and slide it up your legs"} as the furball look at you in surprise for a moment. Without a word of protest, the cat${girl} simply turns, pulls ${his} bottoms just under ${his} asscheeks, and lifts up ${his} tail to show you ${his}`);
			if (eventSlave.butt > 12) {
				t.push("enormous, view-dominating furry ass.");
			} else if (eventSlave.butt > 5) {
				t.push("huge, rounded fluffy ass-globes.");
			} else if (eventSlave.butt > 2) {
				t.push("fat cat ass.");
			} else {
				t.push("slender kitten rear.");
			}
			App.Events.addParagraph(node, t);
			t = [];
			t.push(`${He} twists ${his} head to look at you as though to say something, but you don't give ${him} the chance as you grab ${him} by the hips, not so much as bothering to spit down for the slightest semblance of lube, and slam ${PC.dick !== 0 ? "your cock" : "the strapon"} into the cat${girl}'s round, furry ass, forcing yourself past the resistance of ${his} sphincter. You ruthlessly pound ${eventSlave.slaveName}'s ${eventSlave.skin} butt, holding ${him} in place around the hips as`);
			if (PC.dick === 1) {
				if (eventSlave.dick > 0) {
					t.push(`your fat nuts batter ${his} pair into submission, bruising the low-hanging targets along with ${his} asshole with each extremely gay thrust. The violent, squirting orgasm ${he} has within a minute is probably no thanks to how hard you're busting ${his} furry balls with your own as you core out ${his} rear.`);
				}
			} else {
				t.push(`${He} squeals and mrowls, writhing against you as you pound ${his} ass into submission until ${he} jerks out with an explosive, wriggling squirtgasm against the floor.`);
			}
			t.push(`Shortly after, you ${PC.dick !== 0 ? `hilt yourself in the betacat's furry butt and shoot a half-dozen thick, hot ropes of cum up ${his} colon` : "achieve a powerful, mind-fogging orgasm yourself"}, pulling yourself free and releasing the annoying cat's hips. ${eventSlave.slaveName} gasps like ${he}'s out of oxygen, fluid dripping out from ${his} brutalized asshole, and yips out a brief, happy-sounding apology for being annoying.`);
			App.Events.addParagraph(node, t);
			t = [];

			eventSlave.devotion += 2;
			seX(eventSlave, "anal", V.PC, "penetrative");
			return t;
		}

		function stopit() {
			let t = [];
			t.push(`You grab ${eventSlave.slaveName} by the hand and tell ${him} to stop being so goddamn annoying. ${He} cocks ${his} head at you, apparently genuinely confused, and then huffs out a loud exhale.`);
			if (canTalk(eventSlave)) {
				t.push(Spoken(eventSlave, `"Uh, sorry, ${title}, I wasn't trying to be annoying or anything..." ${He} mewls,`));
			} else {
				t.push(`${He} makes a second weird, apologetic sounding noise,`);
			}
			t.push(`then scurries off when you let ${him} go with ${his} <span class="trust dec">ears flat against ${his} head.</span>`);
			eventSlave.trust -= 3;
			return t;
		}

		function ignore() {
			let t = [];
			t.push(`You completely ignore ${eventSlave.slaveName} as ${he} mrowls at you and go about your day. You're far too busy to deal with some needy cat nonsense. ${eventSlave.slaveName} gets a little louder, and then louder still throughout the day, subtly demanding your attention for no particular reason, until ${he} finally gets that you're outright ignoring ${him} and trots off somewhere to sulk angrily at you not playing into ${his} childish - or at least animalistic - antics.`);
			eventSlave.devotion -= 3;
			return t;
		}
	}
};


code:
App.Events.CMRESSCatLove = class CMRESSCatLove extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [];
	}

	actorPrerequisites() {
		return [
			[ // single event slave
				s => s.fetish !== "mindbroken",
				hasAnyArms,
				canMove,
				s => s.race === "catgirl",
				s => s.devotion > 90,
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			He, he, his, His, him, himself, girl
		} = getPronouns(eventSlave);
		const {title} = getEnunciation(eventSlave);
		const PC = V.PC;

		App.Events.drawEventArt(node, eventSlave);

		let t = [];
		t.push(`As you walk out from the office to your bedroom late in the evening, ${eventSlave.slaveName} approaches you in the halls, holding something behind ${his} back with both hands. ${His} tail swishes nervously from side to side behind ${him}. The instant you open your mouth to ask what ${he}'s holding, the quivering cat${girl} thrusts out ${his} arms in front of ${him} to show you`);
		if (eventSlave.intelligence + eventSlave.intelligenceImplant > 80) {
			t.push("a beautiful, handdrawn icon portraying you as a godlike figure above a large collection of distinct catgirl faces.");
			App.Events.addParagraph(node, t);

			t = [];
			t.push(`${eventSlave.slaveName} ${himself} is prominently displayed at the center of the catfolk at the bottom of the image, all of whom are looking up to you with big, worshipful smiles across their faces, pointed ears perked up. The bright golden hues make it look like a religious icon, but instead of a halo you're surrounded by two complex-looking genetic tubes; the faces of Dr. Nieskowitz and some other wizened scientists hang around you like angels. It's incredibly well-made, and even inlaid with a few sparkly things that seem to be whatever ${eventSlave.slaveName} could find lying around.`);
			if (canTalk(eventSlave)) {
				t.push(
					Spoken(eventSlave, `"I, uhm, wanted to make you something nice, ${title}..."`),
					`${eventSlave.slaveName} meows out sheepishly as ${he} holds the icon out towards you.`,
					Spoken(eventSlave, `"You made all of us, and um, well, you're so good and pretty and everything..." `)
				);
			} else {
				t.push(`${He} just holds out the icon, staring at you with big ${App.Desc.eyesColor(eventSlave)} that hope you get the meaning.`);
			}
			App.Events.addParagraph(node, t);
		} else if (eventSlave.intelligence + eventSlave.intelligenceImplant > 50) {
			t.push("an elegant, small clay sculpture portraying you surrounded by a few happy catgirls.");
			App.Events.addParagraph(node, t);

			t = [];
			t.push(`${He} holds the little sculpture out to you with wobbly hands, finding it hard to balance the unwieldy thing as you examine ${his} craftscatship. The sculpture is surprisingly pretty; one of the slaves around you is obviously supposed to be ${eventSlave.slaveName}, and they're all brushing up against you lovingly with individual expressions of happiness tediously moulded onto their faces.`);
			if (canTalk(eventSlave)) {
				t.push(
					Spoken(eventSlave, `"I thought you might like a better gift, so I found some clay in the workshop and made this, ${title}."`),
					`${eventSlave.slaveName} says, struggling to hold the awkward sculpture.`,
					Spoken(eventSlave, `"You're so nice to me and I like you so much, I, um, wanted to give you something to show how much I love you..." `)
				);
			} else {
				t.push(`${He} holds the sculpture out obediently as you examine it, ears twitching atop ${his} head as ${he} eagerly awaits your judgement.`);
			}
			App.Events.addParagraph(node, t);
		} else if (eventSlave.intelligence + eventSlave.intelligenceImplant > 35) {
			t.push("a pretty drawing of the two of you cuddling one another happily.");
			App.Events.addParagraph(node, t);

			t = [];
			t.push(`${He} displays the drawing proudly. It's surprisingly well-drawn, especially considering ${his} awkward, furry hands, and ${he}'s rendered all your features flatteringly with ${eventSlave.slaveName} lovingly cradling up against your chest like an old-world girlfriend. It's obvious that ${he}'s put a lot of work into drawing this, likely in ${his} spare time after finishing the day's assignments.`);
			if (canTalk(eventSlave)) {
				t.push(
					Spoken(eventSlave, `"I hope you like it, ${title}!"`),
					`${eventSlave.slaveName} says, eagerly watching your face as you study the nice drawing.`,
					Spoken(eventSlave, `"I worked really hard on it, but it's okay, because I got to look at your face the whole time, and you're extremely pretty, ${title}..."`)
				);
			}else {
				t.push(`${He} holds the drawing out enthusiastically, obviously proud of ${his} work and silently waiting for you to decide whether you're proud of it too.`);
			}
			App.Events.addParagraph(node, t);
		} else {
			t.push("a heart cut out of red construction paper showing crude figures of you and a catgirl holding hands and smiling.");
			App.Events.addParagraph(node, t);

			t = [];
			t.push(`Upon closer inspection, the crude cat figure is clearly intended to be ${eventSlave.slaveName}, and the two of you are standing above big white text written in what looks like crayon reading "I LUV U ${V.PC.title !== 0 ? `MASTER` : `MISTRESS`}". ${eventSlave.slaveName} trembles a little as you look at the simple drawing.`);
			if (canTalk(eventSlave)) {
				t.push(
					Spoken(eventSlave, `"I'm s-sorry ${title}..."`),
					`${eventSlave.slaveName} meows weakly, still holding out ${his} heart.`,
					Spoken(eventSlave, `"I w-wanted to make you something pretty like everybody else because I love you so m-much, but I can't draw good like them, ${title}... I h-hope you like it..."`)
				);
			} else {
				t.push(`${He} holds his little paper heart out for you, staring at you with big wide ${App.Desc.eyesColor(eventSlave)} as ${his} ears flatten preemptively, apparently expecting you to hate the crude offering.`);
			}
			App.Events.addParagraph(node, t);
		}

		App.Events.addResponses(node, [
			new App.Events.Result(`Tell ${him} that ${he} can show ${his} devotion best with a heartfelt ${PC.dick !== 0 ? "blowjob" : "cunnilingus sesh"}`, blowjob),
			new App.Events.Result(`Take the present and let ${him} cuddle up to you`, cuddle),
			new App.Events.Result(`Hang it in your display case`, displaycase),
			new App.Events.Result(`Tear it in two, scold ${him} for wasting time making worthless trinkets, and tell ${him} to get back to work`, breakheart),
		]);

		function blowjob() {
			let t = [];
			t.push(`You take ${eventSlave.slaveName}'s present and tell ${him} that ${he} can better show you just how much ${he} cares by getting on ${his} knees and giving you ${PC.dick !== 0 ? "a blowjob" : "some pussy eating"} from the heart.`);
			if (eventSlave.sexualFlaw !== "hates oral") {
				t.push(`The cat${girl} flashes you a smile full of sharp feline fangs that makes you rethink your decision for a brief moment before ${he} squats down, pressing out ${his} ass far enough to give you a good view of those furry cheeks as ${he} works your pants down, and`);
				if (eventSlave.skill.oral >= 80) {
					t.push(`${PC.dick !== 0 ? `gives you a magnificent, loving throatjob, taking your cock as far as it can bury itself in ${his} throat while working every last drop of cum out from your balls with ${his} soft, furry hands,` : `eats you out skillfully and intensely, working ${his} rough cat tongue deep into your pussy until ${he} brings you to a shuddering orgasm,`}`);
					t.push(`<span class="devotion inc">pointy ears twitching happily atop ${his} head the entire time.</span>`);
				} else if (eventSlave.skill.oral > 40) {
					t.push(`${PC.dick !== 0 ? `gives you a skillful blowjob, carefully avoiding scratching your dick on ${his} fangs as ${he} soon brings you to a powerful orgasm down ${his} throat,` : `tonguefucks you hard, burying ${his} soft button nose against your clit as ${he} works out an orgasm from your pussy,`}`);
					t.push(`<span class="devotion inc">fluffy tail waggling behind ${him} the whole time almost doggishly.</span>`);
				} else {
					t.push(`${PC.dick !== 0 ? `does ${his} best to give you a good blowjob, mostly nervously trying to avoid cutting your dick on ${his} sharp fangs until ${his} warm, amateurish mouth finally coaxes an orgasm out of you,` : `eats you out amateurishly, ${his} rough cat tongue scratching your folds slightly as ${he} twists it around to eventually bring you to orgasm,`}`);
					t.push(`<span class="devotion inc">pointy ears wiggling around on ${his} head lovingly the entire time.</span>`);
				}
				eventSlave.devotion += 2;
			} else {
				t.push(`${He} gives you a disgusted look owing to ${his} hate of oral, but nevertheless gets on ${his} knees and begrudgingly ${PC.dick !== 0 ? "gives you a powerful blowjob" : "eats you out passionately"}, wiping off ${his} mouth the second you cum.`);
				eventSlave.devotion -= 2;
			}
			seX(eventSlave, "oral", V.PC, "penetrative");
			return t;
		}

		function cuddle() {
			let t = [];
			t.push(`You gently take the handmade gift, pat ${eventSlave.slaveName} on ${his} fluffy head, and assure ${him} that it's beautiful. The cat${girl}'s entire face immediately lights up and ${he} launches ${himself} at you, wrapping ${his} furry arms around your waist in a hug so tight you have to place ${his} gift down on the ground to avoid dropping it. With the cat${girl} hugged so closely to your chest, you can hear ${him} purring like a motor against you, swishing ${his} tail around behind ${him} in the close embrace. ${He} doesn't say anything else, just lovingly purring against you until you free yourself from the devoted cat${girl}'s embrace to get back to work.`);
			eventSlave.trust += 5;
			eventSlave.devotion += 5;
			return t;
		}

		function displaycase() {
			let t = [];
			t.push(`You take ${eventSlave.slaveName} by the hand, still holding ${his} little present, and lead ${him} over to your office. As ${he} looks at you confused, you gingerly take the`);
			if (eventSlave.intelligence + eventSlave.intelligenceImplant > 80) {
				t.push(`beautiful icon from ${his} hand, open your display case with a twist of your private key, and place it inside. ${eventSlave.slaveName} takes a moment to process what's happening, then smiles wider than you've ever seen ${him} smile before and presses ${his} head against your chest.`);
				if (canTalk(eventSlave)) {
					t.push(Spoken(eventSlave, `"I'm so happy you like it, ${title}!",`));
				} else {
					t.push(`${He} purrs from the back of ${his} throat so intensely you can hear it against your heart,`);
				}
				t.push(`filled with <span class="trust inc">safety</span> and <span class="devotion inc">love from the bottom of ${his} heart.</span>`);
				addTrinket(`catgirl icon`, {name: eventSlave.slaveName, id:eventSlave.ID});
			} else if (eventSlave.intelligence + eventSlave.intelligenceImplant > 50) {
				t.push(`elegant clay sculpture from ${his} hands, open your display case with a twist of your private key, and place it inside. ${eventSlave.slaveName} takes a moment to process what's happening, then smiles wider than you've ever seen ${him} smile before and presses ${his} head against your chest, tears welling up in ${his} eyes.`);
				if (canTalk(eventSlave)) {
					t.push(
						Spoken(eventSlave, `"You're the best -- the best ${title} in the whole wide world, ${title}!"`),
						`She mrowls out while hugging you,`
					);
				} else {
					t.push(`${He} purrs from the back of ${his} throat so intensely you can hear it against your heart,`);
				}
				t.push(`filled with <span class="trust inc">safety</span> and <span class="devotion inc">love from the bottom of ${his} heart.</span>`);
				addTrinket(`cat clay sculpture`, {name: eventSlave.slaveName, id:eventSlave.ID});
			} else if (eventSlave.intelligence + eventSlave.intelligenceImplant > 35) {
				t.push(`pretty drawn picture from ${his} hands, open your display case with a twist of your private key, and place it inside. ${eventSlave.slaveName} takes a moment to process what's happening, then chokes out a shocked meow, opens ${his} mouth, half-meows again, and stutters. ${canTalk(eventSlave) ? `"Y-you really like it that much, ${title}?" She squeaks, and then, tears forming in the corner of ${his} eyes, launches into a tight, warm hug around your waist.` : `Incapable of saying anything further, ${he} simply launches himself at you and hugs you so tight it nearly squeezes on your ribs, tears forming at the corner of ${his} eyes.`} ${He}'s filled with the kind of safety and love from the bottom of ${his} heart that only comes from genuine adoration.`);
				addTrinket(`cat drawing`, {name: eventSlave.slaveName, id:eventSlave.ID});
			} else {
				t.push(`construction paper heart from ${his} hands, open your display case with a twist of your private key, and place it inside. ${eventSlave.slaveName} looks at you, looks at the display case, looks back at you, and then suddenly breaks into tears.`);
				if (canTalk(eventSlave)) {
					t.push(
						Spoken(eventSlave, `"${title} -- I l-love you so much --"`),
						`${He} almost whimpers, before hugging ${himself} around your waist so tight it feels like ${he}'s squeezing down your ribs.`
					);
				} else {
					t.push(`${He} simply sobs for a few moments, then hugs you with so much furry warmth that you swear you can feel ${his} heart beating against yours.`);
				}
				t.push(`${He}'s filled with the kind of <span class="trust inc">safety</span> and <span class="devotion inc">love from the bottom of ${his} heart</span> that only comes from genuine adoration.`);
				addTrinket(`cat crayon`, {name: eventSlave.slaveName, id:eventSlave.ID});
			}
			eventSlave.trust += 20;
			eventSlave.devotion += 20;
			return t;
		}

		function breakheart() {
			let t = [];
			t.push(`You take the loving gift from the quivering cat${girl}'s hands, tear it in half in a single, explosive motion, and let the two ripped pieces fall to the ground. ${eventSlave.slaveName} stares at you bewildered for a second before tears start to well up at the corners of ${his} eyes. As you open your mouth to scold ${him}, ${he} starts sobbing uncontrollably, crying in loud, ugly bawls that make it completely impossible to speak. When you order ${him} to stop, ${he} turns away from you, still sobbing, and sprints out of the hallway while some of your other slaves watch with a mixture of terror and shock on their faces. One of them trots off behind the bawling cat, probably either to comfort ${him} or rape ${him} while ${he}'s vulnerable. Irritated, you set a note for yourself to harshly punish the disobedient catslave later.`);
			eventSlave.trust -= 10;
			eventSlave.devotion -= 40;
			return t;
		}
	}
};