From fd95d34699b587f4282238dfa08d60ac1cf2fe74 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Mon, 23 Nov 2020 19:30:20 -0500
Subject: [PATCH] cleanup

---
 src/npc/acquisition.js | 1030 +++++++++++++++++++---------------------
 1 file changed, 494 insertions(+), 536 deletions(-)

diff --git a/src/npc/acquisition.js b/src/npc/acquisition.js
index a27b253d042..80cd7706f57 100644
--- a/src/npc/acquisition.js
+++ b/src/npc/acquisition.js
@@ -127,10 +127,10 @@ App.StartingGirls.acquisition = function() {
 		}
 		V.PC.ovaryAge = V.PC.physicalAge;
 	}
-	const _pcMomFound = getSlave(V.PC.mother);
-	const _pcDadFound = getSlave(V.PC.father);
 
-	if (_pcMomFound === 0 && V.PC.mother > 0) {
+	// Did PC lose their mom?
+	const _pcMomFound = getSlave(V.PC.mother);
+	if (!_pcMomFound && V.PC.mother > 0) {
 		const _lostMom = V.PC.mother;
 		V.PC.mother = V.missingParentId;
 		for (const slave of V.slaves) {
@@ -140,7 +140,10 @@ App.StartingGirls.acquisition = function() {
 		}
 		V.missingParentId--;
 	}
-	if (_pcDadFound === 0 && V.PC.father > 0) {
+
+	// Did PC lose their Dad?
+	const _pcDadFound = getSlave(V.PC.father);
+	if (!_pcDadFound && V.PC.father > 0) {
 		const _lostDad = V.PC.father;
 		V.PC.father = V.missingParentId;
 		for (const slave of V.slaves) {
@@ -150,16 +153,11 @@ App.StartingGirls.acquisition = function() {
 		}
 		V.missingParentId--;
 	}
+
 	for (const slave of V.slaves) {
-		let _slaveMomFound = 0;
-		let _slaveDadFound = 0;
-		if (def V.slaveIndices[slave.mother]) {
-			_slaveMomFound = 1;
-		}
-		if (def V.slaveIndices[slave.father]) {
-			_slaveDadFound = 1;
-		}
-		if (_pcMomFound === 0 && V.PC.mother > 0) {
+		const _slaveMomFound = getSlave(slave.mother);
+		const _slaveDadFound = getSlave(slave.father);
+		if (!_pcMomFound && V.PC.mother > 0) {
 			_lostMom = V.PC.mother;
 			V.PC.mother = V.missingParentID;
 			for (const slave of V.slaves) {
@@ -169,7 +167,7 @@ App.StartingGirls.acquisition = function() {
 			}
 			V.missingParentID--;
 		}
-		if (_pcDadFound === 0 && V.PC.father > 0) {
+		if (!_pcDadFound && V.PC.father > 0) {
 			_lostDad = V.PC.father;
 			V.PC.father = V.missingParentID;
 			for (const slave of V.slaves) {
@@ -180,8 +178,8 @@ App.StartingGirls.acquisition = function() {
 			V.missingParentID--;
 		}
 	}
-	_coeffSlaves = [];
-	_genePoolMap = {};
+	const _coeffSlaves = [];
+	const _genePoolMap = {};
 	for (const slave of V.genePool) {
 		_genePoolMap[slave.ID] = slave;
 	}
@@ -192,17 +190,18 @@ App.StartingGirls.acquisition = function() {
 			_coeffSlaves.push(slave);
 		}
 	}
-	_ibcoeffs = ibc.coeff_slaves(_coeffSlaves);
+	const _ibcoeffs = ibc.coeff_slaves(_coeffSlaves);
 	for (const slave of _coeffSlaves) {
 		slave.inbreedingCoeff = _ibcoeffs[slave.ID];
 		_genePoolMap[slave.ID].inbreedingCoeff = _ibcoeffs[slave.ID];
 	}
 	if (V.plot === 1 && V.neighboringArcologies > 0) {
-		_bestProsperity = 0, _bestProsperityIndex = 1;
-		for (const arc of V.arcologies) {
-			if (arc.prosperity > _bestProsperity) {
-				_bestProsperity = arc.prosperity;
-				_bestProsperityIndex = _acq;
+		let _bestProsperity = 0;
+		let _bestProsperityIndex = 1;
+		for (let acq = 1; acq < V.arcologies.length; acq++) {
+			if (V.arcologies[acq].prosperity > _bestProsperity) {
+				_bestProsperity = V.arcologies[acq].prosperity;
+				_bestProsperityIndex = acq;
 			}
 		}
 		V.rivalSet = 1;
@@ -214,7 +213,7 @@ App.StartingGirls.acquisition = function() {
 
 	App.UI.DOM.appendNewElement("p", el, "You've done it.");
 	App.UI.DOM.appendNewElement("p", el, `You arrive at your new arcology, ${V.arcologies[0].name}, and head straight to the penthouse to enter the access codes that will tell the V.arcologies[0].name systems to recognize you as their owner. The penthouse office is ready to receive the codes, and they authenticate. A voice activates in your earpiece.`);
-	App.UI.DOM.appendNewElement("p", el, `Congratulations. I am a personal assistant program, and it is my pleasure to assist you, ${V.PlayerName()} the new owner of V.arcologies[0].name. I will offer useful information whenever possible in italics. Your new arcology has some unusual equipment. The previous owner kept a small stable of sex slaves. The penthouse therefore has a body modification studio for tattooing, bleaching and piercing, and an auto salon for more prosaic things like hair care. It also has a remote surgery, a small surgical theater that can be operated remotely by a qualified surgeon if you can pay the fee. Finally, it has a slave nutrition system connected to the arcology's hydroponics bays. This system produces a tasty protein-rich drink that provides the physically active female body all its necessary nutrients while leaving the lower digestive tract extremely clean. It even causes a mild increase in sex drive.`, "note");
+	App.UI.DOM.appendNewElement("p", el, `Congratulations. I am a personal assistant program, and it is my pleasure to assist you, ${PlayerName()} the new owner of V.arcologies[0].name. I will offer useful information whenever possible in italics. Your new arcology has some unusual equipment. The previous owner kept a small stable of sex slaves. The penthouse therefore has a body modification studio for tattooing, bleaching and piercing, and an auto salon for more prosaic things like hair care. It also has a remote surgery, a small surgical theater that can be operated remotely by a qualified surgeon if you can pay the fee. Finally, it has a slave nutrition system connected to the arcology's hydroponics bays. This system produces a tasty protein-rich drink that provides the physically active female body all its necessary nutrients while leaving the lower digestive tract extremely clean. It even causes a mild increase in sex drive.`, "note");
 
 	r = [];
 	r.push(`The previous owner seems to have left in something of a hurry.`);
@@ -222,543 +221,497 @@ App.StartingGirls.acquisition = function() {
 	const _heroSlaves = App.Utils.buildHeroArray().shuffle();
 	if (V.cheatMode === 1) {
 		r.push(`Since you've elected to take over an arcology with special advantages, you've acquired a very special group of slaves.`);
-		//<<include [[Cheatmode Database]]>> TODO dafuq is this
+		// <<include [[Cheatmode Database]]>> TODO dafuq is this
 	} else if (V.saveImported === 1) {
 		r.push(`Since it took some time for you to ensure that your existing stable of slaves were safely moved to ${V.arcologies[0].name}, the previous owner had the time to get most of their things away.`);
 	} else if ((V.targetArcology.fs !== "New") && (V.targetArcology.fs !== "Multiculturalist")) {
-		for (V.j = 0; V.j < 5; V.j++) {
-			let _slave;
+		for (let j = 0; j < 5; j++) {
+			let slave;
 			if (_valueOwed - _valueGiven <= 5000) {
 				break;
 			}
 			switch (V.targetArcology.fs) {
 				case "Supremacist":
 					V.oneTimeDisableDisability = 1;
-					V.fixedRace = V.arcologies[0].FSSupremacistRace;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(-25, -45);
-					setHealth(_slave, jsRandom(0, 20), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {race: V.arcologies[0].FSSupremacistRace});
+					slave.devotion = random(25, 45), slave.trust = random(-25, -45);
+					setHealth(slave, jsRandom(0, 20), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.skill.entertainment = random(15, 35);
-					_slave.clothes = "uncomfortable straps", _slave.collar = "uncomfortable leather", _slave.shoes = "flats";
-					_slave.assignment = "please you";
+					slave.skill.entertainment = random(15, 35);
+					slave.clothes = "uncomfortable straps", slave.collar = "uncomfortable leather", slave.shoes = "flats";
+					slave.assignment = "please you";
 				case "Subjugationist":
 					V.oneTimeDisableDisability = 1;
-					V.fixedRace = V.arcologies[0].FSSubjugationistRace;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(-25, -45);
-					setHealth(_slave, jsRandom(0, 20), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {race: V.arcologies[0].FSSubjugationistRace});
+					slave.devotion = random(25, 45), slave.trust = random(-25, -45);
+					setHealth(slave, jsRandom(0, 20), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.skill.whoring = random(15, 35);
-					_slave.clothes = "uncomfortable straps", _slave.collar = "uncomfortable leather", _slave.shoes = "flats";
-					_slave.assignment = "whore";
+					slave.skill.whoring = random(15, 35);
+					slave.clothes = "uncomfortable straps", slave.collar = "uncomfortable leather", slave.shoes = "flats";
+					slave.assignment = "whore";
 				case "GenderRadicalist":
-					slaveOneTimeMaxAge = 25;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave("XY");
-					_slave.devotion = random(25, 45), _slave.trust = random(15, -15);
-					setHealth(_slave, 100, 0, 0, 0, jsRandom(0, 20));
-					_slave.face = random(0, 55);
-					_slave.boobs += 100 * random(2, 4);
-					_slave.butt += random(1, 2);
-					_slave.attrXY = random(70, 90), _slave.attrXX = 0;
-					_slave.skill.oral = random(35, 65), _slave.skill.anal = random(35, 65), _slave.skill.whoring = random(35, 65);
-					SoftenSexualFlaw(_slave);
-					_slave.clothes = "uncomfortable straps", _slave.collar = "stylish leather", _slave.shoes = "heels";
-					_slave.assignment = "whore";
+					slave = GenerateNewSlave("XY", {disableDisability: 1, maxAge: 25});
+					slave.devotion = random(25, 45), slave.trust = random(15, -15);
+					setHealth(slave, 100, 0, 0, 0, jsRandom(0, 20));
+					slave.face = random(0, 55);
+					slave.boobs += 100 * random(2, 4);
+					slave.butt += random(1, 2);
+					slave.attrXY = random(70, 90), slave.attrXX = 0;
+					slave.skill.oral = random(35, 65), slave.skill.anal = random(35, 65), slave.skill.whoring = random(35, 65);
+					SoftenSexualFlaw(slave);
+					slave.clothes = "uncomfortable straps", slave.collar = "stylish leather", slave.shoes = "heels";
+					slave.assignment = "whore";
 				case "GenderFundamentalist":
-					slaveOneTimeMinAge = V.fertilityAge;
-					slaveOneTimeMaxAge = 25;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave("XX");
-					_slave.devotion = random(25, 45), _slave.trust = random(-25, -45);
-					setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.preg = random(1, 40), _slave.lactation = 1, _slave.lactationDuration = 2;
-					SetBellySize(_slave);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {minAge: V.fertilityAge, maxAge: 25, disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(-25, -45);
+					setHealth(slave, jsRandom(55, 65), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.preg = random(1, 40), slave.lactation = 1, slave.lactationDuration = 2;
+					SetBellySize(slave);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.clothes = "a nice maid outfit", _slave.collar = "tight steel", _slave.shoes = "flats";
-					_slave.assignment = "be a servant";
+					slave.clothes = "a nice maid outfit", slave.collar = "tight steel", slave.shoes = "flats";
+					slave.assignment = "be a servant";
 				case "Paternalist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(55, 65);
-					setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.intelligence = random(0, 100), _slave.intelligenceImplant = 30;
-					_slave.skill.entertainment = random(15, 35);
-					_slave.clothes = "conservative clothing", _slave.collar = "none", _slave.shoes = "flats";
-					_slave.assignment = "be a servant";
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(55, 65);
+					setHealth(slave, jsRandom(55, 65), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.intelligence = random(0, 100), slave.intelligenceImplant = 30;
+					slave.skill.entertainment = random(15, 35);
+					slave.clothes = "conservative clothing", slave.collar = "none", slave.shoes = "flats";
+					slave.assignment = "be a servant";
 				case "Degradationist":
-					_slave = GenerateNewSlave();
-					_slave.devotion = 25, _slave.trust = -25;
-					setHealth(_slave, jsRandom(0, 15), 0, 0, 0, 0);
-					_slave.fuckdoll = 100;
-					_slave.career = "a Fuckdoll";
-					_slave.fetish = "mindbroken";
-					_slave.boobs += 100 * random(10, 20);
-					_slave.butt += random(2, 3);
-					_slave.lips = random(2, 4);
-					_slave.weight = random(-15, 15);
-					_slave.skill.oral = 0, _slave.skill.anal = 0, _slave.skill.vaginal = 0, _slave.skill.entertainment = 0, _slave.skill.whoring = 0;
-					_slave.behavioralFlaw = "none", _slave.sexualFlaw = "none";
-					_slave.clothes = "a Fuckdoll suit";
-					_slave.assignment = "please you";
+					slave = GenerateNewSlave("XX");
+					slave.devotion = 25, slave.trust = -25;
+					setHealth(slave, jsRandom(0, 15), 0, 0, 0, 0);
+					slave.fuckdoll = 100;
+					slave.career = "a Fuckdoll";
+					slave.fetish = "mindbroken";
+					slave.boobs += 100 * random(10, 20);
+					slave.butt += random(2, 3);
+					slave.lips = random(2, 4);
+					slave.weight = random(-15, 15);
+					slave.skill.oral = 0, slave.skill.anal = 0, slave.skill.vaginal = 0, slave.skill.entertainment = 0, slave.skill.whoring = 0;
+					slave.behavioralFlaw = "none", slave.sexualFlaw = "none";
+					slave.clothes = "a Fuckdoll suit";
+					slave.assignment = "please you";
 				case "AssetExpansionist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(-15, 15);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.chem = 50;
-					_slave.face = random(15, 100);
-					_slave.boobs += 100 * random(10, 20);
-					_slave.butt += random(2, 3);
-					_slave.lips += random(0, 1);
-					if (_slave.balls > 0) {
-						_slave.balls++;
-					}
-					if (_slave.dick > 0) {
-						_slave.dick++;
-					}
-					_slave.weight = random(15, 90);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = 0, _slave.anus = 0;
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(-15, 15);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.chem = 50;
+					slave.face = random(15, 100);
+					slave.boobs += 100 * random(10, 20);
+					slave.butt += random(2, 3);
+					slave.lips += random(0, 1);
+					if (slave.balls > 0) {
+						slave.balls++;
+					}
+					if (slave.dick > 0) {
+						slave.dick++;
+					}
+					slave.weight = random(15, 90);
+					slave.skill.oral = random(15, 35), slave.skill.anal = 0, slave.anus = 0;
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.skill.entertainment = random(15, 35);
-					_slave.clothes = "slutty jewelry", _slave.collar = "pretty jewelry", _slave.shoes = "heels";
-					_slave.assignment = "please you";
+					slave.skill.entertainment = random(15, 35);
+					slave.clothes = "slutty jewelry", slave.collar = "pretty jewelry", slave.shoes = "heels";
+					slave.assignment = "please you";
 				case "SlimnessEnthusiast":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(55, 65);
-					setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.boobs = 100 * random(1, 4);
-					_slave.butt = random(1, 2);
-					_slave.weight = random(-25, -15);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = 0, _slave.anus = 0;
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(55, 65);
+					setHealth(slave, jsRandom(55, 65), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.boobs = 100 * random(1, 4);
+					slave.butt = random(1, 2);
+					slave.weight = random(-25, -15);
+					slave.skill.oral = random(15, 35), slave.skill.anal = 0, slave.anus = 0;
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.skill.entertainment = random(15, 35);
-					_slave.clothes = "a leotard", _slave.collar = "pretty jewelry", _slave.shoes = "flats";
-					_slave.assignment = "please you";
+					slave.skill.entertainment = random(15, 35);
+					slave.clothes = "a leotard", slave.collar = "pretty jewelry", slave.shoes = "flats";
+					slave.assignment = "please you";
 				case "TransformationFetishist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(-15, 15);
-					setHealth(_slave, jsRandom(-15, 0), Math.max(normalRandInt(5, 3), 0), Math.max(normalRandInt(5, 3), 0), 0, 0);
-					_slave.faceImplant = random(40, 70);
-					_slave.face = Math.trunc(_slave.face + _slave.faceImplant / 2, -100, 100);
-					_slave.boobsImplant = 200 * random(4, 8);
-					_slave.boobs += _slave.boobsImplant;
-					_slave.boobsImplantType = "normal";
-					_slave.buttImplant = random(2, 4);
-					_slave.butt += _slave.buttImplant;
-					_slave.buttImplant = "normal";
-					_slave.lipsImplant = random(1, 2);
-					_slave.lips = Math.trunc(_slave.lipsImplant + 2, -3, 3);
-					_slave.weight = random(-25, -15);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(-15, 15);
+					setHealth(slave, jsRandom(-15, 0), Math.max(normalRandInt(5, 3), 0), Math.max(normalRandInt(5, 3), 0), 0, 0);
+					slave.faceImplant = random(40, 70);
+					slave.face = Math.trunc(slave.face + slave.faceImplant / 2, -100, 100);
+					slave.boobsImplant = 200 * random(4, 8);
+					slave.boobs += slave.boobsImplant;
+					slave.boobsImplantType = "normal";
+					slave.buttImplant = random(2, 4);
+					slave.butt += slave.buttImplant;
+					slave.buttImplant = "normal";
+					slave.lipsImplant = random(1, 2);
+					slave.lips = Math.trunc(slave.lipsImplant + 2, -3, 3);
+					slave.weight = random(-25, -15);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.clothes = "a string bikini", _slave.collar = "shock punishment", _slave.shoes = "extreme heels";
-					_slave.assignment = "whore";
+					slave.clothes = "a string bikini", slave.collar = "shock punishment", slave.shoes = "extreme heels";
+					slave.assignment = "whore";
 				case "BodyPurist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(55, 65), _slave.trust = random(25, 45);
-					setHealth(_slave, 100, 0, 0, 0, jsRandom(0, 20));
-					_slave.face = random(15, 100);
-					_slave.weight = random(-5, 5);
-					_slave.muscles = random(10, 25);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(55, 65), slave.trust = random(25, 45);
+					setHealth(slave, 100, 0, 0, 0, jsRandom(0, 20));
+					slave.face = random(15, 100);
+					slave.weight = random(-5, 5);
+					slave.muscles = random(10, 25);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.clothes = "a nice maid outfit", _slave.collar = "pretty jewelry", _slave.shoes = "heels";
-					_slave.assignment = "be a servant";
+					slave.clothes = "a nice maid outfit", slave.collar = "pretty jewelry", slave.shoes = "heels";
+					slave.assignment = "be a servant";
 				case "MaturityPreferentialist":
-					slaveOneTimeMinAge = 36;
-					slaveOneTimeMaxAge = 39;
-					V.one_time_age_overrides_pedo_mode = 1;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(55, 65), _slave.trust = random(-15, 15);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.boobs += 100 * random(1, 4);
-					_slave.butt += random(1, 2);
-					_slave.weight = random(-5, 90);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {
+						minAge: 36, maxAge: 39, ageOverridesPedoMode: 1, disableDisability: 1
+					});
+					slave.devotion = random(55, 65), slave.trust = random(-15, 15);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.boobs += 100 * random(1, 4);
+					slave.butt += random(1, 2);
+					slave.weight = random(-5, 90);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					SoftenBehavioralFlaw(_slave);
-					_slave.clothes = "a slutty maid outfit", _slave.collar = "pretty jewelry", _slave.shoes = "heels";
-					_slave.assignment = "be a servant";
+					SoftenBehavioralFlaw(slave);
+					slave.clothes = "a slutty maid outfit", slave.collar = "pretty jewelry", slave.shoes = "heels";
+					slave.assignment = "be a servant";
 				case "YouthPreferentialist":
-					slaveOneTimeMaxAge = 19;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(55, 65);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.boobs = 100 * random(1, 4);
-					_slave.butt = random(1, 3);
-					_slave.weight = random(-25, 25);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = 0, _slave.anus = 0;
-					if (_slave.vagina > -1) {
-						_slave.skill.vaginal = 0, _slave.vagina = 0;
-					}
-					_slave.skill.entertainment = random(15, 35);
-					_slave.clothes = "a schoolgirl outfit", _slave.collar = "pretty jewelry", _slave.shoes = "heels";
-					_slave.assignment = "be a servant";
+					slave = GenerateNewSlave("XX", {maxAge: 19, disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(55, 65);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.boobs = 100 * random(1, 4);
+					slave.butt = random(1, 3);
+					slave.weight = random(-25, 25);
+					slave.skill.oral = random(15, 35), slave.skill.anal = 0, slave.anus = 0;
+					if (slave.vagina > -1) {
+						slave.skill.vaginal = 0, slave.vagina = 0;
+					}
+					slave.skill.entertainment = random(15, 35);
+					slave.clothes = "a schoolgirl outfit", slave.collar = "pretty jewelry", slave.shoes = "heels";
+					slave.assignment = "be a servant";
 				case "Pastoralist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(-25, -45);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.boobs += 100 * random(10, 20);
-					if (_slave.balls > 0) {
-						_slave.balls++;
-					}
-					_slave.lactation = 2, _slave.lactationDuration = 2;
-					_slave.clothes = "Western clothing", _slave.collar = "leather with cowbell", _slave.shoes = "flats";
-					_slave.assignment = "get milked";
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(-25, -45);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.boobs += 100 * random(10, 20);
+					if (slave.balls > 0) {
+						slave.balls++;
+					}
+					slave.lactation = 2, slave.lactationDuration = 2;
+					slave.clothes = "Western clothing", slave.collar = "leather with cowbell", slave.shoes = "flats";
+					slave.assignment = "get milked";
 				case "PhysicalIdealist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(25, 45);
-					setHealth(_slave, 100, 0, 0, 0, jsRandom(10, 40));
-					_slave.muscles = random(50, 100);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(25, 45);
+					setHealth(slave, 100, 0, 0, 0, jsRandom(10, 40));
+					slave.muscles = random(50, 100);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.skill.whoring = random(15, 35);
-					_slave.clothes = "body oil", _slave.collar = "none", _slave.shoes = "none";
-					_slave.assignment = "whore";
+					slave.skill.whoring = random(15, 35);
+					slave.clothes = "body oil", slave.collar = "none", slave.shoes = "none";
+					slave.assignment = "whore";
 				case "ChattelReligionist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(55, 65), _slave.trust = random(55, 65);
-					setHealth(_slave, jsRandom(0, 15), 0, 0, 0, 0);
-					if (_slave.vagina === 0) {
-						_slave.vagina++;
-					}
-					_slave.skill.whoring = random(10, 20);
-					_slave.behavioralFlaw = "none", _slave.behavioralQuirk = "sinful";
-					_slave.clothes = "a chattel habit", _slave.collar = "heavy gold", _slave.shoes = "flats";
-					_slave.assignment = "whore";
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(55, 65), slave.trust = random(55, 65);
+					setHealth(slave, jsRandom(0, 15), 0, 0, 0, 0);
+					if (slave.vagina === 0) {
+						slave.vagina++;
+					}
+					slave.skill.whoring = random(10, 20);
+					slave.behavioralFlaw = "none", slave.behavioralQuirk = "sinful";
+					slave.clothes = "a chattel habit", slave.collar = "heavy gold", slave.shoes = "flats";
+					slave.assignment = "whore";
 				case "RomanRevivalist":
-					slaveOneTimeMaxAge = 19;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = 100, _slave.trust = random(55, 65);
-					setHealth(_slave, 100, 0, 0, 0, jsRandom(10, 30));
-					_slave.face = random(0, 55);
-					_slave.muscles = random(25, 50);
-					_slave.skill.combat = 1;
-					_slave.behavioralFlaw = "none", _slave.behavioralQuirk = "fitness";
-					_slave.behavioralFlaw = "none";
-					_slave.clothes = "a toga", _slave.collar = "pretty jewelry", _slave.shoes = "flats";
-					_slave.assignment = "guard you", V.BodyguardID = _slave.ID;
+					slave = GenerateNewSlave("XX", {maxAge: 19, disableDisability: 1});
+					slave.devotion = 100, slave.trust = random(55, 65);
+					setHealth(slave, 100, 0, 0, 0, jsRandom(10, 30));
+					slave.face = random(0, 55);
+					slave.muscles = random(25, 50);
+					slave.skill.combat = 1;
+					slave.behavioralFlaw = "none", slave.behavioralQuirk = "fitness";
+					slave.behavioralFlaw = "none";
+					slave.clothes = "a toga", slave.collar = "pretty jewelry", slave.shoes = "flats";
+					slave.assignment = "guard you", V.BodyguardID = slave.ID;
 				case "NeoImperialist":
-					slaveOneTimeMinAge = 16;
-					slaveOneTimeMaxAge = 28;
-					V.oneTimeDisableDisability = 1;
-					V.fixedRace = "white";
-					_slave = GenerateNewSlave();
-					_slave.devotion = 100, _slave.trust = random(55, 65);
-					setHealth(_slave, 100, 0, 0, 0, jsRandom(10, 30));
-					_slave.face = random(20, 75);
-					_slave.muscles = random(25, 60);
-					_slave.skill.combat = 1;
-					_slave.behavioralFlaw = "none", _slave.behavioralQuirk = "fitness";
-					_slave.behavioralFlaw = "none";
-					_slave.skill.entertainment = random(15, 35);
-					_slave.clothes = "a tight Imperial bodysuit", _slave.shoes = "flats";
-					_slave.assignment = "guard you", V.BodyguardID = _slave.ID;
+					slave = GenerateNewSlave("XX", {
+						minAge: 16, maxAge: 28, race: "white", disableDisability: 1
+					});
+					slave.devotion = 100, slave.trust = random(55, 65);
+					setHealth(slave, 100, 0, 0, 0, jsRandom(10, 30));
+					slave.face = random(20, 75);
+					slave.muscles = random(25, 60);
+					slave.skill.combat = 1;
+					slave.behavioralFlaw = "none", slave.behavioralQuirk = "fitness";
+					slave.behavioralFlaw = "none";
+					slave.skill.entertainment = random(15, 35);
+					slave.clothes = "a tight Imperial bodysuit", slave.shoes = "flats";
+					slave.assignment = "guard you", V.BodyguardID = slave.ID;
 				case "AztecRevivalist":
-					V.oneTimeDisableDisability = 1;
-					V.fixedRace = "latina";
-					_slave = GenerateNewSlave(null, { nationality: "Mexican" });
-					_slave.accent = 0;
-					_slave.devotion = 75, _slave.trust = 75;
-					setHealth(_slave, jsRandom(-20, 20), 0, 0, 0, 0);
-					_slave.muscles = random(50, 75);
-					_slave.skill.combat = 1;
-					_slave.behavioralFlaw = "malicious", _slave.behavioralQuirk = "none";
-					_slave.clothes = "a huipil", _slave.collar = "pretty jewelry", _slave.shoes = "none";
-					_slave.assignment = "be your Head Girl", V.HeadGirlID = _slave.ID;
+					slave = GenerateNewSlave(null, {race: "latina", nationality: "Mexican", disableDisability: 1});
+					slave.accent = 0;
+					slave.devotion = 75, slave.trust = 75;
+					setHealth(slave, jsRandom(-20, 20), 0, 0, 0, 0);
+					slave.muscles = random(50, 75);
+					slave.skill.combat = 1;
+					slave.behavioralFlaw = "malicious";
+					slave.behavioralQuirk = "none";
+					slave.clothes = "a huipil", slave.collar = "pretty jewelry", slave.shoes = "none";
+					slave.assignment = "be your Head Girl", V.HeadGirlID = slave.ID;
 				case "EgyptianRevivalist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(25, 45);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(25, 45);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.skill.entertainment = random(15, 35);
-					SoftenSexualFlaw(_slave);
-					_slave.clothes = "slutty jewelry", _slave.collar = "ancient Egyptian", _slave.shoes = "flats";
-					_slave.assignment = "please you";
+					slave.skill.entertainment = random(15, 35);
+					SoftenSexualFlaw(slave);
+					slave.clothes = "slutty jewelry", slave.collar = "ancient Egyptian", slave.shoes = "flats";
+					slave.assignment = "please you";
 				case "EdoRevivalist":
-					V.oneTimeDisableDisability = 1;
-					V.fixedRace = "asian";
-					_slave = GenerateNewSlave(null, { nationality: "Japanese" });
-					_slave.accent = 0;
-					_slave.devotion = random(25, 45), _slave.trust = random(25, 45);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.intelligence = random(0, 100), _slave.intelligenceImplant = 30;
-					_slave.skill.entertainment = 100;
-					_slave.clothes = "a kimono", _slave.collar = "satin choker", _slave.shoes = "heels";
-					_slave.assignment = "serve the public";
+					slave = GenerateNewSlave(null, {race: "asian", nationality: "Japanese", disableDisability: 1});
+					slave.accent = 0;
+					slave.devotion = random(25, 45), slave.trust = random(25, 45);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.intelligence = random(0, 100), slave.intelligenceImplant = 30;
+					slave.skill.entertainment = 100;
+					slave.clothes = "a kimono", slave.collar = "satin choker", slave.shoes = "heels";
+					slave.assignment = "serve the public";
 				case "ArabianRevivalist":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(25, 45), _slave.trust = random(-15, 15);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.intelligence = random(-15, 80), _slave.intelligenceImplant = 0;
-					_slave.clothes = "harem gauze", _slave.collar = "uncomfortable leather", _slave.shoes = "flats";
-					_slave.assignment = "take classes";
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(-15, 15);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.intelligence = random(-15, 80), slave.intelligenceImplant = 0;
+					slave.clothes = "harem gauze", slave.collar = "uncomfortable leather", slave.shoes = "flats";
+					slave.assignment = "take classes";
 				case "ChineseRevivalist":
-					slaveOneTimeMinAge = 36;
-					slaveOneTimeMaxAge = 38;
-					V.one_time_age_overrides_pedo_mode = 1;
-					V.oneTimeDisableDisability = 1;
-					V.fixedRace = "asian";
-					_slave = GenerateNewSlave(null, { nationality: "Chinese" });
-					_slave.devotion = random(55, 65), _slave.trust = random(25, 45);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(0, 55);
-					_slave.accent = 0;
-					_slave.intelligence = 100, _slave.intelligenceImplant = 30;
-					_slave.skill.oral = 100, _slave.skill.anal = 100;
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave(null, {
+						race: "asian", nationality: "Chinese", minAge: 36, maxAge: 38, ageOverridesPedoMode: 1, disableDisability:1
+					});
+					slave.devotion = random(55, 65), slave.trust = random(25, 45);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(0, 55);
+					slave.accent = 0;
+					slave.intelligence = 100, slave.intelligenceImplant = 30;
+					slave.skill.oral = 100, slave.skill.anal = 100;
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = 100;
+						slave.skill.vaginal = 100;
 					}
-					_slave.skill.entertainment = 100, _slave.skill.whoring = 100;
-					SoftenBehavioralFlaw(_slave);
-					SoftenSexualFlaw(_slave);
-					_slave.clothes = "a slutty qipao", _slave.collar = "pretty jewelry", _slave.shoes = "heels";
-					_slave.assignment = "be your Head Girl", V.HeadGirlID = _slave.ID;
+					slave.skill.entertainment = 100, slave.skill.whoring = 100;
+					SoftenBehavioralFlaw(slave);
+					SoftenSexualFlaw(slave);
+					slave.clothes = "a slutty qipao", slave.collar = "pretty jewelry", slave.shoes = "heels";
+					slave.assignment = "be your Head Girl", V.HeadGirlID = slave.ID;
 				case "Eugenics":
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = -100, _slave.trust = -100;
-					setHealth(_slave, jsRandom(80, 90), 0, 0, 0, 0);
-					_slave.intelligence = 100;
-					_slave.intelligenceImplant = 30;
-					_slave.face = 100;
-					_slave.faceShape = "sensual";
-					_slave.skill.oral = random(35, 75), _slave.skill.anal = random(35, 75);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave = GenerateNewSlave("XX", {disableDisability: 1});
+					slave.devotion = -100, slave.trust = -100;
+					setHealth(slave, jsRandom(80, 90), 0, 0, 0, 0);
+					slave.intelligence = 100;
+					slave.intelligenceImplant = 30;
+					slave.face = 100;
+					slave.faceShape = "sensual";
+					slave.skill.oral = random(35, 75), slave.skill.anal = random(35, 75);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(35, 75);
+						slave.skill.vaginal = random(35, 75);
 					}
-					_slave.skill.entertainment = random(15, 35);
-					_slave.skill.whoring = 0;
-					SoftenSexualFlaw(_slave);
-					_slave.clothes = "a ball gown", _slave.shoes = "flats";
-					_slave.assignment = "rest";
+					slave.skill.entertainment = random(15, 35);
+					slave.skill.whoring = 0;
+					SoftenSexualFlaw(slave);
+					slave.clothes = "a ball gown", slave.shoes = "flats";
+					slave.assignment = "rest";
 				case "Repopulationist":
-					slaveOneTimeMinAge = V.fertilityAge + 3;
-					slaveOneTimeMaxAge = 25;
-					V.one_time_age_overrides_pedo_mode = 1;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave("XX");
-					_slave.devotion = random(25, 45), _slave.trust = random(-25, -45);
-					setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.preg = random(10, 40), _slave.pregType = random(3, 8), _slave.lactation = 1, _slave.lactationDuration = 2;
-					SetBellySize(_slave);
-					_slave.counter.birthsTotal = 5;
-					_slave.bellySag = 20, _slave.bellySagPreg = 20;
-					if (_slave.vagina > -1) {
-						_slave.vagina = 4;
-						_slave.skill.vaginal = random(15, 35);
-					}
-					_slave.clothes = "a nice maid outfit", _slave.shoes = "flats";
-					_slave.assignment = "please you";
+					slave = GenerateNewSlave("XX", {
+						minAge: V.fertilityAge + 3, maxAge: 25, ageOverridesPedoMode: 1, disableDisability: 1
+					});
+					slave.devotion = random(25, 45), slave.trust = random(-25, -45);
+					setHealth(slave, jsRandom(55, 65), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.preg = random(10, 40), slave.pregType = random(3, 8), slave.lactation = 1, slave.lactationDuration = 2;
+					SetBellySize(slave);
+					slave.counter.birthsTotal = 5;
+					slave.bellySag = 20, slave.bellySagPreg = 20;
+					if (slave.vagina > -1) {
+						slave.vagina = 4;
+						slave.skill.vaginal = random(15, 35);
+					}
+					slave.clothes = "a nice maid outfit", slave.shoes = "flats";
+					slave.assignment = "please you";
 				case "HedonisticDecadence":
-					slaveOneTimeMaxAge = 25;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave("XX");
-					_slave.devotion = random(25, 45), _slave.trust = random(-25, -45);
-					setHealth(_slave, jsRandom(-20, 20), 0, 0, 0, 0);
-					_slave.face = random(15, 40);
-					_slave.boobs += 100 * random(3, 6);
-					_slave.butt += random(2, 5);
-					_slave.weight = random(100, 200);
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35), _slave.anus = 2;
-					if (_slave.vagina > -1) {
-						_slave.skill.vaginal = random(15, 35), _slave.vagina = 3;
-					}
-					_slave.skill.entertainment = 0;
-					_slave.energy = random(60, 80);
-					_slave.behavioralFlaw = "gluttonous";
-					_slave.clothes = "attractive lingerie", _slave.shoes = "flats";
-					_slave.diet = "fattening";
-					_slave.rules.living = "luxurious";
-					_slave.assignment = "rest";
+					slave = GenerateNewSlave("XX", {maxAge: 25, disableDisability: 1});
+					slave.devotion = random(25, 45), slave.trust = random(-25, -45);
+					setHealth(slave, jsRandom(-20, 20), 0, 0, 0, 0);
+					slave.face = random(15, 40);
+					slave.boobs += 100 * random(3, 6);
+					slave.butt += random(2, 5);
+					slave.weight = random(100, 200);
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35), slave.anus = 2;
+					if (slave.vagina > -1) {
+						slave.skill.vaginal = random(15, 35), slave.vagina = 3;
+					}
+					slave.skill.entertainment = 0;
+					slave.energy = random(60, 80);
+					slave.behavioralFlaw = "gluttonous";
+					slave.clothes = "attractive lingerie", slave.shoes = "flats";
+					slave.diet = "fattening";
+					slave.rules.living = "luxurious";
+					slave.assignment = "rest";
 				case "IntellectualDependency":
-					slaveOneTimeMinAge = 14;
-					slaveOneTimeMaxAge = 18;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0);
-					_slave.devotion = random(45, 65), _slave.trust = random(-15, 45);
-					_slave.face = random(30, 100);
-					_slave.energy = 100;
-					_slave.weight = random(-25, -15);
-					_slave.skill.oral = 0, _slave.skill.anal = 0, _slave.skill.vaginal = 0, _slave.skill.entertainment = 0, _slave.skill.whoring = 0;
-					_slave.intelligence = -100;
-					_slave.intelligenceImplant = 0;
-					if (_slave.vagina === 0) {
-						_slave.vagina++;
-					}
-					_slave.anus++;
+					slave = GenerateNewSlave("XX", {minAge: 14, maxAge: 18, disableDisability: 1});
+					setHealth(slave, jsRandom(55, 65), 0, 0, 0, 0);
+					slave.devotion = random(45, 65), slave.trust = random(-15, 45);
+					slave.face = random(30, 100);
+					slave.energy = 100;
+					slave.weight = random(-25, -15);
+					slave.skill.oral = 0, slave.skill.anal = 0, slave.skill.vaginal = 0, slave.skill.entertainment = 0, slave.skill.whoring = 0;
+					slave.intelligence = -100;
+					slave.intelligenceImplant = 0;
+					if (slave.vagina === 0) {
+						slave.vagina++;
+					}
+					slave.anus++;
 				case "SlaveProfessionalism":
-					slaveOneTimeMinAge = 18;
-					slaveOneTimeMaxAge = 25;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = 100, _slave.trust = 20;
-					setHealth(_slave, 80, 0, 0, 0, jsRandom(10, 30));
-					_slave.face = random(30, 100);
-					_slave.energy = 10;
-					_slave.weight = random(-15, 5);
-					_slave.skill.oral = 100, _slave.skill.anal = 100, _slave.skill.vaginal = 100, _slave.skill.entertainment = 100, _slave.skill.whoring = 100;
-					_slave.intelligence = 100;
-					_slave.intelligenceImplant = 30;
-					_slave.accent = 0;
-					SoftenBehavioralFlaw(_slave);
-					SoftenSexualFlaw(_slave);
-					_slave.clothes = "a nice maid outfit", _slave.collar = "pretty jewelry";
-					_slave.assignment = "be your Head Girl", V.HeadGirlID = _slave.ID;
+					slave = GenerateNewSlave("XX", {minAge: 18, maxAge:25, disableDisability:1});
+					slave.devotion = 100, slave.trust = 20;
+					setHealth(slave, 80, 0, 0, 0, jsRandom(10, 30));
+					slave.face = random(30, 100);
+					slave.energy = 10;
+					slave.weight = random(-15, 5);
+					slave.skill.oral = 100, slave.skill.anal = 100, slave.skill.vaginal = 100, slave.skill.entertainment = 100, slave.skill.whoring = 100;
+					slave.intelligence = 100;
+					slave.intelligenceImplant = 30;
+					slave.accent = 0;
+					SoftenBehavioralFlaw(slave);
+					SoftenSexualFlaw(slave);
+					slave.clothes = "a nice maid outfit", slave.collar = "pretty jewelry";
+					slave.assignment = "be your Head Girl", V.HeadGirlID = slave.ID;
 				case "PetiteAdmiration":
-					slaveOneTimeMinAge = 14;
-					slaveOneTimeMaxAge = 18;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(55, 65), _slave.trust = random(-15, 15);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					if (_slave.height >= 150) {
-						_slave.height = Math.trunc(Height.random(_slave, { limitMult: [-3, -1] }));
-						if (_slave.height >= 150) {
-							_slave.height = Math.trunc(Height.random(_slave, { limitMult: [-4, -2] }));
-							if (_slave.height >= 150) {
-								_slave.height = random(90, 130);
-								_slave.geneticQuirks.dwarfism = 2;
+					slave = GenerateNewSlave("XX", {minAge: 14, maxAge: 18, disableDisability: 1});
+					slave.devotion = random(55, 65), slave.trust = random(-15, 15);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					if (slave.height >= 150) {
+						slave.height = Math.trunc(Height.random(slave, {limitMult: [-3, -1]}));
+						if (slave.height >= 150) {
+							slave.height = Math.trunc(Height.random(slave, {limitMult: [-4, -2]}));
+							if (slave.height >= 150) {
+								slave.height = random(90, 130);
+								slave.geneticQuirks.dwarfism = 2;
 							}
 						}
 					}
-					_slave.skill.oral = random(35, 65), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave.skill.oral = random(35, 65), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.clothes = "a succubus outfit", _slave.legAccessory = "long stockings";
-					_slave.assignment = "please you";
+					slave.clothes = "a succubus outfit", slave.legAccessory = "long stockings";
+					slave.assignment = "please you";
 				case "StatuesqueGlorification":
-					slaveOneTimeMinAge = 18;
-					slaveOneTimeMaxAge = 30;
-					V.one_time_age_overrides_pedo_mode = 1;
-					V.oneTimeDisableDisability = 1;
-					_slave = GenerateNewSlave();
-					_slave.devotion = random(55, 65), _slave.trust = random(-15, 15);
-					setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0);
-					_slave.face = random(15, 100);
-					_slave.weight = random(-5, 5);
-					_slave.muscles = random(20, 40);
-					if (_slave.height < 185) {
-						_slave.height = Math.trunc(Height.random(_slave, { limitMult: [1, 3] }));
-						if (_slave.height < 185) {
-							_slave.height = Math.trunc(Height.random(_slave, { limitMult: [2, 4] }));
-							if (_slave.height < 185) {
-								_slave.height = random(200, 264);
-								_slave.geneticQuirks.gigantism = 2;
+					slave = GenerateNewSlave("XX", {
+						minAge: 18, maxAge: 30, ageOverridesPedoMode: 1, disableDisability: 1
+					});
+					slave.devotion = random(55, 65), slave.trust = random(-15, 15);
+					setHealth(slave, jsRandom(25, 45), 0, 0, 0, 0);
+					slave.face = random(15, 100);
+					slave.weight = random(-5, 5);
+					slave.muscles = random(20, 40);
+					if (slave.height < 185) {
+						slave.height = Math.trunc(Height.random(slave, {limitMult: [1, 3]}));
+						if (slave.height < 185) {
+							slave.height = Math.trunc(Height.random(slave, {limitMult: [2, 4]}));
+							if (slave.height < 185) {
+								slave.height = random(200, 264);
+								slave.geneticQuirks.gigantism = 2;
 							}
 						}
 					}
-					_slave.skill.oral = random(15, 35), _slave.skill.anal = random(15, 35);
-					if (_slave.vagina > -1) {
-						if (_slave.vagina === 0) {
-							_slave.vagina++;
+					slave.skill.oral = random(15, 35), slave.skill.anal = random(15, 35);
+					if (slave.vagina > -1) {
+						if (slave.vagina === 0) {
+							slave.vagina++;
 						}
-						_slave.skill.vaginal = random(15, 35);
+						slave.skill.vaginal = random(15, 35);
 					}
-					_slave.clothes = "slutty business attire", _slave.shoes = "heels";
-					_slave.assignment = "please you";
+					slave.clothes = "slutty business attire", slave.shoes = "heels";
+					slave.assignment = "please you";
 				default:
 					r.push(`ERROR: bad arcology type`);
 			}
-			_slave.origin = "You acquired ${him} along with the arcology.", _slave.career = "a slave";
-			_slaveCost = slaveCost(_slave);
+			slave.origin = "You acquired $him along with the arcology.";
+			slave.career = "a slave";
+			let _slaveCost = slaveCost(slave);
 			if (["AztecRevivalist", "ChineseRevivalist", "NeoImperialist", "Eugenics", "SlaveProfessionalism"].includes(V.targetArcology.fs)) {
 				_valueGiven += _slaveCost * 4;
 			} else {
 				_valueGiven += _slaveCost;
 			}
-			newSlave(_slave);
+			newSlave(slave);
 		}
-		App.Utils.setLocalPronouns(_slave);
+		const {He, his, girl} = getPronouns(getSlave(random(V.slaves.length)));
 		switch (V.targetArcology.fs) {
 			case "Supremacist":
 				r.push(`They kept a personal stable of fearful ${V.arcologies[0].FSSupremacistRace} sex slaves, but their sexual training is incomplete. Several of them are still here.`);
@@ -824,41 +777,42 @@ App.StartingGirls.acquisition = function() {
 	} else {
 		r.push(`They could not get all of their personal effects away. Since they `);
 		if (V.targetArcology.fs === "Multiculturalist") {
-			r.push(`tried to sample different kinds of sexual slavery`);
+			r.push(`tried to sample different kinds of sexual slavery,`);
 		} else {
-			r.push(`did not have the time in control of the arcology to develop a specific stable of sex slaves`);
+			r.push(`did not have the time in control of the arcology to develop a specific stable of sex slaves,`);
 		}
-		r.push(`, their slaves were quite varied.`);
-		for (V.j = 0; V.j < _heroSlaves.length; V.j++) {
+		r.push(`their slaves were quite varied.`);
+		for (let j = 0; j < _heroSlaves.length; j++) {
 			if (_valueOwed - _valueGiven <= 5000) {
 				break;
 			}
-			const _slave = App.Utils.getHeroSlave(_heroSlaves[V.j]);
-			_heroSlaves.splice(V.j, 1);
-			let _slaveCost = slaveCost(_slave);
+			const slave = App.Utils.getHeroSlave(_heroSlaves[j]);
+			_heroSlaves.splice(j, 1);
+			let _slaveCost = slaveCost(slave);
 			if (_valueGiven + _slaveCost < _valueOwed * 2) {
-				nationalityToAccent(_slave);
-				_slave.oldDevotion = _slave.devotion;
-				_slave.oldTrust = _slave.trust;
-				_slave.health.tired = 0;
+				const {him, he, his, himself} = getPronouns(slave);
+				nationalityToAccent(slave);
+				slave.oldDevotion = slave.devotion;
+				slave.oldTrust = slave.trust;
+				slave.health.tired = 0;
 				_valueGiven += _slaveCost;
-				newSlave(_slave);
-				App.Utils.setLocalPronouns(_slave);
-				if (_slave.fetish === "mindbroken") {
-					r.push(`_slave.slaveName is, sadly, not mentally competent, and is wandering through the penthouse at the moment.`);
-				} else if (isAmputee(_slave)) {
-					r.push(`_slave.slaveName is a quadruple amputee and is quite helpless, so you can attend to ${him} at your leisure.`);
-				} else if (_slave.devotion < -50) {
-					r.push(`_slave.slaveName is quite rebellious and was attempting to escape, so I have locked ${him} in the slave quarters.`);
-				} else if (_slave.devotion < -20) {
-					r.push(`_slave.slaveName resists my orders and was considering escape, so I have locked ${him} in the slave quarters.`);
-				} else if (_slave.devotion <= 20) {
-					r.push(`_slave.slaveName is reasonably obedient, and is waiting for you in the dormitory, I believe in the hope of making a good impression.`);
-				} else if (_slave.energy > 95) {
-					r.push(`_slave.slaveName is a remarkable sexual addict, and I believe ${he} will be very happy to meet you.`);
-				} else if (_slave.fetish === "pregnancy") {
-					if (_slave.bellyPreg >= 500) {
-						r.push(`_slave.slaveName is currently in the dormitory masturbating over ${his} growing pregnancy, and `);
+				newSlave(slave);
+				App.Utils.setLocalPronouns(slave);
+				if (slave.fetish === "mindbroken") {
+					r.push(`slave.slaveName is, sadly, not mentally competent, and is wandering through the penthouse at the moment.`);
+				} else if (isAmputee(slave)) {
+					r.push(`slave.slaveName is a quadruple amputee and is quite helpless, so you can attend to ${him} at your leisure.`);
+				} else if (slave.devotion < -50) {
+					r.push(`slave.slaveName is quite rebellious and was attempting to escape, so I have locked ${him} in the slave quarters.`);
+				} else if (slave.devotion < -20) {
+					r.push(`slave.slaveName resists my orders and was considering escape, so I have locked ${him} in the slave quarters.`);
+				} else if (slave.devotion <= 20) {
+					r.push(`slave.slaveName is reasonably obedient, and is waiting for you in the dormitory, I believe in the hope of making a good impression.`);
+				} else if (slave.energy > 95) {
+					r.push(`slave.slaveName is a remarkable sexual addict, and I believe ${he} will be very happy to meet you.`);
+				} else if (slave.fetish === "pregnancy") {
+					if (slave.bellyPreg >= 500) {
+						r.push(`slave.slaveName is currently in the dormitory masturbating over ${his} growing pregnancy, and `);
 						if (V.PC.belly >= 5000) {
 							r.push(`will certainly be eager to meet you`);
 						} else {
@@ -866,7 +820,7 @@ App.StartingGirls.acquisition = function() {
 						}
 						r.push(`.`);
 					} else {
-						r.push(`_slave.slaveName is currently in the dormitory examining ${himself} to try to discern ${his} fertility, and I believe ${he} will be `);
+						r.push(`slave.slaveName is currently in the dormitory examining ${himself} to try to discern ${his} fertility, and I believe ${he} will be `);
 						if (V.PC.belly >= 5000) {
 							r.push(`eager to get acquainted with you`);
 						} else {
@@ -874,52 +828,56 @@ App.StartingGirls.acquisition = function() {
 						}
 						r.push(`.`);
 					}
-				} else if (_slave.belly >= 5000) {
-					/*had to be placed after pregnancy or it would intercept*/
-					r.push(`_slave.slaveName is currently in the dormitory massaging ${his} greatly distended belly.`);
-				} else if (_slave.fetish === "buttslut") {
-					r.push(`_slave.slaveName is currently in the dormitory masturbating anally, and I believe ${he} will be happy to meet you.`);
-				} else if (_slave.fetish === "cumslut") {
-					r.push(`_slave.slaveName is currently in the dormitory exhibiting oral fixation, and I believe ${he} will be happy to meet you.`);
-				} else if (_slave.fetish === "boobs") {
-					r.push(`_slave.slaveName is currently in the dormitory playing with ${his} nipples, and I believe ${he} will be happy to meet you.`);
-				} else if (_slave.fetish === "humiliation") {
-					r.push(`_slave.slaveName is currently in the entryway flashing passersby, and I believe ${he} will be happy to meet you.`);
-				} else if (_slave.fetish === "submissive") {
-					r.push(`_slave.slaveName is currently in the dormitory, experimenting with self-bondage using the sheets; I believe ${he} will be happy to meet you.`);
-				} else if (_slave.fetish === "dom") {
-					r.push(`_slave.slaveName is currently in the exercise area keeping fit; ${he} likes to take an active role sexually and is using this down time to work out.`);
-				} else if (_slave.fetish === "sadist") {
-					r.push(`_slave.slaveName is currently outside your office; ${he} enjoys being superior to other slaves and I believe ${he} means to ingratiate ${himself} to you.`);
-				} else if (_slave.fetish === "masochist") {
-					r.push(`_slave.slaveName is a sexual masochist; ${he} is currently in the bathroom, experimenting with auto-flagellation with a wet towel.`);
+				} else if (slave.belly >= 5000) {
+					/* had to be placed after pregnancy or it would intercept*/
+					r.push(`slave.slaveName is currently in the dormitory massaging ${his} greatly distended belly.`);
+				} else if (slave.fetish === "buttslut") {
+					r.push(`slave.slaveName is currently in the dormitory masturbating anally, and I believe ${he} will be happy to meet you.`);
+				} else if (slave.fetish === "cumslut") {
+					r.push(`slave.slaveName is currently in the dormitory exhibiting oral fixation, and I believe ${he} will be happy to meet you.`);
+				} else if (slave.fetish === "boobs") {
+					r.push(`slave.slaveName is currently in the dormitory playing with ${his} nipples, and I believe ${he} will be happy to meet you.`);
+				} else if (slave.fetish === "humiliation") {
+					r.push(`slave.slaveName is currently in the entryway flashing passersby, and I believe ${he} will be happy to meet you.`);
+				} else if (slave.fetish === "submissive") {
+					r.push(`slave.slaveName is currently in the dormitory, experimenting with self-bondage using the sheets; I believe ${he} will be happy to meet you.`);
+				} else if (slave.fetish === "dom") {
+					r.push(`slave.slaveName is currently in the exercise area keeping fit; ${he} likes to take an active role sexually and is using this down time to work out.`);
+				} else if (slave.fetish === "sadist") {
+					r.push(`slave.slaveName is currently outside your office; ${he} enjoys being superior to other slaves and I believe ${he} means to ingratiate ${himself} to you.`);
+				} else if (slave.fetish === "masochist") {
+					r.push(`slave.slaveName is a sexual masochist; ${he} is currently in the bathroom, experimenting with auto-flagellation with a wet towel.`);
 				} else {
-					r.push(`_slave.slaveName is currently outside your office, and I believe ${he} is attempting to maintain sexual arousal to make a good first impression on you.`);
+					r.push(`slave.slaveName is currently outside your office, and I believe ${he} is attempting to maintain sexual arousal to make a good first impression on you.`);
 				}
 			}
 		}
 	}
 	if (_valueOwed - _valueGiven > 0) {
 		r.push(`There are some valuables present, worth ${cashFormat(_valueOwed - _valueGiven)}.`);
-		cashX((_valueOwed - _valueGiven), "event", _slave);
+		cashX((_valueOwed - _valueGiven), "event", slave);
 	}
 	App.Events.addNode(el, r, "p", "note");
 
 	V.averageTrust = 0;
 	V.averageDevotion = 0;
-	_slavesContributing = 0;
+	let _slavesContributing = 0;
 	for (const slave of V.slaves) {
 		updateHealth(slave);
 		slave.oldDevotion = slave.devotion;
 		slave.oldTrust = slave.trust;
 		/* AVERAGE VALUES UPDATE */
 		if (assignmentVisible(slave)) {
-			V.averageTrust += slave.trust, V.averageDevotion += slave.devotion, _slavesContributing += 1;
+			V.averageTrust += slave.trust;
+			V.averageDevotion += slave.devotion;
+			_slavesContributing += 1;
 		} else {
 			if (slave.assignment !== "be confined in the cellblock") {
 				if (slave.assignment !== "be confined in the arcade") {
-					if (slave.assignment !== "work in the dairy") || (V.dairyRestraintsSetting < 2) {
-						V.averageTrust += slave.trust * 0.5, V.averageDevotion += slave.devotion * 0.5, _slavesContributing += 0.5;
+					if (slave.assignment !== "work in the dairy" || V.dairyRestraintsSetting < 2) {
+						V.averageTrust += slave.trust * 0.5;
+						V.averageDevotion += slave.devotion * 0.5;
+						_slavesContributing += 0.5;
 					}
 				}
 			}
@@ -948,9 +906,9 @@ App.StartingGirls.acquisition = function() {
 				V.menialDemandFactor = 30000;
 				V.menialSupplyFactor = -30000;
 			}
-			Save.autosave.save("Week Start Autosave")
+			Save.autosave.save("Week Start Autosave");
 		},
 		[],
 		"Main"
-	)
-};
\ No newline at end of file
+	);
+};
-- 
GitLab