code:
App.SlaveAssignment.SmartPiercing = {};

/* -- Normal settings -- */

App.SlaveAssignment.SmartPiercing.BASE = class {
	/** Base class for smart piercing settings; encapsulates shared logic and interface
	 * @param {App.Entity.SlaveState} slave */
	constructor(slave) {
		this.slave = slave;
	}

	/** Activate effect for this setting at a given magnitude.
	 * @param {number} magnitude 1: vibe/piercing, 2: smart vibe, or vibe+piercing, 3: smart vibe+piercing
	 */
	effect(magnitude) {
		throw "abstract";
	}

	/** Return text for slave effect for this setting.
	 * @param {boolean} plural was more than one device used.
	 * @returns {string} predicate phrase for a sentence describing the results.  note that the subject is provided.
	 */
	text(plural) {
		return `<span class="error">ABSTRACT</span>`;
	}

	/** Condition under which the trigger evaluates
	 * @returns {boolean} whether to evaluate the trigger
	 */
	valid() {
		return true;
	}

	/** Activate effect and return text for a slave.  Typically should be inherited without changes.
	 * @param {number} magnitude 1: vibe/piercing, 2: smart vibe, or vibe+piercing, 3: smart vibe+piercing
	 * @param {boolean} plural was more than one device used.
	 * @returns {string} predicate phrase for a sentence describing the results.  note that the subject is provided.
	 */
	trigger(magnitude, plural) {
		if (this.valid()) {
			const ret = this.text(plural);
			this.effect(magnitude);
			return ret;
		}
		return '';
	}
};

App.SlaveAssignment.SmartPiercing.none = class extends App.SlaveAssignment.SmartPiercing.BASE {
	effect(magnitude) {
		this.slave.devotion -= 1 + magnitude; // 2, 3, or 4
		this.slave.energy -= 10 + 3 * magnitude; // 10, 13, or 16
	}

	text(plural) {
		const {his, him} = getPronouns(this.slave);
		return `${plural ? "disrupt" : "disrupts"} arousal, <span class="red">reducing ${his} sex drive</span> and <span class="devotion dec">infuriating ${him}.</span>`;
	}
};

App.SlaveAssignment.SmartPiercing.all = class extends App.SlaveAssignment.SmartPiercing.BASE {
	effect(magnitude) {
		this.slave.energy += 1 + 2 * magnitude; // 3, 5, or 7
	}

	valid() {
		return this.slave.energy <= 95;
	}

	text(plural) {
		const {his} = getPronouns(this.slave);
		return `${plural ? "encourage" : "encourages"} sex of all kinds, <span class="improvement">increasing ${his} sex drive.</span>`;
	}
};

App.SlaveAssignment.SmartPiercing.GENDERBASE = class extends App.SlaveAssignment.SmartPiercing.BASE {
	/** Base class for gender settings; encapsulates shared logic for attraction modification
	 * @param {App.Entity.SlaveState} slave
	 * @param {string} property slave property to adjust
	 * @param {boolean} positive whether the impact of the attraction change is positive or negative
	 */
	constructor(slave, property, positive) {
		super(slave);
		this.property = property;
		this.positive = positive;
	}

	effect(magnitude) {
		const bonus = 2 * V.assistant.power;
		if (this.positive) {
			this.slave[this.property] += (2 + 2 * magnitude + bonus); // 4, 6, or 8, plus assistant bonus
		} else {
			this.slave[this.property] -= (2 + 2 * magnitude + bonus); // same as above
		}
		this.slave[this.property] = Math.clamp(this.slave[this.property], 0, 100);
	}

	valid() {
		if (this.positive) {
			return this.slave[this.property] < 95;
		} else {
			return this.slave[this.property] > 0;
		}
	}

	trigger(magnitude, plural) {
		if (this.valid()) {
			let ret = this.text(plural);
			this.effect(magnitude);
			// special side effect for gender settings only
			const {his} = getPronouns(this.slave);
			if (this.positive) {
				if (this.slave.energy < 80) {
					ret += ` This has the secondary effect of slightly <span class="improvement">enhancing ${his} libido.</span>`;
					this.slave.energy += (magnitude === 1 ? 1 : 2);
				}
			} else {
				if (this.slave.energy > 0) {
					ret += ` This has the secondary effect of slightly <span class="red">reducing ${his} libido.</span>`;
					this.slave.energy -= (magnitude === 1 ? 1 : 2);
				}
			}
			return ret;
		}
		return '';
	}
};

App.SlaveAssignment.SmartPiercing.women = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
	constructor(slave) {
		super(slave, "attrXX", true);
	}

	text(plural) {
		const {his, him, he} = getPronouns(this.slave);
		return `successfully <span class="improvement">${plural ? "increase" : "increases"} ${his} attraction to girls</span> by pleasuring ${him} when ${he}'s around them.`;
	}
};

App.SlaveAssignment.SmartPiercing["anti-women"] = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
	constructor(slave) {
		super(slave, "attrXX", false);
	}

	text(plural) {
		const {his, he} = getPronouns(this.slave);
		return `successfully <span class="improvement">${plural ? "suppress" : "suppresses"} ${his} attraction to girls</span> by making ${his} private parts very uncomfortable when ${he}'s around them.`;
	}
};

App.SlaveAssignment.SmartPiercing.men = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
	constructor(slave) {
		super(slave, "attrXY", true);
	}

	text(plural) {
		const {his, him, he} = getPronouns(this.slave);
		return `successfully <span class="improvement">${plural ? "increase" : "increases"} ${his} attraction to guys</span> by pleasuring ${him} when ${he}'s around cocks.`;
	}
};

App.SlaveAssignment.SmartPiercing["anti-men"] = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
	constructor(slave) {
		super(slave, "attrXY", false);
	}

	text(plural) {
		const {his, he} = getPronouns(this.slave);
		return `successfully <span class="improvement">${plural ? "suppress" : "suppresses"} ${his} attraction to guys</span> by making ${his} private parts very uncomfortable when ${he}'s around them.`;
	}
};

/* -- Fetish settings -- */

App.SlaveAssignment.SmartPiercing.FETISHBASE = class extends App.SlaveAssignment.SmartPiercing.BASE {
	/** Base class for fetish settings; encapsulates shared logic for fetishes
	 * @param {App.Entity.SlaveState} slave
	 * @param {FC.Fetish} fetishName name of fetish controlled by this class
	 */
	constructor(slave, fetishName) {
		super(slave);
		this.fetish = fetishName;
	}

	/** Return text for slave effect for this fetish setting.
	 * @param {boolean} plural was more than one device used.
	 * @param {string} which text type to return - "decrease" (of opposing fetish), "change" (to this fetish), or "increase" (of this fetish)
	 * @returns {string} predicate phrase for a sentence describing the results.  note that the subject is provided.
	 */
	fetishText(plural, which) {
		return `<span class="error">ABSTRACT</span>`;
	}

	// no point in separating effect for fetishes
	trigger(magnitude, plural) {
		if (this.slave.fetish !== this.fetish) {
			if (this.slave.fetishStrength >= 10) {
				this.slave.fetishStrength -= 15 + 5 * magnitude; // 20, 25, or 30
				return this.fetishText(plural, "decrease");
			} else if (fetishChangeChance(this.slave) > (jsRandom(0, 100) - 20 * V.assistant.power)) {
				this.slave.fetish = this.fetish;
				this.slave.fetishKnown = 1;
				this.slave.fetishStrength = 5 + 5 * magnitude;
				return this.fetishText(plural, "change");
			}
		} else if (this.slave.fetishStrength <= 95) {
			this.slave.fetishStrength += 2 + 2 * magnitude; // 4, 6, or 8
			return this.fetishText(plural, "increase");
		}
		return '';
	}
};

App.SlaveAssignment.SmartPiercing.vanilla = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "none");
	}

	trigger(magnitude, plural) {
		// Vanilla does NOT increase the strength of the "none" fetish, but otherwise behaves like any other fetishe setting
		if (this.slave.fetish !== "none") {
			return super.trigger(magnitude, plural);
		}
		return '';
	}

	fetishText(plural, which) {
		const {him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm only during normal sex.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms during straightforward oral sex, and <span class="fetish loss">${his} sexuality returns to normal.</span>`;
		}
		throw "Unexpected fetish effect";
	}
};

App.SlaveAssignment.SmartPiercing.oral = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "cumslut");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${he}'s using ${his} mouth.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms as ${he} performs oral sex, and <span class="fetish gain">${he} develops a fetish for cum.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} oral fetish.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.anal = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "buttslut");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${his} rear hole is being fucked.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms when ${his} ass is being stimulated, and <span class="fetish gain">${he} develops a fetish for being an anal bottom.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} anal fetish.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.boobs = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "boobs");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${his} tits are being touched.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms when ${his} nipples are being stimulated, and <span class="fetish gain">${he} develops a fetish for ${his} tits.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} boob fetish.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.submissive = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "submissive");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${he}'s being held down and used.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms when ${he} is restrained, and <span class="fetish gain">${he} develops a fetish for submission.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} submission.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.humiliation = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "humiliation");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${he}'s got an audience.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms when ${he} is being humiliated, and <span class="fetish gain">${he} develops a fetish for humiliation.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} humiliation fetish.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.pregnancy = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "pregnancy");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${he} feels like ${he}'s being bred.`;
		} else if (which === "change") {
			let activities = ''; // FIXME: no text for null PCs.  Is that a thing?
			if (V.PC.dick !== 0) {
				activities = "unprotected sex";
				if (V.PC.vagina !== -1) {
					activities += " and ";
				}
			}
			if (V.PC.vagina !== -1) {
				activities += "loving contact with the female anatomy";
			}
			return `${plural ? "encourage" : "encourages"} many orgasms during ${activities}, and <span class="fetish gain">${he} begins to fantasize about pregnancy.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} pregnancy fetish.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.dom = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "dom");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when another slave is servicing ${him}.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms while ${he}'s taking an active, dominant sexual role, and <span class="fetish gain">${he} begins to enjoy dominance.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} dominance.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.masochist = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "masochist");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${he}'s being hurt.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms while ${he}'s being beaten, and <span class="fetish gain">${he} begins to enjoy pain.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} masochism.</span>`;
		}
	}
};

App.SlaveAssignment.SmartPiercing.sadist = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
	constructor(slave) {
		super(slave, "sadist");
	}

	fetishText(plural, which) {
		const {he, him, his} = getPronouns(this.slave);
		if (which === "decrease") {
			return `${plural ? "act" : "acts"} to <span class="fetish loss">suppress ${his} current fetish,</span> encouraging ${him} to orgasm when ${he} witnesses or even takes part in another slave's pain.`;
		} else if (which === "change") {
			return `${plural ? "encourage" : "encourages"} many orgasms while ${he}'s involved in the abuse of other slaves, and <span class="fetish gain">${he} begins to develop a sadistic streak.</span>`;
		} else if (which === "increase") {
			return `<span class="fetish gain">${plural ? "advance" : "advances"} ${his} sadism.</span>`;
		}
	}
};

/* -- Dispatch -- */

/** Apply and return description of smart piercing effects
 * @param {App.Entity.SlaveState} slave
 * @returns {string}
 */
App.SlaveAssignment.saSmartPiercingEffects = function(slave) {
	const {he, his, His, him} = getPronouns(slave);
	const hasBV = slave.vaginalAccessory === "bullet vibrator" || slave.dickAccessory === "bullet vibrator";
	const hasSmartBV = slave.vaginalAccessory === "smart bullet vibrator" || slave.dickAccessory === "smart bullet vibrator";
	const hasDildoVibe = slave.vaginalAttachment === "vibrator";
	const hasSmartDildoVibe = slave.vaginalAttachment === "smart vibrator";
	const hasSP = slave.clitPiercing === 3;
	const piercing = hasSP ? `smart ${(slave.vagina > -1) ? "clit" : "frenulum"} piercing` : ``;
	const hasSmartVibe = hasSmartDildoVibe || hasSmartBV;
	const hasDumbVibe = hasDildoVibe || hasBV;
	const vibrator = `${hasSmartVibe ? "smart " : ""}${(hasBV || hasSmartBV) ? "bullet vibrator" : (hasDildoVibe || hasSmartDildoVibe) ? "vibrating dildo" : ""}`;

	// should we bail early because the slave can't be affected?
	if (hasSP) {
		if (slave.fuckdoll > 0) {
			return `${His} ${piercing} is slaved to ${his} stimulation systems.`;
		} else if (slave.fetish === "mindbroken") {
			return `The effects of ${his} ${piercing} cannot reach ${his} shattered mind.`;
		}
	} else if (hasSmartVibe || hasDumbVibe) {
		if (hasSmartVibe && slave.fuckdoll > 0) { // note: ordinary vibes DO affect fuckdolls
			return `${His} ${vibrator} is slaved to ${his} stimulation systems.`;
		} else if (slave.fetish === "mindbroken") {
			return `The effects of the ${vibrator} ${he} is wearing cannot reach ${his} shattered mind.`;
		}
	}

	let r = [];

	// smart toys act only when turned on
	if ((hasSP || hasSmartVibe) && slave.clitSetting !== "off") {
		r.push(doSmartToys());
	}

	// dumb toys act regardless of what the smart toys are doing
	if (hasDumbVibe) {
		r.push(doDumbToys());
	}

	return r.join(' ');

	function doSmartToys() {
		// figure out how the slave is affected by smart toys
		let magnitude = 0;
		let plural = false;
		let subjectPhrase = '';
		if (hasSP && hasSmartVibe) {
			magnitude = 3;
			plural = true;
			subjectPhrase = `${His} ${piercing} and the ${vibrator} ${he} is wearing`;
		} else if (hasSmartVibe) {
			magnitude = 2;
			subjectPhrase = `The ${vibrator} ${he} is wearing`;
		} else if (hasSP) {
			magnitude = 1;
			subjectPhrase = `${His} ${piercing}`;
		}

		if (magnitude) {
			const ctor = App.SlaveAssignment.SmartPiercing[slave.clitSetting];
			if (typeof ctor !== "function") { // uninstantiated classes are really just functions. JS is weird.
				throw "Unrecognized smart clit/vibe setting";
			}
			/** @type {App.SlaveAssignment.SmartPiercing.BASE} */
			const setting = new ctor(slave);
			const predicatePhrase = setting.trigger(magnitude, plural);
			if (predicatePhrase !== "") { // no predicate means no sentence
				return subjectPhrase + " " + predicatePhrase;
			}
		}

		return ``;
	}

	function doDumbToys() {
		// all dumb vibrators do exactly the same thing: dampen any existing fetish, and push libido into the average (40-60) range
		const intro = `${His} ${vibrator} intermittently stimulates ${him} no matter what ${he}'s doing, which `;
		const effects = [];
		if (slave.fetish !== "none") {
			if (slave.fetishKnown === 1) {
				effects.push(`<span class="fetish loss">weakens</span> ${his} fetish`);
			}
			slave.fetishStrength -= Math.min(15, slave.fetishStrength);
		}
		if (slave.energy <= 40) {
			effects.push(`<span class="improvement">increases</span> ${his} below-average sex drive`);
			slave.energy += 3;
		} else if (slave.energy >= 60) {
			effects.push(`<span class="stat drop">reduces</span> ${his} overcharged libido`);
			slave.energy -= 3;
		}
		return effects.length > 0 ? intro + arrayToSentence(effects) + "." : "";
	}
};


code:
/** Apply and return description of social effects
 * @param {App.Entity.SlaveState} slave
 * @returns {DocumentFragment}
 */
App.SlaveAssignment.saSocialEffects = function(slave) {
	const {His, his, him, he, girl, wife} = getPronouns(slave);

	/** Build a social effect object
	 * @param {string} FS
	 * @param {number} magnitude positive or negative value (a small integer, or a fraction between -1 and 1)
	 * @param {string} shortDesc for compact/list mode (text string)
	 * @param {string} longDesc for expanded mode (HTML string)
	 * @param {boolean} [creditFacility=false] true if the effect is only due to the facility she's assigned to
	 */
	function SocialEffect(FS, magnitude, shortDesc, longDesc, creditFacility=false) {
		this.FS = FS;
		this.magnitude = magnitude;
		this.shortDesc = shortDesc;
		this.longDesc = longDesc;
		this.creditFacility = creditFacility;
	}

	/** @returns {SocialEffect[]} */
	function makeSocialEffects() {
		let t = [];

		const modScore = SlaveStatsChecker.modScore(slave);

		if (V.arcologies[0].FSSupremacist !== "unset") {
			if (slave.race === V.arcologies[0].FSSupremacistRace) {
				if ([Job.ARCADE, Job.PUBLIC, Job.CLUB, Job.WHORE, Job.GLORYHOLE, Job.BROTHEL].includes(slave.assignment)) {
					t.push(new SocialEffect("Supremacist", -1, "Degrading job for race",
						`Society ${V.arcologies[0].FSSupremacist >= V.FSLockinLevel*0.6 ? "strongly " : ''}disapproves of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race in a degrading, public role; this also holds back acceptance of ${V.arcologies[0].FSSupremacistRace} superiority.`, true));
				} else if (slave.assignment === Job.HEADGIRL) {
					t.push(new SocialEffect("Supremacist", 2, "Headgirl race",
						`Society strongly approves of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race in a position of leadership as your Head Girl, advancing the notion that those of the ${V.arcologies[0].FSSupremacistRace} race should be in positions of authority over others.`));
				} else if (slave.assignment === Job.RECRUITER) {
					t.push(new SocialEffect("Supremacist", 2, "Recruiter race",
						`Society strongly approves of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race in a position of leadership as your recruiter, advancing the notion that it is only natural that those of the ${V.arcologies[0].FSSupremacistRace} race should lead the charge in enslaving others.`));
				} else if (slave.assignment === Job.CONCUBINE) {
					t.push(new SocialEffect("Supremacist", 2, "Concubine race",
						`Society strongly approves of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race in a position of importance as your concubine, advancing the notion that the most favored of your bedslaves should naturally be of the ${V.arcologies[0].FSSupremacistRace} race.`));
				} else {
					t.push(new SocialEffect("Supremacist", 0, "Normal job for race",
						`Society does not disapprove of your keeping a slave of the ${V.arcologies[0].FSSupremacistRace} race, since ${he} is not in a publicly degrading role.`));
				}
				if (slave.pregKnown === 1) {
					if (slave.pregSource > 0) {
						const dad = findFather(slave.pregSource);
						if (dad) {
							if ((slave.race !== dad.race) && (V.arcologies[0].FSSupremacistRace === "mixed race")) {
								t.push(new SocialEffect("Supremacist", 2, "Mixed race breeding",
									`Society <span class="lightgreen">approves</span> of your using slave breeders like ${slave.slaveName} to propagate the ${V.arcologies[0].FSSupremacistRace} civilization.`));
							} else if (slave.race !== dad.race) {
								t.push(new SocialEffect("Supremacist", -2, "Miscegenation",
									`Society <span class="red">strongly disapproves</span> of your allowing a pure ${V.arcologies[0].FSSupremacistRace} slave to be miscegenated by ${dad.slaveName}.`));
							} else {
								t.push(new SocialEffect("Supremacist", 2, "Pure race breeding",
									`Society <span class="green">strongly approves</span> of your using slave breeders like ${slave.slaveName} to propagate the ${V.arcologies[0].FSSupremacistRace} civilization.`));
							}
						}
					}
				}
				if (slave.fuckdoll > 0) {
					t.push(new SocialEffect("Supremacist", -2, "Superior race fuckdoll",
						`Society <span class="red">strongly disapproves</span> of your owning a ${V.arcologies[0].FSSupremacistRace} Fuckdoll.`));
				}
			} else {
				t.push(new SocialEffect("Supremacist", 1, "Inferior race slave",
					`Society <span class="green">approves</span> of your keeping a slave of an inferior race; this also advances ${V.arcologies[0].FSSupremacistRace} superiority.`));
				if (slave.fuckdoll > 0) {
					t.push(new SocialEffect("Supremacist", 1, "Inferior race fuckdoll",
						`Society <span class="green">approves</span> of your keeping a Fuckdoll of an inferior race.`));
				}
			}
		}

		if (V.arcologies[0].FSSubjugationist !== "unset") {
			if (slave.race === V.arcologies[0].FSSubjugationistRace) {
				t.push(new SocialEffect("Subjugationist", 1, "Inferior race slave",
					`Society <span class="green">approves</span> of your keeping a slave of the subject ${V.arcologies[0].FSSubjugationistRace} race; this also advances ${V.arcologies[0].FSSubjugationistRace} inferiority.`));
				if (slave.ovaries === 0) {
					if (slave.balls === 0 || slave.vasectomy === 1) {
						let r = [];
						r.push(`Society <span class="green">approves</span> of ${slave.slaveName}'s `);
						if (slave.vasectomy === 1 && slave.balls > 0) {
							r.push(`vasectomy,`);
						} else if (slave.dick > 0) {
							r.push(`gelding,`);
						} else {
							r.push(`sterilization,`);
						}
						r.push(`which ensures that ${he} will not propagate the ${V.arcologies[0].FSSubjugationistRace} race.`);
						t.push(new SocialEffect("Subjugationist", 1, "Sterilized inferior slave", r.join(' ')));
					}
				}
				if (slave.fuckdoll > 0) {
					t.push(new SocialEffect("Subjugationist", 1, "Inferior race fuckdoll",
						`Society <span class="green">approves</span> of your keeping a Fuckdoll of the ${V.arcologies[0].FSSubjugationistRace} race.`));
				}
			} else {
				if (slave.pregKnown === 1 && slave.pregSource > 0) {
					const dad = findFather(slave.pregSource);
					if (dad && dad.race === V.arcologies[0].FSSubjugationistRace) {
						t.push(new SocialEffect("Subjugationist", -2, "Miscegenation",
							`Society <span class="red">strongly disapproves</span> of your allowing ${slave.slaveName} to be miscegenated by a ${V.arcologies[0].FSSubjugationistRace} subhuman like ${dad.slaveName}.`));
					}
				}
			}
		}

		if (V.arcologies[0].FSYouthPreferentialist !== "unset") {
			if ((slave.geneMods.NCS > 0) && (slave.visualAge <= 18)) {
				t.push(new SocialEffect("YouthPreferentialist", 2, "NCS Youthening",
					`Society <span class="green">strongly approves</span> of you keeping ${slave.slaveName} forever young and youthening; this furthers the fashion for young slaves.`));
			} else if (slave.visualAge < 30) {
				const youthRepChange = ((30-slave.visualAge)/5);
				t.push(new SocialEffect("YouthPreferentialist", youthRepChange, "Young-looking slave",
					`Society <span class="green">approves</span> of ${slave.slaveName}'s youthful body; ${he} furthers the fashion for young slaves.`));
			}
		} else if (V.arcologies[0].FSMaturityPreferentialist !== "unset") {
			if (slave.visualAge >= 30) {
				const matureRepChange = ((slave.visualAge-25)/5);
				t.push(new SocialEffect("MaturityPreferentialist", matureRepChange, "Mature-looking slave",
					`Society <span class="green">approves</span> of ${slave.slaveName}'s mature body; ${he} furthers the fashion for older ladies.`));
			}
		}

		if (V.arcologies[0].FSPetiteAdmiration !== "unset") {
			if (heightPass(slave)) {
				t.push(new SocialEffect("PetiteAdmiration", 1, "Short slave",
					`Society <span class="green">approves</span> of keeping a slave as short as ${slave.slaveName} is; ${he} furthers the fashion for shorter slaves.`));
			} else if (slave.height >= 170) {
				t.push(new SocialEffect("PetiteAdmiration", -1, "Tall slave",
					`Society <span class="red">frowns</span> at keeping a slave as tall as ${slave.slaveName}; ${he} hinders the fashion for shorter slaves.`));
			}
		} else if (V.arcologies[0].FSStatuesqueGlorification !== "unset") {
			if (heightPass(slave)) {
				t.push(new SocialEffect("StatuesqueGlorification", 1, "Tall slave",
					`Society <span class="green">approves</span> of keeping a slave as tall as ${slave.slaveName} is; ${he} furthers the fashion for taller slaves.`));
			} else {
				t.push(new SocialEffect("StatuesqueGlorification", -1, "Short slave",
					`Society <span class="red">frowns</span> at keeping someone as embarrassingly short as ${slave.slaveName}; ${he} hinders the fashion for taller slaves.`));
			}
		}

		if (V.arcologies[0].FSGenderRadicalist !== "unset") {
			 if ((slave.balls > 0) && (slave.pubertyXY === 0) && (slave.physicalAge >= V.potencyAge)) {
				t.push(new SocialEffect("GenderRadicalist", 2, "Avoiding male puberty",
					`Society <span class="green">approves</span> of you keeping ${slave.slaveName} from going through puberty; this advances public interest in ${girl}s with soft little dicks.`));
			} else if ((slave.balls > 0) && (slave.dick > 0) && (slave.hormoneBalance >= 100)) {
				t.push(new SocialEffect("GenderRadicalist", 1, "Feminization",
					`Society <span class="green">approves</span> of your heavy hormonal feminization of ${slave.slaveName}; this advances public interest in ${girl}s with soft little dicks.`));
			} else if ((slave.dick > 0) && (slave.balls === 0)) {
				t.push(new SocialEffect("GenderRadicalist", 1, "Gelded slave",
					`Society <span class="green">approves</span> of your keeping a gelded slave; this advances public interest in ${girl}s with soft dickclits.`));
			} else if ((slave.dick > 0) && (slave.anus > 0) && (slave.devotion > 20) && (slave.trust >= -20)) {
				t.push(new SocialEffect("GenderRadicalist", 1, "Contented dickgirl bottom",
					`Society <span class="green">approves</span> of your keeping a contented dickgirl bottom; this advances public interest in ${girl}s who get hard when assfucked.`));
			}
		} else if (V.arcologies[0].FSGenderFundamentalist !== "unset") {
			if (V.arcologies[0].FSRestart === "unset") {
				if (slave.bellyPreg >= 1500) {
					t.push(new SocialEffect("GenderFundamentalist", 1, "Pregnant",
						`Society ${V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel*0.5 ? "strongly " : ""}approves of your keeping a pregnant slave; this also supports the idea that slave women should bear babies.`));
				} else if ((slave.preg === 0) && isFertile(slave)) {
					t.push(new SocialEffect("GenderFundamentalist", 1, "Fertile",
						`Society ${V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel*0.5 ? "strongly " : ""}approves of your keeping a slave fertile; this also supports the idea that slave women should bear babies.`));
				}
			} else {
				if (slave.hips > slave.shoulders) {
					t.push(new SocialEffect("GenderFundamentalist", 1, "Feminine figure",
						`Society <span class="green">approves</span> of keeping a slave with a feminine figure.`));
				}
			}
			if ((slave.intelligenceImplant > 15 || slave.intelligenceImplant < 0) && V.arcologies[0].FSGenderFundamentalistLawBimbo === 1) {
				t.push(new SocialEffect("GenderFundamentalist", -1, "Educated woman",
					`Society <span class="red">disapproves</span> of encouraging a woman's education.`));
			}
			if ((slave.devotion <= 95) && canPenetrate(slave)) {
				t.push(new SocialEffect("GenderFundamentalist", -1, "Can penetrate, not worshipful",
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s stiff, unrestrained dick, since ${he} isn't even worshipful of you.`));
			}
		}

		function repopRacialPregnancy() {
			if (V.arcologies[0].FSSubjugationist !== "unset" && (slave.race === V.arcologies[0].FSSubjugationistRace)) {
				t.push(new SocialEffect("RepopulationFocus", 0, "Undesirable race (Subjugationist)",
					`They just wish it wasn't ${V.arcologies[0].FSSubjugationistRace}, of course.`));
			} else if (V.arcologies[0].FSSupremacist !== "unset" && (slave.race === V.arcologies[0].FSSupremacistRace)) {
				t.push(new SocialEffect("RepopulationFocus", 0, "Desirable race (Supremacist)",
					`The fact that ${he} is ${V.arcologies[0].FSSupremacistRace} only makes it better.`));
			}
		}

		if (V.arcologies[0].FSRepopulationFocus !== "unset") {
			if (slave.preg > slave.pregData.normalBirth/1.33) {
				if (slave.pregType >= 20) {
					t.push(new SocialEffect("RepopulationFocus", 5, "Broodmother",
						`Society is <span class="green">very pleased</span> at ${slave.slaveName}'s dedication to pregnancy.`));
				} else if (slave.pregType >= 10) {
					t.push(new SocialEffect("RepopulationFocus", 3, "Large multiple pregnancy",
						`Society is <span class="green">pleased</span> by ${slave.slaveName}'s abnormally large pregnancy.`));
				} else {
					t.push(new SocialEffect("RepopulationFocus", 2, "Advanced pregnancy",
						`Society is <span class="green">pleased</span> by ${slave.slaveName}'s advanced pregnancy.`));
				}
				repopRacialPregnancy();
			} else if (slave.weight > 130) {
				let r = [];
				r.push(`${slave.slaveName} is so fat, society just assumes there is a baby somewhere in there, though they wish it was more obvious.`);
				if (slave.pregWeek < 0) {
					r.push(`But fortunately for ${him}, word of ${his} recent birth has gotten around <span class="green">reassuring the masses</span> that ${he} can still bear children.`);
					t.push(new SocialEffect("RepopulationFocus", 2, "Fat recent mother", r.join(" ")));
				} else if (slave.collar === "preg biometrics") {
					if (slave.preg > 0) {
						r.push(`Their wish is granted by ${slave.slaveName}'s collar revealing ${his} womb's secret${slave.pregType > 1 ? 's' : ''} even when ${his} body is trying its best to keep ${slave.pregType > 1 ? "them" : "it"} hidden.`);
						t.push(new SocialEffect("RepopulationFocus", 2, "Fat pregnancy", r.join(" ")));
						repopRacialPregnancy();
					} else if (slave.preg <= 0) {
						r.push(`<span class="red">The illusion is shattered</span> by ${slave.slaveName}'s collar revealing ${his} vacant womb.`);
						t.push(new SocialEffect("RepopulationFocus", -2, "Fat but not pregnant", r.join(" ")));
					}
				}
			} else if (slave.bellyPreg >= 1500) {
				t.push(new SocialEffect("RepopulationFocus", 1, "Obviously pregnant",
					`Society is <span class="green">pleased</span> by ${slave.slaveName}'s pregnancy.`));
				repopRacialPregnancy();
			} else if (V.arcologies[0].FSSubjugationist !== "unset" && (slave.race === V.arcologies[0].FSSubjugationistRace) && slave.bellyImplant >= 1500) {
				t.push(new SocialEffect("", 0.1, "Belly implant for inferior race (Repopulation Focus)",
					`Society <span class="green">is satisfied</span> with ${slave.slaveName}'s implant filled belly since ${his} kind really shouldn't be breeding.`));
			} else if (slave.bellyImplant >= 1500 && ((slave.ovaries === 0 && slave.mpreg === 0) || slave.preg < -1)) {
				t.push(new SocialEffect("", 0.1, "Belly implant for infertile slave (Repopulation Focus)",
					`Society <span class="green">accepts</span> ${slave.slaveName}'s implant filled belly due to ${his} infertility.`));
			} else if (slave.collar === "preg biometrics" && slave.preg > 0) {
				t.push(new SocialEffect("RepopulationFocus", 1, "Pregnancy biometrics",
					`Society is pleased by ${slave.slaveName}'s collar revealing ${his} womb's secret${slave.pregType > 1 ? 's' : ''} even when ${his} body is trying its best to keep ${slave.pregType > 1 ? "them" : "it"} hidden.`));
				repopRacialPregnancy();
			} else if (slave.pregWeek < 0) {
				t.push(new SocialEffect("RepopulationFocus", 2, "Recently gave birth",
					`Society is <span class="green">pleased</span> by ${slave.slaveName}'s recent birth.`));
			} else if (setup.fakeBellies.includes(slave.bellyAccessory)) {
				t.push(new SocialEffect("", 0.01, "Fake belly (Repopulation Focus)",
					`Society is <span class="green">placated</span> by ${slave.slaveName}'s fake belly.`));
			} else if (V.arcologies[0].FSSubjugationist !== "unset" && (slave.race === V.arcologies[0].FSSubjugationistRace)) {
				t.push(new SocialEffect("RepopulationFocus", 0, "Not pregnant but inferior race (Subjugationist)",
					`Society is perfectly fine with ${slave.slaveName} not reproducing. ${His} belly is still unattractively small, however.`));
			} else if ((slave.ovaries === 0 && slave.mpreg === 0) || (slave.preg < -1) || (slave.pubertyXX === 0)) {
				t.push(new SocialEffect("RepopulationFocus", -1, "Unable to become pregnant",
					`Society is <span class="red">mildly disappointed</span> that ${slave.slaveName} is unable to become pregnant.`));
			} else if (slave.preg === -1) {
				t.push(new SocialEffect("RepopulationFocus", -2, "On contraceptives",
					`Society is <span class="red">disapproving</span> of ${slave.slaveName}'s contraceptive regimen.`));
			} else {
				t.push(new SocialEffect("RepopulationFocus", -2, "Not visibly pregnant",
					`Society is <span class="red">disapproving</span> of ${slave.slaveName}'s lack of a baby bump.`));
			}
			if (slave.abortionTat > 0) {
				t.push(new SocialEffect("RepopulationFocus", -1, "Abortion tattoos",
					`Society <span class="red">is disgusted</span> by the tally of aborted children adorning ${his} skin.`));
			}
			if (slave.birthsTat > 0) {
				t.push(new SocialEffect("RepopulationFocus", 1, "Birth tattoos",
					`Society <span class="green">is pleased</span> by the tally of successful births adorning ${his} skin.`));
			}
		} else if (V.arcologies[0].FSRepopulationFocusPregPolicy === 1) {
			if (slave.preg > 30) {
				t.push(new SocialEffect("", 1, "Advanced pregnancy (Repopulation Policy)",
					`Society <span class="green">loves</span> ${slave.slaveName}'s advanced pregnancy. It's very trendy.`));
			} else if (slave.bellyPreg >= 1500) {
				t.push(new SocialEffect("", 0.5, "Big pregnant belly (Repopulation Policy)",
					`Society <span class="green">enjoys</span> ${slave.slaveName}'s pregnancy. Being heavy with child is in right now.`));
			}
		} else if (V.arcologies[0].FSRestart !== "unset") {
			if (slave.chastityVagina) {
				t.push(new SocialEffect("Eugenics", 1, "Vaginal chastity",
					`Society is <span class="green">mildly pleased</span> at you keeping ${his} vagina in check.`));
			}
			if (slave.chastityPenis) {
				t.push(new SocialEffect("Eugenics", 1, "Penile chastity",
					`Society is <span class="green">mildly pleased</span> at you keeping ${his} dick in check.`));
			}
			if (slave.breedingMark === 1 && V.propOutcome === 1) {
				if (slave.pregKnown === 1 && (slave.pregSource === -1 || slave.pregSource === -6)) {
					let r = [];
					r.push(`The Societal Elite <span class="green">are pleased</span> `);
					if (slave.pregSource === -1) {
						r.push(`your`);
					} else if (slave.pregSource === -6) {
						r.push(`an Elite`);
					}
					r.push(`child${slave.pregType > 1 ? 'ren are' : ' is'} growing within ${him}. The mark covering ${his} lower belly, coupled with ${his} gravidity and blessing, enamors your populace.`);
					V.failedElite -= (5 + slave.pregType);
					t.push(new SocialEffect("Eugenics", 3, "Breeder arrying elite baby", r.join(' ')));
					if (slave.abortionTat > 0) {
						r = [];
						r.push(`The `);
						if (slave.abortionTat > 1) {
							r.push(`tally of aborted children`);
						} else {
							r.push(`tattoo marking an aborted child`);
						}
						r.push(`adorning ${his} middle <span class="red">is worrying,</span> however.`);
						t.push(new SocialEffect("Eugenics", 3, "Elite breeder abortion tattoo", r.join(' ')));
					}
				}
			} else {
				if (slave.preg > slave.pregData.normalBirth/1.33) {
					if (slave.pregType >= 10) {
						t.push(new SocialEffect("Eugenics", -10, "Broodmother carrying unapproved babies",
							`Society is <span class="red">furious</span> at ${slave.slaveName}'s infested womb.`));
					} else if (slave.pregType >= 4) {
						t.push(new SocialEffect("Eugenics", -5, "Unapproved advanced multiple pregnancy",
							`Society is <span class="red">disgusted</span> by ${slave.slaveName}'s abnormally large pregnancy.`));
					} else {
						t.push(new SocialEffect("Eugenics", -3, "Unapproved advanced pregnancy",
							`Society is <span class="red">greatly displeased</span> by ${slave.slaveName}'s advanced pregnancy.`));
					}
				} else if (slave.bellyPreg >= 1500) {
					t.push(new SocialEffect("Eugenics", -2, "Visible unapproved pregnancy",
						`Society is <span class="red">very displeased</span> by ${slave.slaveName}'s pregnancy.`));
				} else if ((slave.preg < -1) && (slave.vagina > -1)) {
					t.push(new SocialEffect("Eugenics", 2, "Not fertile",
						`Society is <span class="green">pleased</span> that ${slave.slaveName} is unable to become pregnant.`));
				}
				if (slave.abortionTat > 0) {
					t.push(new SocialEffect("Eugenics", 1, "Abortion tattoos",
						`The tally of aborted pregnancies adorning ${his} middle shows <span class="green">just how responsible</span> of an owner ${he} has.`));
				}
				if (slave.pregKnown === 1 && V.eugenicsFullControl !== 1) {
					t.push(new SocialEffect("Eugenics", 0, "Unapproved pregnancy (ELITE WARNING)",
						`The Societal Elite judge you for keeping pregnant slaves. It falls to the slaveowner to deal with subhuman pregnancies and you are failing in your duties as a member of the Elite.`));
					V.failedElite += (5 + slave.pregType);
				}
			}
			if (slave.balls > 0 && slave.pubertyXY === 1 && slave.vasectomy === 0) {
				t.push(new SocialEffect("Eugenics", -slave.balls, "Working testicles",
					`Society <span class="red">disapproves</span> of ${his} working testicles.`));
			} else if (slave.dick > 0 && slave.balls > 0 && slave.vasectomy === 1) {
				t.push(new SocialEffect("Eugenics", 1, "Vasectomy",
					`Society <span class="green">approves</span> of ${his} vasectomy.`));
			} else if (slave.dick > 0 && slave.balls > 0 && slave.ballType === "sterile") {
				t.push(new SocialEffect("Eugenics", 1, "Sterile testicles",
					`Society <span class="green">approves</span> of ${his} useless testicles.`));
			} else if (slave.dick > 0 && slave.balls === 0) {
				t.push(new SocialEffect("Eugenics", 2, "Castrated",
					`Society <span class="green">approves</span> of ${his} lack of testicles.`));
			}
		}
		if (V.arcologies[0].FSRepopulationFocusMilfPolicy === 1 && slave.counter.birthsTotal > 0) {
			t.push(new SocialEffect("", 1, "MILF Policy",
				`Society <span class="green">loves</span> MILFs and as a mother, ${slave.slaveName} fits right in.`));
		}

		if (V.arcologies[0].FSPaternalist !== "unset") {
			if ((slave.geneMods.NCS > 0) && (slave.visualAge <= V.potencyAge) && (slave.physicalAge >= V.potencyAge)) {
				t.push(new SocialEffect("Paternalist", 1, "NCS Youthening",
					`Society <span class="green">approves</span> of you keeping ${slave.slaveName} perpetually young and innocent looking so you can keep taking care of ${him}; this advances paternalistic ideals.`));
			} else if ((slave.intelligenceImplant >= 15) && (slave.fetish !== "mindbroken")) {
				t.push(new SocialEffect("Paternalist", 1, "Educated",
					`Society <span class="green">approves</span> of ${slave.slaveName} being properly educated; this advances ideas about slave improvement.`));
			}
			if (slave.fetish !== "mindbroken") {
				if (slave.intelligenceImplant <= -15) {
					t.push(new SocialEffect("Paternalist", -2, "Miseducated",
						`Society <span class="red">is appalled</span> by ${slave.slaveName}'s twisted education; it goes against paternalistic values.`));
				} else if ((V.arcologies[0].FSGenderFundamentalistLawBimbo !== 1 && V.arcologies[0].FSIntellectualDependency === "unset") && (slave.intelligenceImplant < 15)) {
					if ((slave.assignment !== "learn in the schoolroom") && (slave.assignment !== "take classes")) {
						t.push(new SocialEffect("Paternalist", -1, "Uneducated",
							`Society <span class="red">disapproves</span> of ${slave.slaveName} being uneducated; this holds back ideas about slave improvement.`));
					}
				}
			}
			if (slave.health.condition > 80) {
				t.push(new SocialEffect("Paternalist", 1, "Healthy",
					`Society <span class="green">approves</span> of ${his} shining health; this advances belief in a slaveowner's duty.`));
			}
			if (slave.devotion+slave.trust > 180) {
				if (slave.relationship === -3) {
					t.push(new SocialEffect("Paternalist", 5, `Happy slave ${wife}`,
						`Society <span class="green">approves very strongly</span> of ${his} happiness as your ${wife}; this advances paternalistic ideals.`));
				} else if ((slave.relationship === -2)) {
					t.push(new SocialEffect("Paternalist", 2, `Happy and emotionally bonded`,
						`Society <span class="green">strongly approves</span> of ${his} emotional bond to you; this advances paternalistic ideals.`));
				} else {
					t.push(new SocialEffect("Paternalist", 1, `Devoted and trusting`,
						`Society <span class="green">approves</span> of ${his} attachment to you; this advances paternalistic ideals.`));
				}
			} else {
				if (slave.devotion > 95) {
					t.push(new SocialEffect("Paternalist", 1, `Worshipful`,
						`Society <span class="green">approves</span> of ${his} attachment to you; this advances paternalistic ideals.`));
				}
				if (slave.trust > 95) {
					t.push(new SocialEffect("Paternalist", 1, `Completely trusting`,
						`Society <span class="green">approves</span> of ${his} trust in you; this advances paternalistic ideals.`));
				}
			}
			if (slave.choosesOwnAssignment === 1) {
				t.push(new SocialEffect("Paternalist", 1, `Choosing own assignment`,
					`Society <span class="green">approves</span> of ${slave.slaveName} being allowed to choose ${his} own job, advancing ideals about slave self-actualization.`));
			}
			if (slave.relationship === -3) {
				if (slave.fetish === "mindbroken") {
					t.push(new SocialEffect("Paternalist", 1, `Mindbroken, married`,
						`Society is mixed over your marriage to the mindbroken ${girl}; on one hand ${he} had no consent, but on the other, you <span class="green">surely must love ${him}</span> to marry ${him}.`));
				} else if ((slave.devotion <= 20)) {
					t.push(new SocialEffect("Paternalist", -3, `Forced marriage`,
						`Society is <span class="red">thoroughly disgusted</span> that you took ${his} hand in marriage by force.`));
				}
			}
			if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) {
				t.push(new SocialEffect("Paternalist", -1, `Body mods`,
					`Society <span class="red">disapproves</span> of ${his} degrading body modifications, which dulls the public interest in letting slaves choose their own appearance.`));
			}
			if (slave.fuckdoll > 0) {
				t.push(new SocialEffect("Paternalist", -2, `Fuckdoll`,
					`Society <span class="red">strongly disapproves</span> of your owning a Fuckdoll.`));
			} else if (!canWalk(slave) && canMove(slave) && slave.rules.mobility !== "permissive") {
				t.push(new SocialEffect("Paternalist", -1, `Lack of mobility`,
					`Society <span class="red">disapproves</span> that you are forcing ${him} to crawl instead of aiding ${his} mobility.`));
			}
		} else if (V.arcologies[0].FSDegradationist !== "unset") {
			if (slave.fetish === "mindbroken") {
				t.push(new SocialEffect("Degradationist", -1, `Mindbroken`,
					`Society <span class="green">approves</span> of ${his} broken spirit; ${he} serves as an example of a soulless fuckpuppet.`));
			} else {
				if (slave.trust <= 4) {
					t.push(new SocialEffect("Degradationist", 1, `Fearful`,
						`Society <span class="green">approves</span> of ${slave.slaveName}'s fear of you.`));
				} else {
					if (slave.assignment === Job.HEADGIRL) {
						t.push(new SocialEffect("Degradationist", 0, `Trusting headgirl`,
							`Society accepts ${slave.slaveName} trusting you, since ${he} is your Head Girl and keeps the other slaves down.`));
					} else if (slave.assignment === Job.RECRUITER) {
						t.push(new SocialEffect("Degradationist", 0, `Trusting recruited`,
							`Society accepts ${slave.slaveName} trusting you, since ${he} is your Recruiter and entraps new slaves.`));
					} else if (slave.devotion > 95) {
						t.push(new SocialEffect("Degradationist", 0, `Trusting worshipful`,
							`Society reluctantly accepts of ${slave.slaveName} trusting you, since ${he} is worshipful of you.`));
					} else {
						t.push(new SocialEffect("Degradationist", -1, `Trusting without cause`,
							`Society <span class="red">disapproves</span> of ${slave.slaveName} being trusting of you; ${he} is not being properly degraded for ${his} role.`));
					}
				}
				if (slave.intelligenceImplant <= -15) {
					t.push(new SocialEffect("Degradationist", 1, `Miseducated`,
						`Society <span class="reputation.inc">is amused</span> by ${slave.slaveName}'s education and how much it hinders critical thought.`));
				}
			}
			if ((slave.assignment === Job.GLORYHOLE) || (slave.assignment === Job.ARCADE)) {
				t.push(new SocialEffect("Degradationist", 1, `Restrained for sex`,
					`Society <span class="green">approves</span> of how ${he} is restrained for involuntary use, seeing this as the future of sexual relations.`));
			}
			if (modScore.total > 15 || (modScore.piercing > 8 && modScore.tat > 5)) {
				t.push(new SocialEffect("Degradationist", 1, `Heavily modified`,
					`Society <span class="green">approves</span> of ${his} many body modifications, which advances the public taste for such degradation of slave bodies.`));
			}
			if (slave.abortionTat > 0 && V.arcologies[0].FSRepopulationFocus === "unset") {
				t.push(new SocialEffect("Degradationist", V.arcologies[0].FSRestart !== "unset" ? 2 : 1, `Abortion tattoos`,
					`Society <span class="green">${V.arcologies[0].FSRestart !== "unset" ? "greatly " : ""}approves</span> of ${his} tally of aborted children.`));
			}
			if (slave.voice !== 0) {
				if (slave.lips > 95) {
					t.push(new SocialEffect("Degradationist", 1, `Facepussy`,
						`Society <span class="green">approves</span> of the way ${his} mouth, with its useless ability to speak, has been replaced with an appealing hole.`));
				}
			}
			if (slave.choosesOwnAssignment === 1) {
				t.push(new SocialEffect("Degradationist", -1, `Choosing own assignment`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName} being allowed to choose ${his} own job; this holds back ideas about slave degradation.`));
			}
			if (slave.fuckdoll > 0) {
				t.push(new SocialEffect("Degradationist", 1, `Fuckdoll`,
					`Society <span class="green">approves</span> of your owning a Fuckdoll.`));
			} else if (!canWalk(slave) && canMove(slave) && slave.rules.mobility === "restrictive") {
				t.push(new SocialEffect("Degradationist", 1, `Lack of mobility`,
					`Society <span class="green">approves</span> that ${he} is forced to crawl like the dog ${he} is.`));
			}
		}

		if (!(jQuery.isEmptyObject(slave.scar))) {
			let hasScar = 0;
			for (const scarPlace in slave.scar) {
				for (const scarType in slave.scar[scarPlace]) {
					if (scarType === "exotic") {
						continue; // exotic scars don't count
					} else {
						if (V.arcologies[0].FSDegradationist !== "unset") {
							t.push(new SocialEffect("Degradationist", 1, `Scarred`,
								`Society <span class="green">mildly approves</span> of your slave's scarring; this encourages the further abuse of slaves.`));
						} else if (V.arcologies[0].FSPaternalist !== "unset") {
							t.push(new SocialEffect("Paternalist", -1, `Scarred`,
								`Society <span class="red">mildly disapproves</span> of your scarred slaves, viewing them as a sign of mistreatment.`));
						}
						hasScar = 1;
						break;
					}
				}
				if (hasScar) {
					break;
				}
			}
		}

		if (V.arcologies[0].FSIntellectualDependency !== "unset") {
			if (V.arcologies[0].FSIntellectualDependencyLawBeauty === 1) {
				if (bimboScore(slave) === 6) {
					t.push(new SocialEffect("IntellectualDependency", 1, `Perfect bimbo`,
						`Society <span class="green">is delighted</span> by ${slave.slaveName}'s perfect bimbo appearance.`));
				}
			}
			if (slave.intelligence+slave.intelligenceImplant < -10) {
				t.push(new SocialEffect("IntellectualDependency", 1, `Dimwitted`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s dimwitted mind; this supports the idea that slaves should be entirely dependent on their owner.`));
			} else if ([Job.HEADGIRL, Job.ATTENDANT, Job.FARMER, Job.MADAM, Job.MATRON, Job.NURSE, Job.TEACHER, Job.STEWARD, Job.BODYGUARD].includes(slave.assignment)) {
				t.push(new SocialEffect("IntellectualDependency", 0, `Intelligence required by job`,
					`Society understands the value of intelligence in ${his} appointed position and is willing to overlook it.`));
			} else if ((slave.intelligence+slave.intelligenceImplant > 10)) {
				t.push(new SocialEffect("IntellectualDependency", -1, `Too smart`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s sharp mind; this holds back acceptance of the idea that slaves should be dumb and dependent.`));
			}
			if (slave.energy > 95) {
				t.push(new SocialEffect("IntellectualDependency", 1, `Nymphomania`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s bottomless lust, showing the public one more way a slave may be reliant on ${his} owner.`));
			} else if ((slave.energy <= 60)) {
				t.push(new SocialEffect("IntellectualDependency", -1, `Low libido`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s restrained libido; to the public, this gives ${him} too much freedom to focus on things other than sex.`));
			}
		} else if (V.arcologies[0].FSSlaveProfessionalism !== "unset") {
			if (slave.intelligence+slave.intelligenceImplant > 95) {
				t.push(new SocialEffect("SlaveProfessionalism", 1, `Brilliant`,
					`Society <span class="green">strongly approves</span> of ${slave.slaveName}'s brilliance; ${his} sharp wit is the foundation of slave perfectionism.`));
			} else if (slave.intelligenceImplant >= 30) {
				t.push(new SocialEffect("SlaveProfessionalism", 1, `Highly educated`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s advanced education; this advances ideas about crafting the perfect slave.`));
			} else if (slave.intelligenceImplant <= -15) {
				t.push(new SocialEffect("SlaveProfessionalism", -3, `Miseducated`,
					`Society <span class="red">is appalled</span> by ${slave.slaveName}'s twisted education; why someone would do this is beyond them.`));
			} else if (slave.intelligence < -10 && slave.intelligenceImplant < 15) {
				t.push(new SocialEffect("SlaveProfessionalism", -2, `Slow and uneducated`,
					`Society <span class="red">frowns</span> upon keeping a slave as slow as ${slave.slaveName}; the lack of an attempt to correct this sets a bad example for other owners.`));
			}
			if (slave.accent > 1 && canTalk(slave) && (slave.rules.speech !== "restrictive" || (slave.rules.speech === "restrictive" && slave.devotion < 20 && slave.trust >= -20))) {
				t.push(new SocialEffect("SlaveProfessionalism", -2, `Can't speak ${V.language} or be silent`,
					`Society <span class="red">dislikes</span> ${slave.slaveName}'s inability to properly speak ${V.language} or hold ${his} tongue; allowing such a flaw hinders the notion of professional slavery.`));
			}
			if (slave.skill.entertainment + slave.skill.whoring + slave.skill.oral + slave.skill.anal + slave.skill.vaginal >= 400) {
				t.push(new SocialEffect("SlaveProfessionalism", 1, `Highly skilled`,
					`Society <span class="green">appreciates</span> a slave with skills of ${slave.slaveName}'s caliber.`));
			}
			if (slave.energy <= 40 && slave.devotion > 50) {
				t.push(new SocialEffect("SlaveProfessionalism", 1, `Clearminded (low libido or devoted)`,
					`Society <span class="green">approves</span> of a ${girl} with a clear mind like ${slave.slaveName}; ${he} can pour all ${his} efforts into ${his} lover's pleasure without being lost in ${his} own.`));
			}
		}

		if (V.arcologies[0].FSBodyPurist !== "unset") {
			if ((slave.boobsImplant === 0) && (slave.buttImplant === 0) && (slave.lipsImplant === 0) && (slave.bellyImplant === -1)) {
				t.push(new SocialEffect("BodyPurist", 1, `No implants`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s natural body; this supports the fashion for surgically untouched slaves.`));
			} else {
				t.push(new SocialEffect("BodyPurist", -1, `Implants`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s implants; this holds back acceptance of the idea that slaves should be all-natural.`));
			}
			if (slave.corsetPiercing === 0 && modScore.piercing < 3 && modScore.tat < 2) {
				t.push(new SocialEffect("BodyPurist", 1, `Minimal piercings/tats`,
					`Society <span class="green">approves</span> of ${his} unmarked, unblemished skin, advancing the fashion for unspoiled slaves.`));
			}
			if ((slave.earShape !== "normal" && slave.earShape !== "damaged") || slave.earT !== "none") {
				t.push(new SocialEffect("BodyPurist", -1, `Inhuman ears`,
					`Society finds ${his} inhuman ears <span class="red">appalling.</span>`));
			}
			if (slave.horn !== "none" || slave.tail !== "none") {
				t.push(new SocialEffect("BodyPurist", -1, `Inhuman tail or horns`,
					`Society <span class="red">is disgusted</span> by ${his} inhuman attributes.`));
			}
			if (slave.faceImplant <= 5 && slave.race === slave.origRace) {
				t.push(new SocialEffect("BodyPurist", 1, `Unaltered`,
					`Society <span class="green">approves</span> of ${his} natural, untouched appearance, advancing the fashion for unaltered slaves.`));
			} else {
				t.push(new SocialEffect("BodyPurist", -2, `Surgically altered`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s surgical beautification; this holds back acceptance of the idea that a natural slave is a beautiful slave.`));
			}
			if (slave.fuckdoll === 0) {
				if (slave.vagina === 0 && slave.anus === 0 && slave.counter.vaginal === 0 && slave.counter.anal === 0) {
					t.push(new SocialEffect("BodyPurist", 3, `Total virgin`,
						`Society <span class="green">strongly approves</span> of ${his} intact holes, idolizing ${his} pristine body.`));
				} else if (slave.vagina === 0 && slave.counter.vaginal === 0) {
					t.push(new SocialEffect("BodyPurist", 1, `Vaginal virgin`,
						`Society <span class="green">approves</span> of ${his} intact hymen, advancing ideals of pure, fresh slaves.`));
				} else if (slave.anus === 0 && slave.counter.anal === 0) {
					t.push(new SocialEffect("BodyPurist", 1, `Anal virgin`,
						`Society <span class="green">approves</span> of ${his} intact anus, advancing ideals of pure, fresh slaves.`));
				}
			}
		} else if (V.arcologies[0].FSTransformationFetishist !== "unset") {
			let transformed = 0;
			if ((slave.boobsImplant > 0) && (slave.buttImplant > 0) && (slave.lipsImplant > 0)) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Implants`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s thoroughly modified body; this supports the fashion for surgically upgraded slaves.`));
				transformed++;
			}
			if ((slave.lipsImplant/slave.lips >= .50) || (slave.buttImplant/slave.butt >= .50 && slave.butt >= 6) || (slave.buttImplant/slave.butt >= .25 && slave.butt >= 3) || (slave.boobsImplant/slave.boobs >= .75 && slave.boobs >= 10000) || (slave.boobsImplant/slave.boobs >= .50 && slave.boobs >= 2000) || (slave.boobsImplant/slave.boobs >= .25 && slave.boobs >= 1000) || (slave.boobsImplant/slave.boobs >= .10 && slave.boobs >= 400)) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Big implants`,
					`Society <span class="green">approves</span> of ${his} obvious implants.`));
				transformed++;
			}
			if (slave.bellyImplant >= 1500) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Big belly implant`,
					`Society <span class="green">mildly approves</span> of ${slave.slaveName}'s belly bulging implant; this supports interest in more unusual implantations.`));
				transformed++;
			}
			if (isAmputee(slave) || (slave.waist < -95) || (slave.teeth === "pointy") || (slave.teeth === "fangs") || (slave.teeth === "removable") || (slave.hips === 3 && slave.hipsImplant > 0)) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Extreme surgery`,
					`Society <span class="green">approves</span> of ${his} extreme surgeries; interest in ${him} stirs interest in transformations of all kinds.`));
				transformed++;
			}
			if (slave.faceImplant > 30 || slave.race !== slave.origRace) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Surgically improved`,
					`Society <span class="green">approves</span> of ${his} surgically improved appearance; this supports the fashion for surgical corrections.`));
				transformed++;
			}
			if (slave.faceImplant > 95 && slave.face > 40) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Uncannily beautiful face`,
					`Society approves of ${his} beautiful face, considering it's uncanny nature a boon rather than a fault; this supports the belief that there is no such thing as too much surgery.`));
				transformed++;
			}
			let addons = [];
			if (hasAnyProstheticLimbs(slave)) {
				addons.push("limbs");
			}
			if (slave.earT !== "none") {
				addons.push("ears");
			}
			if (slave.horn !== "none") {
				addons.push("horns");
			}
			if (slave.tail !== "none") {
				addons.push("tail");
			}
			if (addons.length > 0) {
				t.push(new SocialEffect("TransformationFetishist", Math.min(addons.length, 2), `Transhuman addons`,
					`Society <span class="green">strongly approves</span> of ${his} transhuman ${arrayToSentence(addons)}.`));
				transformed += addons.length;
			}
			if (slave.dick > 8) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Giant dick`,
					`Society <span class="green">approves</span> of ${his} monolithic dick, since it's such an obvious transformation masterpiece.`));
				transformed++;
			}
			if (slave.lips > 95) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Facepussy`,
					`Society <span class="green">approves</span> of ${his} absurd facepussy as a transformation of ${his} mouth into nothing more than another fuckhole.`));
				transformed++;
			}
			if (slave.nipples === "fuckable") {
				t.push(new SocialEffect("TransformationFetishist", 1, `Fuckable nipples`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s fuckable nipples; this supports interest in more unusual body modifications.`));
				transformed++;
			}
			if (slave.fuckdoll > 0) {
				t.push(new SocialEffect("TransformationFetishist", 1, `Fuckdoll`,
					`Society <span class="green">approves</span> of your owning a Fuckdoll.`));
				transformed += 5; // total transformation
			}
			if (transformed === 0) {
				t.push(new SocialEffect("TransformationFetishist", -2, `Totally unmodified`,
					`Society <span class="red">strongly disapproves</span> of ${slave.slaveName}'s complete lack of any obvious transformations; ${he} does not advance the ideal of body modification.`));
			} else if (transformed === 1) {
				t.push(new SocialEffect("TransformationFetishist", -1, `Too few modifications`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s mostly-natural appearance; more transformations would help advance the ideal of body modification.`));
			}
		}

		if (V.arcologies[0].FSSlimnessEnthusiast !== "unset") {
			if (isSlim(slave)) {
				t.push(new SocialEffect("SlimnessEnthusiast", 1, `Slim`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s graceful, girlish form; ${he} furthers the fashion for slaves like ${him}.`));
			}
			let unslim = [];
			if (slave.boobs > 400) {
				unslim.push("tits");
			}
			if (slave.butt > 4) {
				unslim.push("ass");
			}
			if (unslim.length > 0) {
				t.push(new SocialEffect("SlimnessEnthusiast", -1, `Big tits/ass`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s boorishly large ${arrayToSentence(unslim)}; ${he} damages the fashion for slender slaves.`));
			}
		} else if (V.arcologies[0].FSAssetExpansionist !== "unset") {
			let assets = 0;
			if (slave.geneMods.NCS > 0) {
				t.push(new SocialEffect("AssetExpansionist", -2, `NCS Youthening`,
					`Society <span class="green">strongly disapproves </span> of ${slave.slaveName} who can't get bigger; ${his} shrinking body hurts the fashion for Asset expansion.`));
				assets++;
			}
			if (slave.boobs > 2000) {
				t.push(new SocialEffect("AssetExpansionist", 1, `Titanic tits`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s huge tits; ${his} breasts further the fashion for bouncing boobs on slaves.`));
				assets++;
			}
			if (slave.butt > 7) {
				t.push(new SocialEffect("AssetExpansionist", 1, `Big butt`,
					`Society <span class="green">approves</span> of ${his} massive ass; ${his} butt furthers the fashion for big behinds on slaves.`));
				assets++;
			}
			if (slave.dick > 8) {
				t.push(new SocialEffect("AssetExpansionist", Math.ceil(slave.dick/10), `Massive member`,
					`Society <span class="green">approves</span> of ${his} massive member, which might be nonfunctional, but is a wonder of expansionism.`));
				assets++;
			} else if (slave.dick >= 6) {
				t.push(new SocialEffect("AssetExpansionist", 1, `Prodigious penis`,
					`Society <span class="green">approves</span> of ${his} enormous penis; ${his} cock furthers the fashion for dangling dicks on slaves.`));
				assets++;
			}
			if (slave.balls > 6) {
				t.push(new SocialEffect("AssetExpansionist", 1, `Tremendous testicles`,
					`Society <span class="green">approves</span> of ${his} swinging balls; ${his} nuts further the fashion for tremendous testicles on slaves.`));
				assets++;
			}
			if (slave.lips > 95) {
				t.push(new SocialEffect("AssetExpansionist", 1, `Luscious lips`,
					`Society <span class="green">approves</span> of ${his} expanded lips.`));
				assets++;
			}
			if (assets === 0) {
				t.push(new SocialEffect("AssetExpansionist", -1, `Unexceptional assets`,
					`Society <span class="red">is disappointed</span> by ${his} normal-sized (or even petite, by expansionist standards) assets.`));
			}
		}

		if (V.arcologies[0].FSPastoralist !== "unset") {
			if (slave.lactation > 0) {
				t.push(new SocialEffect("Pastoralist", 1, `Lactating`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s milky udders; the sight of ${his} creamy milk encourages the public taste for dairy straight from the nipple.`));
			}
			if ((slave.assignment === Job.MILKED || slave.assignment === Job.DAIRY) && (slave.balls > 0)) {
				t.push(new SocialEffect("Pastoralist", 1, `Cockmilked`,
					`Society <span class="green">approves</span> of how ${slave.slaveName} gets cockmilked; the sight of ${his} product encourages experimentation with cum-based concoctions.`));
			}
		}

		if (V.arcologies[0].FSPhysicalIdealist !== "unset") {
			if (V.arcologies[0].FSPhysicalIdealistLaw === 1) {
				if (slave.muscles > 50) {
					t.push(new SocialEffect("PhysicalIdealist", 1, `Overmuscled (Fit Feminine)`,
						`Society <span class="green">approves</span> of ${slave.slaveName}'s commitment to fitness; but thinks ${his} muscles are too big and vascular.`));
				} else if ((slave.muscles > 20)) {
					t.push(new SocialEffect("PhysicalIdealist", 2, `Fit (Fit Feminine)`,
						`Society <span class="green">strongly approves</span> of ${slave.slaveName}'s fit body; physical enthusiasts see ${him} as the optimal example of feminine fitness.`));
				} else if ((slave.muscles > 5)) {
					t.push(new SocialEffect("PhysicalIdealist", 1, `Toned (Fit Feminine)`,
						`Society <span class="green">approves</span> of ${slave.slaveName}'s toned form; the public sees potential in those guns.`));
				}
			} else {
				if (slave.muscles > 95) {
					t.push(new SocialEffect("PhysicalIdealist", 2, `Bodybuilder`,
						`Society <span class="green">strongly approves</span> of ${slave.slaveName}'s glorious muscles; everyone wants to train a slave to look as swole as ${him}.`));
				} else if ((slave.muscles > 30)) {
					t.push(new SocialEffect("PhysicalIdealist", 1, `Fit`,
						`Society <span class="green">approves</span> of ${slave.slaveName}'s fit body; physical enthusiasts see ${him} as on ${his} way to something great.`));
				} else if ((slave.muscles > 5)) {
					t.push(new SocialEffect("PhysicalIdealist", 1, `Toned`,
						`Society <span class="green">approves</span> of ${slave.slaveName}'s toned form; the public sees potential in those guns.`));
				}
			}
			if (slave.muscles < -30) {
				t.push(new SocialEffect("PhysicalIdealist", -1, `Frail`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s frail state; ${he} needs to build some muscles if ${he}'s going to help the public idolize fitness.`));
			}
			if (slave.height >= 185) {
				t.push(new SocialEffect("PhysicalIdealist", 1, `Tall`,
					`Society <span class="green">approves</span> of how tall ${he} is; the sexual advantages of ${his} height are impressed on the public mind.`));
			}
			if (slave.health.condition > 80) {
				t.push(new SocialEffect("PhysicalIdealist", 1, `Healthy`,
					`Society <span class="green">approves</span> of ${his} health; the expectation that slaves should be kept perfectly healthy grows.`));
			}
		} else if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
			if (slave.weight > 160) {
				t.push(new SocialEffect("Hedonistic", 3, `Obese`,
					`Society <span class="green">strongly approves</span> of ${slave.slaveName}'s glorious rolls; everyone wants to own a pillowy slave like ${him}.`));
			} else if (slave.weight > 95) {
				t.push(new SocialEffect("Hedonistic", 2, `Voluptuous`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s fat body; it shows just how much luxurious your life must be to pamper a slave as much as ${him}.`));
			} else if (slave.weight > 30) {
				t.push(new SocialEffect("Hedonistic", 1, `Chubby`,
					`Society <span class="green">approves</span> of ${slave.slaveName}'s chubby form; the public enjoys the sight of a well rounded slave.`));
			} else if (slave.weight < -30) {
				t.push(new SocialEffect("Hedonistic", -1, `Skin and bones`,
					`Society <span class="red">disapproves</span> of ${slave.slaveName}'s emaciated state; let the poor ${girl} eat, for goodness' sake!`));
			}
			if (slave.muscles < -30) {
				t.push(new SocialEffect("Hedonistic", 1, `Soft and weak`,
					`Society <span class="green">approves</span> of how soft ${he} is; the sexual advantages of being able to effortlessly overpower ${him} are not lost on them.`));
			}
			if (slave.fetishStrength > 95) {
				t.push(new SocialEffect("Hedonistic", 1, `Intense fetish`,
					`Society <span class="green">approves</span> of ${his} intense fetish; the expectation that everyone's deepest desires should be fulfilled grows.`));
			}
			// paraphiliaSatisfied is set in saLongTermMentalEffects.js
			if (App.EndWeek.saVars.paraphiliaSatisfied > 0) {
				t.push(new SocialEffect("Hedonistic", 1, `Satisfied paraphilia`,
					`Society <span class="green">is pleased</span> that ${he} is allowed to fully indulge ${his} paraphilia.`));
			} else if (App.EndWeek.saVars.paraphiliaSatisfied < 0) {
				t.push(new SocialEffect("Hedonistic", -2, `Unsatisfied paraphilia`,
					`Society <span class="red">frowns</span> upon ${him} not being allowed to indulge in ${his} paraphilia.`));
			}
		}

		if (V.arcologies[0].FSChattelReligionist !== "unset") {
			if (["cruel retirement counter", "tight steel", "uncomfortable leather"].includes(slave.collar)) {
				t.push(new SocialEffect("ChattelReligionist", 1, `Punishing collar`,
					`Society approves of ${slave.slaveName}'s collar as an expression of the old ideal of mortification of the flesh, advancing the combination of religious originalism and modern slavery.`));
			}
			if (["a burqa", "a chattel habit", "a fallen nuns habit", "a hijab and abaya", "a niqab and abaya", "a penitent nuns habit", "a succubus outfit"].includes(slave.clothes)) {
				t.push(new SocialEffect("ChattelReligionist", 1, `Religious clothing`,
					`Society <span class="green">approves</span> of ${his} religiously themed clothing, strengthening the connection between sexual servitude and faith.`));
			} else if (["a bunny outfit", "a hijab and blouse", "a huipil", "a kimono", "a military uniform", "a nice maid outfit", "a nice nurse outfit", "a skimpy loincloth", "a slutty qipao", "a toga", "body oil", "chains", "conservative clothing", "nice business attire", "no clothing", "shibari ropes", "uncomfortable straps"].includes(slave.clothes)) {
				t.push(new SocialEffect("ChattelReligionist", 0, `Spartan clothing`,
					`Society accepts ${his} spartan clothing, seeing it as permissible under the new religious mores.`));
			} else if (slave.fuckdoll === 0) {
				t.push(new SocialEffect("ChattelReligionist", -1, `Extravagant clothing`,
					`Society <span class="red">disapproves</span> of ${his} unnecessarily gaudy attire; this slows acceptance of a link between faith and sexual servitude.`));
			}
			if (slave.devotion > 95) {
				t.push(new SocialEffect("ChattelReligionist", 1, `Worshipful`,
					`Society <span class="green">approves</span> of ${his} devotion to you as a companion to religious devotion, seeing both as the model for holy slaves.`));
			}
			if (slave.trust > 95) {
				t.push(new SocialEffect("ChattelReligionist", 2, `Completely trusting`,
					`Society <span class="green">strongly approves</span> of ${his} faith in you as a companion to faith in God, seeing both as the model for righteous slaves of the future.`));
			}
			if (slave.behavioralFlaw === "devout") {
				t.push(new SocialEffect("ChattelReligionist", 0, `Devout`,
					`Society does not disapprove of ${his} devout adherence to an old world faith, having confidence that you'll bring ${him} around, and looking forward to seeing ${him} converted into a holy sex object.`));
			} else if ((slave.behavioralQuirk === "sinful")) {
				t.push(new SocialEffect("ChattelReligionist", 2, `Sinful`,
					`Society <span class="green">strongly approves</span> of ${his} eagerness to transgress against the old world religious mores ${he} once held dear.`));
			}
			if (slave.shouldersTat === "sacrilege" && slave.lipsTat === "sacrilege" && slave.boobsTat === "sacrilege" && slave.armsTat === "sacrilege" && slave.backTat === "sacrilege" && slave.stampTat === "sacrilege" && slave.buttTat === "sacrilege" && slave.vaginaTat === "sacrilege" && slave.dickTat === "sacrilege" && slave.anusTat === "sacrilege" && slave.legsTat === "sacrilege" && slave.fuckdoll === 0) {
				t.push(new SocialEffect("ChattelReligionist", 1, `Sacrilegious tattoos`,
					`Society <span class="green">enjoys the sight</span> of the religious sacrilege scrawled across ${his} skin.`));
			}
		}

		return t;
	}

	function makeShelterGirlEffects() {
		let t = [];
		if (slave.fuckdoll === 0) {
			if (slave.fetish !== "mindbroken") {
				if (isShelterSlave(slave)) {
					if ([Job.CLUB, Job.PUBLIC, Job.WHORE, Job.BROTHEL].includes(slave.assignment)) {
						if ((slave.trust > 20) && (slave.health.condition > 40)) {
							if (V.arcologies[0].FSPaternalist !== "unset") {
								t.push(new SocialEffect("Paternalist", 2, "Happy shelter girl",
									`Society <span class="green">strongly approves</span> of how you've brought a shelter ${girl} health and happiness.`, true));
							} else if (V.arcologies[0].FSDegradationist === "unset") {
								t.push(new SocialEffect(null, 1, "Happy shelter girl",
									`The public knows ${he}'s a shelter ${girl} you took in, and is <span class="green">touched</span> that ${he} now seems happy and healthy.`, true));
							}
						}
					}
				}
			}
		}
		return t;
	}

	function applySocialEffects() {
		function applyFacilityCredit(value) {
			switch (slave.assignment) {
				case Job.BROTHEL:
					getSlaveStatisticData(slave, V.facility.brothel).rep += value;
					break;
				/* TODO: presumably more go here? */
			}
		}

		for (const effect of socialEffects) {
			if (effect.FS) { // combined rep & FS
				const repChange = FutureSocieties.Change(effect.FS, effect.magnitude, App.EndWeek.saVars.pornFameBonus);
				if (effect.creditFacility) {
					applyFacilityCredit(repChange);
				}
			} else { // rep only
				repX(V.FSSingleSlaveRep * effect.magnitude, "futureSocieties" /* really? */, slave);
				if (effect.creditFacility) {
					applyFacilityCredit(V.FSSingleSlaveRep * effect.magnitude);
				}
			}
		}
	}

	function renderTooltip() {
		let el = document.createDocumentFragment();
		let domLine, domCell;
		for (const effect of socialEffects) {
			domLine = document.createElement('div');
			domLine.style.display = "float";
			domCell = document.createElement('span');
			domCell.style.float = "left";
			domCell.style.width = "3em";

			let text = "";
			if (Math.round(effect.magnitude) === 0) {
				text = '0';
				domCell.className = "gray";
			} else if (effect.magnitude > 0) {
				for (let i = 0; i < effect.magnitude; ++i) {
					text += "+";
				}
				domCell.className = "green";
			} else if (effect.magnitude < 0) {
				for (let i = 0; i > effect.magnitude; --i) {
					text += "-";
				}
				domCell.className = "red";
			}
			domCell.append(text);
			domLine.append(domCell);

			domLine.append(effect.shortDesc);
			if (effect.FS) {
				domLine.append(` (${effect.FS})`);
			}
			el.appendChild(domLine);
		}
		return el;
	}

	function displayCompressed() {
		const positiveSum = socialEffects.filter(e => e.magnitude > 0).reduce((acc, cur) => acc += cur.magnitude, 0);
		const negativeSum = socialEffects.filter(e => e.magnitude < 0).reduce((acc, cur) => acc += cur.magnitude, 0);

		const sumFrag = document.createDocumentFragment();
		sumFrag.append(`(`);
		App.UI.DOM.appendNewElement("span", sumFrag, '+' + positiveSum.toString(), positiveSum > 0 ? "green" : "gray");
		sumFrag.append(`/`);
		App.UI.DOM.appendNewElement("span", sumFrag, '-' + Math.abs(negativeSum).toString(), negativeSum < 0 ? "red" : "gray"); // literal '-' + Math.abs needed to handle 0 case
		sumFrag.append(`)`);

		const sum = positiveSum + negativeSum;
		frag.append(`Society has a `);
		if (sum > 0) {
			const details = new App.UI.DOM.InteractiveDetails("positive", renderTooltip, ["green", "major-link", "underline"]);
			frag.append(details.render(), ` overall view of ${slave.slaveName} `, sumFrag, `, which improves your reputation and advances social progress.`);
		} else if (sum === 0) {
			const details = new App.UI.DOM.InteractiveDetails("neutral", renderTooltip, ["yellow", "major-link", "underline"]);
			frag.append(details.render(), ` overall view of ${slave.slaveName} `, sumFrag, `; ${he} had no net impact on your reputation or social progress this week.`);
		} else {
			const details = new App.UI.DOM.InteractiveDetails("negative", renderTooltip, ["red", "major-link", "underline"]);
			frag.append(details.render(), ` overall view of ${slave.slaveName} `, sumFrag, `, which decreases your reputation and retards social progress.`);
		}
	}

	function displayLong() {
		$(frag).append(socialEffects.map(e => e.longDesc).join(" "));
	}

	const frag = document.createDocumentFragment();

	let socialEffects = [];
	if (V.FSAnnounced > 0) {
		App.EndWeek.saVars.pornFameBonus = 1; // TODO: once the slave part of saVars is properly reinitialized for every slave, delete this line.
		if (V.studio === 1) {
			if (slave.porn.viewerCount > 0) {
				App.EndWeek.saVars.pornFameBonus += (Math.ceil(slave.porn.viewerCount/100000));
				if (slave.porn.viewerCount >= 100000) {
					frag.append(`${His} near-ubiquitous presence in arcology pornography greatly increases ${his} impact on society. `);
				} else if ((slave.porn.viewerCount >= 10000)) {
					frag.append(`${His} presence in arcology pornography increases ${his} impact on society. `);
				} else {
					frag.append(`${His} occasional presence in arcology pornography slightly increases ${his} impact on society. `);
				}
			}
		}
		socialEffects.push(...makeSocialEffects());
	}
	socialEffects.push(...makeShelterGirlEffects());
	if (socialEffects.length > 0) {
		applySocialEffects();
		if (!V.UI.compressSocialEffects) {
			displayLong();
		} else {
			displayCompressed();
		}
	}

	return frag;
};

repo_name: Welptard/fc

license: mit


code:
/**
 * @param {App.Entity.SlaveState} slave
 * @returns {string}
 */
App.SlaveAssignment.stayConfined = function(slave) {
	/* eslint-disable no-unused-vars*/
	const {
		he, him, his, hers, himself, boy,
		He, His
	} = getPronouns(slave);
	/* eslint-enable */

	let t = "";

	if (slave.fetish !== "mindbroken") {
		if (slave.devotion < -50) {
			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. ${He} still hates ${his} place in the world, but being forced to rely on slave life as ${his} only human contact grinds down ${his} resistance.`;
			slave.devotion += 2;
		} else if (slave.devotion <= 20) {
			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. With nothing to do but look forward to the next time ${he}'s let out to serve, ${he} begins to rely on servitude.`;
			slave.devotion += 1;
		} else if (slave.devotion <= 50) {
			t += `accepts solitary confinement whenever ${he} is not being forced to do something else. Since ${he} is obedient, the mental torture neither breaks ${him} further nor causes ${him} to hate you.`;
		} else {
			t += `accepts solitary confinement whenever ${he} is not being forced to do something else. ${He} spends ${his} time wondering hopelessly how ${he} has failed you, damaging ${his} devotion to you.`;
			slave.devotion -= 2;
		}

		if (slave.trust < -50) {
			t += ` ${He} is so terrified of you that this confinement does not make ${him} fear you any more.`;
		} else if (slave.trust < -20) {
			t += ` ${He} is already afraid of you, but this confinement makes ${him} <span class="trust dec">fear you even more.</span>`;
			slave.trust -= 2;
		} else if (slave.trust <= 20) {
			t += ` This confinement makes ${him} <span class="trust dec">fear your power</span> over ${him}.`;
			slave.trust -= 4;
		} else {
			t += ` This confinement makes ${him} <span class="trust dec">trust you less,</span> and fear you more.`;
			slave.trust -= 5;
		}

		if (slave.assignment === Job.CELLBLOCK) {
			if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs") || (slave.hears === -2)) {
				t += ` ${His} hearing impairment spares ${him} the sounds of ${his} peers getting punished, lightening the impact of ${his} imprisonment.`;
			}
		}

		if (slave.health.illness > 0) {
			t += ` ${He} is<span class="red">`;
			if (slave.health.illness === 1) {
				t += ` feeling under the weather`;
			} else if (slave.health.illness === 2) {
				t += ` somewhat ill`;
			} else if (slave.health.illness === 3) {
				t += ` sick`;
			} else if (slave.health.illness === 4) {
				t += ` very sick`;
			} else if (slave.health.illness === 5) {
				t += ` terribly ill`;
			}
			t += `,</span> so ${his} misery only grows.`;
		}
		if (slave.assignment === Job.CELLBLOCK && V.WardenessID !== 0) {
			t += ` The stress of confinement <span class="red">damages ${his} health.</span> ${S.Wardeness.slaveName}`;
			if (S.Wardeness.fetish === "mindbroken") {
				if (slave.health.tired > 80) {
					t += `'s empty mind often overlooks ${him} when ${he} falls inert from exhaustion, giving ${him} <span class="green">a much needed chance to rest.</span>`;
				} else {
					t += `'s empty mind is void of mercy; This broken Wardeness sees <span class="red">no need for breaks nor rest.</span>`;
				}
			} else if (S.Wardeness.sexualQuirk === "caring") {
				t += ` is too caring and has to focus on not coddling ${him}.`;
			} else if (S.Wardeness.sexualFlaw === "malicious" || S.Wardeness.sexualFlaw === "abusive") {
				if (slave.health.condition > 20) {
					t += ` enjoys <span class="red">depriving ${him} of sleep and watching ${him} succumb to fatigue.</span>`;
				} else if (slave.health.tired > 80) {
					t += ` knows better than to let ${him} become dangerously exhausted in ${his} condition.`;
				} else {
					t += ` enjoys <span class="red">depriving ${him} of sleep,</span> leaving ${him} vulnerable.`;
				}
			} else if (slave.health.tired > 50) {
				t += ` allots ${him} <span class="green">time to sleep</span> in an effort to prevent exhaustion from interrupting ${his} efforts.`;
			} else if (slave.health.tired <= 30) {
				t += ` welcomes ${him} to ${V.cellblockName} by <span class="yellow">denying ${him} sleep</span> until ${he} is nice and pliable.`;
			} else {
				t += ` makes sure to <span class="yellow">deny ${him} sleep</span> to keep ${him} pliable.`;
			}
		} else {
			t += ` The stress of confinement <span class="red">damages ${his} health`;
			if (slave.health.tired > 30) {
				t += `,</span> but the isolation gives ${his} tired body a chance to rest.`;
			} else {
				t += `.</span>`;
			}
		}
		healthDamage(slave, 10);
	} else {
		t += `is oblivious to ${his} confinement.`;
	}
	tired(slave);

	if (slave.assignment === Job.CELLBLOCK && V.WardenessID !== 0) {
		if ((S.Wardeness.sexualFlaw === "malicious" || S.Wardeness.sexualFlaw === "abusive" || S.Wardeness.sexualFlaw === "breast growth") && slave.lactation === 1 && slave.lactationDuration === 0) {
			t += ` ${S.Wardeness.slaveName} `;
			if (S.Wardeness.sexualFlaw === "malicious") {
				t += `savors the torment brought about by ${his} milk-bloated chest and makes sure to milk ${him} thoroughly every other week to maximize ${his} suffering.`;
			} else if (S.Wardeness.sexualFlaw === "abusive") {
				t += `enjoys neglecting ${his} milk-bloated chest until it gets big and painfully swollen; only then does the abusive jail-keeper roughly drain ${his} sensitive mounds.`;
			} else if (S.Wardeness.sexualFlaw === "breast growth") {
				t += `loves watching ${his} breasts steadily swell with pent-up milk and only milks ${him} in order to reset the process.`;
			}
		}
	}

	if (slave.sentence !== 0) {
		t += ` ${He} has ${slave.sentence}`;
		if (slave.sentence === 1) {
			t += ` week remaining.`;
		} else {
			t += ` weeks remaining.`;
		}
	} else if (slave.devotion > 20 || (slave.devotion >= -20 && slave.trust < -20) || (slave.devotion >= -50 && slave.trust < -50) || slave.fetish === "mindbroken") {
		if (slave.fetish === "mindbroken") {
			t += ` ${His} broken mind hinges entirely on other's guidance,`;
		} else {
			t += ` ${He} is now willing to <span class="devotion accept">do as ${he}'s told,</span>`;
		}

		t += ` <span class="noteworthy">`;
		if (slave.assignment === Job.CELLBLOCK) {
			State.temporary.brokenSlaves++;
		}
		if (V.assignmentRecords[slave.ID]) {
			let oldJob = V.assignmentRecords[slave.ID];
			assignJobSafely(slave, oldJob);
			if (slave.choosesOwnAssignment === 1) {
				t += ` and ${he} is resting before choosing another task.`;
			} else if (slave.assignment === Job.REST) {
				if (oldJob !== Job.REST) {
					t += ` and since ${he} was unable to return to ${his} old task to ${oldJob}, ${his} assignment has defaulted to rest.`;
				} else {
					t += ` so ${he} has returned to rest.`;
				}
			} else {
				t += ` so ${he} goes back to ${oldJob}.`;
			}
		} else {
			t += ` so ${his} assignment has defaulted to rest.`;
			removeJob(slave, slave.assignment);
		}

		t += `</span>`;
	}
	return t;
};