code:
App.Markets["Custom Slave"] = function() {
	const el = document.createElement("p");
	const slave = V.customSlave;
	el.append(intro());
	el.append(age());
	el.append(health());
	el.append(muscles());
	el.append(lips());
	el.append(voice());
	el.append(height());
	el.append(weight());
	el.append(face());
	el.append(race());
	el.append(skin());
	el.append(hairColor());
	el.append(eyesColor());
	el.append(boobs());
	el.append(butt());
	el.append(sex());
	el.append(virgin());
	el.append(dick());
	el.append(balls());
	el.append(clit());
	el.append(labia());
	el.append(vaginaLube());
	el.append(analVirgin());
	el.append(skills());
	el.append(skillWhore());
	el.append(skillCombat());
	el.append(intelligence());
	el.append(intelligenceImplant());
	el.append(eyes());
	el.append(hears());
	el.append(smells());
	el.append(tastes());
	el.append(limbs());
	el.append(nationality());

	// Links to reset things
	el.append(reset());
	el.append(orderControls());

	return el;

	function intro() {
		const {heA} = getPronouns(assistant.pronouns().main).appendSuffix('A');
		let r = [];
		if (V.customSlaveOrdered === 0) {
			r.push(`You work up a new slave order for posting where slave merchants can work to fulfill it.`);
		} else {
			r.push(`You review your posted slave order.`);
		}
		if (V.assistant.personality === 1) {
			r.push(`As you work, ${V.assistant.name} makes lewd comments about what ${heA} looks forward to doing to this new slave.`);
		}
		r.push(`Your order requests a slave with the following characteristics:`);
		return App.UI.DOM.makeElement("p", r.join(" "));
	}

	function age() {
		const el = document.createElement("div");
		const ages = [2, 4, 6, 9, 12, 14, 17, 19, 24, 29, 39, 49, 59, 69, 79, 89, 99, 109, 119, 129, 130];

		createDescription(el, description, "age");

		// Choices
		const options = [];
		for (let i = 0; i < ages.length; i++) {
			const high = ages[i];
			const low = (ages[i - 1] + 1) || (ages[i] - 1); // First element of array has nothing before it, obviously, so display low as one less than high.
			if (low < V.minimumSlaveAge) {
				continue;
			} else if (high > V.retirementAge) {
				options.push({key: low.toString(), name: `${low}+`});
				break;
			}

			options.push({key: high.toString(), name: `${low}-${high}`});
		}
		el.append(App.UI.DOM.makeSelect(options, slave.age.toString(), a => {
			slave.age = Number(a);
			jQuery("#age-text").empty().append(description());
		}));
		return el;

		function description() {
			// Age is displayed as a range, but recorded as the higher of the two numbers in the range
			const highIndex = ages.indexOf(slave.age);

			if (highIndex === 0) {
				return `${(ages[highIndex] - 1)}-${ages[highIndex]} years old. `;
			} else if (highIndex === ages.length) {
				// Highest possible number
				return `${ages[highIndex]}+ years old. `;
			} else {
				// Lower age should be the previous number in the array, +1
				return `${(ages[highIndex - 1]) + 1}-${ages[highIndex]} years old. `;
			}
		}
	}

	function health() {
		const el = document.createElement("div");
		const slaveProperty = "health";
		const choices = new Map([
			[1, "Extremely healthy"],
			[0, "Healthy"],
		]);
		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.health === value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function muscles() {
		const el = document.createElement("div");
		const slaveProperty = "muscles";
		const choices = new Map([
			[96, "Ripped"],
			[65, "Muscular"],
			[45, "Well built"],
			[20, "Toned"],
			[0, "Normal"],
			[-21, "Weak"],
			[-51, "Very weak"],
			[-97, "Frail"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.muscles >= value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function lips() {
		const el = document.createElement("div");
		const slaveProperty = "lips";
		const choices = new Map([
			[100, "Facepussy"],
			[85, "Enormous"],
			[65, "Big"],
			[35, "Plush"],
			[15, "Normal"],
			[5, "Thin"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.lips >= value) {
					if (value < 100) {
						return `Lips are ${text.toLowerCase()}. `;
					} else {
						return `Lips are a ${text.toLowerCase()}. `;
					}
				}
			}
		}

		return el;
	}

	function voice() {
		const el = document.createElement("div");
		const slaveProperty = "voice";
		const choices = new Map([
			[3, "High, girly"],
			[2, "Feminine"],
			[1, "Deep"],
			[0, "Mute"],
			[-1, "Voice is unimportant"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.voice === value) {
					if (slave.voice === -1) {
						return `${text}. `;
					} else {
						return `${text} voice. `;
					}
				}
			}
			return `Voice is unimportant. `;
		}

		return el;
	}

	function height() {
		const el = document.createElement("div");
		const slaveProperty = "heightMod";
		const choices = new Map([
			["greatly below average", "Petite"],
			["below average", "Short"],
			["normal", "Average"],
			["above average", "Tall"],
			["greatly above average", "Very tall"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.heightMod === value) {
					return `${text} height. `;
				}
			}
		}

		return el;
	}

	function weight() {
		const el = document.createElement("div");
		const slaveProperty = "weight";
		const choices = new Map([
			[200, "Immobile"],
			[150, "Very Fat"],
			[100, "Fat"],
			[50, "Chubby"],
			[15, "Plush"],
			[0, "Average"],
			[-15, "Thin"],
			[-50, "Very thin"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.weight >= value) {
					return `${text} weight. `;
				}
			}
		}

		return el;
	}

	function face() {
		const el = document.createElement("div");
		const slaveProperty = "face";
		const choices = new Map([
			[55, "Very attractive"],
			[15, "Attractive"],
			[0, "Average"],
			[-15, "Unattractive"],
			[-55, "Very unattractive"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.face >= value) {
					return `${text} face. `;
				}
			}
		}

		return el;
	}

	function race() {
		const el = document.createElement("div");
		const slaveProperty = "race";
		const choices = [{key: "ethnicity is unimportant", name: "Ethnicity is unimportant"}];
		for (const [race, capRace] of App.Data.misc.filterRacesPublic) {
			choices.push({key: race, name: capRace});
		}

		createDescription(el, description, slaveProperty);

		// Choices
		el.append(App.UI.DOM.makeSelect(choices, slave.race, r => {
			slave.race = r;
			jQuery("#race-text").empty().append(description());
		}));

		function description() {
			const el = new DocumentFragment();
			el.append("Ethnicity: ");
			el.append(
				App.UI.DOM.makeTextBox(
					slave.race,
					(v) => {
						slave.race = v;
						jQuery("#race-text").empty().append(description());
					}
				)
			);
			return el;
		}

		return el;
	}

	function skin() {
		const el = document.createElement("div");
		const slaveProperty = "skin";
		const choices = [{key: "left natural", name: "Left natural"}];
		for (const skin of App.Medicine.Modification.naturalSkins) {
			choices.push({key: skin, name: capFirstChar(skin)});
		}

		createDescription(el, description, slaveProperty);

		// Choices
		el.append(App.UI.DOM.makeSelect(choices, slave.skin, s => {
			slave.skin = s;
			jQuery("#skin-text").empty().append(description());
		}));

		function description() {
			const el = new DocumentFragment();
			el.append("Skin tone: ");
			el.append(
				App.UI.DOM.makeTextBox(
					slave.skin,
					(v) => {
						slave.skin = v;
						jQuery("#skin-text").empty().append(description());
					}
				)
			);
			return el;
		}

		return el;
	}

	function hairColor() {
		const el = document.createElement("div");
		const slaveProperty = "hairColor";
		const choices = [{key: "hair color is unimportant", name: "Hair color is unimportant"}];
		for (const hair of App.Medicine.Modification.Color.Primary) {
			choices.push({key: hair.value, name: capFirstChar(hair.value)});
		}

		createDescription(el, description, slaveProperty);

		// Choices
		el.append(App.UI.DOM.makeSelect(choices, slave.hairColor, h => {
			slave.hairColor	= h;
			jQuery("#hairColor-text").empty().append(description());
		}));

		function description() {
			const el = new DocumentFragment();
			el.append("Natural hair color: ");
			el.append(
				App.UI.DOM.makeTextBox(
					slave.hairColor,
					(v) => {
						slave.hairColor = v;
						jQuery("#hairColor-text").empty().append(description());
					}
				)
			);
			return el;
		}

		return el;
	}

	function eyesColor() {
		const el = document.createElement("div");
		const slaveProperty = "eyesColor";
		const choices = [{key: "eye color is unimportant", name: "Eye color is unimportant"}];
		for (const eyes of App.Medicine.Modification.eyeColor) {
			choices.push({key: eyes.value, name: capFirstChar(eyes.value)});
		}

		createDescription(el, description, slaveProperty);

		// Choices
		el.append(App.UI.DOM.makeSelect(choices, slave.eyesColor, e => {
			slave.eyesColor = e;
			jQuery("#eyesColor-text").empty().append(description());
		}));

		function description() {
			const el = new DocumentFragment();
			el.append("Natural eye color: ");
			el.append(
				App.UI.DOM.makeTextBox(
					slave.eyesColor,
					(v) => {
						slave.eyesColor = v;
						jQuery("#eyesColor-text").empty().append(description());
					}
				)
			);
			return el;
		}

		return el;
	}

	function boobs() {
		const el = document.createElement("div");
		const slaveProperty = "boobs";
		const choices = new Map([
			[6000, "Massive"],
			[2100, "Giant"],
			[1400, "Huge"],
			[800, "Big"],
			[500, "Healthy"],
			[200, "Flat"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.boobs >= value) {
					if (slave.boobs <= 200) {
						return `${text} chest. `;
					} else {
						return `${text} breasts. `;
					}
				}
			}
		}

		return el;
	}

	function butt() {
		const el = document.createElement("div");
		const slaveProperty = "butt";
		const choices = new Map([
			[8, "Massive"],
			[5, "Huge"],
			[3, "Healthy"],
			[1, "Flat"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.butt >= value) {
					return `${text} buttocks. `;
				}
			}
		}

		return el;
	}

	function sex() {
		const el = document.createElement("div");
		const slaveProperty = "sex";
		const choices = new Map([
			[3, "Both"],
			[2, "Male"],
			[1, "Female"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			switch (slave.sex) {
				case 3:
					return `Futanari (clit options not applied). `;
				case 2:
					return `Male (pussy options not applied). `;
				case 1:
					return `Female (cock & balls options not applied). `;
			}
		}

		return el;
	}

	function virgin() {
		const el = document.createElement("div");
		const slaveProperty = "virgin";
		const choices = new Map([
			[1, "Not Important"],
			[0, "Vaginal virgin"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.virgin === value) {
					return `${text}. `;
				}
			}
			return `Virginity not important. `;
		}

		return el;
	}

	function dick() {
		const el = document.createElement("div");
		const slaveProperty = "dick";
		const choices = new Map([
			[4, "Large penis"],
			[2, "Small penis"],
			[0, "No penis"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.dick >= value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function balls() {
		const el = document.createElement("div");
		const slaveProperty = "balls";
		const choices = new Map([
			[6, "Huge testicles"],
			[4, "Large testicles"],
			[2, "Small testicles"],
			[0, "No testicles"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.balls >= value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function clit() {
		const el = document.createElement("div");
		const slaveProperty = "clit";
		const choices = new Map([
			[5, "Clit dick"],
			[3, "Enormous clitoris"],
			[1, "Big clitoris"],
			[0, "Normal clitoris"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.clit === 5) {
					return `Pseudophallus. `;
				} else {
					if (slave.clit >= value) {
						return `${text}. `;
					}
				}
			}
		}

		return el;
	}

	function labia() {
		const el = document.createElement("div");
		const slaveProperty = "labia";
		const choices = new Map([
			[3, "Enormous labia"],
			[2, "Huge labia"],
			[1, "Big labia"],
			[0, "Normal labia"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.labia === value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function vaginaLube() {
		const el = document.createElement("div");
		const slaveProperty = "vaginaLube";
		const choices = new Map([
			[2, "Sopping wet vagina"],
			[1, "Wet vagina"],
			[0, "Dry vagina"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.vaginaLube === value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function analVirgin() {
		const el = document.createElement("div");
		const slaveProperty = "analVirgin";
		const choices = new Map([
			[1, "Anal virginity is not important"],
			[0, "Anal virgin"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.analVirgin === value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function skills() {
		const el = document.createElement("div");
		const slaveProperty = "skills";
		const choices = new Map([
			[65, "Expert"],
			[35, "Skilled"],
			[0, "Unskilled"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			if (slave.skills < 35) {
				return `Sexually unskilled. `;
			} else if (slave.skills < 65) {
				return `Sexually skilled. `;
			} else {
				return `Sexually expert. `;
			}
		}

		return el;
	}

	function skillWhore() {
		const el = document.createElement("div");
		const slaveProperty = "skill.whore";
		const choices = new Map([
			[35, "Expert"],
			[15, "Skilled"],
			[0, "Unskilled"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			if (slave.skill.whore <= 10) {
				return `Unskilled at prostitution and entertainment. `;
			} else if (slave.skill.whore <= 15) {
				return `Basic skills at prostitution and entertainment. `;
			} else {
				return `Skilled at prostitution and entertainment. `;
			}
		}

		return el;
	}

	function skillCombat() {
		const el = document.createElement("div");
		const slaveProperty = "skill.combat";
		const choices = new Map([
			[35, "Expert"],
			[15, "Skilled"],
			[0, "Unskilled"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			if (slave.skill.combat <= 10) {
				return `Unskilled at fighting. `;
			} else if (slave.skill.combat <= 30) {
				return `Basic skills at fighting. `;
			} else {
				return `Skilled at fighting. `;
			}
		}

		return el;
	}

	function intelligence() {
		const el = document.createElement("div");
		const slaveProperty = "intelligence";
		const choices = new Map([
			[-3, "Moronic"],
			[-2, "Very stupid"],
			[-1, "Stupid"],
			[0, "Average intelligence"],
			[1, "Smart"],
			[2, "Very smart"],
			[3, "Brilliant"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.intelligence === value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function intelligenceImplant() {
		const el = document.createElement("div");
		const slaveProperty = "intelligenceImplant";
		const choices = new Map([
			[30, "Well educated"],
			[15, "Educated"],
			[0, "Uneducated"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.intelligenceImplant >= value) {
					return `${text}. `;
				}
			}
		}

		return el;
	}

	function eyes() {
		const el = document.createElement("div");

		// Desc setup
		const descText = document.createElement("span");
		descText.id = (`eye-text`);
		descText.append(description());
		el.append(descText);

		const linkArray = [];
		if (V.seeExtreme) {
			linkArray.push(
				App.UI.DOM.link(
					"Blind",
					() => {
						eyeSurgery(slave, "both", "blind");
						jQuery(`#${descText.id}`).empty().append(description());
					}
				)
			);
		}
		linkArray.push(
			App.UI.DOM.link(
				"Nearsighted",
				() => {
					eyeSurgery(slave, "both", "blur");
					jQuery(`#${descText.id}`).empty().append(description());
				}
			)
		);
		linkArray.push(
			App.UI.DOM.link(
				"Normal Vision",
				() => {
					eyeSurgery(slave, "both", "fix");
					jQuery(`#${descText.id}`).empty().append(description());
				}
			)
		);
		el.append(App.UI.DOM.generateLinksStrip(linkArray));

		function description() {
			const vision = getBestVision(slave);
			switch (vision) {
				case 2:
					return "Normal Vision. ";
				case 1:
					return "Nearsighted. ";
				case 0:
					return "Blind. ";
				default:
					return `Error: ${vision}. `;
			}
		}

		return el;
	}

	function hears() {
		const el = document.createElement("div");
		const slaveProperty = "hears";
		const choices = new Map([
			[0, "Normal Hearing"],
			[-1, "Hard of Hearing"],
		]);
		if (V.seeExtreme) {
			choices.set(-2, "Deaf");
		}

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.hears === value) {
					return `${text}. `;
				}
			}
			return `Hard of hearing. `;
		}

		return el;
	}

	function smells() {
		const el = document.createElement("div");
		const slaveProperty = "smells";
		const choices = new Map([
			[0, "Normal Sense of smell"],
			[-1, "No Sense of smell"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.smells === value) {
					return `${text}.`;
				}
			}
			return `Normal Sense of smell. `;
		}

		return el;
	}

	function tastes() {
		const el = document.createElement("div");
		const slaveProperty = "tastes";
		const choices = new Map([
			[0, "Normal Sense of taste"],
			[-1, "No Sense of taste"],
		]);

		createDescription(el, description, slaveProperty);
		el.append(choicesMaker(slaveProperty, choices, description));

		function description() {
			for (const [value, text] of choices) {
				if (slave.tastes === value) {
					return `${text}.`;
				}
			}
			return `Normal Sense of taste. `;
		}

		return el;
	}

	function limbs() {
		const el = new DocumentFragment();
		const limbs = new Map([
			["arm.left", "Left arm"],
			["arm.right", "Right arm"],
			["leg.left", "Left leg"],
			["leg.right", "Right leg"],
		]);

		for (const [value, text] of limbs) {
			const div = document.createElement("div");

			// Desc setup
			const descText = document.createElement("span");
			descText.id = (`${value}-text`).replace(/\./g, "-");
			const hasLimb = (_.get(slave, value) !== null);
			descText.append(description(hasLimb, text));
			div.append(descText);

			const linkArray = [];
			linkArray.push(
				App.UI.DOM.link(
					"Add",
					() => {
						const limb = value.startsWith("leg.") ? new App.Entity.LegState() : new App.Entity.ArmState();
						_.set(slave, value, limb);
						jQuery(`#${descText.id}`).empty().append(description(true, text));
					}
				)
			);
			linkArray.push(
				App.UI.DOM.link(
					"Remove",
					() => {
						_.set(slave, value, null);
						jQuery(`#${descText.id}`).empty().append(description(false, text));
					}
				)
			);
			div.append(App.UI.DOM.generateLinksStrip(linkArray));

			el.append(div);
		}

		function description(hasLimb, text) {
			return `${text}: ${(hasLimb) ? `Yes` : `No`}. `;
		}

		return el;
	}

	function nationality() {
		const el = document.createElement("div");
		const slaveProperty = "nationality";
		const choices = [{key: "slave", name: "Slave"},
			{key: "Stateless", name: "Stateless"},
			{key: "Nationality is unimportant", name: "Nationality is unimportant"},
		];
		for (const nationality of App.Data.misc.baseNationalities) {
			choices.push({key: nationality, name: nationality});
		}

		createDescription(el, description, slaveProperty);

		// Choices
		el.append(App.UI.DOM.makeSelect(choices, slave.nationality, nat => {
			slave.nationality = nat;
			jQuery("#nationality-text").empty().append(description());
		}));

		function description() {
			for (const choice of choices) {
				if (slave.nationality === choice.key) {
					return `${choice.name}. `;
				}
			}
		}

		return el;
	}

	function reset() {
		return App.UI.DOM.makeElement(
			"p",
			App.UI.DOM.link(
				"Reset custom order form",
				() => {
					V.customSlave = new App.Entity.CustomSlaveOrder();
					V.market = new App.Markets.Global("Custom Slave");
				},
				[],
				"Market"
			)
		);
	}

	function orderControls() {
		const linkArray = [];
		if (V.customSlaveOrdered === 1) {
			linkArray.push(
				App.UI.DOM.passageLink(
					"Update custom slave order",
					"Buy Slaves"
				)
			);
			linkArray.push(
				App.UI.DOM.link(
					"Withdraw custom slave order",
					() => { V.customSlaveOrdered = 0; },
					[],
					"Buy Slaves"
				)
			);
		} else {
			linkArray.push(
				App.UI.DOM.link(
					"Post custom slave order",
					() => { V.customSlaveOrdered = 1; },
					[],
					"Buy Slaves"
				)
			);
		}

		return App.UI.DOM.makeElement("p", App.UI.DOM.generateLinksStrip(linkArray));
	}

	/**
	 *
	 * @param {HTMLElement} element
	 * @param {Function} text
	 * @param {string} id
	 */
	function createDescription(element, text, id) {
		const span = document.createElement('span');
		span.id = (`${id}-text`).replace(/\./g, "-");
		span.append(text());
		element.append(span);
	}

	/**
	 *
	 * @param {string} slaveParam
	 * @param {Map} choices
	 * @param {Function} description
	 */
	function choicesMaker(slaveParam, choices, description) {
		const linkArray = [];
		for (const [value, text] of choices) {
			linkArray.push(
				App.UI.DOM.link(
					text,
					() => {
						_.set(slave, slaveParam, value);
						jQuery(`#${(slaveParam).replace(/\./g, "-")}-text`).empty().append(description());
					}
				)
			);
		}
		return App.UI.DOM.generateLinksStrip(linkArray);
	}
};


code:
App.Markets["Elite Slave"] = function() {
	const el = new DocumentFragment();

	el.append(`You check to see if any potential breeding slaves are on auction. `);
	if (V.eliteAuctioned === 1) {
		el.append(`There are none available right now, but there probably will be next week. `);
	} else {
		V.eliteAuctioned = 1;

		let minAge;
		let maxAge;
		if (V.arcologies[0].FSMaturityPreferentialist > 20) {
			minAge = 25;
		} else {
			minAge = V.fertilityAge;
		}
		if (V.arcologies[0].FSYouthPreferentialist > 20) {
			maxAge = 23;
		} else {
			maxAge = 40;
		}
		let race;
		if (FutureSocieties.isActive('FSSupremacist')) {
			race = V.arcologies[0].FSSupremacistRace;
		} else if (FutureSocieties.isActive('FSSubjugationist')) {
			let races = ["amerindian", "asian", "asian", "asian", "asian", "asian", "asian", "black", "black", "indo-aryan", "indo-aryan", "latina", "latina", "latina", "malay", "malay", "middle eastern", "middle eastern", "mixed race", "pacific islander", "semitic", "semitic", "southern european", "southern european", "white", "white", "white", "white", "white", "white", "white", "white", "white"];
			races.deleteAll(V.arcologies[0].FSSubjugationistRace);
			race = races.random();
		}
		let slave = GenerateNewSlave("XX", {
			minAge: minAge, maxAge: maxAge, ageOverridesPedoMode: 1, race: race, disableDisability: 1
		});
		slave.origin = "$He was purchased from a member of the Elite.";
		slave.career = "a slave";
		slave.prestige = 1;
		slave.trust = random(60, 100);
		slave.devotion = random(60, 100);
		if (!heightPass(slave)) {
			if (V.arcologies[0].FSPetiteAdmiration > 20) {
				slave.natural.height = Height.randomAdult(slave, {limitMult: [-4, -2]});
			} else if (V.arcologies[0].FSStatuesqueGlorification > 20) {
				slave.natural.height = Height.randomAdult(slave, {limitMult: [3, 5]});
			}
			slave.height = Height.forAge(slave.natural.height, slave);
		}
		if (V.arcologies[0].FSPaternalist > 20) {
			setHealth(slave, 100, 0, 0, 0, 0);
			slave.intelligenceImplant = 30;
		} else {
			setHealth(slave, jsRandom(10, 60), undefined, undefined, 0);
			slave.intelligenceImplant = either(0, 15, 30);
		}
		let weightMin;
		let weightMax;
		if (V.arcologies[0].FSSlimnessEnthusiast > 20) {
			if (V.arcologies[0].FSHedonisticDecadence > 20 || V.arcologies[0].FSPhysicalIdealistLaw === 1) {
				weightMax = 30;
			} else {
				weightMax = 0;
			}
		} else if (V.arcologies[0].FSPhysicalIdealistLaw === 1) {
			weightMax = 30;
		} else {
			weightMax = 100;
		}
		if (V.arcologies[0].FSHedonisticDecadence > 20) {
			if (V.arcologies[0].FSSlimnessEnthusiast > 20) {
				weightMin = 10;
			} else {
				weightMin = 95;
			}
		} else {
			weightMin = -70;
		}
		slave.weight = random(weightMin, weightMax);

		let musclesMin;
		let musclesMax;
		if (V.arcologies[0].FSPhysicalIdealist > 20) {
			if (V.arcologies[0].FSPhysicalIdealistLaw === 1) {
				musclesMin = 20;
				musclesMax = 50;
			} else {
				musclesMin = 95;
				musclesMax = 100;
			}
		} else if (V.arcologies[0].FSHedonisticDecadence > 20) {
			if (V.arcologies[0].FSHedonisticDecadenceStrongFat === 1) {
				musclesMin = 50;
				musclesMax = 100;
			} else {
				musclesMin = -100;
				musclesMax = 50;
			}
		} else {
			musclesMin = -50;
			musclesMax = 50;
		}
		slave.muscles = random(musclesMin, musclesMax);
		if (V.arcologies[0].FSPhysicalIdealist > 20) {
			slave.height += 5;
		}
		eyeSurgery(slave, "both", "normal");
		slave.hears = 0;
		if (slave.weight < -30) {
			slave.waist = random(-55, 0);
		} else if (slave.physicalAge < 13) {
			slave.waist = random(-25, 25);
		} else if (slave.weight <= 30) {
			slave.waist = random(-45, 5);
		} else if (slave.weight <= 160) {
			slave.waist = random(-20, 10);
		}
		if (slave.voice < 2) {
			slave.voice++;
		}
		if (slave.accent > 1) {
			slave.accent = 1;
		}
		if (slave.shoulders > 0) {
			slave.shoulders -= 2;
		}
		if (V.arcologies[0].FSAssetExpansionist > 20) {
			slave.boobs = (random(50, 500) * 100);
			slave.butt = random(6, 20);
			if (V.arcologies[0].FSTransformationFetishist > 20) {
				slave.boobsImplant = slave.boobs - 200;
				if (slave.boobsImplant > 10000) {
					slave.boobsImplantType = "hyper fillable";
				} else {
					slave.boobsImplantType = "advanced fillable";
				}
				slave.buttImplant = slave.butt - 1;
				if (slave.buttImplant > 9) {
					slave.buttImplantType = "hyper fillable";
				} else {
					slave.buttImplantType = "advanced fillable";
				}
			}
		} else if (V.arcologies[0].FSSlimnessEnthusiast > 20) {
			slave.boobs = (random(3, 5) * 100);
			slave.butt = random(0, 2);
			if (V.arcologies[0].FSTransformationFetishist > 20) {
				slave.boobsImplant = slave.boobs - 50;
				slave.boobsImplantType = "normal";
				if (slave.butt > 1) {
					slave.buttImplant = 1;
					slave.buttImplantType = "normal";
				}
			}
		} else {
			slave.boobs = (random(5, 10) * 100);
			slave.butt = random(3, 7);
			if (V.arcologies[0].FSTransformationFetishist > 20) {
				slave.boobsImplant = slave.boobs - 200;
				slave.boobsImplantType = "normal";
				slave.buttImplant = slave.butt - 1;
				slave.buttImplantType = "normal";
			}
		}
		if (slave.nipples === "tiny") {
			slave.nipples = "puffy";
		}
		if (V.arcologies[0].FSTransformationFetishist > 20) {
			if (slave.boobsImplant / slave.boobs >= 0.90) {
				slave.boobShape = "spherical";
				slave.nipples = "flat";
			} else {
				slave.boobShape = "normal";
			}
		} else {
			slave.boobShape = either("perky", "perky", "torpedo-shaped", "wide-set");
		}
		slave.face = 100;
		slave.faceShape = either("cute", "cute", "exotic", "exotic", "normal", "normal", "sensual", "sensual", "sensual");
		slave.lips = random(45, 75);
		if (V.arcologies[0].FSTransformationFetishist > 20) {
			slave.lips += 25;
			slave.lipsImplant = 25;
		}
		if (slave.teeth !== "normal" && slave.physicalAge >= 12) {
			slave.teeth = "normal";
		}
		if (slave.vaginaLube === 0) {
			slave.vaginaLube++;
		}
		slave.preg = 0;
		slave.fertKnown = 1;
		slave.counter.birthsTotal = either(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 4);
		if (V.arcologies[0].FSPastoralist > 20 || slave.counter.birthsTotal > 0) {
			slave.lactation = 1;
			if (V.arcologies[0].FSPastoralist > 20) {
				slave.lactationAdaptation = V.arcologies[0].FSPastoralist;
			} else {
				slave.lactationAdaptation = Math.min(slave.counter.birthsTotal * 10, 100);
			}
		} else {
			slave.lactation = either(0, 0, 0, 0, 1);
		}
		if (slave.lactation > 0) {
			slave.lactationDuration = 2;
		}
		if (slave.counter.birthsTotal > 0) {
			slave.vagina = random(2, 3);
			slave.pregWeek = either(-4, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
		} else {
			slave.vagina = random(0, 3);
			slave.pregWeek = 0;
		}
		if (slave.hips <= 0) {
			slave.hips = 1;
		}
		if (V.arcologies[0].FSGenderRadicalist > 20) {
			slave.dick = random(2, 5);
			slave.balls = random(2, 10);
			slave.scrotum = slave.balls;
			slave.prostate = either(1, 2, 3);
			slave.vasectomy = 1;
		}
		slave.makeup = 2;
		slave.nails = 1;
		if (slave.vagina === 0) {
			slave.skill.vaginal = 30;
		} else {
			slave.skill.vaginal = 60;
		}
		if (slave.anus === 0) {
			slave.skill.anal = 10;
		} else {
			slave.skill.anal = 60;
		}
		slave.skill.oral = 60;
		slave.chastityVagina = 1;
		slave.intelligence = random(51, 100);
		if (V.arcologies[0].FSIntellectualDependency > 20) {
			slave.energy = 100;
			slave.attrXY = 100;
		} else if (V.arcologies[0].FSSlaveProfessionalism > 20) {
			slave.intelligence = Intelligence.random({limitIntelligence: [80, 100]});
			if (slave.vagina >= 0) {
				slave.skill.vaginal = 100;
			}
			if (penetrativeSocialUse(slave) >= 40) {
				slave.skill.penetrative = 100;
			}
			slave.skill.anal = 100;
			slave.skill.oral = 100;
			slave.skill.entertainment = 100;
			slave.skill.whoring = 100;
			slave.intelligenceImplant = 30;
		}
		slave.attrKnown = 1;
		slave.fetishKnown = 1;
		slave.behavioralQuirk = "confident";
		slave.sexualQuirk = either("caring", "caring", "gagfuck queen", "perverted", "romantic", "romantic", "strugglefuck queen", "tease", "unflinching");
		slave.pubertyXX = 1;
		slave.breedingMark = 1;

		const complianceText = App.Desc.lawCompliance(slave, "Elite Slave");
		const cost = slaveCost(slave, false, true);

		App.UI.DOM.appendNewElement("p", el, `It will take ${cashFormat(cost)} to win the auction.`);

		if (V.cash >= cost) {
			App.UI.DOM.appendNewElement(
				"p",
				el,
				App.UI.DOM.link(
					`Place that bid`,
					() => {
						cashX(forceNeg(cost), "slaveTransfer", slave);
						jQuery("#slave-markets").empty().append(App.UI.newSlaveIntro(slave));
					}
				)
			);
		} else {
			App.UI.DOM.appendNewElement("p", el, `You lack the necessary funds to place a winning bid.`, "note");
		}

		el.append(App.Desc.longSlave(slave, {market: "Elite Slave", marketText: complianceText}));
	}
	return el;
};

repo_name: Nithhogg/fc

license: mit


code:
App.Markets["Household Liquidator"] = function() {
	V.market.introType = "liquidator";
	V.market.newSlavesDone = 0;

	const el = new DocumentFragment();
	/** @type {ReturnType<typeof prepSlaveSale>} */
	let newSlaves = null;
	if (jsRandom(1, 100) > 50) {
		// Old enough to have a younger sibling who can be a slave.
		const slave = GenerateNewSlave(null, {
			minAge: (V.minimumSlaveAge + 2), disableDisability: 1
		});
		finishSlave(slave);
		setMissingParents(slave);

		// Create opposite sex chance of relative
		const oppositeSex = (slave.genes !== GenerateChromosome());
		App.UI.DOM.appendNewElement("p", el, `The household liquidator is offering a set of siblings for sale. You are permitted to inspect both slaves.`);

		const relativeSlave = generateRelatedSlave(slave, "younger sibling", oppositeSex);

		newSlaves = prepSlaveSale(3.0, slave, relativeSlave);
	} else if (jsRandom(1, 100) > 20) {
		// Old enough to have a child who can be a slave.
		const genes = GenerateChromosome();
		const minAge = (genes === "XX" ? V.fertilityAge : V.potencyAge) + V.minimumSlaveAge + 1;
		const slave = GenerateNewSlave(genes, {
			minAge: minAge, maxAge: 42, ageOverridesPedoMode: 1, disableDisability: 1
		});
		slave.butt += 1;
		if (slave.vagina > -1) {
			slave.boobs += 100;
			slave.vagina += 1;
			slave.counter.birthsTotal = 1;
		}
		finishSlave(slave);

		// Create opposite sex chance of relative
		const oppositeSex = (slave.genes !== GenerateChromosome());
		const {his, mother} = getPronouns(slave);

		const relativeSlave = generateRelatedSlave(slave, "child", oppositeSex);
		const {daughter} = getPronouns(relativeSlave);

		App.UI.DOM.appendNewElement("p", el, `The household liquidator is offering a ${mother} and ${his} ${daughter} for sale. You are permitted to inspect both slaves.`);

		newSlaves = prepSlaveSale(3.0, slave, relativeSlave);
	} else {
		const slave = GenerateNewSlave(null, {disableDisability: 1});
		finishSlave(slave);
		setMissingParents(slave);
		App.UI.DOM.appendNewElement("p", el, `The household liquidator is offering something special: identical twins. The markup is huge, but the merchandise isn't something you see every day.`);

		const relativeSlave = generateRelatedSlave(slave, "twin");

		newSlaves = prepSlaveSale(4.0, slave, relativeSlave);
	}

	el.append(`The price is `);
	el.append(App.UI.DOM.cashFormat(newSlaves.cost));
	el.append(`.`);
	if (V.slavesSeen > V.slaveMarketLimit) {
		el.append(` You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.`);
	}

	if (V.cash >= newSlaves.cost) {
		App.UI.DOM.appendNewElement(
			"div",
			el,
			App.UI.DOM.link(
				`Buy their slave contracts`,
				() => {
					V.market.newSlaves = newSlaves.slaves;
					V.market.newSlaves.forEach((s) => cashX(forceNeg(newSlaves.cost / V.market.newSlaves.length), "slaveTransfer", s));
					V.returnTo = "Buy Slaves";
				},
				[],
				"Bulk Slave Intro"
			)
		);
	} else {
		el.append(`You lack the necessary funds to buy these slaves.`);
	}
	App.UI.DOM.appendNewElement(
		"div",
		el,
		App.UI.DOM.link(
			`Decline to purchase them and check out another set of slaves`,
			() => {
				V.slavesSeen += 2;
			},
			[],
			"Market"
		)
	);
	App.UI.DOM.appendNewElement("p", el, App.UI.MultipleInspect(newSlaves.slaves, true, "Household Liquidator", newSlaves.text));

	return el;

	/**
	 * @param {number} costFactor
	 * @param {Array<FC.GingeredSlave>} slaves
	 */
	function prepSlaveSale(costFactor, ...slaves) {
		const bundle = {
			/** @type {Array<FC.GingeredSlave>} */
			slaves: [],
			/** @type {Map<FC.HumanID, string>} */
			text: new Map(),
			cost: 0
		};
		for (const slave of slaves) {
			const complianceText = App.Desc.lawCompliance(slave, "Household Liquidator");
			bundle.slaves.push(slave);
			bundle.text.set(slave.ID, complianceText);
		}
		let cost = slaveCost(slaves[0], false, true);
		if (V.slavesSeen > V.slaveMarketLimit) {
			cost += Math.trunc(cost * ((V.slavesSeen - V.slaveMarketLimit) * 0.1));
		}
		bundle.cost = cost * costFactor;
		return bundle;
	}

	/** @param {FC.GingeredSlave} slave */
	function finishSlave(slave) {
		Object.assign(slave, {
			origin: "You bought $him from the household liquidator.",
			devotion: jsRandom(-75, -25),
			trust: jsRandom(-45, -25),
			oldDevotion: slave.devotion,
			oldTrust: slave.trust,
			canRecruit: 0
		});
		setHealth(slave, jsRandom(-50, 20));
	}
};


code:
App.Markets["Husk Slave"] = function() {
	const el = new DocumentFragment();
	let r = [];

	if (V.huskSlaveOrdered === 0) {
		r.push(`You lay out a new order for a braindead slave to be put aside for your use.`);
	} else {
		r.push(`You review your posted husk order.`);
	}
	r.push(`Your order requests a body with the following characteristics:`);

	App.UI.DOM.appendNewElement("p", el, r.join(" "));

	setupHusk();
	el.append(age());
	el.append(sex());
	el.append(nationality());
	el.append(raceSelect());
	el.append(virginity());
	App.UI.DOM.appendNewElement("h2", el, "Reservations");
	el.append(reserve());
	return el;

	function setupHusk() {
		if (V.huskSlave.dick === 0 && V.huskSlave.vagina === -1) {
			V.huskSlave.vagina = 0;
		}
		V.huskSlave.age = Math.clamp(V.huskSlave.age, V.minimumSlaveAge, V.retirementAge - 1);
	}
	function age() {
		const p = document.createElement("p");
		App.UI.DOM.appendNewElement("div", p, "Age:");
		App.UI.DOM.appendNewElement(
			"div",
			p,
			App.UI.DOM.makeTextBox(
				V.huskSlave.age,
				v => {
					V.huskSlave.age = v;
					refresh();
				},
				true
			)
		);
		return p;
	}
	function sex() {
		const p = document.createElement("p");
		p.append("Sex: ");
		if (V.huskSlave.sex === 1) {
			p.append(`Female.`);
		} else if (V.huskSlave.sex === 2) {
			p.append(`Male.`);
		} else if (V.huskSlave.sex === 3) {
			p.append(`Futanari.`);
		}
		const choices = {
			Female: 1,
			Male: 2,
			Both: 3
		};
		p.append(links(choices, "sex"));
		return p;
	}

	function nationality() {
		const p = document.createElement("p");
		App.UI.DOM.appendNewElement("div", p, "Nationality:");
		App.UI.DOM.appendNewElement(
			"div",
			p,
			App.UI.DOM.makeTextBox(
				V.huskSlave.nationality,
				v => {
					V.huskSlave.nationality = v;
					refresh();
				},
			)
		);
		p.append(links(App.Data.misc.baseNationalities.concat(["Stateless"]), "nationality"));
		return p;
	}

	function raceSelect() {
		const p = document.createElement("p");
		App.UI.DOM.appendNewElement("div", p, "Race: ");
		App.UI.DOM.appendNewElement(
			"div",
			p,
			App.UI.DOM.makeTextBox(
				V.huskSlave.race,
				v => {
					V.huskSlave.race = v;
					refresh();
				},
			)
		);

		const linkArray = [];
		const races = new Map(App.Data.misc.filterRacesPublic);
		races.set("not important", "Not Important");
		for (const [race, capRace] of races) {
			if (V.huskSlave.race === race) {
				linkArray.push(
					App.UI.DOM.disabledLink(
						capRace,
						["current selection"]
					)
				);
			} else {
				linkArray.push(
					App.UI.DOM.link(
						capRace,
						() => {
							V.huskSlave.race = race;
							refresh();
						}
					)
				);
			}
		}
		App.UI.DOM.appendNewElement("div", p, App.UI.DOM.generateLinksStrip(linkArray));
		return p;
	}
	function virginity() {
		const p = document.createElement("p");
		p.append("Virginity: ");
		if (V.huskSlave.sex === 1) {
			p.append(`Female.`);
		} else if (V.huskSlave.sex === 2) {
			p.append(`Male.`);
		} else if (V.huskSlave.sex === 3) {
			p.append(`Futanari.`);
		}
		const choices = {
			"Important": 0,
			"Not Important": 1,
		};
		p.append(links(choices, "virgin"));
		return p;
	}

	function reserve() {
		const p = document.createElement("p");
		App.UI.DOM.appendNewElement("div", p, `Reserving a body will cost ${cashFormat(10000)} up front. Canceling an order will refund your money; however, if a delivered body is rejected, your money will not be refunded.`);

		if (V.huskSlaveOrdered === 1) {
			p.append(
				App.UI.DOM.link(
					`Withdraw body order`,
					() => {
						V.huskSlaveOrdered = 0;
						cashX(10000, "slaveTransfer");
					},
					[],
					"Main"
				)
			);
		} else if (V.cash < 10000) {
			App.UI.DOM.appendNewElement("span", p, `You lack the credits to place a body reservation.`, "note");
		} else {
			p.append(
				App.UI.DOM.link(
					`Post body order`,
					() => {
						V.huskSlaveOrdered = 1;
						cashX(-10000, "slaveTransfer");
					},
					[],
					"Main"
				)
			);
		}

		return p;
	}

	function links(choices, global) {
		const linkArray = [];
		if (Array.isArray(choices)) {
			for (let i = 0; i < choices.length; i++) {
				makeLink(choices[i], choices[i]);
			}
		} else {
			for (const choice in choices) {
				makeLink(choice, choices[choice]);
			}
		}
		return App.UI.DOM.makeElement("div", App.UI.DOM.generateLinksStrip(linkArray));

		function makeLink(title, value) {
			if (V.huskSlave[global] === value) {
				linkArray.push(
					App.UI.DOM.disabledLink(
						title,
						["current selection"]
					)
				);
			} else {
				linkArray.push(
					App.UI.DOM.link(
						title,
						() => {
							V.huskSlave[global] = value;
							refresh();
						}
					)
				);
			}
		}
	}

	function refresh() {
		jQuery("#slave-markets").empty().append(App.Markets["Husk Slave"]);
	}
};


code:
App.Markets["Prestigious Slave"] = function() {
	let slave;
	let seed;
	const el = document.createElement("span");
	const options = [
		"porn star",
		"trophy wife",
		"sports star",
		"young model",
		"albino",
		"old-timer",
		"b-list actress",
		"politician",
		"princess",
		"arcology",
		"streamer",
	];
	const dickOptions = [
		"d herm",
		"d young herm",
		"d pornstar",
		"d trophy husband",
		"d sports star",
		"d young model",
		"d albino",
		"d old-timer",
		"d b-list actress",
		"d politician",
		"d princess",
		"d arcology",
		"d streamer",
	];
	App.UI.DOM.appendNewElement("p", el, `You check to see if any especially prestigious slaves are on auction.`);
	const content = App.UI.DOM.appendNewElement("span", el);
	if (V.prestigeAuctioned === 1) {
		App.UI.DOM.appendNewElement("span", el, ` There are none available right now, but there probably will be next week.`);
	} else {
		V.prestigeAuctioned = 1;
		seed = jsEither(Math.random() * 100 < V.seeDicks ? dickOptions : options);
		content.append(passage());
	}
	return el;

	function passage() {
		const frag = new DocumentFragment();
		if (V.cheatMode || V.debugMode) {
			const reload = () => {
				$(content).empty();
				content.append(passage());
			};
			const cheatOptions = (V.seeDicks > 0) ? options.concat(...dickOptions) : Array.from(options);
			frag.append(App.UI.DOM.makeSelect(cheatOptions.map(v => {
				return {key: v, name: capFirstChar(v)};
			}), seed, v => {
				seed = v;
				reload();
			}));
			App.UI.DOM.appendNewElement("span", frag, App.UI.DOM.link(" Refresh slave", reload));
		}
		slave = makeSlave(seed);
		const cost = slaveCost(slave);
		App.UI.DOM.appendNewElement("p", frag, `It will take ${cashFormat(cost)} to win the auction.`);

		if (V.cash >= cost) {
			App.UI.DOM.appendNewElement(
				"p",
				frag,
				App.UI.DOM.link(
					`Place that bid`,
					() => {
						cashX(forceNeg(cost), "slaveTransfer", slave);
						jQuery("#slave-markets").empty().append(App.UI.newSlaveIntro(slave));
					}
				)
			);
		} else {
			App.UI.DOM.appendNewElement("p", frag, `You lack the necessary funds to place a winning bid.`, "note");
		}

		frag.append(App.Desc.longSlave(slave, {market: "generic"}));
		return frag;
	}

	function makeSlave(choice) {
		let slave;
		switch (choice) {
			case "porn star":
				slave = GenerateNewSlave("XX", {minAge: Math.min(24, V.minimumSlaveAge + 6), maxAge: 40, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once a noted adult film star, and was sold into slavery by $his unscrupulous managers.";
				slave.career = "a porn star";
				slave.boobsImplant += random(4, 6) * 200;
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "string";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				} else {
					slave.nipples = either("cute", "huge", "puffy");
				}
				slave.areolae = 1;
				slave.butt += 1;
				slave.buttImplant += 1;
				slave.buttImplantType = "normal";
				slave.lips += 10;
				slave.lipsImplant += 10;
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.faceImplant += 20;
				slave.faceShape = "sensual";
				slave.teeth = "normal";
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				slave.anus = 2;
				slave.vagina = 2;
				slave.weight = 0;
				slave.piercing.genitals.weight = 1;
				slave.piercing.tongue.weight = 1;
				slave.piercing.nipple.weight = 1;
				slave.piercing.nose.weight = 1;
				slave.piercing.ear.weight = 1;
				slave.skill.vaginal = 100;
				slave.skill.penetrative = 65;
				slave.skill.oral = 100;
				slave.skill.anal = 100;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 100;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("anorexic", "arrogant", "bitchy");
				slave.fetish = "none";
				slave.fetishKnown = 1;
				slave.custom.desc = "$He has seen and done almost everything sexually possible, on camera.";
				break;
			case "trophy wife":
				slave = GenerateNewSlave("XX", {minAge: Math.min(19, Math.max(V.fertilityAge, V.minimumSlaveAge) + 1), maxAge: 22, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once the young trophy $wife of a powerful man in the old world, but he sold $him into slavery in revenge for $his infidelity.";
				slave.career = "a trophy wife";
				slave.boobsImplant += random(1, 3) * 200;
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "normal";
				slave.butt += 1;
				slave.buttImplant += 1;
				slave.buttImplantType = "normal";
				slave.lips += 10;
				slave.lipsImplant += 10;
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.faceImplant += 20;
				slave.faceShape = "sensual";
				slave.teeth = "normal";
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(60, 80), 0, 0, 0);
				slave.anus = 1;
				slave.vagina = 1;
				slave.weight = 0;
				slave.piercing.genitals.weight = 1;
				slave.piercing.nipple.weight = 1;
				slave.piercing.ear.weight = 1;
				slave.skill.vaginal = 35;
				slave.skill.penetrative = 0;
				slave.skill.oral = 35;
				slave.skill.anal = 15;
				slave.skill.whoring = 35;
				slave.skill.entertainment = 15;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("anorexic", "arrogant", "bitchy");
				slave.fetish = "none";
				slave.fetishKnown = 1;
				slave.custom.tattoo = "$His ex-husband's name is prettily tattooed on $his left arm, but a black line has been subsequently tattooed across it.";
				break;
			case "sports star":
				slave = GenerateNewSlave("XX", {minAge: 21, maxAge: 25, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once expected to become a major sports star, but flamed out due to injury and was recently enslaved due to debt.";
				slave.career = "an athlete";
				slave.intelligence = random(-90, -20);
				slave.intelligenceImplant = 0;
				slave.muscles = 50;
				slave.heels = 1;
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(80, 90), 0, jsRandom(5, 10), 0, jsRandom(10, 30));
				slave.anus = 1;
				slave.vagina = 1;
				slave.weight = 0;
				slave.piercing.ear.weight = 1;
				slave.piercing.eyebrow.weight = random(0, 1);
				slave.piercing.nose.weight = random(0, 1);
				slave.piercing.navel.weight = random(0, 1);
				slave.skill.vaginal = 15;
				slave.skill.oral = 15;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.skill.combat = 40;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = either("hates anal", "hates oral", "hates penetration");
				slave.behavioralFlaw = "arrogant";
				slave.custom.desc = "$He's not particularly bright, and enjoys solving problems with physical force.";
				break;
			case "young model":
				slave = GenerateNewSlave("XX", {maxAge: 21, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once a rising young model, but apparently someone decided to take a shortcut in cashing in on $his great beauty.";
				slave.career = "a model";
				slave.boobs = random(2, 4) * 100;
				slave.butt = random(1, 3);
				slave.lips = random(15, 25);
				slave.face = 55;
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-20, 20), 0, 0, 0, jsRandom(10, 30));
				slave.anus = 1;
				slave.vagina = 1;
				slave.weight = 0;
				slave.piercing.ear.weight = 1;
				slave.skill.vaginal = 15;
				slave.skill.oral = 15;
				slave.skill.penetrative = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 35;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("anorexic", "arrogant");
				slave.custom.desc = "$He moves with the practiced grace of someone who unconsciously still pictures $himself on the runway.";
				break;
			case "albino":
				slave = GenerateNewSlave("XX", {maxAge: 18, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He is a natural albino, and was quickly enslaved due to the great demand for physically unusual specimens.";
				slave.geneticQuirks.albinism = 2;
				// slave.albinismOverride = {skin: "pure white", eyeColor: "pale grey", hColor: "white"};
				slave.albinismOverride = makeAlbinismOverride(slave.race); // use standard override instead of custom; preserved original method for recordkeeping
				applyGeneticColor(slave);
				slave.career = "a slave";
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				eyeSurgery(slave, "both", "blur");
				setHealth(slave, jsRandom(40, 60), 0, 0, 0, jsRandom(10, 30));
				slave.custom.desc = "$His eyes are unsettling; though $his irises are a pale grey color, in some lights the whole eye takes on a red cast.";
				break;
			case "old-timer":
				slave = GenerateNewSlave("XX", {
					minAge: (V.minimumSlaveAge + 15), maxAge: 35, disableDisability: 1, ageOverridesPedoMode: 1
				});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 2;
				slave.prestigeDesc = "$He is one of the longest legally-enslaved persons in the world, having been a slave for 15 years. $He has spent almost all that time working as a slave prostitute, and has been heavily modified to keep $him productive.";
				slave.career = "a slave";
				slave.boobsImplant += random(10, 15) * 200;
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "fillable";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				} else {
					slave.nipples = either("cute", "huge", "puffy");
				}
				slave.areolae = 2;
				slave.butt += 4;
				slave.buttImplant += 4;
				slave.buttImplantType = "fillable";
				slave.lips = random(75, 85);
				slave.lipsImplant = 50;
				slave.face = 55;
				slave.faceImplant = 40;
				slave.faceShape = "exotic";
				slave.devotion = random(25, 45);
				slave.trust = random(0, 15);
				setHealth(slave, jsRandom(20, 40), 0, jsRandom(0, 5), 0, jsRandom(10, 30));
				slave.anus = 3;
				slave.vagina = 3;
				slave.weight = 0;
				slave.piercing.genitals.weight = 2;
				slave.piercing.tongue.weight = 2;
				slave.piercing.nipple.weight = 2;
				slave.piercing.nose.weight = 2;
				slave.piercing.lips.weight = 2;
				slave.piercing.vagina.weight = 2;
				slave.piercing.anus.weight = 2;
				slave.piercing.navel.weight = 2;
				slave.piercing.eyebrow.weight = 2;
				slave.piercing.ear.weight = 2;
				slave.skill.vaginal = 100;
				slave.skill.penetrative = 100;
				slave.skill.oral = 100;
				slave.skill.anal = 100;
				slave.skill.whoring = 100;
				slave.skill.entertainment = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.energy = 100;
				slave.fetish = "none";
				slave.fetishKnown = 1;
				slave.custom.desc = "$He has almost no inhibitions left at all.";
				slave.custom.tattoo = "'50,000 Served!' is tattooed across $his back.";
				slave.counter.publicUse += 1000;
				break;
			case "b-list actress":
				slave = GenerateNewSlave("XX", {minAge: 24, maxAge: 28, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 2;
				slave.prestigeDesc = "$He was once a B-list actress, but fell on hard times and drug addiction and was recently enslaved due to debt.";
				slave.career = "an actress";
				slave.boobs += 200;
				slave.boobsImplant += 200;
				slave.boobsImplantType = "normal";
				slave.butt += 1;
				slave.buttImplant += 1;
				slave.buttImplantType = "normal";
				slave.lips += 10;
				slave.lipsImplant += 10;
				slave.face = 55;
				slave.faceImplant += 20;
				slave.faceShape = "cute";
				if (slave.teeth !== "gapped") {
					slave.teeth = "normal";
				}
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-70, -40), undefined, undefined, 0, jsRandom(30, 80));
				slave.anus = 1;
				slave.vagina = 1;
				slave.weight = 0;
				slave.piercing.ear.weight = 1;
				slave.skill.vaginal = 15;
				slave.skill.penetrative = 0;
				slave.skill.oral = 15;
				slave.skill.anal = 15;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 100;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.addict = 20;
				slave.sexualFlaw = either("hates anal", "hates oral", "hates penetration");
				slave.behavioralFlaw = either("anorexic", "arrogant", "bitchy", "odd");
				slave.custom.desc = "$He sometimes forgets $himself and acts as though $he were still a coming celebrity.";
				break;
			case "politician":
				slave = GenerateNewSlave("XX", {minAge: 38, maxAge: 42, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 2;
				slave.prestigeDesc = "$He was once a rising old world politician, but was forced to flee from the increasingly dangerous politics common in a stressed world, and was subsequently enslaved.";
				slave.career = "a politician";
				slave.boobs += 100;
				slave.butt += 1;
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.faceImplant += 20;
				slave.faceShape = "normal";
				slave.teeth = "normal";
				slave.height += 10;
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-45, -25), 0, 0, 0, jsRandom(30, 70));
				slave.anus = 0;
				slave.vagina = 1;
				slave.weight = 0;
				slave.skill.vaginal = 15;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 35;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("arrogant", "bitchy");
				slave.custom.tattoo = "A small tattoo of the crest of an old world sorority is visible on $his left shoulder blade.";
				slave.custom.desc = "$His face is still recognizable as that which once graced a million campaign posters.";
				break;
			case "princess":
				slave = GenerateNewSlave("XX", {maxAge: 18, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 3;
				slave.prestigeDesc = "$He was born a $daughter of royalty, but $his family was overthrown when $he was still young. $He is a graduate cum laude of the world's most renowned slave school.";
				slave.career = "a slave";
				slave.boobs += 100;
				slave.butt += 1;
				slave.lips += 10;
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.height += 10;
				slave.devotion = random(75, 90);
				slave.trust = random(-45, -25);
				setHealth(slave, 100, 0, 0, 0, jsRandom(0, 20));
				slave.anus = 0;
				slave.vagina = 0;
				slave.weight = 0;
				slave.skill.vaginal = 0;
				slave.skill.penetrative = 0;
				slave.skill.oral = 100;
				slave.skill.anal = 0;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 35;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.custom.tattoo = "$His family crest is tattooed on $his cheek.";
				slave.custom.desc = "$His recognizable face marks $him as a descendant of an overthrown royal family.";
				break;
			case "arcology":
				slave = GenerateNewSlave("XX", {minAge: 28, maxAge: 42, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 3;
				slave.prestigeDesc = "$He was once an arcology owner like you, but lost a Free Cities power struggle and was enslaved. An object lesson in the need to stay vigilant.";
				slave.career = "an arcology owner";
				slave.boobsImplant += random(20, 40) * 200;
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "advanced fillable";
				slave.boobs += 1000;
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				} else {
					slave.nipples = either("cute", "huge", "puffy");
				}
				slave.areolae = 2;
				slave.buttImplant += random(6, 8);
				slave.butt += slave.buttImplant;
				slave.buttImplantType = "advanced fillable";
				slave.heels = 1;
				slave.voice = 0;
				slave.lips = random(75, 85);
				slave.lipsImplant = 50;
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-70, -60), undefined, undefined, undefined, jsRandom(40, 90));
				slave.anus = 3;
				slave.vagina = 3;
				slave.weight = -20;
				slave.piercing.nipple.weight = 2;
				slave.piercing.genitals.weight = 2;
				slave.piercing.vagina.weight = 2;
				slave.piercing.anus.weight = 2;
				slave.piercing.lips.weight = 2;
				slave.piercing.tongue.weight = 2;
				slave.piercing.ear.weight = 2;
				slave.piercing.nose.weight = 2;
				slave.piercing.eyebrow.weight = 2;
				slave.piercing.navel.weight = 2;
				slave.boobsTat = "rude words";
				slave.buttTat = "rude words";
				slave.vaginaTat = "rude words";
				slave.dickTat = "rude words";
				slave.lipsTat = "rude words";
				slave.anusTat = "rude words";
				slave.shouldersTat = "rude words";
				slave.armsTat = "rude words";
				slave.legsTat = "rude words";
				slave.stampTat = "rude words";
				slave.skill.vaginal = 15;
				slave.skill.penetrative = 100;
				slave.skill.oral = 15;
				slave.skill.anal = 15;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.hStyle = "shaved";
				slave.hLength = 0;
				slave.behavioralFlaw = either("odd");
				slave.custom.desc = "$His back is covered in a fine network of hairline scars, as though $he's been repeatedly flogged bloody, healed with curatives, and then flogged again.";
				slave.custom.tattoo = "'ARCOLOGY OWNER' is tattooed across $his forehead.";
				break;
			case "streamer":
				slave = GenerateNewSlave("XX", {maxAge: 28, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once a popular creator on a live streaming service, but donations dropped off after getting caught up in some controversy.";
				slave.career = "a camgirl";
				slave.boobs = random(1, 4) * 100;
				slave.natural.boobs = slave.boobs; // Oddly low here. Hard to not be intentional.
				slave.butt = random(1, 3);
				slave.lips = random(15, 25);
				slave.face = 55;
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-45, -25), 0, 0, 0, jsRandom(30, 70));
				slave.anus = 1;
				slave.vagina = 1;
				slave.weight = 20;
				slave.piercing.ear.weight = 1;
				slave.skill.vaginal = 15;
				slave.skill.penetrative = 0;
				slave.skill.oral = 15;
				slave.skill.anal = 1;
				slave.skill.whoring = 5;
				slave.skill.entertainment = 70;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("arrogant", "bitchy", "odd");
				slave.custom.desc = "$He is very comfortable in front of a camera and in public performances, having spent a long time entertaining $his viewers.";
				break;
			case "d herm":
				slave = GenerateNewSlave("XY", {
					minAge: 24, maxAge: 40, disableDisability: 1, ageOverridesPedoMode: 1
				});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He is a natural-born hermaphrodite. $He was enslaved as an adult and subjected to treatment to upgrade both $his halves to full functionality.";
				slave.devotion = random(-45, -25);
				slave.trust = random(-90, -75);
				setHealth(slave, jsRandom(-40, -30), undefined, undefined, 0, jsRandom(30, 70));
				slave.chem = 100;
				slave.anus = random(1, 2);
				slave.dick = random(1, 2);
				if (slave.dick > 0) {
					slave.foreskin = slave.dick;
				}
				slave.prostate = 1;
				slave.vagina = 1;
				slave.ovaries = 1;
				slave.preg = 0;
				slave.balls = random(1, 2);
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
				slave.weight = random(-80, -20);
				slave.attrXX = random(30, 50);
				slave.attrXY = random(30, 50);
				slave.energy = random(5, 20);
				slave.skill.vaginal = 0;
				slave.skill.penetrative = 0;
				slave.skill.oral = 15;
				slave.skill.anal = 15;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.custom.desc = "$He has had a very difficult time adjusting to $his unusual biology.";
				break;
			case "d young herm":
				slave = GenerateNewSlave("XX", {maxAge: 19, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He is a natural-born hermaphrodite. $He received treatment to ensure both $his halves would be fully functional from an early age.";
				slave.career = "a slave";
				slave.devotion = random(25, 45);
				slave.trust = random(25, 45);
				setHealth(slave, jsRandom(0, 20), 0, 0, 0, jsRandom(20, 60));
				slave.chem = 200;
				slave.boobs += 100 * random(2, 4);
				slave.butt += random(1, 2);
				slave.anus = 1;
				slave.dick = random(4, 6);
				slave.prostate = 1;
				if (slave.dick > 0) {
					slave.foreskin = slave.dick;
				}
				slave.balls = random(4, 6);
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
				slave.weight = random(20, 80);
				slave.attrXX = random(80, 100);
				slave.attrXY = random(80, 100);
				slave.energy = random(60, 90);
				slave.skill.vaginal = 0;
				slave.skill.penetrative = 0;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 15;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.sexualQuirk = either("caring", "perverted", "romantic", "tease");
				slave.behavioralQuirk = either("adores men", "adores women", "advocate", "confident", "cutting", "funny");
				slave.custom.desc = "$He is very comfortable with $his unusual biology.";
				break;
			case "d pornstar":
				slave = GenerateNewSlave("XY", {minAge: 24, maxAge: 40, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once a noted adult film star, and was sold into slavery by $his unscrupulous managers.";
				slave.career = "a porn star";
				slave.boobsImplant += random(4, 6) * 200;
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "fillable";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				} else {
					slave.nipples = either("cute", "huge", "puffy");
				}
				slave.areolae = 1;
				slave.butt += 1;
				slave.buttImplant += 1;
				slave.buttImplantType = "normal";
				slave.lips += 10;
				slave.lipsImplant += 10;
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.faceImplant += 20;
				slave.faceShape = "androgynous";
				slave.teeth = "normal";
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, undefined, undefined, undefined, undefined, jsRandom(30, 70));
				slave.anus = 3;
				slave.dick = 5;
				if (slave.foreskin > 0) {
					slave.foreskin = slave.dick;
				}
				slave.balls = 5;
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
				slave.weight = 0;
				slave.piercing.genitals.weight = 1;
				slave.piercing.tongue.weight = 1;
				slave.piercing.nipple.weight = 1;
				slave.piercing.nose.weight = 1;
				slave.piercing.ear.weight = 1;
				slave.skill.penetrative = 100;
				slave.skill.oral = 100;
				slave.skill.anal = 100;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 100;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("anorexic", "arrogant", "bitchy");
				slave.fetish = "none";
				slave.fetishKnown = 1;
				slave.custom.desc = "$He has seen and done almost everything sexually possible, on camera.";
				break;
			case "d trophy husband":
				slave = GenerateNewSlave("XY", {minAge: 19, maxAge: 22, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once the young trophy husband of a powerful woman in the old world, but she sold $him into slavery in revenge for $his infidelities.";
				slave.career = "a trophy spouse";
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.faceImplant += 20;
				slave.faceShape = "cute";
				slave.muscles = random(20, 100);
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(60, 80), 0, 0, 0, jsRandom(10, 30));
				slave.weight = 0;
				slave.piercing.genitals.weight = 1;
				slave.skill.penetrative = 65;
				slave.skill.oral = 15;
				slave.skill.anal = 0;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 15;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("arrogant", "bitchy");
				slave.fetish = "none";
				slave.fetishKnown = 1;
				slave.custom.tattoo = "$His ex-wife's name is prettily tattooed on $his left arm, but a black line has been subsequently tattooed across it.";
				break;
			case "d sports star":
				slave = GenerateNewSlave("XY", {minAge: 21, maxAge: 25, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once expected to become a major sports star, but flamed out due to injury and was recently enslaved due to debt.";
				slave.career = "an athlete";
				slave.intelligence = random(-90, -20);
				slave.intelligenceImplant = 0;
				slave.muscles = 50;
				slave.heels = 1;
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(80, 90), 0, jsRandom(5, 10), 0, jsRandom(20, 50));
				slave.anus = 1;
				slave.dick = random(3, 5);
				if (slave.dick > 0) {
					slave.foreskin = slave.dick;
				}
				slave.balls = random(3, 5);
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
				slave.weight = 0;
				slave.skill.penetrative = 35;
				slave.skill.oral = 15;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.skill.combat = 40;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = either("hates anal", "hates oral", "hates penetration");
				slave.behavioralFlaw = "arrogant";
				slave.custom.desc = "$He's not particularly bright, and enjoys solving problems with physical force.";
				break;
			case "d young model":
				slave = GenerateNewSlave("XY", {maxAge: 21, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once a rising young model, but apparently someone decided to take a shortcut in cashing in on $his great beauty.";
				slave.career = "a model";
				slave.boobs = random(1, 3) * 100;
				slave.butt = random(1, 2);
				slave.muscles = 20;
				slave.lips = random(15, 25);
				slave.face = 55;
				slave.faceImplant = 20 * random(1, 2);
				slave.faceShape = "androgynous";
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-20, 20), 0, 0, 0, jsRandom(10, 30));
				slave.anus = 2;
				slave.weight = 0;
				slave.piercing.ear.weight = 1;
				slave.skill.penetrative = 35;
				slave.skill.oral = 100;
				slave.skill.anal = 0;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 35;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = either("judgemental");
				slave.behavioralFlaw = either("anorexic", "arrogant", "hates women");
				slave.custom.desc = "$He moves with the practiced grace of someone who unconsciously still pictures $himself on the runway.";
				break;
			case "d albino":
				slave = GenerateNewSlave("XY", {maxAge: 18, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He is a natural albino, and was quickly enslaved due to the great demand for physically unusual specimens.";
				slave.geneticQuirks.albinism = 2;
				// slave.albinismOverride = {skin: "pure white", eyeColor: "pale grey", hColor: "white"};
				slave.albinismOverride = makeAlbinismOverride(slave.race); // use standard override instead of custom; preserved original method for recordkeeping
				applyGeneticColor(slave);
				slave.career = "a slave";
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				eyeSurgery(slave, "both", "blur");
				setHealth(slave, jsRandom(40, 60), 0, 0, 0, jsRandom(10, 30));
				slave.custom.desc = "$His eyes are unsettling; though $his irises are a pale grey color, in some lights the whole eye takes on a red cast.";
				break;
			case "d old-timer":
				slave = GenerateNewSlave("XY", {
					minAge: (V.minimumSlaveAge + 15), maxAge: 35, disableDisability: 1, ageOverridesPedoMode: 1
				});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 2;
				slave.prestigeDesc = "$He is one of the longest legally-enslaved persons in the world, having been a slave for 15 years. $He has spent almost all that time working as a slave prostitute, and has been heavily modified to keep $him productive.";
				slave.career = "a prostitute";
				slave.boobsImplant += random(10, 15) * 200;
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "advanced fillable";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				} else {
					slave.nipples = either("cute", "huge", "puffy");
				}
				slave.areolae = 2;
				slave.butt += 4;
				slave.buttImplant += 4;
				slave.buttImplantType = "fillable";
				slave.lips = random(25, 55);
				slave.lipsImplant = 25;
				slave.face = 55;
				slave.faceImplant = 40;
				slave.faceShape = "exotic";
				slave.devotion = random(25, 45);
				slave.trust = random(0, 15);
				setHealth(slave, jsRandom(20, 40), undefined, jsRandom(5, 10), undefined, jsRandom(30, 70));
				slave.anus = 3;
				slave.dick = 1;
				if (slave.foreskin > 0) {
					slave.foreskin = slave.dick;
				}
				slave.balls = 0;
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
				slave.weight = 0;
				slave.piercing.genitals.weight = 2;
				slave.piercing.tongue.weight = 2;
				slave.piercing.nipple.weight = 2;
				slave.piercing.nose.weight = 2;
				slave.piercing.lips.weight = 2;
				slave.piercing.vagina.weight = 2;
				slave.piercing.anus.weight = 2;
				slave.piercing.navel.weight = 2;
				slave.piercing.eyebrow.weight = 2;
				slave.piercing.ear.weight = 2;
				slave.skill.penetrative = 100;
				slave.skill.oral = 100;
				slave.skill.anal = 100;
				slave.skill.whoring = 100;
				slave.skill.entertainment = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.energy = 100;
				slave.fetish = "none";
				slave.fetishKnown = 1;
				slave.custom.desc = "$He has almost no inhibitions left at all.";
				slave.custom.tattoo = "'50,000 Served!' is tattooed across $his back.";
				slave.counter.publicUse += 1000;
				break;
			case "d b-list actress":
				slave = GenerateNewSlave("XY", {minAge: 24, maxAge: 28, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 2;
				slave.prestigeDesc = "$He was once a B-list actress, but fell on hard times and drug addiction and was recently enslaved due to debt.";
				slave.career = "an actress";
				slave.boobs += 200;
				slave.boobsImplant += 200;
				slave.boobsImplantType = "normal";
				slave.butt += 1;
				slave.buttImplant += 1;
				slave.buttImplantType = "normal";
				slave.lips += 10;
				slave.lipsImplant += 10;
				slave.face = 55;
				slave.faceImplant += 20;
				slave.faceShape = "cute";
				if (slave.teeth !== "gapped") {
					slave.teeth = "normal";
				}
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-80, -40), 0, 0, 0, jsRandom(30, 70));
				slave.anus = 1;
				slave.weight = 0;
				slave.piercing.ear.weight = 1;
				slave.skill.penetrative = 15;
				slave.skill.oral = 15;
				slave.skill.anal = 15;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 100;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.addict = 20;
				slave.sexualFlaw = either("hates anal", "hates oral", "hates penetration");
				slave.behavioralFlaw = either("anorexic", "arrogant", "bitchy", "odd");
				slave.custom.desc = "$He sometimes forgets $himself and acts as though $he were still a coming celebrity.";
				break;
			case "d politician":
				slave = GenerateNewSlave("XY", {minAge: 38, maxAge: 42, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 2;
				slave.prestigeDesc = "$He was once a rising old world politician, but was forced to flee from the increasingly dangerous politics common in a stressed world, and was subsequently enslaved.";
				slave.career = "a politician";
				slave.muscles = random(10, 50);
				slave.natural.height = random(160, 200);
				slave.height = slave.natural.height;
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.faceImplant += 20;
				slave.faceShape = "masculine";
				slave.teeth = "normal";
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(60, 80), 0, 0, 0, jsRandom(30, 70));
				slave.anus = 0;
				slave.weight = 0;
				slave.skill.penetrative = 35;
				slave.skill.oral = 0;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 35;
				slave.behavioralFlaw = either("arrogant", "bitchy");
				slave.custom.tattoo = "A small tattoo of the crest of an old world fraternity is visible on $his left shoulder blade.";
				slave.custom.desc = "$His face is still recognizable as that which once graced a million campaign posters.";
				break;
			case "d princess":
				slave = GenerateNewSlave("XY", {maxAge: 18, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 3;
				slave.prestigeDesc = "$He was born a child of royalty, but $his family was overthrown when $he was still young. $He is a graduate cum laude of the world's most renowned slave school.";
				slave.career = "a slave";
				slave.boobs += 100;
				slave.butt += 1;
				slave.lips += 10;
				slave.face = Math.clamp(slave.face + 20, -100, 100);
				slave.height += 10;
				slave.devotion = random(75, 85);
				slave.trust = random(-45, -25);
				setHealth(slave, 100, 0, 0, 0, jsRandom(0, 20));
				slave.anus = 0;
				slave.dick = 2;
				if (slave.foreskin > 0) {
					slave.foreskin = slave.dick;
				}
				slave.balls = 1;
				if (slave.balls > 0) {
					slave.scrotum = slave.balls;
				}
				slave.weight = 0;
				slave.skill.vaginal = 0;
				slave.skill.penetrative = 0;
				slave.skill.oral = 100;
				slave.skill.anal = 0;
				slave.skill.whoring = 15;
				slave.skill.entertainment = 35;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.sexualFlaw = "none";
				slave.behavioralFlaw = "none";
				slave.custom.tattoo = "$His family crest is tattooed on $his cheek.";
				slave.custom.desc = "$His recognizable face marks $him as a descendant of an overthrown royal family.";
				break;
			case "d arcology":
				slave = GenerateNewSlave("XY", {minAge: 28, maxAge: 42, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 3;
				slave.prestigeDesc = "$He was once an arcology owner like you, but lost a Free Cities power struggle and was enslaved. An object lesson in the need to stay vigilant.";
				slave.career = "an arcology owner";
				slave.muscles = random(10, 50);
				slave.heels = 1;
				slave.voice = 0;
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-80, -60), undefined, undefined, undefined, jsRandom(40, 90));
				slave.anus = 3;
				slave.weight = -20;
				slave.piercing.nipple.weight = 2;
				slave.piercing.genitals.weight = 2;
				slave.piercing.dick.weight = 2;
				slave.piercing.anus.weight = 2;
				slave.piercing.lips.weight = 2;
				slave.piercing.tongue.weight = 2;
				slave.piercing.ear.weight = 2;
				slave.piercing.nose.weight = 2;
				slave.piercing.eyebrow.weight = 2;
				slave.piercing.navel.weight = 2;
				slave.boobsTat = "rude words";
				slave.buttTat = "rude words";
				slave.vaginaTat = "rude words";
				slave.dickTat = "rude words";
				slave.lipsTat = "rude words";
				slave.anusTat = "rude words";
				slave.shouldersTat = "rude words";
				slave.armsTat = "rude words";
				slave.legsTat = "rude words";
				slave.stampTat = "rude words";
				slave.skill.penetrative = 100;
				slave.skill.oral = 15;
				slave.skill.anal = 15;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.hStyle = "shaved";
				slave.hLength = 0;
				slave.behavioralFlaw = either("odd");
				slave.custom.desc = "$His back is covered in a fine network of hairline scars, as though $he's been repeatedly flogged bloody, healed with curatives, and then flogged again.";
				slave.custom.tattoo = "'ARCOLOGY OWNER' is tattooed across $his forehead.";
				break;
			case "d streamer":
				slave = GenerateNewSlave("XY", {maxAge: 28, disableDisability: 1});
				slave.origin = "You bought $him at auction.";
				slave.prestige = 1;
				slave.prestigeDesc = "$He was once a popular creator on a live streaming service, but donations dropped off after getting caught up in some controversy.";
				slave.career = "a camgirl";
				slave.boobs = random(1, 3) * 100;
				slave.butt = random(1, 2);
				slave.muscles = random(0, 20);
				slave.lips = random(15, 25);
				slave.face = random(20, 55);
				slave.faceShape = either("androgynous", "masculine");
				slave.devotion = random(-90, -80);
				slave.trust = random(-45, -25);
				setHealth(slave, jsRandom(-45, -25), 0, 0, 0, jsRandom(20, 60));
				slave.anus = 2;
				slave.weight = 20;
				slave.piercing.ear.weight = 1;
				slave.skill.penetrative = 10;
				slave.skill.oral = 30;
				slave.skill.anal = 1;
				slave.skill.whoring = 5;
				slave.skill.entertainment = 70;
				slave.pubicHStyle = "waxed";
				slave.underArmHStyle = "waxed";
				slave.behavioralFlaw = either("arrogant", "bitchy", "odd");
				slave.custom.desc = "$He is very comfortable in front of a camera and in public performances, having spent a long time entertaining $his viewers.";
		}
		return slave;
	}
};