:: Slave Markets

<<nobr>>

<<set $nextButton to "Back">>
<<set $nextLink to "Buy Slaves">>
<<set $returnTo to "Buy Slaves">>
<<set $showEncyclopedia to 1>><<set $encyclopedia to "Kidnapped Slaves">>

<<if $activeArcology != 0>>
	<<set $slaveMarket to "neighbor">>
	<<set $direction to $activeArcology.direction>>
	<<set $slavesSeen += 1>>
	<<set $activeArcology to 0>>
<</if>>

You visit the slave markets off the arcology plaza. It's always preferable to examine merchandise in person.

<<if $slaveMarket == "corporate">>

You're in the area of the slave market owned by your corporation. The corporation captures more slaves than it can train, and only retains and trains those that are likely to be profitable at resale.

<<if $captureUpgradeAge == "young">>
	<<set $activeSlaveOneTimeMinAge to $minimumSlaveAge>>
	<<set $activeSlaveOneTimeMaxAge to 19>>
<<elseif $captureUpgradeAge == "old">>
	<<if $pedo_mode == 1>>
		<<set $activeSlaveOneTimeMinAge to 24>>
		<<set $activeSlaveOneTimeMaxAge to $retirementAge>>
	<<else>>
		<<set $activeSlaveOneTimeMinAge to 36>>
		<<set $activeSlaveOneTimeMaxAge to $retirementAge>>
	<</if>>
<</if>>
<<set $one_time_age_overrides_pedo_mode to 1>>
<<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 to "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 = either(1,2,2,3)>>
<<elseif $entrapmentUpgradeIntelligence == "stupid">>
	Stupid slaves have a high priority for training.
	<<set $activeSlave.intelligence = either(-1,-2,-2,-3)>>
<<else>>
	Slaves' intelligence is not given special consideration.
<</if>>
<<if $captureUpgradeAge == "young">>
	Young slaves are strongly favored for training.
	/*<<set $activeSlave.actualAge = ramdom(18,19)>>*/
<<elseif $captureUpgradeAge == "old">>
	Newly enslaved MILFs are strongly favored for training.
	/*<<set $activeSlave.actualAge = ramdom(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>>s.
<</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.intelligence = Math.clamp($activeSlave.intelligence+1, -3, 3)>>
	<<set $activeSlave.intelligenceImplant = 1>>
	<<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 to 3>>
		<<if $activeSlave.analSkill > 10>><<set $activeSlave.analSkill -= 10>><</if>>
	<</if>>
	<<if ($activeSlave.vagina > 3)>>
		<<set $activeSlave.vagina to 3>>
		<<if $activeSlave.vaginalSkill > 10>><<set $activeSlave.vaginalSkill -= 10>><</if>>
	<</if>>
	<<if ($activeSlave.faceImplant == 0) && ($activeSlave.face < 3)>>
		<<if $activeSlave.faceShape is "masculine">><<set $activeSlave.faceShape to "androgynous">><</if>>
		<<set $activeSlave.faceImplant to 1>>
		<<set $activeSlave.face += 1>>
	<</if>>
	<<if ($activeSlave.ageImplant != 1) && ($activeSlave.physicalAge >= 25)>>
		<<set $activeSlave.ageImplant to 1>>
		<<AgeImplantAdjustment>>
	<</if>>
	<<if ($activeSlave.voice == 1) && ($activeSlave.voiceImplant == 0)>>
		<<set $activeSlave.voice += 1>>
		<<set $activeSlave.voiceImplant += 1>>
	<</if>>
	<<if ($activeSlave.waist == 0)>>
		<<set $activeSlave.waist to 1>>
	<</if>>
	<<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>>
	<<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 is "masculine")>>
			<<set $activeSlave.faceShape = "androgynous">>
		<<elseif ($activeSlave.faceShape is "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-$activeSlave.faceImplant) < 0) && ($activeSlave.face < 3)>>
		<<set $activeSlave.face = Math.clamp(-3, 3, $activeSlave.face+1)>>
	<</if>>
	<<if ($activeSlave.faceShape is "masculine")>>
		<<set $activeSlave.faceShape = "androgynous">>
	<<elseif ($activeSlave.faceShape is "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 is "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-$activeSlave.faceImplant) < 0) && ($activeSlave.face > 0)>>
		<<set $activeSlave.face = Math.clamp($activeSlave.face-1, -3, 3)>>
	<</if>>
	<<if ($activeSlave.faceShape is "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 is "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 to 50, $activeSlave.attrXX to 50, $activeSlave.attrKnown to 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 to -2, $activeSlave.intelligenceImplant to 0, $activeSlave.sexualFlaw to "none", $activeSlave.sexualQuirk to "none", $activeSlave.behavioralFlaw to "none", $activeSlave.behavioralQuirk to "none">>
<</if>>

<<elseif $slaveMarket is "heap">>

You're in the corner of the slave market occupied by "The Flesh Heap", a dumping ground, of sorts, for broken slaves. Be it braindeath, drug overdose, coma or anything else, this market is willing to buy and sell them. Most of the worthwhile slaves have already been picked clean by pharmaceutical companies for drug testing, and the rest are practically nothing more than vegetables, but a handful remain just concious enough to be profitable with effort as slaves. One should go in expecting only the worst quality possible, though if anything catches your eye, it will be rather cheap to purchase. 

<<set $seed to random(1,4)>>
<<if $seed == 1>>
	"Looking for a warm body to use as furniture? Perhaps as a decorative, living sculpture? We got what you want!"
<<elseif $seed == 2>>
	"I garuntee they are all alive, maybe not healthy but alive. Well, except that one, just ignore that one."
<<elseif $seed == 3>>
	"We ask that you don't use this merchandise for organ harvesting, we have plenty of nonfuctional ones for that."
<<else>>
	"If you are looking for a body to do unmentionable things to, you came to the right place! Though theses in particual just barely fall under slave laws."
<</if>>

<<include "Generate New Slave">>
<<set $activeSlave.origin to "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 to either(-3, -3, -2, -2, -2, -1, -1, -1, -1, 0)>>
<<set $activeSlave.intelligenceImplant to 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.amp = either(0, 0, 0, 0, 0, 0, 1, 1, 1)>>
<<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(-3,1)>>
<<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>>
	<<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 to "mindbroken">>
<<set $activeSlave.fetishStrength = 0>>

<<elseif $slaveMarket is "kidnappers">>

You're in the area of the slave market populated by slave kidnappers, though of course they prefer more polite titles. The slaves here are cheap, and they look it. They're almost all recent catches from bad parts of the old world, and most of them have seen considerable abuse between the moment of their capture and entering your arcology.
<<if $arcologies[0].FSPaternalistSMR == 1>>
	Fortunately for them, such behavior is not permitted here. Though they remain frightened and angry, they are safe from rape, for now.
<<else>>
	<<set $seed to random(1,4)>>
	There's more merchandise out of sight in the holding areas. To go by what you can hear,
	<<if ($seed == 1) && (random(0,99) < $seeDicks)>>
	muffled insistence that the speaker is not a girl followed by struggling and then shrieks as a resistant dickgirl takes anal rape,
	<<elseif ($seed is 2) && (random(1,100) > $seeDicks)>>
	muffled begging followed by struggling and then crying as a new slave learns how it feels to have a slave's cunt,
	<<elseif ($seed is 3)>>
	muffled gagging followed gasping and sobbing as a new slave tries to get her breath back after oral rape,
	<<else>>
	the unmistakable slap of flesh on flesh,
	<</if>>
	at least one of the slavers is amusing himself<<if $arcologies[0].FSGenderFundamentalist is "unset">> (or herself)<</if>> back there.
<</if>>

<<include "Generate New Slave">>
<<set $activeSlave.origin to "You bought her from the kidnappers' slave market, and was probably forced into slavery.">>
<<set $activeSlave.devotion -= 5>>
<<set $activeSlave.trust = random(-45,-25)>>
<<set $activeSlave.intelligence to either(-2, -1, -1, 0, 0, 0, 1)>>
<<set $activeSlave.health = random(-80,20)>>
<<if $activeSlave.vagina > 1 && isFertile($activeSlave)>><<set $activeSlave.preg to either(-2, -1, -1, -1, -1, -1, -1, -1, 1, 20)>><</if>>

<<elseif $slaveMarket is "indentures">>

You're in the area of the slave market that deals in indentured servants. The people sold here are slaves, but they are temporary slaves, and many of them have clauses in their indentures that prohibit some of the most severe practices. They exhibit a strange variety, with some looking more frightened than the most downtrodden slave and some looking almost cheerful.
<<if $arcologies[0].FSPaternalistSMR == 1>>
	The generous protections for slaves in your arcology lend this last group extra confidence.
<<else>>
	<<set $seed to random(1,4)>>
	The area is crowded, and more indentured servants are packed together in the holding areas. To go by what you can hear,
	<<if ($seed == 1) && (random(0,99) < $seeDicks)>>
	the unmistakable mixed shrieks, sobs, and slaps of anal rape,
	<<elseif ($seed is 2) && (random(1,100) > $seeDicks)>>
	the characteristic crying and gasping of an unwilling girl giving up her cunt,
	<<elseif ($seed is 3)>>
	the gagging and expectoration of someone who has just gotten a mouthful of unwelcome cum,
	<<else>>
	disconsolate sobbing interrupted by a gasp as something is stuffed inside someone's mouth, and followed by muffled screams,
	<</if>>
	one of them is learning exactly what her indenture allows.
<</if>>

<<include "Generate New Slave">>
<<set $activeSlave.origin to "You purchased her indenture contract, making her yours for as long as it lasts.">>
<<set $activeSlave.indentureRestrictions to 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 to either(26, 52, 104, 156, 208)>>

<<elseif $slaveMarket is "hunters">>

You're in the area of the slave market populated by runaway slave catchers, a proud group. The slaves here know their way around Free Cities slavery already, and their eyes are watchful. Most of them probably harbor thoughts of another attempt at escape, though the slavers to their best to disabuse them of these notions.
<<if $arcologies[0].FSPaternalistSMR == 1>>
	Their methods are somewhat limited, as the rules in your arcology preclude the more effective methods of punishment.
<<else>>
	<<set $seed to random(1,4)>>
	The slave catchers consider their catches fair game, though they usually confine their amusements to the holding areas out of sight. Not out of earshot, though; to go by what you can hear,
	<<if ($seed == 1) && (random(0,99) < $seeDicks)>>
	vehement insistence that the speaker is not a girl followed by a beating and then shrieks as a rebellious dickgirl takes anal rape,
	<<elseif ($seed is 2) && (random(1,100) > $seeDicks)>>
	vehement protestations followed by a beating and then crying as a slave's cunt takes her punishment for her,
	<<elseif ($seed is 3)>>
	struggling and gagging followed gasping and angry swearing as a rebellious slave tries to get her breath back after oral rape,
	<<else>>
	struggling followed by the slap of flesh on flesh,
	<</if>>
	at least one of the runaway hunters is amusing himself<<if $arcologies[0].FSGenderFundamentalist is "unset">> (or herself)<</if>> back there.
<</if>>

<<include "Generate New Slave">>
<<set $activeSlave.origin to "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 to either(0, 1, 2)>>
<<set $activeSlave.intelligenceImplant to 1>>
<<set $activeSlave.teeth to "normal">>
<<set $activeSlave.health = random(-10,70)>>
<<if $activeSlave.vagina > -1>>
	<<set $activeSlave.preg to either(-2, -1, -1, -1, -1, -1, -1, -1, 1, 1)>>
	<<if $activeSlave.physicalAge < $activeSlave.pubertyAgeXX>><<set $activeSlave.preg to -1>><</if>>
	<<set $activeSlave.vaginalSkill to random(15,100)>>
	<<set $activeSlave.vagina to random(1,3)>>
<</if>>
<<if $activeSlave.balls > 0>>
<<if random(1,3) == 1>>
	<<set $activeSlave.balls to 0>>
<</if>>
<</if>>
<<set $activeSlave.combatSkill to either(0, 0, 0, 0, 0, 1)>>
<<set $activeSlave.entertainSkill to random(15,100)>>
<<set $activeSlave.whoreSkill to random(15,100)>>
<<set $activeSlave.oralSkill to random(15,100)>>
<<set $activeSlave.analSkill to random(15,100)>>
<<set $activeSlave.anus to random(1,3)>>
<<set $activeSlave.weight = Math.clamp(-25, 25, $activeSlave.weight)>>
<<set $activeSlave.behavioralFlaw to either("arrogant", "bitchy", "odd", "hates men", "hates women", "hates women", "anorexic", "gluttonous", "devout", "liberated")>>
<<set $activeSlave.sexualFlaw to either("hates oral", "hates anal", "hates penetration", "repressed", "idealistic", "shamefast", "apathetic", "crude", "judgemental")>>
<<if random(1,2) == 1>>
	<<set $seed to random(2,8)*200>>
	<<set $activeSlave.boobs += $seed>>
	<<set $activeSlave.boobsImplant += $seed>>
	<<set $seed to random(1,3)>>
	<<set $activeSlave.butt += $seed>>
	<<set $activeSlave.buttImplant += $seed>>
	<<set $seed to either(10,20)>>
	<<set $activeSlave.lips += $seed>>
	<<set $activeSlave.lipsImplant += $seed>>
	<<set $seed to random(0,1)>>
	<<set $activeSlave.waist to $seed>>
	<<if $activeSlave.face < 2>>
	<<set $seed to random(0,1)>>
	<<set $activeSlave.face += $seed>>
	<<set $activeSlave.faceImplant += $seed>>
	<</if>>
	<<if $activeSlave.physicalAge >= 30>>
	<<set $activeSlave.ageImplant += random(0,1)>>
		<<if $activeSlave.ageImplant == 1>>
			<<AgeImplantAdjustment>>
		<</if>>
	<</if>>
<</if>>
<<if $arcologies[0].FSPaternalistSMR == 0>>
	<<set $activeSlave.heels to 1>>
<</if>>

<<elseif $slaveMarket is "underage raiders">>

You're in the seediest area of the slave market populated by the cradle robbers, a despised group of slavers known for raiding elementary schools, orphanages and even preschools. They specifically target girls who have yet to experience their first period. The extreme risk of these raids makes the slavers here aggressive and confident,
<<if $arcologies[0].FSPaternalistSMR == 1>>
	though they do obey the rules of your arcology that restrain them from abusing the girls.
<<else>>
	<<set $seed to random(1,4)>>
	though they restrain themselves from reducing the value of their captures by taking virginities. They do have their fun, though; to go by what you can hear from the holding area where they keep underage girls who can be sold,
	<<if ($seed == 1) and (random(0,99) < $seeDicks)>>
	a muffled but obviously sadistic description of feminization, and the desperate sobbing in response,
	<<elseif ($seed == 2) and (random(1,100) > $seeDicks)>>
	a muffled but obviously sadistic description of breeding, and the desperate sobbing in response,
	<<elseif ($seed is 3)>>
	faint struggling and crying that suggests that someone is being thoroughly groped and pinched,
	<<else>>
	the lewd, lubricated noise of someone giving a reluctant handjob,
	<</if>>
	at least one of the raiders is amusing himself<<if $arcologies[0].FSGenderFundamentalist is "unset">> (or herself)<</if>> back there.
<</if>>

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

<<elseif $slaveMarket is "raiders">>

You're in the area of the slave market populated by girl raiders, that daredevil subset of slave kidnappers that specifically target old world schools, preparatory institutions, religious groups, and other sources of slaves that can soon be sold right after they reach their majorities. The extreme risk of these raids makes the slavers here aggressive and confident,
<<if $arcologies[0].FSPaternalistSMR == 1>>
	though they do obey the rules of your arcology that restrain them from abusing the girls.
<<else>>
	<<set $seed to random(1,4)>>
	though they restrain themselves from reducing the value of their captures by taking virginities. They do have their fun, though; to go by what you can hear from the holding area where they keep slaves of age who can be sold,
	<<if ($seed == 1) && (random(0,99) < $seeDicks)>>
	a muffled but obviously sadistic description of feminization, and the desperate sobbing in response,
	<<elseif ($seed is 2) && (random(1,100) > $seeDicks)>>
	a muffled but obviously sadistic description of breeding, and the desperate sobbing in response,
	<<elseif ($seed is 3)>>
	faint struggling and crying that suggests that someone is being thoroughly groped and pinched,
	<<else>>
	the lewd, lubricated noise of someone giving a reluctant handjob,
	<</if>>
	at least one of the raiders is amusing himself<<if $arcologies[0].FSGenderFundamentalist is "unset">> (or herself)<</if>> back there.
<</if>>

<<set $activeSlaveOneTimeMinAge to 18>>
<<set $activeSlaveOneTimeMaxAge to 18>>
<<set $one_time_age_overrides_pedo_mode to 1>> /% Supposed to have just reached the age of majority. %/
<<include "Generate New Slave">>
<<set $activeSlave.origin to "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 to "a student">>
<<set $activeSlave.birthWeek to 0>>
<<if $activeSlave.vagina != -1>>
	<<if random(1,2) == 1>>
	<<set $activeSlave.vaginalSkill = 0>>
	<<set $activeSlave.vagina to 0>>
	<<set $activeSlave.preg to 0>>
	<</if>>
<</if>>
<<if random(1,2) == 1>>
	<<set $activeSlave.analSkill = 0>>
	<<set $activeSlave.anus to 0>>
<</if>>
<<if random(1,2) == 1>>
	<<set $activeSlave.oralSkill = 0>>
<</if>>
<<set $activeSlave.whoreSkill = 0>>

<<elseif $slaveMarket is "neighbor">>

<<for $i to 0; $i < $arcologies.length; $i++>>
<<if $arcologies[$i].direction is $direction>>

You're in the area of the slave market that specializes in slaves from within the Free City, viewing slaves from ''$arcologies[$i].name''. Some were trained there, specifically for sale, while others are simply being sold.

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

<<if $arcologies[$i].FSSubjugationist > 20>>
	They're universally $arcologies[$i].FSSubjugationistRace.
	<<set $fixedRace = $arcologies[$i].FSSubjugationistRace>><<NationalityToRace $activeSlave>><<NationalityToName $activeSlave>><<NationalityToAccent $activeSlave>><<set $fixedRace = 0>>
<</if>>
<<if $arcologies[$i].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 < 3>>
		<<set $activeSlave.face += random(0,1)>>
	<</if>>
	<<if $activeSlave.faceShape is "masculine">>
	<<if random(0,1) == 0>>
		<<set $activeSlave.faceShape to "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[$i].FSGenderRadicalistResearch == 1 && random(1,100) <= 20>>
		This one is has a notably rounded belly for a slave with no vagina.
		<<set $activeSlave.ovaries to 0>>
		<<set $activeSlave.vagina to -1>>
		<<set $activeSlave.mpreg to 1>>
		<<set $activeSlave.preg to random(1,20)>>
	<</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 > -3>>
		<<set $activeSlave.face -= random(0,1)>>
	<</if>>
	<<if $activeSlave.faceShape != "androgynous">>
	<<if random(0,1) == 0>>
		<<set $activeSlave.faceShape to "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[$i].FSGenderFundamentalist > 50>>
	Fertile slaves from there almost never appear without swollen bellies and sensitive nipples.
	<<set $activeSlave.preg to 0>> /*removing contraception of default slave generation so isFertile can work right*/
	<<if isFertile($activeSlave)>>
	<<set $activeSlave.preg to random(1,35)>>
	<<set $activeSlave.lactation to random(0,1)>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSRepopulationFocus > 50>>
	They are exclusively female and all extremely pregnant.
	<<set $activeSlave.ovaries to 1>>
	<<set $activeSlave.vagina to random(0,1,1,1,1,2,2,3,3,3,3)>>
	<<set $activeSlave.dick to 0>>
	<<set $activeSlave.balls to 0>>
	<<set $activeSlave.scrotum to 0>>
	<<set $activeSlave.preg to 0>> /*removing contraception of default slave generation so isFertile can work right*/
	<<if isFertile($activeSlave)>>
	<<set $activeSlave.vagina to random(1,4)>>
	<<set $activeSlave.preg to random(21,35)>>
	<<if random(1,2) == 1 && $seeHyperPreg == 1>>
	<<set $activeSlave.pregType to random(10,29)>>
	<<else>>
	<<set $activeSlave.pregType to random(3,5)>>
	<</if>>
	<</if>>
	<<set $activeSlave.lactation to random(0,1)>>
<<elseif $arcologies[$i].FSRestart > 50>>
	They have all been rendered unable to reproduce.
	<<if $activeSlave.ovaries == 1>>
		<<set $activeSlave.preg to -2>>
	<</if>>
	<<if $activeSlave.balls > 0>>
		<<set $activeSlave.balls to 0>>
	<</if>>
	<<if $arcologies[$i].FSRestartResearch == 1>>
		Smart and attractive slaves are beginning to be a rarity lately.
		<<if $activeSlave.face >= 0>>
			<<set $activeSlave.face -= 3>>
		<</if>>
		<<if $activeSlave.intelligence >= 0>>
			<<set $activeSlave.intelligence -= 3>>
		<</if>>
		<<set $activeSlave.chem to random(40,100)>>
		<<set $activeSlave.addict to either(0,0,0,0,0,0,0,0,5,20,20,50,100)>>
	<</if>>
<</if>>
<<if $arcologies[$i].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[$i].FSDegradationist > 20>>
	They can be depended upon to be terrified into abject submission.
	<<if $activeSlave.trust > -10>>
	<<set $activeSlave.trust -= random(0,10)>>
	<</if>>
	<<if random (1,100) > 90>>
		<<set $activeSlave.eyes = -2>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSBodyPurist > 80>>
	They're quite pristine, free of any genomic damage or addictions regardless of any transformations they've had.
	<<set $activeSlave.chem to 0>>
	<<set $activeSlave.addict to 0>>
<<elseif $arcologies[$i].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 to 200*random(2,20)>>
	<<set $activeSlave.boobs += $activeSlave.boobsImplant>>
	<<set $activeSlave.buttImplant to random(2,5)>>
	<<set $activeSlave.butt += $activeSlave.buttImplant>>
	<<set $activeSlave.lipsImplant to either(10,20)>>
	<<set $activeSlave.lips += $activeSlave.lipsImplant>>
	<<if $arcologies[$i].FSTransformationFetishistResearch == 1 && random(1,100) <= 20>>
		This one's implants are unusually large; showcasing what her home arcology is capable of.
		<<set $activeSlave.boobsImplant += 200*random(100,200)>>
		<<set $activeSlave.boobs += $activeSlave.boobsImplant>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSYouthPreferentialist > 20>>
	They're usually on the younger side.
	<<if $activeSlave.actualAge > 30>>
	<<if random(0,1) == 0>>
	<<set $activeSlave.actualAge to random(18,25)>>
	<<set $activeSlave.visualAge = $activeSlave.actualAge>>
	<<set $activeSlave.physicalAge = $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[$i].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>>
		<<AgeImplantAdjustment>>
	<</if>>
	<</if>>
<<elseif $arcologies[$i].FSMaturityPreferentialist > 20>>
	They're usually on the more mature side.
	<<if $activeSlave.actualAge < 30>>
	<<if random(0,1) == 0>>
	<<set $activeSlave.actualAge to random(36,$retirementAge)>>
	<<set $activeSlave.visualAge = $activeSlave.actualAge>>
	<<set $activeSlave.physicalAge = $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[$i].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 to random(-30,0)>>
	<</if>>
<<elseif $arcologies[$i].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[$i].FSAssetExpansionistResearch == 1 && random(1,100) <= 20>>
		This one is unusually large; showcasing what her home arcology is capable of.
		<<set $activeSlave.boobs to 200*random(100,200)>>
		<<set $activeSlave.butt to random(10,20)>>
		<<if $seeDicks != 0>>
			<<set $activeSlave.dick to random(20,30)>>
			<<set $activeSlave.balls to random(20,125)>>
		<</if>>
	<</if>>
<</if>>
<<if $arcologies[$i].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 to either(0,1,1,1,1,2)>>
	<</if>>
	<<if $activeSlave.weight < -10>>
	<<set $activeSlave.weight += random(0,20)>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSPhysicalIdealist > 20>>
	They're usually quite muscular, some to a truly imposing degree, and they're almost never unhealthy.
	<<set $activeSlave.muscles to random(10,100)>>
	<<if $activeSlave.health < 20>>
	<<set $activeSlave.health += random(0,8)>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSChattelReligionist > 20>>
	They're rarely anything but devoted, and sometimes present interesting peccadilloes.
	<<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 to "sinful">>
	<</if>>
<</if>>
<<if $arcologies[$i].FSRomanRevivalist > 20>>
	They've often seen things that drive any squeamishness out of them.
	<<if random(0,1) == 0>>
	<<set $activeSlave.sexualQuirk to "unflinching">>
	<</if>>
<<elseif $arcologies[$i].FSEgyptianRevivalist > 20>>
	They've often done things that give them a distinct appetite for perversion.
	<<if random(0,1) == 0>>
	<<set $activeSlave.sexualQuirk to "perverted">>
	<</if>>
<<elseif $arcologies[$i].FSEdoRevivalist > 20>>
	They have frequently absorbed much culture there.
	<<set $activeSlave.entertainSkill = Math.clamp($activeSlave.entertainSkill, 35, 100)>>
<<elseif $arcologies[$i].FSArabianRevivalist > 20>>
	They've often been part of large harems in which selflessness is prized.
	<<if random(0,1) == 0>>
	<<set $activeSlave.sexualQuirk to "caring">>
	<</if>>
<<elseif $arcologies[$i].FSChineseRevivalist > 20>>
	They've all passed through a thorough and uncompromising educational system for slaves.
	<<set $activeSlave.intelligenceImplant to 1>>
	<<if $activeSlave.intelligence < 2>>
	<<set $activeSlave.intelligence += random(0,2)>>
	<</if>>
<</if>>

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

<<if ($arcologies[0].FSDegradationist != "unset") && ($arcologies[$i].FSPaternalist != "unset")>>
	<<set $activeSlave.devotion = random(-90,-60)>>
	<<set $activeSlave.trust = -20>>
	''$arcologies[$i].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[$i].FSPaternalist != "unset")>>
	<<set $activeSlave.devotion = random(60,90)>>
	<<set $activeSlave.trust = 20>>
	''$arcologies[$i].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[$i].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[$i].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>>

<</if>>
<</for>>

/*

<<set $activeSlave.sexualQuirk to either("gagfuck queen", "painal queen", "strugglefuck queen", "tease", "romantic", "perverted", "caring", "unflinching", "size queen")>>

<<set $activeSlave.behavioralQuirk to either("confident", "cutting", "funny", "adores women", "adores men", "fitness", "insecure", "sinful", "advocate")>>

*/

<<else>>

You're in the area of the slave market populated by slave trainers, easily the wealthiest vendors. The slaves here have received obedience training and medical care, and many have had some basic sexual skills forced on them.
<<if $arcologies[0].FSPaternalistSMR == 1>>
	Though the rules of your arcology protected them from the worst excesses of the training profession, many of the slaves on sale have the haunted look of people still coming to terms with the idea that they no longer have any bodily autonomy.
<<else>>
	<<set $seed to random(1,4)>>
	The trainers are a competitive bunch, and to go by what you can hear,
	<<if ($seed == 1) && ($seeDicks != 0) && (random(0,100) > $seeDicks)>>
	moaning interspersed with lewd, well-lubricated noises coming from both anal sex and vigorous masturbation,
	<<elseif ($seed is 2) && ($seeDicks != 100) && (random(0,100) > $seeDicks)>>
	moaning and the distinctive slap of feminine buttocks on thighs beneath them as a girl rides a dick,
	<<elseif ($seed is 3)>>
	the lush, lewd sounds of diligent oral sex,
	<<else>>
	the call-and-response of a trainer and a slave running through a memorized obedience exercise,
	<</if>>
	at least one of them is applying some last-minute training to a slave in the holding pens nearby.
<</if>>

<<set $activeSlaveOneTimeMaxAge to 42>>
<<include "Generate New Slave">>
<<set $activeSlave.origin to "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 to 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 to 1>>
<<if $activeSlave.accent >= 3>>
	<<set $activeSlave.accent -= 1>>
<</if>>
<<if random(1,100) > 50>>
	<<set $activeSlave.sexualFlaw to "none">>
<</if>>
<<if random(1,100) > 50>>
	<<set $activeSlave.behavioralFlaw to "none">>
<</if>>

<</if>>

<br><br>

<<slaveCost $activeSlave>>
<<if $slavesSeen > $slaveMarketLimit>><<set $slaveCost += $slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1)>><</if>>

<<if $slaveMarket == "corporate">>
	<<if $publicShares <= $personalShares*0.2>>
		Your commanding share of the corporation allows you to purchase its slaves at a very steep discount.
		<<set $slaveCost *= 0.7>>
	<<elseif $publicShares <= $personalShares*0.5>>
		Your large share of the corporation permits you to purchase its slaves at a steep discount.
		<<set $slaveCost *= 0.8>>
	<<else>>
		Your shares of the corporation come with a decent discount on its slaves.
		<<set $slaveCost *= 0.9>>
	<</if>>
<<elseif $slaveMarket is "neighbor">>
	<<for $i to 0; $i < $arcologies.length; $i++>>
	<<if $arcologies[$i].direction is $direction>>
	<<if $opinion != 0>>
		<<set $slaveCost -= Math.trunc($slaveCost*$opinion*0.05)>>
		<<if $opinion > 2>>
			Your cultural ties with ''$arcologies[$i].name'' helps keep the price reasonable.
		<<elseif $opinion < -2>>
			Your social misalignment with ''$arcologies[$i].name'' drives up the price.
		<</if>>
	<</if>>
	<</if>>
	<</for>>
<</if>>

<<set $slaveCost to 500*Math.trunc($slaveCost/500)>>
The offered price is ¤<<print $slaveCost>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
<br>
<<if $cash >= $slaveCost>>
	[[Buy her slave contract|New Slave Intro][$cash -= $slaveCost,$nextButton to "Continue",$nextLink to "AS Dump",$returnTo to "Main"]]
<<else>>
	//You lack the necessary funds to buy this slave.//
<</if>>
<br>
[[Decline to purchase her and check out another slave|Slave Markets][$slavesSeen += 1]]

<br><br>
<<if $slaveMarket != "indentures" && $slaveMarket != "neighbor" && $slaveMarket != "heap">>
	<<set $applyLaw to 1>>
<</if>>
<<set $saleDescription to 1>><<include "Long Slave Description">><<set $saleDescription to 0>>

<</nobr>>

src/uncategorized/slaveMarkets.tw