code:
App.EndWeek.corporationDevelopments = function() {
	const el = document.createElement("p");
	let r;
	/* Main Corporation Pass*/

	if (App.Corporate.getStored("Cash") < 0) {
		App.Corporate.setStored("Cash", Math.trunc(Math.trunc(App.Corporate.getStored("Cash") * 1.02))) /* 2% weekly interest rate on negative cash*/
	}
	App.UI.DOM.appendNewElement("h1", el, "Corporation Management");
	App.UI.DOM.appendNewElement("h2", el, "Operational Results");
	/* Divisions doing their thing*/
	const weekLedger = App.Corporate.endWeek();
	for (const i in weekLedger.divisionLedgers) {
		const d = weekLedger.divisionLedgers[i];
		const division = d.division;
		let r;
		/* Reporting on number of slaves being processed or completed processing */
		App.UI.DOM.appendNewElement("h3", el, division.name);
		App.Events.addNode(el, [`The division ${division.message_endWeek_Slaves(d)}`], "div");

		r = [];
		if (d.market.originalBuy != null) {
			if (d.market.buy === 0) {
				r.push(`It couldn't purchase ${numberWithPlural(d.market.originalBuy, "slave")} to replenish its stock from the market because it couldn't afford to purchase price.`);
			} else {
				r.push(`It needed to replenish its slave stock of ${numberWithPlural(d.market.originalBuy, "slave")}, but couldn't afford to buy all of them. It bought ${numberWithPlural(d.market.buy, division.nounSlaveFromMarket)} for ${cashFormatColor(d.market.finalPurchase, true)}.`);
			}
		} else if (d.market.buy > 0) {
			r.push(`It replenished its slave stock and bought ${numberWithPlural(d.market.buy, division.nounSlaveFromMarket)} from the market for ${cashFormatColor(d.market.finalPurchase, true)}.`);
		}
		App.Events.addNode(el, r, "div");

		if (d.transfer.total > 0) {
			for (const i in d.transfer.divisions) {
				const nextDivLedger = d.transfer.divisions[i];
				const nextDiv = nextDivLedger.division;
				const slavesToNext = nextDivLedger.fill;
				App.Events.addNode(el, [`It moved ${numberWithPlural(slavesToNext, "slave")} to the ${nextDiv.name} Division.`], "div");
			}
		}
		if (division.toMarket) {
			r = [];
			if (division.heldSlaves === 0) {
				if (d.market.sell > 0) {
					r.push(`It immediately sold ${numberWithPlural(d.market.sell, division.nounFinishedSlave)} to the market and made ${cashFormatColor(d.market.finalSale)}.`);
				}
			} else {
				r.push(`It holds <span class="positive">${numberWithPlural(division.heldSlaves, division.nounFinishedSlave)}</span> at the end of the`);
				if (d.market.sell > 0) {
					r.push(`week, but it ran out of storage space and had to sell <span class="red">${numberWithPlural(d.market.sell, "slave")}</span> and made ${cashFormatColor(d.market.finalSale)}.`);
				} else {
					r.push(`week.`);
				}
			}
			App.Events.addNode(el, r, "div");
		}
		if (d.revenue.value > 0) {
			App.Events.addNode(el, [`It earned ${cashFormatColor(d.revenue.value)} in revenue.`], "div");
		}
	}

	/* Aggregate Corporation Results*/
	el.append(App.Corporate.writeLedger(App.Corporate.ledger.current, V.week));

	/* Division Expansion Tokens*/
	if (weekLedger.canExpandNow) {
		App.UI.DOM.appendNewElement("div", el, "Your corporation is ready to start an additional division!", "majorText");
	}

	/* Specializations tokens*/
	if (weekLedger.canSpecializeNow) {
		App.UI.DOM.appendNewElement("div", el, "Your corporation is ready to specialize its slaves further!", "majorText");
	}

	/* Calculating cash set aside for dividend*/
	App.UI.DOM.appendNewElement("h2", el, "Dividend");
	r = [];
	if (V.dividendRatio > 0) {
		r.push(`The corporation is currently reserving ${Math.floor(V.dividendRatio * 100)}% of its profit to be paid out as dividends.`);
	} else {
		r.push(`The corporation is currently not reserving a portion of its profit to be paid out as dividends.`);
	}
	if (App.Corporate.getStored("CashDividend") === 1) {
		r.push(`It is putting aside unused cash reserves to be paid out as dividends.`);
	}
	App.Events.addNode(el, r, "div");

	if (App.Corporate.getStored("Dividend") > 0) {
		r = [];
		if (weekLedger.hasDividend) {
			r.push(`It reserved ${cashFormatColor(weekLedger.dividend)} this week.`);
		}
		r.push(`A total of ${cashFormatColor(App.Corporate.getStored("Dividend"))} has been put aside for its shareholders.`);
		App.Events.addNode(el, r, "div");
	}

	if (weekLedger.hasPayout) {
		App.Events.addNode(el, [`This week the dividends were paid out, you received ${cashFormatColor(weekLedger.payout)}.`], "div");
	}

	/* Bankrupted the Corporation*/
	if (App.Corporate.calculateValue() < 0) {
		App.Corporate.dissolve();
		App.UI.DOM.appendNewElement("div", el, "Your corporation went bankrupt.", "red");
	}
	/* This needs to be at the very end of the financials*/
	App.Corporate.ledger.swap();
	return el;
};


code:
App.EndWeek.economics = function() {
	const node = new DocumentFragment();
	App.UI.DOM.appendNewElement("h1", node, `${V.arcologies[0].name} Weekly Financial Report — Week ${V.week}`);

	if (V.cash > -10000) {
		V.debtWarned = 0;
	}
	if (V.mods.food.enabled && V.mods.food.market &&
		(V.mods.food.amount > App.Facilities.Farmyard.foodConsumption() ||
		V.cash > App.Facilities.Farmyard.foodConsumption() * V.mods.food.cost)) {
		V.mods.food.warned = false;
	}

	SectorCounts();
	App.Arcology.updateOwnership();

	node.append(App.EndWeek.marketsReport());

	/**
	 * @typedef {Object} economicsReport
	 * @property {string} name
	 * @property {boolean} requirements
	 * @property {DocumentFragment|HTMLElement} report
	 */

	/** @type {Map<string, economicsReport>} */
	const reportsMap = new Map([
		["arcologies", {
			name: "Arcologies",
			requirements: true,
			get report() { return App.EndWeek.neighborsDevelopment(); }
		}],
		["management", {
			name: "Arcology Management",
			requirements: true,
			get report() { return App.EndWeek.arcManagement(); }
		}],
		["societies", {
			name: "Society Development",
			get requirements() { return V.FSAnnounced > 0; },
			get report() { return App.EndWeek.FSDevelopments(); }
		}],
		["corporation", {
			name: "Corporation Developments",
			get requirements() { return V.corp.Incorporated === 1; },
			get report() { return App.EndWeek.corporationDevelopments(); }
		}],
		["authority", {
			name: "Authority",
			get requirements() { return V.secExpEnabled > 0; },
			get report() { return App.Mods.SecExp.authorityReport(); }
		}],
		["securityReport", {
			name: "Security",
			get requirements() { return V.secExpEnabled > 0; },
			get report() { return App.Mods.SecExp.securityReport(); }
		}],
		["reputation", {
			name: "Reputation",
			requirements: true,
			get report() { return App.EndWeek.reputation(); }
		}],
		["business", {
			name: "Personal Business",
			requirements: true,
			get report() { return App.EndWeek.personalBusiness(); }
		}],
		["personal", {
			name: "Personal Notes",
			requirements: true,
			get report() { return App.EndWeek.personalNotes(); }
		}],

	]);

	if (V.useTabs === 0) {
		for (const report of reportsMap.values()) {
			if (report.requirements) {
				node.append(report.report);
			}
		}
	} else {
		const tabBar = new App.UI.Tabs.TabBar("Economics");
		for (const [title, report] of reportsMap) {
			if (report.requirements) {
				tabBar.addTab(report.name, title, report.report);
			}
		}
		node.append(tabBar.render());
	}

	return node;
};

repo_name: Fanatey/fc

license: mit


code:
App.EndWeek.FSDevelopments = function() {
	const el = document.createElement("div");
	let r = [];
	const arc = V.arcologies[0];
	if (V.useTabs === 0) {
		App.UI.DOM.appendNewElement("h2", el, "Society");
	}

	const FSRepCreditsRep = [
		[7000, 11000, 15000],
		[6000, 9000, 12000, 15000],
		[6000, 9000, 12000, 14000, 16000],
		[6000, 9000, 11000, 13000, 15000, 17000]
	];
	const FSRepDescriptors = ["solid", "high", "remarkable", "great", "excellent", "unparalleled"];
	const ordinalNames = ["second", "third", "fourth", "fifth", "sixth", "seventh", "eighth"];
	if (FutureSocieties.availCredits() > 0) {
		r.push(`<span class="yellow">${arc.name}'s society is ready to begin accepting a new societal direction.</span>`);
	}

	if (V.FSAnnounced === 1 && V.FSGotRepCredits < V.FSCreditCount && V.rep >= FSRepCreditsRep[V.FSCreditCount - 4][V.FSGotRepCredits - 1]) {
		const descriptor = (V.FSGotRepCredits === 1) ? FSRepDescriptors[0] : FSRepDescriptors[Math.trunc(V.FSGotRepCredits / (V.FSCreditCount - 1) * FSRepDescriptors.length - 1)];
		let ordinalName = ordinalNames[V.FSGotRepCredits - 1];
		if (V.FSGotRepCredits === V.FSCreditCount - 1) {
			ordinalName += " and final";
		}
		r.push(`<span class="yellow">Your reputation is so ${descriptor} that ${arc.name}'s society is ready to begin accepting a ${ordinalName} societal direction.</span>`);
		V.FSGotRepCredits += 1;
	}

	/* Count adopted FS */
	const societies = FutureSocieties.activeCount(arc);

	/* Spending, terrain, rep effects */
	let broadProgress = 0;
	if (V.SF.Toggle && V.SF.Active >= 1 && V.SF.UC.Assign > 0) {
		r.push(`Assigning a ${(V.SF.UC.Assign === 1) ? `small` : `large`} portion of ${V.SF.Lower} to undercover work helps to advance your cultural goals.`);
		const value = (V.SF.UC.Assign === 1) ? V.SF.ArmySize * 0.05 : V.SF.ArmySize * 0.25;
		broadProgress += value / 100;
		App.Events.addNode(el, r, "div");
		r = [];
	}
	if (V.FSSpending > 1) {
		r.push(`Your <span class="yellowgreen">societal spending</span> helps forward your goals for the arcology's future.`);
		broadProgress += Math.trunc(V.FSSpending / (1000 - (500 * arc.FSEdoRevivalistLaw) - (250 * arc.FSArabianRevivalistLaw)));
	}
	const weeksOfFCTV = V.week - V.FCTV.weekEnabled;
	if (V.FCTV.receiver === 3) {
		r.push(`Your customized <span class="yellowgreen">FCTV programming</span> strongly influences your citizens, greatly helping define your arcology's culture.`);
		if (weeksOfFCTV > 29) {
			broadProgress += 3;
		} else if (weeksOfFCTV > 19) {
			broadProgress += 2;
		} else if (weeksOfFCTV > 4) {
			broadProgress += 1;
		}
	} else if (V.FCTV.receiver === 2) {
		r.push(`Your customized <span class="yellowgreen">FCTV programming</span> influences your citizens, helping define your arcology's culture.`);
		if (weeksOfFCTV > 34) {
			broadProgress += 3;
		} else if (weeksOfFCTV > 23) {
			broadProgress += 2;
		} else if (weeksOfFCTV > 8) {
			broadProgress += 1;
		}
	} else if (V.FCTV.receiver === 1) {
		r.push(`Your customized <span class="yellowgreen">FCTV programming</span> influences a small number of your citizens, slightly helping define your arcology's culture.`);
		if (weeksOfFCTV > 39) {
			broadProgress += 2;
		} else if (weeksOfFCTV > 24) {
			broadProgress += 1;
		}
	}

	const propagandaEffects = App.Mods.SecExp.propagandaEffects("social engineering");
	r.push(propagandaEffects.text);
	broadProgress += propagandaEffects.effect;

	if (V.terrain === "urban") {
		r.push(`The <span class="yellow">urban location</span> of the arcology naturally promotes cultural interchange, holding back ${arc.name}'s cultural independence.`);
		broadProgress -= 3;
	} else if (V.terrain === "rural") {
		r.push(`The <span class="yellow">rural location</span> of the arcology naturally limits cultural interchange, allowing ${arc.name} to slowly develop its own culture.`);
		broadProgress -= 2;
	} else if (V.terrain === "marine") {
		r.push(`The <span class="yellow">marine location</span> of the arcology strongly limits cultural interchange, allowing ${arc.name} to quickly develop its own culture.`);
		broadProgress -= 1;
	} else if (V.terrain === "ravine") {
		r.push(`The <span class="yellow">near subterranean location</span> of the arcology almost eliminates cultural interchange, allowing ${arc.name} to independently develop its culture.`);
	} else {
		r.push(`The <span class="yellow">oceanic location</span> of the arcology almost eliminates cultural interchange, allowing ${arc.name} to independently develop its culture.`);
	}
	if (V.rep < 3000 - V.enduringRep) {
		r.push(`<span class="red">Your weak reputation</span> reflects badly on your social projects.`);
		broadProgress -= 2;
	} else if (V.rep < 6000 - V.enduringRep) {
		r.push(`<span class="red">Your mediocre reputation</span> engenders skepticism towards your social development.`);
		broadProgress -= 1;
	} else if (V.rep < 9000 - V.enduringRep) {
		r.push(`<span class="yellow">Your reputation</span> is neither weak enough or strong enough to affect social development.`);
	} else if (V.rep < 12000 - V.enduringRep) {
		r.push(`<span class="positive">Your strong reputation</span> helps support social development.`);
		broadProgress += 1;
	} else if (V.rep < 16000 - V.enduringRep) {
		r.push(`<span class="positive">Your very strong reputation</span> increases acceptance of your social development.`);
		broadProgress += 2;
	} else {
		r.push(`<span class="positive">Your incredible reputation</span> encourages automatic acceptance of your social development.`);
		broadProgress += 4;
	}
	if (V.FSCreditCount === 4) {
		broadProgress += 1 - societies;
		switch (societies) {
			case 1:
				r.push(`Maintaining a single societal goal allows <span class="positive">very focused social engineering.</span>`);
				break;
			case 2:
				r.push(`Maintaining two societal goals allows <span class="positive">focused social engineering.</span>`);
				break;
			case 3:
				r.push(`Maintaining three societal goals requires <span class="yellow">broad social engineering.</span>`);
				break;
			case 4:
				r.push(`Maintaining four societal goals requires <span class="red">unfocused social engineering.</span>`);
				break;
		}
	} else if (V.FSCreditCount === 6) {
		broadProgress += 3 - societies;
		switch (societies) {
			case 1:
				r.push(`Maintaining a single societal goal allows <span class="positive">very focused social engineering.</span>`);
				break;
			case 2:
				r.push(`Maintaining two societal goals allows <span class="positive">focused social engineering.</span>`);
				break;
			case 3:
				r.push(`Maintaining three societal goals allows <span class="yellow">barely focusable social engineering.</span>`);
				break;
			case 4:
				r.push(`Maintaining four societal goals requires <span class="yellow">broad social engineering.</span>`);
				break;
			case 5:
				r.push(`Maintaining five societal goals requires <span class="red">unfocused social engineering.</span>`);
				break;
			case 6:
				r.push(`Maintaining six societal goals requires <span class="red">very unfocused social engineering.</span>`);
				break;
		}
	} else if (V.FSCreditCount === 7) {
		broadProgress += 3 - societies;
		switch (societies) {
			case 1:
				r.push(`Maintaining a single societal goal allows <span class="positive">very focused social engineering.</span>`);
				break;
			case 2:
				r.push(`Maintaining two societal goals allows <span class="positive">focused social engineering.</span>`);
				break;
			case 3:
				r.push(`Maintaining three societal goals allows <span class="yellow">barely focusable social engineering.</span>`);
				break;
			case 4:
				r.push(`Maintaining four societal goals requires <span class="yellow">broad social engineering.</span>`);
				break;
			case 5:
				r.push(`Maintaining five societal goals requires <span class="red">unfocused social engineering.</span>`);
				break;
			case 6:
				r.push(`Maintaining six societal goals requires <span class="red">very unfocused social engineering.</span>`);
				break;
			case 7:
				r.push(`Maintaining seven societal goals requires <span class="red">extremely unfocused social engineering.</span>`);
				break;
		}
	} else {
		broadProgress += 2 - societies;
		switch (societies) {
			case 1:
				r.push(`Maintaining a single societal goal allows <span class="positive">very focused social engineering.</span>`);
				break;
			case 2:
				r.push(`Maintaining two societal goals allows <span class="positive">focused social engineering.</span>`);
				break;
			case 3:
				r.push(`Maintaining three societal goals requires <span class="yellow">broad social engineering.</span>`);
				break;
			case 4:
				r.push(`Maintaining four societal goals requires <span class="red">unfocused social engineering.</span>`);
				break;
			case 5:
				r.push(`Maintaining five societal goals requires <span class="red">very unfocused social engineering.</span>`);
				break;
		}
	}
	/* closes FS count changes */
	if (broadProgress !== 0) {
		FutureSocieties.applyBroadProgress(0, broadProgress);
	}

	if (V.secExpEnabled > 0) {
		if (V.SecExp.edicts.slaveWatch === 1) {
			r.push(`The Slave Mistreatment Watch helps many slaves, easing your citizens into the paternalist ideals it represents.`);
			FutureSocieties.Change("Paternalist", 2);
		}

		if (V.SecExp.edicts.defense.noSubhumansInArmy === 1) {
			r.push(`Your army is free of subhumans, further cementing their lower status in the eyes of your citizens.`);
			FutureSocieties.Change("Subjugationist", 2);
		}

		if (V.SecExp.edicts.defense.pregExemption === 1) {
			r.push(`Pregnant citizens are allowed and encouraged to avoid military service, making their value evident to all citizens.`);
			FutureSocieties.Change("Repopulationist", 2);
		}

		if (V.SecExp.edicts.defense.eliteOfficers === 1) {
			r.push(`Purity in leadership is fundamental in your army, helping eugenics ideals spread in the populace.`);
			FutureSocieties.Change("Eugenics", 2);
		}

		if (V.SecExp.edicts.defense.liveTargets === 1) {
			r.push(`Disobedient slaves are used in shooting ranges and military drills as live targets, furthering degradationist ideals.`);
			FutureSocieties.Change("Degradationist", 2);
		}
	}

	/* Promenade effects */
	const cells = V.building.findCells(cell => cell instanceof App.Arcology.Cell.Shop && !["Brothel", "Club", "Shops"].includes(cell.type));
	for (const cell of cells) {
		r.push(`The ${cell.type} establishments on the Promenade help develop society.`);
		FutureSocieties.Change(cell.type, 4);
	}

	/* PA FS bonuses */
	if (V.policies.publicPA === 1 && V.assistant.appearance !== "normal") {
		let seed = 0;
		for (const FS of App.Data.FutureSociety.playerFSNames.filter(FS => FS !== "FSNull")) {
			if (arc[FS] !== "unset") {
				if (App.Data.Assistant.appearanceForFS.get(FS).includes(V.assistant.appearance)) {
					arc[FS] += 0.1 * V.FSSingleSlaveRep;
					seed = seed || 1;
				} else if (
					(V.assistant.fsAppearance === App.Data.FutureSociety.records[FS].adj.toLowerCase()) ||
					(V.assistant.fsAppearance === App.Data.FutureSociety.records[FS].noun.toLowerCase()) ||
					(FS === "FSHedonisticDecadence" && V.assistant.fsAppearance === "hedonistic decadence") ||
					(FS === "FSNeoImperialist" && V.assistant.fsAppearance === "neoimperialist")
				) {
					arc[FS] += 0.1 * V.FSSingleSlaveRep;
					seed = 2;
				}
			}
		}

		App.Events.addParagraph(el, r);
		r = [];
		const {hisA} = getPronouns(assistant.pronouns().main).appendSuffix('A');
		r.push(`With ${hisA} ${V.assistant.appearance} appearance, ${V.assistant.name}'s public visibility meshes`);
		if (seed === 2) {
			r.push(`very well`);
		} else if (seed === 1) {
			r.push(`well`);
		}
		r.push(`with society.`);
	}

	/* Progress overflow into influence */
	FutureSocieties.overflowToInfluence(0);

	/* warm up policy influence */
	if (arc.FSEgyptianRevivalistIncestPolicy === 1 && arc.FSEgyptianRevivalistInterest < 26) {
		arc.FSEgyptianRevivalistInterest += arc.FSEgyptianRevivalistIncestPolicy;
	} else if (arc.FSEgyptianRevivalistIncestPolicy === 0 && arc.FSEgyptianRevivalistInterest > 0) {
		arc.FSEgyptianRevivalistInterest--;
	}

	if ((arc.FSRepopulationFocusPregPolicy === 1 || arc.FSRepopulationFocusMilfPolicy === 1) && arc.FSRepopulationFocusInterest < 26) {
		arc.FSRepopulationFocusInterest += arc.FSRepopulationFocusPregPolicy + arc.FSRepopulationFocusMilfPolicy;
		if (arc.FSEugenicsInterest > 0) {
			arc.FSEugenicsInterest--;
		}
	} else if (arc.FSRepopulationFocusPregPolicy === 0 && arc.FSRepopulationFocusMilfPolicy === 0 && arc.FSRepopulationFocusInterest > 0) {
		arc.FSRepopulationFocusInterest--;
	}

	if ([arc.FSSupremacistSMR, arc.FSSubjugationistSMR, arc.FSGenderFundamentalistSMR, arc.FSPaternalistSMR, arc.FSDegradationistSMR, arc.FSBodyPuristSMR, arc.FSTransformationFetishistSMR, arc.FSYouthPreferentialistSMR, arc.FSMaturityPreferentialistSMR, arc.FSSlimnessEnthusiastSMR, arc.FSAssetExpansionistSMR, arc.FSPastoralistSMR, arc.FSPhysicalIdealistSMR, arc.FSChattelReligionistSMR, arc.FSRomanRevivalistSMR, arc.FSAztecRevivalistSMR, arc.FSEgyptianRevivalistSMR, arc.FSEdoRevivalistSMR, arc.FSRepopulationFocusSMR, arc.FSRestartSMR, arc.FSHedonisticDecadenceSMR, arc.FSIntellectualDependencySMR, arc.FSSlaveProfessionalismSMR, arc.FSPetiteAdmirationSMR, arc.FSStatuesqueGlorificationSMR, arc.FSArabianRevivalistSMR, arc.FSChineseRevivalistSMR, arc.FSNeoImperialistSMR, arc.FSGenderRadicalistSMR].some((SMR) => SMR > 0)) { // RadicalistSMR was unused since vanilla, but maybe some day....
		r.push(`The slave market regulations help ensure the arcology's slaves fit within its society.`);
	}

	for (const FS of App.Data.FutureSociety.playerFSNames.filter(FS => FS !== "FSNull")) {
		if (arc[FS] !== "unset") {
			const FSDecoration = `${FS}Decoration`;
			r.push(FutureSocieties.arcSupport(FS));
			if (arc[FS] < 0 && (FS !== "FSRestart" || arc.FSRestartDecoration !== 100)) {
				r.push(removeFS(FS));
			} else if (arc[FS] > arc[FSDecoration]) {
				arc[FS] = arc[FSDecoration];
			}
			if (arc[FSDecoration] < V.FSLockinLevel) {
				if (arc[FS] === arc[FSDecoration]) {
					r.push(`<span class="yellow">Your societal development in this direction is being limited by ${arc.name}'s lack of customization to support it.</span>`);
					V.FSReminder = 1;
				} else if (arc[`${FS}SMR`] === 1) {
					arc[FS] += 0.1 * V.FSSingleSlaveRep;
				}
			}
		}
	}

	App.UI.SlaveSummary.societyChanged();
	App.Events.addNode(el, r, "div");
	return el;

	function removeFS(FS) {
		FutureSocieties.remove(FS);
		return `Your future society project has failed: your citizens were repelled from your idea more than they were attracted to it. You may select another option, or elect to try again.`;
	}
};


code:
/**
 * @returns {HTMLElement}
 */
App.EndWeek.marketsReport = function() {
	const el = document.createElement("p");
	App.UI.DOM.appendNewElement("span", el, "FC Markets Report: ", "note");

	const assetAffected = either("capture", "drugs", "entrapment", "general", "slaves", "surgical", "training");
	const assetsUp = (random(1, 100) > 50);
	let desc = "";

	switch (assetAffected) {
		case "general": {
			if (assetsUp) {
				if (random(1, 100) > 50) {
					desc = `...rising energy costs drove <span class="yellowgreen">rising prices</span> of several market baskets...`;
				} else {
					desc = `...conflict-driven increases in transportation costs increase <span class="yellowgreen">price indices...</span>`;
				}
			} else {
				if (random(1, 100) > 50) {
					desc = `...increasing Free Cities slave labor effects <span class="gold">general prices...</span>`;
				} else {
					desc = `...Antarctic oil shale pushing down energy prices, driving down major <span class="gold">price indices...</span>`;
				}
			}
			break;
		}
		case "slaves": {
			if (assetsUp) {
				if (random(1, 100) > 50) {
					desc = `...heavy demand for fashionable varieties drove <span class="yellowgreen">rising slave prices</span> last...`;
				} else {
					desc = `...study suggested the sexual revolution would continue to drive up <span class="yellowgreen">slave prices...</span>`;
				}
			} else {
				if (random(1, 100) > 50) {
					desc = `...increased supply due to bush wars drove down <span class="gold">slave prices...</span>`;
				} else {
					desc = `...<span class="gold">slave prices</span> continue to fall due to major improvements in training...`;
				}
			}
			break;
		}
		case "entrapment": {
			if (assetsUp) {
				if (random(1, 100) > 50) {
					desc = `...prospect of deregulation drove a <span class="yellowgreen">scramble</span> for means of enslavement...`;
				} else {
					desc = `...law would legalize enslavement, driving <span class="yellowgreen">high prices</span> for associated...`;
				}
			} else {
				if (random(1, 100) > 50) {
					desc = `...reactionism produced lower demand and <span class="gold">lower prices</span> for legal enslavement...`;
				} else {
					desc = `...report on low success rates <span class="gold">drove down</span> value of legal enslavement methods...`;
				}
			}
			break;
		}
		case "capture": {
			if (assetsUp) {
				if (random(1, 100) > 50) {
					desc = `...declaration of war <span class="yellowgreen">pushed up</span> average mercenary wage...`;
				} else {
					desc = `...advancing technology to blame for <span class="yellowgreen">rising costs</span> of assets for wet work...`;
				}
			} else {
				if (random(1, 100) > 50) {
					desc = `...rumored peace treaty <span class="gold">pushed down</span> mercenary contract clearing rate...`;
				} else {
					desc = `...demobilization of the cash-strapped army expected to produce mercenary <span class="gold">glut...</span>`;
				}
			}
			break;
		}
		case "training": {
			if (assetsUp) {
				if (random(1, 100) > 50) {
					desc = `...rising demand in turn <span class="yellowgreen">pushing up</span> prices for most means of slave training...`;
				} else {
					desc = `...public demand for ever-better slave training inevitably <span class="yellowgreen">increase</span> training costs...`;
				}
			} else {
				if (random(1, 100) > 50) {
					desc = `...competition from low-cost slave breaking firms <span class="gold">reducing</span> asking price for...`;
				} else {
					desc = `...increased automation of slave training <span class="gold">negatively impacting</span> training contracts...`;
				}
			}
			break;
		}
		case "surgical": {
			if (assetsUp) {
				if (random(1, 100) > 50) {
					desc = `...fashionable extravagant implant procedures <span class="yellowgreen">driving prices</span> of remote surgical...`;
				} else {
					desc = `...near-universal breast implants producing corresponding <span class="yellowgreen">price inflation</span> of surgery...`;
				}
			} else {
				if (random(1, 100) > 50) {
					desc = `...vastly reduced overhead with remote surgery <span class="gold">hitting prices</span> of surgery hard...`;
				} else {
					desc = `...oversupply after major manufacturers converted lines to <span class="gold">low-cost</span> implant production...`;
				}
			}
			break;
		}
		case "drugs": {
			if (assetsUp) {
				if (random(1, 100) > 50) {
					desc = `...intense demand for curatives in conflict zones <span class="yellowgreen">increasing prices...</span>`;
				} else {
					desc = `...setbacks in growth hormone human testing expected to <span class="yellowgreen">increase prices</span> of traditional formula...`;
				}
			} else {
				if (random(1, 100) > 50) {
					desc = `...new formula <span class="gold">cut costs</span> of common curatives by an unprecedented...`;
				} else {
					desc = `...glut caused by big pharma reorienting towards <span class="gold">cheap,</span> mass-produced aphros...`;
				}
			}
			break;
		}
	}
	$(el).append(desc);
	return el;
};