code:
:: Nursery Workaround [nobr]

<<if $cribs.length < $nursery>>
	<<run App.Facilities.Nursery.newChild($activeChild)>>
	/*<<= App.Facilities.Nursery.nameChild($activeChild)>>*/
<</if>>

license: mit


code:
:: Previous Child In Line

<<silently>>

<<set $i = $cribs.findIndex(function(c) { return c.ID === $activeChild.ID; })>>
<<set $cribs[$i] = $activeChild>> /* save changes before switching */
<<if $i == 0>>
	<<set $activeChild = $cribs[$cribs.length - 1]>>
	<<if $activeChild.actualAge < 3>>
		<<goto "Infant Interact">>
	<<else>>
		<<goto "Child Interact">>
	<</if>>
<<else>>
	<<set $activeChild = $cribs[$i-1]>>
	<<if $activeChild.actualAge < 3>>
		<<goto "Infant Interact">>
	<<else>>
		<<goto "Child Interact">>
	<</if>>
<</if>>

<</silently>>


code:
:: Rename Child [nobr]

<<set $nextButton = "Back", $nextLink = "Slave Interact">>

<<if $activeChild.slaveName === $oldName && $activeChild.slaveSurname === $oldSurname>>
	<<goto "Slave Interact">>
<<else>>
/* First time renaming reaction */
<<if $activeChild.slaveName === "" || ndef $activeChild.slaveName>>
	$oldName needs to be called something on the records, so $oldName $he stays.
	<<set $activeChild.slaveName = $oldName>>
<<elseif $activeChild.fetish == "mindbroken">>
	$activeChild.slaveName doesn't even recognize that $he's been renamed. It simply does not register.
<<elseif ($oldName != $activeChild.birthName && $oldSurname != $activeChild.birthSurname) && ($activeChild.slaveName == $activeChild.birthName || $activeChild.slaveSurname == $activeChild.birthSurname)>>
	$activeChild.slaveName
	<<if $activeChild.devotion > 50>>
		cheerfully accepts $his old name back.
	<<elseif $activeChild.devotion >= -20>>
		obediently accepts $his old name back.
	<<elseif $activeChild.devotion >= -50>>
		happily accepts $his original name.
	<<elseif $activeChild.trust > 20>>
		scoffs at the notion that $he was ever anything other than <<= SlaveFullBirthName($activeChild)>>, @@.orangered;weakening your control over $him.@@
		<<set $activeChild.trust += 5>>
	<<else>>
		cautiously accepts the return of $his name.
	<</if>>
<<elseif $oldName == $activeChild.birthName || $oldSurname == $activeChild.birthSurname>>
	$activeChild.slaveName
	<<if $activeChild.devotion > 50>>
		accepts $his new name cheerfully. This attachment to you @@.hotpink; increases $his devotion.@@
		<<set $activeChild.devotion += 4>>
	<<elseif $activeChild.devotion >= -20>>
		obediently accepts $his new name. This surrender to you @@.hotpink; increases $his obedience.@@
		<<set $activeChild.devotion += 4>>
	<<elseif $activeChild.devotion >= -50>>
		reluctantly accepts $his new name.
	<<else>>
		angrily tries to resist $his new name, insisting that $his name is <<= SlaveFullBirthName($activeChild)>>. This resistance @@.mediumorchid; increases $his rebelliousness.@@
		<<set $activeChild.devotion -= 5>>
	<</if>>
<<else>>
	Since $activeChild.slaveName has already had a new name <<if $activeChild.devotion > 20>>given to<<else>>forced on<</if>> $him before, the mere fact of having it changed again doesn't really affect $him.
<</if>>

<<set _insultingName = 0>>
<<if $oldName != $activeChild.slaveName && typeof $activeChild.slaveName == "string">>
	<<set _toSearch = $activeChild.slaveName.toLowerCase()>>
	<<for $i = 0; $i < setup.badWords.length; $i++>>
		<<if _toSearch.indexOf(setup.badWords[$i]) != -1>>
			<<set _insultingName = 1>>
			<<break>>
		<</if>>
	<</for>>
<</if>>
<<if !_insultingName>>
	<<if $oldSurname != $activeChild.slaveSurname && typeof $activeChild.slaveSurname == "string">>
		<<set _toSearch = $activeChild.slaveSurname.toLowerCase()>>
		<<for $i = 0; $i < setup.badWords.length; $i++>>
			<<if _toSearch.indexOf(setup.badWords[$i]) != -1>>
				<<set _insultingName = 1>>
				<<break>>
			<</if>>
		<</for>>
	<</if>>
<</if>>
<<if _insultingName == 1>>
	<<if $activeChild.fetish == "mindbroken">>
		$His new name would be insulting to a normal $girl, but $he dully accepts that it is an accurate description and goes about $his duties.
	<<elseif $activeChild.devotion < -50>>
		Being given such a degrading name @@.mediumorchid;further increases $his hatred@@ of you.
		<<set $activeChild.devotion -= 5>>
	<<elseif $activeChild.devotion <= 50>>
		Being given such a degrading name @@.gold;terrifies $him,@@ since $he thinks it's fair warning for what $he'll suffer in the future.
		<<set $activeChild.trust -= 5>>
	<</if>>
<</if>>

/* Wife's surname reaction */
<<if $oldSurname != $activeChild.slaveSurname>>
	<<if $activeChild.relationship >= 5>>
		<<set _i = $slaveIndices[$activeChild.relationshipTarget]>>
		<<if ndef _i>>@@.red;Error, relationshipTarget not found.@@<</if>>
			<<if $slaves[_i].slaveSurname>>
			<<if $activeChild.slaveSurname == $slaves[_i].slaveSurname>>
				$He's touched that $he now shares a surname with $his wife $slaves[_i].slaveName $slaves[_i].slaveSurname, and is @@.mediumaquamarine;more confident than ever@@ that you intend to keep them together in marital bliss.
				<<set $activeChild.trust += 5>>
			<<elseif $oldSurname == $slaves[_i].slaveSurname>>
				$He's concerned that $he no longer shares a surname with $his wife $slaves[_i].slaveName $slaves[_i].slaveSurname, and is @@.gold;very worried@@ that you might be considering splitting them up.
				<<set $activeChild.trust -= 5>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

/* PC's surname reaction */
<<if $oldSurname != $activeChild.slaveSurname>>
	<<if $activeChild.relationship == -3>>
		<<if $PC.slaveSurname>>
			<<if $activeChild.fetish == "mindbroken">>
				Names are meaningless to $him and it is unlikely $he'll remember it.
			<<elseif $activeChild.devotion+$activeChild.trust >= 175>>
				<<if $activeChild.slaveSurname == $PC.slaveSurname>>
					<<if hasAnyArms($activeChild)>>
						When you tell $him that $he's to be known as $activeChild.slaveName $activeChild.slaveSurname now, $he starts to cry. $He tries to get $himself under control and thank you as best $he can, wiping at the tears running down $his $activeChild.skin cheeks, but $he can't seem to stop weeping as $he thanks you over and over. $He's a sex slave, your property, and it's understandable that some doubts about the permanence of $his place as your slave wife. This has @@.mediumaquamarine;helped reassure $him,@@ and explains the strength of $his emotional reaction. The next time you make love to $him, $he @@.hotpink;presses $himself as close to you as $he can,@@ eager to drink in as much of your presence as $he can get.
					<<else>>
						$He's @@.hotpink;deeply touched@@ that $he now shares a surname with you, and has @@.mediumaquamarine;an additional source of confidence@@ that $he'll remain your amputee slave wife.
					<</if>>
					<<set $activeChild.devotion += 5, $activeChild.trust += 5>>
				<<elseif $oldSurname == $PC.slaveSurname>>
					$He's devastated that you'd rename $him something other than your name. $He's @@.gold;terrified@@ that you intend to discard $him as your slave wife, and @@.mediumorchid;saddened@@ that you would take away something that was precious to $him.
					<<set $activeChild.devotion -= 5, $activeChild.trust -= 5>>
				<</if>>
			<<elseif $activeChild.devotion < -20 && $activeChild.trust > 20>>
				<<if $activeChild.slaveSurname == $PC.slaveSurname>>
					When you tell $him that $he's to be known as $activeChild.slaveName $activeChild.slaveSurname now, $he shows no reaction. You already took everything from $him, what's a name at this point?
				<<elseif $oldSurname == $PC.slaveSurname>>
					$He doesn't care about losing your surname at first, but it quickly sets in that $he may have @@.gold;pushed $his position too far.@@
					<<set $activeChild.trust -= 20>>
				<</if>>
			<<elseif $activeChild.devotion < -20>>
				<<if $activeChild.slaveSurname == $PC.slaveSurname>>
					When you tell $him that $he's to be known as $activeChild.slaveName $activeChild.slaveSurname now, $he pleads with you not to steal $his name. It matters little to you, and $he is forced to @@.hotpink;accept your will.@@
					<<set $activeChild.devotion += 5>>
				<<elseif $oldSurname == $PC.slaveSurname>>
					$He's @@.mediumorchid;happy@@ to no longer have to share a name with $his tormentor, but the bliss doesn't last long as @@.gold;dread@@ quickly sets in about what this may mean.
					<<set $activeChild.devotion += 5, $activeChild.trust -= 10>>
				<</if>>
			<<else>>
				<<if $activeChild.slaveSurname == $PC.slaveSurname>>
					When you tell $him that $he's to be known as $activeChild.slaveName $activeChild.slaveSurname now, $he nods with approval feeling @@.mediumaquamarine;that $he may hold at least some value in your eyes.@@
					<<set $activeChild.trust += 5>>
				<<elseif $oldSurname == $PC.slaveSurname>>
					$He accepts that you'd rename $him something other than your name. $He's @@.gold;a little scared@@ that you intend to discard $him as your slave wife, or worse, but realizes this was not only a possibility, but likely.
					<<set $activeChild.trust -= 5>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<</if>> /* close new name check */


code:
App.Facilities.Nursery.fChildOral = function fChildOral(child) {
	"use strict";

	let r = ``;

	actX(child, "oral");// TODO: will this counts towards the total count?
	clearSummaryCache(child);

	// TODO: all of this

	return r;
};

App.Facilities.Nursery.fChildVaginal = function fChildVaginal(child) {
	"use strict";

	let r = ``;

	actX(child, "vaginal");// TODO: will this counts towards the total count?
	clearSummaryCache(child);

	// TODO: all of this

	return r;
};

App.Facilities.Nursery.fChildAnal = function fChildAnal(child) {
	"use strict";

	let r = ``;

	actX(child, "anal");
	clearSummaryCache(child);

	// TODO: all of this

	return r;
};

App.Facilities.Nursery.fChildImpreg = function fChildImpreg(child) {
	"use strict";
	const
		bonus = jsRandom(6, 20);

	let r = ``;

	clearSummaryCache(child);
	if (child.mpreg) {
		actX(child, "anal", (bonus + 1));
	} else {
		actX(child, "vaginal", (bonus + 1));
	}

	// TODO: all of this

	return r;
};


code:
App.Data.Facilities.penthouse = {
	baseName: "",
	genericName: "Penthouse",
	jobs: {
		rest: {
			position: "Rest",
			assignment: "rest",
			publicSexUse: false,
			fuckdollAccepted: false
		},
		chooseOwn: {
			position: "Choose own",
			assignment: "choose her own job",
			publicSexUse: false,
			fuckdollAccepted: false,
			description: {
				rulesAssistant: {
					assigned:({pronouns:{his}})=>`select ${his} own assignments`,
					assignedType: "allowed"
				}
			}
		},
		fucktoy: {
			position: "Fucktoy",
			assignment: "please you",
			publicSexUse: false,
			fuckdollAccepted: true
		},
		classes: {
			position: "Classes",
			assignment: "take classes",
			publicSexUse: false,
			fuckdollAccepted: false
		},
		houseServant: {
			position: "House Servant",
			assignment: "be a servant",
			publicSexUse: false,
			fuckdollAccepted: false
		},
		whore: {
			position: "Whore",
			assignment: "whore",
			publicSexUse: true,
			fuckdollAccepted: false
		},
		publicServant: {
			position: "Public Servant",
			assignment: "serve the public",
			publicSexUse: true,
			fuckdollAccepted: false
		},
		subordinateSlave: {
			position: "Subordinate slave",
			assignment: "be a subordinate slave",
			publicSexUse: false,
			fuckdollAccepted: false
		},
		cow: {
			position: "Milked",
			assignment: "get milked",
			publicSexUse: false,
			fuckdollAccepted: false
		},
		gloryhole: {
			position: "Gloryhole",
			assignment: "work a glory hole",
			publicSexUse: false,
			fuckdollAccepted: true
		},
		confinement: {
			position: "Confinement",
			assignment: "stay confined",
			publicSexUse: false,
			fuckdollAccepted: true
		}
	},
	defaultJob: "rest",
	manager: {
		position: "Recruiter",
		assignment: "recruit girls",
		careers: App.Data.misc.recruiterCareers,
		skill: "recruiter",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldHold: false,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: true,
		shouldThink: true,
		requiredDevotion: 51
	}
};
App.Entity.Facilities.PenthouseJob = class extends App.Entity.Facilities.Job {
	/**
	 * @override
	 * @returns {number[]} */
	employeesIndices() {
		const employees = State.variables.JobIDArray[this.desc.assignment];
		if (!employees) { return []; }
		const si = State.variables.slaveIndices;
		return employees.map(id => si[id]);
	}

	/**
	 * @override
	 * @returns {App.Entity.SlaveState[]}
	 */
	employees() {
		const slaves = State.variables.slaves;
		return this.employeesIndices().map(idx => slaves[idx]);
	}
};

App.Entity.Facilities.PenthouseJobs = {
	Classes: class extends App.Entity.Facilities.PenthouseJob {
		checkRequirements(slave) {
			let r = super.checkRequirements(slave);
			if (slave.intelligenceImplant >= 15) {
				r.push(`${slave.slaveName} already has a basic education.`);
			}
			if (!App.Entity.Facilities.Job._isBrokenEnough(slave, -20, -50, -20, -51)) {
				r.push(`${slave.slaveName} is too resistant to learn.`);
			}

			if (slave.fetish === "mindbroken") {
				r.push(`${slave.slaveName}'s mind is fundamentally broken and can't learn.`);
			}
			return r;
		}
	},
	HouseServant: class extends App.Entity.Facilities.PenthouseJob {
		checkRequirements(slave) {
			let r = super.checkRequirements(slave);

			if (!App.Entity.Facilities.Job._isBrokenEnough(slave, -20, -50, -19, -51)) {
				r.push(App.Entity.Facilities.Job._stdBreakageMessage(slave));
			}

			if (!canWalk(slave)) {
				r.push(`${slave.slaveName} can't walk and would be unable to properly clean.`);
			}
			if (!canSee(slave)) {
				r.push(`${slave.slaveName} is blind and would be unable to properly clean.`);
			}

			return r;
		}
	},

	SubordinateSlave: class extends App.Entity.Facilities.PenthouseJob {
		checkRequirements(slave) {
			let r = super.checkRequirements(slave);
			if (!App.Entity.Facilities.Job._isBrokenEnough(slave, -20, -50, -19, -51)) {
				r.push(App.Entity.Facilities.Job._stdBreakageMessage(slave));
			}
			return r;
		}

		assignmentLink(i, passage, callback, linkText) {
			return super.assignmentLink(i, "Subordinate Targeting",
				(assignment) => {
					return `<<run App.Utils.setActiveSlaveByIndex(${i})>>` + (callback !== undefined ? callback(assignment) : '');
				}, linkText);
		}
	},
	Cow: class extends App.Entity.Facilities.PenthouseJob {
		checkRequirements(slave) {
			let r = super.checkRequirements(slave);

			if ((slave.lactation <= 0) && (slave.balls <= 0)) {
				r.push(`${slave.slaveName} is not lactating` + ((State.variables.seeDicks > 0) ? ' or producing semen.' : '.'));
			}
			return r;
		}
	},
};

App.Entity.Facilities.Penthouse = class extends App.Entity.Facilities.Facility {
	constructor() {
		super(App.Data.Facilities.penthouse, {
			classes: new App.Entity.Facilities.PenthouseJobs.Classes(),
			houseServant: new App.Entity.Facilities.PenthouseJobs.HouseServant(),
			subordinateSlave: new App.Entity.Facilities.PenthouseJobs.SubordinateSlave(),
			cow: new App.Entity.Facilities.PenthouseJobs.Cow(),
		});
	}

	/** Facility slave capacity
	* @returns {number} */
	get capacity() {
		return State.variables.dormitory;
	}

	/** Number of already hosted slaves
	 * @returns {number} */
	get hostedSlaves() {
		return State.variables.dormitoryPopulation;
	}

	/** Penthouse can be overcrowded, so it always has free space
	 * @returns {boolean} */
	get hasFreeSpace() {
		return true;
	}

	/**
	 *
	 * @param {App.Entity.SlaveState} slave
	 * @returns {boolean}
	 */
	isHosted(slave) {
		return assignmentVisible(slave);
	}

	/**
	 * all slaves that are at the penthouse
	 * @returns {App.Entity.SlaveState[]}
	 */
	employees() {
		return State.variables.slaves.filter( s => assignmentVisible(s));
	}

	/**
	 * Indices in the slaves array for all slaves that are at the penthouse
	 * @returns {number[]}
	 */
	employeesIndices() {
		return State.variables.slaves.reduce(
			(acc, cur, idx) => { if (assignmentVisible(cur)) { acc.push(idx); } return acc; }, []);
	}

	_createJob() {
		return new App.Entity.Facilities.PenthouseJob();
	}
};

App.Entity.facilities.penthouse = new App.Entity.Facilities.Penthouse();


code:
App.Data.Facilities.pit = {
	baseName: "pit",
	genericName: null,
	jobs: {
		fighter: {
			position: "fighter",
			assignment: "",
			publicSexUse: false,
			fuckdollAccepted: false,
			partTime: true
		}
	},
	defaultJob: "fighter",
	manager: null
};

App.Entity.Facilities.PitFighterJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	checkRequirements(slave) {
		let r = super.checkRequirements(slave);
		if (slave.breedingMark === 1 && State.variables.propOutcome === 1 && State.variables.eugenicsFullControl !== 1 && State.variables.arcologies[0].FSRestart !== "unset") {
			r.push(`${slave.slaveName} may not participate in combat.`);
		}
		if (slave.indentureRestrictions > 1) {
			r.push(`${slave.slaveName}'s indenture forbids fighting.`);
		}
		if ((slave.indentureRestrictions > 0) && (this.facility.option("Lethal") === 1)) {
			r.push(`${slave.slaveName}'s indenture forbids lethal fights.`);
		}
		return r;
	}

	isEmployed(slave) {
		return State.variables.fighterIDs.includes(slave.ID);
	}

	employeesIndices() {
		const si = V.slaveIndices;
		return V.fighterIDs.map(id => si[id]);
	}
};

App.Entity.Facilities.Pit = class extends App.Entity.Facilities.SingleJobFacility {
	constructor() {
		super(App.Data.Facilities.pit,
			{
				fighter: new App.Entity.Facilities.PitFighterJob()
			});
	}

	get capacity() {
		return State.variables[this.desc.baseName] > 0 ? Number.MAX_VALUE : 0;
	}

	get hostedSlaves() {
		return State.variables.fighterIDs.length;
	}
};

App.Entity.facilities.pit = new App.Entity.Facilities.Pit();


code:
App.Data.Facilities.schoolroom = {
	baseName: "schoolroom",
	genericName: null,
	jobs: {
		student: {
			position: "",
			assignment: "learn in the schoolroom",
			publicSexUse: false,
			fuckdollAccepted: false,
			description: {
				rulesAssistant: {
					assigned:()=> `study in ${V.schoolroomName}`
				}
			}
		}
	},
	defaultJob: "student",
	manager: {
		position: "schoolteacher",
		assignment: "be the Schoolteacher",
		careers: App.Data.misc.schoolteacherCareers,
		skill: "teacher",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: false,
		shouldHold: false,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: true,
		shouldThink: true,
		requiredDevotion: 51
	}
};

App.Entity.Facilities.SchoolroomStudentJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	checkRequirements(slave) {
		let r = super.checkRequirements(slave);

		if (!App.Entity.Facilities.Job._isBrokenEnough(slave, -20, -50, -20, -51)) {
			r.push(`${slave.slaveName} is too resistant to learn.`);
		}

		const maxSkill = 10 + this.facility.upgrade("Skills") * 20; // maximal skill value the school can teach
		if (((slave.intelligenceImplant >= 30 && V.schoolroomRemodelBimbo !== 1) || (slave.intelligenceImplant <= -15 && V.schoolroomRemodelBimbo === 1)) &&
			(slave.voice === 0 || slave.accent + this.facility.upgrade("Language") <= 2) &&
			(slave.skill.oral > maxSkill) && (slave.skill.whoring > maxSkill) && (slave.skill.entertainment > maxSkill) &&
			(slave.skill.anal > maxSkill) && ((slave.vagina < 0) || (slave.skill.vaginal > maxSkill))) {
			r.push(`${slave.slaveName} has nothing left to learn.`);
		}

		if (slave.fetish === "mindbroken") {
			r.push(`${slave.slaveName}'s mind is fundamentally broken and can't learn`);
		}

		return r;
	}

	/** @private @override */
	get _employeeIDsVariableName() {
		return "SchlRiIDs";
	}
};

App.Entity.facilities.schoolroom = new App.Entity.Facilities.SingleJobFacility(
	App.Data.Facilities.schoolroom,
	{
		student: new App.Entity.Facilities.SchoolroomStudentJob()
	}
);


code:
App.Data.Facilities.servantsQuarters = {
	baseName: "servantsQuarters",
	genericName: "Servants' Quarters",
	jobs: {
		servant: {
			position: "servant",
			assignment: "work as a servant",
			publicSexUse: false,
			fuckdollAccepted: false,
			description: {
				rulesAssistant: {
					assigned:()=> `work in ${V.servantsQuartersName}`
				}
			}
		}
	},
	defaultJob: "servant",
	manager: {
		position: "stewardess",
		assignment: "be the Stewardess",
		careers: App.Data.misc.stewardessCareers,
		skill: "stewardess",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldHold: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: true,
		shouldThink: true,
		requiredDevotion: 51
	}
};

App.Entity.Facilities.ServantsQuartersServantJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	checkRequirements(slave) {
		let r = super.checkRequirements(slave);

		if (!App.Entity.Facilities.Job._isBrokenEnough(slave, -20, -50, 20, -21)) {
			r.push(App.Entity.Facilities.Job._stdBreakageMessage(slave));
		}
		if (!window.canWalk(slave)) {
			r.push(`${slave.slaveName} can't walk and would be unable to properly clean.`);
		}
		if (!canSee(slave)) {
			r.push(`${slave.slaveName} is blind and would be unable to properly clean.`);
		}
		return r;
	}

	/** @private @override */
	get _employeeIDsVariableName() {
		return "ServQiIDs";
	}
};

App.Entity.Facilities.ServantsQuartersStewardessJob = class extends App.Entity.Facilities.ManagingJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	checkRequirements(slave) {
		let r = super.checkRequirements(slave);
		if (slave.intelligence + slave.intelligenceImplant < -50) {
			r.push(`${slave.slaveName} is not intelligent enough.`);
		}
		return r;
	}
};

App.Entity.facilities.servantsQuarters = new App.Entity.Facilities.SingleJobFacility(
	App.Data.Facilities.servantsQuarters,
	{
		servant: new App.Entity.Facilities.ServantsQuartersServantJob()
	},
	new App.Entity.Facilities.ServantsQuartersStewardessJob()
);


code:
App.Data.Facilities.spa = {
	baseName: "spa",
	genericName: null,
	jobs: {
		assignee: {
			position: "",
			assignment: "rest in the spa",
			publicSexUse: false,
			fuckdollAccepted: false,
			description: {
				rulesAssistant: {
					assigned:()=> `rest in ${V.spaName}`
				}
			}
		}
	},
	defaultJob: "assignee",
	manager: {
		position: "attendant",
		assignment: "be the Attendant",
		careers: App.Data.misc.attendantCareers,
		skill: "attendant",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldHold: true,
		shouldSee: false,
		shouldHear: true,
		shouldTalk: false,
		shouldThink: true,
		requiredDevotion: 51
	}
};

App.Entity.Facilities.SpaAssigneeJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	checkRequirements(slave) {
		let r = super.checkRequirements(slave);

		if (
			slave.fetish !== "mindbroken" &&
			(
				slave.devotion < -20 ||
				(
					slave.health.tired < 20 &&
					slave.trust > 60 &&
					slave.devotion > 60 &&
					slave.sexualFlaw === "none" &&
					slave.behavioralFlaw === "none"
				)
			)
		) {
			r.push(`${slave.slaveName} will not benefit from time at ${this.facility.name}.`);
		}

		return r;
	}
};

App.Entity.facilities.spa = new App.Entity.Facilities.SingleJobFacility(
	App.Data.Facilities.spa,
	{
		assignee: new App.Entity.Facilities.SpaAssigneeJob()
	}
);


code:
:: FacilityMiscWidgets [nobr widget]

/* Call as removeFacilityWorkers <facilityName> <managerAssignment> <workerAssignment> */
<<widget "removeFacilityWorkers">>
	<<set _facility = App.Entity.facilities[$args[0]]>>
	<<set _count = _facility.hostedSlaves + (_facility.manager && _facility.manager.currentEmployee ? 1 : 0)>>
	<<set _NewPop = _count+$dormitoryPopulation>>
	<<if _count > 0>>
		<<set _passage = passage()>>
		<<link "Remove all slaves" _passage>>
			<<run App.Utils.moveFacilityWorkers(_facility, $args[1], $args[2])>>
		<</link>>
		<<if _NewPop > $dormitory>>
			@@.red;Dormitory capacity will be exceeded.@@
		<</if>>
	<</if>>
<</widget>>


code:
:: Encyclopedia Widgets [nobr widget]

/* TODO: add entries for Nursery */

<<widget "encyclopediaEntryAttendingClasses">>
''Attending classes'' is an assignment which educates the slave, raising intelligence if possible. Being educated raises value and is useful for some jobs and leadership positions.
<</widget>>

<<widget "encyclopediaEntryConfinement">>
''Confinement'' is an assignment which accelerates breaking for disobedient slaves. If a slave isn't obedient enough to work and isn't
<<if passage() == "Encyclopedia">>
	[[unhealthy|Encyclopedia][$encyclopedia = "Health"]]
<<else>>
	[[unhealthy|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]]
<</if>>
enough to need rest, this will make them useful sooner.
<</widget>>

<<widget "encyclopediaEntryFucktoy">>
''Fucktoy service'' is an assignment which keeps the slave close and under the player's eye. It's mostly just for fun, but fucktoys can improve reputation based on their beauty, and the player character's attention can be targeted to areas of the slave's body with possible fetish effects on happy slaves.
<</widget>>

<<widget "encyclopediaEntryGloryHole">>
''Occupying a glory hole'' is an assignment which makes money off of slaves regardless of their beauty, skills, or feelings; it's not fun or
<<if passage() == "Encyclopedia">>
	[[healthy|Encyclopedia][$encyclopedia = "Health"]],
<<else>>
	[[healthy|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]],
<</if>>
but very powerful for extracting ¤ out of otherwise useless slaves.
<</widget>>

<<widget "encyclopediaEntryMilking">>
''Getting milked'' is an assignment which makes money from lactation based on a slave's breasts,
<<if passage() == "Encyclopedia">>
	[[health|Encyclopedia][$encyclopedia = "Health"]],
<<else>>
	[[health|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]],
<</if>>
and hormonal status.<<if $seeDicks > 0>> Cows with balls will also give semen.<</if>> Creates profit quickly from slaves with big tits<<if $seeDicks > 0>> or balls<</if>>.
<</widget>>

<<widget "encyclopediaEntryFarming">>
''Farming'' is an assignment which produces
<<if passage() == "Encyclopedia">>
	[[food|Encyclopedia][$encyclopedia = "Food"]]
<<else>>
	[[food|Encyclopedia][$encyclopedia = "Food",$nextButton = "Back",$nextLink = "Main"]]
<</if>>
from your slaves' hard work<<if $seeBestiality == 1>> and allows you to breed slaves with animals<</if>>. Can also reduce arcology upkeep with upgrades in the
<<if passage() == "Encyclopedia">>
	[[Farmyard|Encyclopedia][$encyclopedia = "Farmyard"]].
<<else>>
	[[Farmyard|Encyclopedia][$encyclopedia = "Farmyard",$nextButton = "Back",$nextLink = "Main"]].
<</if>>
<</widget>>

<<widget "encyclopediaEntryPublicService">>
''Public Service'' is an assignment which increases reputation based on a slave's beauty, sexual appeal, and skills. Very similar to whoring, but for reputation rather than money.
<</widget>>

<<widget "encyclopediaEntryRest">>
''Rest'' is an assignment mostly used to improve
<<if passage() == "Encyclopedia">>
	[[health|Encyclopedia][$encyclopedia = "Health"]].
<<else>>
	[[health|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]].
<</if>>
It can be useful to order slaves you wish to intensively modify to rest, since most modifications damage health. It will synergize with curative treatments, providing bonus healing when both are simultaneously applied.
<</widget>>

<<widget "encyclopediaEntrySexualServitude">>
''Sexual servitude'' is an assignment which pleases other slaves by forcing the slave to service them sexually. Useful for driving the targeted slave's
<<if passage() == "Encyclopedia">>
	[[devotion|Encyclopedia][$encyclopedia = "Devotion"]]
<<else>>
	[[devotion|Encyclopedia][$encyclopedia = "Devotion",$nextButton = "Back",$nextLink = "Main"]]
<</if>>
up quickly.
<</widget>>

<<widget "encyclopediaEntryServitude">>
''Servitude'' is an assignment which reduces your upkeep based on the slave's
<<if passage() == "Encyclopedia">>
	[[devotion|Encyclopedia][$encyclopedia = "Devotion"]].
<<else>>
	[[devotion|Encyclopedia][$encyclopedia = "Devotion",$nextButton = "Back",$nextLink = "Main"]].
<</if>>
Available at lower obedience than other jobs, is insensitive to the quality of a slave's body, and doesn't require skills; a good transitional assignment. Unusually, low sex drive is advantageous as a servant, since it reduces distraction. Lactating slaves are slightly better at this job, since they can contribute to their fellow slaves' nutrition.
<</widget>>

<<widget "encyclopediaEntryWhoring">>
''Whoring'' is an assignment which makes money based on a slave's beauty, sexual appeal, and skills. Good whores take a long time to train and beautify but become very profitable.
<</widget>>


code:
:: PassageDone

<<if window.savedColorMap>>
	<<addclass "body" "lightTheme">>
<</if>>


code:
/* Accordion 000-250-006 */

button.accordion {
	cursor: pointer;
	padding: 5px;
	width: 100%;
	margin-bottom: 10px;
	border-bottom: 3px double;
	border-right: 3px double;
	border-left: none;
	border-top: none;
	text-align: left;
	outline: none;
	transition: 0.2s;
	background-color: transparent;
}

button.accordion.active, button.accordion:hover {
	background-color: transparent;
}

button.accordion:before {
	content: '\002B';
	color: #777;
	font-weight: bold;
	float: left;
	margin-right: 5px;
}

.unStaffed {
	background-color: transparent;
	padding: .5em .2em;
	margin-bottom: 1em;
	border-bottom: thin inset grey;
}

.unStaffed:before {
	content: '\00D7';
	color: #777;
	font-weight: bold;
	color: red;
	float: left;
	margin-right: 5px;
}

.unStaffed:after {
	content: attr(data-after);
	float: right;
	margin-left: 2em;
	font-weight: strong;
	color: green;
}

button.accordion:after {
	content: attr(data-after);
	float: right;
	margin-left: 2em;
	font-weight: normal;
	color: green;
}

button.accordion.active:before {
	content: "\2212";
}

.accHidden {
	padding: 0 18px;
	margin-top: 5px;
	margin-bottom: 5px;
	max-height: 0;
	overflow: hidden;
}

div.accordion:before {
	content: '\002B';
	color: #777;
	font-weight: bold;
	float: left;
	margin-right: 5px;
}
div.accordion.active:before {
	content: "\2212";
}


code:
#graph .linage {
	fill: none;
	stroke: white;
}
#graph .marriage {
	fill: none;
	stroke: white;
}
#graph .node {
	background-color: lightblue;
	border-style: solid;
	border-width: 1px;
}
#graph .nodeText{
	font: 10px sans-serif;
	margin: 0;
	padding: 0;
	color: black;
}
#graph {
	font: 10px sans-serif;
	margin: -20px 0;
	padding: 0;
	color: black;
}

#graph div {
	border-style: solid;
	border-width: 1px;
}

#graph .XY {
	background-color: lightblue;
}

#graph div.XX {
	background-color: pink;
}

#graph div.unknown {
	background-color: gray;
}

#graph div.unknownXY {
	background-color: #808080;
}

#graph div.unknownXX {
	background-color: #808080;
}

#graph .you {
	background-color: red;
}

#graph .emphasis {
	font-style: italic;
	font-weight: bold;
	margin: 0;
	background: #ffffff88;
	border: 2px solid Gold;
	white-space: nowrap;
}

#editFamily {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

#editFamily #familyTable {
}


code:
body {
	overflow-x: hidden;
}

/* makes HR colorflip compatible */
hr {
	background:#ccc;
	border:0;
}

/* clears SugarCube's default transition */
.passage {
	transition: none;
	-webkit-transition: none;
}

.passage-in {
	opacity: 1 !important;
}

/* default is 54em */
#passages {
	max-width: 100%;
}

/* small trick to hide broken images */
img {
	text-indent: -10000px;
}

.imageColumn { /* TODO: this is mostly a copy of imageRef to get its flex features working properly. They can probably be removed from imageRef at some point */
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-items: flex-start;
	position: relative;
	float: right;
}

.imageRef {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-items: flex-start;
	position: relative;
	background-color: rgba(80, 80, 80, 0.5);
	margin: 2px;
}

.tinyImg {
	height: 120px;
	width: 120px;
	float: left;
}

.smlImg {
	height: 150px;
	width: 150px;
	float: left;
}

.smlImg > img, .smlImg > video {
	height: auto;
}

.medImg {
	height: 300px;
	width: 300px;
	float: right;
}

.medImg > img, .medImg > video {
	height: auto;
}

.lrgRender {
	height: 531px;
	width: 531px;
	margin-right: -50px;
	margin-left: -50px;
	float: right;
	z-index: -1;
}

.lrgVector {
	height: 600px;
	width: 600px;
	margin-right: -125px;
	margin-left: -125px;
	float: right;
	z-index: -1;
}

.lrgRender > div.mask {
	width: 150px;
	height: 100%;
	background: linear-gradient(90deg, rgba(17,17,17,1), rgba(17,17,17,0.8) 60%, rgba(17,17,17,0));
	z-index: 1;
	/*position: absolute;*/
}

.lrgRender > img, .lrgRender > video {
	margin-left: -150px;
	height: 531px;
	width: auto;
}

.lrgVector > div.mask {
	width: 150px;
	height: 100%;
	background: linear-gradient(90deg, rgba(17,17,17,1), rgba(17,17,17,0.8) 60%, rgba(17,17,17,0));
	z-index: 1;
}

.lrgVector > img, .lrgVector > video {
	margin-left: -150px;
	height: 600px;
	width: auto;
}

.lrgVector svg {
	width: 336px;
}

object {
	object-fit: scale-down;
	position: absolute;
	top: 0;
	left: 0;
}

img.paperdoll {
	position: absolute;
	top: 0;
	left: 0;
	margin-left: 0;
}

span.plusButton {
	display: inline-block;
	line-height: 25px;
	width: 20px;
	text-align: center;
	border: 1px solid rgba(0, 139, 0, 0.3);
	background: rgba(0, 139, 0, 0.2);
	margin: 2px 0;
}

span.minusButton {
	display: inline-block;
	line-height: 25px;
	width: 20px;
	text-align: center;
	border: 1px solid rgba(184, 0, 0, 0.3);
	background: rgba(184, 0, 0, 0.2);
	margin: 2px 0;
}

span.zeroButton {
	display: inline-block;
	line-height: 25px;
	width: 20px;
	text-align: center;
	border: 1px solid rgba(0, 0, 255, 0.3);
	background: rgba(0, 0, 255, 0.2);
	margin: 2px 0;
}

span.plusButton:hover { background: rgba(0, 139, 0, 0.4); }
span.minusButton:hover { background: rgba(184, 0, 0, 0.4); }
span.zeroButton:hover { background: rgba(0, 0, 255, 0.4); }

span.plusButton > a { display: block; }
span.minusButton > a { display: block; }
span.zeroButton > a { display: block; }

span.plusButton > a:hover { text-decoration: none; }
span.minusButton > a:hover { text-decoration: none; }
span.zeroButton > a:hover { text-decoration: none; }

/* Colors are made as css classes, to allow them to be changed for a light color scheme (for example). */
/* a version is for this case: text */
.link, .link a { color: #68D } /* link color */
.aquamarine, .aquamarine a, .skill, .skill a { color: aquamarine }
.coral, .coral a, .fetish.loss, .fetish.loss a { color: coral }
.cyan, .cyan a { color: cyan } /* used for aphrodisiac & neighbor arcs */
.darkgoldenrod, .darkgoldenrod a, .trust.extremely-terrified, .trust.extremely-terrified a { color: darkgoldenrod }
.darkred, .darkred a, .defiant.full, .defiant.full a { color: darkred }
.darkviolet, .darkviolet a, .devotion.hateful, .devotion.hateful a { color: darkviolet }
.deeppink, .deeppink a, .devotion.devoted, .devotion.devoted a { color: deeppink } /* used for devotion once & agent */
.steelblue, .steelblue a { color: steelblue }
.deepskyblue, .deepskyblue a, .intelligent, .intelligent a { color: deepskyblue }
.dodgerblue, .dodgerblue a { color: dodgerblue }
.blue, .blue a { color: blue }
.gold, .gold a, .trust.dec, .trust.dec a, .trust.frightened, .trust.frightened a { color: gold }
.goldenrod, .goldenrod a, .trust.terrified, .trust.terrified a { color: goldenrod }
.gray, .gray a { color: gray }
.green, .green a, .reputation.inc, .reputation.inc a, .improvement, .improvement a, .flaw.break, .flaw.break a, .skill.inc, .skill.inc a { color: green }
.hotpink, .hotpink a, .devotion.inc, .devotion.inc a, .devotion.accept, .devotion.accept a { color: hotpink }
.lawngreen, .lawngreen a { color: lawngreen }
.lightblue, .lightblue a { color: lightblue }
.lightcoral, .lightcoral a, .fetish.gain, .fetish.gain a { color: lightcoral } /* compare pink for fetish */
.lightgreen, .lightgreen a, .relationship, .relationship a { color: lightgreen }
.lightpink, .lightpink a { color: lightpink }
.lightsalmon, .lightsalmon a, .fetish.inc, .fetish.inc a { color: lightsalmon }
.lime, .lime a, .change.positive, .change.positive a, .virginity.loss, .virginity.loss a, .pregnant, .pregnant a { color: lime } /* tight orifices, breast changes, take virginity, not sure on good aliases */
.limegreen, .limegreen a { color: limegreen } /* multiple questionable uses */
.magenta, .magenta a, .devotion.worship, .devotion.worship a { color: magenta }
.mediumaquamarine, .mediumaquamarine a, .trust.inc, .trust.inc a, .trust.careful, .trust.careful a  { color: mediumaquamarine }
.mediumorchid, .mediumorchid a, .devotion.dec, .devotion.dec a, .devotion.resistant, .devotion.resistant a { color: mediumorchid }
.mediumseagreen, .mediumseagreen a, .trust.trusting, .trust.trusting a { color: mediumseagreen }
.orange, .orange a, .stupid, .stupid a, .change.negative, .change.negative a, .defiant.careful, .defiant.careful a, .intro.question { color: orange } /* generally between red and green, and a lot of other places */
.orangered, .orangered a, .defiant.inc, .defiant.inc a, .defiant.bold, .defiant.bold, education.neg a { color: orangered }
.orchid, .orchid a { color: orchid } /* used once (wrong? */
.pink, .pink a { color: pink } /* also fetish start ??? , and a lot of other stuff */
.red, .red a, .health.dec, .health.dec a, .cash.dec, .cash.dec a, .flaw.gain, .flaw.gain a, .error, .error a, .elites.loss, .elites.loss a, .reputation.dec, .reputation.dec a, .warning, .warning a { color: red } /* also generally bad stuff */
/* note: .error is for unexpected behaviour, .warning for player feedback */
.seagreen, .seagreen a, .trust.prof-trusting, .trust.prof-trusting a { color: seagreen }
.springgreen, .springgreen a, .skill.player, .skill.player a { color: springgreen }
.tan, .tan a { color: tan } /* some ethnicity */
.chocolate, .chocolate a { color: chocolate }
.saddlebrown, .saddlebrown a { color: saddlebrown }
.teal, .teal a { color: teal }
.yellow, .yellow a, .noteworthy, .noteworthy a, .devotion.ambivalent, .devotion.ambivalent a, .trust.fearful, .trust.fearful a { color: yellow }
.yellowgreen, .yellowgreen a, .cash.inc, .cash.inc a, .cash, .cash a { color: yellowgreen }

/*! <<checkvars>> macro for SugarCube 2.x */
#ui-dialog-body.checkvars{padding:1em}#ui-dialog-body.checkvars h1{font-size:1em;margin-top:0}#ui-dialog-body.checkvars table{border-collapse:collapse;border-spacing:0}#ui-dialog-body.checkvars thead tr{border-bottom:2px solid #444}#ui-dialog-body.checkvars tr:not(:first-child){border-top:1px solid #444}#ui-dialog-body.checkvars td,#ui-dialog-body.checkvars th{padding:.25em 1em}#ui-dialog-body.checkvars td:first-child,#ui-dialog-body.checkvars th:first-child{padding-left:.5em;border-right:1px solid #444}#ui-dialog-body.checkvars td:last-child,#ui-dialog-body.checkvars th:last-child{padding-right:.5em}#ui-dialog-body.checkvars th:first-child{text-align:center}#ui-dialog-body.checkvars td:first-child{font-weight:700;text-align:right}#ui-dialog-body.checkvars td{font-family:monospace,monospace;vertical-align:top;white-space:pre-wrap}#ui-dialog-body.checkvars .scroll-pad{margin:0;padding:0}

/*! <<bugreport>> macro for SugarCube 2.x */
#ui-dialog-body.bugreport #bugreport-info{margin-bottom:1em}#ui-dialog-body.bugreport #bugreport-data{display:block;overflow:auto;font-family:monospace,monospace;background-color:transparent;border:1px solid #444;margin:0;padding:6px;height:auto;min-height:200px;white-space:normal}#ui-dialog-body.bugreport .scroll-pad{margin:0;padding:0}

div.output{
width: 100%;
width: 100vw;
max-width: 100%;
word-break: break-all;
white-space: normal;
}
/* css rules for rules assistant */
.rajs-listitem {
	display: inline-block;
	color: #68D;
	margin-right: 1em;
}
.rajs-listitem.selected {
	color: gray;
	text-decoration: none;
}
.rajs-listitem:last-of-type { margin-right: 0; }
.rajs-listitem:hover {
	cursor: pointer;
	text-decoration: underline;
}
.rajs-listitem.selected:hover {
	cursor: default;
	text-decoration: none;
}
.rajs-list strong:first-of-type, .rajs-list input {
	margin-right: 2em;
}
.rajs-listitem input {
	margin: 0.25em;
}
.rajs-section h1 {
	border-bottom: 1px solid white;
	cursor: pointer;
}
.rajs-section h1:hover { text-decoration: underline; }

.scroll {
	overflow: auto;
}

h1, h2, h3 {
	margin-bottom: 0;
	margin-top: 0.25em;
}
.founding {
	font-size: 0.8em;
	margin-top: -0.8em;
	margin-left: 0.5em;
	font-style: italic;
}
table.corporate {
	border: 3px darkgreen double;
	border-collapse: collapse;
	min-width: 33%;
}
table.corporate tbody tr:nth-child(even) {
	background-color: rgb(0, 30, 0);
}
table.corporate tbody tr:nth-child(odd) {
	background-color: rgb(15, 40, 15);
}
table.corporate td {
	vertical-align: top;
}
.minor-note {
	font-size: 0.75em;
	font-style: italic;
}
.majorText {
	margin-top: 0.5em;
	margin-bottom: 1.5em;
}
div.tab {
	margin-left: 2em;
}
div.indent {
	text-indent: 2em;
}
div.double-indent {
	text-indent: 4em;
}

/* setting at the beginning of a scene / subscene */
.scene-intro {
	font-style: italic;
}

/* adds detail to an option: Do something. Sentence that explains the effect/conditions */
.detail {
	font-style: italic;
}

/* additional information not related to a specific option */
.note {
	font-style: italic;
}

.story-label {
	text-decoration: underline;
}

/* Note: Do not do a linebreak after span in HTML, because it will underline the automatic space it inserts: "Matilda_is a cow" */
.slave-name {
	color: pink;
	font-weight: bold;
	text-decoration: underline;
}

div.cheat-menu {
	font-style: italic;
	position: absolute;
	right: 50px;
}


code:
.optionMacro {
	margin-top: 8px;
	display: inline-block;
}

.optionDescription {
	display: inline-block;
	width: 500px;
	margin-right: 10px;
	line-height: 1.2;
	text-align: right;
}

@media only screen and (max-width: 1200px) {
	.optionDescription {
		display: block;
		width: unset;
		text-align: left;
	}

	.optionMacro {
		margin-top: 30px;
	}

}

.optionMacroOption {
	border: #555 solid 0.5px;
	border-top-width: 0;
	vertical-align: top;
	-moz-user-select: none;
	min-width: 79px; /* 80px - 1px for border */
	display: inline-block;
	text-align: center;
}

.optionComment {
	vertical-align: top;
	color: gray;
	padding-left: 10px;
}

/* But don't add the | after the last one */
.optionMacroOption:last-child {
	border-top-right-radius: 6px;
	border-bottom-right-radius: 6px;
	border-right-width: 0;
}

.optionMacroOption:first-child {
	border-top-left-radius: 6px;
	border-bottom-left-radius: 6px;
}

.optionMacroOption a {
	padding: 0 10px;
	box-sizing: border-box;
	width: 100%;
	display: block;
}

.optionMacroOption:hover {
	background: #2F2F2F;
}

body.lightTheme .optionMacroOption:hover {
	background: #DDDDDD;
}

body.lightTheme .optionMacroSelected {
	background: #DDDDDD;
}

.optionMacroSelected {
	background: #2F2F2F;
	padding: 0 10px;
	min-width: 80px;
	cursor: pointer;
	box-sizing: border-box;
}

.optionValue {
	display: inline-flex;
	flex-wrap: wrap;
}

.optionValue input {
	padding: 3px 3px 3px 10px;
	background: transparent;
	border: #555 solid 0.5px;
	border-top-width: 0;
	min-width: unset;
	width: 140px;
	height: 22px;
}

.optionMacroNumber input {
	width: 50px;
}

.optionValue input:last-child {
	border-top-right-radius: 6px;
	border-bottom-right-radius: 6px;
	border-right-width: 0;
}

.optionValue input:first-child {
	border-top-left-radius: 6px;
	border-bottom-left-radius: 6px;
}

.optionMacroSelected.optionMacroEnable {
	color: rgb(230,255,230);
	background-image: linear-gradient(rgba(0, 255,0, 0.12), transparent);
}

.optionMacroSelected.optionMacroDisable {
	color: rgb(255,240,240);
	background-image: linear-gradient(rgba(255, 100, 0, 0.2), transparent);
}


code:
.hidden
{
	display:none;
}

div.quicklist.devotion button.mindbroken
{
	background-color:red;
}
div.quicklist.devotion button.very-hateful
{
	background-color:darkviolet;
}
div.quicklist.devotion button.hateful
{
	background-color:darkviolet;
}
div.quicklist.devotion button.resistant
{
	background-color:mediumorchid;
}
div.quicklist.devotion button.ambivalent
{
	background-color: yellow;
	color: #444444;
}
div.quicklist.devotion button.accepting
{
	background-color: hotpink;
}
div.quicklist.devotion button.devoted
{
	background-color: deeppink;
}
div.quicklist.devotion button.worshipful
{
	background-color: magenta;
}
div.quicklist.trust button.mindbroken
{
	background-color:red;
}
div.quicklist.trust button.extremely-terrified
{
	background-color: darkgoldenrod;
}
div.quicklist.trust button.terrified
{
	background-color: goldenrod;
}
div.quicklist.trust button.frightened
{
	background-color: gold;
	color: coral;
}
div.quicklist.trust button.fearful
{
	background-color: yellow;
	color: green;
}
div.quicklist.trust button.hate-careful
{
	background-color: orange;
}
div.quicklist.trust button.careful
{
	background-color: mediumaquamarine;
	color: forestgreen;
}
div.quicklist.trust button.bold
{
	background-color: orangered;
}
div.quicklist.trust button.trusting
{
	background-color: mediumseagreen;
}
div.quicklist.trust button.defiant
{
	background-color: darkred;
}
div.quicklist.trust button.profoundly-trusting
{
	background-color: seagreen;
}
div.quicklist
{
	table-layout: fixed;
	text-align: center;
	border-collapse: separate;
	border-spacing: 2px;
	border-style: hidden;
	empty-cells: hide;
	width: 70%;
}
div.quicklist button
{
	margin-top: 15px;
	margin-right: 20px;
	white-space: nowrap;
}


code:
/* Stylesheet for WardrobeUse.tw */

#passage-wardrobe-use .optionMacro {
	display: inline;
}

#passage-wardrobe-use .optionDescription {
	width: unset;
	text-align: left;
}

#passage-wardrobe-use .optionValue {
	display: flex;
}

#passage-wardrobe-use .optionMacroOption {
	flex-grow: 1;
}

/* Last line shouldn't grow */
#passage-wardrobe-use .optionValue::after {
	flex-grow: 1000000000;
	content: '';
}


code:
:: Alpha disclaimer [nobr]

Warning

	This is a text-based game that includes descriptions of sexual activity, graphic violence, drug use, and other subjects not suitable for persons under the age of 18. This is a work of fiction; any resemblance to actual persons, places, or events is unintended.

Welcome!

	An in-game encyclopedia is available from the sidebar, with answers to most basic gameplay questions.

		Important info for new players, and a reminder for FC veterans:

	when the player is offered a set of choices, the

		Continue

	button at the top of the left sidebar will almost always remain available. Using this to decline all the options presented is not cheating. If it's available, it's supposed to be available. It represents the player character politely bowing out of the situation.

Please note

		This is an alpha.

	That means the game is missing content, is full of bugs, is imbalanced, and is generally in an incomplete state. The game will keep a start of turn autosave. If you encounter a bug, we strongly recommend you reload your start of turn autosave immediately. Please submit your feedback and bug reports at https://gitgud.io/pregmodfan/fc-pregmod/issues/. Consider attaching a save file and screenshot of the problem.

	 	Pregmod is a modification of the original Free Cities created by FCdev, which can be seen at https://freecitiesblog.blogspot.com/.

		version: $ver, mod version: $pmodVer, build: $releaseID

		<<link "More version info">>
			<<replace "#version">>

						Mod: expanded age ranges and other tweaks 2016-08-30

						+SV

						Mod: extra preg content and other crap

					Saves from versions prior to 0.6 are not compatible.

			<</replace>>
		<</link>>

	[[I am 18 or more years of age, I understand, and I wish to continue|Economy Intro]]


code:
:: SVG filters

<svg class="defs-only" style="width: 0; height: 0; position: absolute;">
	<filter id="skin-black" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.15 0 0 0 0 0 0.1 0 0 0 0 0 0.05 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-bronzed" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0.1 0 0 0 0.6 0 0 0 0 0 0.3 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-brown" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0 0 0.5 0 0 0 0 0 0.15 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-dark" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.5 0 0 0 0 0 0.2 0 0 0 0 0 0.1 0 0 0 0 0 1 0 "/>
	</filter>
	<filter id="skin-ebony" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.1 0 0 0 0 0 0.05 0 0 0 0 0 0.05 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-extremely-pale" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.05 0 0 0 0 0 1.05 0 0 0 0 0 1.1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-fair" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0.2 0 0.8 0 0 0.2 0 0 0.8 0 0.2 0 0 0 1 0"/>
	</filter>
	<filter id="skin-light" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.5 0 0 0 0.5 0 0.5 0 0 0.5 0 0 0.5 0 0.5 0 0 0 1 0"/>
	</filter>
	<filter id="skin-light-brown" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0 0 0.7 0 0 0 0 0 0.5 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-olive" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.9 0 0 0 0 0 0.8 0 0 0 0 0 0.6 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-pale" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.6 0 0 0 0.4 0 0.6 0 0 0.4 0 0 1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-tanned" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0 0 0.65 0 0 0 0 0 0.5 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-white" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-dyed-red" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.6 0 0 0 0.4 0 0.25 0 0 0.2 0 0 0 0 0.3 0 0 0 1 0 "/>
	</filter>
	<filter id="skin-dyed-green" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.7 0 0 0 0 0.2 0.65 0.15 0 0 0 0 0.5 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="skin-dyed-blue" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.3 0 0 0 0 0 0.5 0 0 0 0.4 0.2 0.25 0 0.1 0 0 0 1 0"/>
	</filter>

	<filter id="hair-ashen" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.7 0 0 0 0.1 0 0.7 0 0 0.1 0 0 0.7 0 0.1 0 0 0 1 0"/>
	</filter>
	<filter id="hair-auburn" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0.2 0 0.5 0 0 0 0 0 0.15 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-black" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.2 0 0 0 0 0 0.15 0 0 0 0 0 0.1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-blazing-red" color-interpolation-filters="sRGB">
		<feComponentTransfer>
			<feFuncR type="gamma" exponent="0.10" />
			<feFuncG type="gamma" exponent="3.00" />
			<feFuncB type="gamma" exponent="7.50" />
		</feComponentTransfer>
	</filter>
	<filter id="hair-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.4 0 0 0 0 0 1.3 0 0 0 0 0 0.7 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-blue" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.3 0 0 0 0 0 0.5 0 0 0 0.4 0.2 0.25 0 0.1 0 0 0 1 0"/>
	</filter>
	<filter id="hair-bright-red" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1 0 0 0 0.2 0 0.4 0 0 0 0 0 0.1 0 0.1 0 0 0 1 0"/>
	</filter>
	<filter id="hair-brown" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0 0 0.5 0 0 0 0 0 0.15 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-brunette" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0 0 0.5 0 0 0 0 0 0.15 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-burgundy" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.45 0 0 0 0.25 0 0.2 0 0 0.1 0 0 0.3 0 0.2 0 0 0 1 0"/>
	</filter>
	<filter id="hair-chestnut" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.9 0 0 0 0.2 0 0.7 0 0 0 0 0 0.1 0 0.1 0 0 0 1 0"/>
	</filter>
	<filter id="hair-chocolate-brown" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.6 0 0 0 0 0 0.2 0 0 0 0 0 0.1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-copper" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.5 0 0 0 -0.2 0 0.8 0 0 -0.2 0 0 0.1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-dark" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.5 0 0 0 0 0 0.2 0 0 0 0 0 0.1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-dark-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.1 0 0 0 0 0 0.9 0 0 0 0 0 0.4 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-dark-brown" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.6 0 0 0 0 0 0.35 0 0 0 0 0 0.1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-dark-red" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.7 0 0 0 0.2 0 0.15 0 0 0.1 0 0 0 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-deep-red" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.5 0 0 0 -0.3 0 0.3 0 0 -0.1 0 0 0 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-dirty-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0.3 0 0.7 0 0 0.3 0 0 0.2 0 0.5 0 0 0 1 0"/>
	</filter>
	<filter id="hair-fair-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1 0 0 0 0.5 0 0.8 0 0 0.4 0 0 0.6 0 0.2 0 0 0 1 0"/>
	</filter>
	<filter id="hair-ginger" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.2 0 0 0 0.1 0 0.9 0 0 0 0 0 0.1 0 0.3 0 0 0 1 0"/>
	</filter>
	<filter id="hair-golden" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.7 0 0 0 -0.1 0 1.5 0 0 -0.1 0 0 0.1 0 0.3 0 0 0 1 0"/>
	</filter>
	<filter id="hair-golden-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.8 0 0 0 -0.3 0 1.6 0 0 -0.4 0 0 0.3 0 0.1 0 0 0 1 0"/>
	</filter>
	<filter id="hair-green" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.7 0 0 0 0 0.2 0.65 0.15 0 0 0 0 0.5 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-gray" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-grey" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-hazel" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0.2 0 0.5 0 0 0.2 0 0 0.15 0 0.15 0 0 0 1 0"/>
	</filter>
	<filter id="hair-light-brown" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0 0 0.7 0 0 0 0 0 0.5 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-light-purple" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.7 0 0 0 0.4 0 0.1 0 0 0.2 0 0 0.7 0 0.3 0 0 0 1 0"/>
	</filter>
	<filter id="hair-neon-blue" color-interpolation-filters="sRGB">
		<feComponentTransfer>
			<feFuncR type="gamma" exponent="3.75" />
			<feFuncG type="gamma" exponent="0.75" />
			<feFuncB type="gamma" exponent="0.25" />
		</feComponentTransfer>
	</filter>
	<filter id="hair-neon-green" color-interpolation-filters="sRGB">
		<feComponentTransfer>
			<feFuncR type="gamma" exponent="3.00" />
			<feFuncG type="gamma" exponent="0.25" />
			<feFuncB type="gamma" exponent="0.98" />
		</feComponentTransfer>
	</filter>
	<filter id="hair-neon-pink" color-interpolation-filters="sRGB">
		<feComponentTransfer>
			<feFuncR type="gamma" exponent="0.10" />
			<feFuncG type="gamma" exponent="1.00" />
			<feFuncB type="gamma" exponent="0.50" />
		</feComponentTransfer>
	</filter>
	<filter id="hair-olive" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.7 0 0 0 0 0 0.6 0 0 0 0 0 0.15 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-onyx-black" color-interpolation-filters="sRGB">
		<feComponentTransfer>
			<feFuncR type="gamma" exponent="5.50" />
			<feFuncG type="gamma" exponent="6.00" />
			<feFuncB type="gamma" exponent="7.00" />
		</feComponentTransfer>
	</filter>
	<filter id="hair-pale-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.45 0 0 0 0.7 0 0.4 0 0 0.7 0 0 0.6 0 0.4 0 0 0 1 0"/>
	</filter>
	<filter id="hair-peachy" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.45 0 0 0 0 0 1.4 -0.1 0 -0.1 0 0 0.85 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-pink" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.5 0 0 0 0 0 1.5 -0.2 0 -0.2 0 0 1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-platinum-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.6 0 0 0 0.4 0 0.6 0 0 0.4 0 0 1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-purple" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.9 0 0 0 0 0 0.2 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-raven-black" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.2 0 0 0 0 0 0.2 0 0 0 0 0 0.3 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-red" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.6 0 0 0 0.4 0 0.25 0 0 0.2 0 0 0 0 0.3 0 0 0 1 0"/>
	</filter>
	<filter id="hair-red-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1 0 0 0 0.25 0 0.8 0 0 0.1 0 0 0.35 0 0.15 0 0 0 1 0"/>
	</filter>
	<filter id="hair-silver" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.8 0 0 0 0.3 0 0.8 0 0 0.3 0 0 0.8 0 0.3 0 0 0 1 0"/>
	</filter>
	<filter id="hair-strawberry-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="1.2 0 0 0 0.2 0 1.2 0 0 0 0 0 0.7 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-violet" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="2 -1 0 0 0 0 2 -1 0 0 -1 0 2 0 0 0 0 0 1 0"/>
	</filter>
	<filter id="hair-white" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.6 0 0 0 0.5 0 0.6 0 0 0.5 0 0 0.6 0 0.5 0 0 0 1 0"/>
	</filter>
	<filter id="hair-white-blonde" color-interpolation-filters="sRGB">
		<feColorMatrix type="matrix" values="0.7 0 0 0 0.5 0 0.7 0 0 0.5 0 0 0.5 0 0.4 0 0 0 1 0"/>
	</filter>
</svg>


code:
:: setupVars [widget nobr]

/*
* This passage is tagged as widget, so it will be loaded whenever any passage is loaded. The global setup object seems to reset itself to {} (empty object): until we figure out why, this is where we set properties for it.
*/
<<for _k,_v range App.Data.misc>>
	<<set setup[_k] = _v>>
<</for>>
<<run App.Art.cacheArtData()>>
<<run App.Corporate.Init()>>


code:
/* OPEN MAIN */
App.UI.View.MainLinks = function() {
	"use strict";
	const PA = Array.isArray(V.personalAttention) ? V.personalAttention.map(x => getSlave(x.ID)) : [];
	let r = '';

	if (V.PC.health.shortDamage >= 30) {
		r += `The injuries received in the recent battle prevent you from undertaking tiring efforts.`;
	} else {
		switch (V.personalAttention) {
			case "business":
				r += `You plan to focus on business this week.`;
				break;
			case "whoring":
				r += `You plan to focus on earning extra money this week.`;
				break;
			case "upkeep":
				r += `You plan to focus on cleaning the penthouse this week.`;
				break;
			case "smuggling":
				r += `You plan to make some easy (but dirty) money this week.`;
				break;
			case "HG":
				r += `You plan to support your Head Girl this week, `;
				if (V.HeadGirl) {
					const {he, his} = getPronouns(V.HeadGirl);
					r += `so ${he} can give more slaves ${his} attention.`;
				} else {
					r += `should you assign one.`;
				}
				break;
			case "sex":
				r += `You plan to have as much sex with your slaves as possible this week.`;
				break;
			case "trading":
				r += `This week you will learn trading.`;
				break;
			case "warfare":
				r += `This week you will learn modern combat tactics.`;
				break;
			case "slaving":
				r += `This week you will learn slaving.`;
				break;
			case "engineering":
				r += `This week you will learn engineering.`;
				break;
			case "medicine":
				r += `This week you will learn medicine.`;
				break;
			case "hacking":
				r += `This week you will learn hacking.`;
				break;
			case "proclamation":
				r += `This week you plan to issue a proclamation about ${V.SecExp.proclamation.type}.`;
				break;
			case "technical accidents":
				r += `This week you plan to sell your technical skills to the highest bidder.`;
				break;
			default:
				if (PA.length > 0) {
					r += `You plan to train `;
					let l = PA.length;
					for (let dwi = 0; dwi < l; dwi++) {
						if (dwi > 0 && dwi === l - 1) {
							r += ` and `;
						}
						r += `<strong><u><span class="pink">${SlaveFullName(PA[dwi])}</span></u></strong> to ${V.personalAttention[dwi].trainingRegimen}`;
						if (dwi > 0 && dwi < l - 2) {
							r += `,`;
						}
					}
					r += ` this week.`;
				}
				break;
		}
	}

	if (V.PC.health.shortDamage < 30) {
		r += ` <span id="managePA"><strong><<link "Change plans">><<goto "Personal Attention Select">><</link>></strong></span> <span class="cyan">[A]</span>`;
	}

	if (V.useSlaveSummaryOverviewTab !== 1) {
		if (typeof V.slaveIndices[V.HeadGirl.ID] !== 'undefined') {
			r += `<br><strong><u><span class="pink">${SlaveFullName(V.HeadGirl)}</span></u></strong> is serving as your Head Girl`;
			if (V.arcologies[0].FSEgyptianRevivalistLaw === 1) {
				r += ` and Consort`;
			}
			r += `. <span id="manageHG"><strong><<link "Manage Head Girl">><<goto "HG Select">><</link>></strong></span> <span class="cyan">[H]</span>`;
		} else if (typeof V.slaveIndices[V.HeadGirl.ID] === 'undefined' && (V.slaves.length > 1)) {
			r += `<br>You have not selected a Head Girl`;
			if (V.arcologies[0].FSEgyptianRevivalistLaw === 1) {
				r += ` and Consort`;
			}
			r += `. <span id="manageHG"><strong><<link "Select one">><<goto "HG Select">><</link>></strong></span> <span class="cyan">[H]</span>`;
		} else if (typeof V.slaveIndices[V.HeadGirl.ID] === 'undefined') {
			r += `<br><span class="note">You do not have enough slaves to keep a Head Girl</span>`;
		}
		r += `<br>`;

		if (typeof V.slaveIndices[V.Recruiter.ID] !== 'undefined') {
			r += `${SlaveFullName(V.Recruiter)} is working to recruit girls. <<link "Manage Recruiter">><<goto "Recruiter Select">><</link>> [U]`;
		} else {
			r += `You have not selected a Recruiter. <span id="manageRecruiter"><strong><<link "Select one">><<goto "Recruiter Select">><</link>></strong></span> <span class="cyan">[U]</span>`;
		}

		if (V.dojo) {
			r += `<br>`;
			if (typeof V.slaveIndices[V.Bodyguard.ID] !== 'undefined') {
				r += `${SlaveFullName(V.Bodyguard)} is serving as your bodyguard. <<link "Manage Bodyguard">><<goto "BG Select">><</link>> [B]`;
			} else {
				r += `You have not selected a Bodyguard. <span id="manageBG"><strong><<link "Select one">><<goto "BG Select">><</link>></strong></span> <span class="cyan">[B]</span>`;
			}
		}
	}

	if (V.completedOrgans.length > 0) {
		/* first remove any organs with no corresponding slave */
		V.completedOrgans = V.completedOrgans.filter(organ => {
			return (typeof organ === 'object' && getSlave(organ.ID) !== undefined);
		});
		/* cycle through slaves, for each slave cycle through completed organs and track how many are of the interrogated slave (and if organs have a slaves to be implanted on) */
		for (let i = 0; i < V.slaves.length; i++) {
			const slaveOrgans = V.completedOrgans.reduce((acc, organ) => organ.ID === V.slaves[i].ID ? acc + 1 : acc, 0);
			/* if the interrogated slave has one or more organs ready: */
			if (slaveOrgans > 0) {
				r += '
The fabricator has completed ';
				if (slaveOrgans > 1) {
					r += `${slaveOrgans} organs`;
				} else {
					r += 'an organ';
				}
				r += ` for </span><<link "<<print $slaves[${i}].slaveName>>">><<set $activeSlave = $slaves[${i}]>><<goto "Slave Interact">><</link>>, <span class="yellow"> which `;
				if (slaveOrgans > 1) {
					r += 'are';
				} else {
					r += 'is';
				}
				r += ' ready to be implanted.';
			}
		}
	}

	if (V.adjustProstheticsCompleted > 0) {
		for (let j = 0; j < V.adjustProsthetics.length; j++) {
			if (getSlave(V.adjustProsthetics[j].slaveID) !== undefined) {
				const i = V.slaveIndices[V.adjustProsthetics[j].slaveID];
				if (V.adjustProsthetics[j].workLeft <= 0) {
					r += `
The lab has completed <<= addA(setup.prosthetics[$adjustProsthetics[${j}].id].name)>> for <<= "[[SlaveFullName($slaves[${i}])|Slave Interact][$activeSlave = $slaves[${i}]]]">>,  which is ready to be attached.`;
				}
			} else {
				V.adjustProsthetics.splice(j, 1);
				j--;
			}
		}
	}

	if (V.completedOrgans.length > 0 && V.adjustProstheticsCompleted > 0) {
		r += `<br>[[Implant and Attach|Multiple Organ Implant]] <span class="yellow">all organs and prosthetics that are ready.</span>`;
	} else if (V.completedOrgans.length > 0) {
		r += `<br>[[Implant|Multiple Organ Implant]] <span class="yellow">all organs that are ready for implantation.</span>`;
	} else if (V.adjustProstheticsCompleted > 0) {
		r += `<br>[[Attach|Multiple Organ Implant]] <span class="yellow">all prosthetics that are ready to be attached.</span>`;
	}

	if (V.slaveCostFactor > 1.05) {
		r += `<br><span class="yellow">There is a bull market for slaves; the price of slaves is very high.</span>`;
	} else if (V.slaveCostFactor > 1) {
		r += `<br><span class="yellow">The slave market is bullish; the price of slaves is high.</span>`;
	} else if (V.slaveCostFactor < 0.95) {
		r += `<br><span class="yellow">There is a bear market for slaves; the price of slaves is very low.</span>`;
	} else if (V.slaveCostFactor < 1) {
		r += `<br><span class="yellow">The slave market is bearish; the price of slaves is low.</span>`;
	} else {
		r += `<br>The slave market is stable; the price of slaves is average.`;
	}

	r += ` <span id="buySlaves"><strong><<link "Buy Slaves">><<goto "Buy Slaves">><</link>></strong></span> <span class="cyan">[S]</span>`;
	if (V.seeDicks !== 100) {
		if (V.TSS.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Slavegirl School][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
		if (V.GRI.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[Growth Research Institute][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
		if (V.SCP.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[St. Claver Preparatory][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
		if (V.TCR.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Cattle Ranch][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
		if (V.HA.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Hippolyta Academy][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
	}
	if (V.seeDicks !== 0) {
		if (V.LDE.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[L'École des Enculées][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
		if (V.TGA.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Gymnasium-Academy][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
		if (V.TFS.schoolSale !== 0) {
			r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Futanari Sisters][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
		}
	}
	if (V.NUL.schoolSale !== 0) {
		r += `<br><span class="yellow">For your first purchase, </span><strong>[[Nueva Universidad de Libertad][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
	}
	return r;
};
/* CLOSE MAIN */


code:
/* OPEN TOYCHEST */
App.Interact.ToyChest = function(slave) {
	"use strict";
	let r = ``;
	/* eslint-disable no-unused-vars*/
	const {
		he, him, his, hers, himself, boy, He, His
	} = getPronouns(slave);
	/* eslint-enable */

	r = `${slave.slaveName} `;
	if (slave.fuckdoll) {
		r += `is waiting for use nearby. `;
	} else if (slave.fetish === "mindbroken") {
		if (canSmell(slave) && slave.career === "a breeding bull" && isFertile(V.PC) && V.PC.preg === 0 && canPenetrate(slave)) {
			r += `is rock hard and sniffing the air. `;
		} else {
			r += `is waiting dumbly nearby. `;
		}
	} else if (slave.devotion > 50) {
		if (slave.toyHole === "mouth") {
			r += `has positioned ${himself} nearby with ${his} mouth conveniently `;
			if (V.PC.dick) {
				r += `at cock level. `;
			} else {
				r += `level with your pussy. `;
			}
		} else if (slave.toyHole === "boobs") {
			r += `is kneeling nearby with ${his} chest thrust out as far as it will go. `;
		} else if (slave.toyHole === "pussy" && hasBothLegs(slave)) {
			r += `is kneeling on the couch with legs apart to present ${his} pussy. `;
		} else if (slave.toyHole === "pussy") {
			r += `is lying on the couch with ${his} pussy ready for you. `;
		} else if (slave.toyHole === "ass" && hasBothLegs(slave)) {
			r += `is lying on the couch with ${his} legs up and back to present ${his} butthole. `;
		} else if (slave.toyHole === "ass") {
			r += `is lying on the couch with ${his} butt ready for you. `;
		} else if (slave.toyHole === "dick") {
			r += `is lying on the couch with ${his} dick at the ready for you. `;
		} else {
			r += `is nearby, eagerly presenting ${himself}. `;
		}
	} else if (slave.trust < -20) {
		r += `is waiting nearby in terror, hoping obedience will save ${him} from punishment. `;
	} else if (slave.devotion < -90) {
		r += `is hogtied nearby for sexual abuse. `;
	} else if (slave.devotion < -50) {
		r += `is restrained nearby for sexual use. `;
	} else if (slave.devotion < -20) {
		r += `is unhappily waiting nearby for sexual use. `;
	} else if (slave.devotion <= 20) {
		r += `is obediently waiting nearby for sexual use. `;
	} else if (slave.devotion <= 50) {
		r += `has positioned ${himself} nearby to offer you ${his} body. `;
	}
	let pose = jsRandom(1, 100);
	if (slave.fuckdoll) {
		r += `${His} holes are, as always, available. `;
	} else if (slave.fetish === "mindbroken") {
		r += `${He} ignores ${his} clothing, regarding it as an impediment to ${his} purpose. `;
	} else {
		switch (slave.clothes) {
			case "shibari ropes":
				r += `You've tied ${his} shibari bindings so that ${he}'s forced to thrust out ${his} chest. `;
				break;
			case "uncomfortable straps":
				if (pose > 75) {
					r += `${His} leather straps are forcing ${him} to thrust out ${his} tits. `;
				} else if (pose > 50) {
					r += `${His} leather straps are uncomfortably pressing ${his} breasts and asscrack. `;
				} else if (pose > 25) {
					r += `The rings in ${his} leather straps over each nipple and hole make ${him} look like a perfect fucktoy. `;
				} else {
					r += `${His} uncomfortable straps force ${him} to constantly present ${his} holes. `;
				}
				break;
			case "restrictive latex":
			case "a latex catsuit":
				r += `${His} complete suit of latex makes ${him} a nice, artistic display, a plastic work of art in the shape of a female form.`;
				break;
			case "a military uniform":
				r += `${His} uniformed presence lends your office the air of a military command center.`;
				break;
			case "a schutzstaffel uniform":
				r += `${His} uniformed presence lends your office the air of a military command center.`;
				break;
			case "a slutty schutzstaffel uniform":
				r += `${His} uniformed presence lends your office the air of a military command center.`;
				break;
			case "a red army uniform":
				r += `${His} uniformed presence lends your office the air of a military command center.`;
				break;
			case "a long qipao":
				r += `${His} elegant qipao lends your office an air of traditional opulence and prestige.`;
				break;
			case "battlearmor":
				r += `${His} armored presence lends your office the air of a battlefield command center.`;
				break;
			case "a mounty outfit":
				r += `${His} uniformed presence lends your office the air of a police command center.`;
				break;
			case "a dirndl":
				r += `${His} dirndl lends a traditional atmosphere to your office.`;
				break;
			case "lederhosen":
				r += `${His} lederhosen lends a traditional atmosphere to your office.`;
				break;
			case "a biyelgee costume":
				r += `${His} biyelgee costume lends a festive atmosphere to your office.`;
				break;
			case "a mini skirt":
				r += `${His} flattering mini dress makes ${him} the perfect office ornament for the modern captain of industry.`;
				break;
			case "a nice nurse outfit":
				r += `${His} proper nurse's outfit gives the office a clinical air.`;
				break;
			case "a fallen nuns habit":
				r += `${His} latex parody of a nuns habit gives the office a sacrilegious air.`;
				break;
			case "a chattel habit":
				r += `${His} chattel habit makes the office look like what it is: the inner sanctum of a new and deeply sensual faith.`;
				break;
			case "a penitent nuns habit":
				r += `${His} sackcloth habit gives the office a somber air.`;
				break;
			case "attractive lingerie":
				r += `${He}'s wearing classy lingerie, making ${him} an unusually refined ornament to the office.`;
				break;
			case "kitty lingerie":
				r += `${His} cat-themed lingerie gives the office a bizarrely innocent air of perversion.`;
				break;
			case "a succubus outfit":
				r += `${He}'s dressed to look like a succubus. There is a demon`;
				if (V.PC.title === 0) {
					r += `ess`;
				}
				r += ` in this office, and ${he} serves `;
				if (V.PC.title === 0) {
					r += `her.`;
				} else {
					r += `him.`;
				}
				break;
			case "spats and a tank top":
				r += `${He}'s wearing spats and a tank top, giving the office the active air of a gym.`;
				break;
			case "a string bikini":
				r += `${He}'s wearing a string bikini, making ${him} a sexy, enticing office ornament.`;
				break;
			case "a scalemail bikini":
				r += `${His} scalemail bikini gives the office a medieval air.`;
				break;
			case "striped panties":
			case "a striped bra":
			case "striped underwear":
				r += `${He}'s wearing cute underwear, making ${him} a sexy, innocent-looking office ornament.`;
				break;
			case "attractive lingerie for a pregnant woman":
				r += `${His} breasts gently spill out of ${his} slightly too small top.`;
				if (slave.lactation) {
					r += `${His} leaking nipples have rendered ${his} top see-through.`;
				}
				break;
			case "a maternity dress":
				r += `${His} low cut dress reveals ample cleavage.`;
				break;
			case "stretch pants and a crop-top":
				r += `${His} comfortable clothes give your office a laid back air and are easy to slip off when the mood strikes.`;
				break;
			case "a cheerleader outfit":
				r += `${He}'s wearing a slutty cheerleader outfit, making it look like ${he}'s here to fuck before team practice.`;
				break;
			case "clubslut netting":
				r += `${He}'s wearing slutty netting and headphones so ${he} can dance to music without annoying visitors.`;
				break;
			case "cutoffs and a t-shirt":
				r += `${He}'s wearing cutoffs and a t-shirt, making ${him} a fun, clean office ornament.`;
				break;
			case "a slutty nurse outfit":
				r += `${He}'s wearing a slutty nurse outfit, and looks more than ready to minister to any patient's needs.`;
				break;
			case "a schoolgirl outfit":
				r += `${He}'s wearing a slutty schoolgirl outfit, and looks ready to do whatever it takes to improve ${his} grades.`;
				break;
			case "a kimono":
				r += `${He}'s wearing a kimono, lending your office an air of elegance, though ${he} lacks some of the air of the true yamato nadeshiko.`;
				break;
			case "a burkini":
				r += `${He}'s wearing a colorful burkini, lending your office a vague air of conservatism.`;
				break;
			case "a hijab and blouse":
				r += `${He}'s wearing a modest hijab and blouse, lending your office a certain air of conservatism.`;
				break;
			case "a hijab and abaya":
				r += `${He}'s wearing a modest hijab and abaya, lending your office a certain air of conservatism.`;
				break;
			case "a niqab and abaya":
				r += `${He}'s wearing a niqab and abaya, lending your office an air of conservatism.`;
				break;
			case "a klan robe":
			case "a slutty klan robe":
				r += `${He}'s wearing a ku klux klan robe, lending your office an air of conservatism.`;
				break;
			case "a burqa":
				r += `${He}'s wearing an all-concealing burqa, lending your office an intense air of conservatism.`;
				break;
			case "battledress":
				r += `${He}'s wearing skimpy battledress, making your office seem a little like the ideal bunker for a survivalist.`;
				break;
			case "a slutty outfit":
				if (slave.actualAge < 21) {
					r += `${He}'s wearing a schoolgirl uniform and sucking on hard candy, giving ${him} a delectably youthful appearance.`;
				} else if (slave.actualAge < 30) {
					r += `${He}'s chosen to wear a slutty nurse outfit, and looks more than ready to minister to any patient's needs.`;
				} else if (slave.actualAge < 40) {
					r += `${He}'s wearing a schoolgirl uniform and sucking on hard candy, a delightfully perverse outfit for a slave in ${his} thirties.`;
				} else {
					r += `${He}'s wearing a wifely apron that covers ${his} front, but leaves ${his} backside bare, an appropriate outfit for a slave in ${his} forties.`;
				}
				break;
			case "a halter top dress":
				r += `The gorgeous halter top dress ${he}'s wearing is almost a work of art.`;
				break;
			case "a ball gown":
				r += `The fabulous silken ball gown ${he}'s wearing lifts the entire atmosphere.`;
				break;
			case "a slave gown":
				r += `The gorgeous gown ${he}'s wearing lends an air of class to the office.`;
				break;
			case "slutty business attire":
				r += `The suit ${he}'s wearing would make it look like ${he}'s here to do business, if not for the extreme shortness of the skirt and ${his} acre of cleavage.`;
				break;
			case "nice business attire":
				r += `The suit ${he}'s wearing makes it look like ${he}'s here to do business, not fuck.`;
				break;
			case "a comfortable bodysuit":
				r += `The bodysuit ${he}'s wearing displays ${his} every fuckable curve.`;
				break;
			case "a leotard":
				r += `The leotard ${he}'s wearing is tight enough to advertise every detail.`;
				break;
			case "a monokini":
				r += `${His} topless swimsuit gives the office a perverted yet cultured aura.`;
				break;
			case "an apron":
				r += `${His} apron makes the office an intimate air, especially since ${he}'s nude underneath it.`;
				break;
			case "a cybersuit":
				r += `${His} cybersuit lends to an impersonal but sexual atmosphere, as ${his} delicious curves are prominently displayed.`;
				break;
			case "a bunny outfit":
				r += `The bunny outfit ${he}'s wearing makes ${him} look ready to serve drinks and suck dick.`;
				break;
			case "a slutty maid outfit":
				r += `${His} maid outfit makes ${him} look useful and sexually easy.`;
				break;
			case "a nice maid outfit":
				r += `${His} maid outfit makes ${his} servitude obvious while not looking too lewd.`;
				break;
			case "harem gauze":
				r += `${His} harem girl outfit lends ${his} corner of your office an Eastern opulence.`;
				break;
			case "slutty jewelry":
				r += `The bangles ${he}'s wearing make little noises every time ${he} moves, serving as a constant reminder of ${his} sexual availability.`;
				break;
			case "conservative clothing":
				r += `${His} clothes make it look like ${he}'s here for some other purpose than sexual slavery.`;
				break;
			case "chains":
				r += `${His} chains make it obvious that ${he}'s here as an office sex toy.`;
				break;
			case "Western clothing":
				r += `${His} Western clothing is comically out of place in a modern office.`;
				break;
			case "overalls":
				r += `${His} worker's overalls make it clear that you're the boss and ${he} is your subordinate.`;
				break;
			case "body oil":
				r += `${His} body oil makes ${his} muscles a lovely ornament to the office, and makes all ${his} holes nice and inviting.`;
				break;
			case "a toga":
			case "a hanbok":
				r += `${His} toga lends an air of antiquity to the office.`;
				break;
			case "a huipil":
				r += `${His} revealing huipil is a delightfully exotic novelty in your office.`;
				break;
			case "a slutty qipao":
				r += `${His} lovely qipao is a delicious contradiction of conservative silk patterns and scandalously high cuts.`;
				break;
			case "a bimbo outfit":
				r += `The way ${his} underwear is revealed by ${his} clothing just exudes sluttiness.`;
				break;
			case "a courtesan dress":
				r += `The layered dress ${he}'s wearing, and the posture forced by its corset, gives your office an air of elegance.`;
				break;
			case "a bra":
			case "a button-up shirt":
			case "a button-up shirt and panties":
			case "a sweater":
			case "a sweater and cutoffs":
			case "a sweater and panties":
			case "a t-shirt":
			case "a t-shirt and jeans":
			case "a t-shirt and panties":
			case "a t-shirt and thong":
			case "a tank-top":
			case "a tank-top and panties":
			case "a thong":
			case "a tube top":
			case "a tube top and thong":
			case "an oversized t-shirt":
			case "an oversized t-shirt and boyshorts":
			case "boyshorts":
			case "cutoffs":
			case "jeans":
			case "leather pants":
			case "leather pants and a tube top":
			case "leather pants and pasties":
			case "panties":
			case "panties and pasties":
			case "pasties":
				r += `${His} purpose as your office sex toy is prominently displayed by ${his} revealing outfit.`;
				break;
			case "a gothic lolita dress":
				r += `${His} gothic lolita dress lends a cute but dark old world charm to your office.`;
				break;
			case "a police uniform":
				r += `${His} police uniform lends an air of security and authority to your office.`;
				break;
			case "a one-piece swimsuit":
				r += `${His} one-piece swimsuit lends your office a more casual atmosphere.`;
				break;
			case "a nice pony outfit":
			case "a slutty pony outfit":
				r += `${His} bondage pony outfit reinforces the atmosphere of submission to your will.`;
				break;
			case "a sports bra":
			case "sport shorts and a t-shirt":
			case "sport shorts and a sports bra":
			case "sport shorts":
				r += `${His} athletic clothing gives the office a more youthful vibe.`;
				break;
			case "a skimpy loincloth":
				r += `${His} skimpy loincloth gives the office a more barbaric and raw atmosphere.`;
				break;
			case "a Santa dress":
				r += `${His} skimpy dress somehow makes you seem more charitable and jovial than you really are.`;
				break;
			default:
				if (slave.chastityVagina && slave.chastityAnus) {
					r += `${His} chastity belt covers and protects both ${his} vagina and anus, but leaves ${his} breasts naked and ${his} mouth available.`;
				} else if (slave.chastityVagina) {
					r += `${His} chastity belt covers and protects ${his} pussy, but leaves ${his} breasts naked, ${his} mouth available, and ${his} asshole vulnerable.`;
				} else if (slave.chastityAnus) {
					r += `${His} chastity belt covers and protects ${his} anus, but leaves ${his} breasts naked, ${his} mouth available, and ${his} pussy vulnerable.`;
				} else {
					r += `${He}'s nude and ready to be fucked.`;
				}
				break;
		}
	}
	return r;
};


code:
/* OPEN USEGUARD */
App.Interact.UseGuard = function(slave) {
	"use strict";
	let r = ``;
	/* eslint-disable no-unused-vars*/
	const {
		he, him, his, hers, himself, boy,
		He, His
	} = getPronouns(slave);
	let man = (boy === "girl" ? "woman" : "man");
	/* eslint-enable */

	r = `${slave.slaveName} is standing behind your left shoulder, guarding your person. `;
	switch (slave.clothes) {
		case "attractive lingerie":
			r += `${His} lacy lingerie contrasts with ${his} deadly weaponry.`;
			break;
		case "a succubus outfit":
			r += `${His} succubus outfit and impressive weapons make ${him} look like a character from an overwrought graphic novel.`;
			break;
		case "uncomfortable straps":
			r += `${His} uncomfortable straps make ${him} look like a classical slave warrior.`;
			break;
		case "shibari ropes":
			r += `${His} shibari ropes make ${him} look like an insane slave fighter.`;
			break;
		case "restrictive latex":
		case "a latex catsuit":
			r += `${His} complete suit of latex gives ${him} a beautiful yet intimidating appearance.`;
			break;
		case "a nice nurse outfit":
			r += `${His} practical nurse's outfit make ${his} weapons look like surgical instruments of death.`;
			break;
		case "a military uniform":
			r += `${His} military uniform is most befitting of an honor guard.`;
			break;
		case "a schutzstaffel uniform":
			r += `${His} military uniform is most befitting of an honor guard.`;
			break;
		case "a slutty schutzstaffel uniform":
			r += `${His} military uniform is most befitting of an honor guard and your personal whore.`;
			break;
		case "a red army uniform":
			r += `${His} military uniform is most befitting of an honor guard.`;
			break;
		case "a long qipao":
			r += `${His} elegant qipao makes ${him} seem less deadly than ${he} actually is.`;
			break;
		case "battlearmor":
			r += `${His} battlearmor means ${he}'s always ready for combat.`;
			break;
		case "a mounty outfit":
			r += `${His} mounty outfit only enhances ${his} authority as your personal guard.`;
			break;
		case "a police uniform":
			r += `${His} police uniform only enhances ${his} authority as your personal guard.`;
			break;
		case "a gothic lolita dress":
			r += `${His} elegant dress makes ${him} seem less deadly than ${he} actually is.`;
			break;
		case "a dirndl":
			r += `${His} dirndl allows ${him} to hide all sorts of useful weapons against ${his} bare thighs.`;
			break;
		case "lederhosen":
			r += `${His} weapon hangs from a shoulder sling over ${his} lederhosen.`;
			break;
		case "a biyelgee costume":
			r += `${His} biyelgee costume makes ${him} appear as an athletic specimen, ready to defend you in hand-to-hand combat.`;
			break;
		case "a mini dress":
			r += `${His} revealing mini dress and elegant weapons make ${him} look sexy, yet deadly.`;
			break;
		case "a monokini":
			r += `${His} monokini's unrepressed appearance clashes amusingly with ${his} deadly weapons.`;
			break;
		case "an apron":
			r += `${He}'s nude, aside from an apron and the holsters for ${his} numerous weapons.`;
			break;
		case "overalls":
			r += `${His} overalls and armaments make ${him} look like ${he}'s ready to shoot some varmints.`;
			break;
		case "a cybersuit":
			r += `${His} cybersuit makes ${him} look sleek, sexy, and deadly. A perfect femme fatale.`;
			break;
		case "clubslut netting":
			r += `${His} club netting's slutty appearance clashes amusingly with ${his} deadly weapons.`;
			break;
		case "a string bikini":
			r += `${His} string bikini's flirty appearance clashes amusingly with ${his} deadly weapons.`;
			break;
		case "a scalemail bikini":
			r += `${His} scalemail bikini's barbaric appearance meshes well with ${his} sword, but clashes with ${his} firearms.`;
			break;
		case "striped panties":
			r += `${He}'s nude, aside from some cute panties and the holsters for ${his} numerous weapons.`;
			break;
		case "a slutty outfit":
			if (slave.actualAge < 21) {
				r += `${He}'s wearing a schoolgirl uniform and sucking on hard candy, making ${him} look like a character from a kung-fu film.`;
			} else if (slave.actualAge < 30) {
				r += `${He}'s chosen to wear a catsuit, and looks like a fictional heroine.`;
			} else if (slave.actualAge < 40) {
				// TODO: should this one be the same as the one above?
				r += `${He}'s wearing a schoolgirl uniform and sucking on hard candy, making ${him} look like a character from a kung-fu film.`;
			} else {
				r += `${He}'s wearing a wifely dress, creating a discordant effect with ${his} weapons.`;
			}
			break;
		case "a cheerleader outfit":
			r += `${He}'s wearing a cheerleader uniform, creating an amusing effect with ${his} weapons.`;
			break;
		case "attractive lingerie for a pregnant woman":
			r += `${His} silky lingerie contrasts with ${his} deadly weaponry.`;
			break;
		case "kitty lingerie":
			r += `${His} cutesy lingerie contrasts with ${his} deadly weaponry.`;
			break;
		case "a maternity dress":
			r += `${His} loose dress gives ${him} plenty of places to conceal weaponry.`;
			break;
		case "stretch pants and a crop-top":
			r += `${His} relaxed outfit clashes amusingly with ${his} serious weapons.`;
			break;
		case "a slave gown":
			r += `${His} gorgeous gown and elegant weapons make ${him} look refined, yet deadly.`;
			break;
		case "a halter top dress":
			r += `${His} beautiful halter top dress and elegant weapons make ${him} look refined, yet deadly.`;
			break;
		case "a ball gown":
			r += `${His} fabulous silken ball gown and elegant weapons make ${him} look refined, yet deadly.`;
			break;
		case "a nice maid outfit":
			r += `${His} pretty maid outfit and weapons make ${him} look like a character from an animated movie.`;
			break;
		case "a nice pony outfit":
		case "a slutty pony outfit":
			r += `${His} leather outfit make ${him} look like an insane slave fighter.`;
			break;
		case "a hanbok":
			r += `${His} pretty hanbok and weapons make ${him} look like a character from a history novel.`;
			break;
		case "spats and a tank top":
			r += `${His} exercise outfit makes ${him} look like ${he} has the fitness to back up ${his} weapons.`;
			break;
		case "a slutty maid outfit":
			r += `${His} slutty maid outfit and weapons make ${him} look like a character from an exploitation film.`;
			break;
		case "cutoffs and a t-shirt":
			r += `${His} relaxed clothing clashes with ${his} weaponry, making ${him} look like ${he}'s planning to kill someone and then have a relaxing day off.`;
			break;
		case "harem gauze":
			r += `${His} weapons pin ${his} sheer gauze down over ${his} body, putting everything on lewd display.`;
			break;
		case "a fallen nuns habit":
			r += `${His} sacrilegious getup and weapons make ${him} look like a sinner's fantasy.`;
			break;
		case "a chattel habit":
			r += `${His} chattel habit and weapons make ${his} role as a defender of the new faith instantly obvious.`;
			break;
		case "a penitent nuns habit":
			r += `${His} somber habit and weapons make ${him} look like a member of a militant order.`;
			break;
		case "slutty business attire":
			r += `${His} slutty business suit and weapons give ${him} the look a supervillain's sidekick.`;
			break;
		case "nice business attire":
			r += `${His} business suit and weapons give ${him} the look of a finely honed corporate instrument.`;
			break;
		case "conservative clothing":
			r += `${His} casual, conservative clothes and weapons make ${him} look like a normal old world security contractrix.`;
			break;
		case "a hijab and blouse":
			r += `${His} modest, conservative clothes and weapons make ${him} look like an old world security contractrix.`;
			break;
		case "a comfortable bodysuit":
			r += `${His} bodysuit and weapons make ${him} look like an action movie heroine.`;
			break;
		case "a burkini":
			r += `${His} form-fitting swimsuit and weapons make ${him} look like an action movie heroine.`;
			break;
		case "a Santa dress":
			r += `${His} skimpy holiday dress seems to be for those on the nice list, but ${his} weaponry is for those on the naughty list.`;
			break;
		case "a leotard":
			r += `${His} leotard and weapons make ${him} look like the heroine of an old exploitation film.`;
			break;
		case "a bunny outfit":
			r += `${His} bunny outfit and weapons make ${him} look like the hench${man} of a villain from a cheesy vintage spy film.`;
			break;
		case "a slutty nurse outfit":
			r += `Between ${his} nurse outfit and ${his} weapons ${he} looks prepared to do harm, and then to heal it.`;
			break;
		case "a schoolgirl outfit":
			r += `This school${boy} is well armed, bringing to mind more than one farcical action film.`;
			break;
		case "a kimono":
			r += `${His} kimono has discreet cuts that allow ${him} to fight reasonably well in it if necessary, and are almost invisible when ${he} stands straight.`;
			break;
		case "a slutty qipao":
			r += `${His} qipao and weapons make ${him} look like a character from a fighting game.`;
			break;
		case "a toga":
			r += `${His} toga and weapons make a stark contrast, making ${him} stand out a lot.`;
			break;
		case "a huipil":
			r += `${His} huipil hides most of the weapons ${he} carries, but carrying them on naked skin is a slight discomfort.`;
			break;
		case "a hijab and abaya":
		case "a niqab and abaya":
			r += `${His} weapons are strapped to the outside of ${his} abaya, a juxtaposition that would be more ludicrous had not many women in the Middle East recently been seen fighting dressed in just this way.`;
			break;
		case "a burqa":
			r += `${His} weapons are strapped to the outside of ${his} burqa, a juxtaposition that would be more ludicrous had not some women in the Middle East recently been seen fighting dressed in just this way.`;
			break;
		case "a klan robe":
		case "a slutty klan robe":
			r += `${His} weapons are strapped to the outside of ${his} robe, all the essentials are present, mainly rope.`;
			break;
		case "battledress":
			r += `Though ${his} battledress top is just a tank top, ${he} still skirts the edge of looking more like a Free Cities mercenary than a Free Cities sex slave.`;
			break;
		case "slutty jewelry":
			r += `The bangles ${he}'s wearing are complemented by the straps that mount ${his} weapons to ${his} otherwise naked body.`;
			break;
		case "a courtesan dress":
			r += `${He} may look unarmed, but ${his} layered skirt and hanging sleeves perfectly conceal ${his} arsenal.`;
			break;
		case "a bimbo outfit":
			r += `${His} lacy lingerie and barely there clothing contrasts with ${his} deadly weaponry.`;
			break;
		case "a tube top and thong":
		case "a button-up shirt and panties":
		case "a bra":
		case "a button-up shirt":
		case "a sweater":
		case "a tank-top":
		case "a thong":
		case "a tube top":
		case "a striped bra":
		case "a skimpy loincloth":
		case "a sports bra":
			r += `Due to the skimpiness of ${his} outfit, ${he} appears to be wearing more weapons than clothing.`;
			break;
		case "a sweater and panties":
		case "a sweater and cutoffs":
		case "a t-shirt and jeans":
		case "a t-shirt and panties":
		case "a t-shirt and thong":
		case "a t-shirt":
		case "a tank-top and panties":
		case "an oversized t-shirt and boyshorts":
		case "an oversized t-shirt":
		case "boyshorts":
		case "cutoffs":
		case "jeans":
		case "leather pants and a tube top":
		case "leather pants and pasties":
		case "leather pants":
		case "panties and pasties":
		case "panties":
		case "pasties":
		case "sport shorts and a sports bra":
		case "sport shorts and a t-shirt":
		case "sport shorts":
		case "striped underwear":
			r += `${His} weapons only accentuate the nakedness of ${his} body.`;
			break;
		default:
			if (slave.chastityVagina || slave.chastityAnus) {
				r += `${His} chastity belt covers and protects ${him}, just as ${his} weapons cover and protect you.`;
			} else if (slave.chastityPenis === 1) {
				r += `${His} chastity cage covers and protects ${him}, just as ${his} weapons cover and protect you.`;
			} else {
				r += `${He} is nude except for ${his} armament.`;
			}
			break;
	}
	return r;
};
/* CLOSE USEGUARD */