/* eslint-disable camelcase */
/**
 * @param {string} [market="kidnappers"]
 * @param {number} [numArcology=1] Defaults to 1 (V.arcologies[1]) since it refers to neighboring arcology, and V.arcologies[0] is the player's arcology.
 * @returns {{text:string, slave:Object}}
 */
globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1) {
	let r = ``;
	let sisterAge;
	let minHeight;
	let criminal;
	let pronounsGenerated = false;
	let pronoun;
	let opinion;
	let slave;
	let SGProp = {};

	switch (market) {
		case "corporate": {
			if (V.corp.SpecAge === 1) {
				r += `Teenage slaves are strongly favored for training. `;
				SGProp.minAge = V.minimumSlaveAge;
				SGProp.maxAge = 19;
			} else if (V.corp.SpecAge === 3) {
				r += `Newly enslaved MILFs are strongly favored for training. `;
				if (V.pedo_mode === 1) {
					SGProp.minAge = 24;
					SGProp.maxAge = V.retirementAge-1;
				} else {
					SGProp.minAge = 36;
					SGProp.maxAge = V.retirementAge-1;
				}
			} else {
				r += `Promising slaves are trained without special sorting based on age. `;
			}
			SGProp.ageOverridesPedoMode = 1;
			if (V.corp.SpecRaces.length > 0) {
				SGProp.race = jsEither(V.corp.SpecRaces);
			}
			if (V.corp.SpecNationality) {
				SGProp.nationality = V.corp.SpecNationality;
				r += `The corporation only takes slaves that are ${V.corp.SpecNationality}. `;
			}

			// Generate slaves. Modify fixed before this. Do not modify activeSlave before this.
			if (V.corp.SpecGender === 1) {
				r += `Slaves without pussies are not trained. `;
				slave = GenerateNewSlave("XX", SGProp);
			} else if (V.corp.SpecGender === 2) {
				r += `Slaves without dicks are not trained. `;
				slave = GenerateNewSlave("XY", SGProp);
			} else {
				r += `Slaves are passed to training regardless of whether they have dicks or pussies. `;
				slave = GenerateNewSlave("", SGProp);
			}


			slave.origin = "$He was enslaved and trained by your corporation.";
			slave.devotion = jsRandom(-30, 0);
			slave.trust = jsRandom(-45, -25);
			setHealth(slave, jsRandom(25, 50), Math.max(normalRandInt(0, 4), 0), Math.max(normalRandInt(0, 4), 0), Math.max(normalRandInt(0, 0.5), 0), jsRandom(10, 40));
			if (V.corp.SpecDevotion > 0) {
				slave.devotion = jsRandom(-120, -90) + V.corp.SpecDevotion * 30;
				if (V.corp.SpecDevotion === 1) {
					r += `It does everything it can to make trainees furious. `;
				} else if (V.corp.SpecDevotion === 2) {
					r += `It makes no effort to tame trainees. `;
				} else if (V.corp.SpecDevotion === 4) {
					r += `It focuses on selecting trainees predisposed towards obedience. `;
				} else if (V.corp.SpecDevotion === 5) {
					r += `It focuses on selecting trainees predisposed towards devotion to their owner. `;
				}
			} else {
				r += `It does not select trainees based on their initial feelings about slavery. `;
			}
			if (V.corp.SpecIntelligence === 3) {
				r += `Intelligent slaves have a high priority for training. `;
				slave.intelligence = Intelligence.random({limitIntelligence: [30, 100]});
			} else if (V.corp.SpecIntelligence === 1) {
				r += `Stupid slaves have a high priority for training. `;
				slave.intelligence = Intelligence.random({limitIntelligence: [-100, -30]});
			} else {
				r += `Slaves' intelligence is not given special consideration. `;
			}
			if (V.corp.SpecRaces.length === 0 || V.corp.SpecRaces.length === 12) {
				r += `There is no racial element to trainee selection. `;
			} else if (V.corp.SpecRaces.length === 1) {
				r += `The corporation specializes in ${V.corp.SpecRaces[0]} slaves. `;
			} else {
				r += `The corporation selects slaves based on race. `; /* getting into the specifics of which races exactly is a hellhole I'd rather not jump into*/
			}
			if (V.corp.SpecTrust > 0) {
				slave.trust = jsRandom(-105, -85) + V.corp.SpecTrust * 20;
				if (V.corp.SpecTrust === 1) {
					r += `The corporation applies extremely brutal slave breaking techniques, uncontrollable sobbing and bloodcurdling screams are heard around the clock. `;
				} else if (V.corp.SpecTrust === 2) {
					r += `The corporation applies brutal slave breaking techniques. `;
				} else if (V.corp.SpecTrust === 4) {
					r += `The corporation applies caring slave breaking techniques. `;
				} else {
					r += `The corporation applies surprisingly caring slave breaking techniques that sometimes convince refugees and similar downtrodden people that slavery is a step up for them. `;
				}
			} else {
				r += `The corporation applies standard slave breaking techniques. `;
			}
			if (V.corp.SpecHeight > 0) {
				slave.height = Math.trunc(Height.random(slave, {limitMult: [V.corp.SpecHeight - 4, V.corp.SpecHeight - 2]}));
				if (V.corp.SpecHeight === 1) {
					r += `The corporation specifically targets very short slaves. `;
				} else if (V.corp.SpecHeight === 2) {
					r += `The corporation targets short slaves. `;
				} else if (V.corp.SpecHeight === 4) {
					r += `The corporation targets tall slaves. `;
				} else if (V.corp.SpecHeight === 5) {
					r += `The corporation specifically targets incredibly tall slaves. `;
				}
			}
			if (V.corp.SpecVirgin === 1) {
				r += `The corporation ensures its slaves are virgins. `;
				slave.anus = 0;
				if (slave.vagina > 0) {
					slave.vagina = 0;
				}
			}
			if (V.corp.SpecWeight > 0) {
				slave.weight = jsRandom(-85 + V.corp.SpecWeight * 20, -65 + V.corp.SpecWeight * 30);
				if (V.corp.SpecWeight === 1) {
					r += `Trainees are practically starved through a rigorous diet. `;
				} else if (V.corp.SpecWeight === 2) {
					r += `Trainees are put on a diet to get them nice and thin. `;
				} else if (V.corp.SpecWeight === 3) {
					r += `Thin trainees are fattened up; fat trainees are slimmed down. `;
				} else if (V.corp.SpecWeight === 5) {
					r += `Trainees are fattened until they're nice and curvy. `;
				} else {
					r += `Trainees are fed as much as they can stomach. `;
				}
			} else {
				r += `Only the unhealthiest trainees are fed special diets. `;
			}
			if (V.corp.SpecMuscle > 0) {
				slave.muscles = jsRandom(-85, -65) + V.corp.SpecMuscle * 25;
				if (V.corp.SpecMuscle === 1) {
					r += `Trainees are kept physically inactive and frail. `;
				} else if (V.corp.SpecMuscle === 2) {
					r += `Trainees are kept physically weak. `;
				} else if (V.corp.SpecMuscle === 3) {
					r += `Trainees' muscles are kept soft. `;
				} else if (V.corp.SpecMuscle === 4) {
					r += `Trainees are brought up to a good state of physical fitness. `;
				} else if (V.corp.SpecMuscle === 5) {
					r += `Trainees are subjected to punishing workout routines and only sold when ripped. `;
				}
			} else {
				r += `Trainees are not subjected to any special workout routine. `;
			}
			if (V.corp.SpecAccent === 1) {
				r += `The corporation teaches its trainees the lingua franca but allows them to retain distinctive accents. `;
				slave.accent = Math.clamp(slave.accent, 0, 1);
			} else if (V.corp.SpecAccent === 2) {
				r += `The corporation teaches its trainees to speak the lingua franca without accent. `;
				slave.accent = 0;
			} else {
				r += `The corporation does not expend any special effort teaching language. `;
			}
			if (V.corp.SpecEducation > 0) {
				slave.intelligenceImplant = 15 * V.corp.SpecEducation;
				slave.skill.whoring = Math.clamp(slave.skill.whoring, 15 * V.corp.SpecEducation, 100);
				slave.skill.entertainment = Math.clamp(slave.skill.entertainment, 15 * V.corp.SpecEducation, 100);
				if (V.corp.SpecEducation === 1) {
					r += `Its slave students receive basic slave educations. `;
				} else if (V.corp.SpecEducation === 2) {
					r += `Its slave students receive advanced slave educations. `;
				}
			} else {
				r += `Its slaves are not given special educational attention. `;
			}
			if (V.corp.SpecSexEd > 0) {
				slave.skill.oral = Math.clamp(slave.skill.oral, 15 * V.corp.SpecSexEd, 100);
				if (slave.anus > 0) {
					slave.skill.anal = Math.clamp(slave.skill.anal, 15 * V.corp.SpecSexEd, 100);
				} else if (slave.anus === 0) {
					slave.skill.anal = Math.clamp(slave.skill.anal, 15, 100);
				}
				if (slave.vagina > 0) {
					slave.skill.vaginal = Math.clamp(slave.skill.vaginal, 15 * V.corp.SpecSexEd, 100);
				} else if (slave.vagina === 0) {
					slave.skill.vaginal = Math.clamp(slave.skill.vaginal, 15, 100);
				}
				if (V.corp.SpecSexEd === 1) {
					r += `Trainees spend many hours learning sexual competence. `;
				} else if (V.corp.SpecSexEd === 2) {
					r += `Trainees spend days learning sexual skills. `;
				}
			} else {
				r += `No special sexual training is applied. `;
			}
			if (V.corp.SpecCosmetics === 1) {
				r += `The corporation uses subtle cosmetic surgery to improve its slaves for sale. `;
				if ((slave.anus > 3)) {
					slave.anus = 3;
					if (slave.skill.anal > 10) {
						slave.skill.anal -= 10;
					}
				}
				if (slave.vagina > 3) {
					slave.vagina = 3;
					if (slave.skill.vaginal > 10) {
						slave.skill.vaginal -= 10;
					}
				}
				if (slave.faceImplant <= 30 && slave.face <= 95) {
					if (slave.faceShape === "masculine") {
						slave.faceShape = "androgynous";
					}
					slave.faceImplant = 20;
					slave.face = Math.clamp(slave.face+20, -100, 100);
				}
				if ((slave.ageImplant !== 1) && (slave.visualAge >= 25)) {
					applyAgeImplant(slave);
				}
				if ((slave.voice === 1) && (slave.voiceImplant === 0)) {
					slave.voice += 1;
					slave.voiceImplant += 1;
				}
				slave.waist = Math.trunc(slave.waist, -100, -15);
				if (((slave.boobShape === "saggy") || (slave.boobShape === "downward-facing"))) {
					slave.boobShape = "normal";
				}
				if (((slave.boobShape === "normal") || (slave.boobShape === "wide-set"))) {
					if (slave.boobs > 800) {
						slave.boobShape = "torpedo-shaped";
					} else {
						slave.boobShape = "perky";
					}
				}
			} else {
				r += `The corporation does not use cosmetic surgery to improve its slaves for sale. `;
			}
			if (V.corp.SpecPussy === 1) {
				r += `The corporation adds pussies where needed. `;
				slave.vagina = 0;
				slave.ovaries = 1;
			} else if (V.corp.SpecPussy === -1) {
				r += `The corporation removes pussies where possible. `;
				slave.vagina = -1;
				slave.ovaries = 0;
			}
			if (V.corp.SpecDick === 1) {
				r += `The corporation adds dicks where needed. `;
				slave.dick = 2;
				slave.prostate = 1;
			} else if (V.corp.SpecDick === -1) {
				r += `The corporation removes dicks where possible. `;
				slave.dick = 0;
				slave.prostate = 0;
			}
			if (V.corp.SpecBalls === 1 && slave.dick > 0) {
				r += `The corporation adds balls where needed. `;
				slave.balls = 2;
				slave.scrotum = 2;
			} else if (V.corp.SpecBalls === -1) {
				r += `The corporation removes balls where possible. `;
				slave.balls = 0;
				slave.scrotum = 0;
			}
			if (typeof V.corp.SpecPussy === "undefined" && typeof V.corp.SpecDick === "undefined" && typeof V.corp.SpecBalls === "undefined") {
				r += `The corporation does not reconfigure slave genitalia. `;
			}
			if (V.corp.SpecHormones === 1) {
				r += `It applies almost universal female hormone therapy. `;
				if ((slave.dick > 0)) {
					slave.dick = Math.clamp(slave.dick-1, 1, 6);
				}
				if ((slave.balls > 0)) {
					slave.balls = Math.clamp(slave.balls-1, 1, 6);
				}
				if ((slave.clit > 0)) {
					slave.clit = Math.clamp(slave.clit-1, 0, 3);
				}
				if ((slave.voice < 3) && (slave.voice > 0)) {
					slave.voice = Math.clamp(slave.voice+1, 1, 3);
				}
				if ((slave.vagina > -1) && (slave.ovaries !== 0) && (slave.vaginaLube < 2)) {
					slave.vaginaLube = Math.clamp(slave.vaginaLube+1, 0, 2);
				}
				if (((slave.butt-slave.buttImplant) < 2)) {
					slave.butt = Math.clamp(slave.butt+1, 0, 10);
				}
				if (((slave.boobs-slave.boobsImplant) < 500)) {
					slave.boobs = Math.clamp(slave.boobs+400, 0, 10000);
				}
				if (slave.face <= 95) {
					slave.face = Math.clamp(slave.face+20, -100, 100);
				}
				if ((slave.faceShape === "masculine")) {
					slave.faceShape = "androgynous";
				} else if ((slave.faceShape === "androgynous")) {
					slave.faceShape = "normal";
				}
				if ((slave.physicalAge < 25)) {
					slave.shoulders = Math.clamp(slave.shoulders-1, -2, 2);
					slave.hips = Math.clamp(slave.hips+1, -2, 2);
				}
				if ((slave.muscles > 30) && (slave.diet !== "muscle building") && (V.generalUpgradeMuscle !== "toned") && (V.generalUpgradeMuscle !== "ripped")) {
					slave.muscles = Math.clamp(slave.muscles-10, 0, 30);
				}
				if ((slave.nipples === "tiny")) {
					slave.nipples = "cute";
				}
				if ((slave.height > 180)) {
					slave.height -= jsRandom(3, 6);
				}
				slave.devotion += jsRandom(5, 10);
				slave.trust += jsRandom(5, 10);
				slave.attrXY = Math.clamp(slave.attrXY+jsRandom(5, 10), 0, 100);
			} else if (V.corp.SpecHormones === 2) {
				r += `It applies almost universal male hormone therapy. `;
				if ((slave.dick > 0)) {
					slave.dick = Math.clamp(slave.dick+1, 1, 6);
				}
				if ((slave.balls > 0)) {
					slave.balls = Math.clamp(slave.balls+1, 1, 6);
				}
				if ((slave.clit > 0) && (slave.dick === 0)) {
					slave.clit = Math.clamp(slave.clit+1, 0, 3);
				}
				if ((slave.voice > 1)) {
					slave.voice = Math.clamp(slave.voice-1, 1, 3);
				}
				if ((slave.vagina > -1) && (slave.vaginaLube > 0)) {
					slave.vaginaLube = Math.clamp(slave.vaginaLube-1, 0, 2);
				}
				slave.butt = Math.clamp(slave.butt-1, 0, 10);
				slave.boobs = Math.clamp(slave.boobs-400, 0, 10000);
				if (slave.face > 10) {
					slave.face = Math.clamp(slave.face-20, -100, 100);
				}
				if (slave.faceShape === "androgynous" || slave.faceShape === "masculine" || slave.faceShape === "normal") {
					slave.faceShape = "masculine";
				} else {
					slave.faceShape = "androgynous";
				}
				if ((slave.physicalAge < 25)) {
					slave.shoulders = Math.clamp(slave.shoulders+1, -2, 2);
					slave.hips = Math.clamp(slave.hips-1, -2, 2);
				}
				if ((slave.muscles <= 95) && (slave.diet !== "slimming")) {
					slave.muscles = Math.clamp(slave.muscles+20, 0, 3);
				}
				if ((slave.nipples === "huge")) {
					slave.nipples = "cute";
				}
				if ((slave.height < 155)) {
					slave.height += jsRandom(3, 6);
				}
				slave.devotion -= jsRandom(5, 10);
				slave.trust -= jsRandom(5, 10);
				slave.attrXX = Math.clamp(slave.attrXX+jsRandom(5, 10), 0, 100);
			} else {
				r += `It does not use hormones on a systematic level. `;
			}
			if (V.corp.SpecInjection > 0) {
				if (V.corp.SpecInjection === 1) {
					r += `If anything, hormones are used to reduce asset sizes. `;
					slave.lips = jsRandom(0, 20);
					slave.butt = jsRandom(1, 2);
					slave.boobs = 10 * jsRandom(30, 60);
					slave.nipples = jsEither(["cute", "tiny"]);
					if (slave.dick > 0) {
						slave.dick = jsRandom(1, 2);
					}
					if (slave.balls > 0) {
						slave.balls = jsRandom(1, 2);
					}
				} else if (V.corp.SpecInjection === 2) {
					r += `Growth hormones are used to correct flat chests and butts. `;
					slave.lips = jsRandom(25, 45);
					slave.butt = jsRandom(3, 4);
					slave.boobs = 10 * jsRandom(70, 100);
					slave.nipples = jsEither(["cute", "partially inverted"]);
					if (slave.dick > 0) {
						slave.dick = jsRandom(3, 4);
					}
					if (slave.balls > 0) {
						slave.balls = jsRandom(3, 4);
					}
				} else if (V.corp.SpecInjection === 3) {
					r += `Growth hormones are used throughout slave training to ensure expansion. `;
					slave.lips = jsRandom(35, 55);
					slave.butt = jsRandom(4, 5);
					slave.boobs = 10 * jsRandom(120, 180);
					slave.nipples = jsEither(["cute", "partially inverted"]);
					if (slave.dick > 0) {
						slave.dick = jsRandom(4, 5);
					}
					if (slave.balls > 0) {
						slave.balls = jsRandom(4, 5);
					}
				} else if (V.corp.SpecInjection === 4) {
					r += `Advanced growth hormones are applied on a grand scale. `;
					slave.lips = jsRandom(55, 85);
					slave.butt = jsRandom(6, 8);
					slave.boobs = 100 * jsRandom(40, 60);
					slave.nipples = jsEither(["huge", "inverted"]);
					if (slave.dick > 0) {
						slave.dick = jsRandom(5, 6);
					}
					if (slave.balls > 0) {
						slave.balls = jsRandom(5, 6);
					}
				} else if (V.corp.SpecInjection === 5) {
					r += `Advanced growth hormones are applied with total focus on increasing slaves' productiveness. `;
					slave.lips = jsRandom(35, 65);
					slave.butt = jsRandom(4, 6);
					slave.boobs = 100 * jsRandom(60, 80);
					slave.nipples = jsEither(["huge", "inverted"]);
					if (slave.dick > 0) {
						slave.dick = jsRandom(6, 8);
					}
					if (slave.balls > 0) {
						slave.balls = jsRandom(5, 7);
					}
				}
			} else {
				r += `Growth hormones are not applied. `;
			}
			if (V.corp.SpecImplants === 1) {
				r += `Slaves are given tasteful breast, butt, and lip implants. `;
				slave.buttImplant = 1;
				slave.butt = Math.clamp(slave.butt+slave.buttImplant, 0, 10);
				slave.buttImplantType = "normal";
				slave.boobsImplant = 600;
				slave.boobs = Math.clamp(slave.boobs+slave.boobsImplant, 0, 10000);
				slave.boobsImplantType = "normal";
				slave.lipsImplant = 20;
				slave.lips = Math.clamp(slave.lips+slave.lipsImplant, 0, 55);
			} else if (V.corp.SpecImplants === 2) {
				r += `Slaves are given absurd breast, butt, and lip implants. `;
				slave.buttImplant = 4;
				slave.buttImplantType = "fillable";
				slave.butt = Math.clamp(slave.butt+slave.buttImplant, 0, 10);
				slave.boobsImplant = 2400;
				slave.boobsImplantType = "advanced fillable";
				slave.boobs = Math.clamp(slave.boobs+slave.boobsImplant, 0, 10000);
				slave.lipsImplant = 60;
				slave.lips = Math.clamp(slave.lipsImplant+slave.buttImplant, 0, 100);
			} else {
				r += `Slaves are not given breast, butt, or lip implants. `;
			}
			if (V.corp.SpecAmputee === 1) {
				r += `The corporation removes all limbs from its slaves. `;
				removeLimbs(slave, "all");
			}
			if (V.corp.SpecMilk === 1) {
				r += `The corporation provides naturally lactating slaves. `;
				slave.lactation = 1;
				slave.lactationDuration = 2;
				slave.lactationAdaptation = 15;
			} else if (V.corp.SpecMilk === 2) {
				r += `The corporation provides slaves with chemically induced lactation. `;
				slave.lactation = 2;
				slave.lactationDuration = 2;
			}
			break;
		}
		case "neighbor": {
			if ((numArcology < V.arcologies.length) && (numArcology > 0)) {
				market = numArcology;
			} else {
				market = 1;
			}
			opinion = App.Neighbor.opinion(0, market);
			opinion = Math.trunc(opinion/20);
			opinion = Math.clamp(opinion, -10, 10);

			if (V.arcologies[market].FSSubjugationist > 20) {
				SGProp.race = V.arcologies[market].FSSubjugationistRace;
			}
			slave = GenerateNewSlave("", SGProp);
			generatePronouns(slave);
			pronounsGenerated = true;
			pronoun = getPronouns(slave);
			slave.origin = "You bought $him from ";
			slave.origin += V.arcologies[market].name;
			slave.origin += ".";
			slave.devotion = -20 + Math.trunc(V.arcologies[market].prosperity/10) + jsRandom(0, 10);
			slave.trust = -20 + Math.trunc(V.arcologies[market].prosperity/10) + jsRandom(0, 10);
			setHealth(slave, -50 + Math.trunc(V.arcologies[market].prosperity/25) + jsRandom(0, 5), Math.max(15 - V.arcologies[market].prosperity/20 + normalRandInt(0, 2), 0), Math.max(15 - V.arcologies[market].prosperity/20 + normalRandInt(0, 2), 0), undefined, Math.max(jsRandom(10, 40) - V.arcologies[market].prosperity/15, 0));
			if (jsRandom(1, 100) < V.arcologies[market].prosperity / 10 + 50) {
				slave.health.illness = 0;
			}
			if (slave.vagina > 0) {
				slave.skill.vaginal += Math.clamp(V.arcologies[market].prosperity/2, 15, 100);
			}
			if (slave.anus > 0) {
				slave.skill.anal += Math.clamp(V.arcologies[market].prosperity/2, 15, 100);
			}
			slave.skill.oral += Math.clamp(V.arcologies[market].prosperity/2, 15, 100);
			slave.attrKnown = 1;
			slave.fetishKnown = 1;
			if (slave.accent >= 3) {
				if (V.arcologies[market].prosperity > jsRandom(0, 200)) {
					slave.accent -= 1;
				}
			}
			if (V.arcologies[market].prosperity > jsRandom(0, 200)) {
				slave.sexualFlaw = "none";
			}
			if (V.arcologies[market].prosperity > jsRandom(0, 200)) {
				slave.behavioralFlaw = "none";
			}
			if (V.arcologies[market].FSSubjugationist > 20) {
				r += `They're universally ${V.arcologies[market].FSSubjugationistRace}. `;
			}
			if (V.arcologies[market].FSYouthPreferentialist > 20) {
				r += `They're usually on the younger side. `;
				if (slave.actualAge > 30) {
					if (jsRandom(0, 1) === 0) {
						slave.actualAge = jsRandom(18, 25);
						slave.visualAge = slave.actualAge;
						slave.physicalAge = slave.actualAge;
						slave.ovaryAge = slave.actualAge;
						if (slave.boobs > 400) {
							slave.boobs -= 100*jsRandom(0, 2);
						}
						if (slave.butt > 3) {
							slave.butt -= jsRandom(0, 2);
						}
					} else if (V.arcologies[market].FSYouthPreferentialistResearch === 1) {
						if (slave.actualAge > 30) {
							r += `Well, all of them certainly look it. Always best to check their ages before buying. `;
							slave.visualAge = jsRandom(18, 25);
							slave.chem += jsRandom(10, 40);
						}
					} else {
						r += `And if they aren't, they sure don't look their age. `;
						slave.faceImplant += jsRandom(10, 30);
						applyAgeImplant(slave);
					}
				}
			} else if (V.arcologies[market].FSMaturityPreferentialist > 20) {
				r += `They're usually on the more mature side. `;
				if (slave.actualAge < 30) {
					if (jsRandom(0, 1) === 0) {
						slave.actualAge = jsRandom(36, V.retirementAge-1);
						slave.visualAge = slave.actualAge;
						slave.physicalAge = slave.actualAge;
						slave.ovaryAge = slave.actualAge;
						if (slave.boobs < 400) {
							slave.boobs += 100*jsRandom(0, 2);
						}
						if (slave.butt < 3) {
							slave.butt += jsRandom(0, 2);
						}
					}
				}
			}
			if (V.arcologies[market].FSRepopulationFocus > 50) {
				r += `They are exclusively female and all extremely pregnant. `;
				slave.genes = "XX";
				slave.ovaries = 1;
				slave.vagina = either(0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3);
				slave.dick = 0;
				slave.balls = 0;
				slave.scrotum = 0;
				if (slave.physicalAge < V.fertilityAge) {
					if (V.precociousPuberty === 0) {
						slave.physicalAge = V.fertilityAge;
						slave.visualAge = V.fertilityAge;
						slave.actualAge = V.fertilityAge;
						slave.ovaryAge = V.fertilityAge;
					}
				}
				slave.pubertyXX = 1;
				if (slave.ovaryAge >= 42) {
					/* corrects menopausal mothers */
					slave.ovaryAge = 40;
				}
				slave.preg = 0; /* removing contraception of default slave generation so isFertile can work right*/
				if (isFertile(slave)) {
					slave.vagina = jsRandom(1, 4);
					slave.preg = jsRandom(21, 39);
					if (jsRandom(1, 2) === 1 && V.seeHyperPreg === 1) {
						slave.pregType = jsRandom(3, 29);
						slave.pregAdaptation = 250;
					} else {
						slave.pregType = jsRandom(3, 8);
						slave.pregAdaptation = 100;
					}
					SetBellySize(slave);
				}
				slave.lactation = jsRandom(0, 1);
				if (slave.lactation > 0) {
					slave.lactationDuration = 2;
				}
			} else if (V.arcologies[market].FSRestart > 50) {
				r += `They have all been rendered unable to reproduce. `;
				if (slave.ovaries === 1) {
					slave.preg = -2;
					slave.belly = 0;
					slave.bellyPreg = 0;
				}
				if (slave.balls > 0) {
					slave.balls = 0;
				}
				if (V.arcologies[market].FSRestartResearch === 1) {
					r += `Smart and attractive slaves are beginning to be a rarity lately. `;
					if (slave.face >= 0) {
						slave.face -= 100;
					}
					if (slave.intelligence >= 0) {
						slave.intelligence -= 100;
					}
					slave.chem = jsRandom(40, 100);
					slave.addict = jsEither([0, 0, 0, 0, 0, 0, 0, 0, 5, 20, 20, 50, 100]);
				}
			}
			if (V.arcologies[market].FSGenderRadicalist > 50) {
				r += `They all show signs of intensive hormone therapy. `;
				slave.chem += jsRandom(10, 100);
				if (slave.dick > 0) {
					slave.boobs += 100*jsRandom(0, 4);
					slave.butt += jsRandom(0, 2);
					if (slave.hips < 2) {
						slave.hips += jsRandom(0, 1);
					}
					if (slave.shoulders > -2) {
						slave.shoulders -= jsRandom(0, 1);
					}
					if (slave.face < 80) {
						slave.face += jsRandom(0, 20);
					}
					if (slave.faceShape === "masculine") {
						if (jsRandom(0, 1) === 0) {
							slave.faceShape = "androgynous";
						}
					}
					if (slave.dick > 2) {
						slave.dick -= jsRandom(0, 2);
					}
					if (slave.balls > 2) {
						slave.balls -= jsRandom(0, 2);
					}
					if (V.arcologies[market].FSGenderRadicalistResearch === 1 && jsRandom(1, 100) <= 20) {
						r += `This one has a notably rounded belly for a slave with no vagina. `;
						slave.ovaries = 0;
						slave.vagina = -1;
						slave.mpreg = 1;
						if (isFertile(slave)) {
							slave.preg = jsRandom(1, 39);
							slave.pregType = setPregType(slave);
							SetBellySize(slave);
						}
					}
				} else {
					slave.boobs -= 100*jsRandom(0, 2);
					slave.butt -= jsRandom(0, 1);
					if (slave.hips > -2) {
						slave.hips -= jsRandom(0, 1);
					}
					if (slave.shoulders < 2) {
						slave.shoulders += jsRandom(0, 1);
					}
					if (slave.face >= -80) {
						slave.face -= jsRandom(0, 20);
					}
					if (slave.faceShape !== "androgynous") {
						if (jsRandom(0, 1) === 0) {
							slave.faceShape = "androgynous";
						}
					}
					slave.clit += jsRandom(0, 2);
					slave.labia += jsRandom(0, 1);
					if (slave.muscles <= 95) {
						slave.muscles += jsRandom(0, 20);
					}
				}
			} else if (V.arcologies[market].FSGenderFundamentalist > 50) {
				r += `Fertile slaves from there almost never appear without swollen bellies and sensitive nipples. `;
				slave.preg = 0; /* removing contraception of default slave generation so isFertile can work right*/
				if (isFertile(slave)) {
					slave.preg = jsRandom(1, 40);
					slave.pregType = setPregType(slave);
					SetBellySize(slave);
					slave.lactation = jsRandom(0, 1);
					if (slave.lactation > 0) {
						slave.lactationDuration = 2;
					}
				}
			}
			if (V.arcologies[market].FSPaternalist > 20) {
				r += `They're often gratifyingly devoted and trusting. `;
				if (slave.devotion < 10) {
					slave.devotion += jsRandom(0, 8);
				}
				if (slave.trust < 50) {
					slave.trust += jsRandom(0, 8);
				}
			} else if (V.arcologies[market].FSDegradationist > 20) {
				r += `They can be depended upon to be terrified into abject submission. `;
				DegradingName(slave);
				if (slave.trust > -10) {
					slave.trust -= jsRandom(0, 10);
				}
				if (jsRandom(1, 100) > 90) {
					// one in twenty slaves has only one blind eye.
					if (jsRandom(1, 20) > 1) {
						if (jsRandom(1, 2) === 1) {
							eyeSurgery(slave, "left", "blind");
						} else {
							eyeSurgery(slave, "right", "blind");
						}
					} else {
						eyeSurgery(slave, "blind", "blind");
					}
				}
				if (jsRandom(1, 100) > 90) {
					slave.hears = -2;
				}
				if (V.arcologies[market].FSRepopulationFocus === "unset" && V.arcologies[market].FSBodyPurist === "unset") {
					if (isFertile(slave) && jsRandom(1, 10) === 9) {
						slave.abortionTat = jsRandom(1, (Math.min(slave.physicalAge-V.fertilityAge, slave.physicalAge-V.minimumSlaveAge))*2);
					}
				}
				let i = 0;
				if (jsRandom(1, 100) > 10) {
					// tat em up
					let tattoos = ["boobsTat", "buttTat", "lipsTat", "vaginaTat", "dickTat", "anusTat", "shouldersTat", "armsTat", "legsTat", "backTat", "stampTat", "bellyTat", "abortionTat", "birthsTat"];
					let modPool = jsRandom(1, 10);
					for (i = 0; i < modPool; i++) {
						let tat = tattoos[Math.floor(Math.random() * tattoos.length)];
						slave[tat] = "degradation";
					}
				}
				if (jsRandom(1, 100) > 10) {
					// pierce em up
					let piercings = ["corsetPiercing", "nipplesPiercing", "areolaePiercing", "lipsPiercing", "tonguePiercing", "anusPiercing"];
					if (slave.dick > 0) {
						piercings.push("dickPiercing");
					}
					if (slave.vagina !== -1) {
						piercings.push("vaginaPiercing");
					}
					if ((slave.vagina !== -1) || (slave.dick !== 0)) {
						piercings.push("clitPiercing");
					}
					let modPool = jsRandom(5, 15);
					let pierce;
					for (i = 0; i < modPool; i++) {
						pierce = piercings[Math.floor(Math.random() * piercings.length)];
						if (slave[pierce] < 2) {
							slave[pierce]++;
						}
					}
				}
				if (jsRandom(1, 100) > 20) {
					// scar em up
					if (jsRandom(1, 100) > 70) {
						// They got whipped too
						App.Medicine.Modification.addScourged(slave);
					}
					let scars = ["back", "lower back", "left thigh", "right thigh"];
					let modPool = jsRandom(1, 10);
					let scar;
					for (i = 0; i < modPool; i++) {
						scar = scars[Math.floor(Math.random() * scars.length)];
						App.Medicine.Modification.addScar(slave, scar, "generic");
					}
				}
				if (jsRandom(1, 100) > 80) {
					// brand em up
					if (jsRandom(1, 100) > 50) {
						slave.brand["left buttock"] = "SLUT";
					} else {
						slave.brand["left buttock"] = "Slave";
					}
				}
			}
			if (V.arcologies[market].FSIntellectualDependency > 20) {
				r += `The only thing that rivals their idiocy is their uncontrollable libido. `;
				slave.slaveName = setup.bimboSlaveNames.random();
				if (slave.intelligence > -50) {
					slave.intelligence = Intelligence.random({limitIntelligence: [-100, -50]});
				}
				V.intelligenceImplant = 0;
				if (slave.energy < 80) {
					slave.energy = jsRandom(80, 100);
				}
			} else if (V.arcologies[market].FSSlaveProfessionalism > 20) {
				r += `They possess brilliant minds and expert training; a slave that truly knows their role in life. `;
				if (slave.intelligence <= 50) {
					slave.intelligence = Intelligence.random({limitIntelligence: [51, 100]});
				}
				V.intelligenceImplant = 30;
				if (slave.energy > 40) {
					slave.energy -= 30;
				}
				if (slave.vagina > 0) {
					slave.skill.vaginal += Math.clamp(V.arcologies[market].prosperity/2, 20, 100);
					slave.skill.vaginal = Math.clamp(slave.skill.vaginal, 50, 100);
				}
				if (slave.anus > 0) {
					slave.skill.anal += Math.clamp(V.arcologies[market].prosperity/2, 20, 100);
					slave.skill.anal = Math.clamp(slave.skill.anal, 50, 100);
				}
				slave.skill.oral += Math.clamp(V.arcologies[market].prosperity/2, 20, 100);
				slave.skill.oral = Math.clamp(slave.skill.oral, 50, 100);
				slave.skill.entertainment += Math.clamp(V.arcologies[market].prosperity/2, 20, 100);
				slave.skill.entertainment = Math.clamp(slave.skill.entertainment, 50, 100);
				slave.skill.whoring += Math.clamp(V.arcologies[market].prosperity/2, 20, 100);
				slave.skill.whoring = Math.clamp(slave.skill.whoring, 50, 100);
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.fetishKnown = 1;
				slave.attrKnown = 1;
			}
			if (V.arcologies[market].FSBodyPurist > 80) {
				r += `They're quite pristine, free of any genomic damage or addictions regardless of any transformations they've had. `;
				// clean out any changes those filthy impure degradationsts may have made
				slave.brand = {};
				slave.scar = {};
				slave.chem = 0;
				slave.addict = 0;
				slave.boobsTat = 0;
				slave.buttTat = 0;
				slave.lipsTat = 0;
				slave.vaginaTat = 0;
				slave.dickTat = 0;
				slave.anusTat = 0;
				slave.shouldersTat = 0;
				slave.armsTat = 0;
				slave.legsTat = 0;
				slave.backTat = 0;
				slave.stampTat = 0;
				slave.bellyTat = 0;
				slave.abortionTat = 0;
				slave.birthsTat = 0;
				slave.corsetPiercing = 0;
				slave.nipplesPiercing = 0;
				slave.areolaePiercing = 0;
				slave.lipsPiercing = 0;
				slave.tonguePiercing = 0;
				slave.vaginaPiercing = 0;
				slave.clitPiercing = 0;
				slave.dickPiercing = 0;
				slave.anusPiercing = 0;
			} else if (V.arcologies[market].FSTransformationFetishist > 80) {
				r += `They vary in terms of what size their implants are, not whether they have them. `;
				slave.chem += jsRandom(10, 100);
				slave.boobsImplant = 200*jsRandom(2, 20);
				if (slave.boobsImplant > 10000) {
					slave.boobsImplantType = "hyper fillable";
				} else if (slave.boobsImplant > 2200) {
					slave.boobsImplantType = jsEither(["advanced fillable", "advanced fillable", "advanced fillable", "string"]);
				} else if (slave.boobsImplant > 1000) {
					slave.boobsImplantType = jsEither(["fillable", "fillable", "normal", "string"]);
				} else {
					slave.boobsImplantType = jsEither(["normal", "normal", "normal", "string"]);
				}
				slave.boobs += slave.boobsImplant;
				slave.buttImplant = jsRandom(2, 5);
				if (slave.buttImplant > 4) {
					slave.buttImplantType = jsEither(["fillable", "fillable", "normal", "string"]);
				} else {
					slave.buttImplantType = jsEither(["normal", "normal", "normal", "string"]);
				}
				slave.butt += slave.buttImplant;
				slave.lipsImplant = jsEither([10, 20]);
				slave.lips += slave.lipsImplant;
				if (V.arcologies[market].FSTransformationFetishistResearch === 1 && jsRandom(1, 100) <= 20) {
					r += `This one's implants are unusually large; a showcase of what ${pronoun.possessive} home arcology is capable of. `;
					slave.boobsImplant += 200*jsRandom(100, 200);
					slave.boobs += slave.boobsImplant;
					slave.boobsImplantType = "hyper fillable";
					slave.buttImplant += jsRandom(7, 12);
					slave.butt += slave.buttImplant;
					slave.buttImplantType = "hyper fillable";
				}
			}
			if (V.arcologies[market].FSPetiteAdmiration > 20) {
				r += `They tend to be short, some far more than others. `;
				if (slave.height >= 160) {
					slave.height = Math.trunc(Height.random(slave, {limitMult: [-2, 0]}));
					if (slave.height >= 160) {
						slave.height = Math.trunc(Height.random(slave, {limitMult: [-3, -1]}));
						if (slave.height >= 160) {
							slave.height = jsRandom(90, 130);
							slave.geneticQuirks.dwarfism = 2;
						}
					}
				}
			} else if (V.arcologies[market].FSStatuesqueGlorification > 20) {
				r += `They tend to be tall, if not unbelievably so. `;
				if (slave.height < 170) {
					slave.height = Math.trunc(Height.random(slave, {limitMult: [0, 2]}));
					if (slave.height < 170) {
						slave.height = Math.trunc(Height.random(slave, {limitMult: [1, 3]}));
						if (slave.height < 170) {
							slave.height = jsRandom(200, 264);
							slave.geneticQuirks.gigantism = 2;
						}
					}
				}
			}
			if (V.arcologies[market].FSSlimnessEnthusiast > 20) {
				r += `They're never overweight, and are often quite lithe. `;
				if (slave.boobs > 400) {
					slave.boobs -= 100*jsRandom(0, 2);
				}
				if (slave.butt > 3) {
					slave.butt -= jsRandom(0, 2);
				}
				if (slave.weight > 10) {
					slave.weight = jsRandom(-30, 0);
				}
				if (V.arcologies[market].FSSlimnessEnthusiastResearch === 1 && jsRandom(1, 100) <= 50) {
					r += `This one is perfectly flat; an ideal showcase of ${pronoun.possessive} home arcology's tastes. `;
					slave.boobs = 100;
					slave.butt = 0;
					slave.weight = jsRandom(-30, 0);
				}
			} else if (V.arcologies[market].FSAssetExpansionist > 20) {
				r += `Their butts are usually imposing, but their tits are what's often most impressive. `;
				slave.chem += jsRandom(10, 100);
				if (slave.boobs < 5000) {
					slave.boobs += 100*jsRandom(5, 50);
				}
				if (slave.butt < 6) {
					slave.butt += jsRandom(2, 4);
				}
				if (slave.weight < -10) {
					slave.weight += jsRandom(0, 20);
				}
				if (V.arcologies[market].FSAssetExpansionistResearch === 1 && jsRandom(1, 100) <= 20) {
					r += `This one is unusually large; a showcase of what ${pronoun.possessive} home arcology is capable of. `;
					slave.boobs = 200*jsRandom(100, 200);
					slave.butt = jsRandom(10, 20);
					if (slave.dick > 0 && V.seeDicks !== 0) {
						slave.dick = jsRandom(20, 30);
						slave.balls = jsRandom(20, 125);
					}
				}
			}
			if (V.arcologies[market].FSPhysicalIdealist > 20) {
				r += `They're usually quite muscular, some to a truly imposing degree, and they're almost never unhealthy. `;
				slave.muscles = jsRandom(10, 100);
				if (slave.health.condition < 20) {
					improveCondition(slave, jsRandom(0, 8));
				}
			} else if (V.arcologies[market].FSHedonisticDecadence > 20) {
				if (V.arcologies[market].FSSlimnessEnthusiast > 20) {
					r += `They're quite soft, usually sporting a cute muffin top, and rather laid back. `;
					slave.weight = jsRandom(10, 25);
				} else {
					r += `They're usually very soft and rather laid back. `;
					slave.weight = jsRandom(30, 180);
				}
				r += `Though they often come with intense fetishes. `;
				slave.muscles = jsRandom(-50, 0);
				slave.trust += jsRandom(5, 15);
				slave.energy += jsRandom(0, 10);
				if (V.arcologies[market].FSHedonisticDecadenceResearch === 1) {
					r += `They appear to have greatly enjoyed their stay at ${V.arcologies[market].name}. `;
					slave.energy += jsRandom(0, 10);
					slave.trust += jsRandom(10, 20);
					slave.devotion += jsRandom(10, 20);
				}
				if (jsRandom(0, 3) === 0) {
					slave.behavioralFlaw = "gluttonous";
				}
				if (slave.fetish === "none") {
					slave.fetish = jsEither(["boobs", "buttslut", "cumslut", "dom", "humiliation", "masochist", "pregnancy", "sadist", "submissive"]);
				}
				slave.fetishStrength = jsRandom(60, 90);
				if (jsRandom(1, 100) <= 5 && slave.fetish !== "mindbroken") {
					switch (slave.fetish) {
						case "submissive":
							slave.sexualFlaw = "neglectful";
							break;
						case "cumslut":
							slave.sexualFlaw = "cum addict";
							break;
						case "humiliation":
							slave.sexualFlaw = "attention whore";
							break;
						case "buttslut":
							slave.sexualFlaw = "anal addict";
							break;
						case "boobs":
							slave.sexualFlaw = "breast growth";
							break;
						case "pregnancy":
							slave.sexualFlaw = "breeder";
							break;
						case "dom":
							slave.sexualFlaw = "abusive";
							break;
						case "sadist":
							slave.sexualFlaw = "malicious";
							break;
						case "masochist":
							slave.sexualFlaw = "self hating";
					}
					slave.fetishStrength = 100;
				}
			}
			if (V.arcologies[market].FSPastoralist > 20) {
				r += `Lactation is nearly universal among them, sometimes in ludicrous quantities. They tend to have huge udders, as well. `;
				slave.chem += jsRandom(10, 100);
				if (slave.boobs < 5000) {
					slave.boobs += 100*jsRandom(5, 50);
				}
				if (slave.lactation === 0) {
					slave.lactation = jsEither([0, 1, 1, 1, 1, 2]);
				}
				if (slave.lactation > 0) {
					slave.lactationDuration = 2;
				}
				if (slave.weight < -10) {
					slave.weight += jsRandom(0, 20);
				}
			} else if (V.arcologies[market].FSCummunism > 20) {
				r += `Big balls and huge loads are commonplace among them, even if they sometimes lack dicks. They tend to be hard workers, as well. `;
				slave.chem += jsRandom(10, 100);
				if (V.arcologies[market].FSRestart > 50) {
					slave.dick = 0;
					slave.vagina = -1;
				}
				if (slave.balls < 20) {
					slave.balls += jsRandom(5, 20);
				}
				slave.scrotum = slave.balls-5;
				slave.prostate = jsEither([1, 1, 1, 2, 2, 3]);
				if (slave.muscles < 30) {
					slave.muscles += jsRandom(0, 20);
				}
			}
			if (V.arcologies[market].FSChattelReligionist > 20) {
				r += `They're rarely anything but devoted, and sometimes present interesting peccadilloes. `;
				slave.slaveName = setup.chattelReligionistSlaveNames.random();
				if (slave.devotion < 10) {
					slave.devotion += jsRandom(0, 10);
				}
				if (slave.devotion < 10) {
					slave.devotion += jsRandom(0, 10);
				}
				if (jsRandom(0, 1) === 0) {
					slave.behavioralQuirk = "sinful";
				}
			}
			if (V.arcologies[market].FSRomanRevivalist > 20) {
				r += `They've often `;
				if (!canSee(slave)) {
					r += `been party to`;
				} else {
					r += `seen`;
				}
				r += ` things that drive any squeamishness out of them. `;
				slave.slaveName = setup.romanSlaveNames.random();
				if (jsRandom(0, 1) === 0) {
					slave.sexualQuirk = "unflinching";
				}
			} else if (V.arcologies[market].FSAztecRevivalist > 20) {
				r += `They've seen sights that will traumatize almost anyone`;
				if (!canSee(slave)) {
					r += ", so to speak. ";
				} else {
					r += ". ";
				}
				slave.slaveName = setup.aztecSlaveNames.random();
				if (jsRandom(0, 1) === 0) {
					slave.trust = -30;
				}
			} else if (V.arcologies[market].FSEgyptianRevivalist > 20) {
				r += `They've often done things that give them a distinct appetite for perversion. `;
				slave.slaveName = setup.ancientEgyptianSlaveNames.random();
				if (jsRandom(0, 1) === 0) {
					slave.sexualQuirk = "perverted";
				}
			} else if (V.arcologies[market].FSEdoRevivalist > 20) {
				r += `They have frequently absorbed much culture there. `;
				slave.slaveName = setup.edoSlaveNames.random();
				slave.skill.entertainment = Math.clamp(slave.skill.entertainment, 35, 100);
			} else if (V.arcologies[market].FSArabianRevivalist > 20) {
				r += `They've often been part of large harems in which selflessness is prized. `;
				if (jsRandom(0, 1) === 0) {
					slave.sexualQuirk = "caring";
				}
			} else if (V.arcologies[market].FSChineseRevivalist > 20) {
				r += `They've all passed through a thorough and uncompromising educational system for slaves. `;
				slave.intelligenceImplant = 30;
				if (V.arcologies[market].FSIntellectualDependency === "unset") {
					if (slave.intelligence < 60) {
						slave.intelligence += jsRandom(0, 20);
					}
				}
			}
			if (V.arcologies[market].FSIncestFetishist > 20) {
				r += `Incest is acceptable, if not preferable to them. `;
				if (slave.sexualQuirk === "none" && slave.behavioralQuirk === "none") {
					if (jsRandom(0, 1) === 0) {
						slave.sexualQuirk = "perverted";
					} else {
						slave.behavioralQuirk = "sinful";
					}
				} else if (slave.sexualQuirk === "none" || slave.sexualQuirk === "perverted") {
					slave.sexualQuirk = "perverted";
				} else {
					slave.behavioralQuirk = "sinful";
				}
			}
			if ((V.arcologies[0].FSDegradationist !== "unset") && (V.arcologies[market].FSPaternalist !== "unset")) {
				slave.devotion = jsRandom(-90, -60);
				slave.trust = -20;
				r += `<b>${V.arcologies[market].name}</b> is Paternalist, and your arcology is Degradationist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a literal Hell on Earth. `;
			} else if ((V.arcologies[0].FSPaternalist !== "unset") && (V.arcologies[market].FSDegradationist !== "unset")) {
				slave.devotion = jsRandom(60, 90);
				slave.trust = 20;
				r += `<b>${V.arcologies[market].name}</b> is Degradationist, and your arcology is Paternalist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a promised land. `;
			} else if (opinion !== 0) {
				slave.devotion += opinion;
				slave.trust += opinion;
				slave.devotion = Math.clamp(slave.devotion, -100, 75);
				slave.trust = Math.clamp(slave.trust, -100, 75);
				if (opinion > 2) {
					r += `Your arcology's close social alignment with <b>${V.arcologies[market].name}</b> makes its slaves more accepting of the prospect of life in your arcology, and willing to trust that they'll know how to survive there. `;
				} else if (opinion < -2) {
					r += `Your arcology's very different culture from <b>${V.arcologies[market].name}</b>'s makes its slaves unhappy with the prospect of life in your arcology, and afraid of what will happen to them there. `;
				}
			}
			break;
		}
		case "heap": {
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from a body dump, completely broken.";
			slave.devotion = 0;
			slave.trust = 0;
			slave.career = "a slave";
			slave.intelligence = Intelligence.random({limitIntelligence: [-100, 0]});
			slave.intelligenceImplant = 0;
			setHealth(slave, jsRandom(-50, 0), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(0), 0), jsRandom(40, 90));
			slave.weight = jsRandom(-100, 0);
			if (jsRandom(1, 8) === 1) {
				eyeSurgery(slave, "both", "blind");
			} else if (jsRandom(1, 7) <= 4) {
				eyeSurgery(slave, "both", "blur");
			}
			slave.hears = jsEither([-2, -1, -1, -1, -1, 0, 0, 0]);
			if (V.seeExtreme === 1 && jsRandom(0, 2) === 2) {
				// TODO: maybe only partly amputee?
				removeLimbs(slave, "all");
			}
			if (hasAnyLegs(slave)) {
				slave.heels = jsEither([0, 0, 0, 0, 0, 1, 1]);
			}
			slave.voice = jsRandom(0, 2);
			slave.face = jsRandom(-100, 20);
			if (slave.vagina > -1) {
				slave.vagina = jsEither([1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 10]);
				slave.preg = jsRandom(-3, -1);
				slave.belly = 0;
				slave.bellyPreg = 0;
				slave.counter.vaginal += jsRandom(0, 300);
			}
			slave.anus = jsEither([1, 2, 2, 3, 3, 3, 3, 4, 4, 4]);
			if (slave.balls > 1) {
				if (jsRandom(1, 100) > 50) {
					slave.balls = 0;
				}
			}
			slave.counter.oral += jsRandom(0, 300);
			slave.counter.anal += jsRandom(0, 300);
			if (slave.boobs > 500) {
				slave.counter.mammary += jsRandom(0, 300);
			}
			slave.skill.vaginal = 0;
			slave.skill.oral = 0;
			slave.skill.anal = 0;
			slave.skill.whoring = 0;
			slave.skill.entertainment = 0;
			slave.skill.combat = 0;
			slave.addict = jsEither([0, 0, 0, 10, 10, 20, 30]);
			slave.chem = jsRandom(0, 1000);
			slave.behavioralFlaw = "none";
			slave.behavioralQuirk = "none";
			slave.sexualFlaw = "none";
			slave.sexualQuirk = "none";
			slave.fetish = "mindbroken";
			slave.fetishStrength = 0;
			break;
		}
		case "wetware": {
			SGProp.nationality = "Stateless";
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from a wetware CPU farm, $his body ruined but $his mind subjected to a simulated career.";
			slave.devotion = 40;
			slave.trust = -100;
			slave.career = jsEither(["a business owner", "a college scout", "a counselor", "a dairy worker", "a doctor", "a house DJ", "a politician", "a prison guard", "a secretary", "a soldier", "a teacher", "a lawyer"]);
			slave.intelligence = Intelligence.random({limitIntelligence: [50, 100]});
			slave.intelligenceImplant = 30;
			setHealth(slave, jsRandom(-50, -10), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(0), 0), jsRandom(40, 90));
			slave.weight = jsRandom(-100, -50);
			slave.muscles = jsRandom(-100, -50);
			eyeSurgery(slave, "both", "blind");
			slave.hears = -2;
			slave.smells = -1;
			slave.tastes = -1;
			if (V.seeExtreme === 1) {
				removeLimbs(slave, "all");
				slave.earShape = "none";
			}
			if (hasAnyLegs(slave)) {
				slave.heels = 1;
			}
			slave.voice = 0;
			slave.face = jsRandom(-50, 75);
			slave.butt = 0;
			if (slave.vagina > -1) {
				slave.vagina = jsEither([1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 10]);
				slave.preg = jsRandom(-3, -1);
				slave.counter.vaginal += jsRandom(0, 300);
			}
			slave.anus = jsEither([1, 2, 2, 3, 3, 3, 3, 4, 4, 4]);
			if (slave.balls > 1 && jsRandom(1, 100) > 50) {
				slave.balls = 0;
			}
			slave.counter.oral += jsRandom(0, 300);
			slave.counter.anal += jsRandom(0, 300);
			if (slave.boobs > 500) {
				slave.counter.mammary += jsRandom(0, 300);
			}
			slave.skill.vaginal = jsRandom(80, 100);
			slave.skill.oral = jsRandom(80, 100);
			slave.skill.anal = jsRandom(80, 100);
			slave.skill.whoring = jsRandom(80, 100);
			slave.skill.entertainment = jsRandom(80, 100);
			switch (slave.career) {
				case "a lawyer":
					slave.slaveName = "WCPU-HG";
					break;
				case "a college scout":
					slave.slaveName = "WCPU-RC";
					break;
				case "a business owner":
					slave.slaveName = "WCPU-MD";
					break;
				case "a house DJ":
					slave.slaveName = "WCPU-DJ";
					break;
				case "a soldier":
					slave.slaveName = "WCPU-BG";
					break;
				case "a prison guard":
					slave.slaveName = "WCPU-WD";
					break;
				case "a doctor":
					slave.slaveName = "WCPU-NS";
					break;
				case "a counselor":
					slave.slaveName = "WCPU-AT";
					break;
				case "a dairy worker":
					slave.slaveName = "WCPU-MK";
					break;
				case "a secretary":
					slave.slaveName = "WCPU-ST";
					break;
				case "a teacher":
					slave.slaveName = "WCPU-TE";
					break;
			}
			slave.slaveSurname = `#${slave.skill.vaginal}${slave.skill.oral}${slave.skill.anal}${slave.skill.whoring}${slave.skill.entertainment}-${slave.intelligence} `;
			slave.birthName = "";
			slave.birthSurname = "";
			if (slave.career === "a soldier") {
				slave.skill.combat = 1;
			} else {
				slave.skill.combat = 0;
			}
			slave.addict = jsEither([0, 0, 0, 10, 10, 20, 30]);
			slave.chem = jsRandom(500, 1000);
			slave.behavioralFlaw = "none";
			slave.behavioralQuirk = "none";
			slave.sexualFlaw = "none";
			slave.sexualQuirk = "none";
			slave.fetish = "none";
			slave.fetishStrength = 0;
			slave.canRecruit = 0;
			break;
		}
		case "kidnappers": {
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from the kidnappers' slave market, so $he was probably forced into slavery.";
			slave.devotion -= 5;
			slave.trust = jsRandom(-45, -25);
			slave.intelligence = Intelligence.random({limitIntelligence: [-90, 45]});
			setHealth(slave, jsRandom(-80, 20), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(0, 0.7), 0), jsRandom(30, 70));
			if (slave.vagina > 1 && isFertile(slave)) {
				slave.preg = jsEither([-2, -1, -1, -1, -1, -1, -1, -1, 1, 20, 40]);
				if (slave.preg > 0) {
					slave.pregType = setPregType(slave);
				}
				SetBellySize(slave);
			}
			break;
		}
		case "indentures": {
			SGProp.disableDisability = 1;
			if (V.arcologies[0].FSSupremacistLawME === 1) {
				SGProp.race = V.arcologies[0].FSSupremacistRace;
			} else if (V.arcologies[0].FSSubjugationistLawME === 1) {
				const races = setup.filterRacesLowercase.filter(race => race !== V.arcologies[0].FSSubjugationistRace);
				SGProp.race = jsEither(races);
			}
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You purchased $his indenture contract, making $him yours for as long as it lasts.";
			slave.indentureRestrictions = jsEither([0, 1, 1, 2, 2, 2, 2]);
			if (slave.indentureRestrictions >= 2) {
				slave.devotion = jsRandom(25, 45);
				slave.trust = jsRandom(-20, 20);
			} else if (slave.indentureRestrictions === 1) {
				slave.devotion = jsRandom(-20, 20);
				slave.trust = jsRandom(-45, -25);
			} else {
				slave.devotion = jsRandom(-45, -25);
				slave.trust = jsRandom(-75, -60);
			}
			slave.indenture = jsEither([26, 52, 104, 156, 208]);

			break;
		}
		case "hunters": {
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from the runaway hunters' slave market after they recaptured $him and $his original owner did not pay their fee.";
			slave.devotion = -20;
			slave.trust = jsRandom(-15, 15);
			slave.intelligence = Intelligence.random({limitIntelligence: [0, 100]});
			slave.intelligenceImplant = 15;
			if (slave.physicalAge >= 12) {
				slave.teeth = "normal";
			}
			setHealth(slave, jsRandom(-10, 70), Math.max(normalRandInt(0, 4), 0), Math.max(normalRandInt(0, 4), 0), undefined, jsRandom(30, 70));
			if (slave.vagina > -1) {
				slave.preg = jsEither([-2, -1, -1, -1, -1, -1, -1, -1, 1, 1]);
				if (slave.physicalAge < slave.pubertyAgeXX) {
					slave.preg = 0;
				}
				if (slave.preg > 0) {
					slave.pregType = setPregType(slave);
				}
				SetBellySize(slave);
				slave.skill.vaginal = jsRandom(15, 100);
				slave.vagina = jsRandom(1, 3);
			}
			if (slave.balls > 0) {
				if (jsRandom(1, 3) === 1) {
					slave.balls = 0;
				}
			}
			slave.skill.combat = jsEither([0, 0, 0, 0, 0, 1]);
			slave.skill.entertainment = jsRandom(15, 100);
			slave.skill.whoring = jsRandom(15, 100);
			slave.skill.oral = jsRandom(15, 100);
			slave.skill.anal = jsRandom(15, 100);
			slave.anus = jsRandom(1, 3);
			slave.weight = Math.clamp(-25, 25, slave.weight);
			slave.behavioralFlaw = jsEither(["anorexic", "arrogant", "bitchy", "devout", "gluttonous", "hates men", "hates women", "hates women", "liberated", "odd"]);
			slave.sexualFlaw = jsEither(["apathetic", "crude", "hates anal", "hates oral", "hates penetration", "idealistic", "judgemental", "repressed", "shamefast"]);
			if (jsRandom(1, 2) === 1) {
				let slaveGen = jsRandom(2, 8)*200;
				slave.boobs += slaveGen;
				slave.boobsImplant += slaveGen;
				if (slave.boobsImplant > 1000) {
					slave.boobsImplantType = jsEither(["fillable", "fillable", "normal", "string"]);
				} else {
					slave.boobsImplantType = jsEither(["normal", "normal", "normal", "string"]);
				}
				slaveGen = jsRandom(1, 3);
				slave.butt += slaveGen;
				slave.buttImplant += slaveGen;
				slave.buttImplantType = "normal";
				slaveGen = jsEither([10, 20]);
				slave.lips += slaveGen;
				slave.lipsImplant += slaveGen;
				slave.waist = Math.trunc(slave.waist, -100, 15);
				if (slave.face < 40) {
					slave.faceImplant = 20*jsRandom(0, 1);
					slave.face = Math.clamp(slave.face+slave.faceImplant, -100, 100);
				}
				if (slave.physicalAge >= 30) {
					if (jsRandom(0, 1) > 0) {
						applyAgeImplant(slave);
					}
				}
			}
			if (V.arcologies[0].FSPaternalistSMR === 0) {
				slave.heels = 1;
			}
			break;
		}
		case "underage raiders": {
			SGProp.minAge = V.minimumSlaveAge;
			SGProp.maxAge = V.fertilityAge;
			SGProp.ageOverridesPedoMode = 1; // Must not have had their first period.
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from the underage raiders' slave market.";
			slave.trust -= 25;
			setHealth(slave, jsRandom(-30, 70), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 0.7), 0), jsRandom(20, 60));
			slave.career = setup.veryYoungCareers.random();
			slave.birthWeek = 0;
			if (slave.vagina !== -1) {
				slave.skill.vaginal = 0;
				slave.vagina = 0;
				slave.trueVirgin = 1;
				slave.preg = 0;
				SetBellySize(slave);
			}
			slave.skill.anal = 0;
			slave.anus = 0;
			slave.skill.oral = 0;
			slave.skill.whoring = 0;
			break;
		}
		case "raiders": {
			SGProp.minAge = 18;
			SGProp.maxAge = 18;
			SGProp.ageOverridesPedoMode = 1; // Supposed to have just reached the age of majority.
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from the $girl raiders' slave market the week $he reached $his majority.";
			slave.trust -= 25;
			setHealth(slave, jsRandom(-30, 70), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(0, 3), 0), Math.max(normalRandInt(0, 0.7), 0), jsRandom(30, 70));
			slave.career = jsEither(["a cheerleader", "a farm laborer", "a party girl", "a student", "a student", "a student", "a student", "a student"]);
			slave.birthWeek = 0;
			if (slave.vagina !== -1) {
				if (jsRandom(1, 2) === 1) {
					slave.skill.vaginal = 0;
					slave.vagina = 0;
					slave.trueVirgin = 1;
					slave.preg = 0;
					SetBellySize(slave);
				}
			}
			if (jsRandom(1, 2) === 1) {
				slave.skill.anal = 0;
				slave.anus = 0;
			}
			if (jsRandom(1, 2) === 1) {
				slave.skill.oral = 0;
			}
			slave.skill.whoring = 0;

			break;
		}
		case "trainers": {
			SGProp.maxAge = 42;
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from the trainers' slave market after they put $him through basic training.";
			slave.devotion += 40;
			slave.trust += 40;
			setHealth(slave, jsRandom(-20, 80), Math.max(normalRandInt(0, 2), 0), undefined, Math.max(normalRandInt(0, 0.4), 0));
			if (slave.vagina !== -1) {
				slave.skill.vaginal += 15;
			} else {
				slave.skill.vaginal = 0;
				slave.clit = 0;
			}
			if (slave.vagina === 0) {
				slave.vagina += 1;
			}
			if (slave.anus === 0) {
				slave.anus += 1;
			}
			slave.skill.oral += 15;
			slave.skill.anal += 15;
			slave.fetishKnown = 1;
			if (slave.accent >= 3) {
				slave.accent -= 1;
			}
			if (jsRandom(1, 100) > 50) {
				slave.sexualFlaw = "none";
			}
			if (jsRandom(1, 100) > 50) {
				slave.behavioralFlaw = "none";
			}
			break;
		}
		case "TSS": {
			if (V.TSS.schoolUpgrade === 1) {
				SGProp.minAge = 36;
			} else {
				SGProp.maxAge = 18;
			}
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("XX", SGProp);
			slave.career = "a slave";
			slave.butt = jsEither([1, 2, 2, 3]);
			slave.boobs = jsEither([200, 300, 300, 400]);
			if (V.TSS.schoolUpgrade === 1) {
				slave.origin = "You bought $him fresh from the new Slavegirl School after $he was retrained as a slave $girl.";
				slave.butt += 1;
				slave.boobs += 200;
				slave.anus = 1;
				slave.vagina = 1;
			} else {
				slave.origin = "You bought $him fresh from the Slavegirl School right after $his majority.";
				slave.anus = 0;
				slave.vagina = 0;
				slave.trueVirgin = 1;
				slave.birthWeek = 0;
			}
			slave.intelligenceImplant = 30;
			if (slave.physicalAge >= 12) {
				slave.teeth = "normal";
			}
			slave.intelligence = Intelligence.random({limitIntelligence: [-20, 70]});
			slave.devotion = jsRandom(25, 45);
			slave.trust = jsRandom(25, 45);
			setHealth(slave, jsRandom(50, 60), 0, Math.max(normalRandInt(0), 0), 0, jsRandom(0, 20));
			slave.preg = 0;
			SetBellySize(slave);
			slave.weight = 0;
			slave.waist = jsRandom(-30, 10);
			slave.chem = 20;
			if (V.TSS.schoolUpgrade === 0) {
				slave.skill.vaginal = 0;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 15;
			} else {
				slave.skill.vaginal = 15;
				slave.skill.oral = 15;
				slave.skill.anal = 15;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 15;
			}
			slave.skill.combat = 0;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.sexualFlaw = "none";
			slave.behavioralFlaw = "none";
			slave.hStyle = "tails";
			slave.custom.tattoo = "$He has the simple logo of the corporation that operates The Slavegirl School tattooed on $his left cheek.";

			break;
		}
		case "GRI": {
			SGProp.minAge = 16;
			SGProp.maxAge = 19;
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("XX", SGProp);
			slave.origin = "You bought $him from the Growth Research Institute right after $his use as a test subject ended.";
			slave.career = "a slave";
			slave.intelligenceImplant = 0;
			slave.devotion = jsRandom(-15, -5);
			slave.trust = jsRandom(-25, -45);
			slave.chem = 100;
			if (V.GRI.schoolUpgrade === 1) {
				setHealth(slave, 200, 0, Math.max(normalRandInt(0), 0), 0, 0);
			} else {
				setHealth(slave, jsRandom(-50, 100), Math.max(normalRandInt(0, 4), 0), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(0, 0.5), 0), jsRandom(0, 20));
			}
			slave.height = jsRandom(160, 210);
			slave.butt = jsRandom(4, 10);
			if (V.GRI.schoolUpgrade === 2) {
				slave.boobs = 200*jsRandom(15, 30);
				slave.lactation = 2;
				slave.lactationDuration = 2;
			} else {
				slave.boobs = 200*jsRandom(4, 20);
			}
			slave.nipples = jsEither(["huge", "inverted"]);
			slave.areolae = jsEither([0, 1, 2, 3, 4]);
			slave.clit = jsEither([0, 1, 2, 3]);
			slave.lips = jsRandom(5, 85);
			slave.anus = 0;
			slave.vagina = 0;
			slave.preg = 0;
			SetBellySize(slave);
			slave.weight = 0;
			slave.waist = jsRandom(-20, 30);
			slave.skill.vaginal = 0;
			slave.skill.oral = 0;
			slave.skill.anal = 0;
			slave.skill.whoring = 0;
			slave.skill.entertainment = 0;
			slave.skill.combat = 0;
			slave.pubicHStyle = "waxed";
			slave.birthWeek = 0;
			slave.behavioralFlaw = "odd";
			slave.hStyle = "shaved";
			slave.hLength = 0;
			slave.custom.tattoo = "$He has a barcode that identified $him when $he was a test subject at the Growth Research Institute tattooed on $his left cheek.";
			break;
		}
		case "SCP": {
			SGProp.minAge = 16;
			SGProp.maxAge = 19;
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("XX", SGProp);
			slave.origin = "You bought $him from St. Claver Preparatory after $he served as a plastic surgeon's passing final exam.";
			slave.chem = 20;
			slave.career = "a slave";
			if (V.SCP.schoolUpgrade === 1) {
				slave.intelligenceImplant = 0;
				slave.intelligence = -60;
				slave.devotion = 100;
				slave.trust = 100;
			} else {
				slave.intelligenceImplant = 15;
				slave.teeth = "normal";
				slave.intelligence = Intelligence.random({limitIntelligence: [-30, 60]});
				slave.devotion = jsRandom(25, 45);
				slave.trust = jsRandom(25, 45);
			}
			setHealth(slave, 100, Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(5, 4), 0), 0, jsRandom(0, 20));
			slave.heightImplant = 1;
			slave.height += 10;
			slave.buttImplant = (4-slave.butt);
			slave.buttImplantType = "normal";
			slave.butt += slave.buttImplant;
			slave.boobsImplant = (2000-slave.boobs);
			slave.boobs += slave.boobsImplant;
			slave.boobsImplantType = "fillable";
			slave.nipples = "tiny";
			slave.areolae = 0;
			slave.clit = 0;
			slave.lipsImplant = (20-slave.lips);
			slave.lips += slave.lipsImplant;
			slave.faceImplant = 40;
			slave.face = Math.clamp(slave.face+slave.faceImplant, -100, 100);
			slave.faceShape = "normal";
			slave.anus = 0;
			slave.vagina = 0;
			slave.preg = 0;
			SetBellySize(slave);
			slave.weight = -20;
			slave.waist = -50;
			if (V.SCP.schoolUpgrade === 2) {
				slave.skill.vaginal = 15;
				slave.skill.oral = 15;
				slave.skill.anal = 15;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 15;
			} else {
				slave.skill.vaginal = 0;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
			}
			slave.skill.combat = 0;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.birthWeek = 0;
			slave.sexualFlaw = "none";
			slave.behavioralFlaw = "none";
			slave.hStyle = "tails";
			slave.pubicHColor = "blonde";
			slave.underArmHColor = "blonde";
			slave.eyebrowHColor = "blonde";
			slave.race = "white";
			slave.skin = "sun tanned";
			slave.override_H_Color = 1;
			slave.override_Race = 1;
			slave.override_Skin = 1;
			slave.custom.tattoo = "$He has the coat of arms of St. Claver Preparatory tattooed on $his left cheek.";
			break;
		}
		case "LDE": {
			SGProp.minAge = 16;
			SGProp.maxAge = 19;
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("XY", SGProp);
			slave.origin = "You bought $him from the innovative École des Enculées right after $his graduation.";
			slave.career = "a slave";
			slave.intelligenceImplant = 0;
			slave.chem = 100;
			if (V.LDE.schoolUpgrade === 1) {
				slave.devotion = 100;
				slave.trust = 100;
			} else {
				slave.devotion = jsRandom(60, 75);
				slave.trust = jsRandom(55, 60);
			}
			setHealth(slave, jsRandom(60, 80), 0, Math.max(normalRandInt(0, 2), 0), 0, jsRandom(0, 20));
			slave.muscles = 0;
			slave.butt = jsEither([4, 5]);
			slave.face = jsRandom(15, 55);
			slave.faceShape = "androgynous";
			slave.boobs = jsEither([500, 650, 800]);
			slave.waist = -15;
			slave.lips = 35;
			if (V.LDE.schoolUpgrade === 2) {
				slave.dick = jsEither([3, 4]);
				slave.balls = jsEither([3, 4]);
				if (slave.foreskin > 0) {
					slave.foreskin = slave.dick;
				}
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
			} else {
				slave.dick = jsEither([1, 1, 1, 2]);
				slave.balls = jsEither([1, 1, 1, 2]);
				if (slave.foreskin > 0) {
					slave.foreskin = slave.dick;
				}
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
				slave.pubertyXY = 0;
				slave.pubertyAgeXY = jsRandom(24, 50);
			}
			slave.anus = 2;
			slave.vagina = -1;
			slave.preg = 0;
			SetBellySize(slave);
			slave.weight = jsRandom(0, 20);
			slave.skill.vaginal = 0;
			slave.skill.oral = 15;
			slave.skill.anal = 100;
			slave.skill.whoring = 15;
			slave.skill.entertainment = 15;
			slave.skill.combat = 0;
			slave.pubicHStyle = "waxed";
			slave.birthWeek = 0;
			slave.sexualFlaw = "none";
			slave.behavioralFlaw = jsEither(["none", "odd"]);
			slave.fetishStrength = jsEither([1, 2]);
			slave.fetish = "buttslut";
			slave.fetishKnown = 1;
			slave.attrKnown = 1;
			slave.hStyle = "tails";
			slave.hLength = 100;
			slave.custom.tattoo = "$He has the buttock-shaped symbol of the École des Enculées that created $him tattooed on $his left cheek.";
			break;
		}
		case "TGA": {
			SGProp.minAge = 16;
			SGProp.maxAge = 19;
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("XY", SGProp);
			slave.origin = "You bought $him fresh from the intense Gymnasium-Academy right after $his majority.";
			slave.career = "a slave";
			slave.intelligenceImplant = 30;
			slave.teeth = "normal";
			slave.intelligence = Intelligence.random({limitIntelligence: [-20, 60]});
			slave.chem = 20;
			if (V.TGA.schoolUpgrade === 1) {
				slave.devotion = 100;
				slave.trust = 100;
			} else {
				slave.devotion = jsRandom(25, 45);
				slave.trust = jsRandom(25, 45);
			}
			setHealth(slave, 100, 0, undefined, Math.max(normalRandInt(0, 0.4), 0), jsRandom(0, 30));
			slave.muscles = jsEither([20, 50, 50]);
			slave.butt = jsEither([2, 2, 3]);
			slave.boobs = jsEither([100, 200]);
			slave.dick = jsRandom(3, 5);
			slave.balls = jsRandom(3, 5);
			slave.anus = 0;
			slave.vagina = -1;
			slave.preg = 0;
			SetBellySize(slave);
			slave.weight = 0;
			slave.waist = jsRandom(-10, 30);
			slave.skill.vaginal = 0;
			slave.skill.oral = 0;
			slave.skill.anal = 0;
			slave.skill.whoring = 0;
			slave.skill.entertainment = 0;
			if (V.TGA.schoolUpgrade === 2) {
				slave.skill.combat = 1;
			} else {
				slave.skill.combat = 0;
			}
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.birthWeek = 0;
			slave.sexualFlaw = jsEither(["apathetic", "none"]);
			slave.behavioralFlaw = jsEither(["arrogant", "none", "odd"]);
			slave.hStyle = "short";
			slave.hLength = 2;
			slave.brand["left cheek"] = "the baroque crest of the Gymnasium-Academy that trained $him";
			break;
		}
		case "TCR": {
			if (V.TCR.schoolUpgrade === 2 && jsRandom(1, 100) <= 20) {
				SGProp.minAge = V.fertilityAge;
				SGProp.maxAge = 18;
				SGProp.ageOverridesPedoMode = 1;
				SGProp.disableDisability = 1;
				slave = GenerateNewSlave("XX", SGProp);
				slave.origin = "You bought $him from The Cattle Ranch.";
				slave.career = "a dairy slave";
				slave.slaveName = setup.cowSlaveNames.random();
				slave.slaveSurname = 0;
				slave.butt = jsEither([2, 2, 3, 3, 3, 4, 4]);
				slave.boobs = ((slave.physicalAge*100)*2)+jsEither([-100, -100, 0, 0, 100, 100, 200, 200, 300, 500]);
				slave.lactation = 0;
				slave.lactationAdaptation = 0;
				slave.lactationDuration = 0;
				slave.anus = 0;
				slave.vagina = 0;
				slave.trueVirgin = 1;
				slave.vaginaLube = jsEither([1, 1, 2]);
				slave.intelligenceImplant = 0;
				slave.devotion = -20;
				slave.trust = -20;
				setHealth(slave, jsRandom(20, 30), 0, Math.max(normalRandInt(0, 4), 0), 0);
				slave.preg = 0;
				SetBellySize(slave);
				slave.hips = jsEither([0, 0, 1, 1, 1, 2]);
				slave.weight = jsRandom(-20, 10);
				slave.waist = jsRandom(-30, 10);
				slave.muscles = 0;
				slave.skill.vaginal = 0;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.skill.combat = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.heels = 1;
				slave.hStyle = "neat";
				slave.collar = "leather with cowbell";
				slave.brand["right thigh"] = "the logo of the Cattle Ranch";
			} else if (V.TCR.schoolUpgrade === 1 && jsRandom(1, 100) <= 20) {
				SGProp.minAge = V.potencyAge+1;
				SGProp.maxAge = 24;
				SGProp.ageOverridesPedoMode = 1;
				SGProp.disableDisability = 1;
				slave = GenerateNewSlave("XY", SGProp);
				slave.slaveName = setup.cowSlaveNames.random();
				slave.slaveSurname = 0;
				slave.origin = "You bought $him from The Cattle Ranch.";
				slave.career = "a breeding bull";
				slave.butt = jsEither([3, 3, 4, 4, 4, 5, 6]);
				slave.boobs = 100;
				slave.anus = 0;
				slave.intelligence = -100;
				slave.intelligenceImplant = 0;
				slave.devotion = 100;
				slave.trust = 100;
				setHealth(slave, jsRandom(20, 30), 0, Math.max(normalRandInt(0, 4), 0), 0);
				slave.hips = jsEither([1, 1, 1, 2, 2]);
				slave.dick = 6;
				slave.foreskin = 0;
				slave.balls = jsRandom(19, 30);
				slave.scrotum = 10;
				slave.prostate = 2;
				slave.weight = jsRandom(10, 30);
				slave.waist = jsRandom(0, 100);
				slave.muscles = jsRandom(80, 100);
				slave.skill.vaginal = 0;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.skill.combat = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.heels = 1;
				slave.energy = 100;
				slave.fetish = "mindbroken";
				slave.fetishStrength = 10;
				slave.fetishKnown = 1;
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.sexualQuirk = "none";
				slave.behavioralQuirk = "none";
				slave.hStyle = "neat";
				slave.brand["right thigh"] = "the logo of the Cattle Ranch";
			} else {
				SGProp.minAge = 19;
				SGProp.maxAge = 24;
				SGProp.ageOverridesPedoMode = 1;
				SGProp.disableDisability = 1;
				slave = GenerateNewSlave("XX", SGProp);
				slave.slaveName = setup.cowSlaveNames.random();
				slave.slaveSurname = 0;
				slave.origin = "You bought $him from The Cattle Ranch.";
				slave.career = "a dairy cow";
				slave.butt = jsEither([3, 3, 4, 4, 4, 5, 6]);
				slave.boobs = ((slave.physicalAge*100)*2)+jsEither([-100, -100, 0, 0, 100, 100, 200, 200, 300, 500]);
				slave.lactation = 1;
				slave.lactationDuration = 2;
				slave.lactationAdaptation = 100;
				slave.anus = 1;
				slave.vagina = 3;
				slave.vaginaLube = 2;
				slave.intelligence = jsEither([-100, -100, -100, -100, -60, -60, -30]);
				slave.intelligenceImplant = 0;
				slave.devotion = 100;
				slave.trust = 100;
				setHealth(slave, jsRandom(20, 30), 0, Math.max(normalRandInt(0, 4), 0), 0);
				slave.preg = jsRandom(10, 40);
				slave.pregType = jsRandom(1, 5);
				slave.pregKnown = 1;
				SetBellySize(slave);
				slave.bellySag = 2;
				slave.bellySagPreg = 2;
				slave.hips = jsEither([1, 1, 1, 2, 2]);
				slave.counter.birthsTotal = jsRandom(1, 7);
				slave.pregAdaptation = 120;
				slave.weight = jsRandom(20, 90);
				slave.waist = jsRandom(-10, 50);
				slave.muscles = jsRandom(60, 80);
				slave.chem = 0;
				slave.skill.vaginal = 0;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.skill.combat = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.heels = 1;
				slave.fetish = "mindbroken";
				slave.fetishStrength = 10;
				slave.fetishKnown = 1;
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.sexualQuirk = "none";
				slave.behavioralQuirk = "none";
				slave.hStyle = "neat";
				slave.collar = "leather with cowbell";
				slave.brand["right thigh"] = "the logo of the Cattle Ranch";
			}
			break;
		}
		case "TFS": {
			SGProp.minAge = 25;
			SGProp.maxAge = 29;
			SGProp.ageOverridesPedoMode = 1;
			SGProp.disableDisability = 1;
			if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek+15 <= V.week) {
				slave = GenerateNewSlave("", SGProp);
			} else {
				slave = GenerateNewSlave("XY", SGProp);
			}
			slave.origin = "You bought $him from the enigmatic Futanari Sisters after they sold $him into slavery.";
			slave.career = "a Futanari Sister";
			slave.faceShape = jsEither(["exotic", "sensual"]);
			slave.pubertyXY = 1;
			sisterAge = jsRandom(1, 5);
			if (sisterAge === 1) {
				slave.intelligence = -60;
				slave.hips = 0;
				slave.face = jsEither([35, 35, 35, 75, 100]);
				if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek+15 <= V.week) {
					if (slave.genes === "XY") {
						slave.balls = 6;
						slave.scrotum = slave.balls;
					} else {
						slave.balls = 1;
						slave.scrotum = 0;
					}
				} else if (V.TFS.schoolUpgrade === 1) {
					slave.balls = 1;
					slave.scrotum = 0;
				} else if (V.TFS.schoolUpgrade === 2) {
					slave.balls = 6;
					slave.scrotum = slave.balls;
				} else {
					slave.balls = jsRandom(2, 3);
					slave.scrotum = slave.balls;
				}
				slave.lips = 10;
				slave.weight = 0;
				slave.waist = jsRandom(-30, 10);
				slave.actualAge = jsRandom(19, 24);
				slave.physicalAge = slave.actualAge;
				slave.visualAge = slave.actualAge;
				slave.ovaryAge = slave.actualAge;
				slave.vagina = 2;
				slave.anus = 2;
				slave.fetish = "submissive";
			} else if (sisterAge === 2) {
				slave.intelligence = -30;
				slave.hips = 1;
				slave.face = jsEither([35, 35, 35, 75, 100]);
				if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek+15 <= V.week) {
					if (slave.genes === "XY") {
						slave.balls = 7;
						slave.scrotum = slave.balls;
					} else {
						slave.balls = 1;
						slave.scrotum = 0;
					}
				} else if (V.TFS.schoolUpgrade === 1) {
					slave.balls = 1;
					slave.scrotum = 0;
				} else if (V.TFS.schoolUpgrade === 2) {
					slave.balls = 6;
					slave.scrotum = slave.balls;
				} else {
					slave.balls = jsRandom(2, 3);
					slave.scrotum = slave.balls;
				}
				slave.lips = 0;
				slave.weight = 0;
				slave.waist = jsRandom(-30, 10);
				slave.vagina = 2;
				slave.anus = 2;
				slave.fetish = jsEither(["buttslut", "cumslut", "submissive"]);
			} else if (sisterAge === 3) {
				slave.intelligence = 0;
				slave.hips = 2;
				slave.face = jsEither([35, 35, 75, 75, 100]);
				if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek+15 <= V.week) {
					if (slave.genes === "XY") {
						slave.balls = 8;
						slave.scrotum = slave.balls;
					} else {
						slave.balls = 1;
						slave.scrotum = 0;
					}
				} else if (V.TFS.schoolUpgrade === 1) {
					slave.balls = 1;
					slave.scrotum = 0;
				} else if (V.TFS.schoolUpgrade === 2) {
					slave.balls = 6;
					slave.scrotum = slave.balls;
				} else {
					slave.balls = jsRandom(3, 4);
					slave.scrotum = slave.balls;
				}
				slave.lips = jsRandom(15, 25);
				slave.weight = 20;
				slave.waist = jsRandom(-30, 20);
				slave.actualAge = jsRandom(30, 34);
				slave.physicalAge = slave.actualAge;
				slave.visualAge = slave.actualAge;
				slave.ovaryAge = slave.actualAge;
				slave.vagina = 2;
				slave.anus = 2;
				slave.fetish = jsEither(["buttslut", "cumslut"]);
			} else if (sisterAge === 4) {
				slave.intelligence = 30;
				slave.hips = 2;
				slave.face = jsEither([35, 75, 75, 100, 100]);
				if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek + 15 <= V.week) {
					if (slave.genes === "XY") {
						slave.balls = 9;
						slave.scrotum = slave.balls;
					} else {
						slave.balls = 1;
						slave.scrotum = 0;
					}
				} else if (V.TFS.schoolUpgrade === 1) {
					slave.balls = 1;
					slave.scrotum = 0;
				} else if (V.TFS.schoolUpgrade === 2) {
					slave.balls = 6;
					slave.scrotum = slave.balls;
				} else {
					slave.balls = jsRandom(4, 5);
					slave.scrotum = slave.balls;
				}
				slave.lips = jsRandom(25, 55);
				slave.weight = 20;
				slave.waist = jsRandom(-30, 20);
				slave.actualAge = jsRandom(35, 39);
				slave.physicalAge = slave.actualAge;
				slave.visualAge = slave.actualAge;
				slave.ovaryAge = slave.actualAge;
				slave.vagina = 3;
				slave.anus = 3;
				slave.fetish = jsEither(["buttslut", "cumslut", "dom"]);
			} else {
				slave.intelligence = 60;
				slave.hips = 2;
				slave.face = jsEither([35, 75, 100, 100, 100]);
				if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek+15 <= V.week) {
					if (slave.genes === "XY") {
						slave.balls = 10;
						slave.scrotum = slave.balls;
					} else {
						slave.balls = 1;
						slave.scrotum = 0;
					}
				} else if (V.TFS.schoolUpgrade === 1) {
					slave.balls = 1;
					slave.scrotum = 0;
				} else if (V.TFS.schoolUpgrade === 2) {
					slave.balls = 6;
					slave.scrotum = slave.balls;
				} else {
					slave.balls = jsRandom(5, 6);
					slave.scrotum = slave.balls;
				}
				slave.lips = jsRandom(25, 55);
				slave.weight = 50;
				slave.waist = jsRandom(-50, 20);
				slave.actualAge = jsRandom(40, 42);
				slave.physicalAge = slave.actualAge;
				slave.visualAge = slave.actualAge;
				slave.ovaryAge = slave.actualAge;
				slave.vagina = 3;
				slave.anus = 3;
				slave.fetish = "dom";
			}
			slave.chem = 100+(sisterAge*50);
			slave.butt = sisterAge+jsRandom(2, 4);
			slave.boobs = 50*((10*sisterAge)+jsRandom(10, 20));
			slave.dick = sisterAge+jsRandom(1, 2);
			if (slave.foreskin > 0) {
				slave.foreskin = slave.dick;
			}
			slave.preg = -3;
			if (V.TFS.farmUpgrade > 0) {
				slave.ovaries = 1;
				slave.preg = -1;
				slave.pubertyXX = 1;
				if (V.TFS.farmUpgrade >= 2) {
					if (V.week - V.TFS.farmUpgradeAsked < 35) {
						slave.preg = jsRandom(1, (V.week - V.TFS.farmUpgradeAsked));
					} else {
						slave.preg = jsRandom(1, 40);
					}
					if (V.TFS.farmUpgrade === 3) {
						slave.pregType = jsRandom(20, 40);
						slave.pregAdaptation = 500;
					} else {
						slave.pregType = 1;
					}
					slave.pregWeek = slave.preg;
					slave.pregSource = -9;
				}
			}
			SetBellySize(slave);
			slave.intelligenceImplant = 30;
			slave.teeth = "normal";
			if (V.TFS.schoolUpgrade === 2) {
				slave.energy = 100;
			} else {
				slave.energy = slave.physicalAge+jsRandom(20, 30);
			}
			slave.devotion = jsRandom(30, 40);
			slave.trust = jsRandom(60, 75);
			setHealth(slave, jsRandom(60, 80), 0, Math.max(normalRandInt(0, 4), 0), 0, jsRandom(0, 20));
			slave.muscles = 20;
			if (slave.genes === "XY") {
				slave.shoulders = 1;
			}
			slave.skill.vaginal = 100;
			slave.skill.oral = 100;
			slave.skill.anal = 100;
			slave.skill.whoring = 15;
			slave.skill.entertainment = 100;
			slave.skill.combat = 0;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			if (V.TFS.schoolUpgrade === 1) {
				slave.sexualQuirk = "caring";
			}
			slave.sexualFlaw = jsEither(["hates women", "none"]);
			slave.behavioralFlaw = jsEither(["arrogant", "none"]);
			slave.fetishStrength = 100;
			slave.fetishKnown = 0;
			slave.attrKnown = 0;
			slave.hStyle = "neat";
			slave.hLength = 150;
			slave.custom.tattoo = "$He has a simple pink heart tattooed on $his right temple.";
			slave.trueVirgin = 1;
			break;
		}
		case "HA": {
			SGProp.minAge = 22;
			SGProp.maxAge = 26;
			SGProp.ageOverridesPedoMode = 1;
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("XX", SGProp);
			slave.origin = "You bought $him from the prestigious Hippolyta Academy.";
			slave.career = "a bodyguard";
			slave.intelligenceImplant = 30;
			slave.faceShape = jsEither(["cute", "normal"]);
			slave.face = jsEither([35, 35, 35, 50, 75, 100]);
			slave.lips = jsRandom(0, 25);
			slave.actualAge = jsRandom(20, 25);
			slave.physicalAge = slave.actualAge;
			slave.visualAge = slave.actualAge;
			slave.ovaryAge = slave.actualAge;
			slave.hips = 0;
			slave.vagina = jsRandom(0, 1);
			slave.anus = jsRandom(0, 1);
			slave.fetish = "none";
			slave.chem = 10 * jsRandom(1, 3);
			slave.butt = jsRandom(2, 4);
			slave.boobs = jsRandom(3, 6) * 100;
			slave.preg = 0;
			SetBellySize(slave);
			slave.teeth = "normal";
			slave.devotion = jsRandom(60, 75);
			slave.trust = jsRandom(60, 75);
			setHealth(slave, jsRandom(60, 80), 0, Math.max(normalRandInt(0, 2), 0), 0, jsRandom(0, 20));
			minHeight = jsRandom(170, 180);
			if (V.HA.schoolUpgrade === 2) {
				slave.height = Math.trunc(Math.clamp(Height.random(slave, {limitMult: [2, 15], spread: 0.1}), minHeight, 274));
				slave.muscles = jsRandom(40, 80);
			} else {
				slave.height = Math.trunc(Math.clamp(Height.random(slave, {limitMult: [1, 4]}), minHeight, 274));
				slave.muscles = jsRandom(20, 40);
			}
			if (V.HA.schoolUpgrade === 3) {
				slave.weight = jsEither([10, 20, 20, 30, 30, 40, 40, 50]);
				slave.waist = jsRandom(-10, 40);
			} else {
				slave.weight = -10;
				slave.waist = jsRandom(-20, 10);
			}
			slave.shoulders = 0;
			if (V.HA.schoolUpgrade === 1) {
				slave.intelligence = Intelligence.random({limitIntelligence: [20, 70]});
				slave.skill.vaginal = jsEither([20, 20, 40]);
				slave.skill.oral = jsEither([20, 20, 40]);
				slave.skill.anal = jsEither([20, 20, 40]);
				slave.skill.whoring = jsEither([20, 20, 40]);
				slave.skill.entertainment = jsEither([60, 80, 80, 100]);
			} else {
				slave.intelligence = jsRandom(0, 20);
				slave.skill.vaginal = 10;
				slave.skill.oral = 10;
				slave.skill.anal = 10;
				slave.skill.whoring = 10;
				slave.skill.entertainment = jsEither([20, 40, 40, 60]);
			}
			slave.skill.combat = 1;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.sexualQuirk = jsEither(["caring", "none", "none", "unflinching"]);
			slave.sexualFlaw = jsEither(["apathetic", "judgemental", "none", "none"]);
			slave.behavioralFlaw = jsEither(["arrogant", "none"]);
			slave.behavioralQuirk = jsEither(["confident", "fitness", "none", "none"]);
			slave.fetishStrength = 0;
			slave.fetishKnown = 0;
			slave.attrKnown = 0;
			slave.hStyle = jsEither(["braided", "bun", "neat", "ponytail", "tails"]);
			slave.hLength = jsRandom(5, 50);
			slave.clothes = "a nice maid outfit";
			slave.custom.tattoo = "$He has the sword and eagle symbol of the Hippolyta Academy tattooed on $his left shoulder.";
			break;
		}
		case "NUL": {
			SGProp.minAge = 16;
			SGProp.maxAge = 24;
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("", SGProp);
			slave.origin = "You bought $him from Nueva Universidad de Libertad right after $his graduation.";
			slave.career = "a slave";
			setHealth(slave, jsRandom(60, 80), 0, Math.max(normalRandInt(0, 4), 0), 0, jsRandom(0, 20));
			slave.devotion = jsRandom(60, 75);
			slave.trust = jsRandom(60, 75);
			slave.intelligenceImplant = 30;
			if (V.NUL.schoolUpgrade === 1) {
				slave.intelligence = Intelligence.random({limitIntelligence: [50, 70]});
				slave.skill.whoring = jsRandom(70, 80);
				slave.skill.entertainment = jsRandom(70, 80);
			} else {
				slave.intelligence = Intelligence.random({limitIntelligence: [20, 50]});
				slave.skill.whoring = jsRandom(40, 50);
				slave.skill.entertainment = jsRandom(40, 50);
			}
			if (V.NUL.schoolUpgrade === 2) {
				slave.skill.anal = jsRandom(60, 80);
				slave.skill.oral = jsRandom(70, 90);
				slave.anus = jsRandom(1, 3);
			} else {
				slave.skill.anal = jsRandom(10, 30);
				slave.skill.oral = jsRandom(20, 40);
				slave.anus = jsEither([0, 0, 0, 0, 1, 1, 1]);
			}
			slave.muscles = 0;
			slave.face = jsRandom(15, 55);
			slave.faceShape = "androgynous";
			slave.hips = 0;
			slave.shoulders = 0;
			slave.boobs = jsRandom(1, 7) * 50;
			slave.butt = jsRandom(0, 3);
			slave.vagina = -1;
			slave.clit = 0;
			slave.dick = 0;
			slave.balls = 0;
			slave.preg = 0;
			slave.eyebrowHStyle = "bald";
			slave.underArmHStyle = "bald";
			slave.pubicHStyle = "bald";
			slave.hStyle = "bald";
			slave.behavioralFlaw = jsEither(["none", "odd"]);
			slave.custom.tattoo = "$He has the abstract symbol of Nueva Universidad de Libertad tattooed on $his left shoulder.";
			break;
		}
		case "gangs and smugglers": {
			if (V.pedo_mode === 1) {
				SGProp.minAge = 6;
				SGProp.maxAge = 18;
				SGProp.ageOverridesPedoMode = 1;
			} else {
				SGProp.minAge = 16;
				if (V.retirementAge > 56) {
					SGProp.maxAge = 55;
				} else {
					SGProp.maxAge = V.retirementAge-2;
				}
			}
			SGProp.disableDisability = 1;
			if (V.seeDicks === 0) {
				slave = GenerateNewSlave("XX", SGProp);
			} else {
				slave = GenerateNewSlave("XY", SGProp);
			}

			criminal = setup.gangCriminalPool.random();

			switch (criminal) {
				case "mule": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for smuggling illegal contraband inside $his body.";
					V.prisonCrime = "is incarcerated for being a willing drug mule.";
					slave.career = "a drug mule";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(-100, -25);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([-100, -100, -60, -60, -60, -30, -30]);
					setHealth(slave, jsRandom(-50, 20), undefined, undefined, undefined, jsRandom(30, 80));
					slave.anus = 4;
					slave.chem = 10 * jsRandom(1, 3);
					slave.addict = 100;
					break;
				}
				case "arms smuggler": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for smuggling arms to forces antagonistic to the Free Cities.";
					V.prisonCrime = "is incarcerated for being an arms dealer.";
					slave.career = "an arms dealer";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(-60, 25);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(0, 60);
					setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, jsRandom(30, 80));
					slave.weight = jsRandom(-30, 10);
					slave.waist = jsRandom(-10, 50);
					slave.muscles = jsRandom(10, 40);
					break;
				}
				case "drug smuggler": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for smuggling drugs into the Free City.";
					V.prisonCrime = "is incarcerated for smuggling drugs.";
					slave.career = "a drug smuggler";
					slave.devotion = jsRandom(-60, -20);
					slave.trust = jsRandom(-60, 40);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-60, 60);
					setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, jsRandom(30, 80));
					break;
				}
				case "smuggler": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for smuggling goods into the Free City.";
					V.prisonCrime = "is incarcerated for smuggling goods.";
					slave.career = "a smuggler";
					slave.devotion = jsRandom(-80, -20);
					slave.trust = jsRandom(-100, 40);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(0, 60);
					setHealth(slave, jsRandom(-20, 40), undefined, undefined, undefined, jsRandom(30, 80));
					break;
				}
				case "fence": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for dealing in stolen goods.";
					V.prisonCrime = "is incarcerated for buying and selling stolen goods.";
					slave.career = "a fence";
					slave.devotion = jsRandom(-100, -20);
					slave.trust = jsRandom(-20, 40);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-60, 30);
					setHealth(slave, jsRandom(-20, 60), undefined, undefined, undefined, jsRandom(30, 80));
					break;
				}
				case "gang murderer": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for gang related murder.";
					V.prisonCrime = "is incarcerated for gang related murders.";
					slave.career = "a gang member";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(0, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([-30, -20, 0, 0, 20, 40, 60]);
					slave.behavioralFlaw = "arrogant";
					setHealth(slave, jsRandom(-20, 20), Math.max(normalRandInt(5, 3), 0), Math.max(normalRandInt(5, 3), 0), undefined, jsRandom(20, 70));
					slave.muscles = jsRandom(20, 80);
					slave.chem = 10 * jsRandom(1, 3);
					slave.custom.tattoo = "The prominent emblem of a local gang spans the length of his shoulders.";
					slave.skill.combat = 1;
					break;
				}
				case "gang assaulter": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for gang related extortion of local businesses.";
					V.prisonCrime = "is incarcerated for gang related activities.";
					slave.career = "a gang member";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(0, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-100, 0);
					slave.behavioralFlaw = "arrogant";
					setHealth(slave, jsRandom(-20, 20), Math.max(normalRandInt(5, 3), 0), Math.max(normalRandInt(5, 3), 0), undefined, jsRandom(20, 70));
					slave.muscles = jsRandom(40, 80);
					slave.weight = jsRandom(-30, 10);
					slave.waist = jsRandom(10, 50);
					slave.chem = 10 * jsRandom(1, 3);
					slave.custom.tattoo = "The prominent emblem of a local gang spans the length of $his shoulders.";
					slave.skill.combat = 1;
					break;
				}
				case "gang bruiser": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for a gang related beating of a local businessman.";
					V.prisonCrime = "is incarcerated for gang related activities.";
					slave.career = "a gang member";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(0, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-100, 0);
					slave.behavioralFlaw = "arrogant";
					setHealth(slave, jsRandom(-20, 20), Math.max(normalRandInt(8, 3), 0), Math.max(normalRandInt(8, 3), 0), undefined, jsRandom(20, 60));
					slave.muscles = jsRandom(60, 80);
					slave.weight = jsRandom(-30, 10);
					slave.waist = jsRandom(10, 70);
					slave.chem = 10 * jsRandom(1, 3);
					slave.custom.tattoo = "The prominent emblem of a local gang spans the length of $his shoulders.";
					slave.skill.combat = 1;
					break;
				}
				case "gang thief": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for gang related raiding of several local warehouses.";
					V.prisonCrime = "is incarcerated for gang related activities.";
					slave.career = "a gang member";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(0, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-40, 60);
					slave.behavioralFlaw = "arrogant";
					setHealth(slave, jsRandom(-20, 20), Math.max(normalRandInt(3, 3), 0), Math.max(normalRandInt(3, 3), 0), undefined, jsRandom(20, 70));
					slave.muscles = jsRandom(20, 80);
					slave.weight = jsRandom(-30, 30);
					slave.waist = jsRandom(10, 70);
					slave.chem = 10 * jsRandom(1, 3);
					slave.custom.tattoo = "The prominent emblem of a local gang spans the length of $his shoulders.";
					slave.skill.combat = 1;
					break;
				}
				case "drug peddler": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for gang related drug distribution.";
					V.prisonCrime = "is incarcerated for gang related activities.";
					slave.career = "a drug pusher";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(0, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-40, 60);
					setHealth(slave, jsRandom(-20, 20), Math.max(normalRandInt(3, 3), 0), Math.max(normalRandInt(3, 3), 0), undefined, jsRandom(20, 70));
					slave.muscles = jsRandom(20, 40);
					slave.chem = 10 * jsRandom(3, 5);
					slave.custom.tattoo = "The prominent emblem of a local gang spans the length of $his shoulders.";
					slave.skill.combat = 1;
					break;
				}
				case "hitman": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for a series of high profile murders.";
					V.prisonCrime = "is incarcerated for a series of murders-for-hire.";
					slave.career = "a hitman";
					slave.devotion = jsRandom(-75, -50);
					slave.trust = jsRandom(-60, 25);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(0, 100);
					setHealth(slave, jsRandom(-20, 60), undefined, undefined, undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-30, 10);
					slave.waist = jsRandom(-10, 50);
					slave.muscles = jsRandom(20, 40);
					slave.skill.combat = 1;
					break;
				}
				case "assassin": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for a high profile assassination.";
					V.prisonCrime = "is incarcerated for an assassination.";
					slave.career = "an assassin";
					slave.devotion = -100;
					slave.trust = 100;
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = 100;
					setHealth(slave, jsRandom(-20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-30, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(20, 40);
					slave.skill.combat = 1;
					break;
				}
				case "murder": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for repeat murder.";
					V.prisonCrime = "is incarcerated for murder.";
					slave.career = "a murderer";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(0, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-40, 60);
					setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, jsRandom(30, 80));
					slave.muscles = jsRandom(20, 80);
					slave.skill.combat = 1;
					break;
				}
				case "manslaughter": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for manslaughter.";
					V.prisonCrime = "is incarcerated for manslaughter.";
					slave.career = "a criminal";
					slave.devotion = jsRandom(-20, 50);
					slave.trust = jsRandom(0, 20);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-40, 60);
					setHealth(slave, jsRandom(-40, 0), undefined, undefined, undefined, jsRandom(30, 80));
					break;
				}
				case "attempted murder": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for attempted murder of a prominent individual.";
					V.prisonCrime = "is incarcerated for an attempted murder.";
					slave.career = "a criminal";
					slave.devotion = jsRandom(-20, 50);
					slave.trust = jsRandom(0, 20);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-100, 0);
					setHealth(slave, jsRandom(-40, 0), undefined, undefined, undefined, jsRandom(30, 80));
					break;
				}
			}
			break;
		}
		case "military prison": {
			if (V.pedo_mode === 1) {
				SGProp.minAge = 12;
				SGProp.maxAge = 18;
				SGProp.ageOverridesPedoMode = 1;
			} else {
				SGProp.minAge = 18;
				if (V.retirementAge > 56) {
					SGProp.maxAge = 55;
				} else {
					SGProp.maxAge = V.retirementAge-2;
				}
			}
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("", SGProp);

			/*
				if (slave.dick > 0) {
					slave.chastityPenis = 1
				}
				if (slave.vagina > -1) {
					slave.chastityVagina = 1
				}
			*/

			criminal = setup.militaryCriminalPool.random();

			switch (criminal) {
				case "spy": {
					slave.origin = "You purchased $his life at a prison sale. $He was a spy captured while infiltrating the Free City.";
					V.prisonCrime = "is incarcerated for spying.";
					slave.career = "a spy";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = -100;
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(20, 100);
					slave.intelligenceImplant = 30;
					setHealth(slave, jsRandom(-40, 20), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(5, 4), 0), undefined, jsRandom(10, 40));
					slave.weight = jsRandom(-30, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(20, 40);
					slave.skill.combat = 1;
					break;
				}
				case "terrorist": {
					slave.origin = "You purchased $his life at a prison sale. $He was a terrorist captured when $his attempt to destroy a public building and the people within was foiled.";
					V.prisonCrime = "is incarcerated for terrorism.";
					slave.career = "a terrorist";
					slave.devotion = jsRandom(-80, -20);
					slave.trust = -100;
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-100, 0);
					setHealth(slave, jsRandom(-50, 20), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(10, 4), 0), undefined, jsRandom(40, 90));
					slave.weight = jsRandom(-100, 10);
					slave.waist = jsRandom(-10, 10);
					break;
				}
				case "war criminal": {
					slave.origin = "You purchased $his life at a prison sale. $He was a soldier imprisoned for committing unspeakable atrocities, even by the standards of an apocalyptic slave trading society.";
					V.prisonCrime = "is incarcerated for a series of war crimes.";
					slave.career = "a soldier";
					slave.devotion = jsRandom(-100, -80);
					slave.trust = jsRandom(20, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-20, 100);
					slave.intelligenceImplant = 30;
					setHealth(slave, jsRandom(-40, 60), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(5, 4), 0), undefined, jsRandom(30, 80));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(20, 60);
					slave.skill.combat = 1;
					slave.behavioralFlaw = "arrogant";
					break;
				}
				case "deserter": {
					slave.origin = "You purchased $his life at a prison sale. $He was a soldier that abandoned $his post.";
					V.prisonCrime = "is incarcerated for going A.W.O.L.";
					slave.career = "a soldier";
					slave.devotion = jsRandom(-100, -80);
					slave.trust = jsRandom(-100, -80);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-60, 40);
					setHealth(slave, jsRandom(-40, 60), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(5, 4), 0), undefined, jsRandom(30, 80));
					slave.weight = jsRandom(-50, 10);
					slave.waist = jsRandom(-10, 10);
					slave.skill.combat = 1;
					break;
				}
				case "officer": {
					slave.origin = "You purchased $his life at a prison sale. $He was an officer that over-extended $his forces and was overwhelmed.";
					V.prisonCrime = "is a captured enemy officer.";
					slave.career = "a military officer";
					slave.devotion = jsRandom(-40, 20);
					slave.trust = jsRandom(-50, 0);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(0, 100);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(0, 60), undefined, Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(20, 40);
					slave.skill.combat = 1;
					break;
				}
				case "specOps": {
					slave.origin = "You purchased $his life at a prison sale. $He was a special operations officer that acted on bad intel and ended up captured.";
					V.prisonCrime = "is a captured enemy special operations officer.";
					slave.career = "spec ops";
					slave.devotion = jsRandom(-80, -50);
					slave.trust = jsRandom(-100, 100);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([60, 80, 100]);
					slave.intelligenceImplant = 30;
					setHealth(slave, jsRandom(0, 60), undefined, Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(30, 60);
					slave.skill.combat = 1;
					break;
				}
				case "sniper": {
					slave.origin = "You purchased $his life at a prison sale. $He was an enemy sniper that was captured after $his company lost to your military might.";
					V.prisonCrime = "is a captured enemy sniper.";
					slave.career = "a sniper";
					slave.devotion = jsRandom(-50, -20);
					slave.trust = jsRandom(-100, -80);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([60, 80, 100]);
					slave.intelligenceImplant = 20;
					setHealth(slave, jsRandom(0, 20), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(0, 4), 0), undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(30, 60);
					slave.skill.combat = 1;
					if (slave.boobs > 400) {
						slave.boobs = 400;
					}
					break;
				}
				case "gunner": {
					slave.origin = "You purchased $his life at a prison sale. $He was an enemy machine gunner that was captured after $his company lost to your military might.";
					V.prisonCrime = "is a captured enemy gunner.";
					slave.career = "a soldier";
					slave.devotion = jsRandom(-50, -20);
					slave.trust = jsRandom(-50, -20);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(0, 90);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(0, 20), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(5, 4), 0), undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(50, 60);
					slave.skill.combat = 1;
					break;
				}
				case "soldier": {
					slave.origin = "You purchased $his life at a prison sale. $He was an enemy soldier that was captured after $his company lost to your military might.";
					V.prisonCrime = "is a captured enemy soldier.";
					slave.career = "a soldier";
					slave.devotion = jsRandom(-100, -20);
					slave.trust = jsRandom(-50, 20);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(0, 60);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(0, 40), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(5, 4), 0), undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(30, 60);
					slave.skill.combat = 1;
					break;
				}
				case "private": {
					slave.origin = "You purchased $his life at a prison sale. $He was an enemy grunt that was captured after $his company lost to your military might.";
					V.prisonCrime = "is a captured enemy private.";
					slave.career = "a private";
					slave.devotion = jsRandom(-40, -20);
					slave.trust = jsRandom(-100, -80);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-90, 70);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(0, 20), Math.max(normalRandInt(5, 4), 0), Math.max(normalRandInt(0, 4), 0), undefined, jsRandom(30, 80));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(10, 40);
					slave.skill.combat = 1;
					break;
				}
			}
			break;
		}
		case "white collar": {
			if (V.pedo_mode === 1) {
				SGProp.minAge = 16;
				SGProp.maxAge = 45;
				SGProp.ageOverridesPedoMode = 1;
			} else {
				SGProp.minAge = 25;
				if (V.retirementAge > 66) {
					SGProp.maxAge = 65;
				} else {
					SGProp.maxAge = V.retirementAge-2;
				}
			}
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("", SGProp);

			criminal = setup.whiteCollarCriminalPool.random();

			switch (criminal) {
				case "racketeering": {
					slave.career = jsEither(["a businessman", "a lawyer", "a stockbroker"]);
					slave.origin = `You purchased $his life at a prison sale. $He was convicted of racketeering.`;
					V.prisonCrime = "is incarcerated for racketeering.";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(-20, 20);
					slave.intelligence = jsRandom(0, 99);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(30, 60));
					break;
				}
				case "bribery": {
					slave.career = jsEither(["a businessman", "a lawyer", "a stockbroker"]);
					slave.origin = `You purchased $his life at a prison sale. $He was arrested and sentenced for bribing government officials.`;
					V.prisonCrime = "is incarcerated for bribery.";
					slave.devotion = jsRandom(-50, -20);
					slave.trust = jsRandom(20, 50);
					slave.intelligence = jsRandom(0, 99);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(30, 60));
					slave.behavioralFlaw = "arrogant";
					break;
				}
				case "blackmail": {
					slave.career = jsEither(["a businessman", "a lawyer", "a stockbroker"]);
					slave.origin = `You purchased $his life at a prison sale. $He was convicted of blackmail against a sorority of university students, forcing them to do sexual favors.`;
					V.prisonCrime = "is incarcerated for blackmail.";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(20, 50);
					slave.intelligence = jsRandom(0, 99);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(30, 60));
					slave.behavioralFlaw = "arrogant";
					slave.fetish = "sadist";
					slave.fetishStrength = 100;
					break;
				}
				case "embezzlement": {
					slave.career = jsEither(["a businessman", "a lawyer", "a stockbroker"]);
					slave.origin = `You purchased $his life at a prison sale. $He was involved in a scandal and convicted of embezzlement.`;
					V.prisonCrime = "is incarcerated for embezzlement.";
					slave.devotion = jsRandom(0, 20);
					slave.trust = jsRandom(-10, 10);
					slave.intelligence = jsRandom(0, 99);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(30, 60));
					break;
				}
				case "fraud": {
					slave.career = jsEither(["a businessman", "a lawyer", "a stockbroker"]);
					slave.origin = `You purchased $his life at a prison sale. $He was convicted of fraud.`;
					V.prisonCrime = "is incarcerated for fraud.";
					slave.devotion = jsRandom(20, 40);
					slave.trust = jsRandom(20, 50);
					slave.intelligence = jsRandom(0, 99);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(30, 60));
					break;
				}
				case "tax evasion": {
					slave.career = jsEither(["a businessman", "a lawyer", "a stockbroker"]);
					slave.origin = `You purchased $his life at a prison sale. $He was convicted of tax evasion.`;
					V.prisonCrime = "is incarcerated for tax evasion.";
					slave.devotion = jsRandom(-20, 0);
					slave.trust = jsRandom(20, 50);
					slave.intelligence = jsRandom(0, 99);
					slave.intelligenceImplant = 15;
					setHealth(slave, jsRandom(20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(30, 60));
					break;
				}

				case "malpractice": {
					slave.career = jsEither(["a doctor", "a nurse", "a physician"]);
					slave.origin = `You purchased $his life at a prison sale. $He was ${slave.career} that took advantage of $his position to molest and modify $his patients.`;
					V.prisonCrime = "is incarcerated for malpractice.";
					slave.devotion = jsRandom(-50, 0);
					slave.trust = jsRandom(-100, -50);
					slave.intelligence = jsRandom(55, 99);
					slave.intelligenceImplant = 30;
					setHealth(slave, jsRandom(-40, 20), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(40, 70));
					break;
				}
				case "abuse of power": {
					slave.career = jsEither(["a judge", "a lawyer", "a police officer"]);
					slave.origin = `You purchased $his life at a prison sale. $He was ${slave.career} that took advantage of $his position for $his own benefit.`;
					V.prisonCrime = "is incarcerated for abuse of power.";
					slave.devotion = jsRandom(-100, 0);
					slave.trust = jsRandom(-50, 50);
					slave.intelligence = jsRandom(60, 99);
					slave.intelligenceImplant = 30;
					setHealth(slave, jsRandom(20, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(30, 60));
					slave.behavioralFlaw = "arrogant";
					break;
				}
			}
			break;
		}
		case "low tier criminals": {
			if (V.pedo_mode === 1) {
				SGProp.minAge = 6;
				SGProp.maxAge = 18;
				SGProp.ageOverridesPedoMode = 1;
			} else {
				SGProp.minAge = 16;
				if (V.retirementAge > 56) {
					SGProp.maxAge = 55;
				} else {
					SGProp.maxAge = V.retirementAge-2;
				}
			}
			SGProp.disableDisability = 1;
			slave = GenerateNewSlave("", SGProp);

			/*
				if (slave.dick > 0) {
					slave.chastityPenis = 1;
				}
				if (slave.vagina > -1) {
					slave.chastityVagina = 1;
				}
			*/

			criminal = setup.pettyCriminalPool.random();

			switch (criminal) {
				case "robbery": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for robbery.";
					V.prisonCrime = "is incarcerated for robbery.";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(-60, 60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([-100, -100, -80, -60, -40, -30, -20, -5, 0, 5, 20]);
					setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, jsRandom(20, 70));
					break;
				}
				case "armed robbery": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for armed robbery.";
					V.prisonCrime = "is incarcerated for armed robbery.";
					slave.devotion = jsRandom(-50, -20);
					slave.trust = jsRandom(-20, 60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-80, 60);
					setHealth(slave, jsRandom(-10, 20), undefined, Math.max(normalRandInt(0, 4), 0), undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(10, 40);
					slave.skill.combat = 1;
					break;
				}
				case "murder": {
					if (jsRandom(1, 100) > 70) {
						slave.origin = "You purchased $his life at a prison sale. $He was locked away for murder. $His actions weigh heavily on $his conscience.";
						slave.devotion = 0;
						slave.trust = 0;
						setHealth(slave, jsRandom(-50, 20), Math.max(normalRandInt(0, 4), 0), Math.max(normalRandInt(0, 4), 0), undefined, jsRandom(40, 90));
						slave.fetish = "mindbroken";
					} else {
						slave.origin = "You purchased $his life at a prison sale. $He was locked away for murder.";
						slave.devotion = jsRandom(-50, -20);
						slave.trust = jsRandom(-20, 60);
						setHealth(slave, jsRandom(-10, 20), undefined, undefined, undefined, jsRandom(20, 70));
					}
					V.prisonCrime = "is incarcerated for murder.";
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-80, 70);
					break;
				}
				case "arson": {
					if (jsRandom(1, 100) > 50) {
						slave.origin = "You purchased $his life at a prison sale. $He was locked away for arson. $His actions, and those $he inadvertently killed, weigh heavily on $his conscience.";
						slave.devotion = 0;
						slave.trust = 0;
						setHealth(slave, jsRandom(-50, 20), Math.max(normalRandInt(0, 4), 0), Math.max(normalRandInt(0, 4), 0), undefined, jsRandom(40, 90));
						slave.fetish = "mindbroken";
					} else {
						slave.origin = "You purchased $his life at a prison sale. $He was locked away for arson.";
						slave.devotion = jsRandom(-70, -50);
						slave.trust = jsRandom(0, 60);
						setHealth(slave, jsRandom(-10, 20), undefined, undefined, undefined, jsRandom(20, 70));
					}
					V.prisonCrime = "is incarcerated for arson.";
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-80, 70);
					break;
				}
				case "burglary": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for burglary.";
					V.prisonCrime = "is incarcerated for burglary.";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(-60, 60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-100, 20);
					setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, jsRandom(20, 70));
					break;
				}
				case "cat burglar": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for repeat burglary.";
					V.prisonCrime = "is incarcerated for career burglary.";
					slave.career = "a cat burglar";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(-60, 60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([60, 80, 100]);
					setHealth(slave, jsRandom(0, 60), undefined, undefined, undefined, jsRandom(10, 50));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(10, 40);
					break;
				}
				case "petty theft": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for petty theft.";
					V.prisonCrime = "is incarcerated for petty theft.";
					slave.career = "a thief";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(-100, -60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([-100, -100, -80, -60, -40, -30, -20, -5, 0, 5, 20]);
					setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, jsRandom(20, 70));
					break;
				}
				case "theft": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for theft.";
					V.prisonCrime = "is incarcerated for theft.";
					slave.career = "a thief";
					slave.devotion = jsRandom(-50, 0);
					slave.trust = jsRandom(-100, -60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-80, 70);
					setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, jsRandom(20, 70));
					break;
				}
				case "pickpocketing": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for repeat pick-pocketing.";
					V.prisonCrime = "is incarcerated for pick-pocketing.";
					slave.career = "a pick-pocket";
					slave.devotion = jsRandom(-20, 0);
					slave.trust = jsRandom(-100, -60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-80, 70);
					setHealth(slave, jsRandom(-60, 0), undefined, Math.max(normalRandInt(5, 4), 0), undefined, jsRandom(20, 70));
					break;
				}
				case "manslaughter": {
					if (jsRandom(1, 100) > 60) {
						slave.origin = "You purchased $his life at a prison sale. $He was locked away for manslaughter. $His actions weigh heavily on $his conscience.";
						slave.devotion = 0;
						slave.trust = 0;
						setHealth(slave, jsRandom(-50, -20), Math.max(normalRandInt(0, 4), 0), Math.max(normalRandInt(0, 4), 0), undefined, jsRandom(40, 90));
						slave.fetish = "mindbroken";
					} else {
						slave.origin = "You purchased $his life at a prison sale. $He was locked away for manslaughter.";
						slave.devotion = jsRandom(-70, -50);
						slave.trust = jsRandom(0, 60);
						setHealth(slave, jsRandom(-10, 20), undefined, undefined, undefined, jsRandom(20, 70));
					}
					V.prisonCrime = "is incarcerated for manslaughter.";
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsRandom(-80, 70);
					break;
				}
				case "blackmail": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for blackmail.";
					V.prisonCrime = "is incarcerated for blackmail.";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(-100, -60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = jsEither([60, 80, 100]);
					setHealth(slave, jsRandom(0, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(20, 50));
					break;
				}
				case "assault": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for assault.";
					V.prisonCrime = "is incarcerated for assault.";
					slave.devotion = jsRandom(-70, -50);
					slave.trust = jsRandom(-20, 60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-10, 40), undefined, undefined, undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(30, 60);
					slave.skill.combat = 1;
					break;
				}
				case "battery": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for battery.";
					V.prisonCrime = "is incarcerated for battery.";
					slave.devotion = jsRandom(-100, -70);
					slave.trust = jsRandom(20, 60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-10, 40), undefined, undefined, undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(40, 60);
					slave.skill.combat = 1;
					break;
				}
				case "tax evasion": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for tax evasion.";
					V.prisonCrime = "is incarcerated for tax evasion.";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(0, 60);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					slave.intelligence = Intelligence.random({limitIntelligence: [0, 100]});
					setHealth(slave, jsRandom(0, 60), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), undefined, jsRandom(20, 70));
					break;
				}
				case "rape": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for rape.";
					V.prisonCrime = "is incarcerated for rape.";
					slave.devotion = jsRandom(-100, -50);
					slave.trust = jsRandom(-20, 80);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-10, 40), undefined, undefined, undefined, jsRandom(20, 70));
					slave.weight = jsRandom(-10, 10);
					slave.waist = jsRandom(-10, 10);
					slave.muscles = jsRandom(30, 60);
					slave.fetish = "sadist";
					slave.fetishStrength = 80;
					break;
				}
				case "child molestation": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for child molestation.";
					V.prisonCrime = "is incarcerated for child molestation.";
					if (V.minimumSlaveAge < 13) {
						slave.devotion = jsRandom(-20, 0);
						slave.trust = jsRandom(-20, 0);
					} else {
						slave.devotion = jsRandom(-50, -20);
						slave.trust = jsRandom(-100, 0);
					}
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-10, 40), Math.max(normalRandInt(5, 4), 0), undefined, undefined, jsRandom(40, 90));
					slave.muscles = jsRandom(10, 40);
					slave.fetish = "sadist";
					slave.fetishStrength = 80;
					break;
				}
				case "child abuse": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for child abuse.";
					V.prisonCrime = "is incarcerated for child abuse.";
					if (V.minimumSlaveAge < 13) {
						slave.devotion = jsRandom(-20, 0);
						slave.trust = jsRandom(-20, 50);
					} else {
						slave.devotion = jsRandom(-50, -20);
						slave.trust = jsRandom(-50, 50);
					}
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-10, 40), undefined, undefined, undefined, jsRandom(20, 70));
					slave.muscles = jsRandom(10, 40);
					slave.fetish = "sadist";
					slave.fetishStrength = 100;
					slave.sexualFlaw = "malicious";
					break;
				}
				case "domestic abuse": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for domestic abuse.";
					V.prisonCrime = "is incarcerated for domestic abuse.";
					slave.devotion = jsRandom(-50, -20);
					slave.trust = jsRandom(-100, 50);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-10, 40), undefined, undefined, undefined, jsRandom(20, 70));
					slave.muscles = jsRandom(10, 40);
					slave.fetish = "sadist";
					slave.fetishStrength = 50;
					break;
				}
				case "illegal immigrant": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for illegal immigration.";
					V.prisonCrime = "is incarcerated for illegally entering the Free City.";
					slave.career = "a refugee";
					slave.devotion = jsRandom(0, 20);
					slave.trust = jsRandom(-100, -50);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-50, -40), Math.max(normalRandInt(10, 4), 0), Math.max(normalRandInt(10, 4), 0), undefined, jsRandom(40, 90));
					break;
				}
				case "mule": {
					slave.origin = "You purchased $his life at a prison sale. $He was locked away for smuggling illegal contraband inside $his body.";
					V.prisonCrime = "is incarcerated for smuggling drugs in $his body.";
					slave.career = "a drug mule";
					slave.devotion = jsRandom(-20, 20);
					slave.trust = jsRandom(0, 25);
					slave.hStyle = "buzzcut";
					slave.hLength = 0;
					setHealth(slave, jsRandom(-50, 20), undefined, undefined, undefined, jsRandom(20, 70));
					if (slave.ovaries === 1 && slave.vagina > 0) {
						slave.vagina = 4;
						slave.bellySag += 5;
					}
					slave.anus = 4;
					slave.bellySag += 5;
					slave.chem = 10 * jsRandom(1, 3);
					slave.addict = 100;
					break;
				}
			}
			break;
		}
		default: {
			r += "Someone messed up. Market is not known.";
			break;
		}
	}
	if (!pronounsGenerated) {
		generatePronouns(slave);
	}
	return {text: r, slave: slave};
};

src/js/generateMarketSlave.js