code:
:: slave creation widgets [widget nobr]

/%
	Base Slave Template.
	Call as <<BaseSlave>>
	Called from Gen XX, Gen XY, CheatMode DB, InitNationalities.
%/
<<widget "BaseSlave">>
	<<run BaseSlave()>>
<</widget>>

/%
 Call as <<StartingGirlsWorkaround>>
%/
<<widget "StartingGirlsWorkaround">>
	<<include "Generate New Slave">>
	<<set $startingGirlCopied = 0>>
	<<set $activeSlave.health = 0>>
	<<set $activeSlave.devotion = 0>>
	<<set $activeSlave.trust = 0>>
	<<set $activeSlave.sexualQuirk = "none">>
	<<set $activeSlave.behavioralQuirk = "none">>
	<<set $activeSlave.fetishKnown = 1>>
	<<if $activeSlave.vagina < 0>>
	<<set $activeSlave.ovaries = 0>>
	<<elseif $activeSlave.vagina < 1>>
	<<set $activeSlave.vaginalSkill = 0>>
	<</if>>
	<<if $activeSlave.anus < 1>>
	<<set $activeSlave.analSkill = 0>>
	<</if>>

	<<set $activeSlave.actualAge = Number($activeSlave.actualAge) || 18>>
	<<set $activeSlave.devotion = Number($activeSlave.devotion) || 0>>
	<<set $activeSlave.trust = Number($activeSlave.trust) || 0>>
	<<if $activeSlave.indenture >= 0>>
		<<set $activeSlave.indenture = Math.clamp($activeSlave.indenture, 26, 208) || 26>>
	<</if>>
	<<set $activeSlave.height = Math.clamp($activeSlave.height, 85, 274) || 140>>
	<<set $activeSlave.boobs = Math.clamp(Math.trunc($activeSlave.boobs/50)*50, 0, 50000) || 200>>
<</widget>>

/%
 Call as <<StartingGirlsRefresh>>
%/
<<widget "StartingGirlsRefresh">>

	<<replace "#devotion">>
		@@.yellow;Ambivalent.@@
	<</replace>>

	<<replace "#trust">>
		@@.yellow;Fearful.@@
	<</replace>>

	<<replace "#legal">>
		Slave.
	<</replace>>

	<<replace "#voice">>
		<<if $activeSlave.voice == 0>>Mute.
		<<elseif $activeSlave.voice == 1>>Deep.
		<<elseif $activeSlave.voice == 2>>Normal.
		<<elseif $activeSlave.voice == 3>>High.
		<</if>>
	<</replace>>

	<<replace "#language">>
		''$language:''
		<<if $activeSlave.voice == 0>>
		<<elseif $activeSlave.accent == 0>>Unaccented.
		<<elseif $activeSlave.accent == 1>>Pretty <<if $activeSlave.nationality == "a Cook Islander">>Cook Islander<<elseif $activeSlave.nationality == "a Liechtensteiner">>Liechtensteiner<<elseif $activeSlave.nationality == "a New Zealander">>New Zealander<<elseif $activeSlave.nationality == "a Solomon Islander">>Solomon Islander<<else>>$activeSlave.nationality<</if>> accent.
		<<elseif $activeSlave.accent == 2>>Thick <<if $activeSlave.nationality == "a Cook Islander">>Cook Islander<<elseif $activeSlave.nationality == "a Liechtensteiner">>Liechtensteiner<<elseif $activeSlave.nationality == "a New Zealander">>New Zealander<<elseif $activeSlave.nationality == "a Solomon Islander">>Solomon Islander<<else>>$activeSlave.nationality<</if>> accent.
		<<else>>Not fluent.
		<</if>>
	<</replace>>

	<<replace "#age">>
		<<textbox "$activeSlave.actualAge" $activeSlave.actualAge "Starting Girls">>
	<</replace>>

	<<replace "#health">>
		@@.yellow;Healthy.@@
	<</replace>>

	<<replace "#originalSex">>
		$activeSlave.genes.
	<</replace>>

	<<replace "#muscles">>
		Normal.
	<</replace>>

	<<replace "#waist">>
		Normal.
	<</replace>>

	<<if $seeExtreme == 1>>
		<<replace "#amp">>
			<<if $activeSlave.amp == 1>>Amputee.
			<<else>>Normal.
			<</if>>
		<</replace>>
	<</if>>

	<<replace "#height">>
		<<if $activeSlave.height < 150>>Petite.
		<<elseif $activeSlave.height < 160>>Short.
		<<elseif $activeSlave.height < 170>>Average.
		<<elseif $activeSlave.height < 185>>Tall.
		<<else>>Very tall.
		<</if>>
		<<textbox "$activeSlave.height" $activeSlave.height "Starting Girls">> <<= heightToEitherUnit($activeSlave.height)>>
	<</replace>>

	<<replace "#weight">>
		<<if $activeSlave.weight < -95>>@@.red;Emaciated.@@
		<<elseif $activeSlave.weight < -30>>@@.red;Skinny.@@
		<<elseif $activeSlave.weight < -10>>Thin.
		<<elseif $activeSlave.weight <= 10>>Average.
		<<elseif $activeSlave.weight <= 30>>Plush.
		<<elseif $activeSlave.weight <= 95>>@@.red;Chubby.@@
		<<elseif $activeSlave.weight <= 130>>@@.red;Fat.@@
		<<elseif $activeSlave.weight <= 160>>@@.red;Obese.@@
		<<elseif $activeSlave.weight <= 190>>@@.red;Super obese.@@
		<<else>>@@.red;Dangerously obese.@@
		<</if>>
	<</replace>>

	<<if $seeRace == 1>>
		<<replace "#ethnicity">>
		<<textbox "$activeSlave.race" $activeSlave.race "Starting Girls">>
		<</replace>>
	<</if>>

	<<replace "#skin">>
		<<textbox "$activeSlave.skin" $activeSlave.skin "Starting Girls">>
	<</replace>>

	<<replace "#faceShape">>
		$activeSlave.faceShape
	<</replace>>

	<<replace "#face">>
		<<if $activeSlave.face < -95>>Very ugly.
		<<elseif $activeSlave.face < -40>>Ugly.
		<<elseif $activeSlave.face < -10>>Unattractive.
		<<elseif $activeSlave.face <= 10>>Average.
		<<elseif $activeSlave.face <= 40>>Attractive.
		<<elseif $activeSlave.face <= 95>>Beautiful.
		<<else>>Very beautiful.
		<</if>>
	<</replace>>

	<<replace "#lips">>
		<<if $activeSlave.lips <= 10>>Thin.
		<<elseif $activeSlave.lips <= 20>>Normal.
		<<elseif $activeSlave.lips <= 40>>Plush.
		<<elseif $activeSlave.lips <= 70>>Big.
		<<elseif $activeSlave.lips <= 95>>Huge.
		<<else>>Facepussy.
		<</if>>
	<</replace>>

	<<replace "#teeth">>
		<<if $activeSlave.teeth == "crooked">>Crooked.
		<<elseif $activeSlave.teeth == "straightening braces">>Braces.
		<<elseif $activeSlave.teeth == "baby">>Baby.
		<<elseif $activeSlave.teeth == "mixed">>Mixed.
		<<else>>Straight.
		<</if>>
	<</replace>>

	<<replace "#vision">>
		<<if $seeExtreme == 1>>
			<<if $activeSlave.eyes == -2>>Blind.
			<<elseif $activeSlave.eyes == -1>>Nearsighted.
			<<else>>Normal.
			<</if>>
		<<else>>
			<<if $activeSlave.eyes == -1>>Nearsighted.
			<<else>>Normal.
			<</if>>
		<</if>>
	<</replace>>

	<<replace "#hearing">>
		<<if $seeExtreme == 1>>
			<<if $activeSlave.hears == -2>>Deaf.
			<<elseif $activeSlave.hears == -1>>Hard of hearing.
			<<else>>Normal.
			<</if>>
		<<else>>
			<<if $activeSlave.hears == -1>>Hard of hearing.
			<<else>>Normal.
			<</if>>
		<</if>>
	<</replace>>

	<<replace "#boobs">>
		<<if $activeSlave.boobs <= 200>>Flat.
		<<elseif $activeSlave.boobs <= 500>>Healthy.
		<<elseif $activeSlave.boobs <= 800>>Large.
		<<elseif $activeSlave.boobs <= 1200>>Very Large.
		<<elseif $activeSlave.boobs <= 2000>>Huge.
		<<elseif $activeSlave.boobs <= 4000>>Massive.
		<<elseif $activeSlave.boobs <= 6000>>Monstrous.
		<<else>>Science experiment.
		<</if>>
		<<textbox "$activeSlave.boobs" $activeSlave.boobs "Starting Girls">> CCs
	<</replace>>

	<<replace "#lactation">>
		<<if $activeSlave.lactation == 2>>Artificial.
		<<elseif $activeSlave.lactation == 1>>Natural.
		<<else>>None.
		<</if>>
	<</replace>>

	<<replace "#nipples">>
		$activeSlave.nipples
	<</replace>>

	<<replace "#areolae">>
		<<if $activeSlave.areolae == 1>>
		Large.
		<<elseif $activeSlave.areolae == 2>>
			Wide.
		<<elseif $activeSlave.areolae == 3>>
			Huge.
		<<else>>
			Normal.
		<</if>>
	<</replace>>

	<<replace "#shoulders">>
		<<if $activeSlave.shoulders < -1>>Very narrow.
		<<elseif $activeSlave.shoulders < 0>>Narrow.
		<<elseif $activeSlave.shoulders > 1>>Very broad.
		<<elseif $activeSlave.shoulders > 0>>Broad.
		<<else>>Feminine.
		<</if>>
	<</replace>>

	<<replace "#hips">>
		<<if $activeSlave.hips < -1>>Very narrow.
		<<elseif $activeSlave.hips < 0>>Narrow.
		<<elseif $activeSlave.hips > 1>>Very broad.
		<<elseif $activeSlave.hips > 0>>Broad.
		<<else>>Normal.
		<</if>>
	<</replace>>

	<<replace "#butt">>
		<<if $activeSlave.butt == 0>>Flat.
		<<elseif $activeSlave.butt < 2>>Small.
		<<elseif $activeSlave.butt < 3>>Plump.
		<<elseif $activeSlave.butt < 4>>Big.
		<<elseif $activeSlave.butt < 5>>Huge.
		<<elseif $activeSlave.butt < 6>>Enormous.
		<<elseif $activeSlave.butt < 7>>Gigantic.
		<<else>>Massive.
		<</if>>
	<</replace>>

	<<replace "#anus">>
		<<if $activeSlave.anus == 0>>@@.lime;Virgin.@@
		<<elseif $activeSlave.anus == 1>>Normal.
		<<elseif $activeSlave.anus == 2>>Veteran.
		<<else>>Gaping.
		<</if>>
	<</replace>>

	<<replace "#vagina">>
		<<if $activeSlave.vagina == -1>>//No vagina.//
		<<elseif $activeSlave.vagina == 0>>@@.lime;Virgin.@@
		<<elseif $activeSlave.vagina == 1>>Normal.
		<<elseif $activeSlave.vagina == 2>>Veteran.
		<<else>>Gaping.
		<</if>>
	<</replace>>

	<<replace "#vaginablock">>
		<<if $activeSlave.vagina > -1>>

		''Clit:''

			<<if $activeSlave.clit == 0>>Normal.
			<<elseif $activeSlave.clit == 1>>Large.
			<<else>>Huge.
			<</if>>

		<<link "Normal">>
			<<set $activeSlave.clit = 0>>
			<<replace #clit>>
				Normal.
			<</replace>>
		<</link>>
		|
		<<link "Large">>
			<<set $activeSlave.clit = 1>>
			<<replace #clit>>
				Large.
			<</replace>>
		<</link>>
		|
		<<link "Huge">>
			<<set $activeSlave.clit = 2>>
			<<replace #clit>>
				Huge.
			<</replace>>
		<</link>>
		<</if>>

		''Labia:''

			<<if $activeSlave.labia == 2>>Huge.
			<<elseif $activeSlave.labia == 1>>Large.
			<<else>>Normal.
			<</if>>

		<<link "Normal">>
			<<set $activeSlave.labia = 0>>
			<<replace #labia>>
				Normal.
			<</replace>>
		<</link>>
		|
		<<link "Large">>
			<<set $activeSlave.labia = 1>>
			<<replace #labia>>
				Large.
			<</replace>>
		<</link>>
		|
		<<link "Huge">>
			<<set $activeSlave.labia = 2>>
			<<replace #labia>>
				Huge.
			<</replace>>
		<</link>>

		''Vaginal wetness:''

		<<if $activeSlave.vaginaLube == 0>>Dry.
		<<elseif $activeSlave.vaginaLube == 1>>Normal.
		<<else>>Excessive.
		<</if>>

		<<link "Dry">><<set $activeSlave.vaginaLube = 0>><<replace "#wetness">>Dry.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Normal">><<set $activeSlave.vaginaLube = 1>><<replace "#wetness">>Normal.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Excessive">><<set $activeSlave.vaginaLube = 2>><<replace "#wetness">>Excessive.<</replace>><<StartingGirlsCost>><</link>>

		''Pregnancy:''

		<<if $activeSlave.preg > 39>>Ready to drop.
		<<elseif $activeSlave.preg > 30>>Advanced.
		<<elseif $activeSlave.preg > 20>>Showing.
		<<elseif $activeSlave.preg > 10>>Early.
		<<elseif $activeSlave.preg > -2>>None.
		<<else>>Barren.
		<</if>>

		<<link "Ready to Drop">><<set $activeSlave.preg = 40,$activeSlave.pregType = 1,$activeSlave.pregWeek = 40,$activeSlave.pregKnown = 1,$activeSlave.belly = 15000,$activeSlave.bellyPreg = 15000,$activeSlave.pubertyXX = 1>><<replace "#preg">>Ready to drop.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Advanced">><<set $activeSlave.preg = 34,$activeSlave.pregType = 1,$activeSlave.pregWeek = 34,$activeSlave.pregKnown = 1,$activeSlave.belly = 10000,$activeSlave.bellyPreg = 10000,$activeSlave.pubertyXX = 1>><<replace "#preg">>Advanced.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Showing">><<set $activeSlave.preg = 27,$activeSlave.pregType = 1,$activeSlave.pregWeek = 27,$activeSlave.pregKnown = 1,$activeSlave.belly = 5000,$activeSlave.bellyPreg = 5000,$activeSlave.pubertyXX = 1>><<replace "#preg">>Showing.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Early">><<set $activeSlave.preg = 12,$activeSlave.pregType = 1,$activeSlave.pregWeek = 12,$activeSlave.pregKnown = 1,$activeSlave.belly = 100,$activeSlave.bellyPreg = 100,$activeSlave.pubertyXX = 1>><<replace "#preg">>Early.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "None">><<set $activeSlave.preg = 0,$activeSlave.pregType = 0,$activeSlave.belly = 0,$activeSlave.bellyPreg = 0,$activeSlave.pregSource = 0,$activeSlave.pregWeek = 0,$activeSlave.pregKnown = 0>><<run WombFlush($activeSlave)>><<replace "#preg">>None.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Barren">><<set $activeSlave.preg = -2,$activeSlave.pregType = 0,$activeSlave.belly = 0,$activeSlave.bellyPreg = 0,$activeSlave.pregSource = 0,$activeSlave.pregWeek = 0,$activeSlave.pregKnown = 0>><<run WombFlush($activeSlave)>><<replace "#preg">>Barren.<</replace>><<StartingGirlsCost>><</link>>

''Puberty:''

		<<if $activeSlave.pubertyXX == 1>>Postpubescent.
		<<else>>Prepubescent.
		<</if>>

		<<textbox "$activeSlave.pubertyAgeXX" $activeSlave.pubertyAgeXX "Starting Girls">>
		<<link "Postpubescent">><<set $activeSlave.pubertyXX = 1>><<replace "#pub">>Postpubescent.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Prepubescent">><<set $activeSlave.pubertyXX = 0,$activeSlave.pubertyAgeXX = $fertilityAge,$activeSlave.preg = 0,$activeSlave.pregType = 0,$activeSlave.belly = 0,$activeSlave.bellyPreg = 0,$activeSlave.pregSource = 0,$activeSlave.pregWeek = 0,$activeSlave.pregKnown = 0>><<run WombFlush($activeSlave)>><<replace "#pub">>Prepubescent.<</replace>><<StartingGirlsCost>><</link>>
		<<if $PC.dick == 1>>

 ''Father:''

		<<if $activeSlave.pregSource == -1>>My child.
		<<else>>
		<</if>>

		<<link "Carrying my child">><<set $activeSlave.pregSource = -1>><<replace "#father">>My child.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Clear">><<set $activeSlave.pregSource = 0>><<replace "#father">><</replace>><<StartingGirlsCost>><</link>>
		<</if>>
	<</replace>>

	<<replace "#dickblock">>
	<<if $seeDicks != 0 || $makeDicks == 1>>

''Penis:''

		<<if $activeSlave.dick == 0>>None.
		<<elseif $activeSlave.dick == 1>>Tiny.
		<<elseif $activeSlave.dick == 2>>Small.
		<<elseif $activeSlave.dick == 3>>Normal.
		<<elseif $activeSlave.dick == 4>>Large.
		<<else>>Massive.<</if>>

		<<link "No penis">><<set $activeSlave.dick = 0,$activeSlave.balls = 0,$activeSlave.clit = 0,$activeSlave.pubertyXY = 0,$activeSlave.pubertyAgeXY = $potencyAge>><<replace "#dick">>None.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Tiny">><<set $activeSlave.dick = 1,$activeSlave.clit = 0>><<replace "#dick">>Tiny.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Small">><<set $activeSlave.dick = 2,$activeSlave.clit = 0>><<replace "#dick">>Small.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Normal">><<set $activeSlave.dick = 3,$activeSlave.clit = 0>><<replace "#dick">>Normal.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Large">><<set $activeSlave.dick = 4,$activeSlave.clit = 0>><<replace "#dick">>Large.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Massive">><<set $activeSlave.dick = 5,$activeSlave.clit = 0>><<replace "#dick">>Massive.<</replace>><<StartingGirlsCost>><</link>>
		<<if $activeSlave.dick > 0>>
			    ''Foreskin:''

			<<if $activeSlave.foreskin == 0>>None.
			<<elseif $activeSlave.foreskin == 1>>Tiny.
			<<elseif $activeSlave.foreskin == 2>>Small.
			<<elseif $activeSlave.foreskin == 3>>Normal.
			<<elseif $activeSlave.foreskin == 4>>Large.
			<<else>>Massive.<</if>>

			<<if $seeCircumcision == 1>><<link "Circumcised">><<set $activeSlave.foreskin = 0>><<replace "#foreskin">>None.<</replace>><<StartingGirlsCost>><</link>> |<</if>>
			<<link "Tiny">><<set $activeSlave.foreskin = 1>><<replace "#foreskin">>Tiny.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Small">><<set $activeSlave.foreskin = 2>><<replace "#foreskin">>Small.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Normal">><<set $activeSlave.foreskin = 3>><<replace "#foreskin">>Normal.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Large">><<set $activeSlave.foreskin = 4>><<replace "#foreskin">>Large.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Massive">><<set $activeSlave.foreskin = 5>><<replace "#foreskin">>Massive.<</replace>><<StartingGirlsCost>><</link>>
		<</if>>

''Testicles:''

		<<if $activeSlave.balls == 0>>None.
		<<elseif $activeSlave.balls == 1>>Vestigial.
		<<elseif $activeSlave.balls == 2>>Small.
		<<elseif $activeSlave.balls == 3>>Normal.
		<<elseif $activeSlave.balls == 4>>Large.
		<<else>>Massive.<</if>>

		<<link "No testicles">><<set $activeSlave.balls = 0,$activeSlave.pubertyXY = 0,$activeSlave.pubertyAgeXY = $potencyAge>><<replace "#balls">>None.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Vestigial">><<set $activeSlave.balls = 1>><<replace "#balls">>Vestigial.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Small">><<set $activeSlave.balls = 2>><<replace "#balls">>Small.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Normal">><<set $activeSlave.balls = 3>><<replace "#balls">>Normal.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Large">><<set $activeSlave.balls = 4>><<replace "#balls">>Large.<</replace>><<StartingGirlsCost>><</link>> |
		<<link "Massive">><<set $activeSlave.balls = 5>><<replace "#balls">>Massive.<</replace>><<StartingGirlsCost>><</link>>
		    ''Puberty:''<<textbox "$activeSlave.pubertyAgeXY" $activeSlave.pubertyAgeXY "Starting Girls">>
		<<if $activeSlave.balls > 0>>
			    ''Ballsack:''

			<<if $activeSlave.scrotum == 0>>None.
			<<elseif $activeSlave.scrotum == 1>>Tiny.
			<<elseif $activeSlave.scrotum == 2>>Small.
			<<elseif $activeSlave.scrotum == 3>>Normal.
			<<elseif $activeSlave.scrotum == 4>>Large.
			<<else>>Massive.<</if>>

			<<link "None">><<set $activeSlave.scrotum = 0>><<replace "#scrotum">>None.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Tiny">><<set $activeSlave.scrotum = 1>><<replace "#scrotum">>Tiny.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Small">><<set $activeSlave.scrotum = 2>><<replace "#scrotum">>Small.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Normal">><<set $activeSlave.scrotum = 3>><<replace "#scrotum">>Normal.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Large">><<set $activeSlave.scrotum = 4>><<replace "#scrotum">>Large.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Massive">><<set $activeSlave.scrotum = 5>><<replace "#scrotum">>Massive.<</replace>><<StartingGirlsCost>><</link>>

''Puberty:''

			<<if $activeSlave.pubertyXY == 1>>Postpubescent.
			<<else>>Prepubescent.
			<</if>>

			<<link "Postpubescent">><<set $activeSlave.pubertyXY = 1>><<replace "#Mpub">>Postpubescent.<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Prepubescent">><<set $activeSlave.pubertyXY = 0,$activeSlave.pubertyAgeXY = $potencyAge>><<replace "#Mpub">>Prepubescent.<</replace>><<StartingGirlsCost>><</link>>
		<</if>>
	<</if>>
	<</replace>>

	<<replace "#prostate">>
		<<if $activeSlave.prostate == 1>>Has a prostate.
		<<else>>No prostate.
		<</if>>
	<</replace>>

	<<replace "#analSkillsBlock">>
		<<if $activeSlave.anus == 0>>
			//Anal virgins cannot be given anal skills//
		<<else>>
			''Anal sex:''

			<<if $activeSlave.analSkill <= 10>>Unskilled.
			<<elseif $activeSlave.analSkill <= 30>>@@.cyan;Basic.@@
			<<elseif $activeSlave.analSkill <= 60>>@@.cyan;Skilled.@@
			<<else>>@@.cyan;Expert.@@
			<</if>>

			<<if $activeSlave.anus < 3>><<link "Unskilled">><<set $activeSlave.analSkill = 0>><<replace "#analSkill">>Unskilled.<</replace>><<StartingGirlsCost>><</link>> |<</if>>
			<<link "Basic">><<set $activeSlave.analSkill = 15>><<replace "#analSkill">>@@.cyan;Basic.@@<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Skilled">><<set $activeSlave.analSkill = 35>><<replace "#analSkill">>@@.cyan;Skilled.@@<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Expert">><<set $activeSlave.analSkill = 65>><<replace "#analSkill">>@@.cyan;Expert.@@<</replace>><<StartingGirlsCost>><</link>>
		<</if>>
	<</replace>>

	<<replace "#oralSkill">>
		<<if $activeSlave.oralSkill <= 10>>Unskilled.
		<<elseif $activeSlave.oralSkill <= 30>>@@.cyan;Basic.@@
		<<elseif $activeSlave.oralSkill <= 60>>@@.cyan;Skilled.@@
		<<else>>@@.cyan;Expert.@@
		<</if>>
	<</replace>>

	<<replace "#vaginalSkillsBlock">>
		<<if $activeSlave.vagina == 0>>
			//Virgins cannot be given vaginal skills//
		<<elseif $activeSlave.vagina == -1>>
			//Must have a vagina to have vaginal skills//
		<<else>>
			''Vaginal sex:''

			<<if $activeSlave.vaginalSkill <= 10>>Unskilled.
			<<elseif $activeSlave.vaginalSkill <= 30>>@@.cyan;Basic.@@
			<<elseif $activeSlave.vaginalSkill <= 60>>@@.cyan;Skilled.@@
			<<else>>@@.cyan;Expert.@@
			<</if>>

			<<if $activeSlave.vagina < 3>><<link "Unskilled">><<set $activeSlave.vaginalSkill = 0>><<replace "#vaginalSkill">>Unskilled.<</replace>><<StartingGirlsCost>><</link>> |<</if>>
			<<link "Basic">><<set $activeSlave.vaginalSkill = 15>><<replace "#vaginalSkill">>@@.cyan;Basic.@@<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Skilled">><<set $activeSlave.vaginalSkill = 35>><<replace "#vaginalSkill">>@@.cyan;Skilled.@@<</replace>><<StartingGirlsCost>><</link>> |
			<<link "Expert">><<set $activeSlave.vaginalSkill = 65>><<replace "#vaginalSkill">>@@.cyan;Expert.@@<</replace>><<StartingGirlsCost>><</link>>
		<</if>>
	<</replace>>

	<<replace "#whoreSkill">>
		<<if $activeSlave.whoreSkill <= 10>>Unskilled.
		<<elseif $activeSlave.whoreSkill <= 30>>@@.cyan;Basic.@@
		<<elseif $activeSlave.whoreSkill <= 60>>@@.cyan;Skilled.@@
		<<else>>@@.cyan;Expert.@@
		<</if>>
	<</replace>>

	<<replace "#entertainSkill">>
		<<if $activeSlave.entertainSkill <= 10>>Unskilled.
		<<elseif $activeSlave.entertainSkill <= 30>>@@.cyan;Basic.@@
		<<elseif $activeSlave.entertainSkill <= 60>>@@.cyan;Skilled.@@
		<<else>>@@.cyan;Expert.@@
		<</if>>
	<</replace>>

	<<replace "#combatSkill">>
		<<if $activeSlave.combatSkill == 0>>Unskilled.
		<<else>>@@.cyan;Skilled.@@
		<</if>>
	<</replace>>

	<<replace "#intelligence">>
		<<if $activeSlave.intelligence > 95>>@@.deepskyblue;Brilliant.@@
		<<elseif $activeSlave.intelligence > 50>>@@.deepskyblue;Very smart.@@
		<<elseif $activeSlave.intelligence > 15>>@@.deepskyblue;Smart.@@
		<<elseif $activeSlave.intelligence >= -15>>Average.
		<<elseif $activeSlave.intelligence >= -50>>@@.orangered;Stupid.@@
		<<elseif $activeSlave.intelligence >= -95>>@@.orangered;Very stupid.@@
		<<else>>@@.orangered;Moronic.@@
		<</if>>
	<</replace>>

	<<replace "#intelligenceImplant">>
		<<if $activeSlave.intelligenceImplant >= 30>>@@.deepskyblue;Well educated.@@
		<<elseif $activeSlave.intelligenceImplant >= 15>>@@.deepskyblue;Educated.@@
		<<else>>Uneducated.
		<</if>>
	<</replace>>

	<<if $activeSlave.fetishKnown == 1>>
		<<ToggleFetish 1>>
	<<else>>
		<<ToggleFetish 0>>
	<</if>>

	<<if $activeSlave.attrKnown == 1>>
		<<ToggleSexuality 1>>
	<<else>>
		<<ToggleSexuality 0>>
	<</if>>

	<<replace "#behavioralFlaw">>
		<<if $activeSlave.behavioralFlaw == "none">>
		//$activeSlave.behavioralFlaw.//
		<<else>>
			@@.red;$activeSlave.behavioralFlaw.@@
		<</if>>
	<</replace>>

	<<replace "#sexualFlaw">>
		<<if $activeSlave.sexualFlaw == "none">>
			//$activeSlave.sexualFlaw.//
		<<else>>
			@@.red;$activeSlave.sexualFlaw.@@
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<StartingGirlsWarnings>>
%/
<<widget "StartingGirlsWarnings">>
	<<replace "#devotionWarning">>
		<<if $activeSlave.devotion > 20>>

			//@@.red;Starting slaves incur
			<<if $activeSlave.devotion > 50>>
				a severe cost penalty at very high
			<<else>>
				an additional cost penalty at high
			<</if>>
			levels of devotion. This slave's
			<<if $activeSlave.actualAge >= 25>><<if $activeSlave.actualAge > 35>>advanced <</if>>age decreases the penalty<<else>>young age requires paying the full penalty<</if>>.@@//
		<</if>>
	<</replace>>
	<<replace "#skillsWarning">>
		<<if $activeSlave.whoreSkill+$activeSlave.entertainSkill+$activeSlave.vaginalSkill+$activeSlave.analSkill+$activeSlave.oralSkill+($activeSlave.combatSkill*100) > 200>>

			//@@.red;Starting slaves incur
			<<if $activeSlave.whoreSkill+$activeSlave.entertainSkill+$activeSlave.vaginalSkill+$activeSlave.analSkill+$activeSlave.oralSkill+($activeSlave.combatSkill*100) > 400>>
				a severe cost penalty at for being highly
			<<else>>
				an additional cost penalty for being
			<</if>>
			skilled. This slave's
			<<if $activeSlave.actualAge >= 25>><<if $activeSlave.actualAge > 35>>advanced <</if>>age decreases the penalty<<else>>young age requires paying the full penalty<</if>>.@@//
		<</if>>
	<</replace>>
	<<replace "#prestigeWarning">>
		<<if $activeSlave.prestige>>

			//@@.red;Starting slaves incur an extreme cost penalty for prestige. This slave's
			<<if $activeSlave.actualAge >= 25>><<if $activeSlave.actualAge > 35>>advanced <</if>>age decreases the penalty<<else>>young age requires paying the full penalty<</if>>.@@//
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<StartingGirlsAnalSkill>>
%/
<<widget "StartingGirlsAnalSkill">>
	<<replace "#analSkillsBlock">>
		<<if $activeSlave.anus == 0>>
		//Anal virgins cannot be given anal skills//
		<<else>>
		''Anal sex:''

		<<if $activeSlave.analSkill <= 10>>Unskilled.
		<<elseif $activeSlave.analSkill <= 30>>@@.cyan;Basic.@@
		<<elseif $activeSlave.analSkill <= 60>>@@.cyan;Skilled.@@
		<<else>>@@.cyan;Expert.@@
		<</if>>

		<<if $activeSlave.anus < 3>><<link "Unskilled">><<set $activeSlave.analSkill = 0>><<replace "#analSkill">>Unskilled.<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>> |<</if>>
		<<link "Basic">><<set $activeSlave.analSkill = 15>><<replace "#analSkill">>@@.cyan;Basic.@@<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>> |
		<<link "Skilled">><<set $activeSlave.analSkill = 35>><<replace "#analSkill">>@@.cyan;Skilled.@@<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>> |
		<<link "Expert">><<set $activeSlave.analSkill = 65>><<replace "#analSkill">>@@.cyan;Expert.@@<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>>
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<StartingGirlsVaginalSkill>>
%/
<<widget "StartingGirlsVaginalSkill">>
	<<replace "#vaginalSkillsBlock">>
		<<if $activeSlave.vagina == 0>>
		//Virgins cannot be given vaginal skills//
		<<elseif $activeSlave.vagina == -1>>
		//Must have a vagina to have vaginal skills//
		<<else>>
		''Vaginal sex:''

		<<if $activeSlave.vaginalSkill <= 10>>Unskilled.
		<<elseif $activeSlave.vaginalSkill <= 30>>@@.cyan;Basic.@@
		<<elseif $activeSlave.vaginalSkill <= 60>>@@.cyan;Skilled.@@
		<<else>>@@.cyan;Expert.@@
		<</if>>

		<<if $activeSlave.anus < 3>><<link "Unskilled">><<set $activeSlave.vaginalSkill = 0>><<replace "#vaginalSkill">>Unskilled.<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>> |<</if>>
		<<link "Basic">><<set $activeSlave.vaginalSkill = 15>><<replace "#vaginalSkill">>@@.cyan;Basic.@@<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>> |
		<<link "Skilled">><<set $activeSlave.vaginalSkill = 35>><<replace "#vaginalSkill">>@@.cyan;Skilled.@@<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>> |
		<<link "Expert">><<set $activeSlave.vaginalSkill = 65>><<replace "#vaginalSkill">>@@.cyan;Expert.@@<</replace>><<StartingGirlsCost>><<StartingGirlsWarnings>><</link>>
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<SaleDescription>>
%/
<<widget "SaleDescription">>
	<<replace #slaveinfo>>
		<<set $saleDescription = 1>>
		<<include "Long Slave Description">>
	<</replace>>
<</widget>>

<<widget "SlaveCostDescription">>
	<<StartingSlaveCost $activeSlave>>
	<<if $slaveCost > $cash>>
	@@.red;This slave will cost ''<<print cashFormat($slaveCost)>>.''

	You only have: <<print cashFormat($cash)>>@@
	<<else>>
	This slave will cost @@.yellowgreen;''<<print cashFormat($slaveCost)>>.''@@

	You have <<print cashFormat($cash)>>.
	<</if>>
<</widget>>
/%
 Call as <<StartingGirlsCost>>
%/
<<widget "StartingGirlsCost">>

<<replace "#cost">>
<<SlaveCostDescription>>
<</replace>>
<<replace "#finalize">>
<<if $cash >= $slaveCost>>
	<<set $activeSlave.actualAge = Number($activeSlave.actualAge) || 18>>
	<<set $activeSlave.devotion = Number($activeSlave.devotion) || 0>>
	<<set $activeSlave.trust = Number($activeSlave.trust) || 0>>
	<<if $activeSlave.indenture >= 0>>
		<<set $activeSlave.indenture = Math.clamp($activeSlave.indenture, 26, 208) || 26>>
	<</if>>
	<<set $activeSlave.height = Math.clamp($activeSlave.height, 85, 274) || 140>>
	<<set $activeSlave.boobs = Math.clamp(Math.trunc($activeSlave.boobs/50)*50, 0, 50000) || 200>>
	<<set $slaveWithoutBonuses = $activeSlave>>
	<<if $PC.career != "engineer">>

		<<link "Add this slave">>
			<<set $returnTo = "Commit Starting Girl", $createRelatedSlave = 0, $applyCareerBonus = 1, $careerBonusApplied = 0>>
			<<StartingSlaveCost $activeSlave>>
			<<set $cash -= $slaveCost>>
			<<goto "RG AS Dump">>
		<</link>>
		//This will apply your @@.springgreen;career bonus@@ to $him:
		<<if $PC.career == "capitalist">>
			one free level of @@.cyan;prostitution skill.@@
		<<elseif $PC.career == "mercenary">>
			@@.mediumaquamarine;+10 trust.@@
		<<elseif $PC.career == "slaver">>
			@@.hotpink;+10 devotion.@@
		<<elseif $PC.career == "medicine">>
			free @@.lime;basic implants.@@
		<<elseif $PC.career == "celebrity">>
			one free level of @@.cyan;entertainment skill.@@
		<<elseif $PC.career == "gang">>
			@@.green;+5 health@@ and a free level of @@.cyan;combat skill@@
		<<elseif $PC.career == "escort">>
			two free levels of @@.cyan;sex skills@@, one free level of @@.cyan;prostitution skill@@, and one free level of @@.cyan;entertainment skill.@@
		<<elseif $PC.career == "servant">>
			@@.mediumaquamarine;+10 trust@@ and @@.hotpink;+10 devotion.@@
		<<elseif $PC.career == "wealth">>
			two free levels of @@.cyan;sex skills.@@
		<<elseif $PC.career == "BlackHat">>
			one free level of @@.cyan;intelligence.@@
		<<else>>
			@@.hotpink;+10 devotion,@@ one free level of @@.cyan;prostitution skill@@ and @@.cyan;entertainment skill,@@ and two free levels of @@.cyan;sex skills.@@
		<</if>>//

		<<link "Add slave without career bonus">>
			<<set $returnTo = "Commit Starting Girl", $createRelatedSlave = 0, $applyCareerBonus = 0, $careerBonusApplied = 0>>
			<<StartingSlaveCost $activeSlave>>
			<<set $cash -= $slaveCost>>
			<<goto "RG AS Dump">>
		<</link>>
	<<else>>

		<<link "Add slave">>
			<<set $returnTo = "Commit Starting Girl", $createRelatedSlave = 0, $applyCareerBonus = 0, $careerBonusApplied = 0>>
			<<StartingSlaveCost $activeSlave>>
			<<set $cash -= $slaveCost>>
			<<goto "RG AS Dump">>
		<</link>>

	<</if>>
<<else>>

//You lack the necessary funds to add this slave.//
<</if>>

[[Discard this slave and continue|Acquisition]]
<</replace>>
<</widget>>

/%
 Call as <<ToggleFetish 1>>
 $arg[0] is whether unknown or known.
%/
<<widget "ToggleFetish">>

<<if ($args[0] == 0)>>
	<<set $activeSlave.fetish = either("none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "submissive", "cumslut", "humiliation", "buttslut", "boobs", "pregnancy", "dom", "sadist", "masochist"), $activeSlave.fetishKnown = 0>>
	<<replace "#fetishblock">>
		//Not known.//
		<<link "Known">>
			<<ToggleFetish 1>>
		<</link>>
	<</replace>>
<<else>>
	<<set $activeSlave.fetishKnown = 1>>
		<<replace "#fetishblock">>

		<<if $activeSlave.fetishKnown == 1>>
			<<if $activeSlave.fetish == "none">>
				@@.pink;$activeSlave.fetish.@@
			<<else>>
				@@.lightcoral;$activeSlave.fetish.@@
			<</if>>
		<<else>>
			//Not known.//
			<<link "Known">>
				<<ToggleFetish 1>>
			<</link>>
		<</if>>

		<<if $activeSlave.fetishKnown == 1>>
			<<link "Unknown">>
				<<ToggleFetish 0>>
			<<StartingGirlsCost>>
		<</link>> |
		<<link "None">>
			<<set $activeSlave.fetish = "none", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Sub">>
			<<set $activeSlave.fetish = "submissive", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Dom">>
			<<set $activeSlave.fetish = "dom", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Cumslut">>
			<<set $activeSlave.fetish = "cumslut", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Humiliation">>
			<<set $activeSlave.fetish = "humiliation", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Buttslut">>
			<<set $activeSlave.fetish = "buttslut", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Breasts">>
			<<set $activeSlave.fetish = "boobs", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Pregnancy">>
			<<set $activeSlave.fetish = "pregnancy", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Sadism">>
			<<set $activeSlave.fetish = "sadist", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>> |
		<<link "Masochism">>
			<<set $activeSlave.fetish = "masochist", $activeSlave.fetishKnown = 1>>
			<<ToggleFetish 1>>
		<</link>>
		<<if $seeExtreme == 1>>
			| <<link "Mindbroken">>
				<<set $activeSlave.fetish = "mindbroken", $activeSlave.fetishKnown = 1, $activeSlave.sexualFlaw = "none", $activeSlave.behavioralFlaw = "none", $activeSlave.sexualQuirk = "none", $activeSlave.sexualFlaw = "none">>
				<<ToggleFetish 1>>
			<</link>>
		<</if>>

		<<if $activeSlave.fetish != "none">>

			''Fetish strength:''
			<<if $activeSlave.fetishStrength > 95>>
				@@.lightcoral;High.@@
			<<elseif $activeSlave.fetishStrength <= 60>>
				@@.pink;Low.@@
			<<else>>
				@@.hotpink;Normal.@@
			<</if>>
			<<if $activeSlave.fetishStrength > 60>>
				<<link "Decrease">>
					<<ChangeFetishStrength 0>>
				<</link>>
			<</if>>
			<<if ($activeSlave.fetishStrength > 60)>>|<</if>>
			<<if $activeSlave.fetishStrength <= 95>>
				<<link "Increase">>
					<<ChangeFetishStrength 1>>
				<</link>>
			<</if>>

	<</if>>

	<</if>>
	<</replace>>
<</if>>

<</widget>>

/%
 Call as <<ChangeFetishStrength 1>>
 $arg[0] is whether increase or decrease
%/
<<widget "ChangeFetishStrength">>

<<if ($args[0] == 0)>>
	<<set $activeSlave.fetishStrength -= 5, $activeSlave.fetishKnown = 1>>
	<<replace "#fetishStrength">>
		''Fetish strength:''
		<<if $activeSlave.fetishStrength > 95>>
			@@.lightcoral;High.@@
		<<elseif $activeSlave.fetishStrength <= 60>>
			@@.pink;Low.@@
		<<else>>
			@@.hotpink;Normal.@@
		<</if>>

		<<if $activeSlave.fetishStrength > 60>>
			<<link "Decrease">>
				<<ChangeFetishStrength 0>>
			<</link>>
		<</if>>
		<<if ($activeSlave.fetishStrength > 60)>>|<</if>>
		<<if $activeSlave.fetishStrength <= 95>>
			<<link "Increase">>
				<<ChangeFetishStrength 1>>
			<</link>>
		<</if>>
	<</replace>>
	<<StartingGirlsCost>>

<<else>>
	<<set $activeSlave.fetishStrength += 5, $activeSlave.fetishKnown = 1>>
	<<replace "#fetishStrength">>
		''Fetish strength:''
		<<if $activeSlave.fetishStrength > 95>>
			@@.lightcoral;High.@@
		<<elseif $activeSlave.fetishStrength <= 60>>
			@@.pink;Low.@@
		<<else>>
			@@.hotpink;Normal.@@
		<</if>>

		<<if $activeSlave.fetishStrength > 60>>
			<<link "Decrease">>
				<<ChangeFetishStrength 0>>
			<</link>>
		<</if>>
		<<if ($activeSlave.fetishStrength > 60)>>|<</if>>
		<<if $activeSlave.fetishStrength <= 95>>
			<<link "Increase">>
				<<ChangeFetishStrength 1>>
			<</link>>
		<</if>>
	<</replace>>
	<<StartingGirlsCost>>

<</if>>

<</widget>>

/%
 Call as <<ToggleSexuality 1>>
 $arg[0] is whether unknown or known.
%/
<<widget "ToggleSexuality">>

<<if ($args[0] == 0)>>

	<<set $activeSlave.attrXX = random(0,100), $activeSlave.attrXY = random(0,100), $activeSlave.energy = random(1,90), $activeSlave.attrKnown = 0>>
	<<StartingGirlsCost>>
	<<replace "#sexuality">>
		//Not known.//

	<<link "Known">>
		<<ToggleSexuality 1>>
	<</link>>
	<</replace>>
<<else>>
	<<set $activeSlave.attrKnown = 1>>
	<<replace "#sexuality">>

	<<if $activeSlave.attrKnown == 1>>
		<<if $activeSlave.attrXY <= 5>>
			@@.red;Disgusted by men,@@
		<<elseif $activeSlave.attrXY <= 15>>
			@@.red;Turned off by men,@@
		<<elseif $activeSlave.attrXY <= 35>>
			@@.red;Not attracted to men,@@
		<<elseif $activeSlave.attrXY <= 65>>
			Indifferent to men,
		<<elseif $activeSlave.attrXY <= 85>>
			@@.green;Attracted to men,@@
		<<elseif $activeSlave.attrXY <= 95>>
			@@.green;Aroused by men,@@
		<<else>>
			@@.green;Passionate about men,@@
		<</if>>
	<<else>>
		//Not known.//
	<</if>>

	<<if $activeSlave.attrKnown == 1>>
		<<if $activeSlave.attrXX <= 5>>
			@@.red;disgusted by women.@@
		<<elseif $activeSlave.attrXX <= 15>>
			@@.red;turned off by women.@@
		<<elseif $activeSlave.attrXX <= 35>>
			@@.red;not attracted to women.@@
		<<elseif $activeSlave.attrXX <= 65>>
			indifferent to women.
		<<elseif $activeSlave.attrXX <= 85>>
			@@.green;attracted to women.@@
		<<elseif $activeSlave.attrXX <= 95>>
			@@.green;aroused by women.@@
		<<else>>
			@@.green;passionate about women.@@
		<</if>>
	<</if>>

	<<if $activeSlave.attrKnown == 1>>
	<<link "Unknown">>
		<<ToggleSexuality 0>>
	<</link>>

	XY attraction:

		<<link "Decrease">>
		<<ChangeAttr 1 0>>
		<</link>>

	|
		<<link "Increase">>
		<<ChangeAttr 1 1>>
		<</link>>

	XX attraction:

		<<link "Decrease">>
		<<ChangeAttr 0 0>>
		<</link>>

	|
		<<link "Increase">>
		<<ChangeAttr 0 1>>
		<</link>>

	''Sex drive:''

		<<if $activeSlave.energy == 100>>@@.green;Nympho!@@
		<<elseif $activeSlave.energy > 80>>@@.green;Sex addict.@@
		<<elseif $activeSlave.energy > 60>>@@.green;Powerful.@@
		<<elseif $activeSlave.energy > 40>>@@.yellow;Average.@@
		<<elseif $activeSlave.energy > 20>>@@.red;Poor.@@
		<<else>>@@.red;Frigid.@@<</if>>

	<<link "Nympho">>
		<<set $activeSlave.energy = 100, $activeSlave.attrKnown = 1>>
		<<replace "#energy">>
			@@.green;Nympho!@@
		<</replace>>
		<<StartingGirlsCost>>
	<</link>>
	| <<link "Sex addict">>
		<<set $activeSlave.energy = 85, $activeSlave.attrKnown = 1>>
		<<replace "#energy">>
			@@.green;Sex addict.@@
		<</replace>>
		<<StartingGirlsCost>>
	<</link>>
	| <<link "Powerful">>
		<<set $activeSlave.energy = 65, $activeSlave.attrKnown = 1>>
		<<replace "#energy">>
			@@.green;Powerful.@@
		<</replace>>
		<<StartingGirlsCost>>
	<</link>>
	| <<link "Average">>
		<<set $activeSlave.energy = 45, $activeSlave.attrKnown = 1>>
		<<replace "#energy">>
			@@.yellow;Average.@@
		<</replace>>
		<<StartingGirlsCost>>
	<</link>>
	| <<link "Poor">>
		<<set $activeSlave.energy = 25, $activeSlave.attrKnown = 1>>
		<<replace "#energy">>
			@@.red;Poor.@@
		<</replace>>
		<<StartingGirlsCost>>
	<</link>>
	| <<link "Frigid">>
		<<set $activeSlave.energy = 5, $activeSlave.attrKnown = 1>>
		<<replace "#energy">>
			@@.red;Frigid.@@
		<</replace>>
		<<StartingGirlsCost>>
	<</link>>
	<<else>>
		<<link "Known">>
			<<ToggleSexuality 1>>
		<</link>>
	<</if>>
	<</replace>>
	<<StartingGirlsCost>>
<</if>>
<</widget>>

/%
 Call as <<ChangeAttr 1 1>>
 $arg[0] is whether XX or XY.
 $arg[1] is whether increase or decrease.
%/
<<widget "ChangeAttr">>

<<if ($args[0] == 0) && ($args[1] == 0)>>
	<<if $activeSlave.attrXX > 0>>
		<<set $activeSlave.attrXX -= 10>>
	<</if>>
	<<set $activeSlave.attrXX = Math.clamp($activeSlave.attrXX, 0, 100)>>
	<<set $activeSlave.attrKnown = 1>>
	<<replace "#attrXX">>
		<<if $activeSlave.attrXX <= 5>>
			@@.red;disgusted by women.@@
		<<elseif $activeSlave.attrXX <= 15>>
			@@.red;turned off by women.@@
		<<elseif $activeSlave.attrXX <= 35>>
			@@.red;not attracted to women.@@
		<<elseif $activeSlave.attrXX <= 65>>
			indifferent to women.
		<<elseif $activeSlave.attrXX <= 85>>
			@@.green;attracted to women.@@
		<<elseif $activeSlave.attrXX <= 95>>
			@@.green;aroused by women.@@
		<<else>>
			@@.green;passionate about women.@@
		<</if>>
	<</replace>>
	<<StartingGirlsCost>>
	<<if $activeSlave.attrXX == 100>>
		<<replace "#increaseXX">>
		<</replace>>
		<<replace "#decreaseXX">>
			<<link "Decrease">>
			<<ChangeAttr 0 0>>
			<</link>>
		<</replace>>
	<<elseif $activeSlave.attrXX == 0>>
		<<replace "#decreaseXX">>

		<</replace>>
		<<replace "#increaseXX">>
			<<link "Increase">>
			<<ChangeAttr 0 1>>
			<</link>>
		<</replace>>
	<<else>>
		<<replace "#decreaseXX">>
			<<link "Decrease">>
			<<ChangeAttr 0 0>>
			<</link>>
		<</replace>>
		<<replace "#increaseXX">>
		|
			<<link "Increase">>
			<<ChangeAttr 0 1>>
			<</link>>
		<</replace>>
	<</if>>
<<elseif ($args[0] == 0) && ($args[1] == 1)>>
	<<if $activeSlave.attrXX < 100>>
		<<set $activeSlave.attrXX += 10>>
	<</if>>
	<<set $activeSlave.attrXX = Math.clamp($activeSlave.attrXX, 0, 100)>>
	<<set $activeSlave.attrKnown = 1>>
	<<replace "#attrXX">>
		<<if $activeSlave.attrXX <= 5>>
			@@.red;disgusted by women.@@
		<<elseif $activeSlave.attrXX <= 15>>
			@@.red;turned off by women.@@
		<<elseif $activeSlave.attrXX <= 35>>
			@@.red;not attracted to women.@@
		<<elseif $activeSlave.attrXX <= 65>>
			indifferent to women.
		<<elseif $activeSlave.attrXX <= 85>>
			@@.green;attracted to women.@@
		<<elseif $activeSlave.attrXX <= 95>>
			@@.green;aroused by women.@@
		<<else>>
			@@.green;passionate about women.@@
		<</if>>
	<</replace>>
	<<StartingGirlsCost>>
	<<if $activeSlave.attrXX == 100>>
		<<replace "#increaseXX">>
		<</replace>>
		<<replace "#decreaseXX">>
			<<link "Decrease">>
			<<ChangeAttr 0 0>>
			<</link>>
		<</replace>>
	<<elseif $activeSlave.attrXX == 0>>
		<<replace "#decreaseXX">>

		<</replace>>
		<<replace "#increaseXX">>
			<<link "Increase">>
			<<ChangeAttr 0 1>>
			<</link>>
		<</replace>>
	<<else>>
		<<replace "#decreaseXX">>
			<<link "Decrease">>
			<<ChangeAttr 0 0>>
			<</link>>
		<</replace>>
		<<replace "#increaseXX">>
		|
			<<link "Increase">>
			<<ChangeAttr 0 1>>
			<</link>>
		<</replace>>
	<</if>>
<<elseif ($args[0] == 1) && ($args[1] == 0)>>
	<<if $activeSlave.attrXY > 0>>
		<<set $activeSlave.attrXY -= 10>>
	<</if>>

	<<set $activeSlave.attrXY = Math.clamp($activeSlave.attrXY, 0, 100)>>
	<<set $activeSlave.attrKnown = 1>>
	<<replace "#attrXY">>
		<<if $activeSlave.attrXY <= 5>>
			@@.red;Disgusted by men,@@
		<<elseif $activeSlave.attrXY <= 15>>
			@@.red;Turned off by men,@@
		<<elseif $activeSlave.attrXY <= 35>>
			@@.red;Not attracted to men,@@
		<<elseif $activeSlave.attrXY <= 65>>
			Indifferent to men,
		<<elseif $activeSlave.attrXY <= 85>>
			@@.green;Attracted to men,@@
		<<elseif $activeSlave.attrXY <= 95>>
			@@.green;Aroused by men,@@
		<<else>>
			@@.green;Passionate about men,@@
		<</if>>
	<</replace>>
	<<StartingGirlsCost>>
	<<if $activeSlave.attrXY == 100>>
		<<replace "#increaseXY">>

		<</replace>>
		<<replace "#decreaseXY">>
			<<link "Decrease">>
				<<ChangeAttr 1 0>>
			<</link>>
		<</replace>>
	<<elseif $activeSlave.attrXY == 0>>
		<<replace "#decreaseXY">>

		<</replace>>
		<<replace "#increaseXY">>
			<<link "Increase">>
				<<ChangeAttr 1 1>>
			<</link>>
		<</replace>>
	<<else>>
		<<replace "#decreaseXY">>
			<<link "Decrease">>
				<<ChangeAttr 1 0>>
			<</link>>
		<</replace>>
		<<replace "#increaseXY">>
		|
			<<link "Increase">>
				<<ChangeAttr 1 1>>
			<</link>>
		<</replace>>
	<</if>>
<<elseif ($args[0] == 1) && ($args[1] == 1)>>
	<<if $activeSlave.attrXY < 100>>
		<<set $activeSlave.attrXY += 10>>
	<</if>>
	<<set $activeSlave.attrXY = Math.clamp($activeSlave.attrXY, 0, 100)>>
	<<set $activeSlave.attrKnown = 1>>
	<<replace "#attrXY">>
		<<if $activeSlave.attrXY <= 5>>
			@@.red;Disgusted by men,@@
		<<elseif $activeSlave.attrXY <= 15>>
			@@.red;Turned off by men,@@
		<<elseif $activeSlave.attrXY <= 35>>
			@@.red;Not attracted to men,@@
		<<elseif $activeSlave.attrXY <= 65>>
			Indifferent to men,
		<<elseif $activeSlave.attrXY <= 85>>
			@@.green;Attracted to men,@@
		<<elseif $activeSlave.attrXY <= 95>>
			@@.green;Aroused by men,@@
		<<else>>
			@@.green;Passionate about men,@@
		<</if>>
	<</replace>>
	<<StartingGirlsCost>>

	<<if $activeSlave.attrXY == 100>>
		<<replace "#increaseXY">>

		<</replace>>
		<<replace "#decreaseXY">>
			<<link "Decrease">>
			<<ChangeAttr 1 0>>
			<</link>>
		<</replace>>
	<<elseif $activeSlave.attrXY == 0>>
		<<replace "#decreaseXY">>

		<</replace>>
		<<replace "#increaseXY">>
			<<link "Increase">>
			<<ChangeAttr 1 1>>
			<</link>>
		<</replace>>
	<<else>>
		<<replace "#decreaseXY">>
			<<link "Decrease">>
			<<ChangeAttr 1 0>>
			<</link>>
		<</replace>>
		<<replace "#increaseXY">>
		|
			<<link "Increase">>
			<<ChangeAttr 1 1>>
			<</link>>
		<</replace>>
	<</if>>
<</if>>
<</widget>>

/%
 Call as <<CustomSlaveAge>>
%/
<<widget "CustomSlaveAge">>
	<<replace #age>>
		<<if $customSlave.age < 3>>2- years old.
		<<elseif $customSlave.age < 5>>3-4 years old.
		<<elseif $customSlave.age < 7>>5-6 years old.
		<<elseif $customSlave.age < 10>>7-9 years old.
		<<elseif $customSlave.age < 13>>10-12 years old.
		<<elseif $customSlave.age < 15>>13-14 years old.
		<<elseif $customSlave.age < 18>>15-17 years old.
		<<elseif $customSlave.age < 20>>18-19 years old.
		<<elseif $customSlave.age < 25 && $retirementAge >= 25>>20-24 years old.
		<<elseif $customSlave.age < 25 && $retirementAge >= 20>>20+ years old.
		<<elseif $customSlave.age < 30 && $retirementAge >= 30>>25-29 years old.
		<<elseif $customSlave.age < 30 && $retirementAge >= 25>>25+ years old.
		<<elseif $customSlave.age < 40 && $retirementAge >= 40>>30-39 years old.
		<<elseif $customSlave.age < 40 && $retirementAge >= 30>>30+ years old.
		<<elseif $customSlave.age < 50 && $retirementAge >= 50>>40-49 years old.
		<<elseif $customSlave.age < 50 && $retirementAge >= 40>>40+ years old.
		<<elseif $customSlave.age < 60 && $retirementAge >= 60>>50-59 years old.
		<<elseif $customSlave.age < 60 && $retirementAge >= 50>>50+ years old.
		<<elseif $customSlave.age < 70 && $retirementAge >= 70>>60-69 years old.
		<<elseif $customSlave.age < 70 && $retirementAge >= 60>>60+ years old.
		<<elseif $customSlave.age < 80 && $retirementAge >= 80>>70-79 years old.
		<<elseif $customSlave.age < 80 && $retirementAge >= 70>>70+ years old.
		<<elseif $customSlave.age < 90 && $retirementAge >= 90>>80-89 years old.
		<<elseif $customSlave.age < 90 && $retirementAge >= 80>>80+ years old.
		<<elseif $customSlave.age < 100 && $retirementAge >= 100>>90-99 years old.
		<<elseif $customSlave.age < 100 && $retirementAge >= 90>>90+ years old.
		<<elseif $customSlave.age < 110 && $retirementAge >= 110>>100-109 years old.
		<<elseif $customSlave.age < 110 && $retirementAge >= 100>>100+ years old.
		<<elseif $customSlave.age < 120 && $retirementAge >= 120>>110-119 years old.
		<<elseif $customSlave.age < 120 && $retirementAge >= 110>>110+ years old.
		<<elseif $customSlave.age < 130 && $retirementAge >= 130>>120-129 years old.
		<<elseif $customSlave.age < 130 && $retirementAge >= 120>>120+ years old.
		<<else>>130+ years old.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveHealth>>
%/
<<widget "CustomSlaveHealth">>
	<<replace #health>>
		<<if $customSlave.health == 0>>Healthy.
		<<else>>Extremely healthy.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveMuscles>>
%/
<<widget "CustomSlaveMuscles">>
	<<replace #muscles>>
		<<if $customSlave.muscles > 95>>
			Ripped.
		<<elseif $customSlave.muscles > 50>>
			Muscular.
		<<elseif $customSlave.muscles > 30>>
			Well built.
		<<elseif $customSlave.muscles > 5>>
			Toned.
		<<elseif $customSlave.muscles > -6>>
			Soft.
		<<elseif $customSlave.muscles > -31>>
			Quite weak.
		<<elseif $customSlave.muscles > -51>>
			Rather weak.
		<<elseif $customSlave.muscles > -96>>
			Very weak.
		<<else>>
			Frail.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveLips>>
%/
<<widget "CustomSlaveLips">>
	<<replace #lips>>
		<<if $customSlave.lips <= 10>>Thin lips.
		<<elseif $customSlave.lips <= 20>>Normal lips.
		<<elseif $customSlave.lips <= 40>>Plush lips.
		<<elseif $customSlave.lips <= 70>>Big lips.
		<<elseif $customSlave.lips <= 95>>Huge lips.
		<<else>>Facepussy.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveVoice>>
%/
<<widget "CustomSlaveVoice">>
	<<replace #voice>>
		<<if $customSlave.voice == 3>>High, girly voice.
		<<elseif $customSlave.voice == 2>>Feminine voice.
		<<elseif $customSlave.voice == 1>>Deep voice.
		<<elseif $customSlave.voice == 0>>Mute.
		<<else>>Voice is unimportant.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveHeight>>
%/
<<widget "CustomSlaveHeight">>
	<<replace #height>>
		<<if $customSlave.heightMod == "greatly below average">>Petite.
		<<elseif $customSlave.heightMod == "below average">>Short.
		<<elseif $customSlave.heightMod == "normal">>Average height.
		<<elseif $customSlave.heightMod == "above average">>Tall.
		<<else>>Very tall.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveWeight>>
%/
<<widget "CustomSlaveWeight">>
	<<replace #weight>>
		<<if $customSlave.weight == -50>>Very thin.
		<<elseif $customSlave.weight == -15>>Thin.
		<<elseif $customSlave.weight == 0>>Average weight.
		<<elseif $customSlave.weight == 15>>Chubby.
		<<elseif $customSlave.weight == 50>>Plump.
		<<elseif $customSlave.weight == 100>>Fat.
		<<elseif $customSlave.weight == 150>>Very Fat.
		<<else>>Immobile.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveFace>>
%/
<<widget "CustomSlaveFace">>
	<<replace #face>>
		<<if $customSlave.face < -40>>Very unattractive face.
		<<elseif $customSlave.face < -10>>Unattractive face.
		<<elseif $customSlave.face <= 10>>Average face.
		<<elseif $customSlave.face <= 40>>Attractive face.
		<<elseif $customSlave.face > 40>>Very attractive face.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveRace>>
%/
<<widget "CustomSlaveRace">>
	<<replace #ethnicity>>
		<<textbox "$customSlave.race" $customSlave.race "Custom Slave">>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveSkin>>
%/
<<widget "CustomSlaveSkin">>
	<<replace #skin>>
		<<textbox "$customSlave.skin" $customSlave.skin "Custom Slave">>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveBoobs>>
%/
<<widget "CustomSlaveBoobs">>
	<<replace #boobs>>
		<<if $customSlave.boobs == 200>>Flat chest.
		<<elseif $customSlave.boobs <= 500>>Healthy breasts.
		<<elseif $customSlave.boobs <= 800>>Big breasts.
		<<elseif $customSlave.boobs <= 1400>>Huge breasts.
		<<elseif $customSlave.boobs <= 2100>>Giant breasts.
		<<else>>Massive breasts.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveButt>>
%/
<<widget "CustomSlaveButt">>
	<<replace #butt>>
		<<if $customSlave.butt == 1>>Flat buttocks.
		<<elseif $customSlave.butt < 4>>Healthy buttocks.
		<<elseif $customSlave.butt < 6>>Huge buttocks.
		<<else>>Massive buttocks.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveSex>>
%/
<<widget "CustomSlaveSex">>
	<<replace #sex>>
		<<if $customSlave.sex == 1>>Female (cock & balls options not applied).
		<<elseif $customSlave.sex == 2>>Male (pussy options not applied).
		<<else>>Futanari (clit options not applied).
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveVirgin>>
%/
<<widget "CustomSlaveVirgin">>
	<<replace #virgin>>
		<<if $customSlave.virgin == 0>>Vaginal virgin.
		<<else>>Virginity not important.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveVagina>>
%/
<<widget "CustomSlaveVagina">>
	<<replace #vagina>>
		<<if $customSlave.vagina == -1>>No vagina.
		<<elseif $customSlave.vagina == 0>>Vaginal virgin.
		<<else>>Normal vagina.
		<</if>>
		<<link "No vagina">>
			<<set $customSlave.vagina = -1, $customSlave.preg = 0, WombFlush($activeSlave), $customSlave.ovaries = 0>>
			<<CustomSlaveVagina>>
		<</link>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveDick>>
%/
<<widget "CustomSlaveDick">>
	<<replace #dick>>
		<<if $customSlave.dick == 0>>No penis.
		<<elseif $customSlave.dick == 2>>Small penis.
		<<else>>Large penis.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveBalls>>
%/
<<widget "CustomSlaveBalls">>
	<<replace #balls>>
		<<if $customSlave.balls == 0>>No testicles.
		<<elseif $customSlave.balls == 2>>Small testicles.
		<<elseif $customSlave.balls == 4>>Large testicles.
		<<else>>Huge Balls.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveClit>>
%/
<<widget "CustomSlaveClit">>
	<<replace #clit>>
		<<if $customSlave.clit == 0>>Normal clitoris.
		<<elseif $customSlave.clit == 1>>Big clitoris.
		<<elseif $customSlave.clit == 3>>Enormous clitoris.
		<<else>>Pseudophallus.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveLabia>>
%/
<<widget "CustomSlaveLabia">>
	<<replace #labia>>
		<<if $customSlave.labia == 0>>Normal labia.
		<<elseif $customSlave.labia == 1>>big labia.
		<<elseif $customSlave.labia == 2>>Huge labia.
		<<else>>Enormous labia.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveClitBalls>>
%/
<<widget "CustomSlaveClitBalls">>
	<<replace #clitballs>>
	<<if $customSlave.dick > 0>>
	<<if $customSlave.balls == 0>>No testicles.<<elseif $customSlave.balls == 2>>Small testicles.<<else>>Large testicles.<</if>>
	<<link "No testicles">>
		<<set $customSlave.balls = 0,$customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Small testicles">>
		<<set $customSlave.balls = 2,$customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Large testicles">>
		<<set $customSlave.balls = 4,$customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	<<else>>
	<<if $customSlave.clit == 0>>Normal clitoris.<<elseif $customSlave.clit == 0>>Big clitoris.<<else>>Enormous clitoris.<</if>>
	<<link "Normal clitoris">>
		<<set $customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Big clitoris">>
		<<set $customSlave.clit = 1>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Enormous clitoris">>
		<<set $customSlave.clit = 2>>
		<<CustomSlaveClitBalls>>
	<</link>>

	<<if $customSlave.labia == 0>>Minimal labia.<<elseif $customSlave.labia == 1>>Normal labia.<<elseif $customSlave.labia == 2>>Huge labia.<<else>>Enormous labia.<</if>>
	<<link "Minimal labia">>
		<<set $customSlave.labia = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Normal labia">>
		<<set $customSlave.labia = 1>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Huge labia">>
		<<set $customSlave.labia = 2>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Enormous labia">>
		<<set $customSlave.labia = 3>>
		<<CustomSlaveClitBalls>>
	<</link>>
	<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveLube>>
%/
<<widget "CustomSlaveLube">>
	<<replace #lube>>
		<<if $customSlave.vaginaLube == 0>>Dry vagina.
		<<elseif $customSlave.vaginaLube == 1>>Wet vagina.
		<<else>>Sopping wet vagina.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveAnalVirginity>>
%/
<<widget "CustomSlaveAnalVirginity">>
	<<replace #anus>>
		<<if $customSlave.analVirgin == 0>>Anal virgin.
		<<else>>Anal virginity is not important.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveAnus>>
%/
<<widget "CustomSlaveAnus">>
	<<replace #anus>>
		<<if $customSlave.anus == 0>>Anal virgin.
		<<else>>Normal anus.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveSkills>>
%/
<<widget "CustomSlaveSkills">>
	<<replace #skills>>
		<<if $customSlave.skills <= 10>>Sexually unskilled.
		<<elseif $customSlave.skills <= 15>>Basic sex skills.
		<<else>>Sexually skilled.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveWhoreSkills>>
%/
<<widget "CustomSlaveWhoreSkills">>
	<<replace #whoreskills>>
		<<if $customSlave.whoreSkills <= 10>>Unskilled at prostitution and entertainment.
		<<elseif $customSlave.whoreSkills <= 15>>Basic prostitution and entertainment skills.
		<<else>>Skilled at prostitution and entertainment.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveCombatSkills>>
%/
<<widget "CustomSlaveCombatSkills">>
	<<replace #combatskills>>
		<<if $customSlave.combatSkills == 0>>Unskilled at combat.
		<<else>>Skilled at combat.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveIntelligence>>
%/
<<widget "CustomSlaveIntelligence">>
	<<replace #intelligence>>
		<<if $customSlave.intelligence >= 3>>Brilliant.
		<<elseif $customSlave.intelligence == 2>>Very smart..
		<<elseif $customSlave.intelligence == 1>>Smart.
		<<elseif $customSlave.intelligence == 0>>Average intelligence.
		<<elseif $customSlave.intelligence == -1>>Stupid.
		<<elseif $customSlave.intelligence == -2>>Very stupid.
		<<else>>Moronic.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveEducation>>
%/
<<widget "CustomSlaveEducation">>
	<<replace #education>>
		<<if $customSlave.intelligenceImplant >= 30>>Well educated.
		<<elseif $customSlave.intelligenceImplant >= 15>>Educated.
		<<else>>Uneducated.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveNationality>>
%/
<<widget "CustomSlaveNationality">>
	<<replace #nationality>>
		Nationality: $customSlave.nationality.
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveEyes>>
%/
<<widget "CustomSlaveEyes">>
	<<replace #eyes>>
		<<if $seeExtreme == 1>>
			<<if $customSlave.eyes == -2>>Blind.
			<<elseif $customSlave.eyes == -1>>Nearsighted.
			<<else>>Normal.
			<</if>>
		<<else>>
			<<if $customSlave.eyes == -1>>Nearsighted.
			<<else>>Normal.
			<</if>>
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveEars>>
%/
<<widget "CustomSlaveEars">>
	<<replace #hears>>
		<<if $seeExtreme == 1>>
			<<if $customSlave.hears == -2>>Deaf.
			<<elseif $customSlave.hears == -1>>Hard of hearing.
			<<else>>Normal.
			<</if>>
		<<else>>
			<<if $customSlave.hears == -1>>Hard of hearing.
			<<else>>Normal.
			<</if>>
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveAmp>>
%/
<<widget "CustomSlaveAmp">>
	<<replace #amputation>>
		<<if $customSlave.amp == 1>>Limbless.
		<<else>>Limbed.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<GenerateMarketSlave 'market' ['arcology']>>
	If $args[0] is undefined, will generate a kidnapper's market slave.
	If $args[0] is "neighbor", $numArcology is used as the index of which neighbor to use.

%/
<<widget GenerateMarketSlave>>
<<if $args[0]>>
	<<set _market = $args[0]>>
<<else>>
	<<set _market = "kidnappers">>
<</if>>

<<switch _market>>
<<case "corporate">>
	<<if $captureUpgradeAge == "young">>
		<<set $activeSlaveOneTimeMinAge = $minimumSlaveAge>>
		<<set $activeSlaveOneTimeMaxAge = 19>>
	<<elseif $captureUpgradeAge == "old">>
		<<if $pedo_mode == 1>>
			<<set $activeSlaveOneTimeMinAge = 24>>
			<<set $activeSlaveOneTimeMaxAge = $retirementAge>>
		<<else>>
			<<set $activeSlaveOneTimeMinAge = 36>>
			<<set $activeSlaveOneTimeMaxAge = $retirementAge>>
		<</if>>
	<</if>>
	<<set $one_time_age_overrides_pedo_mode = 1>>
	<<if $captureUpgradeRace != "none" && $captureUpgradeRace != "unselected">>
		<<set $fixedRace = $captureUpgradeRace>>
	<</if>>
	<<if $captureUpgradeGender == "XX">>
		Slaves without pussies are not trained.
		<<include "Generate XX Slave">>
	<<elseif $captureUpgradeGender == "XY">>
		Slaves without dicks are not trained.
		<<include "Generate XY Slave">>
	<<else>>
		Slaves are passed to training regardless of whether they have dicks or pussies.
		<<include "Generate New Slave">>
	<</if>>
	<<set $activeSlave.origin = "She was enslaved and trained by your corporation.">>
	<<set $activeSlave.devotion = random(-15,15)>>
	<<set $activeSlave.trust = random(-45,-25)>>
	<<set $activeSlave.health = random(25,50)>>

	<<if $surgicalUpgradeGenitalia != "fucknugget">>

	<<if $entrapmentUpgradeDevotionTwo == "devotion">>
		It focuses on selecting trainees predisposed towards devotion to their new owners.
		<<set $activeSlave.devotion = random(55,75)>>
	<<elseif $entrapmentUpgradeDevotionOne == "obedience">>
		It focuses on selecting trainees predisposed towards obedience.
		<<set $activeSlave.devotion = random(25,45)>>
	<<else>>
		It does not select trainees based on their initial feelings about slavery.
	<</if>>
	<<if $entrapmentUpgradeIntelligence == "intelligent">>
		Intelligent slaves have a high priority for training.
		<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [30,100]})>>
	<<elseif $entrapmentUpgradeIntelligence == "stupid">>
		Stupid slaves have a high priority for training.
		<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-100,-30]})>>
	<<else>>
		Slaves' intelligence is not given special consideration.
	<</if>>
	<<if $captureUpgradeAge == "young">>
		Teenage slaves are strongly favored for training.
		/*<<set $activeSlave.age = random(18,19)>>*/
	<<elseif $captureUpgradeAge == "old">>
		Newly enslaved MILFs are strongly favored for training.
		/*<<set $activeSlave.age = random(36,$retirementAge)>>*/
	<<else>>
		Promising slaves are trained without special sorting based on age.
	<</if>>
	<<if ($captureUpgradeRace == "unselected") || ($captureUpgradeRace == "none")>>
		There is no racial element to trainee selection.
	<<else>>
		The corporation prefers to train <<print $captureUpgradeRace>> slaves.
	<</if>>
	<<if $generalUpgradeBreaking == "brutality">>
		The corporation applies brutal slave breaking techniques, with new captures assigned rape quotas.
		<<set $activeSlave.trust = random(-75,-55)>>
	<<elseif $generalUpgradeBreaking == "care">>
		The corporation applies surprisingly caring slave breaking techniques that sometimes convince refugees and similar downtrodden people that slavery is a step up for them.
		<<set $activeSlave.trust = random(-15,15)>>
	<<else>>
		The corporation applies standard slave breaking techniques.
	<</if>>
	<<if $generalUpgradeWeight == "attractive">>
		Thin trainees are fattened up; fat trainees are slimmed down.
		<<set $activeSlave.weight = Math.clamp($activeSlave.weight, -25, 25)>>
	<<else>>
		Only the unhealthiest trainees are fed special diets.
	<</if>>
	<<if $generalUpgradeMuscle == "toned">>
		Trainees are brought up to a good state of physical fitness.
		<<set $activeSlave.weight = Math.clamp($activeSlave.weight, -25, 25)>>
		<<set $activeSlave.muscles = 20>>
	<<elseif $generalUpgradeMuscle == "ripped">>
		Trainees are subjected to punishing workout routines and only sold when ripped.
		<<set $activeSlave.weight = Math.clamp($activeSlave.weight, -25, 5)>>
		<<set $activeSlave.muscles = 50>>
	<<else>>
		Trainees are not subjected to any special workout routine.
	<</if>>
	<<if $trainingUpgradeAccent == "accents">>
		The corporation teaches its trainees the lingua franca but allows them to retain distinctive accents.
		<<set $activeSlave.accent = Math.clamp($activeSlave.accent, 0, 1)>>
	<<elseif $trainingUpgradeAccent == "eliminate">>
		The corporation teaches its trainees to speak the lingua franca without accent.
		<<set $activeSlave.accent = 0>>
	<<else>>
		The corporation does not expend any special effort teaching language.
	<</if>>
	<<if $trainingUpgradeEducation == "basic">>
		Its slave students receive basic slave educations.
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.whoreSkill = Math.clamp($activeSlave.whoreSkill, 15, 100)>>
		<<set $activeSlave.entertainSkill = Math.clamp($activeSlave.entertainSkill, 15, 100)>>
	<<else>>
		Its slaves are not given special educational attention.
	<</if>>
	<<if $trainingUpgradeSexEd == "competence">>
		Trainees spend weeks learning sexual competence.
		<<set $activeSlave.oralSkill = Math.clamp($activeSlave.oralSkill, 15, 100)>>
		<<if $activeSlave.vagina >= 0>>
		<<set $activeSlave.vaginalSkill = Math.clamp($activeSlave.vaginalSkill, 15, 100)>>
		<</if>>
		<<set $activeSlave.analSkill = Math.clamp($activeSlave.analSkill, 15, 100)>>
	<<elseif $trainingUpgradeSexEd == "highly skilled">>
		Trainees spend months learning sexual skills.
		<<set $activeSlave.oralSkill = Math.clamp($activeSlave.oralSkill, 35, 100)>>
		<<if $activeSlave.vagina > 0>>
			<<set $activeSlave.vaginalSkill = Math.clamp($activeSlave.vaginalSkill, 35, 100)>>
		<<elseif $activeSlave.vagina == 0>>
			<<set $activeSlave.vaginalSkill = Math.clamp($activeSlave.vaginalSkill, 15, 100)>>
		<</if>>
		<<if $activeSlave.anus > 0>>
			<<set $activeSlave.analSkill = Math.clamp($activeSlave.analSkill, 35, 100)>>
		<<else>>
			<<set $activeSlave.analSkill = Math.clamp($activeSlave.analSkill, 15, 100)>>
		<</if>>
	<<else>>
		No special sexual training is applied.
	<</if>>

	<</if>> /* CLOSES FUCKNUGGET EXEMPTION */

	<<if $surgicalUpgradeCosmetics == "applied">>
		The corporation uses subtle cosmetic surgery to improve its slaves for sale.
		<<if ($activeSlave.anus > 3)>>
			<<set $activeSlave.anus = 3>>
			<<if $activeSlave.analSkill > 10>><<set $activeSlave.analSkill -= 10>><</if>>
		<</if>>
		<<if ($activeSlave.vagina > 3)>>
			<<set $activeSlave.vagina = 3>>
			<<if $activeSlave.vaginalSkill > 10>><<set $activeSlave.vaginalSkill -= 10>><</if>>
		<</if>>
		<<if $activeSlave.faceImplant <= 30 && $activeSlave.face <= 95>>
			<<if $activeSlave.faceShape == "masculine">><<set $activeSlave.faceShape = "androgynous">><</if>>
			<<set $activeSlave.faceImplant = 20>>
			<<set $activeSlave.face = Math.clamp($activeSlave.face+20,-100,100)>>
		<</if>>
		<<if ($activeSlave.ageImplant != 1) && ($activeSlave.visualAge >= 25)>>
			<<set $activeSlave.ageImplant = 1>>
			<<AgeImplantAdjustment $activeSlave>>
		<</if>>
		<<if ($activeSlave.voice == 1) && ($activeSlave.voiceImplant == 0)>>
			<<set $activeSlave.voice += 1>>
			<<set $activeSlave.voiceImplant += 1>>
		<</if>>
		<<set $activeSlave.waist = Math.trunc($activeSlave.waist,-100,-15)>>
		<<if (($activeSlave.boobShape == "saggy") || ($activeSlave.boobShape == "downward-facing"))>>
			<<set $activeSlave.boobShape = "normal">>
		<</if>>
		<<if (($activeSlave.boobShape == "normal") || ($activeSlave.boobShape == "wide-set"))>>
			<<if $activeSlave.boobs > 800>><<set $activeSlave.boobShape = "torpedo-shaped">><<else>><<set $activeSlave.boobShape = "perky">><</if>>
		<</if>>
	<<else>>
		The corporation does not use cosmetic surgery to improve its slaves for sale.
	<</if>>
	<<if $surgicalUpgradeImplants == "applied">>
		Slaves are given tasteful breast, butt, and lip implants.
		<<set $activeSlave.buttImplant = 1>>
		<<set $activeSlave.butt = Math.clamp($activeSlave.butt+$activeSlave.buttImplant, 0, 10)>>
		<<set $activeSlave.boobsImplant = 600>>
		<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs+$activeSlave.boobsImplant, 0, 10000)>>
		<<set $activeSlave.lipsImplant = 20>>
		<<set $activeSlave.lips = Math.clamp($activeSlave.lips+$activeSlave.lipsImplant, 0, 55)>>
	<<elseif $surgicalUpgradeImplants == "absurd">>
		Slaves are given absurd breast, butt, and lip implants.
		<<set $activeSlave.buttImplant = 4>>
		<<set $activeSlave.butt = Math.clamp($activeSlave.butt+$activeSlave.buttImplant, 0, 10, $activeSlave.butt+$activeSlave.buttImplant)>>
		<<set $activeSlave.boobsImplant = 2400>>
		<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs+$activeSlave.boobsImplant, 0, 10000)>>
		<<set $activeSlave.lipsImplant = 60>>
		<<set $activeSlave.lips = Math.clamp($activeSlave.lipsImplant+$activeSlave.buttImplant, 0, 100)>>
	<<else>>
		Slaves are not given breast, butt, or lip implants.
	<</if>>
	<<if $surgicalUpgradeGenitalia == "futanari">>
		Advanced surgical techniques are applied to turn the corporation's slaves into futanari.
		<<if ($activeSlave.dick == 0)>><<set $activeSlave.dick = 2>><</if>>
		<<if ($activeSlave.balls == 0)>><<set $activeSlave.balls = 2>><</if>>
		<<if ($activeSlave.vagina == 0)>><<set $activeSlave.vagina = 1>><</if>>
		<<if ($activeSlave.prostate == 0)>><<set $activeSlave.prostate = 1>><</if>>
		<<set $activeSlave.ovaries = 1>>
	<<elseif $surgicalUpgradeGenitalia == "gelded">>
		Slaves with balls have them removed, rendering them feminine and obedient.
		<<if ($activeSlave.balls != 0)>>
			<<set $activeSlave.balls = 0>>
			<<set $activeSlave.scrotum = 0>>
			<<set $activeSlave.dick = Math.clamp($activeSlave.dick-1, 1, 6)>>
			<<set $activeSlave.boobs += 100*random(2,4)>>
			<<set $activeSlave.butt += random(1,2)>>
			<<set $activeSlave.muscles = 0>>
			<<if ($activeSlave.faceShape == "masculine")>>
				<<set $activeSlave.faceShape = "androgynous">>
			<<elseif ($activeSlave.faceShape == "androgynous")>>
				<<set $activeSlave.faceShape = "normal">>
			<</if>>
			<<set $activeSlave.devotion += random(5,10)>>
			<<set $activeSlave.trust += random(5,10)>>
			<<set $activeSlave.attrXY = Math.clamp($activeSlave.attrXY+random(5,10), 0, 100)>>
		<</if>>
	<<elseif $surgicalUpgradeGenitalia == "fucknugget">>
		It removes slaves' limbs and mental abilities, making any training pointless.
	<<else>>
		No other surgery is applied.
	<</if>>
	<<if $drugUpgradeHormones == "XX">>
		It applies almost universal female hormone therapy.
		<<if ($activeSlave.dick > 0)>>
			<<set $activeSlave.dick = Math.clamp($activeSlave.dick-1, 1, 6)>>
		<</if>>
		<<if ($activeSlave.balls > 0)>>
			<<set $activeSlave.balls = Math.clamp($activeSlave.balls-1, 1, 6)>>
		<</if>>
		<<if ($activeSlave.clit > 0)>>
			<<set $activeSlave.clit = Math.clamp($activeSlave.clit-1, 0, 3)>>
		<</if>>
		<<if ($activeSlave.voice < 3) && ($activeSlave.voice > 0)>>
			<<set $activeSlave.voice = Math.clamp($activeSlave.voice+1, 1, 3)>>
		<</if>>
		<<if ($activeSlave.vagina > -1) && ($activeSlave.ovaries != 0) && ($activeSlave.vaginaLube < 2)>>
			<<set $activeSlave.vaginaLube = Math.clamp($activeSlave.vaginaLube+1, 0, 2)>>
		<</if>>
		<<if (($activeSlave.butt-$activeSlave.buttImplant) < 2)>>
			<<set $activeSlave.butt = Math.clamp($activeSlave.butt+1, 0, 10)>>
		<</if>>
		<<if (($activeSlave.boobs-$activeSlave.boobsImplant) < 500)>>
			<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs+400, 0, 10000)>>
		<</if>>
		<<if $activeSlave.face <= 95>>
			<<set $activeSlave.face = Math.clamp($activeSlave.face+20,-100,100)>>
		<</if>>
		<<if ($activeSlave.faceShape == "masculine")>>
			<<set $activeSlave.faceShape = "androgynous">>
		<<elseif ($activeSlave.faceShape == "androgynous")>>
			<<set $activeSlave.faceShape = "normal">>
		<</if>>
		<<if ($activeSlave.physicalAge < 25)>>
			<<set $activeSlave.shoulders = Math.clamp($activeSlave.shoulders-1, -2, 2)>>
			<<set $activeSlave.hips = Math.clamp($activeSlave.hips+1, -2, 2)>>
		<</if>>
		<<if ($activeSlave.muscles > 30) && ($activeSlave.diet != "muscle building") && ($generalUpgradeMuscle != "toned") && ($generalUpgradeMuscle != "ripped")>>
			<<set $activeSlave.muscles = Math.clamp($activeSlave.muscles-10, 0, 30)>>
		<</if>>
		<<if ($activeSlave.nipples == "tiny")>>
			<<set $activeSlave.nipples = "cute">>
		<</if>>
		<<if ($activeSlave.height > 180)>>
			<<set $activeSlave.height -= random(3,6)>>
		<</if>>
		<<set $activeSlave.devotion += random(5,10)>>
		<<set $activeSlave.trust += random(5,10)>>
		<<set $activeSlave.attrXY = Math.clamp($activeSlave.attrXY+random(5,10), 0, 100)>>
	<<elseif $drugUpgradeHormones == "XY">>
		It applies almost universal male hormone therapy.
		<<if ($activeSlave.dick > 0)>>
			<<set $activeSlave.dick = Math.clamp($activeSlave.dick+1, 1, 6)>>
		<</if>>
		<<if ($activeSlave.balls > 0)>>
			<<set $activeSlave.balls = Math.clamp($activeSlave.balls+1, 1, 6)>>
		<</if>>
		<<if ($activeSlave.clit > 0) && ($activeSlave.dick == 0)>>
			<<set $activeSlave.clit = Math.clamp($activeSlave.clit+1, 0, 3)>>
		<</if>>
		<<if ($activeSlave.voice > 1)>>
			<<set $activeSlave.voice = Math.clamp($activeSlave.voice-1, 1, 3)>>
		<</if>>
		<<if ($activeSlave.vagina > -1) && ($activeSlave.vaginaLube > 0)>>
			<<set $activeSlave.vaginaLube = Math.clamp($activeSlave.vaginaLube-1, 0, 2)>>
		<</if>>
		<<set $activeSlave.butt = Math.clamp($activeSlave.butt-1, 0, 10)>>
		<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs-400, 0, 10000)>>
		<<if $activeSlave.face > 10>>
			<<set $activeSlave.face = Math.clamp($activeSlave.face-20,-100,100)>>
		<</if>>
		<<if ($activeSlave.faceShape == "androgynous")>>
			<<set $activeSlave.faceShape = "masculine">>
		<<else>>
			<<set $activeSlave.faceShape = "androgynous">>
		<</if>>
		<<if ($activeSlave.physicalAge < 25)>>
			<<set $activeSlave.shoulders = Math.clamp($activeSlave.shoulders+1, -2, 2)>>
			<<set $activeSlave.hips = Math.clamp($activeSlave.hips-1, -2, 2)>>
		<</if>>
		<<if ($activeSlave.muscles <= 95) && ($activeSlave.diet != "slimming")>>
			<<set $activeSlave.muscles = Math.clamp($activeSlave.muscles+20, 0, 3)>>
		<</if>>
		<<if ($activeSlave.nipples == "huge")>>
			<<set $activeSlave.nipples = "cute">>
		<</if>>
		<<if ($activeSlave.height < 155)>>
			<<set $activeSlave.height += random(3,6)>>
		<</if>>
		<<set $activeSlave.devotion -= random(5,10)>>
		<<set $activeSlave.trust -= random(5,10)>>
		<<set $activeSlave.attrXX = Math.clamp($activeSlave.attrXX+random(5,10), 0, 100)>>
	<<else>>
		It does not use hormones on a systematic level.
	<</if>>
	<<if $drugUpgradeInjectionTwo == "supermassive">>
		Advanced growth hormones are applied on a grand scale.
		<<set $activeSlave.lips = Math.clamp($activeSlave.lips+50, 0, 85)>>
		<<set $activeSlave.butt = Math.clamp($activeSlave.butt+random(4,6), 0, 10)>>
		<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs+(100*random(40,60)), 0, 10000)>>
		<<set $activeSlave.nipples = either("huge", "inverted")>>
		<<if $activeSlave.dick > 0>>
			<<set $activeSlave.dick = Math.clamp($activeSlave.dick+random(3,5), 0, 6)>>
		<</if>>
		<<if $activeSlave.balls > 0>>
			<<set $activeSlave.balls = Math.clamp($activeSlave.balls+random(3,5), 0, 6)>>
		<</if>>
	<<elseif $drugUpgradeInjectionTwo == "pastoral">>
		Advanced growth hormones are applied with total focus on increasing slaves' productiveness.
		<<set $activeSlave.lips = Math.clamp($activeSlave.lips+20, 0, 85)>>
		<<set $activeSlave.butt = Math.clamp($activeSlave.butt+random(2,3), 0, 10)>>
		<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs+(100*random(60,80)), 0, 10000)>>
		<<set $activeSlave.nipples = either("huge", "inverted")>>
		<<set $activeSlave.lactation = 2>>
		<<if $activeSlave.dick > 0>>
			<<set $activeSlave.dick = Math.clamp($activeSlave.dick+random(6,8), 0, 10)>>
		<</if>>
		<<if $activeSlave.balls > 0>>
			<<set $activeSlave.balls = Math.clamp($activeSlave.balls+random(4,6), 0, 6)>>
		<</if>>
	<<elseif $drugUpgradeInjectionOne == "tasteful">>
		Growth hormones are used to correct flat chests and butts.
		<<set $activeSlave.lips = Math.clamp($activeSlave.lips+10, 15, 55)>>
		<<if $activeSlave.butt < 3>>
			<<set $activeSlave.butt = Math.clamp($activeSlave.butt+1, 3, 10)>>
		<</if>>
		<<if $activeSlave.boobs < 800>>
			<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs+200, 800, 10000)>>
		<</if>>
	<<elseif $drugUpgradeInjectionOne == "huge">>
		Growth hormones are used throughout slave training to ensure expansion.
		<<set $activeSlave.lips = Math.clamp($activeSlave.lips+20, 0, 55)>>
		<<set $activeSlave.butt = Math.clamp($activeSlave.butt+random(2,3), 0, 10)>>
		<<set $activeSlave.boobs = Math.clamp($activeSlave.boobs+(100*random(10,20)), 0, 10000)>>
		<<set $activeSlave.nipples = either("cute", "partially inverted")>>
		<<if $activeSlave.dick > 0>>
			<<set $activeSlave.dick = Math.clamp($activeSlave.dick+random(2,3), 0, 5)>>
		<</if>>
		<<if $activeSlave.balls > 0>>
			<<set $activeSlave.balls = Math.clamp($activeSlave.balls+random(2,3), 0, 5)>>
		<</if>>
	<<else>>
		Growth hormones are not applied.
	<</if>>

	<<if $surgicalUpgradeGenitalia == "fucknugget">>
		<<set $activeSlave.fetish = "mindbroken">>
		<<set $activeSlave.amp = 1>>
		<<set $activeSlave.fetishStrength = 10, $activeSlave.attrXY = 50, $activeSlave.attrXX = 50, $activeSlave.attrKnown = 1, $activeSlave.devotion = 40, $activeSlave.trust = -40, $activeSlave.vaginalSkill = 0, $activeSlave.oralSkill = 0, $activeSlave.analSkill = 0, $activeSlave.combatSkill = 0, $activeSlave.whoreSkill = 0, $activeSlave.entertainSkill = 0, $activeSlave.intelligence = -60, $activeSlave.intelligenceImplant = 0, $activeSlave.sexualFlaw = "none", $activeSlave.sexualQuirk = "none", $activeSlave.behavioralFlaw = "none", $activeSlave.behavioralQuirk = "none">>
	<</if>>

<<case "neighbor">>
	<<if ($numArcology < $arcologies.length) && ($numArcology > 0)>>
		<<set _market = $numArcology>>
	<<else>>
		<<set _market = 1>>
	<</if>>

	<<set $activeArcology = $arcologies[0]>>
	<<set $targetArcology = $arcologies[_market]>>
	<<include "Arcology Opinion">>
	<<set $opinion = Math.trunc($opinion/20)>>
	<<set $opinion = Math.clamp($opinion, -10, 10)>>

	<<if $arcologies[_market].FSSubjugationist > 20>>
		<<set $fixedRace = $arcologies[_market].FSSubjugationistRace>>
	<</if>>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from ">>
	<<set $activeSlave.origin += $arcologies[_market].name>>
	<<set $activeSlave.origin += ".">>
	<<set $activeSlave.devotion = -20 + Math.trunc($arcologies[_market].prosperity/10) + random(0,10)>>
	<<set $activeSlave.trust = -20 + Math.trunc($arcologies[_market].prosperity/10) + random(0,10)>>
	<<set $activeSlave.health = -50 + Math.trunc($arcologies[_market].prosperity/25) + random(0,5)>>
	<<if $activeSlave.vagina > 0>>
		<<set $activeSlave.vaginalSkill += Math.clamp($arcologies[_market].prosperity/2, 15, 100)>>
	<</if>>
	<<if $activeSlave.anus > 0>>
		<<set $activeSlave.analSkill += Math.clamp($arcologies[_market].prosperity/2, 15, 100)>>
	<</if>>
	<<set $activeSlave.oralSkill += Math.clamp($arcologies[_market].prosperity/2, 15, 100)>>
	<<set $activeSlave.attrKnown = 1>>
	<<set $activeSlave.fetishKnown = 1>>
	<<if $activeSlave.accent >= 3>>
		<<if $arcologies[_market].prosperity > random(0,200)>>
			<<set $activeSlave.accent -= 1>>
		<</if>>
	<</if>>
	<<if $arcologies[_market].prosperity > random(0,200)>>
		<<set $activeSlave.sexualFlaw = "none">>
	<</if>>
	<<if $arcologies[_market].prosperity > random(0,200)>>
		<<set $activeSlave.behavioralFlaw = "none">>
	<</if>>
	<<if $arcologies[_market].FSSubjugationist > 20>>
		They're universally $arcologies[_market].FSSubjugationistRace.
	<</if>>

	<<if $arcologies[_market].FSRepopulationFocus > 50>>
		They are exclusively female and all extremely pregnant.
		<<set $activeSlave.ovaries = 1>>
		<<set $activeSlave.vagina = random(0,1,1,1,1,2,2,3,3,3,3)>>
		<<set $activeSlave.dick = 0>>
		<<set $activeSlave.balls = 0>>
		<<set $activeSlave.scrotum = 0>>
		<<set $activeSlave.preg = 0>> /*removing contraception of default slave generation so isFertile can work right*/
		<<if isFertile($activeSlave)>>
			<<set $activeSlave.vagina = random(1,4)>>
			<<set $activeSlave.preg = random(21,39)>>
			<<if random(1,2) == 1 && $seeHyperPreg == 1>>
				<<set $activeSlave.pregType = random(3,29)>>
				<<set $activeSlave.pregAdaptation = 250>>
			<<else>>
				<<set $activeSlave.pregType = random(3,8)>>
				<<set $activeSlave.pregAdaptation = 100>>
			<</if>>
			<<run SetBellySize($activeSlave)>>
		<</if>>
		<<set $activeSlave.lactation = random(0,1)>>
	<<elseif $arcologies[_market].FSRestart > 50>>
		They have all been rendered unable to reproduce.
		<<if $activeSlave.ovaries == 1>>
			<<set $activeSlave.preg = -2, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0>>
		<</if>>
		<<if $activeSlave.balls > 0>>
			<<set $activeSlave.balls = 0>>
		<</if>>
		<<if $arcologies[_market].FSRestartResearch == 1>>
			Smart and attractive slaves are beginning to be a rarity lately.
			<<if $activeSlave.face >= 0>>
				<<set $activeSlave.face -= 100>>
			<</if>>
			<<if $activeSlave.intelligence >= 0>>
				<<set $activeSlave.intelligence -= 100>>
			<</if>>
			<<set $activeSlave.chem = random(40,100)>>
			<<set $activeSlave.addict = either(0,0,0,0,0,0,0,0,5,20,20,50,100)>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSGenderRadicalist > 50>>
		They all show signs of intensive hormone therapy.
		<<set $activeSlave.chem += random(10,100)>>
		<<if $activeSlave.dick > 0>>
			<<set $activeSlave.boobs += 100*random(0,4)>>
			<<set $activeSlave.butt += random(0,2)>>
			<<if $activeSlave.hips < 2>>
				<<set $activeSlave.hips += random(0,1)>>
			<</if>>
			<<if $activeSlave.shoulders > -2>>
				<<set $activeSlave.shoulders -= random(0,1)>>
			<</if>>
			<<if $activeSlave.face < 80>>
				<<set $activeSlave.face += random(0,20)>>
			<</if>>
			<<if $activeSlave.faceShape == "masculine">>
				<<if random(0,1) == 0>>
					<<set $activeSlave.faceShape = "androgynous">>
				<</if>>
			<</if>>
			<<if $activeSlave.dick > 2>>
				<<set $activeSlave.dick -= random(0,2)>>
			<</if>>
			<<if $activeSlave.balls > 2>>
				<<set $activeSlave.balls -= random(0,2)>>
			<</if>>
			<<if $arcologies[_market].FSGenderRadicalistResearch == 1 && random(1,100) <= 20>>
				This one has a notably rounded belly for a slave with no vagina.
				<<set $activeSlave.ovaries = 0>>
				<<set $activeSlave.vagina = -1>>
				<<set $activeSlave.mpreg = 1>>
				<<if isFertile($activeSlave)>>
					<<set $activeSlave.preg = random(1,39)>>
					<<set $activeSlave.pregType = setPregType($activeSlave)>>
					<<run SetBellySize($activeSlave)>>
				<</if>>
			<</if>>
		<<else>>
			<<set $activeSlave.boobs -= 100*random(0,2)>>
			<<set $activeSlave.butt -= random(0,1)>>
			<<if $activeSlave.hips > -2>>
				<<set $activeSlave.hips -= random(0,1)>>
			<</if>>
			<<if $activeSlave.shoulders < 2>>
				<<set $activeSlave.shoulders += random(0,1)>>
			<</if>>
			<<if $activeSlave.face >= -80>>
				<<set $activeSlave.face -= random(0,20)>>
			<</if>>
			<<if $activeSlave.faceShape != "androgynous">>
				<<if random(0,1) == 0>>
					<<set $activeSlave.faceShape = "androgynous">>
				<</if>>
			<</if>>
			<<set $activeSlave.clit += random(0,2)>>
			<<set $activeSlave.labia += random(0,1)>>
			<<if $activeSlave.muscles <= 95>>
				<<set $activeSlave.muscles += random(0,20)>>
			<</if>>
		<</if>>
	<<elseif $arcologies[_market].FSGenderFundamentalist > 50>>
		Fertile slaves from there almost never appear without swollen bellies and sensitive nipples.
		<<set $activeSlave.preg = 0>> /*removing contraception of default slave generation so isFertile can work right*/
		<<if isFertile($activeSlave)>>
			<<set $activeSlave.preg = random(1,40)>>
			<<set $activeSlave.pregType = setPregType($activeSlave)>>
			<<run SetBellySize($activeSlave)>>
			<<set $activeSlave.lactation = random(0,1)>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSPaternalist > 20>>
		They're often gratifyingly devoted and trusting.
		<<if $activeSlave.devotion < 10>>
			<<set $activeSlave.devotion += random(0,8)>>
		<</if>>
		<<if $activeSlave.trust < 50>>
			<<set $activeSlave.trust += random(0,8)>>
		<</if>>
	<<elseif $arcologies[_market].FSDegradationist > 20>>
		They can be depended upon to be terrified into abject submission.
		<<run DegradingName($activeSlave)>>
		<<if $activeSlave.trust > -10>>
			<<set $activeSlave.trust -= random(0,10)>>
		<</if>>
		<<if random (1,100) > 90>>
			<<set $activeSlave.eyes = -2>>
		<</if>>
		<<if random (1,100) > 90>>
			<<set $activeSlave.hears = -2>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSBodyPurist > 80>>
		They're quite pristine, free of any genomic damage or addictions regardless of any transformations they've had.
		<<set $activeSlave.chem = 0>>
		<<set $activeSlave.addict = 0>>
	<<elseif $arcologies[_market].FSTransformationFetishist > 80>>
		They vary in terms of what size their implants are, not whether they have them.
		<<set $activeSlave.chem += random(10,100)>>
		<<set $activeSlave.boobsImplant = 200*random(2,20)>>
		<<set $activeSlave.boobs += $activeSlave.boobsImplant>>
		<<set $activeSlave.buttImplant = random(2,5)>>
		<<set $activeSlave.butt += $activeSlave.buttImplant>>
		<<set $activeSlave.lipsImplant = either(10,20)>>
		<<set $activeSlave.lips += $activeSlave.lipsImplant>>
		<<if $arcologies[_market].FSTransformationFetishistResearch == 1 && random(1,100) <= 20>>
			This one's implants are unusually large; a showcase of what $his home arcology is capable of.
			<<set $activeSlave.boobsImplant += 200*random(100,200)>>
			<<set $activeSlave.boobs += $activeSlave.boobsImplant>>
			<<set $activeSlave.buttImplant += random(7,12)>>
			<<set $activeSlave.butt += $activeSlave.buttImplant>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSYouthPreferentialist > 20>>
		They're usually on the younger side.
		<<if $activeSlave.actualAge > 30>>
			<<if random(0,1) == 0>>
				<<set $activeSlave.actualAge = random(18,25)>>
				<<set $activeSlave.visualAge = $activeSlave.actualAge>>
				<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
				<<set $activeSlave.ovaryAge = $activeSlave.actualAge>>
				<<if $activeSlave.boobs > 400>>
					<<set $activeSlave.boobs -= 100*random(0,2)>>
				<</if>>
				<<if $activeSlave.butt > 3>>
					<<set $activeSlave.butt -= random(0,2)>>
				<</if>>
			<<elseif $arcologies[_market].FSYouthPreferentialistResearch == 1>>
				<<if $activeSlave.actualAge > 30>>
					Well, all of them certainly look it. Always best to check their ages before buying.
					<<set $activeSlave.visualAge = random(18,25)>>
					<<set $activeSlave.chem += random(10,40)>>
				<</if>>
			<<else>>
				And if they aren't, they sure don't look their age.
				<<set $activeSlave.ageImplant = 1, $activeSlave.faceImplant += random(10,30)>>
				<<AgeImplantAdjustment $activeSlave>>
			<</if>>
		<</if>>
	<<elseif $arcologies[_market].FSMaturityPreferentialist > 20>>
		They're usually on the more mature side.
		<<if $activeSlave.actualAge < 30>>
			<<if random(0,1) == 0>>
				<<set $activeSlave.actualAge = random(36,$retirementAge)>>
				<<set $activeSlave.visualAge = $activeSlave.actualAge>>
				<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
				<<set $activeSlave.ovaryAge = $activeSlave.actualAge>>
				<<if $activeSlave.boobs < 400>>
					<<set $activeSlave.boobs += 100*random(0,2)>>
				<</if>>
				<<if $activeSlave.butt < 3>>
					<<set $activeSlave.butt += random(0,2)>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSSlimnessEnthusiast > 20>>
		They're never overweight, and are often quite lithe.
		<<if $activeSlave.boobs > 400>>
			<<set $activeSlave.boobs -= 100*random(0,2)>>
		<</if>>
		<<if $activeSlave.butt > 3>>
			<<set $activeSlave.butt -= random(0,2)>>
		<</if>>
		<<if $activeSlave.weight > 10>>
			<<set $activeSlave.weight = random(-30,0)>>
		<</if>>
		<<if $arcologies[_market].FSSlimnessEnthusiastResearch == 1 && random(1,100) <= 50>>
			This one is perfectly flat; an ideal showcase of $his home arcology's tastes.
			<<set $activeSlave.boobs = 100>>
			<<set $activeSlave.butt = 0>>
			<<set $activeSlave.weight = random(-30,0)>>
		<</if>>
	<<elseif $arcologies[_market].FSAssetExpansionist > 20>>
		Their butts are usually imposing, but their tits are what's often most impressive.
		<<set $activeSlave.chem += random(10,100)>>
		<<if $activeSlave.boobs < 5000>>
			<<set $activeSlave.boobs += 100*random(5,50)>>
		<</if>>
		<<if $activeSlave.butt < 6>>
			<<set $activeSlave.butt += random(2,4)>>
		<</if>>
		<<if $activeSlave.weight < -10>>
			<<set $activeSlave.weight += random(0,20)>>
		<</if>>
		<<if $arcologies[_market].FSAssetExpansionistResearch == 1 && random(1,100) <= 20>>
			This one is unusually large; a showcase of what $his home arcology is capable of.
			<<set $activeSlave.boobs = 200*random(100,200)>>
			<<set $activeSlave.butt = random(10,20)>>
			<<if $activeSlave.dick > 0 && $seeDicks != 0>>
				<<set $activeSlave.dick = random(20,30)>>
				<<set $activeSlave.balls = random(20,125)>>
			<</if>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSPhysicalIdealist > 20>>
		They're usually quite muscular, some to a truly imposing degree, and they're almost never unhealthy.
		<<set $activeSlave.muscles = random(10,100)>>
		<<if $activeSlave.health < 20>>
			<<set $activeSlave.health += random(0,8)>>
		<</if>>
	<<elseif $arcologies[_market].FSHedonisticDecadence > 20>>
		<<if $arcologies[_market].FSSlimnessEnthusiast > 20>>
			They're quite soft, usually sporting a cute muffin top, and rather laid back.
			<<set $activeSlave.weight = random(10,25)>>
		<<else>>
			They're usually very soft and rather laid back.
			<<set $activeSlave.weight = random(30,180)>>
		<</if>>
		Though they often come with intense fetishes.
		<<set $activeSlave.muscles = random(-50,0)>>
		<<set $activeSlave.trust += random(5,15)>>
		<<set $activeSlave.energy += random(0,10)>>
		<<if $arcologies[_market].FSHedonisticDecadenceResearch == 1>>
			They appear to have greatly enjoyed their stay at $arcologies[_market].name.
			<<set $activeSlave.energy += random(0,10), $activeSlave.trust += random(10,20), $activeSlave.devotion += random(10,20)>>
		<</if>>
		<<if random(0,3) == 0>>
			<<set $activeSlave.behavioralFlaw = "gluttonous">>
		<</if>>
		<<if $activeSlave.fetish == "none">>
			<<set $activeSlave.fetish = either("submissive", "cumslut", "humiliation", "buttslut", "boobs", "pregnancy", "dom", "sadist", "masochist")>>
		<</if>>
		<<set $activeSlave.fetishStrength = random(60,90)>>
		<<if random(1,100) <= 5 && $activeSlave.fetish != "mindbroken">>
			<<switch $activeSlave.fetish>>
			<<case "submissive">>
				<<set $activeSlave.sexualFlaw = "neglectful">>
			<<case "cumslut">>
				<<set $activeSlave.sexualFlaw = "cum addict">>
			<<case "humiliation">>
				<<set $activeSlave.sexualFlaw = "attention whore">>
			<<case "buttslut">>
				<<set $activeSlave.sexualFlaw = "anal addict">>
			<<case "boobs">>
				<<set $activeSlave.sexualFlaw = "breast growth">>
			<<case "pregnancy">>
				<<set $activeSlave.sexualFlaw = "breeder">>
			<<case "dom">>
				<<set $activeSlave.sexualFlaw = "abusive">>
			<<case "sadist">>
				<<set $activeSlave.sexualFlaw = "malicious">>
			<<case "masochist">>
				<<set $activeSlave.sexualFlaw = "self hating">>
			<</switch>>
			<<set $activeSlave.fetishStrength = 100>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSPastoralist > 20>>
		Lactation is nearly universal among them, sometimes in ludicrous quantities. They tend to have huge udders, as well.
		<<set $activeSlave.chem += random(10,100)>>
		<<if $activeSlave.boobs < 5000>>
			<<set $activeSlave.boobs += 100*random(5,50)>>
		<</if>>
		<<if $activeSlave.lactation == 0>>
			<<set $activeSlave.lactation = either(0,1,1,1,1,2)>>
		<</if>>
		<<if $activeSlave.weight < -10>>
			<<set $activeSlave.weight += random(0,20)>>
		<</if>>
	<<elseif $arcologies[_market].FSCummunism > 20>>
		Big balls and huge loads are commonplace among them, even if they sometimes lack dicks. They tend to be hard workers, as well.
		<<set $activeSlave.chem += random(10,100)>>
		<<if $arcologies[_market].FSRestart > 50>>
			<<set $activeSlave.dick = 0, $activeSlave.vagina = -1>>
		<</if>>
		<<if $activeSlave.balls < 20>>
			<<set $activeSlave.balls += random(5,20)>>
		<</if>>
		<<set $activeSlave.scrotum = $activeSlave.balls-5>>
		<<set $activeSlave.prostate = either(1,1,1,2,2,3)>>
		<<if $activeSlave.muscles < 30>>
			<<set $activeSlave.muscles += random(0,20)>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSChattelReligionist > 20>>
		They're rarely anything but devoted, and sometimes present interesting peccadilloes.
		<<set $activeSlave.slaveName = setup.chattelReligionistSlaveNames.random()>>
		<<if $activeSlave.devotion < 10>>
			<<set $activeSlave.devotion += random(0,10)>>
		<</if>>
		<<if $activeSlave.devotion < 10>>
			<<set $activeSlave.devotion += random(0,10)>>
		<</if>>
		<<if random(0,1) == 0>>
			<<set $activeSlave.behavioralQuirk = "sinful">>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSRomanRevivalist > 20>>
		They've often seen things that drive any squeamishness out of them.
		<<set $activeSlave.slaveName = setup.romanSlaveNames.random()>>
		<<if random(0,1) == 0>>
			<<set $activeSlave.sexualQuirk = "unflinching">>
		<</if>>
	<<elseif $arcologies[_market].FSAztecRevivalist > 20>>
		They've seen sights that will traumatize almost anyone.
		<<set $activeSlave.slaveName = setup.aztecSlaveNames.random()>>
		<<if random(0,1) == 0>>
			<<set $activeSlave.trust = -30>>
		<</if>>
	<<elseif $arcologies[_market].FSEgyptianRevivalist > 20>>
		They've often done things that give them a distinct appetite for perversion.
		<<set $activeSlave.slaveName = setup.ancientEgyptianSlaveNames.random()>>
		<<if random(0,1) == 0>>
			<<set $activeSlave.sexualQuirk = "perverted">>
		<</if>>
	<<elseif $arcologies[_market].FSEdoRevivalist > 20>>
		They have frequently absorbed much culture there.
		<<set $activeSlave.slaveName = setup.edoSlaveNames.random()>>
		<<set $activeSlave.entertainSkill = Math.clamp($activeSlave.entertainSkill, 35, 100)>>
	<<elseif $arcologies[_market].FSArabianRevivalist > 20>>
		They've often been part of large harems in which selflessness is prized.
		<<if random(0,1) == 0>>
			<<set $activeSlave.sexualQuirk = "caring">>
		<</if>>
	<<elseif $arcologies[_market].FSChineseRevivalist > 20>>
		They've all passed through a thorough and uncompromising educational system for slaves.
		<<set $activeSlave.intelligenceImplant = 10>>
		<<if $activeSlave.intelligence < 60>>
			<<set $activeSlave.intelligence += random(0,20)>>
		<</if>>
	<</if>>

	<<if $arcologies[_market].FSIncestFetishist > 20>>
		Incest is acceptable, if not preferable to them.
		<<if $activeSlave.sexualQuirk == "none" && $activeSlave.behavioralQuirk == "none">>
			<<if random(0,1) == 0>>
				<<set $activeSlave.sexualQuirk = "perverted">>
			<<else>>
				<<set $activeSlave.behavioralQuirk = "sinful">>
			<</if>>
		<<elseif $activeSlave.sexualQuirk == "none" || $activeSlave.sexualQuirk == "perverted">>
			<<set $activeSlave.sexualQuirk = "perverted">>
		<<else>>
			<<set $activeSlave.behavioralQuirk = "sinful">>
		<</if>>
	<</if>>

	<<if ($arcologies[0].FSDegradationist != "unset") && ($arcologies[_market].FSPaternalist != "unset")>>
		<<set $activeSlave.devotion = random(-90,-60)>>
		<<set $activeSlave.trust = -20>>
		'' $arcologies[_market].name'' is Paternalist, and your arcology is Degradationist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a literal Hell on Earth.
	<<elseif ($arcologies[0].FSDegradationist != "unset") && ($arcologies[_market].FSPaternalist != "unset")>>
		<<set $activeSlave.devotion = random(60,90)>>
		<<set $activeSlave.trust = 20>>
		'' $arcologies[_market].name'' is Degradationist, and your arcology is Paternalist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a promised land.
	<<elseif $opinion != 0>>
		<<set $activeSlave.devotion += $opinion>>
		<<set $activeSlave.trust += $opinion>>
		<<set $activeSlave.devotion = Math.clamp($activeSlave.devotion, -100, 75)>>
		<<set $activeSlave.trust = Math.clamp($activeSlave.trust, -100, 75)>>
		<<if $opinion > 2>>
			Your arcology's close social alignment with '' $arcologies[_market].name'' makes its slaves more accepting of the prospect of life in your arcology, and willing to trust that they'll know how to survive there.
		<<elseif $opinion < -2>>
			Your arcology's very different culture from '' $arcologies[_market].name'''s makes its slaves unhappy with the prospect of life in your arcology, and afraid of what will happen to them there.
		<</if>>
	<</if>>

<<case "heap">>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from a body dump, completely broken.">>
	<<set $activeSlave.devotion = 0>>
	<<set $activeSlave.trust = 0>>
	<<set $activeSlave.career = "a slave">>
	<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-100,0]})>>
	<<set $activeSlave.intelligenceImplant = 0>>
	<<set $activeSlave.health = random(-99,0)>>
	<<set $activeSlave.weight = random(-100,0)>>
	<<set $activeSlave.eyes = either(-2, -1, -1, -1, -1, 1, 1, 1)>>
	<<set $activeSlave.hears = either(-2, -1, -1, -1, -1, 0, 0, 0)>>
	<<if $seeExtreme == 1>>
		<<set $activeSlave.amp = either(0, 0, 0, 0, 0, 0, 1, 1, 1)>>
	<</if>>
	<<if $activeSlave.amp != 1>>
		<<set $activeSlave.heels = either(0, 0, 0, 0, 0, 1, 1)>>
	<</if>>
	<<set $activeSlave.voice = random(0,2)>>
	<<set $activeSlave.face = random(-100,20)>>
	<<if $activeSlave.vagina > -1>>
		<<set $activeSlave.vagina = either(1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 10)>>
		<<set $activeSlave.preg = random(-3,-1)>>
		<<set $activeSlave.belly = 0, $activeSlave.bellyPreg = 0>>
		<<set $activeSlave.vaginalCount += random(0,300)>>
	<</if>>
	<<set $activeSlave.anus = either(1, 2, 2, 3, 3, 3, 3, 4, 4, 4)>>
	<<if $activeSlave.balls > 1>>
		<<if random(1,100) > 50>>
			<<set $activeSlave.balls = 0>>
		<</if>>
	<</if>>
	<<set $activeSlave.oralCount += random(0,300)>>
	<<set $activeSlave.analCount += random(0,300)>>
	<<if $activeSlave.boobs > 500>>
		<<set $activeSlave.mammaryCount += random(0,300)>>
	<</if>>
	<<set $activeSlave.vaginalSkill = 0>>
	<<set $activeSlave.oralSkill = 0>>
	<<set $activeSlave.analSkill = 0>>
	<<set $activeSlave.whoreSkill = 0>>
	<<set $activeSlave.entertainSkill = 0>>
	<<set $activeSlave.combatSkill = 0>>
	<<set $activeSlave.addict = either(0, 0, 0, 10, 10, 20, 30)>>
	<<set $activeSlave.chem = random(0,1000)>>
	<<set $activeSlave.behavioralFlaw = "none">>
	<<set $activeSlave.behavioralQuirk = "none">>
	<<set $activeSlave.sexualFlaw = "none">>
	<<set $activeSlave.sexualQuirk = "none">>
	<<set $activeSlave.fetish = "mindbroken">>
	<<set $activeSlave.fetishStrength = 0>>

<<case "wetware">>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from a wetware CPU farm, her body ruined but her mind subjected to a simulated career.">>
	<<set $activeSlave.nationality = "Stateless">>
	<<set $activeSlave.devotion = 40>>
	<<set $activeSlave.trust = -100>>
	<<set $activeSlave.career = either("a politician", "a college scout", "a business owner", "a house DJ", "a soldier", "a prison guard", "a doctor", "a counselor", "a dairy worker", "a secretary", "a teacher")>>
	<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [20,100]})>>
	<<set $activeSlave.intelligenceImplant = 30>>
	<<set $activeSlave.health = random(-99,-50)>>
	<<set $activeSlave.weight = random(-100,-50)>>
	<<set $activeSlave.muscles = random(-100,-50)>>
	<<set $activeSlave.eyes = -2>>
	<<set $activeSlave.hears = -2>>
	<<if $seeExtreme == 1>>
		<<set $activeSlave.amp = 1>>
	<</if>>
	<<if $activeSlave.amp != 1>>
		<<set $activeSlave.heels = 1>>
	<</if>>
	<<set $activeSlave.voice = 0>>
	<<set $activeSlave.face = random(-100,-50)>>
	<<set $activeSlave.butt = 0>>
	<<if $activeSlave.vagina > -1>>
		<<set $activeSlave.vagina = either(1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 10)>>
		<<set $activeSlave.preg = random(-3,-1)>>
		<<set $activeSlave.vaginalCount += random(0,300)>>
	<</if>>
	<<set $activeSlave.anus = either(1, 2, 2, 3, 3, 3, 3, 4, 4, 4)>>
	<<if $activeSlave.balls > 1 && random(1,100) > 50>>
		<<set $activeSlave.balls = 0>>
	<</if>>
	<<set $activeSlave.oralCount += random(0,300)>>
	<<set $activeSlave.analCount += random(0,300)>>
	<<if $activeSlave.boobs > 500>>
		<<set $activeSlave.mammaryCount += random(0,300)>>
	<</if>>
	<<set $activeSlave.vaginalSkill = random(50,100)>>
	<<set $activeSlave.oralSkill = random(50,100)>>
	<<set $activeSlave.analSkill = random(50,100)>>
	<<set $activeSlave.whoreSkill = random(50,100)>>
	<<set $activeSlave.entertainSkill = random(50,100)>>
	<<switch $activeSlave.career>>
		<<case "a lawyer">>
			<<set $activeSlave.slaveName = "WCPU-HG">>
		<<case "a college scout">>
			<<set $activeSlave.slaveName = "WCPU-RC">>
		<<case "a business owner">>
			<<set $activeSlave.slaveName = "WCPU-MD">>
		<<case "a house DJ">>
			<<set $activeSlave.slaveName = "WCPU-DJ">>
		<<case "a soldier">>
			<<set $activeSlave.slaveName = "WCPU-BG">>
		<<case "a prison guard">>
			<<set $activeSlave.slaveName = "WCPU-WD">>
		<<case "a doctor">>
			<<set $activeSlave.slaveName = "WCPU-NS">>
		<<case "a counselor">>
			<<set $activeSlave.slaveName = "WCPU-AT">>
		<<case "a dairy worker">>
			<<set $activeSlave.slaveName = "WCPU-MK">>
		<<case "a secretary">>
			<<set $activeSlave.slaveName = "WCPU-ST">>
		<<case "a teacher">>
			<<set $activeSlave.slaveName = "WCPU-TE">>
	<</switch>>
	<<set $activeSlave.slaveSurname = "#"+$activeSlave.vaginalSkill+$activeSlave.oralSkill+$activeSlave.analSkill+$activeSlave.whoreSkill+$activeSlave.entertainSkill+"-"+$activeSlave.intelligence>>
	<<set $activeSlave.birthName = "", $activeSlave.birthSurname = "">>
	<<if $activeSlave.career == "a soldier">>
		<<set $activeSlave.combatSkill = 1>>
	<<else>>
		<<set $activeSlave.combatSkill = 0>>
	<</if>>
	<<set $activeSlave.addict = either(0, 0, 0, 10, 10, 20, 30)>>
	<<set $activeSlave.chem = random(500,1000)>>
	<<set $activeSlave.behavioralFlaw = "none">>
	<<set $activeSlave.behavioralQuirk = "none">>
	<<set $activeSlave.sexualFlaw = "none">>
	<<set $activeSlave.sexualQuirk = "none">>
	<<set $activeSlave.fetish = "none">>
	<<set $activeSlave.fetishStrength = 0>>

<<case "kidnappers">>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from the kidnappers' slave market, so she was probably forced into slavery.">>
	<<set $activeSlave.devotion -= 5>>
	<<set $activeSlave.trust = random(-45,-25)>>
	<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-90,45]})>>
	<<set $activeSlave.health = random(-80,20)>>
	<<if $activeSlave.vagina > 1 && isFertile($activeSlave)>>
		<<set $activeSlave.preg = either(-2, -1, -1, -1, -1, -1, -1, -1, 1, 20, 40)>>
		<<if $activeSlave.preg > 0>>
			<<set $activeSlave.pregType = setPregType($activeSlave)>>
		<</if>>
		<<run SetBellySize($activeSlave)>>
	<</if>>

<<case "indentures">>
	<<set $oneTimeDisableDisability = 1>>
	<<if $arcologies[0].FSSupremacistLawME == 1>><<set $fixedRace = $arcologies[0].FSSupremacistRace>><</if>>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You purchased her indenture contract, making her yours for as long as it lasts.">>
	<<set $activeSlave.indentureRestrictions = either(0,1,1,2,2,2,2)>>
	<<if $activeSlave.indentureRestrictions >= 2>>
		<<set $activeSlave.devotion = random(25,45)>>
		<<set $activeSlave.trust = random(-20,20)>>
	<<elseif $activeSlave.indentureRestrictions == 1>>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(-45,-25)>>
	<<else>>
		<<set $activeSlave.devotion = random(-45,-25)>>
		<<set $activeSlave.trust = random(-75,-60)>>
	<</if>>
	<<set $activeSlave.indenture = either(26, 52, 104, 156, 208)>>

<<case "hunters">>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from the runaway hunters' slave market after they recaptured her and her original owner did not pay their fee.">>
	<<set $activeSlave.devotion = -20>>
	<<set $activeSlave.trust = random(-15,15)>>
	<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [0,100]})>>
	<<set $activeSlave.intelligenceImplant = 15>>
	<<if $activeSlave.physicalAge >= 12>>
		<<set $activeSlave.teeth = "normal">>
	<</if>>
	<<set $activeSlave.health = random(-10,70)>>
	<<if $activeSlave.vagina > -1>>
		<<set $activeSlave.preg = either(-2, -1, -1, -1, -1, -1, -1, -1, 1, 1)>>
		<<if $activeSlave.physicalAge < $activeSlave.pubertyAgeXX>><<set $activeSlave.preg = -1>><</if>>
		<<if $activeSlave.preg > 0>>
			<<set $activeSlave.pregType = setPregType($activeSlave)>>
		<</if>>
		<<run SetBellySize($activeSlave)>>
		<<set $activeSlave.vaginalSkill = random(15,100)>>
		<<set $activeSlave.vagina = random(1,3)>>
	<</if>>
	<<if $activeSlave.balls > 0>>
	<<if random(1,3) == 1>>
		<<set $activeSlave.balls = 0>>
	<</if>>
	<</if>>
	<<set $activeSlave.combatSkill = either(0, 0, 0, 0, 0, 1)>>
	<<set $activeSlave.entertainSkill = random(15,100)>>
	<<set $activeSlave.whoreSkill = random(15,100)>>
	<<set $activeSlave.oralSkill = random(15,100)>>
	<<set $activeSlave.analSkill = random(15,100)>>
	<<set $activeSlave.anus = random(1,3)>>
	<<set $activeSlave.weight = Math.clamp(-25, 25, $activeSlave.weight)>>
	<<set $activeSlave.behavioralFlaw = either("arrogant", "bitchy", "odd", "hates men", "hates women", "hates women", "anorexic", "gluttonous", "devout", "liberated")>>
	<<set $activeSlave.sexualFlaw = either("hates oral", "hates anal", "hates penetration", "repressed", "idealistic", "shamefast", "apathetic", "crude", "judgemental")>>
	<<if random(1,2) == 1>>
		<<set _slaveGen = random(2,8)*200>>
		<<set $activeSlave.boobs += _slaveGen>>
		<<set $activeSlave.boobsImplant += _slaveGen>>
		<<set _slaveGen = random(1,3)>>
		<<set $activeSlave.butt += _slaveGen>>
		<<set $activeSlave.buttImplant += _slaveGen>>
		<<set _slaveGen = either(10,20)>>
		<<set $activeSlave.lips += _slaveGen>>
		<<set $activeSlave.lipsImplant += _slaveGen>>
		<<set $activeSlave.waist = Math.trunc($activeSlave.waist,-100,15)>>
		<<if $activeSlave.face < 40>>
			<<set $activeSlave.faceImplant = 20*random(0,1)>>
			<<set $activeSlave.face = Math.clamp($activeSlave.face+$activeSlave.faceImplant,-100,100)>>
		<</if>>
		<<if $activeSlave.physicalAge >= 30>>
			<<set $activeSlave.ageImplant += random(0,1)>>
			<<if $activeSlave.ageImplant == 1>>
				<<AgeImplantAdjustment $activeSlave>>
			<</if>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSPaternalistSMR == 0>>
		<<set $activeSlave.heels = 1>>
	<</if>>

<<case "underage raiders">>
	<<set $activeSlaveOneTimeMinAge = $minimumSlaveAge>>
	<<set $activeSlaveOneTimeMaxAge = $fertilityAge>>
	<<set $one_time_age_overrides_pedo_mode = 1>> /% Must not have had their first period. %/
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from the underage raiders' slave market.">>
	<<set $activeSlave.trust -= 25>>
	<<set $activeSlave.health += 20>>
	<<set $activeSlave.career = setup.veryYoungCareers.random()>>
	<<set $activeSlave.birthWeek = 0>>
	<<if $activeSlave.vagina != -1>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.vagina = 0>>
		<<set $activeSlave.trueVirgin = 1>>
		<<set $activeSlave.preg = 0>>
		<<run SetBellySize($activeSlave)>>
	<</if>>
	<<set $activeSlave.analSkill = 0>>
	<<set $activeSlave.anus = 0>>
	<<set $activeSlave.oralSkill = 0>>
	<<set $activeSlave.whoreSkill = 0>>

<<case "raiders">>
	<<set $activeSlaveOneTimeMinAge = 18>>
	<<set $activeSlaveOneTimeMaxAge = 18>>
	<<set $one_time_age_overrides_pedo_mode = 1>> /% Supposed to have just reached the age of majority. %/
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from the girl raiders' slave market the week she reached her majority.">>
	<<set $activeSlave.trust -= 25>>
	<<set $activeSlave.health += 20>>
	<<set $activeSlave.career = either("a student", "a student", "a student", "a student", "a student", "a party girl", "a cheerleader", "a farm laborer")>>
	<<set $activeSlave.birthWeek = 0>>
	<<if $activeSlave.vagina != -1>>
		<<if random(1,2) == 1>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.vagina = 0>>
		<<set $activeSlave.trueVirgin = 1>>
		<<set $activeSlave.preg = 0>>
		<<run SetBellySize($activeSlave)>>
		<</if>>
	<</if>>
	<<if random(1,2) == 1>>
		<<set $activeSlave.analSkill = 0>>
		<<set $activeSlave.anus = 0>>
	<</if>>
	<<if random(1,2) == 1>>
		<<set $activeSlave.oralSkill = 0>>
	<</if>>
	<<set $activeSlave.whoreSkill = 0>>

<<case "trainers">>
	<<set $activeSlaveOneTimeMaxAge = 42>>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought her from the trainers' slave market after they put her through basic training.">>
	<<set $activeSlave.devotion += 40>>
	<<set $activeSlave.trust += 40>>
	<<set $activeSlave.health += 30>>
	<<if $activeSlave.vagina != -1>>
		<<set $activeSlave.vaginalSkill += 15>>
	<<else>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.clit = 0>>
	<</if>>
	<<if $activeSlave.vagina == 0>>
		<<set $activeSlave.vagina += 1>>
	<</if>>
	<<if $activeSlave.anus == 0>>
		<<set $activeSlave.anus += 1>>
	<</if>>
	<<set $activeSlave.oralSkill += 15>>
	<<set $activeSlave.analSkill += 15>>
	<<set $activeSlave.fetishKnown = 1>>
	<<if $activeSlave.accent >= 3>>
		<<set $activeSlave.accent -= 1>>
	<</if>>
	<<if random(1,100) > 50>>
		<<set $activeSlave.sexualFlaw = "none">>
	<</if>>
	<<if random(1,100) > 50>>
		<<set $activeSlave.behavioralFlaw = "none">>
	<</if>>

<<case "TSS">>
	<<if $TSS.schoolUpgrade == 1>>
		<<set $activeSlaveOneTimeMinAge = 36>>
	<<else>>
		<<set $activeSlaveOneTimeMaxAge = 18>>
	<</if>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XX Slave">>
	<<set $activeSlave.career = "a slave">>
	<<set $activeSlave.butt = either(1, 2, 2, 3)>>
	<<set $activeSlave.boobs = either(200, 300, 300, 400)>>
	<<if $TSS.schoolUpgrade == 1>>
		<<set $activeSlave.origin = "You bought her fresh from the new Slavegirl School after she was retrained as a slave girl.">>
		<<set $activeSlave.butt += 1>>
		<<set $activeSlave.boobs += 200>>
		<<set $activeSlave.anus = 1>>
		<<set $activeSlave.vagina = 1>>
	<<else>>
		<<set $activeSlave.origin = "You bought her fresh from the Slavegirl School right after her majority.">>
		<<set $activeSlave.anus = 0>>
		<<set $activeSlave.vagina = 0>>
		<<set $activeSlave.trueVirgin = 1>>
		<<set $activeSlave.birthWeek = 0>>
	<</if>>
	<<set $activeSlave.intelligenceImplant = 30>>
	<<if $activeSlave.physicalAge >= 12>>
		<<set $activeSlave.teeth = "normal">>
	<</if>>
	<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-20,70]})>>
	<<set $activeSlave.devotion = random(25,45)>>
	<<set $activeSlave.trust = random(25,45)>>
	<<set $activeSlave.health = random(50,60)>>
	<<set $activeSlave.preg = 0>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.weight = 0>>
	<<set $activeSlave.waist = random(-30,10)>>
	<<set $activeSlave.chem = 20>>
	<<if $TSS.schoolUpgrade == 0>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.oralSkill = 0>>
		<<set $activeSlave.analSkill = 0>>
		<<set $activeSlave.whoreSkill = 0>>
		<<set $activeSlave.entertainSkill = 15>>
	<<else>>
		<<set $activeSlave.vaginalSkill = 15>>
		<<set $activeSlave.oralSkill = 15>>
		<<set $activeSlave.analSkill = 15>>
		<<set $activeSlave.whoreSkill = 15>>
		<<set $activeSlave.entertainSkill = 15>>
	<</if>>
	<<set $activeSlave.combatSkill = 0>>
	<<set $activeSlave.pubicHStyle = "waxed">>
	<<set $activeSlave.underArmHStyle = "waxed">>
	<<set $activeSlave.sexualFlaw = either("none")>>
	<<set $activeSlave.behavioralFlaw = either("none")>>
	<<set $activeSlave.hStyle = "tails">>
	<<set $activeSlave.customTat = "She has the simple logo of the corporation that operates The Slavegirl School tattooed on her left cheek.">>

<<case "GRI">>
	<<set $activeSlaveOneTimeMinAge = 16>>
	<<set $activeSlaveOneTimeMaxAge = 19>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XX Slave">>
	<<set $activeSlave.origin = "You bought her from the Growth Research Institute right after her use as a test subject ended.">>
	<<set $activeSlave.career = "a slave">>
	<<set $activeSlave.intelligenceImplant = 0>>
	<<set $activeSlave.devotion = random(-15,-5)>>
	<<set $activeSlave.trust = random(-25,-45)>>
	<<set $activeSlave.chem = 100>>
	<<if $GRI.schoolUpgrade == 1>>
		<<set $activeSlave.health = 200>>
	<<else>>
		<<set $activeSlave.health = random(-80,100)>>
	<</if>>
	<<set $activeSlave.height = random(160,210)>>
	<<set $activeSlave.butt = random(4,10)>>
	<<if $GRI.schoolUpgrade == 2>>
		<<set $activeSlave.boobs = 200*random(15,30)>>
		<<set $activeSlave.lactation = 2>>
	<<else>>
		<<set $activeSlave.boobs = 200*random(4,20)>>
	<</if>>
	<<set $activeSlave.nipples = either("inverted", "huge")>>
	<<set $activeSlave.areolae = either(0, 1, 2, 3)>>
	<<set $activeSlave.clit = either(0, 1, 2, 3)>>
	<<set $activeSlave.lips = random(5,85)>>
	<<set $activeSlave.anus = 0>>
	<<set $activeSlave.vagina = 0>>
	<<set $activeSlave.preg = 0>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.weight = 0>>
	<<set $activeSlave.waist = random(-20,30)>>
	<<set $activeSlave.vaginalSkill = 0>>
	<<set $activeSlave.oralSkill = 0>>
	<<set $activeSlave.analSkill = 0>>
	<<set $activeSlave.whoreSkill = 0>>
	<<set $activeSlave.entertainSkill = 0>>
	<<set $activeSlave.combatSkill = 0>>
	<<set $activeSlave.pubicHStyle = "waxed">>
	<<set $activeSlave.birthWeek = 0>>
	<<set $activeSlave.behavioralFlaw = either("odd")>>
	<<set $activeSlave.hStyle = "shaved">>
	<<set $activeSlave.hLength = 0>>
	<<set $activeSlave.customTat = "She has a barcode that identified her when she was a test subject at the Growth Research Institute tattooed on her left cheek.">>

<<case "SCP">>
	<<set $activeSlaveOneTimeMinAge = 16>>
	<<set $activeSlaveOneTimeMaxAge = 19>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XX Slave">>
	<<set $activeSlave.origin = "You bought her from St. Claver Preparatory after she served as a plastic surgeon's passing final exam.">>
	<<set $activeSlave.chem = 20>>
	<<set $activeSlave.career = "a slave">>
	<<if $SCP.schoolUpgrade == 1>>
		<<set $activeSlave.intelligenceImplant = 0>>
		<<set $activeSlave.intelligence = -60>>
		<<set $activeSlave.devotion = 100>>
		<<set $activeSlave.trust = 100>>
	<<else>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.teeth = "normal">>
		<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-30,60]})>>
		<<set $activeSlave.devotion = random(25,45)>>
		<<set $activeSlave.trust = random(25,45)>>
	<</if>>
	<<set $activeSlave.health = 100>>
	<<set $activeSlave.heightImplant = 1>>
	<<set $activeSlave.height += 10>>
	<<set $activeSlave.buttImplant = (4-$activeSlave.butt)>>
	<<set $activeSlave.butt += $activeSlave.buttImplant>>
	<<set $activeSlave.boobsImplant = (2000-$activeSlave.boobs)>>
	<<set $activeSlave.boobs += $activeSlave.boobsImplant>>
	<<set $activeSlave.nipples = "tiny">>
	<<set $activeSlave.areolae = 0>>
	<<set $activeSlave.clit = 0>>
	<<set $activeSlave.lipsImplant = (20-$activeSlave.lips)>>
	<<set $activeSlave.lips += $activeSlave.lipsImplant>>
	<<set $activeSlave.faceImplant = 40>>
	<<set $activeSlave.face = Math.clamp($activeSlave.face+$activeSlave.faceImplant,-100,100)>>
	<<set $activeSlave.faceShape = "normal">>
	<<set $activeSlave.anus = 0>>
	<<set $activeSlave.vagina = 0>>
	<<set $activeSlave.preg = 0>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.weight = -20>>
	<<set $activeSlave.waist = -50>>
	<<if $SCP.schoolUpgrade == 2>>
		<<set $activeSlave.vaginalSkill = 15>>
		<<set $activeSlave.oralSkill = 15>>
		<<set $activeSlave.analSkill = 15>>
		<<set $activeSlave.whoreSkill = 15>>
		<<set $activeSlave.entertainSkill = 15>>
	<<else>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.oralSkill = 0>>
		<<set $activeSlave.analSkill = 0>>
		<<set $activeSlave.whoreSkill = 0>>
		<<set $activeSlave.entertainSkill = 0>>
	<</if>>
	<<set $activeSlave.combatSkill = 0>>
	<<set $activeSlave.pubicHStyle = "waxed">>
	<<set $activeSlave.underArmHStyle = "waxed">>
	<<set $activeSlave.birthWeek = 0>>
	<<set $activeSlave.sexualFlaw = either("none")>>
	<<set $activeSlave.behavioralFlaw = either("none")>>
	<<set $activeSlave.hStyle = "tails">>
	<<set $activeSlave.pubicHColor = "blonde">>
	<<set $activeSlave.underArmHColor = "blonde">>
	<<set $activeSlave.eyebrowHColor = "blonde">>
	<<set $activeSlave.race = "white">>
	<<set $activeSlave.skin = "tanned">>
	<<set $activeSlave.override_H_Color = 1>>
	<<set $activeSlave.override_Arm_H_Color = 1>>
	<<set $activeSlave.override_Pubic_H_Color = 1>>
	<<set $activeSlave.override_Brow_H_Color = 1>>
	<<set $activeSlave.override_Race = 1>>
	<<set $activeSlave.override_Skin = 1>>
	<<set $activeSlave.customTat = "She has the coat of arms of St. Claver Preparatory tattooed on her left cheek.">>

<<case "LDE">>
	<<set $activeSlaveOneTimeMinAge = 16>>
	<<set $activeSlaveOneTimeMaxAge = 19>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XY Slave">>
	<<set $activeSlave.origin = "You bought her from the innovative École des Enculées right after her graduation.">>
	<<set $activeSlave.career = "a slave">>
	<<set $activeSlave.intelligenceImplant = 0>>
	<<set $activeSlave.chem = 100>>
	<<if $LDE.schoolUpgrade == 1>>
		<<set $activeSlave.devotion = 100>>
		<<set $activeSlave.trust = 100>>
	<<else>>
		<<set $activeSlave.devotion = random(60,75)>>
		<<set $activeSlave.trust = random(55,60)>>
	<</if>>
	<<set $activeSlave.health = random(60,80)>>
	<<set $activeSlave.muscles = 0>>
	<<set $activeSlave.butt = either(4,5)>>
	<<set $activeSlave.face = random(15,55)>>
	<<set $activeSlave.faceShape = "androgynous">>
	<<set $activeSlave.boobs = either(500,650,800)>>
	<<set $activeSlave.waist = -15>>
	<<set $activeSlave.lips = 35>>
	<<if $LDE.schoolUpgrade == 2>>
		<<set $activeSlave.dick = either(3,4)>>
		<<set $activeSlave.balls = either(3,4)>>
		<<if $activeSlave.foreskin > 0>><<set $activeSlave.foreskin = $activeSlave.dick>><</if>>
		<<if $activeSlave.balls > 0>><<set $activeSlave.scrotum = $activeSlave.balls>><</if>>
	<<else>>
		<<set $activeSlave.dick = either(1,1,1,2)>>
		<<set $activeSlave.balls = either(1,1,1,2)>>
		<<if $activeSlave.foreskin > 0>><<set $activeSlave.foreskin = $activeSlave.dick>><</if>>
		<<if $activeSlave.balls > 0>><<set $activeSlave.scrotum = $activeSlave.balls>><</if>>
		<<set $activeSlave.pubertyXY = 0>>
		<<set $activeSlave.pubertyAgeXY = random(24,50)>>
	<</if>>
	<<set $activeSlave.anus = 2>>
	<<set $activeSlave.vagina = -1>>
	<<set $activeSlave.preg = 0>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.weight = random(0,20)>>
	<<set $activeSlave.vaginalSkill = 0>>
	<<set $activeSlave.oralSkill = 15>>
	<<set $activeSlave.analSkill = 100>>
	<<set $activeSlave.whoreSkill = 15>>
	<<set $activeSlave.entertainSkill = 15>>
	<<set $activeSlave.combatSkill = 0>>
	<<set $activeSlave.pubicHStyle = "waxed">>
	<<set $activeSlave.birthWeek = 0>>
	<<set $activeSlave.sexualFlaw = "none">>
	<<set $activeSlave.behavioralFlaw = either("none", "odd")>>
	<<set $activeSlave.fetishStrength = either(1, 2)>>
	<<set $activeSlave.fetish = "buttslut">>
	<<set $activeSlave.fetishKnown = 1>><<set $activeSlave.attrKnown = 1>>
	<<set $activeSlave.hStyle = "tails">>
	<<set $activeSlave.hLength = 100>>
	<<set $activeSlave.customTat = "She has the buttock-shaped symbol of the École des Enculées that created her tattooed on her left cheek.">>

<<case "TGA">>
	<<set $activeSlaveOneTimeMinAge = 16>>
	<<set $activeSlaveOneTimeMaxAge = 19>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XY Slave">>
	<<set $activeSlave.origin = "You bought her fresh from the intense Gymnasium-Academy right after her majority.">>
	<<set $activeSlave.career = "a slave">>
	<<set $activeSlave.intelligenceImplant = 30>>
	<<set $activeSlave.teeth = "normal">>
	<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-20,60]})>>
	<<set $activeSlave.chem = 20>>
	<<if $TGA.schoolUpgrade == 1>>
		<<set $activeSlave.devotion = 100>>
		<<set $activeSlave.trust = 100>>
	<<else>>
		<<set $activeSlave.devotion = random(25,45)>>
		<<set $activeSlave.trust = random(25,45)>>
	<</if>>
	<<set $activeSlave.health = 100>>
	<<set $activeSlave.muscles = either(20, 50, 50)>>
	<<set $activeSlave.butt = either(2, 2, 3)>>
	<<set $activeSlave.boobs = either(100, 200)>>
	<<set $activeSlave.dick = random(3,5)>>
	<<set $activeSlave.balls = random(3,5)>>
	<<set $activeSlave.anus = 0>>
	<<set $activeSlave.vagina = -1>>
	<<set $activeSlave.preg = 0>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.weight = 0>>
	<<set $activeSlave.waist = random(-10,30)>>
	<<set $activeSlave.vaginalSkill = 0>>
	<<set $activeSlave.oralSkill = 0>>
	<<set $activeSlave.analSkill = 0>>
	<<set $activeSlave.whoreSkill = 0>>
	<<set $activeSlave.entertainSkill = 0>>
	<<if $TGA.schoolUpgrade == 2>>
		<<set $activeSlave.combatSkill = 1>>
	<<else>>
		<<set $activeSlave.combatSkill = 0>>
	<</if>>
	<<set $activeSlave.pubicHStyle = "waxed">>
	<<set $activeSlave.underArmHStyle = "waxed">>
	<<set $activeSlave.birthWeek = 0>>
	<<set $activeSlave.sexualFlaw = either("none", "apathetic")>>
	<<set $activeSlave.behavioralFlaw = either("none", "arrogant", "odd")>>
	<<set $activeSlave.hStyle = "short">>
	<<set $activeSlave.hLength = 2>>
	<<set $activeSlave.customTat = "She has the baroque crest of the Gymnasium-Academy that trained her branded into her left cheek.">>

<<case "TCR">>
	<<if $TCR.schoolUpgrade == 2 && random(1,100) <= 20>>
		<<set $activeSlaveOneTimeMinAge = $fertilityAge>>
		<<set $activeSlaveOneTimeMaxAge = 18>>
		<<set $one_time_age_overrides_pedo_mode = 1>>
		<<set $oneTimeDisableDisability = 1>>
		<<include "Generate XX Slave">>
		<<set $activeSlave.origin = "You bought her from The Cattle Ranch.">>
		<<set $activeSlave.career = "a dairy slave">>
		<<set $activeSlave.slaveName = setup.cowSlaveNames.random()>>
		<<set $activeSlave.slaveSurname = 0>>
		<<set $activeSlave.butt = either(2, 2, 3, 3, 3, 4, 4)>>
		<<set $activeSlave.boobs = (($activeSlave.physicalAge*100)*2)+either(-100, -100, 0, 0, 100, 100, 200, 200, 300, 500)>>
		<<set $activeSlave.lactation = 0>>
		<<set $activeSlave.lactationAdaptation = 0>>
		<<set $activeSlave.anus = 0>>
		<<set $activeSlave.vagina = 0>>
		<<set $activeSlave.trueVirgin = 1>>
		<<set $activeSlave.vaginaLube = either(1, 1, 2)>>
		<<set $activeSlave.intelligenceImplant = 0>>
		<<set $activeSlave.devotion = -20>>
		<<set $activeSlave.trust = -20>>
		<<set $activeSlave.health = random(20,30)>>
		<<set $activeSlave.preg = 0>>
		<<run SetBellySize($activeSlave)>>
		<<set $activeSlave.hips = either(0, 0, 1, 1, 1, 2)>>
		<<set $activeSlave.weight = random(-20,10)>>
		<<set $activeSlave.waist = random(-30,10)>>
		<<set $activeSlave.muscles = 0>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.oralSkill = 0>>
		<<set $activeSlave.analSkill = 0>>
		<<set $activeSlave.whoreSkill = 0>>
		<<set $activeSlave.entertainSkill = 0>>
		<<set $activeSlave.combatSkill = 0>>
		<<set $activeSlave.pubicHStyle = "waxed">>
		<<set $activeSlave.underArmHStyle = "waxed">>
		<<set $activeSlave.heels = 1>>
		<<set $activeSlave.hStyle = "neat">>
		<<set $activeSlave.collar = "leather with cowbell">>
		<<set $activeSlave.customTat = "She has the logo of the Cattle Ranch branded on her thigh.">>
	<<elseif $TCR.schoolUpgrade == 1 && random(1,100) <= 20>>
		<<set $activeSlaveOneTimeMinAge = $potencyAge+1>>
		<<set $activeSlaveOneTimeMaxAge = 24>>
		<<set $one_time_age_overrides_pedo_mode = 1>>
		<<set $oneTimeDisableDisability = 1>>
		<<include "Generate XY Slave">>
		<<set $activeSlave.slaveName = setup.cowSlaveNames.random()>>
		<<set $activeSlave.slaveSurname = 0>>
		<<set $activeSlave.origin = "You bought her from The Cattle Ranch.">>
		<<set $activeSlave.career = "a breeding bull">>
		<<set $activeSlave.butt = either(3, 3, 4, 4, 4, 5, 6)>>
		<<set $activeSlave.boobs = 100>>
		<<set $activeSlave.anus = 0>>
		<<set $activeSlave.intelligence = -100>>
		<<set $activeSlave.intelligenceImplant = 0>>
		<<set $activeSlave.devotion = 100>>
		<<set $activeSlave.trust = 100>>
		<<set $activeSlave.health = random(20,30)>>
		<<set $activeSlave.hips = either(1, 1, 1, 2, 2)>>
		<<set $activeSlave.dick = 6>>
		<<set $activeSlave.foreskin = 0>>
		<<set $activeSlave.balls = random(19,30)>>
		<<set $activeSlave.scrotum = 10>>
		<<set $activeSlave.prostate = 2>>
		<<set $activeSlave.weight = random(10,30)>>
		<<set $activeSlave.waist = random(0,100)>>
		<<set $activeSlave.muscles = random(80,100)>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.oralSkill = 0>>
		<<set $activeSlave.analSkill = 0>>
		<<set $activeSlave.whoreSkill = 0>>
		<<set $activeSlave.entertainSkill = 0>>
		<<set $activeSlave.combatSkill = 0>>
		<<set $activeSlave.pubicHStyle = "waxed">>
		<<set $activeSlave.underArmHStyle = "waxed">>
		<<set $activeSlave.heels = 1>>
		<<set $activeSlave.energy = 100>>
		<<set $activeSlave.fetish = "mindbroken">>
		<<set $activeSlave.fetishStrength = 10>>
		<<set $activeSlave.fetishKnown = 1>>
		<<set $activeSlave.sexualFlaw = either("none")>>
		<<set $activeSlave.behavioralFlaw = either("none")>>
		<<set $activeSlave.sexualQuirk = either("none")>>
		<<set $activeSlave.behavioralQuirk = either("none")>>
		<<set $activeSlave.hStyle = "neat">>
		<<set $activeSlave.customTat = "She has the logo of the Cattle Ranch branded on her thigh.">>
	<<else>>
		<<set $activeSlaveOneTimeMinAge = 19>>
		<<set $activeSlaveOneTimeMaxAge = 24>>
		<<set $one_time_age_overrides_pedo_mode = 1>>
		<<set $oneTimeDisableDisability = 1>>
		<<include "Generate XX Slave">>
		<<set $activeSlave.slaveName = setup.cowSlaveNames.random()>>
		<<set $activeSlave.slaveSurname = 0>>
		<<set $activeSlave.origin = "You bought her from The Cattle Ranch.">>
		<<set $activeSlave.career = "a dairy cow">>
		<<set $activeSlave.butt = either(3, 3, 4, 4, 4, 5, 6)>>
		<<set $activeSlave.boobs = (($activeSlave.physicalAge*100)*2)+either(-100, -100, 0, 0, 100, 100, 200, 200, 300, 500)>>
		<<set $activeSlave.lactation = 1>>
		<<set $activeSlave.lactationAdaptation = 100>>
		<<set $activeSlave.anus = 1>>
		<<set $activeSlave.vagina = 3>>
		<<set $activeSlave.vaginaLube = 2>>
		<<set $activeSlave.intelligence = either(-100, -100, -100, -100, -60, -60, -30)>>
		<<set $activeSlave.intelligenceImplant = 0>>
		<<set $activeSlave.devotion = 100>>
		<<set $activeSlave.trust = 100>>
		<<set $activeSlave.health = random(20,30)>>
		<<set $activeSlave.preg = random(10,40)>>
		<<set $activeSlave.pregType = random(1,5)>>
		<<run SetBellySize($activeSlave)>>
		<<set $activeSlave.bellySag = 2>>
		<<set $activeSlave.bellySagPreg = 2>>
		<<set $activeSlave.hips = either(1, 1, 1, 2, 2)>>
		<<set $activeSlave.birthsTotal = random(1,7)>>
		<<set $activeSlave.pregAdaptation = 120>>
		<<set $activeSlave.weight = random(20,90)>>
		<<set $activeSlave.waist = random(-10,50)>>
		<<set $activeSlave.muscles = random(60,80)>>
		<<set $activeSlave.chem = 0>>
		<<set $activeSlave.vaginalSkill = 0>>
		<<set $activeSlave.oralSkill = 0>>
		<<set $activeSlave.analSkill = 0>>
		<<set $activeSlave.whoreSkill = 0>>
		<<set $activeSlave.entertainSkill = 0>>
		<<set $activeSlave.combatSkill = 0>>
		<<set $activeSlave.pubicHStyle = "waxed">>
		<<set $activeSlave.underArmHStyle = "waxed">>
		<<set $activeSlave.heels = 1>>
		<<set $activeSlave.fetish = "mindbroken">>
		<<set $activeSlave.fetishStrength = 10>>
		<<set $activeSlave.fetishKnown = 1>>
		<<set $activeSlave.sexualFlaw = either("none")>>
		<<set $activeSlave.behavioralFlaw = either("none")>>
		<<set $activeSlave.sexualQuirk = either("none")>>
		<<set $activeSlave.behavioralQuirk = either("none")>>
		<<set $activeSlave.hStyle = "neat">>
		<<set $activeSlave.collar = "leather with cowbell">>
		<<set $activeSlave.customTat = "She has the logo of the Cattle Ranch branded on her thigh.">>
	<</if>>

<<case "TFS">>
	<<set $activeSlaveOneTimeMinAge = 25>>
	<<set $activeSlaveOneTimeMaxAge = 29>>
	<<set $one_time_age_overrides_pedo_mode = 1>>
	<<set $oneTimeDisableDisability = 1>>
	<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
		<<include "Generate New Slave">>
	<<else>>
		<<include "Generate XY Slave">>
	<</if>>
	<<set $activeSlave.origin = "You bought her from the enigmatic Futanari Sisters after they sold her into slavery.">>
	<<set $activeSlave.career = "a Futanari Sister">>
	<<set $activeSlave.faceShape = either("sensual", "exotic")>>
	<<set _sisterAge = random(1,5)>>
	<<if _sisterAge == 1>>
		<<set $activeSlave.intelligence = -60>>
		<<set $activeSlave.hips = 0>>
		<<set $activeSlave.face = either(35,35,35,75,100)>>
		<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
			<<if $activeSlave.genes == "XY">>
				<<set $activeSlave.balls = 6>>
				<<set $activeSlave.scrotum = $activeSlave.balls>>
			<<else>>
				<<set $activeSlave.balls = 1>>
				<<set $activeSlave.scrotum = 0>>
			<</if>>
		<<elseif $TFS.schoolUpgrade == 1>>
			<<set $activeSlave.balls = 1>>
			<<set $activeSlave.scrotum = 0>>
		<<elseif $TFS.schoolUpgrade == 2>>
			<<set $activeSlave.balls = 6>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<<else>>
			<<set $activeSlave.balls = random(2,3)>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<</if>>
		<<set $activeSlave.lips = 10>>
		<<set $activeSlave.weight = 0>>
		<<set $activeSlave.waist = random(-30,10)>>
		<<set $activeSlave.actualAge = random(19,24)>>
		<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
		<<set $activeSlave.visualAge = $activeSlave.actualAge>>
		<<set $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<set $activeSlave.vagina = 2>>
		<<set $activeSlave.anus = 2>>
		<<set $activeSlave.fetish = "submissive">>
	<<elseif _sisterAge == 2>>
		<<set $activeSlave.intelligence = -30>>
		<<set $activeSlave.hips = 1>>
		<<set $activeSlave.face = either(35,35,35,75,100)>>
		<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
			<<if $activeSlave.genes == "XY">>
				<<set $activeSlave.balls = 7>>
				<<set $activeSlave.scrotum = $activeSlave.balls>>
			<<else>>
				<<set $activeSlave.balls = 1>>
				<<set $activeSlave.scrotum = 0>>
			<</if>>
		<<elseif $TFS.schoolUpgrade == 1>>
			<<set $activeSlave.balls = 1>>
			<<set $activeSlave.scrotum = 0>>
		<<elseif $TFS.schoolUpgrade == 2>>
			<<set $activeSlave.balls = 6>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<<else>>
			<<set $activeSlave.balls = random(2,3)>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<</if>>
		<<set $activeSlave.lips = 0>>
		<<set $activeSlave.weight = 0>>
		<<set $activeSlave.waist = random(-30,10)>>
		<<set $activeSlave.vagina = 2>>
		<<set $activeSlave.anus = 2>>
		<<set $activeSlave.fetish = either("submissive", "buttslut", "cumslut")>>
	<<elseif _sisterAge == 3>>
		<<set $activeSlave.intelligence = 0>>
		<<set $activeSlave.hips = 2>>
		<<set $activeSlave.face = either(35,35,75,75,100)>>
		<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
			<<if $activeSlave.genes == "XY">>
				<<set $activeSlave.balls = 8>>
				<<set $activeSlave.scrotum = $activeSlave.balls>>
			<<else>>
				<<set $activeSlave.balls = 1>>
				<<set $activeSlave.scrotum = 0>>
			<</if>>
		<<elseif $TFS.schoolUpgrade == 1>>
			<<set $activeSlave.balls = 1>>
			<<set $activeSlave.scrotum = 0>>
		<<elseif $TFS.schoolUpgrade == 2>>
			<<set $activeSlave.balls = 6>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<<else>>
			<<set $activeSlave.balls = random(3,4)>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<</if>>
		<<set $activeSlave.lips = random(15,25)>>
		<<set $activeSlave.weight = 20>>
		<<set $activeSlave.waist = random(-30,20)>>
		<<set $activeSlave.actualAge = random(30,34)>>
		<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
		<<set $activeSlave.visualAge = $activeSlave.actualAge>>
		<<set $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<set $activeSlave.vagina = 2>>
		<<set $activeSlave.anus = 2>>
		<<set $activeSlave.fetish = either("buttslut", "cumslut")>>
	<<elseif _sisterAge == 4>>
		<<set $activeSlave.intelligence = 30>>
		<<set $activeSlave.hips = 2>>
		<<set $activeSlave.face = either(35,75,75,100,100)>>
		<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
			<<if $activeSlave.genes == "XY">>
				<<set $activeSlave.balls = 9>>
				<<set $activeSlave.scrotum = $activeSlave.balls>>
			<<else>>
				<<set $activeSlave.balls = 1>>
				<<set $activeSlave.scrotum = 0>>
			<</if>>
		<<elseif $TFS.schoolUpgrade == 1>>
			<<set $activeSlave.balls = 1>>
			<<set $activeSlave.scrotum = 0>>
		<<elseif $TFS.schoolUpgrade == 2>>
			<<set $activeSlave.balls = 6>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<<else>>
			<<set $activeSlave.balls = random(4,5)>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<</if>>
		<<set $activeSlave.lips = random(25,55)>>
		<<set $activeSlave.weight = 20>>
		<<set $activeSlave.waist = random(-30,20)>>
		<<set $activeSlave.actualAge = random(35,39)>>
		<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
		<<set $activeSlave.visualAge = $activeSlave.actualAge>>
		<<set $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<set $activeSlave.vagina = 3>>
		<<set $activeSlave.anus = 3>>
		<<set $activeSlave.fetish = either("buttslut", "cumslut", "dom")>>
	<<else>>
		<<set $activeSlave.intelligence = 60>>
		<<set $activeSlave.hips = 2>>
		<<set $activeSlave.face = either(35,75,100,100,100)>>
		<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
			<<if $activeSlave.genes == "XY">>
				<<set $activeSlave.balls = 10>>
				<<set $activeSlave.scrotum = $activeSlave.balls>>
			<<else>>
				<<set $activeSlave.balls = 1>>
				<<set $activeSlave.scrotum = 0>>
			<</if>>
		<<elseif $TFS.schoolUpgrade == 1>>
			<<set $activeSlave.balls = 1>>
			<<set $activeSlave.scrotum = 0>>
		<<elseif $TFS.schoolUpgrade == 2>>
			<<set $activeSlave.balls = 6>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<<else>>
			<<set $activeSlave.balls = random(5,6)>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
		<</if>>
		<<set $activeSlave.lips = random(25,55)>>
		<<set $activeSlave.weight = 50>>
		<<set $activeSlave.waist = random(-50,20)>>
		<<set $activeSlave.actualAge = random(40,42)>>
		<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
		<<set $activeSlave.visualAge = $activeSlave.actualAge>>
		<<set $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<set $activeSlave.vagina = 3>>
		<<set $activeSlave.anus = 3>>
		<<set $activeSlave.fetish = "dom">>
	<</if>>
	<<set $activeSlave.chem = 100+(_sisterAge*50)>>
	<<set $activeSlave.butt = _sisterAge+random(2,4)>>
	<<set $activeSlave.boobs = 50*((10*_sisterAge)+random(10,20))>>
	<<set $activeSlave.dick = _sisterAge+random(1,2)>>
	<<if $activeSlave.foreskin > 0>><<set $activeSlave.foreskin = $activeSlave.dick>><</if>>
	<<set $activeSlave.preg = -3>>
	<<if $TFS.farmUpgrade > 0>>
		<<set $activeSlave.ovaries = 1>>
		<<set $activeSlave.preg = -1>>
		<<if $TFS.farmUpgrade >= 2>>
			<<if $week - $TFS.farmUpgradeAsked < 35>>
				<<set $activeSlave.preg = random(1,($week - $TFS.farmUpgradeAsked))>>
			<<else>>
				<<set $activeSlave.preg = random(1,40)>>
			<</if>>
			<<if $TFS.farmUpgrade == 3>>
				<<set $activeSlave.pregType = random(20,40)>>
				<<set $activeSlave.pregAdaptation = 500>>
			<<else>>
				<<set $activeSlave.pregType = 1>>
			<</if>>
			<<set $activeSlave.pregWeek = $activeSlave.preg>>
		<</if>>
	<</if>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.intelligenceImplant = 30>>
	<<set $activeSlave.teeth = "normal">>
	<<if $TFS.schoolUpgrade == 2>>
		<<set $activeSlave.energy = 100>>
	<<else>>
		<<set $activeSlave.energy = $activeSlave.physicalAge+random(20,30)>>
	<</if>>
	<<set $activeSlave.devotion = random(30,40)>>
	<<set $activeSlave.trust = random(60,75)>>
	<<set $activeSlave.health = random(60,80)>>
	<<set $activeSlave.muscles = 20>>
	<<if $activeSlave.genes == "XY">>
		<<set $activeSlave.shoulders = 1>>
	<</if>>
	<<set $activeSlave.vaginalSkill = 100>>
	<<set $activeSlave.oralSkill = 100>>
	<<set $activeSlave.analSkill = 100>>
	<<set $activeSlave.whoreSkill = 15>>
	<<set $activeSlave.entertainSkill = 100>>
	<<set $activeSlave.combatSkill = 0>>
	<<set $activeSlave.pubicHStyle = "waxed">>
	<<set $activeSlave.underArmHStyle = "waxed">>
	<<if $TFS.schoolUpgrade == 1>>
		<<set $activeSlave.sexualQuirk = "caring">>
	<</if>>
	<<set $activeSlave.sexualFlaw = either("none", "hates women")>>
	<<set $activeSlave.behavioralFlaw = either("none", "arrogant")>>
	<<set $activeSlave.fetishStrength = 100>>
	<<set $activeSlave.fetishKnown = 0>>
	<<set $activeSlave.attrKnown = 0>>
	<<set $activeSlave.hStyle = "neat">>
	<<set $activeSlave.hLength = 150>>
	<<set $activeSlave.customTat = "She has a simple pink heart tattooed on her right temple.">>
	<<set $activeSlave.trueVirgin = 1>>

<<case "HA">>
	<<set $activeSlaveOneTimeMinAge = 22>>
	<<set $activeSlaveOneTimeMaxAge = 26>>
	<<set $one_time_age_overrides_pedo_mode = 1>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XX Slave">>
	<<set $activeSlave.origin = "You bought her from the prestigious Hippolyta Academy.">>
	<<set $activeSlave.career = "a bodyguard">>
	<<set $activeSlave.intelligenceImplant = 30>>
	<<set $activeSlave.faceShape = either("cute", "normal")>>
	<<set $activeSlave.face = either(35,35,35,50,75,100)>>
	<<set $activeSlave.lips = random(0,25)>>
	<<set $activeSlave.actualAge = random(20,25)>>
	<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
	<<set $activeSlave.visualAge = $activeSlave.actualAge>>
	<<set $activeSlave.ovaryAge = $activeSlave.actualAge>>
	<<set $activeSlave.hips = 0>>
	<<set $activeSlave.vagina = random(0,1)>>
	<<set $activeSlave.anus = random(0,1)>>
	<<set $activeSlave.fetish = "none">>
	<<set $activeSlave.chem = 10 * random(1,3)>>
	<<set $activeSlave.butt = random(2,4)>>
	<<set $activeSlave.boobs = random(3,6) * 100>>
	<<set $activeSlave.preg = 0>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.teeth = "normal">>
	<<set $activeSlave.devotion = random(60,75)>>
	<<set $activeSlave.trust = random(60,75)>>
	<<set $activeSlave.health = random(60,80)>>
	<<set _minHeight = random(170,180)>>
	<<if $HA.schoolUpgrade == 2>>
		<<set $activeSlave.height = Math.trunc(Math.clamp(Height.random($activeSlave, {limitMult: [2, 15], spread: .1}),_minHeight, 274))>>
		<<set $activeSlave.muscles = random(40,80)>>
	<<else>>
		<<set $activeSlave.height = Math.trunc(Math.clamp(Height.random($activeSlave, {limitMult: [1, 4]}),_minHeight, 274))>>
		<<set $activeSlave.muscles = random(20,40)>>
	<</if>>
	<<if $HA.schoolUpgrade == 3>>
		<<set $activeSlave.weight = either(10,20,20,30,30,40,40,50)>>
		<<set $activeSlave.waist = random(-10,40)>>
	<<else>>
		<<set $activeSlave.weight = -10>>
		<<set $activeSlave.waist = random(-20,10)>>
	<</if>>
	<<set $activeSlave.shoulders = 0>>
	<<if $HA.schoolUpgrade == 1>>
		<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [20,70]})>>
		<<set $activeSlave.vaginalSkill = either(20,20,40)>>
		<<set $activeSlave.oralSkill = either(20,20,40)>>
		<<set $activeSlave.analSkill = either(20,20,40)>>
		<<set $activeSlave.whoreSkill = either(20,20,40)>>
		<<set $activeSlave.entertainSkill = either(60,80,80,100)>>
	<<else>>
		<<set $activeSlave.intelligence = random(0,20)>>
		<<set $activeSlave.vaginalSkill = 10>>
		<<set $activeSlave.oralSkill = 10>>
		<<set $activeSlave.analSkill = 10>>
		<<set $activeSlave.whoreSkill = 10>>
		<<set $activeSlave.entertainSkill = either(20,40,40,60)>>
	<</if>>
	<<set $activeSlave.combatSkill = 1>>
	<<set $activeSlave.pubicHStyle = "waxed">>
	<<set $activeSlave.underArmHStyle = "waxed">>
	<<set $activeSlave.sexualQuirk = either("none", "none", "caring", "unflinching")>>
	<<set $activeSlave.sexualFlaw = either("none", "none", "apathetic", "judgemental")>>
	<<set $activeSlave.behavioralFlaw = either("none", "arrogant")>>
	<<set $activeSlave.behavioralQuirk = either("none", "none", "fitness", "confident")>>
	<<set $activeSlave.fetishStrength = 0>>
	<<set $activeSlave.fetishKnown = 0>>
	<<set $activeSlave.attrKnown = 0>>
	<<set $activeSlave.hStyle = either("neat", "braided", "tails", "ponytail", "bun")>>
	<<set $activeSlave.hLength = random(5,50)>>
	<<set $activeSlave.clothes = "a nice maid outfit">>
	<<set $activeSlave.customTat = "She has the sword and eagle symbol of the Hippolyta Academy tattooed on her left shoulder.">>

<<case "gangs and smugglers">>
	<<if $pedo_mode == 1>>
		<<set $activeSlaveOneTimeMinAge = 6>>
		<<set $activeSlaveOneTimeMaxAge = 18>>
		<<set $one_time_age_overrides_pedo_mode = 1>>
	<<else>>
		<<set $activeSlaveOneTimeMinAge = 16>>
		<<if $retirementAge > 56>>
			<<set $activeSlaveOneTimeMaxAge = 55>>
		<<else>>
			<<set $activeSlaveOneTimeMaxAge = $retirementAge-2>>
		<</if>>
	<</if>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XY Slave">>

	<<set _criminal = setup.gangCriminalPool.random()>>

	<<switch _criminal>>
	<<case "mule">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for smuggling illegal contraband inside her body.">>
		<<set $prisonCrime = "is incarcerated for being a willing drug mule.">>
		<<set $activeSlave.career = "a drug mule">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(-100,-25)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(-100, -100, -60, -60, -60, -30, -30)>>
		<<set $activeSlave.health = random(-80,20)>>
		<<set $activeSlave.anus = 4>>
		<<set $activeSlave.chem = 10 * random(1,3)>>
		<<set $activeSlave.addict = 100>>
	<<case "arms smuggler">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for smuggling arms to forces antagonistic to the Free Cities.">>
		<<set $prisonCrime = "is incarcerated for being an arms dealer.">>
		<<set $activeSlave.career = "an arms dealer">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(-60,25)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(0,60)>>
		<<set $activeSlave.health = random(-20,20)>>
		<<set $activeSlave.weight = random(-30,10)>>
		<<set $activeSlave.waist = random(-10,50)>>
		<<set $activeSlave.muscles = random(10,40)>>
	<<case "drug smuggler">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for smuggling drugs into the Free City.">>
		<<set $prisonCrime = "is incarcerated for smuggling drugs.">>
		<<set $activeSlave.career = "a drug smuggler">>
		<<set $activeSlave.devotion = random(-60,-20)>>
		<<set $activeSlave.trust = random(-60,40)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-60,60)>>
		<<set $activeSlave.health = random(-20,20)>>
	<<case "smuggler">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for smuggling goods into the Free City.">>
		<<set $prisonCrime = "is incarcerated for smuggling goods.">>
		<<set $activeSlave.career = "a smuggler">>
		<<set $activeSlave.devotion = random(-80,-20)>>
		<<set $activeSlave.trust = random(-100,40)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(0,60)>>
		<<set $activeSlave.health = random(-20,40)>>
		<<set $activeSlave.muscles = random(10,40)>>
	<<case "fence">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for dealing in stolen goods.">>
		<<set $prisonCrime = "is incarcerated for buying and selling stolen goods.">>
		<<set $activeSlave.career = "a fence">>
		<<set $activeSlave.devotion = random(-100,-20)>>
		<<set $activeSlave.trust = random(-20,40)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-60,30)>>
		<<set $activeSlave.health = random(-20,60)>>
	<<case "gang murderer">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for gang related murder.">>
		<<set $prisonCrime = "is incarcerated for gang related murders.">>
		<<set $activeSlave.career = "a gang member">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(0,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(-30, -20, 0, 0, 20, 40, 60)>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
		<<set $activeSlave.health = random(-20,20)>>
		<<set $activeSlave.muscles = random(20,80)>>
		<<set $activeSlave.chem = 10 * random(1,3)>>
		<<set $activeSlave.customTat = "The prominent emblem of a local gang spans the length of his shoulders.">>
		<<set $activeSlave.combatSkill = 1>>
	<<case "gang assaulter">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for gang related extortion of local businesses.">>
		<<set $prisonCrime = "is incarcerated for gang related activities.">>
		<<set $activeSlave.career = "a gang member">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(0,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-100,0)>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
		<<set $activeSlave.health = random(-20,20)>>
		<<set $activeSlave.muscles = random(40,80)>>
		<<set $activeSlave.weight = random(-30,10)>>
		<<set $activeSlave.waist = random(10,50)>>
		<<set $activeSlave.chem = 10 * random(1,3)>>
		<<set $activeSlave.customTat = "The prominent emblem of a local gang spans the length of his shoulders.">>
		<<set $activeSlave.combatSkill = 1>>
	<<case "gang bruiser">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for a gang related beating of a local businessman.">>
		<<set $prisonCrime = "is incarcerated for gang related activities.">>
		<<set $activeSlave.career = "a gang member">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(0,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-100,0)>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
		<<set $activeSlave.health = random(-20,20)>>
		<<set $activeSlave.muscles = random(60,80)>>
		<<set $activeSlave.weight = random(-30,10)>>
		<<set $activeSlave.waist = random(10,70)>>
		<<set $activeSlave.chem = 10 * random(1,3)>>
		<<set $activeSlave.customTat = "The prominent emblem of a local gang spans the length of his shoulders.">>
		<<set $activeSlave.combatSkill = 1>>
	<<case "gang thief">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for gang related raiding of several local warehouses.">>
		<<set $prisonCrime = "is incarcerated for gang related activities.">>
		<<set $activeSlave.career = "a gang member">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(0,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-40,60)>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
		<<set $activeSlave.health = random(-20,20)>>
		<<set $activeSlave.muscles = random(20,80)>>
		<<set $activeSlave.weight = random(-30,30)>>
		<<set $activeSlave.waist = random(10,70)>>
		<<set $activeSlave.chem = 10 * random(1,3)>>
		<<set $activeSlave.customTat = "The prominent emblem of a local gang spans the length of his shoulders.">>
		<<set $activeSlave.combatSkill = 1>>
	<<case "drug peddler">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for gang related drug distribution.">>
		<<set $prisonCrime = "is incarcerated for gang related activities.">>
		<<set $activeSlave.career = "a drug pusher">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(0,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-40,60)>>
		<<set $activeSlave.health = random(-20,20)>>
		<<set $activeSlave.muscles = random(20,40)>>
		<<set $activeSlave.chem = 10 * random(3,5)>>
		<<set $activeSlave.customTat = "The prominent emblem of a local gang spans the length of his shoulders.">>
		<<set $activeSlave.combatSkill = 1>>
	<<case "hitman">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for a series of high profile murders.">>
		<<set $prisonCrime = "is incarcerated for a series of murders-for-hire.">>
		<<set $activeSlave.career = "a hitman">>
		<<set $activeSlave.devotion = random(-75,-50)>>
		<<set $activeSlave.trust = random(-60,25)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(0,100)>>
		<<set $activeSlave.health = random(-20,60)>>
		<<set $activeSlave.weight = random(-30,10)>>
		<<set $activeSlave.waist = random(-10,50)>>
		<<set $activeSlave.muscles = random(20,40)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "assassin">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for a high profile assassination.">>
		<<set $prisonCrime = "is incarcerated for an assassination.">>
		<<set $activeSlave.career = "an assassin">>
		<<set $activeSlave.devotion = -100>>
		<<set $activeSlave.trust = 100>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = 100>>
		<<set $activeSlave.health = random(-20,60)>>
		<<set $activeSlave.weight = random(-30,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(20,40)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "murder">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for repeat murder.">>
		<<set $prisonCrime = "is incarcerated for murder.">>
		<<set $activeSlave.career = "a murderer">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(0,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-40,60)>>
		<<set $activeSlave.health = random(-20,20)>>
		<<set $activeSlave.muscles = random(20,80)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "manslaughter">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for manslaughter.">>
		<<set $prisonCrime = "is incarcerated for manslaughter.">>
		<<set $activeSlave.career = "a criminal">>
		<<set $activeSlave.devotion = random(-20,50)>>
		<<set $activeSlave.trust = random(0,20)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-40,60)>>
		<<set $activeSlave.health = random(-40,0)>>
	<<case "attempted murder">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for attempted murder of a prominent individual.">>
		<<set $prisonCrime = "is incarcerated for an attempted murder.">>
		<<set $activeSlave.career = "a criminal">>
		<<set $activeSlave.devotion = random(-20,50)>>
		<<set $activeSlave.trust = random(0,20)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-100,0)>>
		<<set $activeSlave.health = random(-40,0)>>
	<</switch>>

<<case "military prison">>
	<<if $pedo_mode == 1>>
		<<set $activeSlaveOneTimeMinAge = 12>>
		<<set $activeSlaveOneTimeMaxAge = 18>>
		<<set $one_time_age_overrides_pedo_mode = 1>>
	<<else>>
		<<set $activeSlaveOneTimeMinAge = 18>>
		<<if $retirementAge > 56>>
			<<set $activeSlaveOneTimeMaxAge = 55>>
		<<else>>
			<<set $activeSlaveOneTimeMaxAge = $retirementAge-2>>
		<</if>>
	<</if>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate New Slave">>

	/*
	<<if $activeSlave.dick > 0>>
		<<set $activeSlave.dickAccessory = "chastity">>
	<</if>>
	<<if $activeSlave.vagina > -1>>
		<<set $activeSlave.vaginalAccessory = "chastity belt">>
	<</if>>
	*/

	<<set _criminal = setup.militaryCriminalPool.random()>>

	<<switch _criminal>>
	<<case "spy">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was a spy captured while infiltrating the Free City.">>
		<<set $prisonCrime = "is incarcerated for spying.">>
		<<set $activeSlave.career = "a spy">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = -100>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(20,100)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.health = random(-40,20)>>
		<<set $activeSlave.weight = random(-30,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(20,40)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "terrorist">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was a terrorist captured when her attempt to destroy a public building and the people within was foiled.">>
		<<set $prisonCrime = "is incarcerated for terrorism.">>
		<<set $activeSlave.career = "a terrorist">>
		<<set $activeSlave.devotion = random(-80,-20)>>
		<<set $activeSlave.trust = -100>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-100,0)>>
		<<set $activeSlave.health = random(-60,20)>>
		<<set $activeSlave.weight = random(-100,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
	<<case "war criminal">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was a soldier imprisoned for committing unspeakable atrocities, even by the standards of an apocalyptic slave trading society.">>
		<<set $prisonCrime = "is incarcerated for a series of war crimes.">>
		<<set $activeSlave.career = "a soldier">>
		<<set $activeSlave.devotion = random(-100,-80)>>
		<<set $activeSlave.trust = random(20,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-20,100)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.health = random(-40,60)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(20,60)>>
		<<set $activeSlave.combatSkill = 1>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
	<<case "deserter">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was a soldier that abandoned her post.">>
		<<set $prisonCrime = "is incarcerated for going A.W.O.L.">>
		<<set $activeSlave.career = "a soldier">>
		<<set $activeSlave.devotion = random(-100,-80)>>
		<<set $activeSlave.trust = random(-100,-80)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-60,40)>>
		<<set $activeSlave.health = random(-40,60)>>
		<<set $activeSlave.weight = random(-50,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "officer">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was an officer that over-extended her forces and was overwhelmed.">>
		<<set $prisonCrime = "is a captured enemy officer.">>
		<<set $activeSlave.career = "a military officer">>
		<<set $activeSlave.devotion = random(-40,20)>>
		<<set $activeSlave.trust = random(-50,0)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(0,100)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(0,60)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(20,40)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "specOps">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was a special operations officer that acted on bad intel and ended up captured.">>
		<<set $prisonCrime = "is a captured enemy special operations officer.">>
		<<set $activeSlave.career = "spec ops">>
		<<set $activeSlave.devotion = random(-80,-50)>>
		<<set $activeSlave.trust = random(-100,100)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(60, 80, 100)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.health = random(0,60)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(30,60)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "sniper">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was an enemy sniper that was captured after her company lost to your military might.">>
		<<set $prisonCrime = "is a captured enemy sniper.">>
		<<set $activeSlave.career = "a sniper">>
		<<set $activeSlave.devotion = random(-50,-20)>>
		<<set $activeSlave.trust = random(-100,-80)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(60, 80, 100)>>
		<<set $activeSlave.intelligenceImplant = 20>>
		<<set $activeSlave.health = random(0,20)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(30,60)>>
		<<set $activeSlave.combatSkill = 1>>
		<<if $activeSlave.boobs > 400>>
			<<set $activeSlave.boobs = 400>>
		<</if>>
	<<case "gunner">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was an enemy machine gunner that was captured after her company lost to your military might.">>
		<<set $prisonCrime = "is a captured enemy gunner.">>
		<<set $activeSlave.career = "a soldier">>
		<<set $activeSlave.devotion = random(-50,-20)>>
		<<set $activeSlave.trust = random(-50,-20)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(0,90)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(0,20)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(50,60)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "soldier">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was an enemy soldier that was captured after her company lost to your military might.">>
		<<set $prisonCrime = "is a captured enemy soldier.">>
		<<set $activeSlave.career = "a soldier">>
		<<set $activeSlave.devotion = random(-100,-20)>>
		<<set $activeSlave.trust = random(-50,20)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(0,60)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(0,40)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(30,60)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "private">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was an enemy grunt that was captured after her company lost to your military might.">>
		<<set $prisonCrime = "is a captured enemy private.">>
		<<set $activeSlave.career = "a private">>
		<<set $activeSlave.devotion = random(-40,-20)>>
		<<set $activeSlave.trust = random(-100,-80)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-90,70)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(0,20)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(10,40)>>
		<<set $activeSlave.combatSkill = 1>>
	<</switch>>

<<case "white collar">>
	<<if $pedo_mode == 1>>
		<<set $activeSlaveOneTimeMinAge = 16>>
		<<set $activeSlaveOneTimeMaxAge = 45>>
		<<set $one_time_age_overrides_pedo_mode = 1>>
	<<else>>
		<<set $activeSlaveOneTimeMinAge = 25>>
		<<if $retirementAge > 66>>
			<<set $activeSlaveOneTimeMaxAge = 65>>
		<<else>>
			<<set $activeSlaveOneTimeMaxAge = $retirementAge-2>>
		<</if>>
	<</if>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate New Slave">>

	<<set _criminal = setup.whiteCollarCriminalPool.random()>>

	<<switch _criminal>>
	<<case "racketeering">>
		<<set $activeSlave.career = either("a businessman", "a lawyer", "a stockbroker")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " convicted of racketeering.">>
		<<set $prisonCrime = "is incarcerated for racketeering.">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(-20,20)>>
		<<set $activeSlave.intelligence = random(0,99)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(20,60)>>
	<<case "bribery">>
		<<set $activeSlave.career = either("a businessman", "a lawyer", "a stockbroker")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " arrested and sentenced for bribing government officials.">>
		<<set $prisonCrime = "is incarcerated for bribery.">>
		<<set $activeSlave.devotion = random(-50,-20)>>
		<<set $activeSlave.trust = random(20,50)>>
		<<set $activeSlave.intelligence = random(0,99)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(20,60)>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
	<<case "blackmail">>
		<<set $activeSlave.career = either("a businessman", "a lawyer", "a stockbroker")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " convicted of blackmail against a sorority of university students, forcing them to do sexual favors.">>
		<<set $prisonCrime = "is incarcerated for blackmail.">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(20,50)>>
		<<set $activeSlave.intelligence = random(0,99)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(20,60)>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
		<<set $activeSlave.fetish = "sadist">>
		<<set $activeSlave.fetishStrength = 100>>
	<<case "embezzlement">>
		<<set $activeSlave.career = either("a businessman", "a lawyer", "a stockbroker")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " involved in a scandal and convicted of embezzlement.">>
		<<set $prisonCrime = "is incarcerated for embezzlement.">>
		<<set $activeSlave.devotion = random(0,20)>>
		<<set $activeSlave.trust = random(-10,10)>>
		<<set $activeSlave.intelligence = random(0,99)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(20,60)>>
	<<case "fraud">>
		<<set $activeSlave.career = either("a businessman", "a lawyer", "a stockbroker")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " convicted of fraud.">>
		<<set $prisonCrime = "is incarcerated for fraud.">>
		<<set $activeSlave.devotion = random(20,40)>>
		<<set $activeSlave.trust = random(20,50)>>
		<<set $activeSlave.intelligence = random(0,99)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(20,60)>>
	<<case "tax evasion">>
		<<set $activeSlave.career = either("a businessman", "a lawyer", "a stockbroker")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " convicted of tax evasion.">>
		<<set $prisonCrime = "is incarcerated for tax evasion.">>
		<<set $activeSlave.devotion = random(-20,0)>>
		<<set $activeSlave.trust = random(20,50)>>
		<<set $activeSlave.intelligence = random(0,99)>>
		<<set $activeSlave.intelligenceImplant = 15>>
		<<set $activeSlave.health = random(20,60)>>
	<<case "malpractice">>
		<<set $activeSlave.career = either("a doctor", "a nurse", "a physician")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " that took advantage of her position to molest and modify her patients.">>
		<<set $prisonCrime = "is incarcerated for malpractice.">>
		<<set $activeSlave.devotion = random(-50,0)>>
		<<set $activeSlave.trust = random(-100,-50)>>
		<<set $activeSlave.intelligence = random(55,99)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.health = random(-40,20)>>
	<<case "abuse of power">>
		<<set $activeSlave.career = either("a lawyer", "a judge", "a police officer")>>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was " + $activeSlave.career + " that took advantage of her position for her own benefit.">>
		<<set $prisonCrime = "is incarcerated for abuse of power.">>
		<<set $activeSlave.devotion = random(-100,0)>>
		<<set $activeSlave.trust = random(-50,50)>>
		<<set $activeSlave.intelligence = random(60,99)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.health = random(20,60)>>
		<<set $activeSlave.behavioralFlaw = "arrogant">>
	<</switch>>

<<case "low tier criminals">>
	<<if $pedo_mode == 1>>
		<<set $activeSlaveOneTimeMinAge = 6>>
		<<set $activeSlaveOneTimeMaxAge = 18>>
		<<set $one_time_age_overrides_pedo_mode = 1>>
	<<else>>
		<<set $activeSlaveOneTimeMinAge = 16>>
		<<if $retirementAge > 56>>
			<<set $activeSlaveOneTimeMaxAge = 55>>
		<<else>>
			<<set $activeSlaveOneTimeMaxAge = $retirementAge-2>>
		<</if>>
	<</if>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate New Slave">>

	/*
	<<if $activeSlave.dick > 0>>
		<<set $activeSlave.dickAccessory = "chastity">>
	<</if>>
	<<if $activeSlave.vagina > -1>>
		<<set $activeSlave.vaginalAccessory = "chastity belt">>
	<</if>>
	*/

	<<set _criminal = setup.pettyCriminalPool.random()>>

	<<switch _criminal>>
	<<case "robbery">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for robbery.">>
		<<set $prisonCrime = "is incarcerated for robbery.">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(-60,60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(-100, -100, -80, -60, -40, -30, -20, -5, 0, 5, 20)>>
		<<set $activeSlave.health = random(-20,20)>>
	<<case "armed robbery">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for armed robbery.">>
		<<set $prisonCrime = "is incarcerated for armed robbery.">>
		<<set $activeSlave.devotion = random(-50,-20)>>
		<<set $activeSlave.trust = random(-20,60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-80,60)>>
		<<set $activeSlave.health = random(-10,20)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(10,40)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "murder">>
		<<if random(1,100) > 70>>
			<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for murder. Her actions weigh heavily on her conscience.">>
			<<set $activeSlave.devotion = 0>>
			<<set $activeSlave.trust = 0>>
			<<set $activeSlave.health = random(-60,-20)>>
			<<set $activeSlave.fetish = "mindbroken">>
		<<else>>
			<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for murder.">>
			<<set $activeSlave.devotion = random(-50,-20)>>
			<<set $activeSlave.trust = random(-20,60)>>
			<<set $activeSlave.health = random(-10,20)>>
		<</if>>
		<<set $prisonCrime = "is incarcerated for murder.">>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-80,70)>>
	<<case "arson">>
		<<if random(1,100) > 50>>
			<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for arson. Her actions, and those she inadvertently killed, weigh heavily on her conscience.">>
			<<set $activeSlave.devotion = 0>>
			<<set $activeSlave.trust = 0>>
			<<set $activeSlave.health = random(-80,-20)>>
			<<set $activeSlave.fetish = "mindbroken">>
		<<else>>
			<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for arson.">>
			<<set $activeSlave.devotion = random(-70,-50)>>
			<<set $activeSlave.trust = random(0,60)>>
			<<set $activeSlave.health = random(-10,20)>>
		<</if>>
		<<set $prisonCrime = "is incarcerated for arson.">>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-80,70)>>
	<<case "burglary">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for burglary.">>
		<<set $prisonCrime = "is incarcerated for burglary.">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(-60,60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-100,20)>>
		<<set $activeSlave.health = random(-20,20)>>
	<<case "cat burglar">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for repeat burglary.">>
		<<set $prisonCrime = "is incarcerated for career burglary.">>
		<<set $activeSlave.career = "a cat burglar">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(-60,60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(60, 80, 100)>>
		<<set $activeSlave.health = random(0,60)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(10,40)>>
	<<case "petty theft">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for petty theft.">>
		<<set $prisonCrime = "is incarcerated for petty theft.">>
		<<set $activeSlave.career = "a thief">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(-100,-60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(-100, -100, -80, -60, -40, -30, -20, -5, 0, 5, 20)>>
		<<set $activeSlave.health = random(-20,20)>>
	<<case "theft">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for theft.">>
		<<set $prisonCrime = "is incarcerated for theft.">>
		<<set $activeSlave.career = "a thief">>
		<<set $activeSlave.devotion = random(-50,0)>>
		<<set $activeSlave.trust = random(-100,-60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-80,70)>>
		<<set $activeSlave.health = random(-20,20)>>
	<<case "pickpocketing">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for repeat pick-pocketing.">>
		<<set $prisonCrime = "is incarcerated for pick-pocketing.">>
		<<set $activeSlave.career = "a pick-pocket">>
		<<set $activeSlave.devotion = random(-20,0)>>
		<<set $activeSlave.trust = random(-100,-60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-80,70)>>
		<<set $activeSlave.health = random(-60,0)>>
	<<case "manslaughter">>
		<<if random(1,100) > 60>>
			<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for manslaughter. Her actions weigh heavily on her conscience.">>
			<<set $activeSlave.devotion = 0>>
			<<set $activeSlave.trust = 0>>
			<<set $activeSlave.health = random(-80,-20)>>
			<<set $activeSlave.fetish = "mindbroken">>
		<<else>>
			<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for manslaughter.">>
			<<set $activeSlave.devotion = random(-70,-50)>>
			<<set $activeSlave.trust = random(0,60)>>
			<<set $activeSlave.health = random(-10,20)>>
		<</if>>
		<<set $prisonCrime = "is incarcerated for manslaughter.">>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = random(-80,70)>>
	<<case "blackmail">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for blackmail.">>
		<<set $prisonCrime = "is incarcerated for blackmail.">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(-100,-60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = either(60, 80, 100)>>
		<<set $activeSlave.health = random(0,60)>>
	<<case "assault">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for assault.">>
		<<set $prisonCrime = "is incarcerated for assault.">>
		<<set $activeSlave.devotion = random(-70,-50)>>
		<<set $activeSlave.trust = random(-20,60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-10,40)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(30,60)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "battery">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for battery.">>
		<<set $prisonCrime = "is incarcerated for battery.">>
		<<set $activeSlave.devotion = random(-100,-70)>>
		<<set $activeSlave.trust = random(20,60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-10,40)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(40,60)>>
		<<set $activeSlave.combatSkill = 1>>
	<<case "tax evasion">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for tax evasion.">>
		<<set $prisonCrime = "is incarcerated for tax evasion.">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(0,60)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [0,100]})>>
		<<set $activeSlave.health = random(0,60)>>
	<<case "rape">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for rape.">>
		<<set $prisonCrime = "is incarcerated for rape.">>
		<<set $activeSlave.devotion = random(-100,-50)>>
		<<set $activeSlave.trust = random(-20,80)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-10,40)>>
		<<set $activeSlave.weight = random(-10,10)>>
		<<set $activeSlave.waist = random(-10,10)>>
		<<set $activeSlave.muscles = random(30,60)>>
		<<set $activeSlave.fetish = "sadist">>
		<<set $activeSlave.fetishStrength = 80>>
	<<case "child molestation">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for child molestation.">>
		<<set $prisonCrime = "is incarcerated for child molestation.">>
		<<if $minimumSlaveAge < 13>>
			<<set $activeSlave.devotion = random(-20,0)>>
			<<set $activeSlave.trust = random(-20,0)>>
		<<else>>
			<<set $activeSlave.devotion = random(-50,-20)>>
			<<set $activeSlave.trust = random(-100,0)>>
		<</if>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-10,40)>>
		<<set $activeSlave.muscles = random(10,40)>>
		<<set $activeSlave.fetish = "sadist">>
		<<set $activeSlave.fetishStrength = 80>>
	<<case "child abuse">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for child abuse.">>
		<<set $prisonCrime = "is incarcerated for child abuse.">>
		<<if $minimumSlaveAge < 13>>
			<<set $activeSlave.devotion = random(-20,0)>>
			<<set $activeSlave.trust = random(-20,50)>>
		<<else>>
			<<set $activeSlave.devotion = random(-50,-20)>>
			<<set $activeSlave.trust = random(-50,50)>>
		<</if>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-10,40)>>
		<<set $activeSlave.muscles = random(10,40)>>
		<<set $activeSlave.fetish = "sadist">>
		<<set $activeSlave.fetishStrength = 100>>
		<<set $activeSlave.sexualFlaw = "malicious">>
	<<case "domestic abuse">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for domestic abuse.">>
		<<set $prisonCrime = "is incarcerated for domestic abuse.">>
		<<set $activeSlave.devotion = random(-50,-20)>>
		<<set $activeSlave.trust = random(-100,50)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-10,40)>>
		<<set $activeSlave.muscles = random(10,40)>>
		<<set $activeSlave.fetish = "sadist">>
		<<set $activeSlave.fetishStrength = 50>>
	<<case "illegal immigrant">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for illegal immigration.">>
		<<set $prisonCrime = "is incarcerated for illegally entering the Free City.">>
		<<set $activeSlave.career = "a refugee">>
		<<set $activeSlave.devotion = random(0,20)>>
		<<set $activeSlave.trust = random(-100,-50)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-90,-40)>>
	<<case "mule">>
		<<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for smuggling illegal contraband inside her body.">>
		<<set $prisonCrime = "is incarcerated for smuggling drugs in her body.">>
		<<set $activeSlave.career = "a drug mule">>
		<<set $activeSlave.devotion = random(-20,20)>>
		<<set $activeSlave.trust = random(0,25)>>
		<<set $activeSlave.hStyle = "buzzcut">>
		<<set $activeSlave.hLength = 0>>
		<<set $activeSlave.health = random(-80,20)>>
		<<if $activeSlave.ovaries == 1 && $activeSlave.vagina > 0>>
			<<set $activeSlave.vagina = 4>>
			<<set $activeSlave.bellySag += 5>>
		<</if>>
		<<set $activeSlave.anus = 4>>
		<<set $activeSlave.bellySag += 5>>
		<<set $activeSlave.chem = 10 * random(1,3)>>
		<<set $activeSlave.addict = 100>>
	<</switch>>

<<default>>
	Someone messed up. _market is not known.

<</switch>>
<</widget>>

/%
	Call as <<MarketName 'market' ['arcology']>>
	If $args[0] is undefined, will generate a kidnapper's market slave.
	If $args[0] is "corporate" and $args[1] is undefined, will use neighboring arcology 1.
%/
<<widget MarketName>>
<<if $args[0]>>
	<<set _market = $args[0]>>
<<else>>
	<<set _market = "kidnappers">>
<</if>>

<<switch _market>>
<<case "corporate">>
	your corporation
<<case "neighbor">>
	<<if $args[1]>>
		<<print $arcologies[$args[1]].name>>
	<<else>>
		<<print $arcologies[1].name>>
	<</if>>
<<case "kidnappers">>
	the Kidnappers' Market
<<case "indentures">>
	the Indentures Market
<<case "hunters">>
	the Runaway Hunters' Market
<<case "raiders">>
	the Raiders' Market
<<case "underage raiders">>
	the Raiders' Black Market
<<case "heap">>
	the Flesh Heap as alive as when you purchased them.
<<case "wetware">>
	the Wetware CPU market
<<case "trainers">>
	the Trainers' Market
<<case "TSS">>
	The Slavegirl School
<<case "GRI">>
	Growth Research Institute
<<case "SCP">>
	St. Claver Preparatory
<<case "LDE">>
	L'école des Enculées
<<case "TGA">>
	The Gymnasium-Academy
<<case "TCR">>
	The Cattle Ranch
<<case "TFS">>
	The Futanari Sisters
<<case HA>>
	The Hippolyta Academy
<<case "low tier criminals" "gangs and smugglers" "white collar" "military prison">>
	the prisoner sale
<<default>>
	Someone messed up. _market is not known.

<</switch>>
<</widget>>

/%
	Call as <<MarketNamePeriod 'market' ['arcology']>>
	If $args[0] is undefined, will generate a kidnapper's market slave.
	If $args[0] is "corporate" and $args[1] is undefined, will use neighboring arcology 1.
%/
<<widget MarketNamePeriod>>
<<if $args[0]>>
	<<set _market = $args[0]>>
<<else>>
	<<set _market = "kidnappers">>
<</if>>

<<switch _market>>
<<case "corporate">>
	your corporation.
<<case "neighbor">>
	<<if $args[1]>>
		<<print $arcologies[$args[1]].name>>.
	<<else>>
		<<print $arcologies[1].name>>.
	<</if>>
<<case "kidnappers">>
	the Kidnappers' Market.
<<case "indentures">>
	the Indentures Market.
<<case "hunters">>
	the Runaway Hunters' Market.
<<case "raiders">>
	the Raiders' Market.
<<case "underage raiders">>
	the Raiders' Black Market.
<<case "heap">>
	the Flesh Heap, alive and not dead.
<<case "wetware">>
	the Wetware CPU market.
<<case "trainers">>
	the Trainers' Market.
<<case "TSS">>
	The Slavegirl School.
<<case "GRI">>
	Growth Research Institute.
<<case "SCP">>
	St. Claver Preparatory.
<<case "LDE">>
	L'école des Enculées.
<<case "TGA">>
	The Gymnasium-Academy.
<<case "TCR">>
	The Cattle Ranch.
<<case "TFS">>
	The Futanari Sisters.
<<case HA>>
	The Hippolyta Academy.
<<case "low tier criminals" "gangs and smugglers" "white collar" "military prison">>
	the prisoner sale.
<<default>>
	Someone messed up. _market is not known.

<</switch>>
<</widget>>

/%
 Call as <<JFCSlave>>
%/
<<widget "JFCSlave">>
	<<set $activeSlaveOneTimeMinAge = 20>>
	<<set $activeSlaveOneTimeMaxAge = 36>>
	<<set $one_time_age_overrides_pedo_mode = 1>>
	<<set $oneTimeDisableDisability = 1>>
	<<include "Generate XX Slave">>
	<<set $activeSlave.weight = random(-30,20), $activeSlave.waist = random(-30,10), $activeSlave.face = random(40,60)>>
	<<if $activeSlave.faceShape == "masculine">>
		<<set $activeSlave.faceShape = "sensual">>
	<</if>>
	<<if $activeSlave.boobShape == "saggy" || $activeSlave.boobShape == "downward-facing">>
		<<set $activeSlave.boobShape = "perky">>
	<</if>>
	<<set $activeSlave.eyes = 1, $activeSlave.hears = 0, $activeSlave.voice = 2>>
	<<set $activeSlave.intelligenceImplant = 30, $activeSlave.intelligence = random(20,100)>>
	<<set $activeSlave.trust = 80, $activeSlave.devotion = 80>>
	<<set $activeSlave.health = random(80,95)>>
	<<switch $Role>>
	/* Opens security */
		<<case "Lieutenant Colonel">>
			<<set $activeSlave.devotion = random(96,100), $activeSlave.trust = random(96, 100), $activeSlave.energy = random(96,100),  $activeSlave.intelligence = 70, $activeSlave.combatSkill = 1>>
			<<set $activeSlave.career = either("a bodyguard", "a law enforcement officer", "a revolutionary", "a soldier", "a transporter", "an assassin", "in a militia", "a bouncer", "a bounty hunter", "a gang member", "a mercenary", "a prison guard", "a private detective", "a security guard", "a street thug", "an enforcer")>>
		<<case "Bodyguard">>
			<<set $activeSlave.devotion = 90, $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.weight = random(-10,10), $activeSlave.teeth = either("pointy", "normal"), $activeSlave.amp = either(-4, -4, 0, 0, 0, 0), $activeSlave.combatSkill = 1>>
			<<set $activeSlave.career = either("a bodyguard", "a kunoichi", "a law enforcement officer", "a military brat", "a revolutionary", "a soldier", "a transporter", "an assassin", "in a militia")>>
		<<case "Wardeness">>
			<<set $activeSlave.energy = random(80,100), $activeSlave.sexualFlaw = either("malicious", "none", "none", "none", "none"), $activeSlave.fetish = "sadist", $activeSlave.fetishStrength = 100, $activeSlave.muscles = random(50,80), $activeSlave.combatSkill = 1>>
			<<set $activeSlave.career = either("a security guard", "a mercenary", "an enforcer", "a private detective", "a bouncer", "a prison guard", "a street thug", "a gang member", "a bounty hunter")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,6), $activeSlave.balls = random(3,6), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2,2,3)>>
			<</if>>
	/* Closes Security */
	/* Opens management */
		<<case "Headgirl">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 100, $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.energy = random(70,90), $activeSlave.intelligence = random(60,100), $activeSlave.entertainSkill = 100, $activeSlave.whoreSkill = 100, $activeSlave.analSkill = 100, $activeSlave.oralSkill = 100, $activeSlave.vaginalSkill = 100, $activeSlave.career = either("a lawyer", "a military officer", "a politician")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(3,6), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,2)>>
			<</if>>
			<<set $activeSlave.vagina = random(3,4)>>
			<<if $AgePenalty == 1>>
				<<set $activeSlave.actualAge = random(36,$retirementAge-5)>>
			<<else>>
				<<set $activeSlave.actualAge = random(20,$retirementAge-5)>>
			<</if>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Teacher">>
			<<set $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.energy = random(70,90), $activeSlave.intelligence = 100, $activeSlave.entertainSkill = 100, $activeSlave.whoreSkill = 100, $activeSlave.analSkill = 100, $activeSlave.oralSkill = 100, $activeSlave.vaginalSkill = 100, $activeSlave.face = random(41,90), $activeSlave.career = either("a librarian", "a principal", "a private instructor", "a professor", "a scholar", "a scientist", "a teacher", "a teaching assistant")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(3,6), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2,2,3)>>
			<</if>>
			<<set $activeSlave.actualAge = random(36,$retirementAge-3)>>
			<<set $activeSlave.vagina = random(3,4)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Nurse">>
			<<set $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.muscles = random(6,50), $activeSlave.face = random(41,90), $activeSlave.sexualQuirk = "caring", $activeSlave.career = either("a doctor", "a medic", "a medical student", "a nurse", "a paramedic"),  $activeSlave.intelligence = random(40,90)>>
			<<set $activeSlave.actualAge = random(36,$retirementAge-3)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Motherly Attendant">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 90, $activeSlave.fetish = "submissive", $activeSlave.fetishStrength = 100, $activeSlave.face = random(60,90)>>
			<<set $activeSlave.career = either("a counselor", "a dispatch officer", "a lifeguard", "a masseuse", "a psychologist", "a therapist"), $activeSlave.birthsTotal = random(1,3), $activeSlave.pregKnown = 1, $activeSlave.preg = random(20,35), $activeSlave.pregWeek = $activeSlave.preg, $activeSlave.pregType = 1>>
			<<run SetBellySize($activeSlave)>>
			<<set $activeSlave.actualAge = random(36,$retirementAge-3)>>
			<<set $activeSlave.vagina = random(3,4)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Attendant">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 90, $activeSlave.fetish = "submissive", $activeSlave.fetishStrength = 100, $activeSlave.eyes = either(-2, 1, 1), $activeSlave.preg = 0, $activeSlave.face = random(60,90), $activeSlave.career = either("a counselor", "a masseuse", "a therapist")>>
			<<set $activeSlave.actualAge = random(26,$retirementAge-3)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Matron">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 90, $activeSlave.sexualQuirk = "caring", $activeSlave.eyes = 1, $activeSlave.birthsTotal = random(2,4), $activeSlave.vagina = 3, $activeSlave.face = random(60,90), $activeSlave.career = either( "a nanny", "a practitioner")>>
			<<set $activeSlave.actualAge = random(24,$retirementAge-3)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Stewardess">>
			<<set $activeSlave.energy = random(70,90), $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.career = either("a barista", "a bartender", "a caregiver", "a charity worker", "a professional bartender", "a secretary", "a wedding planner", "an air hostess", "an estate agent", "an investor", "an office worker")>>
		<<case "Milkmaid">>
			<<set $activeSlave.muscles = random(31,60), $activeSlave.oralSkill = random(31,60), $activeSlave.sexualQuirk = "caring", $activeSlave.behavioralQuirk = "funny", $activeSlave.career = either("a dairy worker", "a farmer's daughter", "a rancher", "a veterinarian"), $activeSlave.intelligence = random(20,70)>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(4,9), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2)>>
			<</if>>
			<<if $AgePenalty == 1>>
				<<set $activeSlave.actualAge = random(36,$retirementAge-5)>>
			<<else>>
				<<set $activeSlave.actualAge = random(20,$retirementAge-5)>>
			<</if>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
	/* Closes management */
	/* Opens entertain */
		<<case "DJ">>
			<<set $activeSlave.entertainSkill = 100, $activeSlave.muscles = random(6,30), $activeSlave.face = random(80,100), $activeSlave.career = either("a classical dancer", "a classical musician", "a dancer", "a house DJ", "a musician", "an aspiring pop star")>>
		<<case "Madam">>
			<<set $activeSlave.whoreSkill = 100, $activeSlave.career = either("a business owner", "a manager", "a pimp", "a procuress", "an innkeeper")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(3,5), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2)>>
			<</if>>
			<<if $AgePenalty == 1>>
				<<set $activeSlave.actualAge = random(36,$retirementAge-5)>>
			<<else>>
				<<set $activeSlave.actualAge = random(20,$retirementAge-5)>>
			<</if>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Concubine">>
			<<set $activeSlave.prestige = 3, $activeSlave.energy = random(80,100), $activeSlave.entertainSkill = 100, $activeSlave.whoreSkill = 100, $activeSlave.analSkill = 100, $activeSlave.oralSkill = 100, $activeSlave.vaginalSkill = 100, $activeSlave.face = 100, $activeSlave.devotion = random(90,95), $activeSlave.trust = random(90,100)>>
		/* Closes Entertain */
		<</switch>>
<</widget>>