code:
App.SlaveAssignment.choosesOwnJob = (function() {
	"use strict";

	let r;

	// eslint-disable-next-line no-unused-vars
	let he, him, his, hers, himself, girl, loli, He, His;

	let clinicL;
	let schoolL;
	let servQL;
	let nurseryL;
	let brothelL;
	let clubL;
	let masterSL;
	let spaL;
	let dairyL;
	let arcology;

	return saChoosesOwnJob;

	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string}
	 */
	function saChoosesOwnJob(slave) {
		r = [];

		clinicL = App.Entity.facilities.clinic.employeesIDs().size;
		schoolL = App.Entity.facilities.schoolroom.employeesIDs().size;
		servQL = App.Entity.facilities.servantsQuarters.employeesIDs().size;
		nurseryL = App.Entity.facilities.nursery.employeesIDs().size;
		brothelL = App.Entity.facilities.brothel.employeesIDs().size;
		clubL = App.Entity.facilities.club.employeesIDs().size;
		masterSL = App.Entity.facilities.masterSuite.employeesIDs().size;
		spaL = App.Entity.facilities.spa.employeesIDs().size;
		dairyL = App.Entity.facilities.dairy.employeesIDs().size;

		arcology = V.arcologies[0];

		({
			// eslint-disable-next-line no-unused-vars
			he, him, his, hers, himself, girl, He, His, loli
		} = getPronouns(slave));

		if (slave.choosesOwnAssignment === 0 || slave.fuckdoll > 0 || slave.fetish === "mindbroken") {
			// nothing to do
		} else if (slave.choosesOwnAssignment === 2) {
			// second pass happens visibly during weekly report for the location where this slave decided to go (or stay)
			// display text but don't change assignment (already done)
			r.push(V.choosesOwnAssignmentText[slave.ID]);
			delete V.choosesOwnAssignmentText[slave.ID];
			slave.choosesOwnAssignment = 1;
			// continue cycle for next week
		} else {
			// first pass happens silently before all reports: give stats bonus, construct decision string for display during second pass, actually change assignment
			slave.devotion++;
			slave.trust++;
			V.choosesOwnAssignmentText[slave.ID] = jobSelection(slave);
		}

		return r.join(" ");
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function jobSelection(slave) {
		let choice = [];

		choice.push(`was assigned to ${slave.assignment}. ${He} ${canSee(slave) ? "watches" : "observes"} your other slaves to decide what to do, happy to be permitted a choice and a little more confident than if you had just given ${him} orders. The ${SlaveTitle(slave)}`);

		if (slave.devotion <= 20 && slave.trust >= -20) {
			 if (slave.relationship === -3 && slave.devotion < -20) {
				choice.push(`is reluctantly married to you, and ${he} thinks of all the ways ${he} <span class="devotion dec">can take advantage of this,</span>`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.spa > spaL) {
					choice.push(`so ${he} heads straight to ${V.spaName} to relax.`);
					choice.push(assignJob(slave, "rest in the spa"));
				} else {
					choice.push(`so ${he} cheerfully decides to lounge about the penthouse.`);
					choice.push(removeJob(slave, slave.assignment));
				}
			 } else {
				choice.push(`decides to rest, taking advantage of your permission to <span class="devotion dec">remain indolent.</span>`);
				choice.push(removeJob(slave, slave.assignment));
			 }
			 slave.devotion -= 5;
		} else if (slave.health.illness > 1) {
			if (V.universalRulesAssignsSelfFacility === 1 && V.clinic > clinicL) {
				choice.push(`is ill, so ${he} decides to get treatment at${V.clinicName}.`);
				choice.push(assignJob(slave, "get treatment in the clinic"));
			} else {
				choice.push(`is ill, so ${he} decides to rest.`);
				choice.push(removeJob(slave, slave.assignment));
			}
		} else if (slave.health.condition < 20) {
			if (V.universalRulesAssignsSelfFacility === 1 && V.spa > spaL) {
				choice.push(`is unhealthy, so ${he} decides to get recover at ${V.spaName}.`);
				choice.push(assignJob(slave, "rest in the spa"));
			} else {
				choice.push(`is unhealthy, so ${he} decides to rest.`);
				choice.push(removeJob(slave, slave.assignment));
			}
		} else if (slave.health.tired > 45) {
			if (V.universalRulesAssignsSelfFacility === 1 && V.spa > spaL) {
				choice.push(`is tired, so ${he} decides to recover at ${V.spaName}.`);
				choice.push(assignJob(slave, "rest in the spa"));
			} else {
				choice.push(`is tired, so ${he} decides to rest.`);
				choice.push(removeJob(slave, slave.assignment));
			}
		} else if (slave.boobsMilk > 0) {
			choice.push(`rushes to get milked since ${his} breasts have become painfully engorged.`);
			choice.push(assignJob(slave, "get milked"));
		} else if (slave.intelligenceImplant < 15 && slave.intelligence > 10 && (arcology.FSPaternalist > 20 || arcology.FSSlaveProfessionalism > 20) && arcology.FSGenderFundamentalistLawBimbo !== 1 ) {
			if (V.universalRulesAssignsSelfFacility === 1 && V.schoolroom > schoolL) {
				choice.push(`is uneducated, so ${he} sits ${himself} down in ${V.schoolroomName}.`);
				choice.push(assignJob(slave, "learn in the schoolroom"));
			} else {
				choice.push(`is uneducated, so ${he} sits ${himself} down to learn.`);
				choice.push(assignJob(slave, "take classes"));
			}
		} else if ((S.Attendant && V.universalRulesAssignsSelfFacility === 1 && V.spa > spaL) && (slave.devotion < 45 || slave.trust < 45 || (slave.sexualFlaw !== "none" && !setup.paraphiliaList.includes(slave.sexualFlaw)) || slave.behavioralFlaw !== "none")) {
			choice.push(`could use some counseling, so ${he} decides to visit ${V.spaName}.`);
			choice.push(assignJob(slave, "rest in the spa"));
		} else if (slave.devotion <= 50 && canWalk(slave) && canSee(slave)) {
			if (V.universalRulesAssignsSelfFacility === 1 && V.servantsQuarters > servQL) {
				choice.push(`is obedient but not devoted, so ${he} decides to work from ${V.servantsQuartersName} since it's the least sexually demanding job available.`);
				choice.push(assignJob(slave, "work as a servant"));
			} else {
				choice.push(`is obedient but not devoted, so ${he} decides to work as a servant since it's the least sexually demanding job available.`);
				choice.push(assignJob(slave, "be a servant"));
			}
		} else if (V.universalRulesAssignsSelfFacility === 1 && slave.devotion > 50 && canWalk(slave) && canSee(slave) && V.nurseryNannies > nurseryL && (V.cribs.findIndex((c) => (c.mother === slave.ID || c.father === slave.ID)))) {
			 if (V.cribs.findIndex((c) => (c.mother === slave.ID || c.father === slave.ID))) {
				choice.push(`wants to look after ${his} child, so ${he} decides to work in ${V.nurseryName}.`);
				choice.push(assignJob(slave, "work as a nanny"));
			} else { // motherly sexualQuirk
				choice.push(`enjoys taking care of children, so ${he} decides to work in ${V.nurseryName}.`);
				choice.push(assignJob(slave, "work as a nanny"));
			}
		} else if (slave.relationship === -1) {
			choice.push(`relies on promiscuity to fulfill ${his} emotional needs,`);
			if (V.cash < 10000) {
				choice.push(`and doesn't mind being a whore, so ${he} prostitutes ${himself}`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`in ${V.brothelName}.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`on the streets.`);
					choice.push(assignJob(slave, "whore"));
				}
			} else {
				choice.push(`so ${he} eagerly decides to slut around`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
					choice.push(`in ${V.clubName}.`);
					choice.push(assignJob(slave, "serve in the club"));
				} else {
					choice.push(`on the streets.`);
					choice.push(assignJob(slave, "serve the public"));
				}
				slave.sexAmount = 10;
			}
		} else if (slave.relationship === -2) {
			choice.push(`is emotionally bonded to you,`);
			if (slave.behavioralQuirk === "insecure") {
				choice.push(`but insecure, so ${he} decides to make you money by prostituting ${himself}`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`in ${V.brothelName}.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`on the streets.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (slave.behavioralQuirk === "advocate") {
				choice.push(`and an advocate for slavery, so ${he} decides to burnish your reputation by slutting it up`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
					choice.push(`in ${V.clubName}.`);
					choice.push(assignJob(slave, "serve in the club"));
				} else {
					choice.push(`on the streets.`);
					choice.push(assignJob(slave, "serve the public"));
				}
				slave.sexAmount = 10;
			} else if (slave.energy > 60) {
				choice.push(`and ${he} thinks of little but sex with you,`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.masterSuite > masterSL) {
					choice.push(`so ${he} heads straight to ${V.masterSuiteName}.`);
					choice.push(assignJob(slave, "serve in the master suite"));
				} else {
					choice.push(`so ${he} cheerfully designates ${himself} one of your fucktoys.`);
					choice.push(assignJob(slave, "please you"));
				}
			} else if (canSee(slave) && canWalk(slave)) {
				choice.push(`so ${he} decides to work`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.servantsQuarters > servQL) {
					choice.push(`from ${V.servantsQuartersName} to make your penthouse as clean and homelike as possible.`);
					choice.push(assignJob(slave, "work as a servant"));
				} else {
					choice.push(`as a servant to make your penthouse as clean and homelike as possible.`);
					choice.push(assignJob(slave, "be a servant"));
				}
			} else {
				choice.push(`but unable to do much on ${his} own,`);
				if (V.universalRulesAssignsSelfFacility === 1 && V.masterSuite > masterSL) {
					choice.push(`so ${he} heads straight to ${V.masterSuiteName} to await your caress.`);
					choice.push(assignJob(slave, "serve in the master suite"));
				} else {
					choice.push(`so ${he} cheerfully designates ${himself} one of your fucktoys to be close to you.`);
					choice.push(assignJob(slave, "please you"));
				}
			}
		} else if (slave.relationship === -3) {
			 if (slave.devotion+slave.trust >= 175) {
				choice.push(`is happily married to you,`);
			} else if (slave.devotion < -20) {
				choice.push(`is forcibly married to you,`);
			} else {
				choice.push(`is married to you,`);
			}
			 if (slave.devotion > 50) {
				if (slave.energy > 60) {
					choice.push(`and ${he} thinks of little but sex with you,`);
					if (V.universalRulesAssignsSelfFacility === 1 && V.masterSuite > masterSL) {
						choice.push(`so ${he} heads straight to ${V.masterSuiteName}.`);
						choice.push(assignJob(slave, "serve in the master suite"));
					} else {
						choice.push(`so ${he} cheerfully designates ${himself} one of your fucktoys.`);
						choice.push(assignJob(slave, "please you"));
					}
				} else if (canSee(slave) && canWalk(slave)) {
					choice.push(`so ${he} decides to work`);
					if (V.universalRulesAssignsSelfFacility === 1 && V.servantsQuarters > servQL) {
						choice.push(`from ${V.servantsQuartersName} to make your penthouse as clean and homelike as possible.`);
						choice.push(assignJob(slave, "work as a servant"));
					} else {
						choice.push(`as a servant to make your penthouse as clean and homelike as possible.`);
						choice.push(assignJob(slave, "be a servant"));
					}
				} else {
					choice.push(`but unable to do much on ${his} own`);
					if (V.universalRulesAssignsSelfFacility === 1 && V.masterSuite > masterSL) {
						choice.push(`so ${he} heads straight to ${V.masterSuiteName} to await your caress.`);
						choice.push(assignJob(slave, "serve in the master suite"));
					} else {
						choice.push(`so ${he} cheerfully designates ${himself} one of your fucktoys to be close to you.`);
						choice.push(assignJob(slave, "please you"));
					}
				}
			} else if (slave.devotion < -20) {
				choice.push(`and ${he} is scared of you, so ${he} chooses to work as a servant so that ${he} may serve you without "serving" you.`);
				choice.push(assignJob(slave, "be a servant"));
			} else {
				if (slave.energy > 60) {
					choice.push(`and ${he} thinks of little but sex,`);
					if (V.universalRulesAssignsSelfFacility === 1 && V.masterSuite > masterSL) {
						choice.push(`so ${he} heads straight to ${V.masterSuiteName}.`);
						choice.push(assignJob(slave, "serve in the master suite"));
					} else {
						choice.push(`so ${he} cheerfully designates ${himself} one of your fucktoys.`);
						choice.push(assignJob(slave, "please you"));
					}
				} else if (canSee(slave) && canWalk(slave)) {
					choice.push(`so ${he} decides to work`);
					if (V.universalRulesAssignsSelfFacility === 1 && V.servantsQuarters > servQL) {
						choice.push(`from ${V.servantsQuartersName} to make your penthouse as clean and homelike as possible.`);
						choice.push(assignJob(slave, "work as a servant"));
					} else {
						choice.push(`as a servant to make your penthouse as clean and homelike as possible.`);
						choice.push(assignJob(slave, "be a servant"));
					}
				} else {
					choice.push(`but unable to do much on ${his} own, so ${he} designates ${himself} one of your fucktoys to get more intimate with you.`);
					choice.push(assignJob(slave, "please you"));
				}
			}
		} else if (slave.fetishKnown === 1 || jsRandom(1, 100) > 5) { // Yes, this segways into other things than fetish. PM - I added a 5% chance for her to not think of something just for flavor.
			if (slave.fetish === "submissive" && canWalk(slave) && canSee(slave)) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.servantsQuarters > servQL) {
					choice.push(`thinks ${he} belongs at the bottom of the penthouse hierarchy, so ${he} goes to live in ${V.servantsQuartersName}.`);
					choice.push(assignJob(slave, "work as a servant"));
				} else {
					choice.push(`thinks ${he} belongs at the bottom of the penthouse hierarchy, so ${he} decides ${he} should be a servant.`);
					choice.push(assignJob(slave, "be a servant"));
				}
			} else if (slave.fetish === "dom" || slave.fetish === "sadist") {
				if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
					choice.push(`is self-confident, so ${he} decides to work in ${V.clubName}.`);
					choice.push(assignJob(slave, "serve in the club"));
				} else {
					choice.push(`is self-confident, so ${he} decides to work as a public servant.`);
					choice.push(assignJob(slave, "serve the public"));
				}
				slave.sexAmount = 10;
			} else if (slave.fetish === "masochist") {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`enjoys abuse, so ${he} hurries down to ${V.brothelName}.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`enjoys abuse, so ${he} decides to become a whore.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (slave.fetish === "cumslut") {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`hurries down to ${V.brothelName} to suck cocks.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`decides to become a whore, mostly to suck cock.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (slave.fetish === "humiliation") {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`decides to work in ${V.brothelName}, since it's even more embarrassing to be a whore than a club slut.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`decides to whore, since it's even more embarrassing to be a whore than to be a public servant.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (slave.fetish === "buttslut") {
				if (slave.balls > 0 && slave.prostate > 0 && V.universalRulesAssignsSelfFacility === 1 && V.dairyRestraintsSetting < 2 && V.dairyStimulatorsSetting > 0 && V.dairy > dairyL) {
					choice.push(`chooses confinement in ${V.dairyName}, since all ${he} will be expected to do is produce cum by orgasming to buttsex.`);
					choice.push(assignJob(slave, "work in the dairy"));
				} else if (canDoAnal(slave)){
					if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
						choice.push(`decides to work in ${V.brothelName}, since whores get buttfucked more than anyone else.`);
						choice.push(assignJob(slave, "work in the brothel"));
					} else {
						choice.push(`decides to whore, since whores get buttfucked more than anyone else.`);
						choice.push(assignJob(slave, "whore"));
					}
					slave.sexAmount = 10;
				} else {
					if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
						choice.push(`decides to shake ${his} money maker in ${V.clubName}.`);
						choice.push(assignJob(slave, "serve in the club"));
					} else {
						choice.push(`decides to shake ${his} money maker on the streets.`);
						choice.push(assignJob(slave, "serve the public"));
					}
					slave.sexAmount = 10;
				}
			} else if (slave.fetish === "pregnancy") {
				if (V.PC.dick > 0 && isFertile(slave)) {
					if (V.universalRulesAssignsSelfFacility === 1 && V.masterSuite > masterSL) {
						choice.push(`decides to serve you in ${V.masterSuiteName}, hoping that you'll get ${him} pregnant.`);
						choice.push(assignJob(slave, "serve in the master suite"));
					} else {
						choice.push(`decides to be your fucktoy, hoping that you'll get ${him} pregnant.`);
						choice.push(assignJob(slave, "please you"));
					}
				} else if (V.universalRulesAssignsSelfFacility === 1 && V.dairyPregSetting > 0 && V.dairy > dairyL && isFertile(slave)) {
					 if (V.dairyPregSetting > 1) {
						choice.push(`eagerly rushes to ${V.dairyName} in the hopes that ${his} fertile womb will be packed full of children.`);
						choice.push(assignJob(slave, "work in the dairy"));
					} else {
						choice.push(`rushes to ${V.dairyName} in the hopes that ${his} fertile womb will be rented out.`);
						choice.push(assignJob(slave, "work in the dairy"));
					}
				} else if (slave.bellyPreg >= 1500) {
					 if (arcology.FSRepopulationFocus > 20) {
						if (V.cash < 10000) {
							 if (V.brothel > brothelL && V.universalRulesAssignsSelfFacility === 1) {
								choice.push(`heads to ${V.brothelName} since ${he} wants to set an example for any unimpregnated girls.`);
								choice.push(assignJob(slave, "work in the brothel"));
							} else {
								choice.push(`heads to the streets to lavish in the attention given to pregnant prostitutes.`);
								choice.push(assignJob(slave, "whore"));
							}
						} else {
							 if (V.club > clubL && V.universalRulesAssignsSelfFacility === 1) {
								choice.push(`heads to ${V.clubName} to show off ${his} growing middle and lavish in the public's attention.`);
								choice.push(assignJob(slave, "serve in the club"));
							} else {
								choice.push(`heads to the streets to contribute to the number of visibly pregnant women around.`);
								choice.push(assignJob(slave, "serve the public"));
							}
						}
						slave.sexAmount = 10;
					} else if (V.masterSuite > masterSL && V.universalRulesAssignsSelfFacility === 1) {
						choice.push(`heads straight to ${V.masterSuiteName} to share the intimacy of ${his} pregnant body with you.`);
						choice.push(assignJob(slave, "serve in the master suite"));
					} else {
						choice.push(`decides to be your fucktoy to share the intimacy of ${his} pregnant body with you.`);
						choice.push(assignJob(slave, "please you"));
					}
				} else if (slave.pregKnown === 1) {
					 if (V.masterSuite > masterSL && V.universalRulesAssignsSelfFacility === 1) {
						choice.push(`heads straight to ${V.masterSuiteName} so you may watch for the day that ${he} finally starts to show.`);
						choice.push(assignJob(slave, "serve in the master suite"));
					} else {
						choice.push(`decides to be your fucktoy so you may enjoy watching ${him} begin showing.`);
						choice.push(assignJob(slave, "please you"));
					}
				} else if (canGetPregnant(slave)) {
					if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
						choice.push(`can't indulge ${his} pregnancy fetish without getting dicked, so ${he} heads down to ${V.brothelName} to do just that.`);
						choice.push(assignJob(slave, "work in the brothel"));
					} else {
						choice.push(`can't indulge ${his} pregnancy fetish without getting dicked, so ${he} decides to be a whore to get seeded.`);
						choice.push(assignJob(slave, "whore"));
					}
					slave.sexAmount = 10;
				} else if (slave.lactation > 0) {
					if (V.universalRulesAssignsSelfFacility === 1 && V.dairyRestraintsSetting < 2 && V.dairy > dairyL) {
						choice.push(`heads down to ${V.dairyName} to be around other lactating girls.`);
						choice.push(assignJob(slave, "work in the dairy"));
					} else {
						choice.push(`decides to get milked, since ${he} is already lactating.`);
						choice.push(assignJob(slave, "get milked"));
					}
				} else {
					if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
						choice.push(`can't indulge ${his} fetish by getting pregnant ${himself}, so ${he} just heads down to ${V.brothelName}.`);
						choice.push(assignJob(slave, "work in the brothel"));
					} else {
						choice.push(`can't indulge ${his} fetish by getting pregnant ${himself}, so ${he} glumly decides to be a whore.`);
						choice.push(assignJob(slave, "whore"));
					}
					slave.sexAmount = 10;
				}
			} else if (slave.fetish === "boobs") {
				if (slave.lactation > 0) {
					if (V.universalRulesAssignsSelfFacility === 1 && V.dairyRestraintsSetting < 2 && V.dairy > dairyL) {
						choice.push(`heads down to ${V.dairyName} for all the attention that'll be lavished on ${his} nipples.`);
						choice.push(assignJob(slave, "work in the dairy"));
					} else {
						choice.push(`decides to get milked, since ${he} loves getting off to it.`);
						choice.push(assignJob(slave, "get milked"));
					}
				} else if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
					choice.push(`decides to work in ${V.clubName} so ${he} can show off ${his} bare breasts.`);
					choice.push(assignJob(slave, "serve in the club"));
					slave.sexAmount = 10;
				} else {
					choice.push(`decides to work as a public servant so ${he} can show off ${his} bare breasts.`);
					choice.push(assignJob(slave, "serve the public"));
					slave.sexAmount = 10;
				}
			} else if (slave.attrXX > 85) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
					choice.push(`decides to work in ${V.clubName} so ${he} can hit on hot girls.`);
					choice.push(assignJob(slave, "serve in the club"));
				} else {
					choice.push(`decides to work as a public servant so ${he} can hit on hot girls.`);
					choice.push(assignJob(slave, "serve the public"));
				}
				slave.sexAmount = 10;
			} else if (slave.attrXY > 85) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
					choice.push(`decides to work in ${V.clubName} so ${he} can hit on cute boys.`);
					choice.push(assignJob(slave, "serve in the club"));
				} else {
					choice.push(`decides to work as a public servant so ${he} can hit on cute boys.`);
					choice.push(assignJob(slave, "serve the public"));
				}
				slave.sexAmount = 10;
			} else if (slave.energy > 95) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`decides to help those of your slaves who mind taking dick all day by working in ${V.brothelName}.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`decides to help those of your slaves who mind taking dick all day by working as a whore.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (arcology.FSChattelReligionist > 0) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`is a pure and faithful slave, so ${he} sells ${his} body in the holy brothel.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`is a pure and faithful slave, so ${he} sells ${his} body as a holy prostitute.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (arcology.FSEgyptianRevivalist > 0) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.masterSuite > masterSL) {
					choice.push(`is a devoted slave, so ${he} immediately joins your harem.`);
					choice.push(assignJob(slave, "serve in the master suite"));
				} else {
					choice.push(`is a devoted slave, so ${he} immediately joins your harem.`);
					choice.push(assignJob(slave, "please you"));
				}
			} else if (arcology.FSRomanRevivalist > 0) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`is a devoted slave, so ${he} decides ${he} can best serve the state by raising money for the treasury, by selling ${his} body in ${V.brothelName}.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`is a devoted slave, so ${he} decides ${he} can best serve the state by raising money for the treasury, by selling ${his} body as a prostitute.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (arcology.FSAztecRevivalist > 0) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`is a devoted slave, so ${he} decides ${he} can best serve the empire by serving at the fertility temple.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`is a devoted slave, so ${he} decides ${he} can best serve the empire by offering ${himself} to the public.`);
					choice.push(assignJob(slave, "serve the public"));
				}
				slave.sexAmount = 10;
			} else if (arcology.FSPaternalist > 0) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
					choice.push(`decides to work in ${V.brothelName}, a respectable position for a slave in this enlightened arcology.`);
					choice.push(assignJob(slave, "work in the brothel"));
				} else {
					choice.push(`decides to be a whore, a respectable position for a slave in this enlightened arcology.`);
					choice.push(assignJob(slave, "whore"));
				}
				slave.sexAmount = 10;
			} else if (arcology.FSPastoralist > 0) {
				if (slave.lactation > 0) {
					if (V.universalRulesAssignsSelfFacility === 1 && V.dairyRestraintsSetting < 2 && V.dairy > dairyL) {
						choice.push(`hurries to join your herd of dairy cows.`);
						choice.push(assignJob(slave, "work in the dairy"));
					} else {
						choice.push(`hurries to join your herd of cows.`);
						choice.push(assignJob(slave, "get milked"));
					}
				} else {
					if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
						choice.push(`decides to work in ${V.brothelName} to help raise money to get more girls lactating properly.`);
						choice.push(assignJob(slave, "work in the brothel"));
					} else {
						choice.push(`decides to prostitute ${himself} to help raise money to get more girls lactating properly.`);
						choice.push(assignJob(slave, "whore"));
					}
					slave.sexAmount = 10;
				}
			} else if (arcology.FSHedonisticDecadence > 0) {
				if (V.universalRulesAssignsSelfFacility === 1 && V.spa > spaL && (slave.trust < 60 || slave.devotion <= 60)) {
					choice.push(`could use a break, so ${he} heads to take a dip in the spa.`);
					choice.push(assignJob(slave, "rest in the spa"));
				} else {
					choice.push(`could use a meal and a nap, so ${he} grabs a cup of food and heads to bed.`);
					choice.push(removeJob(slave, slave.assignment));
				}
			} else {
				if (slave.skill.whoring > slave.skill.entertainment) {
					if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
						choice.push(`decides to work in ${V.brothelName}, since ${he} thinks ${himself} a better whore than a public slut.`);
						choice.push(assignJob(slave, "work in the brothel"));
					} else {
						choice.push(`decides to whore, since ${he} thinks ${himself} a better whore than a public slut.`);
						choice.push(assignJob(slave, "whore"));
					}
					slave.sexAmount = 10;
				} else if (slave.skill.entertainment > slave.skill.whoring) {
					if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
						choice.push(`decides to be a club ${girl}, since ${he} thinks ${himself} a better public slut than a whore.`);
						choice.push(assignJob(slave, "serve in the club"));
					} else {
						choice.push(`decides to serve the public, since ${he} thinks ${himself} a better public slut than a whore.`);
						choice.push(assignJob(slave, "serve the public"));
					}
					slave.sexAmount = 10;
				} else {
					if (V.universalRulesAssignsSelfFacility === 1 && V.brothel > brothelL) {
						choice.push(`decides to join ${his} sisters and work in ${V.brothelName}.`);
						choice.push(assignJob(slave, "work in the brothel"));
					} else {
						choice.push(`decides to prostitute ${himself} to help you upgrade ${arcology.name} and improve everyone's life.`);
						choice.push(assignJob(slave, "whore"));
					}
					slave.sexAmount = 10;
				}
			}
		} else {
			if (V.universalRulesAssignsSelfFacility === 1 && V.club > clubL) {
				choice.push(`decides to be a club ${girl}, since partying is better than sitting around and failing to think of a job to do.`);
				choice.push(assignJob(slave, "serve in the club"));
				slave.sexAmount = 10;
			} else if (canWalk(slave) && canSee(slave)) {
				choice.push(`decides to tidy up the penthouse a little while ${he} thinks.`);
				choice.push(assignJob(slave, "be a servant"));
			} else {
				choice.push(`stays in bed, unable to come up with anything.`);
				choice.push(removeJob(slave, slave.assignment));
			}
		}

		slave.choosesOwnAssignment = 2;
		// ready for second pass

		return choice.join(" ");
	}
})();

repo_name: Welptard/fc

license: mit


code:
App.SlaveAssignment.clothes = (function() {
	"use strict";

	let r;
	let arcology;

	// eslint-disable-next-line no-unused-vars
	let he, him, his, hers, himself, girl, loli, He, His;

	return saClothes;

	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string}
	 */
	function saClothes(slave) {
		r = [];

		arcology = V.arcologies[0];

		({
			// eslint-disable-next-line no-unused-vars
			he, him, his, hers, himself, girl, He, His, loli
		} = getPronouns(slave));

		updateAccessories(slave);
		if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
			clothingEffects(slave);
		}
		if (slave.collar !== "none") {
			collarEffects(slave);
		}
		if (slave.faceAccessory !== "none") {
			maskEffects(slave);
		}
		if (slave.mouthAccessory !== "none") {
			mouthEffects(slave);
		}
		chastityEffects(slave);
		if (slave.bellyAccessory !== "none") {
			bellyAccessories(slave);
		}
		if (hasAnyLegs(slave)) {
			legAccessories(slave);
		}
		if (slave.vagina >= 0) {
			vaginaAccessories(slave);
		}
		if (slave.buttplug !== "none") {
			analAccessories(slave);
		}

		return r.join(" ");
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function updateAccessories(slave) {
		if (slave.dick === 0) {
			slave.chastityPenis = 0;
			slave.dickAccessory = "none";
		}
		if (!hasAnyLegs(slave)) {
			slave.shoes = "none";
			slave.legAccessory = "none";
		}
		if (slave.vagina === -1) {
			slave.chastityVagina = 0;
			slave.vaginalAccessory = "none";
			slave.vaginalAttachment = "none";
		} else {
			if (["none", "bullet vibrator", "smart bullet vibrator"].includes(slave.vaginalAccessory)) {
				slave.vaginalAttachment = "none";
			}
		}
		if (slave.buttplug === "none") {
			slave.buttplugAttachment = "none";
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function clothingEffects(slave) {
		switch (slave.clothes) {
			case "no clothing":
				if (slave.devotion >= -20) {
					if (slave.fetish === "humiliation" && slave.fetishKnown === 0) {
						r.push(`${He} pretends to be embarrassed by ${his} nudity but seems to get off on it. <span class="lightcoral">${He}'s into humiliation.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetish === "humiliation" && slave.fetishStrength > 60) {
						r.push(`${He} pretends to be embarrassed by ${his} nudity but <span class="hotpink">openly gets off on it.</span>`);
						slave.devotion += 2;
					} else if (slave.fetish === "humiliation") {
						r.push(`${He} pretends to be embarrassed by ${his} nudity but <span class="hotpink">secretly gets off on it.</span>`);
						slave.devotion += 1;
					} else if (slave.energy > 95) {
						r.push(`${His} libido is so strong that ${he} <span class="hotpink">enjoys being naked and available.</span>`);
						slave.devotion += 1;
					}
				}
				break;
			case "a penitent nuns habit":
				r.push(`The mortification of the flesh ${he} endures from wearing ${his} sackcloth habit slowly and painfully purifies ${his} mind of any but devoted, fearful thoughts. It's also unhealthy.`);
				slave.devotion += 2;
				slave.trust -= 2;
				healthDamage(slave, 3);
				if (slave.fetish === "masochist" && slave.fetishKnown === 0) {
					r.push(`${His} chafed skin makes sex an agonizing prospect. ${He} seems to get off on the pain; ${he}'s a <span class="lightcoral">natural masochist.</span>`);
					slave.fetishKnown = 1;
				} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
					if (fetishChangeChance(slave) > jsRandom(0, 100)) {
						r.push(`${His} chafed skin makes sex an agonizing prospect. ${He} learns to come in spite of, and then <span class="lightcoral">because of the pain.</span>`);
						slave.fetish = "masochist";
						slave.fetishKnown = 1;
						slave.fetishStrength = 10;
					}
				}
				break;
			case "uncomfortable straps":
				if (slave.devotion >= -20 && slave.fetish === "masochist" && slave.fetishKnown === 1) {
					r.push(`The uncomfortable straps ${he}'s wearing constantly give ${him} little twinges of pain, <span class="hotpink">titillating ${him}.</span>`);
					slave.devotion += 2;
				} else if (slave.devotion <= 20 && slave.trust >= -50) {
					r.push(`The uncomfortable straps ${he}'s wearing keep ${him} <span class="hotpink">servile</span> and <span class="gold">afraid.</span>`);
					slave.devotion += 1;
					slave.trust -= 1;
					if (slave.fetish === "masochist" && slave.fetishKnown === 0) {
						r.push(`The straps pinch and constrict ${him} whenever ${he}'s used. ${He} seems to get off on the discomfort; ${he}'s a <span class="lightcoral">natural masochist.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
						if (fetishChangeChance(slave) > jsRandom(0, 100)) {
							r.push(`The straps pinch and constrict ${him} whenever ${he}'s used. ${He} learns to come in spite of, and then <span class="lightcoral">because of the discomfort.</span>`);
							slave.fetish = "masochist";
							slave.fetishKnown = 1;
							slave.fetishStrength = 10;
						}
					}
				} else {
					if (slave.fetish === "masochist" && slave.fetishKnown === 0) {
						r.push(`${His} straps pinch and constrict ${him} whenever ${he}'s used. ${He} seems to get off on the discomfort; ${he}'s a <span class="lightcoral">natural masochist.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
						if (fetishChangeChance(slave) > jsRandom(0, 100)) {
							r.push(`${His} straps pinch and constrict ${him} whenever ${he}'s used. ${He} learns to come in spite of, and then <span class="lightcoral">because of the discomfort.</span>`);
							slave.fetish = "masochist";
							slave.fetishKnown = 1;
							slave.fetishStrength = 10;
						}
					}
				}
				break;
			case "chains":
				if (slave.devotion >= -20 && slave.fetish === "masochist" && slave.fetishKnown === 1) {
					r.push(`The chains ${he}'s wearing constantly give ${him} little twinges of pain, <span class="hotpink">titillating ${him}.</span>`);
					slave.devotion += 2;
				} else if (slave.devotion <= 20 && slave.trust >= -50) {
					r.push(`The chains ${he}'s wearing keep ${him} <span class="hotpink">servile</span> and <span class="gold">afraid.</span>`);
					slave.devotion += 1;
					slave.trust -= 1;
					if (slave.fetish === "masochist" && slave.fetishKnown === 0) {
						r.push(`${His} chains pinch and constrict ${him} whenever ${he}'s used. ${He} seems to get off on the discomfort; ${he}'s a <span class="lightcoral">natural masochist.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
						if (fetishChangeChance(slave) > jsRandom(0, 100)) {
							r.push(`${His} chains pinch and constrict ${him} whenever ${he}'s used. ${He} learns to come in spite of, and then <span class="lightcoral">because of the discomfort.</span>`);
							slave.fetish = "masochist";
							slave.fetishKnown = 1;
							slave.fetishStrength = 10;
						}
					}
				} else {
					if (slave.fetish === "masochist" && slave.fetishKnown === 0) {
						r.push(`${His} chains pinch and constrict ${him} whenever ${he}'s used. ${He} seems to get off on the discomfort; ${he}'s a <span class="lightcoral">natural masochist.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
						if (fetishChangeChance(slave) > jsRandom(0, 100)) {
							r.push(`${His} chains pinch and constrict ${him} whenever ${he}'s used. ${He} learns to come in spite of, and then <span class="lightcoral">because of the discomfort.</span>`);
							slave.fetish = "masochist";
							slave.fetishKnown = 1;
							slave.fetishStrength = 10;
						}
					}
				}
				break;
			case "restrictive latex":
				if (slave.devotion > 20 && slave.trust >= -50 && slave.fetish === "submissive") {
					if (slave.fetishKnown === 0) {
						r.push(`The latex ${he}'s wearing limits ${his} world to your input and control. ${He} seems to get off on the lack of control; ${he}'s a <span class="lightcoral">total submissive.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetishStrength > 60) {
						r.push(`As a submissive ${he} <span class="hotpink">openly enjoys being immured in latex.</span>`);
						slave.devotion += 2;
					} else {
						r.push(`${His} submissive tendencies help ${him} <span class="hotpink">enjoy being immured in latex.</span>`);
						slave.devotion += 1;
					}
				} else if (slave.devotion < -20) {
					r.push(`The latex ${he}'s wearing limits ${his} world to <span class="hotpink">your input and control</span> and <span class="gold">fear</span> of unexpected pain.`);
					slave.devotion += 1;
					slave.trust -= 1;
				}
				break;
			case "shibari ropes":
				if (slave.devotion > 20 && slave.trust >= -50 && slave.fetish === "submissive") {
					if (slave.fetishKnown === 0) {
						r.push(`The ropes ${he}'s wearing restrict ${him} and leave ${him} completely helpless. ${He} seems to get off on the lack of control; ${he}'s a <span class="lightcoral">natural submissive.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetishStrength > 60) {
						r.push(`As a submissive ${he} <span class="hotpink">openly enjoys wearing binding ropes as clothing.</span>`);
						slave.devotion += 2;
					} else {
						r.push(`${His} submissive tendencies help ${him} <span class="hotpink">enjoy wearing binding ropes as clothing.</span>`);
						slave.devotion += 1;
					}
				} else if (slave.devotion < -20) {
					r.push(`The ropes ${he}'s wearing restrict ${him} without pain, rendering ${him} <span class="hotpink">susceptible to control</span> and <span class="gold">afraid.</span>`);
					slave.devotion += 1;
					slave.trust -= 1;
				}
				break;
			case "an apron":
				if (slave.fetish === "submissive") {
					if (slave.fetishKnown === 0) {
						r.push(`${He} pretends to be embarrassed by wearing nothing but an apron, but seems to get off on how it invites other to take control and use ${him}. ${He}'s a natural submissive.`);
						slave.fetishKnown = 1;
					} else {
						r.push(`${He} pretends to be embarrassed by wearing nothing but an apron but <span class="hotpink">secretly gets off</span> on how it invites men to bend ${him} over and put ${him} in ${his} place.`);
						slave.devotion += 1;
					}
				} else if (slave.fetish === "humiliation") {
					if (slave.fetishKnown === 0) {
						r.push(`${He} pretends to be embarrassed by ${his} extremely revealing clothing but seems to get off on it. <span class="lightcoral">${He}'s into humiliation.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetishStrength > 60) {
						r.push(`${He} pretends to be embarrassed by ${his} extremely revealing clothing but <span class="hotpink">openly gets off on it.</span>`);
						slave.devotion += 2;
					} else {
						r.push(`${He} pretends to be embarrassed by ${his} extremely revealing clothing but <span class="hotpink">secretly gets off on it.</span>`);
						slave.devotion += 1;
					}
				} else if (slave.fetish === "pregnancy" && (slave.bellyPreg >= 1500 || slave.bellyImplant >= 1500)) {
					if (slave.fetishKnown === 0) {
						r.push(`${He} pretends to be embarrassed over only having an apron to cover ${his} gravid swell but seems to get off on it. <span class="lightcoral">${He}'s a pregnancy fetishist.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetishStrength > 60) {
						r.push(`${He} <span class="hotpink">openly gets off</span> from how motherly ${he} looks wearing nothing but an apron over ${his}`);
						if (slave.bellyPreg > 100) {
							r.push(`increasingly`);
						}
						r.push(`gravid frame.`);
						slave.devotion += 2;
					} else {
						r.push(`${He} <span class="hotpink">secretly gets off</span> from how motherly ${he} feels wearing nothing but an apron over ${his}`);
						if (slave.bellyPreg > 100) {
							r.push(`increasingly`);
						}
						r.push(`gravid frame.`);
						slave.devotion += 1;
					}
				} else if (slave.devotion <= 20) {
					r.push(`${He} is <span class="mediumorchid">inappropriately proud</span> of the nice apron ${he}'s wearing, <span class="mediumaquamarine">building ${his} confidence.</span>`);
					slave.devotion -= 5;
					slave.trust += 3;
				} else {
					r.push(`${He} is <span class="hotpink">proud</span> and <span class="mediumaquamarine">confident</span> of the nice apron ${he}'s wearing.`);
					slave.devotion += 1;
					slave.trust += 1;
				}
				break;
			default:
				if (slave.devotion <= 20) {
					r.push(`${He} is <span class="mediumorchid">inappropriately proud</span> of the nice clothes ${he}'s wearing, <span class="mediumaquamarine">building ${his} confidence.</span>`);
					slave.devotion -= 5;
					slave.trust += 3;
				} else if (slave.fetish === "boobs" && slave.clothes === "a monokini") {
					if (slave.fetishKnown === 0) {
						r.push(`${He} pretends to be embarrassed by how ${his} monokini draws attention to ${his} breasts but <span class="hotpink">seems to get off on it.</span>`);
						slave.devotion += 1;
					} else if (slave.fetishStrength > 60) {
						r.push(`${He} pretends to be embarrassed by ${his} clearly exposed breasts but <span class="hotpink">openly gets off on it.</span>`);
						slave.devotion += 2;
					} else {
						r.push(`${He} pretends to be embarrassed by ${his} clearly exposed breasts but <span class="hotpink">secretly gets off on it.</span>`);
						slave.devotion += 1;
					}
				} else if (slave.fetish === "humiliation" && setup.humiliatingClothes.includes(slave.clothes)) {
					if (slave.fetishKnown === 0) {
						r.push(`${He} pretends to be embarrassed by ${his} extremely revealing clothing but seems to get off on it. <span class="lightcoral">${He}'s into humiliation.</span>`);
						slave.fetishKnown = 1;
					} else if (slave.fetishStrength > 60) {
						r.push(`${He} pretends to be embarrassed by ${his} extremely revealing clothing but <span class="hotpink">openly gets off on it.</span>`);
						slave.devotion += 2;
					} else {
						r.push(`${He} pretends to be embarrassed by ${his} extremely revealing clothing but <span class="hotpink">secretly gets off on it.</span>`);
						slave.devotion += 1;
					}
				} else if (slave.dick > 0) {
					/* males have trouble with outfit block */ /* return to with crotch description overhaul */
					switch (slave.clothes) {
						case "attractive lingerie":
						case "attractive lingerie for a pregnant woman":
							r.push(`${He} is <span class="hotpink">proud</span> of the pretty lingerie ${he}'s wearing, but ${he} constantly has to adjust ${his} g-string to cover ${his} penis.`);
							slave.devotion += 1;
							break;
						case "a string bikini":
							r.push(`${He} is <span class="hotpink">proud</span> of the slutty swimsuit ${he}'s wearing, but ${he} constantly has to adjust ${his} string bikini bottom in a vain effort to cover ${his} penis.`);
							slave.devotion += 1;
							break;
						default:
							r.push(`${He} is <span class="hotpink">proud</span> and <span class="mediumaquamarine">confident</span> of the nice clothes ${he}'s wearing.`);
							slave.devotion += 1;
							slave.trust += 1;
					}
				} else {
					r.push(`${He} is <span class="hotpink">proud</span> and <span class="mediumaquamarine">confident</span> of the nice clothes ${he}'s wearing.`);
					slave.devotion += 1;
					slave.trust += 1;
				}
		}

		// humiliating clothing effects
		if (slave.fetishKnown === 0 || slave.fetish === "none") {
			if (setup.humiliatingClothes.includes(slave.clothes)) {
				if (fetishChangeChance(slave) > jsRandom(0, 100)) {
					r.push(`Surprisingly, ${he} takes to ${his} extremely revealing clothing, and gets an obvious thrill from it. <span class="lightcoral">${He}'s become a humiliation fetishist!</span>`);
					slave.fetish = "humiliation";
					slave.fetishKnown = 1;
					slave.fetishStrength = 10;
				}
			}
		}

		// Chattel Religionist effects
		if (arcology.FSChattelReligionist !== "unset") {
			if (slave.behavioralQuirk === "sinful") {
				if (slave.clothes === "a fallen nuns habit" || slave.clothes === "a chattel habit" || slave.clothes === "a succubus outfit") {
					r.push(`${He}'s <span class="hotpink">gratified</span> by the sacrilegious clothing ${he}'s wearing, glad to be an obvious anathema to old world faiths.`);
					slave.devotion += 1;
				}
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function collarEffects(slave) {
		if (slave.collar === "preg biometrics") {
			if (slave.fetish === "pregnancy" && slave.fetishKnown === 1) {
				if (slave.preg < -1) {
					r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, which as an infertile pregnancy fetishist, is <span class="mediumorchid">crippling</span> to ${him}.`);
					slave.devotion -= 3;
				} else {
					r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, which as a pregnancy fetishist, is <span class="hotpink">pleasing</span> to ${him}.`);
					slave.devotion += 1;
				}
			} else if (slave.fetish === "pregnancy" && slave.fetishKnown === 0) {
				if (slave.preg < -1) {
					r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, which nearly causes ${him} to have a mental breakdown, painting ${him} as an infertile pregnancy fetishist.`);
					slave.devotion -= 3;
				} else {
					r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, oddly exciting ${him}. It would seem ${he} has a pregnancy fetish!`);
					slave.devotion += 1;
				}
				slave.fetishKnown = 1;
			} else if (slave.fetish === "humiliation" && slave.fetishKnown === 1) {
				r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, which is completely humiliating, and <span class="hotpink">pleasing</span> to ${him}.`);
				slave.devotion += 1;
			} else if (slave.fetish === "humiliation" && slave.fetishKnown === 0) {
				r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, which is completely humiliating, and oddly pleasing to ${him}. ${He} seems to have a humiliation fetish!`);
				slave.devotion += 1;
				slave.fetishKnown = 1;
			} else if (slave.devotion < -20) {
				r.push(`${His} collar's display reveals all sorts of personal information about ${his} fertility, filling ${him} with disgust that you that you consider ${his} womb little more than property, as well as fear that it will`);
				if (slave.pregKnown === 1) {
					r.push(`be promptly filled with an unwelcome child once ${his} pregnancy ends.`);
				} else {
					r.push(`soon be swelling with an unwelcome child.`);
				}
				slave.devotion -= 2;
				slave.trust -= 2;
			} else if (slave.devotion <= 20) {
				r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, completely degrading ${him} and making ${him} fear ${his} new life.`);
				slave.devotion += 1;
				slave.trust -= 2;
			} else if (slave.devotion > 20) {
				r.push(`${His} collar's display reveals all sorts of personal information about ${his} womb, filling ${him} <span class="hotpink">with pride</span> that you think ${his} womb is worth attention.`);
				slave.devotion += 1;
			}
		} else if (slave.devotion <= 20) {
			if (slave.collar === "tight steel" || slave.collar === "cruel retirement counter") {
				r.push(`The tight metal collar ${he}'s wearing <span class="gold">reminds ${him} to be afraid</span> every time ${he} takes a breath.`);
				slave.trust -= 1;
			} else if (slave.collar === "uncomfortable leather" || slave.collar === "neck corset") {
				r.push(`The uncomfortable leather collar ${he}'s wearing <span class="gold">reminds ${him} to be afraid</span> every time ${he} turns ${his} head.`);
				slave.trust -= 1;
			} else if (slave.collar === "shock punishment") {
				r.push(`The shock collar ${he}'s wearing makes ${his} frequent, deserved punishments <span class="gold">immediate, inescapable,</span> and <span class="mediumorchid">awful.</span>`);
				slave.devotion -= 2;
				slave.trust -= 5;
				if (slave.devotion < -20 && slave.behavioralFlaw !== "odd") {
					r.push(`Since ${he}'s rebellious ${his} life is near-constant electroshock torture. ${His} resistance is worn down by the agony and ${he} is thoroughly cowed, but ${he} has been emotionally damaged by the experience to the extent that further shock torture is not likely to affect ${him} as greatly.`);
					slave.devotion += 10;
					slave.trust -= 10;
					slave.behavioralFlaw = "odd";
				}
			} else {
				r.push(`${He} is <span class="mediumorchid">inappropriately proud</span> and <span class="mediumaquamarine">confident</span> of the nice collar ${he}'s wearing.`);
				slave.devotion -= 5;
				slave.trust += 3;
			}
		} else {
			if (slave.collar === "heavy gold" || slave.collar === "ancient Egyptian") {
				r.push(`${He} bears the burden of ${his} heavy gold collar with <span class="mediumaquamarine">confidence.</span>`);
				slave.trust += 1;
			} else if (slave.collar === "bowtie" || slave.collar === "neck tie" ) {
				r.push(`The ${slave.collar} and shirt collar ${he} wears fill ${him} with confidence, since although they conceal a more traditional slave collar that can be used to restrain ${him}, they don't look like it.`);
				slave.trust += 1;
			} else if (["nice retirement counter", "pretty jewelry", "satin choker", "silk ribbon", "stylish leather"].includes(slave.collar)) {
				r.push(`The lovely collar ${he} wears fills ${him} with <span class="mediumaquamarine">confidence.</span>`);
				slave.trust += 1;
			} else if (slave.collar === "leather with cowbell") {
				if (slave.fetish === "boobs" && slave.fetishStrength > 95) {
					r.push(`${He} <span class="hotpink">loves</span> how ${his} cow collar encourages everyone to fuck ${his} udders.`);
					slave.devotion += 1;
				} else if (slave.fetish === "boobs" || slave.energy > 95) {
					r.push(`${He} <span class="hotpink">likes</span> how ${his} cow collar encourages everyone to touch ${his} udders.`);
					slave.devotion += 1;
				}
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function maskEffects(slave) {
		if (slave.devotion <= 20) {
			if (slave.faceAccessory === "porcelain mask") {
				r.push(`The beautiful porcelain mask ${he}'s wearing slowly erodes ${his} identity, forcing ${him} <span class="hotpink">to submit</span> to your will. ${He} <span class="gold">questions</span> who ${he} is.`);
				slave.devotion++;
				slave.trust -= 2;
			} else if (slave.faceAccessory === "cat ears") {
				r.push(`The adorable cat ears ${he}'s wearing slowly chip away at ${his} dignity, forcing ${him} to submit to your will. ${He} feels more and more like a sex object.`);
				slave.devotion++;
				slave.trust -= 2;
			}
		} else {
			if (slave.faceAccessory === "porcelain mask") {
				if (slave.fetish === "submissive" && slave.fetishStrength > 95) {
					r.push(`${He} <span class="hotpink">loves</span> how ${his} mask makes ${him} beautiful enough for you.`);
					slave.devotion += 1;
				} else if (slave.fetish === "submissive" || slave.energy > 95) {
					r.push(`${He} <span class="hotpink">likes</span> how ${his} mask makes ${him} beautiful enough for you.`);
					slave.devotion += 1;
				}
			} else if (slave.faceAccessory === "cat ears") {
				if (slave.fetish === "submissive" && slave.fetishStrength > 95) {
					r.push(`${He} <span class="hotpink">loves</span> how ${his} cat ears make ${him} especially adorable for you.`);
					slave.devotion += 1;
				} else if (slave.fetish === "submissive" || slave.energy > 95) {
					r.push(`${He} <span class="hotpink">likes</span> how ${his} cat ears make ${him} especially adorable for you.`);
					slave.devotion += 1;
				}
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function mouthEffects(slave) {
		if (slave.devotion <= 20) {
			if (slave.mouthAccessory === "dildo gag") {
				r.push(`The dildo gag ${he}'s wearing <span class="gold">reminds ${him} to be afraid</span> with every breath ${he} must carefully take through ${his} nose.`);
				slave.trust -= 1;
			} else if (slave.mouthAccessory === "ball gag") {
				r.push(`The ball gag ${he}'s wearing keeps ${his} mouth filled and, since ${he} can't speak out, forces ${him} to submit to your will. ${He} fears for ${his} safety with every suppressed word.`);
				slave.devotion++;
				slave.trust -= 2;
			} else if (slave.mouthAccessory === "ring gag") {
				r.push(`The ring gag ${he}'s wearing keeps ${his} mouth stretched wide and drooling. Since ${he} can't speak clearly, it forces ${him} to submit to your will. ${He} fears for ${his} safety with every suppressed word.`);
				slave.devotion++;
				slave.trust -= 2;
			} else if (slave.mouthAccessory === "bit gag") {
				r.push(`The uncomfortable bit gag ${he}'s wearing keeps ${his} mouth locked and, since ${he} can't speak out, forces ${him} to submit to your will. ${He} fears for ${his} safety with every suppressed word.`);
				slave.devotion++;
				slave.trust -= 2;
			} else if (slave.mouthAccessory === "massive dildo gag") {
				r.push(`The enormous dildo gag ${he}'s wearing terrifies ${him} that ${he} will soon be choking down cocks of similar size. ${He} can feel ${his} throat stretching around the giant dildo, and resents you for tormenting ${him} this way.`);
				slave.devotion -= 1;
				slave.trust -= 2;
			}
		} else {
			if (slave.mouthAccessory === "ball gag" || slave.mouthAccessory === "bit gag" || slave.mouthAccessory === "ring gag") {
				if (slave.fetish === "submissive" && slave.fetishStrength > 95) {
					r.push(`${He} <span class="hotpink">loves</span> how ${his} gag forces ${him} to keep silent.`);
					slave.devotion += 1;
				} else if (slave.fetish === "submissive" || slave.energy > 95) {
					r.push(`${He} <span class="hotpink">likes</span> how ${his} gag forces ${him} to keep silent.`);
					slave.devotion += 1;
				}
			}
		}
		if (slave.mouthAccessory === "dildo gag") {
			if (slave.skill.oral <= 10) {
				r.push(`Living gagged by a dildo, ${he} can't help but get better at having things down ${his} throat.`);
				r.push(`${slaveSkillIncrease('oral', slave, 5)}`);
			}
		}
		if (slave.mouthAccessory === "massive dildo gag") {
			if (slave.skill.oral < 75) {
				r.push(`Living gagged by such an immense dildo, ${he} can't help but get even better at having giant things rammed down ${his} throat.`);
				r.push(`${slaveSkillIncrease('oral', slave, 5)}`);
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function chastityEffects(slave) {
		if (slave.chastityVagina) {
			if (slave.devotion > 20) {
				if (slave.vagina === 0) {
					if (slave.fetish === "buttslut" && slave.fetishStrength > 60) {
						if (slave.fetishKnown === 1) {
							r.push(`${He}'s such an anal whore that ${he}'s <span class="hotpink">perversely proud</span> of the chastity belt that covers ${his} neglected pussy.`);
							slave.devotion += 1;
						} else {
							r.push(`${He} <span class="hotpink">doesn't seem to mind</span> that ${his} pussy is going unused.`);
							slave.devotion += 1;
						}
					} else {
						r.push(`${He} <span class="mediumaquamarine">trusts</span> that you're using the chastity belt ${he} wears to save ${his} virginity for something special.`);
						slave.trust += 1;
					}
				} else {
					if (slave.energy > 60) {
						if (slave.fetish === "buttslut" && slave.fetishStrength > 60) {
							if (slave.fetishKnown === 1) {
								r.push(`${He}'s such a butthole slut that ${he} doesn't care about having ${his} pussy kept off limits.`);
							} else {
								r.push(`${He} seems to like that ${his} chastity is directing all the dicks into ${his} ass.`);
								slave.devotion += 1;
							}
						} else if (slave.energy > 95) {
							r.push(`${He}'s such a nympho that having ${his} butthole do double duty for ${his} pussy doesn't bother ${him}.`);
						} else {
							r.push(`${He} has a healthy sexuality, and misses vaginal sex, <span class="red">reducing ${his} sex drive slightly.</span>`);
							slave.energy -= 1;
						}
					}
				}
			}
		}
		if (slave.chastityPenis) {
			if (slave.devotion >= -20) {
				if (slave.energy > 40) {
					if (slave.hormoneBalance < 100) {
						if (slave.fetish === "buttslut" && slave.fetishStrength > 60) {
							if (slave.fetishKnown === 1) {
								r.push(`${He}'s such a butthole slut that ${he} manages to get off just fine despite ${his} dick being kept untouchable and soft behind a chastity cage.`);
							} else {
								r.push(`${He} seems to be getting off just fine without access to ${his} dick.`);
							}
						} else if (slave.energy > 95) {
							r.push(`${His} sex drive is so overcharged that ${he} manages to orgasm often despite the chastity cage that`);
							if (slave.balls === 0 || slave.ballType === "sterile") {
								r.push(`prevents ${him} or anyone else from touching ${his} soft cock;`);
							} else {
								r.push(`keeps ${his} dick soft and untouched;`);
							}
							r.push(`it's almost always dripping a stream of precum.`);
						} else if (slave.fetish === "masochist" && slave.fetishStrength > 60 && canAchieveErection(slave)) {
							if (slave.fetishKnown === 1) {
								r.push(`${He}'s such a masochist that the pain of even getting semi-hard in ${his} chastity cage turns ${him} on even more, <span class="green">slightly increasing ${his} sexual appetite.</span>`);
								slave.energy++;
							} else {
								r.push(`${His} chastity cage is always painfully tight around ${his} semi-hard dick; something that seems to be arousing to ${him}, only to make it even more painful.`);
								slave.energy++;
							}
						} else if (slave.sexualFlaw === "neglectful") {
							r.push(`${His} soft, constrained dick is of little concern to ${him}. ${He} doesn't need release during sex.`);
						} else if (slave.balls > 0 && slave.ballType === "sterile") {
							r.push(`Though ${he}'s a soft bitch with worthless balls, having ${his} dick guarded against all stimulation by a chastity cage reduces ${his} enjoyment of intercourse a bit, slightly reducing ${his} sexual appetite.`);
							slave.energy -= 1;
						} else if (slave.balls === 0) {
							r.push(`Though ${he}'s a soft, ballsless bitch, having ${his} dick guarded against all stimulation by a chastity cage reduces ${his} enjoyment of intercourse a bit, slightly reducing ${his} sexual appetite.`);
							slave.energy -= 1;
						} else {
							r.push(`${He} has a healthy sexuality, but ${his} chastity cage punishes it by making it very uncomfortable to achieve erection. ${He} often goes without release rather than pushing through, reducing ${his} sex drive.`);
							slave.energy -= 2;
							if (slave.devotion > 95) {
								r.push(`${He}'s so devoted to you that ${he} doesn't let this affect ${his} opinion of you.`);
							} else {
								r.push(`${He}'s <span class="mediumorchid">a bit resentful</span> and <span class="gold">much less trusting</span> under all this discomfort.`);
								slave.devotion -= 1;
								slave.trust -= 1;
							}
						}
					}
				}
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function bellyAccessories(slave) {
		if (slave.bellyAccessory === "an extreme corset") {
			if (slave.belly >= 100000) {
				r.push(`${His} straining corset finally gives in to ${his} giant stomach and bursts, freeing ${his} belly.`);
				slave.bellyAccessory = "none";
			} else if (slave.bellyPreg >= 1500) {
				r.push(`The tight corseting has <span class="orange">caused ${him} to miscarry,</span> which <span class="red">damages ${his} health.</span>`);
				healthDamage(slave, 20);
				if (lastPregRule(slave, V.defaultRules)) {
					slave.preg = -1;
				} else {
					slave.preg = 0;
				}
				TerminatePregnancy(slave);
				actX(slave, "miscarriages");
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.devotion < -50) {
						r.push(`${He} is filled with violent, consuming hatred and fear. Even though ${he} knew ${his} baby was destined for a slave orphanage, it seems ${he} cared for it and views you as its killer.`);
						slave.devotion -= 25;
						slave.trust -= 25;
					} else if (slave.devotion < -20) {
						r.push(`${He} is afflicted by desperate, inconsolable grief and horror. Even though ${he} knew ${his} baby was destined for a slave orphanage, it seems ${he} cared for it.`);
						slave.devotion -= 10;
						slave.trust -= 20;
					} else if (slave.devotion <= 20) {
						r.push(`${He} is consumed by enduring sorrow and horror. Even though ${he} knew ${his} baby was destined for a slave orphanage, it seems ${he} cared for it.`);
						slave.devotion -= 5;
						slave.trust -= 5;
					} else if (slave.devotion <= 50) {
						r.push(`${He} is dully obedient. ${He} has been broken to slave life so thoroughly that even this is neither surprising nor affecting.`);
					} else {
						r.push(`${He} is <span class="hotpink">pleased by this stark development,</span> since ${he} is so attentive to your will. ${He} also expects ${he}'ll be able to fuck better now.`);
						slave.devotion += 4;
					}
				}
				if (slave.abortionTat > -1) {
					slave.abortionTat++;
					r.push(`The temporary tattoo of a child has been replaced with ${his} ${ordinalSuffix(slave.abortionTat)} crossed out infant.`);
					cashX(forceNeg(V.modCost), "slaveMod", slave);
				}
			} else {
				if (slave.waist <= -95) {
					r.push(`${His} waist is so absurd that ${his} extreme corsetage does not affect ${him} further.`);
				} else {
					r.push(`<span class="lime">The extreme corseting narrows ${his} waist.</span>`);
					slave.waist -= 5;
					if (slave.waist < -95) {
						/* can only get here if waist was previously > -95 */
						slave.waist = -95;
					}
					if (slave.waist >= -40) {
						r.push(`It's so tight that it's <span class="red">unhealthy.</span>`);
						healthDamage(slave, 5);
						if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
							if (slave.devotion < -20) {
								r.push(`${He} <span class="hotpink">barely has breath to think,</span> though ${he} has enough to <span class="gold">fear.</span>`);
								slave.devotion += 2;
								slave.trust -= 2;
							}
							if (slave.fetish === "masochist") {
								r.push(`During sex, every breath in and out is agonizing.`);
								if (slave.fetishKnown === 0) {
									r.push(`Despite this, ${he} seems to get off on the pain; ${he}'s a <span class="lightcoral">natural masochist.</span>`);
									slave.fetishKnown = 1;
								} else {
									r.push(`It only adds to ${his} pleasure, much to ${his} <span class="hotpink">enjoyment.</span>`);
									slave.devotion += 1;
									if (slave.fetishStrength <= 95) {
										r.push(`Such constant suffering <span class="lightcoral">deepens ${his} masochism.</span>`);
										slave.fetishStrength += 2;
									}
								}
							} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
								if (fetishChangeChance(slave) > jsRandom(0, 100)) {
									r.push(`During sex, every breath in and out is agonizing. ${He} learns to come in spite of, and then <span class="lightcoral">because of the pain.</span>`);
									slave.fetish = "masochist";
									slave.fetishKnown = 1;
									slave.fetishStrength = 10;
								}
							}
						}
					}
				}
			}
		} else if (slave.bellyAccessory === "a corset") {
			if (slave.bellyPreg >= 1500) {
				r.push(`${His} corset lets ${his} growing belly protrude comfortably, preventing any danger to ${his} pregnancy but preventing any effect on ${his} waist.`);
			} else if (slave.belly >= 1500) {
				r.push(`${His} corset lets ${his} rounded belly protrude comfortably but prevents any effect on ${his} waist.`);
			} else {
				if (slave.waist < -40) {
					r.push(`${His} waist is so narrow that ${his} corsetage does not affect it.`);
				} else {
					r.push(`<span class="lime">The corseting narrows ${his} waist.</span>`);
					slave.waist -= 3;
				}
			}
		} else if (slave.bellyAccessory === "a support band") {
			if (slave.belly > 10000) {
				r.push(`${His} pregnancy support band takes some weight off ${his} back, but it does little beyond that.`);
			}
		} else if (setup.fakeBellies.includes(slave.bellyAccessory)) {
			if (slave.weight > 130) {
				r.push(`${He} has trouble keeping ${his} fake belly strapped around ${his} huge gut, forcing it to be removed to prevent damage.`);
				slave.bellyAccessory = "none";
			} else {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.sexualFlaw === "breeder") {
						r.push(`${He} <span class="mediumorchid">resents</span> being forced to carry a fake pregnancy instead of a real one.`);
						slave.devotion -= 5;
					} else if (slave.devotion <= 20 && slave.trust >= -50 && slave.fetish === "pregnancy") {
						if (slave.fetishStrength > 60) {
							r.push(`As a pregnancy fetishist, ${he} <span class="hotpink">openly enjoys</span> wearing ${his} fake belly around.`);
							slave.devotion += 2;
						} else {
							r.push(`${His} interest in pregnancy helps ${him} <span class="hotpink">enjoy</span> wearing a fake belly.`);
							slave.devotion += 1;
						}
					} else if (slave.fetish === "pregnancy" && slave.devotion > 50) {
						r.push(`${He} carries ${his} fake belly <span class="hotpink">with pride,</span> eager for the day you give ${him} one of ${his} own.`);
						slave.devotion += 1;
					} else if (slave.fetish === "pregnancy" && slave.pregKnown === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) {
						r.push(`The fake belly ${he} wears <span class="mediumorchid">reminds ${him}</span> that ${he} isn't pregnant with a child.`);
						slave.devotion -= 1;
					} else if (slave.vagina === 0 && isFertile(slave) && arcology.FSRepopulationFocus === "unset" && slave.devotion <= 20) {
						r.push(`The fake belly ${he} wears <span class="gold">worries</span> ${him} that you will soon put a real baby in ${him}.`);
						slave.trust -= 1;
					}
					if (slave.bellyAccessory === "a huge empathy belly" && slave.fetish !== "pregnancy") {
						if (slave.devotion > 50) {
							r.push(`${His} full-sized twins belly is heavy and unwieldy, but ${he} carries it <span class="hotpink">proudly</span> for you.`);
							slave.devotion += 1;
						} else {
							r.push(`${His} full-sized twins belly is heavy and unwieldy, and ${he} <span class="mediumorchid">despises</span> being forced to bear it.`);
							slave.devotion -= 1;
						}
					}
					if (slave.fetish === "pregnancy" && slave.fetishStrength <= 95) {
						if (jsRandom(1, 100) >= 20) {
							r.push(`Pretending to be pregnant has <span class="lightcoral">furthered ${his} interest in pregnancy.</span>`);
							slave.fetishStrength += 4;
						} else if (slave.fetishStrength <= 40) {
							r.push(`Lugging around a fake pregnancy for the week has shown ${him} ${he} <span class="coral">isn't as into pregnancy as ${he} thought.</span>`);
							slave.fetish = "none";
							slave.fetishStrength = 10;
						}
					}
				}
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function legAccessories(slave) {
		if (slave.shoes === "heels") {
			if (hasAnyNaturalLegs(slave)) {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.devotion < -20) {
						r.push(`${He} <span class="mediumorchid">resents being forced</span> to wear high heels.`);
						slave.devotion -= 2;
					}
				}
			} else {
				r.push(`${His} P-Limb`);
				if (hasBothLegs(slave)) {
					r.push(`legs work`);
				} else {
					r.push(`leg works`);
				}
				r.push(`just as well in heels as`);
				if (hasBothLegs(slave)) {
					r.push(`they do`);
				} else {
					r.push(`it does`);
				}
				r.push(`out of them.`);
			}
		} else if (slave.shoes === "boots") {
			if (hasAnyNaturalLegs(slave)) {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.devotion < -20) {
						r.push(`${He} <span class="mediumorchid">resents being forced</span> to wear high heeled boots.`);
						slave.devotion -= 2;
					}
				}
			} else {
				r.push(`${His} P-Limb`);
				if (hasBothLegs(slave)) {
					r.push(`legs work`);
				} else {
					r.push(`leg works`);
				}
				r.push(`just as well in boots as`);
				if (hasBothLegs(slave)) {
					r.push(`they do`);
				} else {
					r.push(`it does`);
				}
				r.push(`out of them.`);
			}
		} else if (slave.shoes === "extreme heels") {
			if (hasAnyNaturalLegs(slave)) {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.devotion < -20) {
						r.push(`${He} <span class="mediumorchid">resents being forced</span> to wear <span class="gold">painfully</span> high heels.`);
						slave.devotion -= 2;
						slave.trust -= 2;
					} else if (slave.fetish === "masochist") {
						r.push(`It is difficult to walk in ${his} extreme heels, but ${he}`);
						if (slave.fetishKnown === 0) {
							r.push(`seems to enjoy every painful step; ${he}'s a <span class="lightcoral">natural masochist.</span>`);
							slave.fetishKnown = 1;
						} else {
							r.push(`<span class="hotpink">appreciates</span> every painful step ${he} gets to take.`);
							slave.devotion += 1;
						}
					} else {
						r.push(`${He} is kept <span class="hotpink">mindful</span> and <span class="gold">fearful</span> by the difficulty of walking in ${his} extreme heels.`);
						slave.devotion += 1;
						slave.trust -= 1;
					}
					r.push(`They're so high they're a bit <span class="red">unhealthy</span> for ${his} legs.`);
					healthDamage(slave, 2);
				}
			} else {
				r.push(`${His} P-Limb`);
				if (hasBothLegs(slave)) {
					r.push(`legs work`);
				} else {
					r.push(`leg works`);
				}
				r.push(`just as well in extreme heels as`);
				if (hasBothLegs(slave)) {
					r.push(`they do`);
				} else {
					r.push(`it does`);
				}
				r.push(`out of them.`);
			}
		} else {
			if (slave.heels === 1 && !canWalk(slave) && slave.fetish !== "mindbroken") {
				if (slave.shoes === "pumps") {
					r.push(`While ${he} can just barely stand with ${his} heeled pumps, ${he} is incapable of taking a step in them.`);
				}
			}
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function vaginaAccessories(slave) {
		if (slave.vaginalAccessory !== "none") {
			if (slave.vaginalAccessory === "bullet vibrator" || slave.vaginalAccessory === "smart bullet vibrator") {
				r.push(`Constantly wearing a bullet vibrator`);
				if (slave.devotion < 20) {
					r.push(`habituates ${him} to sexual slavery and <span class="hotpink">increases ${his} submissiveness.</span>`);
					slave.devotion += 2;
				} else {
					r.push(`reminds ${him} of ${his} place and <span class="hotpink">increases ${his} devotion to you.</span>`);
					slave.devotion++;
				}
			} else if (slave.vaginalAccessory === "dildo") {
				if (slave.vagina < 1 && jsRandom(1, 100) > 50) {
					r.push(`Constantly wearing a dildo in ${his} virgin pussy <span class="lime">gets it used to penetration.</span>`);
					slave.vagina += 1;
				} else {
					r.push(`${His} pussy easily accommodates the dildo ${he}'s required to wear.`);
				}
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.sexualFlaw === "hates penetration" && jsRandom(1, 100) > 50) {
						r.push(`The habit <span class="green">reduces ${his} dislike of having ${his} pussy filled.</span>`);
						slave.sexualFlaw = "none";
					}
				}
			} else if (slave.vaginalAccessory === "long dildo") {
				if (slave.vagina < 1 && jsRandom(1, 100) > 50) {
					r.push(`Constantly wearing a dildo in ${his} virgin pussy <span class="lime">gets it used to penetration.</span>`);
					slave.vagina += 1;
				} else {
					r.push(`${His} pussy easily accommodates the dildo ${he}'s required to wear.`);
				}
				if (slave.fuckdoll === 0) {
					if (slave.fetish !== "mindbroken") {
						if (slave.sexualFlaw === "hates penetration" && jsRandom(1, 100) > 50) {
							r.push(`The habit <span class="green">reduces ${his} dislike of having ${his} pussy filled.</span>`);
							slave.sexualFlaw = "none";
						}
						if (slave.sexualQuirk === "size queen") {
							r.push(`Being able to hold such a long dildo is a <span class="hotpink">point of pride</span> for the ostentatious size queen.`);
							slave.devotion += 2;
						} else {
							r.push(`It penetrates ${his} cervix causing ${him} tremendous discomfort, making ${him} a little <span class="gold">less trusting</span> of you.`);
							slave.trust -= 1;
						}
					}
				}
			} else if (slave.vaginalAccessory === "large dildo") {
				if (slave.vagina < 3) {
					if (jsRandom(1, 4) === 1) {
						r.push(`Constantly wearing a large dildo in ${his} pussy <span class="lime">stretches it out.</span>`);
						slave.vagina += 1;
					} else {
						r.push(`The large dildo ${he}'s required to wear is a stretch for ${his} cunt, but pussies are resilient and ${he}rs isn't seriously affected.`);
					}
				} else {
					r.push(`${His} pussy accommodates the large dildo ${he}'s required to wear.`);
				}
				if (slave.fuckdoll === 0) {
					if (slave.fetish !== "mindbroken") {
						if (slave.vagina < 2) {
							r.push(`The big dildo in ${his} tight cunt`);
							if (slave.sexualQuirk === "size queen") {
								r.push(`is a <span class="hotpink">point of pride</span> for the ostentatious size queen.`);
								slave.devotion += 2;
							} else {
								r.push(`<span class="hotpink">breaks ${him} to sexual slavery</span> slightly.`);
								slave.devotion += 1;
							}
							if (slave.vagina === 1) {
								r.push(`It stretches ${his} tight cunt to soreness by the end of every day, so it also makes ${him} a little <span class="gold">less trusting</span> of you.`);
								slave.trust -= 1;
							}
						}
					}
				}
			} else if (slave.vaginalAccessory === "long, large dildo") {
				if (slave.vagina < 3) {
					if (jsRandom(1, 4) === 1) {
						r.push(`Constantly wearing a large dildo in ${his} pussy <span class="lime">stretches it out.</span>`);
						slave.vagina += 1;
					} else {
						r.push(`The large dildo ${he}'s required to wear is a stretch for ${his} cunt, but pussies are resilient and ${he}rs isn't seriously affected.`);
					}
				} else {
					r.push(`${His} pussy accommodates the large dildo ${he}'s required to wear.`);
				}
				if (slave.vagina < 2) {
					if (slave.fuckdoll === 0) {
						if (slave.fetish !== "mindbroken") {
							r.push(`The big, long dildo in ${his} tight cunt`);
							if (slave.sexualQuirk === "size queen") {
								r.push(`is a <span class="hotpink">point of pride</span> for the ostentatious size queen.`);
								slave.devotion += 2;
							} else {
								r.push(`breaks ${him} to sexual slavery slightly. It also penetrates ${his} cervix, causing ${him} tremendous discomfort, and making ${him} a little less trusting of you.`);
								slave.devotion += 1;
								slave.trust -= 1;
							}
							if (slave.vagina === 1) {
								r.push(`It stretches ${his} tight cunt to soreness by the end of every day, so it also makes ${him} a little <span class="gold">less trusting</span> of you.`);
								slave.trust -= 1;
							}
						}
					}
				}
			} else if (slave.vaginalAccessory === "huge dildo") {
				if (slave.vagina < 4) {
					if (slave.fuckdoll === 0) {
						if (slave.fetish !== "mindbroken") {
							if (slave.sexualQuirk === "size queen") {
								r.push(`${He} thinks of the massive dildo stretching out ${his} womanhood as preparation for the biggest cocks, and looks forward to take anything — dicks, hands, truly anything — inside ${his} newly capacious cunt.`);
								slave.devotion += 4;
							} else if (slave.fetish === "masochist" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
								r.push(`${He} gets off on the agony of having ${his} cunt permanently stretched by a huge dildo. The terrible combination of pain and pleasure breaks ${his} will but fills ${him} with fear.`);
								slave.devotion += 5;
								slave.trust -= 5;
							} else if (slave.fetish === "submissive" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
								r.push(`${He} submits to the agony of having ${his} cunt permanently stretched by a huge dildo. Having ${his} hole ruined at your whim breaks ${his} will but fills ${him} with fear.`);
								slave.devotion += 5;
								slave.trust -= 5;
							} else {
								r.push(`The agony of having ${his} cunt <span class="lime">permanently stretched</span> by a huge dildo fills ${him} with <span class="mediumorchid">resentment</span> and <span class="gold">fear.</span>`);
								slave.devotion -= 5;
								slave.trust -= 5;
							}
						}
					}
					slave.vagina += 1;
				} else {
					r.push(`${His} cavernous pussy accommodates the huge dildo ${he}'s required to wear.`);
				}
			} else if (slave.vaginalAccessory === "long, huge dildo") {
				if (slave.vagina < 4) {
					if (slave.fuckdoll === 0) {
						if (slave.fetish !== "mindbroken") {
							if (slave.sexualQuirk === "size queen") {
								r.push(`${He} thinks of the massive dildo stretching out ${his} womanhood and stomach as preparation for the biggest cocks, and looks forward to take anything — dicks, hands, arms, truly anything — inside ${his} newly capacious cunt.`);
								slave.devotion += 4;
							} else if (slave.fetish === "masochist" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
								r.push(`${He} gets off on the agony of having ${his} cunt permanently stretched and ${his} cervix penetrated by a huge dildo. The terrible combination of pain and pleasure breaks ${his} will but fills ${him} with fear.`);
								slave.devotion += 5;
								slave.trust -= 5;
							} else if (slave.fetish === "submissive" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
								r.push(`${He} submits to the agony of having ${his} cunt permanently stretched and ${his} cervix penetrated by a huge dildo. Having ${his} hole and cervix ruined at your whim breaks ${his} will but fills ${him} with fear.`);
								slave.devotion += 5;
								slave.trust -= 5;
							} else {
								r.push(`The agony of having ${his} cunt permanently stretched and ${his} cervix penetrated by a huge dildo fills ${him} with resentment and fear.`);
								slave.devotion -= 5;
								slave.trust -= 5;
							}
						}
					}
					slave.vagina += 1;
				} else {
					r.push(`${His} cavernous pussy accommodates the huge dildo ${he}'s required to wear.`);
				}
			}
			if (slave.vaginalAccessory === "long, huge dildo" || slave.vaginalAccessory === "long, large dildo" || slave.vaginalAccessory === "long dildo") {
				if ((slave.preg > slave.pregData.normalBirth / 10) && slave.pregKnown === 1) {
					if (jsRandom(1, 100) > 50) {
						r.push(`The dildo penetrating ${his} womb <span class="orange">caused ${him} to miscarry,</span> which <span class="red">damages ${his} health.</span>`);
						healthDamage(slave, 20);
						if (lastPregRule(slave, V.defaultRules)) {
							slave.preg = -1;
						} else {
							slave.preg = 0;
						}
						TerminatePregnancy(slave);
						actX(slave, "miscarriages");
						r.push(`${He} is`);
						if (slave.devotion < -50) {
							r.push(`filled with violent, consuming hatred and fear. Even though ${he} knew ${his} baby was destined for a slave orphanage, it seems ${he} cared for it and views you as its killer.`);
							slave.devotion -= 25;
							slave.trust -= 25;
						} else if (slave.devotion < -20) {
							r.push(`afflicted by desperate, inconsolable grief and horror. Even though ${he} knew ${his} baby was destined for a slave orphanage, it seems ${he} cared for it.`);
							slave.devotion -= 10;
							slave.trust -= 20;
						} else if (slave.devotion <= 20) {
							r.push(`<span class="mediumorchid">consumed by enduring sorrow</span> and <span class="gold">horror.</span> Even though ${he} knew ${his} baby was destined for a slave orphanage, it seems ${he} cared for it.`);
							slave.devotion -= 5;
							slave.trust -= 5;
						} else if (slave.devotion <= 50) {
							r.push(`dully obedient. ${He} has been broken to slave life so thoroughly that even this is neither surprising nor affecting.`);
						} else {
							r.push(`<span class="hotpink">pleased by this stark development,</span> since ${he} is so attentive to your will. ${He} also expects ${he}'ll be able to fuck better now.`);
							slave.devotion += 4;
						}
						if (slave.abortionTat > -1) {
							slave.abortionTat++;
							r.push(`The temporary tattoo of a child has been replaced with ${his} ${ordinalSuffix(slave.abortionTat)} crossed out infant.`);
							cashX(forceNeg(V.modCost), "slaveMod", slave);
						}
					}
				}
			}
		}
		if (slave.vaginalAttachment === "vibrator") {
			/* TODO: write effects here */
		}
	}

	/**
	 * @param {App.Entity.SlaveState} slave
	 *
	 */
	function analAccessories(slave) {
		if (slave.buttplug === "plug" || slave.buttplug === "long plug") {
			if (["cat tail", "cow tail", "fox tail", "tail"].includes(slave.buttplugAttachment)) {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.anus < 1) {
						r.push(`Constantly wearing a tail plug in ${his} virgin butthole <span class="lime">stretches it out</span> and <span class="gold">is a constant degrading reminder of ${his} submission.</span>`);
						slave.anus += 1;
						slave.trust -= 2;
					} else {
						r.push(`${His} asshole is used to being penetrated and wearing ${his} tailed buttplug doesn't affect it, though it still serves as <span class="gold">a constant degrading reminder of ${his} submission.</span>`);
						slave.trust -= 2;
					}
					if (slave.sexualFlaw === "hates anal" && jsRandom(1, 100) > 50) {
						r.push(`It <span class="green">gets ${him} habituated to having ${his} asshole filled.</span>`);
						slave.sexualFlaw = "none";
					}
					if (slave.sexualQuirk === "size queen" && slave.buttplug === "long plug") {
						r.push(`The overly long plug delving the depths of ${his} rear <span class="hotpink">gets ${him} off,</span> since ${he}'s a size queen.`);
						slave.devotion += 2;
					}
				}
			} else {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.anus < 1) {
						r.push(`Constantly wearing a plug in ${his} virgin butthole <span class="lime">stretches it out.</span>`);
						slave.anus += 1;
					} else {
						r.push(`${His} asshole is used to being penetrated and wearing ${his} buttplug doesn't affect it.`);
					}
					if (slave.sexualFlaw === "hates anal" && jsRandom(1, 100) > 50) {
						r.push(`It <span class="green">gets ${him} habituated to having ${his} asshole filled.</span>`);
						slave.sexualFlaw = "none";
					}
					if (slave.sexualQuirk === "size queen" && slave.buttplug === "long plug") {
						r.push(`The overly long plug delving the depths of ${his} rear <span class="hotpink">gets ${him} off,</span> since ${he}'s a size queen.`);
						slave.devotion += 2;
					}
				}
			}
		} else if (slave.buttplug === "large plug" || slave.buttplug === "long, large plug") {
			if (["cat tail", "cow tail", "fox tail", "tail"].includes(slave.buttplugAttachment)) {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.anus < 2) {
						r.push(`The uncomfortable tailed plug in ${his} asshole`);
						if (slave.sexualQuirk === "size queen") {
							r.push(`<span class="hotpink">gets ${him} off,</span> since ${he}'s a size queen, while serving as <span class="gold">a constant degrading reminder of ${his} submission.</span>`);
							slave.devotion += 2;
							slave.trust -= 2;
						} else {
							r.push(`<span class="hotpink">breaks ${him} to anal slavery</span> slightly, while serving as a <span class="gold">a constant degrading reminder of ${his} submission.</span>`);
							slave.devotion += 1;
							slave.trust -= 2;
						}
						if (slave.anus < 1) {
							r.push(`It stretches ${his} tight rosebud painfully, making ${him} somewhat <span class="gold">less trusting</span> of you.`);
							slave.trust -= 1;
						}
					}
				}
				if (slave.anus < 3) {
					if (slave.anus < 1 || jsRandom(1, 2) === 1) {
						r.push(`Constantly wearing a large tailed plug up ${his} ass <span class="lime">loosens ${his} sphincter.</span>`);
						slave.anus += 1;
					} else {
						r.push(`The large tailed plug ${he}'s required to wear up ${his} ass stretches it to the limit, but on the rare occasions when the plug is removed, ${his} rear hole still tightens up.`);
					}
				} else {
					r.push(`${His} anus accommodates the large plug ${he}'s required to wear.`);
					if (slave.fetish === "buttslut" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
						r.push(`In fact, ${he} <span class="hotpink">regularly orgasms</span> even in non-sexual situations as the plug is <span class="green">constantly stimulating</span> ${his} rear-end.`);
						slave.devotion += 1;
						slave.energy += 1;
					}
				}
			} else {
				if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
					if (slave.anus < 2) {
						r.push(`The uncomfortable plug in ${his} asshole`);
						if (slave.sexualQuirk === "size queen") {
							r.push(`<span class="hotpink">gets ${him} off,</span> since ${he}'s a size queen.`);
							slave.devotion += 2;
						} else {
							r.push(`<span class="hotpink">breaks ${him} to anal slavery</span> slightly.`);
							slave.devotion += 1;
						}
						if (slave.anus < 1) {
							r.push(`It stretches ${his} tight rosebud painfully, making ${him} somewhat <span class="gold">less trusting</span> of you.`);
							slave.trust -= 1;
						}
					}
				}
				if (slave.anus < 3) {
					if (slave.anus < 1 || jsRandom(1, 2) === 1) {
						r.push(`Constantly wearing a large plug up ${his} ass <span class="lime">loosens ${his} sphincter.</span>`);
						slave.anus += 1;
					} else {
						r.push(`The large plug ${he}'s required to wear up ${his} ass stretches it to the limit, but on the rare occasions when the plug is removed, ${his} rear hole still tightens up.`);
					}
				} else {
					r.push(`${His} anus accommodates the large plug ${he}'s required to wear.`);
					if (slave.fetish === "buttslut" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
						r.push(`In fact, ${he} <span class="hotpink">regularly orgasms</span> even in non-sexual situations as the plug is <span class="green">constantly stimulating</span> ${his} rear-end.`);
						slave.devotion += 1;
						slave.energy += 1;
					}
				}
			}
		} else if (slave.buttplug === "huge plug" || slave.buttplug === "long, huge plug") {
			if (["cat tail", "cow tail", "fox tail", "tail"].includes(slave.buttplugAttachment)) {
				if (slave.anus < 4) {
					if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
						if (slave.sexualQuirk === "size queen") {
							r.push(`${He} thinks of the horribly huge tailed plug ${he} has wear in ${his} butt as preparation for the biggest cocks, and looks forward to being able to safely take unlubricated anal from them. Even so, the tail hanging from ${his} rear is a constant degrading reminder of ${his} submission.`);
							slave.devotion += 4;
							slave.trust -= 5;
						} else if (slave.fetish === "masochist" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
							r.push(`${He} gets off on the agony of having ${his} anal sphincter permanently gaped by a huge tailed buttplug, but can't ignore the tail hanging from the back of the plug. The terrible combination of anal pleasure and degradation breaks ${his} will and fills ${him} with humiliation.`);
							slave.devotion += 5;
							slave.trust -= 7;
						} else if (slave.fetish === "submissive" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
							r.push(`${He} submits to the agony of having ${his} anal sphincter permanently gaped by a huge tailed buttplug and the shame of having a tail dangle from the back of the plug. Having ${his} hole ruined at your whim and in such a degrading fashion breaks ${his} will and fills ${him} with humiliation.`);
							slave.devotion += 5;
							slave.trust -= 7;
						} else {
							r.push(`The agony of having ${his} anal sphincter permanently gaped by a huge tailed buttplug fills ${him} with resentment and humiliation.`);
							slave.devotion -= 5;
							slave.trust -= 5;
						}
					}
					slave.anus += 1;
				} else {
					r.push(`${His} gaping anus accommodates the huge tailed plug ${he}'s required to wear, serving little purpose other than to remind ${him} of ${his} <span class="gold">humiliation.</span>`);
					if (slave.fetish === "buttslut" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
						r.push(`In fact, ${he} <span class="hotpink">regularly orgasms</span> even in non-sexual situations as the plug is <span class="green">constantly stimulating</span> ${his} rear-end.`);
						slave.devotion += 1;
						slave.energy += 1;
					}
				}
			} else {
				if (slave.anus < 4) {
					if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
						if (slave.sexualQuirk === "size queen") {
							r.push(`${He} thinks of the horribly huge plug ${he} has wear in ${his} butt as preparation for the biggest cocks, and looks forward to being able to safely take unlubricated anal from them.`);
							slave.devotion += 4;
						} else if (slave.fetish === "masochist" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
							r.push(`${He} gets off on the agony of having ${his} anal sphincter permanently gaped by a huge buttplug. The terrible combination of pain and pleasure breaks ${his} will but fills ${him} with fear.`);
							slave.devotion += 5;
							slave.trust -= 5;
						} else if (slave.fetish === "submissive" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
							r.push(`${He} submits to the agony of having ${his} anal sphincter permanently gaped by a huge buttplug. Having ${his} hole ruined at your whim breaks ${his} will but fills ${him} with fear.`);
							slave.devotion += 5;
							slave.trust -= 5;
						} else {
							r.push(`The agony of having ${his} anal sphincter permanently gaped by a huge buttplug fills ${him} with resentment and fear.`);
							slave.devotion -= 5;
							slave.trust -= 5;
						}
					}
					slave.anus += 1;
				} else {
					r.push(`${His} gaping anus accommodates the huge plug ${he}'s required to wear.`);
					if (slave.fetish === "buttslut" && slave.fetishKnown === 1 && slave.fetishStrength > 60) {
						r.push(`In fact, ${he} <span class="hotpink">regularly orgasms</span> even in non-sexual situations as the plug is <span class="green">constantly stimulating</span> ${his} rear-end.`);
						slave.devotion += 1;
						slave.energy += 1;
					}
				}
			}
		}
		if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
			if (["cat tail", "cow tail", "fox tail", "tail"].includes(slave.buttplugAttachment)) {
				if (slave.fetish === "humiliation" && slave.fetishKnown === 0) {
					r.push(`${He} shows a surprising lack of resistance to the routine of having a tail inserted in ${his} ass each morning; ${he} seems to <span class="lightcoral">naturally enjoy the humiliation.</span>`);
					slave.fetishKnown = 1;
				} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
					if (fetishChangeChance(slave) > jsRandom(0, 100)) {
						r.push(`Slowly, ${his} shame at having a tail inserted in ${his} ass each morning turns to secret enjoyment and finally to <span class="lightcoral">open arousal at the humiliating accessory.</span>`);
						slave.fetish = "humiliation";
						slave.fetishKnown = 1;
						slave.fetishStrength = 10;
					}
				}
			} else if (slave.buttplug === "plug" || slave.buttplug === "large plug" || slave.buttplug === "long, large plug" || slave.buttplug === "long plug") {
				if (slave.fetish === "buttslut" && slave.fetishKnown === 0) {
					r.push(`${He} shows a surprising lack of resistance to the routine of getting the plug up ${his} butt in the morning; ${he} seems to <span class="lightcoral">naturally enjoy anal stimulation.</span>`);
					slave.fetishKnown = 1;
				} else if (slave.fetish === "none" || slave.fetishKnown === 0) {
					if (fetishChangeChance(slave) > jsRandom(0, 100)) {
						r.push(`Slowly, ${his} anguish at getting the plug up ${his} butt in the morning turns to secret enjoyment and finally to <span class="lightcoral">open arousal at having ${his} anus filled.</span>`);
						slave.fetish = "buttslut";
						slave.fetishKnown = 1;
						slave.fetishStrength = 10;
					}
				}
			}
		}
	}
})();