code:
:: Clinic [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Clinic", $showEncyclopedia = 1, $encyclopedia = "Clinic", $clinicSlaves = $CliniciIDs.length>>

<<if $clinicName != "the Clinic">>
	<<set $clinicNameCaps = $clinicName.replace("the ", "The ")>>
<</if>>

$clinicNameCaps
<<switch $clinicDecoration>>
<<case "Roman Revivalist">>
	is open and airy; a breeze wafts through the space, and Roman theories on natural cleanliness are very much on display.
<<case "Egyptian Revivalist">>
	is open and airy; clean rushes are strewn across the floor, making a gentle susurration when anyone crosses the space.
<<case "Edo Revivalist">>
	is clean and spartan to the point of featurelessness. Spotless tatami mats cover the floor, and partitions divide the space into cubicles.
<<case "Arabian Revivalist">>
	is open and airy; a thin trail of smoke wafts through the space on a gentle breeze, coming from a brazier burning incense.
<<case "Chinese Revivalist">>
	is open and airy; a thin trail of smoke wafts through the space on a gentle breeze, coming from a brazier burning medicinal herbs.
<<case "Chattel Religionist">>
	is open and airy; shaded beams of sunlight shine through skylights to bathe each bed in a pool of healing warmth.
<<case "Degradationist">>
	is clean and cold, all scrubbed tile and cool steel. The beds have prominent restraint attachment points to force patients into any position desired.
<<case "Repopulation Focus">>
	is warm and inviting, with wide corridors and ample seating for its pregnant clientele. All the equipement is designed to accommodate heavily pregnant women.
<<case "Eugenics">>
	is warm and inviting on one side, cold and utilitarian on the other. Only the toys of the elite are allowed the best of care.
<<case "Asset Expansionist">>
	is utilitarian, without any concession to style. Every available centimeter of space is used for equipment specialized to support growth.
<<case "Transformation Fetishist">>
	is utilitarian, without any concession to style. Every available centimeter of space is used for equipment specialized to support radical surgery.
<<case "Gender Radicalist">>
	is comfortable and feminine. Its curving walls and soft colors are designed to present slaves coming out of anaesthesia with an impression of girlishness.
<<case "Gender Fundamentalist">>
	is comfortable and feminine. Its curving walls and soft colors are designed to keep slaves here for their female health nice and comfortable.
<<case "Physical Idealist">>
	is utilitarian, without any concession to style. Every available centimeter of space is used for some piece of equipment useful in making the human body faster or stronger.
<<case "Supremacist">>
	is clean and cold, all scrubbed tile and cool steel. The only hint of its radical uses are the pseudoscientific racialist charts on the walls.
<<case "Subjugationist">>
	is clean and cold, all scrubbed tile and cool steel. The only hint of its radical uses are the pseudoscientific racialist charts on the walls.
<<case "Paternalist">>
	is warm and inviting, with curved walls and warm colors designed to put patients at their ease. Each bed is well provided with entertainment options.
<<case "Pastoralist">>
	is utilitarian, without any concession to style. Every available centimeter of space is used for equipment specialized for human veterinary medicine.
<<case "Maturity Preferentialist">>
	is comfortable and soothing, with curved walls and cool colors designed to keep patients relaxed. Each bed is provided with refined yet invariably pornographic entertainment options.
<<case "Youth Preferentialist">>
	is bright and cheerful, with curved walls and pastel colors designed to keep patients in good spirits. Each bed is provided with light entertainment options.
<<case "Body Purist">>
	is utilitarian, without any concession to style. Every available centimeter of space is filled with equipment designed to make medicine as low-impact as possible.
<<case "Slimness Enthusiast">>
	is warm and inviting, with curved walls and warm colors designed to put patients at their ease. Each bed is well provided with entertainment options.
<<default>>
	is a well-equipped modern medical facility. Each patient has her own area, with heavy automation to provide her treatment without any human intervention at all.
<</switch>>

<<if $clinicSlaves > 2>>
	$clinicNameCaps is busy. Patients occupy many of the beds; most are alert, but a few are dozing under medication designed to promote healing through deep rest.
<<elseif $clinicSlaves > 0>>
	$clinicNameCaps is sparsely populated. Patients occupy a few of the beds; most are alert, but a few are dozing under medication designed to promote healing through deep rest.
<<elseif $Nurse != 0>>
	$Nurse.slaveName is alone in the clinic, and has nothing to do but keep the place spotlessly clean and ready for its next patients.
<<else>>
	$clinicNameCaps is empty and quiet. [[Decommission the Clinic|Main][$clinic = 0, $clinicDecoration = "standard", $clinicUpgradeScanner = 0, $clinicUpgradeFilters = 0, $clinicUpgradePurge = 0, $clinicInflateBelly = 0, $clinicSpeedGestation = 0]]
<</if>>

<<set _Tmult0 = Math.trunc($clinic*1000*$upgradeMultiplierArcology)>>

$clinicNameCaps has room to support $clinic slaves while they receive treatment.
[[Expand the clinic|Clinic][$cash -= _Tmult0, $clinic += 5]] //Costs ¤_Tmult0//

<<if $clinicUpgradeScanner == 1>>
	$clinicNameCaps's scanners have been upgraded with a sampling system that can estimate carcinogenic damage to a slave's genome.
<<else>>
	<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology)>>
	It mounts powerful medical scanning technology. [[Upgrade the scanners to help detect genomic damage|Clinic][$cash -= _Tmult1, $clinicUpgradeScanner = 1]] //Costs ¤_Tmult1//
<</if>>

<<if $clinicUpgradeFilters == 1>>
	<<if $clinicUpgradePurge == 1>>
		The entire floor beneath $clinicName is occupied by a huge filtration plant that constantly cycles out the patients' blood to remove impurities. The blood is intensely cleaned to greatly decrease the presence of impurities at the cost of compatability. Patients will likely be ill for the duration of the treatment.
	<<else>>
		<<set _Tmult3 = Math.trunc(150000*$upgradeMultiplierArcology)>>
		The entire floor beneath $clinicName is occupied by a huge filtration plant that constantly cycles out the patients' blood to remove impurities. [[Increase the effectiveness of the impurity purging|Clinic][$cash -= _Tmult3, $clinicUpgradePurge to 1]] //Costs ¤_Tmult3 and may cause health problems in slaves//
	<</if>>
<<else>>
	<<set _Tmult2 = Math.trunc(50000*$upgradeMultiplierArcology)>>
	It includes standard dialysis equipment. [[Install advanced blood treatment equipment to help address drug side effects|Clinic][$cash -= _Tmult2, $clinicUpgradeFilters = 1]] //Costs ¤_Tmult2//
<</if>>

<<if $bellyImplants == 1 && $clinicInflateBelly == 1>>
	$clinicNameCaps is useful for keeping slaves healthy during long term procedures. Slaves in $clinicName with inflantable belly implants will be filled during their time under $Nurse.slaveName's supervision to maximize growth with minimized health complications. [[Do not fill belly implants|Clinic][$clinicInflateBelly = 0]]
<<elseif $bellyImplants == 1 && $Nurse == 0>>
	A resident nurse could be used to safely regulate the rate a slave's fillable belly implant for maximum size with minimum health loss.
<<elseif $bellyImplants == 1 && $Nurse != 0 && $clinicInflateBelly != 1>>
	$clinicNameCaps is useful for keeping slaves healthy during long term procedures. $Nurse.slaveName can supervise weekly filling regiments for clinic slaves with fillable belly implants during their stay to maximize growth with minimal health complications. [[Fill belly implants|Clinic][$clinicInflateBelly = 1]]
<</if>>

<<if $pregSpeedControl == 1 && $clinicSpeedGestation == 1>>
	It's exceedingly dangerous to speed up gestation without constant supervision. In $clinicName, $Nurse.slaveName will monitor slaves on rapid gestation agents; making sure the growing patients' food demands are met, monitoring their skin and womb and, if need be, perform an emergency c-section should the need arise. [[Limit rapid gestation agents to slected slaves only|Clinic][$clinicSpeedGestation = 0]]
<<elseif $pregSpeedControl == 1 && $Nurse == 0>>
	A resident nurse could be used to supervise patients under rapid gestation agents while minimizing strain and health complications.
<<elseif $pregSpeedControl == 1 && $Nurse != 0 && $clinicSpeedGestation != 1>>
	$clinicNameCaps is currently not applying rapid gestation agents to pregnant patients. Only individually selected slaves will undergo this procedure [[Speed up gestation for all pregnant patients|Clinic][$clinicSpeedGestation = 1]]
<</if>>

<<if $Nurse != 0>>
	<<set $Flag = 2>>
	<<include "Slave Summary">>
<<else>>
	You do not have a slave serving as a clinical Nurse. [[Appoint one|Nurse Select]]
<</if>>

<<if $clinicSlaves > 0>>

''Take a slave out of the clinic:''
	<<set $Flag = 1>>
	<<include "Slave Summary">>
<</if>>

<<if $clinic <= $clinicSlaves>>

''$clinicNameCaps is full and cannot hold any more slaves''
<<elseif ($slaves.length > $clinicSlaves)>>

''Send a slave to get treatment in $clinicName:''
	<<set $Flag = 0>>
	<<include "Slave Summary">>
<</if>>
<<unset $Flag>>

Rename $clinicName: <<textbox "$clinicName" $clinicName "Clinic">> //Use a noun or similar short phrase//


code:
:: Clinic Report [nobr]

<<set _healthBonus = 0, _idleBonus = 0, _FLsFetish = 0, _restedSlaves = 0, _DL = $CliniciIDs.length, $clinicSlaves = _DL, _SL = $slaves.length, _FLs = -1>>

<<for _dI = 0; _dI < _DL; _dI++>>
<<set _i = $CliniciIDs[_dI].Index, _ID = $CliniciIDs[_dI].ID>>
<<if _ID != $slaves[_i].ID>>
	/% Slaves.ID and $CliniciIDs.ID's don't match-up so let's find her %/
	<<for _i = 0; _i < _SL; _i++>>
	<<if _ID == $slaves[_i].ID>>
		/% Correct the Index %/
		<<set $CliniciIDs[_dI].Index = _i>>
	<</if>>
	<</for>>
<</if>>
<</for>>
<<SlaveSort $CliniciIDs>>

<<if $clinicDecoration != "standard">>
	<<set _devBonus = 1>>
<<else>>
	<<set _devBonus = 0>>
<</if>>

<<if $Nurse != 0>>
	<<for _FLs = 0; _FLs < _SL; _FLs++>>
	<<if $slaves[_FLs].ID == $Nurse.ID>>
		<<break>>
	<</if>>
	<</for>>
	<<if ($slaves[_FLs].health < 100)>>
	<<set $slaves[_FLs].health += 20>>
	<</if>>
	<<if ($slaves[_FLs].devotion <= 60)>>
	<<set $slaves[_FLs].devotion++>>
	<</if>>
	<<if $slaves[_FLs].trust < 60>>
	<<set $slaves[_FLs].trust++>>
	<</if>>
	<<set $slaves[_FLs].devotion += _devBonus>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
	<<if $slaves[_FLs].fetish != "dom">>
		<<fetishChangeChance $slaves[_FLs]>>
		<<if $fetishChangeChance > random(0,100)>>
			<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "dom">>
		<</if>>
	<<elseif $slaves[_i].fetishKnown == 0>>
		<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
	<<else>>
		<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
	<</if>>
	<</if>>
	<<set $Nurse = $slaves[_FLs]>>
	    $Nurse.slaveName is serving as the clinical nurse.
	<<if $Nurse.relationship == -3>>
		She does her best to be a caring and nurturing wife.
		<<set _healthBonus += 2>>
	<</if>>
	<<if (_FLsFetish == 1)>>
		Her job involves giving naked sex slaves orders for their own good. Even though most of these commands are medical rather than sexual, she can be forgiven for not always seeing the difference, and @@color:lightsalmon;becomes more dominant.@@
	<<elseif (_FLsFetish == 2)>>
		Every new patient in the clinic is a new target for her authority. @@color:lightsalmon;She becomes more dominant.@@
	<</if>>
	<<if $nurseCareers.includes($Nurse.career)>>
		She has experience with medicine from her life before she was a slave, and can often recognize conditions before even the medical scanners can.
		<<set _idleBonus++, _healthBonus++>>
	<</if>>
	<<if ($Nurse.fetish == "dom")>>
		She raps out commands with the confidence of long and partly sexual experience, so patients are inclined to follow even unpleasant medical instructions.
		<<set _idleBonus++, _healthBonus++>>
	<</if>>
	<<if ($Nurse.muscles > 5)>>
		She's strong enough to gently but firmly restrain resistant slaves, allowing her to be sparing with the inescapable but less healthy restraints.
		<<set _idleBonus++>>
	<</if>>
	<<if ($Nurse.intelligence > 1)>>
		The diagnostic equipment is state-of-the-art, but she's smart and perceptive enough that on occasion, she can add meaningfully to its medical scans.
		<<set _idleBonus++, _healthBonus++>>
	<</if>>
	<<if ($Nurse.face > 40)>>
		Patients rarely object to seeing her gorgeous face hovering over them.
		<<set _idleBonus++, _devBonus++>>
	<</if>>
	<<if ($Nurse.muscles > 5) || ($slaves[_i].devotion >= -20)>>
		<<set _healthBonus++>>
	<</if>>
	<<if $clinicSlaves > 0>>
	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set _i = $CliniciIDs[_dI].Index>>
		<<if $familyTesting == 1>>
			<<if $slaves[_i].mother == $Nurse.ID>>
				She makes sure to spend extra time caring for her daughter, $slaves[_i].slaveName.
				<<set $slaves[_i].trust++, $slaves[_i].health++>>
			<</if>>
			<<if $slaves[_i].father == $Nurse.ID>>
				She makes sure to spend extra time caring for her daughter, $slaves[_i].slaveName.
				<<set $slaves[_i].trust++, $slaves[_i].health++>>
			<</if>>
			<<if $slaves[_i].ID == $Nurse.father>>
				She makes sure to spend extra time caring for her father, $slaves[_i].slaveName.
				<<set $slaves[_i].trust++, $slaves[_i].health++>>
			<</if>>
			<<if $slaves[_i].ID == $Nurse.mother>>
				She makes sure to spend extra time caring for her mother, $slaves[_i].slaveName.
				<<set $slaves[_i].trust++, $slaves[_i].health++>>
			<</if>>
			<<if areSisters($slaves[_i], $Nurse) == 1>>
				She makes sure to spend extra time caring for her twin sister, $slaves[_i].slaveName.
				<<set $slaves[_i].trust++, $slaves[_i].health++>>
			<<elseif areSisters($slaves[_i], $Nurse) == 2>>
				She makes sure to spend extra time caring for her sister, $slaves[_i].slaveName.
				<<set $slaves[_i].trust++, $slaves[_i].health++>>
			<<elseif areSisters($slaves[_i], $Nurse) == 3>>
				She makes sure to spend extra time caring for her half-sister, $slaves[_i].slaveName.
				<<set $slaves[_i].trust++, $slaves[_i].health++>>
			<</if>>
		<<else>>
		<<if $Nurse.relationTarget == $slaves[_i].ID>>
			She makes sure to spend extra time caring for her $slaves[_i].relation, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++, $slaves[_i].health++>>
		<</if>>
		<</if>> /*closes extended family mode */
		<<if $Nurse.relationshipTarget == $slaves[_i].ID>>
			She dedicates most of her attention to her <<if $Nurse.relationship == 1>>friend<<elseif $Nurse.relationship == 2>>best friend<<elseif $Nurse.relationship == 3>>friend with benefits<<elseif $Nurse.relationship == 4>>lover<<elseif $Nurse.relationship == 5>>slave wife<</if>>, $slaves[_i].slaveName, making sure she has everything she needs and more.  This lavish attention detracts from her overall effectiveness.
			<<set _idleBonus -= 3, $slaves[_i].devotion++, $slaves[_i].trust++, $slaves[_i].health += 3>>
		<</if>>
		<<if $Nurse.rivalryTarget == $slaves[_i].ID>>
			She purposefully neglects the needs of her <<if $Nurse.rivalry == 1>>growing rival<<elseif $Nurse.rivalry == 2>>rival<<elseif $Nurse.rivalry == 3>>bitter rival<</if>>, $slaves[_i].slaveName, hindering her recovery and deepening their dislike for each other.
			<<set $slaves[_i].devotion--, $slaves[_i].trust--, $slaves[_i].health -= 3>>
			<<if random(1,100) > 65>>
				<<set $Nurse.rivalry++, $slaves[_FLs].rivalry++, $slaves[_i].rivalry++>>
			<</if>>
		<</if>>
		<<switch $slaves[_i].prestigeDesc>>
		<<case "She is a famed Free Cities whore, and commands top prices.">>
			She does her best to aid the famous whore, $slaves[_i].slaveName, making sure to pay special attention to her worn holes.
			<<set $slaves[_i].health += 2>>
		<<case "She is a famed Free Cities slut, and can please anyone.">>
			She does her best to aid the famous entertainer, $slaves[_i].slaveName, making sure she can show off as soon as possible.
			<<set $slaves[_i].health += 2>>
		<<case "She is remembered for winning best in show as a cockmilker.">>
			She does her best to aid the dribbling $slaves[_i].slaveName, paying special attention to her huge cock and balls as well as making sure to milk her erect dick hourly.
			<<set $slaves[_i].health += 4>>
			<<if (random(1,100) > 65) && (($Nurse.fetish == "none") || ($Nurse.fetish == "cumslut"))>>
			<<if $Nurse.fetish == "none">>
			<<set $Nurse.fetish = "cumslut", $slaves[_FLs].fetish = "cumslut">>
			<<else>>
			<<set $Nurse.fetishStrength += 4, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
			<</if>>
		<<case "She is remembered for winning best in show as a dairy cow.">>
			She does her best to aid the leaking $slaves[_i].slaveName, paying special attention to her huge breasts as well as making sure to milk her hourly.
			<<set $slaves[_i].health += 4>>
			<<if (random(1,100) > 65) && (($Nurse.fetish == "none") || ($Nurse.fetish == "boobs"))>>
			<<if $Nurse.fetish == "none">>
			<<set $Nurse.fetish = "boobs", $slaves[_FLs].fetish = "boobs">>
			<<else>>
			<<set $Nurse.fetishStrength += 4, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
			<</if>>
		<<case "She is remembered for winning best in show as a breeder." && $slaves[$i].preg > 10>>
			She does her best to aid the pregnant $slaves[_i].slaveName, paying special attention to her swollen belly and the welfare of the life within.
			<<set $slaves[_i].health += 6>>
		<<case "She is remembered for winning best in show as a breeder.">>
			She does her best to aid the breeder $slaves[_i].slaveName, paying special attention to her fertility and reproductive organs.
			<<set $slaves[_i].health += 4>>
		<</switch>>
		<<if $slaves[_i].bellyImplant > 0 && $clinicInflateBelly == 1>>

''@@color:pink;$slaves[_i].slaveName@@'' spent a lot of time during the week under IV-like stands with bags of innert filler steadily flowing into her belly implant, slowly pushing her belly further and further out. Careful attention, along with several drug injections, were used to make sure her body was able to safely adjust to the implant's rapid growth.
			<<set $slaves[_i].bellyImplant += 1000, $slaves[_i].health -= 10>>
			<<if ($slaves[_i].devotion > 50)>>
				<<set $slaves[_i].devotion += 4, $slaves[_i].trust += 3>>
			<<elseif ($slaves[_i].devotion >= -20)>>
				<<set $slaves[_i].trust -= 5>>
			<<else>>
				<<set $slaves[_i].devotion -= 5, $slaves[_i].trust -= 10>>
			<</if>>
			<<if $slaves[_i].bellyImplant > 10000 && $arcologies[0].FSTransformationFetishistResearch != 1>>
				<<set $slaves[_i].bellyImplant = 10000 >>
				She filled to the maximum that her body can stand.
			<<elseif $slaves[_i].bellyImplant > 40000 >>
				<<set $slaves[_i].bellyImplant = 40000 >>
				She filled to the maximum that her body can stand.
			<</if>>
		<</if>>
		<<if $slaves[_i].preg >= 1 && $slaves[_i].preg < 31 && $slaves[_i].pregControl == "speed up">>

''@@color:pink;$slaves[_i].slaveName@@'' spends most of her time on bedrest being filled with rapid gestation agents and concentrated slave food. All she can do is <<if $slaves[_i].amp != 1 && canSee($slaves[_i])>>watch and feel her belly pushing further and further out with life<<elseif $slaves[_i].amp != 1>>watch her belly bulging further and further out with life<<elseif !canSee($slaves[_i])>>feel her belly pushing further and further out with life beneath her fingers<<else>>feel the every growing pressure inside her abdomen<</if>>. Careful attention, along with numerous drug injections, are used to make sure her body is able to safely adjust to her pregnancy's rapid growth.
			<<set $slaves[_i].health -= 10>>
			<<if ($slaves[_i].devotion > 50)>>
				<<set $slaves[_i].devotion += 2, $slaves[_i].trust += 1>>
			<<elseif ($slaves[_i].devotion >= -20)>>
				<<set $slaves[_i].trust -= 5>>
			<<else>>
				<<set $slaves[_i].devotion -= 5, $slaves[_i].trust -= 10>>
			<</if>>
			<<if $slaves[_i].preg >= 31 && $slaves[_i].pregControl == "speed up">>
				<<set $slaves[_i].pregControl == "none">>
				''@@color:pink;$slaves[_i].slaveName's@@'' child is ready to pop out of her womb, ''@@color:yellow;her course of rapid gestation agents is finished''.
			<</if>>
		<</if>>
	<</for>>
	<</if>>
	<<if ($clinicSlaves < $clinic)>>
		<<set _seed = random(1,10)+(($clinic-$clinicSlaves)*(random(150,170)+(_idleBonus*10))), $cash += _seed>>

    Since she doesn't have enough girls to occupy all her time, the clinic takes in citizens' slaves on a contract basis and she helps them too, earning @@color:yellowgreen;¤_seed.@@
	<</if>>
	<<if ($clinicSlaves > 0)>>
<</if>>
<</if>>

<<if ($clinicSlaves > 0)>>
	    <<if ($clinicSlaves == 1)>>''There is one slave receiving treatment in the clinic.''<<else>>''There are $clinicSlaves slaves receiving treatment in the clinic.''<</if>>
<</if>>

<<if ($Nurse != 0)>>
	<<set $i = _FLs>>
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages == 1 && $imageChoice == 0>>

			<<SlaveArt $slaves[_FLs] 0 0>>

		<</if>>
		/* 000-250-006 */
		''__@@color:pink;$slaves[_FLs].slaveName@@__'' is serving as the clinical nurse.

		<<if $slaves[$i].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[$i].devotion <= 20)>>
			<<set $slaves[$i].devotion -= 5>>
		<<else>>
			<<set $slaves[$i].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<if $slaves[$i].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[$i].devotion <= 20)>>
			<<set $slaves[$i].devotion -= 5>>
		<<else>>
			<<set $slaves[$i].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set $Nurse = $slaves[_FLs]>>
<</if>>

<<if ($clinicSlaves > 0)>>
<<for _dI = 0; _dI < _DL; _dI++>>
	<<set _i = $CliniciIDs[_dI].Index, $i = _i>>
	<<set $slaves[_i].health += 10 + ($curativeUpgrade * 10)>>
	<<if $slaves[_i].health > 100>>
	<<set $slaves[_i].health = 100>>
	<</if>>
	<<if $slaves[_i].devotion < 45>>
	<<set $slaves[_i].devotion += 4>>
	<</if>>
	<<if $slaves[_i].trust < 45>>
	<<set $slaves[_i].trust += 4>>
	<</if>>
	<<set $slaves[_i].devotion += _devBonus, $slaves[_i].health += _healthBonus>>
	<<if $clinicSpeedGestation == 1 && ($Nurse != 0)>>
		<<if $slaves[_i].preg > 0>>
			<<set $slaves[_i].pregControl = "speed up">>
		<</if>>
	<</if>>
	<<if ($Nurse != 0) && ($slaves[_i].chem > 15) && ($clinicUpgradeFilters == 1)>>
		<<set $slaves[_i].chem -= 5>>
		<<if $clinicUpgradePurge == 1>>
			<<set $slaves[_i].chem -= 50>>
			<<set $slaves[_i].chem = Math.clamp($slaves[_i].chem, 0, 10000)>>
			<<if $slaves[_i].health > -50>>
				<<set $slaves[_i].health = -50>>
			<</if>>
		<</if>>
	<</if>>
	/* slave release block become too much a mess, need to change structure*/
	<<set _stay = 0>>
	<<if ($slaves[_i].health <= 40)>>
		<<set _stay += 1>>
	<</if>>
	<<if ($slaves[_i].chem >= 20) && ($clinicUpgradeFilters == 1)>>
		<<set _stay += 1>>
	<</if>>
	<<if (($clinicSpeedGestation >= 0) && ($slaves[_i].preg >= 1) && $Nurse != 0) || ($Nurse != 0 && $slaves[_i].pregControl == "speed up")>>
		<<set _stay += 1>>
	<</if>>
	<<if (($slaves[$i].bellyImplant <= 40000 && $arcologies[0].FSTransformationFetishistResearch == 1) || ($slaves[_i].bellyImplant <= 10000))>>
		<<if ($clinicInflateBelly > 0) && ($slaves[_i].bellyImplant >= 100) && $Nurse != 0>>
			<<set _stay += 1>>
		<</if>>
	<</if>>
	<<if _stay == 0>>
		<<removeJob $slaves[_i] "get treatment in the clinic">>
		<<set _restedSlaves++, _dI--, _DL-->>
		<<continue>>
	<</if>>
	/* end of rewriten slave release check */
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages == 1 && $imageChoice == 0>>

			<<SlaveArt $slaves[$i] 0 0>>

		<</if>>
		/* 000-250-006 */
		''__@@color:pink;$slaves[$i].slaveName@@__'' is receiving treatment in the clinic.

    She<<include "SA rest">>

		<<if $slaves[$i].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[$i].devotion <= 20)>>
			<<set $slaves[$i].devotion -= 5>>
		<<else>>
			<<set $slaves[$i].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA rest">>
		<<if $slaves[$i].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[$i].devotion <= 20)>>
			<<set $slaves[$i].devotion -= 5>>
		<<else>>
			<<set $slaves[$i].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
<</for>>
	<<if (_restedSlaves > 0)>>

	<<if (_restedSlaves == 1)>>
		One slave has
	<<else>>
		_restedSlaves slaves have
	<</if>>
	been returned to @@color:green;health@@<<if $clinicUpgradeFilters == 1>> and @@color:green;purity@@<</if>> and will be released from the clinic before the end of the week.
	<<if $clinicDecoration != "standard">>
		$clinicNameCaps's $clinicDecoration atmosphere @@color:hotpink;had an impact on <<if _restedSlaves == 1>>her while she<<else>>them while they<</if>>@@ were getting treatment.
	<</if>>
	<</if>>
<</if>>
<<if $clinicSlaves || $Nurse>>

<</if>>

repo_name: breadedpigeon/fc


code:
:: Club [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Club", $showEncyclopedia = 1, $encyclopedia = "Club", $clubSlaves = $ClubiIDs.length>>

<<if $clubName != "the Club">>
	<<set $clubNameCaps = $clubName.replace("the ", "The ")>>
<</if>>

$clubNameCaps
<<switch $clubDecoration>>
<<case "Roman Revivalist">>
	is decorated like a Roman villa's entertainment rooms. There is a lot of white stone, plaster, and terracotta.
<<case "Egyptian Revivalist">>
	is decorated like a room in an ancient Egyptian palace. There are columns of warm stone and pools of clear water full of aquatic plants.
<<case "Edo Revivalist">>
	is furnished as an Edo period theatre. Performances of the traditional Japanese arts can be seen here, though more modern dancing happens in the evenings. In either case, geisha girls are present and willing.
<<case "Arabian Revivalist">>
	is designed like an open plaza in an Arabian palace, with a raised stage in the center for erotic dancing. Diaphanous, flowing curtains billow across the space, dispersing the narcotic smoke billowing from a score of hookahs.
<<case "Chinese Revivalist">>
	is furnished as an old Chinese disorderly house. It's intentionally packed in so that closeness and good cheer is obligatory here; prominent citizens share tables while their hangers-on jostle for room.
<<case "Chattel Religionist">>
	isn't a religious establishment, but it almost looks like one. It's clean and proper, with beams of natural light that come down to highlight holy sex slaves' bodies.
<<case "Degradationist">>
	has a perverted, debauched appearance. The decor is utilitarian so it can be cleaned easily, and the reason is obvious. Many patrons have brought their own slaves to publicly rape here.
<<case "Repopulation Focus">>
	has a gaudy appearance. There are lots of deep soft chairs for pregnant patrons and slaves to rest in and screens showing girls with large bellies lining the walls.
<<case "Eugenics">>
	has a gaudy appearance. There are screens lining the walls discouraging unprotected slave sex. The real action happens in the several exclusive rooms reserved for society's best.
<<case "Asset Expansionist">>
	has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off big tits and plush asses.
<<case "Transformation Fetishist">>
	has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off huge fake tits and plastic dick sucking lips.
<<case "Gender Radicalist">>
	has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing closeups of cocks fucking every imaginable orifice.
<<case "Gender Fundamentalist">>
	has an old world appearance, a decidedly throwback atmosphere harking back to the glory days of cultures past.
<<case "Physical Idealist">>
	isn't a gym, but it smells like one. The dancing is rough and competitive, and the drinks are rich with protein.
<<case "Supremacist">>
	is decorated like an upper-class gentleman's club in the old countries of $arcologies[0].FSSupremacistRace people.
<<case "Subjugationist">>
	is decorated like an upper-class gentleman's club in the old countries which favored $arcologies[0].FSSubjugationistRace slaves.
<<case "Paternalist">>
	is handsome and well-kept, even romantic. Though the slaves here are sex slaves, every provision is made to encourage them to enjoy themselves.
<<case "Pastoralist">>
	is decorated to resemble a frontier disorderly house. The drinks are pounded straight, and there's a set of swinging doors for bad men to part dramatically as they enter.
<<case "Maturity Preferentialist">>
	is surprisingly elegant. The music consists of refined remixes of traditional dance music, offering slaves and citizens the chance to dance beautifully together.
<<case "Youth Preferentialist">>
	is deafeningly loud. There's a bright light show running, offering staccato glimpses of the scene out on the dance floor.
<<case "Body Purist">>
	is gorgeous, decorated and kept in the height of fashionable night establishment style. The music is cutting edge and everything and everyone is elegant.
<<case "Slimness Enthusiast">>
	is distinctly gaudy, with lots of sugary drinks on offer. The music and decor are of a decidedly bubblegum quality.
<<default>>
	is set up in an uncomplicated way. There's a bar for drinks, a dance floor for slave girls, and private rooms for slave sex.
<</switch>>

<<if $clubAdsSpending > 0>>
	Screens outside the entrance are showing softcore music videos to advertise $clubNameCaps.
	<<if $clubAdsOld == 1>>
		The featured strippers are all MILFs.
	<<elseif $clubAdsOld == -1>>
		The featured strippers are all nice and young.
	<<elseif $clubAdsOld == -2>>
		The featured strippers are all teenagers.
	<<elseif $clubAdsOld == -3>>
		The featured strippers are all lolis.
	<<else>>
		The featured strippers vary in age.
	<</if>>
	<<if $clubAdsStacked == 1>>
		Lots of bouncing breasts and butts
	<<elseif $clubAdsStacked == -1>>
		Lots of trim breasts and shapely butts
	<<else>>
		A variety of breast and butt sizes and shapes
	<</if>>
	are on display, and
	<<if $clubAdsImplanted == 1>>
		most of these are augmented by implants.
	<<elseif $clubAdsImplanted == -1>>
		they're all natural.
	<<else>>
		some are augmented by implants.
	<</if>>
	<<if $clubAdsPreg == 1>>
		Most of strippers have firm, rounded bellies.
	<<elseif $clubAdsPreg == -1>>
		Most of the strippers have firm, flat bellies.
	<<else>>
		Some of the strippers are pregnant.
	<</if>>
	<<if $clubAdsModded == 1>>
		Everything is heavily pierced and tattooed.
	<<elseif $clubAdsModded == -1>>
		Everything is free of tattoos and piercings.
	<<else>>
		Some of these assets are tattooed and pierced, and some aren't.
	<</if>>
	The strippers get naked quickly, and show off
	<<if $clubAdsXX == 1>>
		their pussies and assholes.
	<<elseif $clubAdsXX == -1>>
		their assholes.
	<<else>>
		their holes.
	<</if>>
	The ads are shown across the arcology.
	<<if ($clubAdsXX == 1) && ($clubAdsImplants == 1) && ($clubAdsStacked == 1)>>
		As a result, $clubName is known as the place to spend a night partying with<<if ($clubAdsPreg == 1)>>pregnant<</if>> bimbos.
	<<elseif ($clubAdsXX == 1) && ($clubAdsOld == 1)>>
		As a result, $clubName is known as the place to spend a night partying with<<if ($clubAdsPreg == 1)>>pregnant<</if>> MILFs.
	<<elseif ($clubAdsStacked == 1) && ($clubAdsOld == -3)>>
		As a result, $clubName is known as the place to spend a night partying with<<if ($clubAdsPreg == 1)>>pregnant<</if>> oppai lolis.
	<<elseif ($clubAdsXX == 1) && ($clubAdsPreg == 1)>>
		As a result, $clubName is known as the place to spend a night partying with pregnant sluts.
	<<elseif ($clubAdsXX == -1) && ($clubAdsStacked == 1)>>
		As a result, $clubName is known as the place to spend a night partying with shemales.
	<<elseif ($clubAdsXX == -1) && ($clubAdsStacked == -1)>>
		As a result, $clubName is known as the place to spend a night partying with traps.
	<</if>>
<</if>>

<<if $clubSlaves > 2>>
	$clubNameCaps is dotted with pretty, flirtatious slaves, stripping on stages, serving drinks, and dancing. They're very willing to suck patrons off in the open or give a public handjob, and there are little private rooms for them to use when engaging in heavier intercourse.
<<elseif $clubSlaves > 0>>
	There are a few pretty, flirtatious slaves, stripping on stages, serving drinks, and dancing. They're very willing to suck patrons off in the open or give a public handjob, and there are little private rooms for them to use when engaging in heavier intercourse.
<<elseif $DJ != 0>>
	$clubNameCaps is doing business normally, without a complement of sex slaves to spice things up. $DJ.slaveName is alone in $clubName, and can accomplish little by herself.
<<else>>
	$clubNameCaps is doing business normally, without a complement of sex slaves to spice things up. [[Decommission the rooms|Main][$club = 0, $clubDecoration = "standard", $clubUpgradePDAs = 0]]
<</if>>

<<if $clubSlaves > 2>>
<<switch $clubDecoration>>
<<case "Chattel Religionist">>
	From one of the private rooms, praying interspersed with the slap of leather on flesh can be heard.
<<case "Degradationist">>
	Agonized screaming can be heard from one of the private rooms.
<<case "Repopulation Focus">>
	A wet slapping sound is coming from one of the private rooms, the kind of sound made by mammary intercourse with very milky breasts. Occasionally crying can be heard from one of the rooms specially designed for patrons wishing to assfuck a slave as she gives birth.
<<case "Eugenics">>
	The slight sounds of whispering can be heard emanating from from one of the restricted rooms.
<<case "Asset Expansionist">>
	A wet slapping sound is coming from one of the private rooms, the kind of sound made by mammary intercourse with very large breasts.
<<case "Transformation Fetishist">>
	A wet slapping sound is coming from one of the private rooms, the kind of sound made by mammary intercourse with very large fake breasts.
<<case "Gender Radicalist">>
	Uncomfortable moaning from one of the private rooms suggests that a slave inside is taking a painfully large cock up her tight butt.
<<case "Gender Fundamentalist">>
	The unmistakable sound of vigorous vaginal intercourse can be heard from one of the private rooms.
<<case "Physical Idealist">>
	Bestial grunting can be heard from one of the private rooms.
<<case "Supremacist">>
	The sound of a beating, interspersed with desperate begging, can be heard from one of the private rooms.
<<case "Subjugationist">>
	The sound of a beating, interspersed with desperate begging, can be heard from one of the private rooms.
<<case "Paternalist">>
	The unmistakable sound of a slave experiencing an authentic orgasm can be heard from one of the private rooms.
<<case "Body Purist">>
	The faint but unmistakable sound of a slave trying to keep quiet while orgasming can be heard from one of the private rooms.
<<case "Slimness Enthusiast">>
	The faint but unmistakable sound of a shrill climax can be heard from one of the private rooms.
<<case "Pastoralist">>
	A faint gushing sound is audible from one of the private rooms.
<<case "Roman Revivalist">>
	A business meeting is just audible from one of the private rooms; only an occasional moan indicates that the businessmen are enjoying a couple of serving girls at the same time.
<<case "Egyptian Revivalist">>
	The smell of incense and the sounds of sex are drifting out of the private rooms.
<<case "Edo Revivalist">>
	The faint but unmistakable sound of a slave trying to keep quiet while orgasming can be heard from one of the private rooms.
<<case "Arabian Revivalist">>
	The faint sound of multiple slaves pleasuring a single patron can be heard from one of the private rooms.
<<case "Chinese Revivalist">>
	The faint but unmistakable sound of a slave trying to keep quiet while orgasming can be heard from one of the private rooms.
<<case "Maturity Preferentialist">>
	The faint sound of a well traveled slave showing off her experience can be heard from one of the private rooms.
<<case "Youth Preferentialist">>
	The faint but unmistakable sound of a shrill climax can be heard from one of the private rooms.
<<default>>
	The faint but unmistakable sound of a shrill climax can be heard from one of the private rooms.
<</switch>>
<</if>>

<<set _Tmult0 = Math.trunc($club*1000*$upgradeMultiplierArcology)>>

There are rooms off $clubName to support slaves as they work as club sluts. They can support $club slaves.
[[Expand the club|Club][$cash -= _Tmult0, $club += 5]] //Costs ¤_Tmult0 and will increase upkeep costs//

<<if $clubUpgradePDAs == 1>>
	$clubNameCaps has been wired for unobtrusive personal data assistants to let your sluts pass tips about enslaveable people to your recruiter.
<<else>>
	<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology)>>
	The rooms are standard. [[Upgrade them with PDAs to help your recruiter|Club][$cash -= _Tmult1, $clubUpgradePDAs = 1]] //Costs ¤_Tmult1 and will increase upkeep costs//
<</if>>

<<if $clubAdsSpending > 0>>
	$clubNameCaps is the subject of an active ad campaign.
<<else>>
	$clubNameCaps is not being advertised.
<</if>>
<<link "Manage club Advertisements">><<set $nextLink = passage()>><<set $nextButton = "Back">><<goto "Club Advertisement">><</link>>

<<if $DJ != 0>>
	<<set $Flag = 2>>
	<<include "Slave Summary">>
<<else>>
	You do not have a slave serving as a DJ. [[Appoint one|DJ Select]]
<</if>>

<<if $clubSlaves > 0>>

''Bring a slave out of $clubName:''
	<<set $Flag = 1>>
	<<include "Slave Summary">>
<</if>>

<<if $club <= $clubSlaves>>

''$clubNameCaps is full and cannot hold any more slaves''
<<elseif ($slaves.length > $clubSlaves)>>

''Send a slave to slut around $clubName:''
	<<set $Flag to 0>>
	<<include "Slave Summary">>
<</if>>
<<unset $Flag>>

Rename $clubName: <<textbox "$clubName" $clubName "Club">> //Use a noun or similar short phrase//


code:
:: Club Advertisement

<<nobr>>

<<if $arcologies[0].FSRomanRevivalistDecoration >= 60>>
	$clubNameCaps is decorated like a Roman villa's entertainment rooms. There is a lot of white stone, plaster, and terracotta.
<<elseif $arcologies[0].FSEgyptianRevivalistDecoration >= 60>>
	$clubNameCaps is decorated like a room in an ancient Egyptian palace. There are columns of warm stone and pools of clear water full of aquatic plants.
<<elseif $arcologies[0].FSEdoRevivalistDecoration >= 60>>
	$clubNameCaps is furnished as an Edo period theatre. Performances of the traditional Japanese arts can be seen here, though more modern dancing happens in the evenings. In either case, geisha girls are present and willing.
<<elseif $arcologies[0].FSArabianRevivalistDecoration >= 60>>
	$clubNameCaps is designed like an open plaza in an Arabian palace, with a raised stage in the center for erotic dancing. Diaphanous, flowing curtains billow across the space, dispersing the narcotic smoke billowing from a score of hookahs.
<<elseif $arcologies[0].FSChineseRevivalistDecoration >= 60>>
	$clubNameCaps is furnished as an old Chinese disorderly house. It's intentionally packed in so that closeness and good cheer is obligatory here; prominent citizens share tables while their hangers-on jostle for room.
<<elseif $arcologies[0].FSChattelReligionistDecoration >= 60>>
	$clubNameCaps isn't a religious establishment, but it almost looks like one. It's clean and proper, with beams of natural light that come down to highlight holy sex slaves' bodies.
<<elseif $arcologies[0].FSDegradationistDecoration >= 60>>
	$clubNameCaps has a perverted, debauched appearance. The decor is utilitarian so it can be cleaned easily, and the reason is obvious. Many patrons have brought their own slaves to publicly rape here.
<<elseif $arcologies[0].FSRepopulationFocusDecoration >= 60>>
	$clubNameCaps has a gaudy appearance. There are lots of deep soft chairs for pregnant patrons and slaves to rest in and screens showing girls with large bellies lining the walls.
<<elseif $arcologies[0].FSRestartDecoration >= 60>>
	$clubNameCaps has a gaudy appearance. There are screens lining the walls discouraging unprotected slave sex. The real action happens in the several exclusive rooms reserved for society's best.
<<elseif $arcologies[0].FSAssetExpansionistDecoration >= 60>>
	$clubNameCaps has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off big tits and plush asses.
<<elseif $arcologies[0].FSTransformationFetishistDecoration >= 60>>
	$clubNameCaps has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off huge fake tits and plastic dick sucking lips.
<<elseif $arcologies[0].FSGenderRadicalistDecoration >= 60>>
	$clubNameCaps has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing closeups of cocks fucking every imaginable orifice.
<<elseif $arcologies[0].FSGenderFundamentalistDecoration >= 60>>
	$clubNameCaps has an old world appearance, a decidedly throwback atmosphere harking back to the glory days of cultures past.
<<elseif $arcologies[0].FSPhysicalIdealistDecoration >= 60>>
	$clubNameCaps isn't a gym, but it smells like one. The dancing is rough and competitive, and the drinks are rich with protein.
<<elseif $arcologies[0].FSSupremacistDecoration >= 60>>
	$clubNameCaps is decorated like an upper-class gentleman's club in the old countries of $arcologies[0].FSSupremacistRace people.
<<elseif $arcologies[0].FSSubjugationistDecoration >= 60>>
	$clubNameCaps is decorated like an upper-class gentleman's club in the old countries which favored $arcologies[0].FSSubjugationistRace slaves.
<<elseif $arcologies[0].FSPaternalistDecoration >= 60>>
	$clubNameCaps is handsome and well-kept, even romantic. Though the slaves here are sex slaves, every provision is made to encourage them to enjoy themselves.
<<elseif $arcologies[0].FSBodyPuristDecoration >= 60>>
	$clubNameCaps is gorgeous, decorated and kept in the height of fashionable night establishment style. The music is cutting edge and everything and everyone is elegant.
<<elseif $arcologies[0].FSSlimnessEnthusiastDecoration >= 60>>
	$clubNameCaps is distinctly gaudy, with lots of sugary drinks on offer. The music and decor are of a decidedly bubblegum quality.
<<elseif $arcologies[0].FSPastoralistDecoration >= 60>>
	$clubNameCaps is decorated to resemble a frontier disorderly house. The drinks are pounded straight, and there's a set of swinging doors for bad men to part dramatically as they enter.
<</if>>

<<if $clubAdsSpending > 0>>
	Screens outside the entrance are showing softcore music videos to advertise $clubName.
	<<if $clubAdsOld == 1>>
	The featured strippers are all MILFs.
	<<elseif $clubAdsOld == -1>>
	The featured strippers are all nice and young.
	<<elseif $clubAdsOld == -2>>
	The featured strippers are all teenagers.
	<<elseif $clubAdsOld == -3>>
	The featured strippers are all lolis.
	<<else>>
	The featured strippers vary in age.
	<</if>>
	<<if $clubAdsStacked == 1>>
	Lots of bouncing breasts and butts
	<<elseif $clubAdsStacked == -1>>
	Lots of trim breasts and shapely butts
	<<else>>
	A variety of breast and butt sizes and shapes
	<</if>>
	are on display, and
	<<if $clubAdsImplanted == 1>>
	most of these are augmented by implants.
	<<elseif $clubAdsImplanted == -1>>
	they're all natural.
	<<else>>
	some are augmented by implants.
	<</if>>
	<<if $clubAdsPreg == 1>>
		Most of strippers have firm, rounded bellies.
	<<elseif $clubAdsPreg == -1>>
		Most of the strippers have firm, flat bellies.
	<<else>>
		Some of the strippers are pregnant.
	<</if>>
	<<if $clubAdsModded == 1>>
	Everything is heavily pierced and tattooed.
	<<elseif $clubAdsModded == -1>>
	Everything is free of tattoos and piercings.
	<<else>>
	Some of these assets are tattooed and pierced, and some aren't.
	<</if>>
	The strippers get naked quickly, and show off
	<<if $clubAdsXX == 1>>
	their pussies and assholes.
	<<elseif $clubAdsXX == -1>>
	their assholes.
	<<else>>
	their holes.
	<</if>>
<</if>>

<<if $clubAdsSpending >= 5000>>
	Advertisements based on these scenes run constantly in media across $arcologies[0].name, and there's an active merchandising campaign underway to promote your club and its girls.
<<elseif $clubAdsSpending >= 4000>>
	Advertisements based on these scenes run constantly in media across $arcologies[0].name.
<<elseif $clubAdsSpending >= 3000>>
	Advertisements based on these scenes are run in media across $arcologies[0].name.
<<elseif $clubAdsSpending >= 2000>>
	Advertisements based on these scenes run regularly in arcology media.
<<elseif $clubAdsSpending >= 1000>>
	Advertisements based on these scenes run occasionally in arcology media.
<<else>>
	$arcologies[0].name has a robust internal media that could be used to bring patrons into the club.
<</if>>

<</nobr>>

<<nobr>>

You are spending ¤$clubAdsSpending each week to advertise $clubName.

<<if $clubAdsSpending > 900>>
	<<link "Decrease">><<set $clubAdsSpending -= 1000>><<goto "Club Advertisement">><</link>> |
<<else>>
	Decrease |
<</if>>
<<if $clubAdsSpending < 5000>>
	<<link "Increase">><<set $clubAdsSpending += 1000>><<goto "Club Advertisement">><</link>>
<<else>>
	Increase
<</if>>

<</nobr>>

__Design Club Ad Campaign__ //Will replace relevant variety bonuses//
<<nobr>>

Asset size:
<<if $clubAdsStacked != 1>><<link "Stacked">><<set $clubAdsStacked = 1>><<goto "Club Advertisement">><</link>> | <<else>>Stacked | <</if>>
<<if $clubAdsStacked != -1>><<link "Slim">><<set $clubAdsStacked = -1>><<goto "Club Advertisement">><</link>> | <<else>>Slim | <</if>>
<<if $clubAdsStacked != 0>><<link "Variety">><<set $clubAdsStacked = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

Asset origin:
<<if $clubAdsImplanted != 1>><<link "Implants">><<set $clubAdsImplanted = 1>><<goto "Club Advertisement">><</link>> | <<else>>Implants | <</if>>
<<if $clubAdsImplanted != -1>><<link "All natural">><<set $clubAdsImplanted = -1>><<goto "Club Advertisement">><</link>> | <<else>>All natural | <</if>>
<<if $clubAdsImplanted != 0>><<link "Variety">><<set $clubAdsImplanted = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

Body mods:
<<if $clubAdsModded != 1>><<link "Modded">><<set $clubAdsModded = 1>><<goto "Club Advertisement">><</link>> | <<else>>Modded | <</if>>
<<if $clubAdsModded != -1>><<link "Unmodded">><<set $clubAdsModded = -1>><<goto "Club Advertisement">><</link>> | <<else>>Unmodded | <</if>>
<<if $clubAdsModded != 0>><<link "Variety">><<set $clubAdsModded = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

Age:
<<if $clubAdsOld != 1>><<link "MILF">><<set $clubAdsOld = 1>><<goto "Club Advertisement">><</link>> | <<else>>MILF | <</if>>
<<if $clubAdsOld != -1>><<link "Young">><<set $clubAdsOld = -1>><<goto "Club Advertisement">><</link>> | <<else>>Young | <</if>>
<<if $minimumSlaveAge < 18>>
<<if $clubAdsOld != -2>><<link "Teen">><<set $clubAdsOld = -2>><<goto "Club Advertisement">><</link>> | <<else>>Teen | <</if>>
<</if>>
<<if $minimumSlaveAge < 13>>
<<if $clubAdsOld != -3>><<link "Loli">><<set $clubAdsOld = -3>><<goto "Club Advertisement">><</link>> | <<else>>Loli | <</if>>
<</if>>
<<if $clubAdsOld != 0>><<link "Variety">><<set $clubAdsOld = 0>><<goto "Club Advertisement">><</link>> <<else>>Variety<</if>>

Pregnancy:
<<if $clubAdsPreg != 1>><<link "Gravid">><<set $clubAdsPreg = 1>><<goto "Club Advertisement">><</link>> | <<else>>Gravid | <</if>>
<<if $clubAdsPreg != -1>><<link "None">><<set $clubAdsPreg = -1>><<goto "Club Advertisement">><</link>> | <<else>>None | <</if>>
<<if $clubAdsPreg != 0>><<link "Variety">><<set $clubAdsPreg = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

<<if $seeDicks != 0>>
	Genitalia:
	<<if $clubAdsXX != 1>><<link "Pussies">><<set $clubAdsXX = 1>><<goto "Club Advertisement">><</link>> | <<else>>Pussies | <</if>>
	<<if $clubAdsXX != -1>><<link "Dicks">><<set $clubAdsXX = -1>><<goto "Club Advertisement">><</link>> | <<else>>Dicks | <</if>>
	<<if $clubAdsXX != 0>><<link "Variety">><<set $clubAdsXX = 0>><<goto "Club Advertisement">><</link>> <<else>>Variety<</if>>

<</if>>

<</nobr>>


code:
:: Club Report [nobr]

<<set $clubBonuses = 0, $DJRepBonus = 0, $implanted = 0, $legendaryEntertainerID = 0, $modded = 0, $old = 0, $pure = 0, $slim = 0, $stacked = 0, $unmodded = 0, $XX = 0, $XY = 0, $young = 0, _FLsFetish = 0, _DL = $ClubiIDs.length, $clubSlaves = _DL, _SL = $slaves.length, _FLs = -1>>
<<set $legendaryWombID to 0, $pregYes to 0, $pregNo to 0>>

<<if $DJ != 0>>
	<<for _FLs = 0; _FLs < _SL; _FLs++>>
	<<if $slaves[_FLs].ID == $DJ.ID>>
		<<break>>
	<</if>>
	<</for>>
	<<if ($slaves[_FLs].health < -80)>>
	<<set $slaves[_FLs].health += 20>>
	<<elseif $slaves[_FLs].health < -40>>
	<<set $slaves[_FLs].health += 15>>
	<<elseif $slaves[_FLs].health < 0>>
	<<set $slaves[_FLs].health += 10>>
	<<elseif $slaves[_FLs].health < 90>>
	<<set $slaves[_FLs].health += 7>>
	<</if>>
	<<if $slaves[_FLs].devotion <= 60>>
	<<set $slaves[_FLs].devotion += 5>>
	<</if>>
	<<if $slaves[_FLs].trust < 60>>
	<<set $slaves[_FLs].trust += 3>>
	<</if>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
	<<if $slaves[_FLs].fetish != "humiliation">>
		<<fetishChangeChance $slaves[_FLs]>>
		<<if $fetishChangeChance > random(0,100)>>
			<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "humiliation">>
		<</if>>
	<<elseif $slaves[_FLs].fetishKnown == 0>>
		<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
	<<else>>
		<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
	<</if>>
	<</if>>
	<<set $DJ = $slaves[_FLs]>>
	    $DJ.slaveName is performing as the DJ.
	<<if $DJ.relationship == -3>>
		She tries her best to be your energetic, cheerful wife.
		<<set $DJRepBonus += 0.1>>
	<</if>>
	<<if (_FLsFetish == 1)>>
		She's expected to be the innovative, beautiful DJ spinning beats one minute, and come out of her booth to grind on the floor the next; she enjoys the interplay, and finds greater @@color:lightcoral;pleasure in exhibitionism.@@
	<<elseif (_FLsFetish == 2)>>
		Every day she gets to enjoy hundreds of stares on her skin, and @@color:lightsalmon;becomes more of an exhibitionist.@@
	<</if>>
	<<if ($DJ.eyes == -2)>>
		Her lack of eyesight doesn't slow her down; rather, it strengthens her other senses. Her tracks have a distinct sound, since she experiences noise as her sight.
		<<set $DJRepBonus += 0.15>>
	<</if>>
	<<if ($DJ.entertainSkill <= 10)>>
		Though $DJ.slaveName does her best to lead on the club, with her lack of skill she can do little.
	<<elseif ($DJ.entertainSkill <= 30)>>
		$DJ.slaveName's basic skills marginally @@color:green;improve@@ the atmosphere on $clubName.
		<<set $DJRepBonus += 0.05>>
	<<elseif ($DJ.entertainSkill <= 60)>>
		$DJ.slaveName's skills @@color:green;improve@@ the atmosphere on $clubName.
		<<set $DJRepBonus += 0.1>>
	<<elseif ($DJ.entertainSkill < 100)>>
		$DJ.slaveName's skills greatly @@color:green;improve@@ the atmosphere on $clubName.
		<<set $DJRepBonus += 0.15>>
	<<elseif ($DJ.entertainSkill >= 100)>>
		$DJ.slaveName's mastery immensely @@color:green;improves@@ the atmosphere on $clubName.
		<<set $DJRepBonus += 0.20>>
	<</if>>
	<<if ($DJ.muscles > 5) && ($DJ.muscles <= 95)>>
		Her toned body helps her lead her fellow club girls by letting her dance all night.
		<<set $DJRepBonus += 0.05>>
	<</if>>
	<<if ($DJ.intelligence > 0)>>
		She's smart enough to make an actual contribution to the music, greatly enhancing the entire experience.
		<<set $DJRepBonus += 0.05*$DJ.intelligence>>
	<</if>>
	<<if ($DJ.face > 95)>>
		Her great beauty is a further draw, even when she's in her DJ booth, but especially when she comes out to dance.
		<<set $DJRepBonus += 0.05>>
	<</if>>
	<<if $DJCareers.includes($DJ.career)>>
		She has musical experience from her life before she was a slave, a grounding that gives her tracks actual depth.
		<<set $DJRepBonus += 0.05>>
	<</if>>
	<<set $i = _FLs>>
	<<if ($clubSlaves < $club)>>
		<<set $slavesGettingHelp = 0>>
		<<if $universalRulesFacilityWork == 1>>
		<<for _i = 0; _i < _SL; _i++>>
			<<if ($slaves[_i].assignment == "serve the public")>>
			<<set $slavesGettingHelp++>>
			<</if>>
		<</for>>
		<</if>>
		<<if ($clubSlaves+$slavesGettingHelp < $club)>>
			<<if ($legendaryEntertainerID == 0) && ($slaves[_FLs].prestige == 0) && ($slaves[_FLs].entertainSkill >= 100) && ($slaves[_FLs].devotion > 50)>>
				<<set $legendaryEntertainerID = $slaves[_FLs].ID>>
			<</if>>
			<<if $showEWD != 0>>

    She <<include "SA serve the public">>
			<<else>>
				<<silently>><<include "SA serve the public">><</silently>>
			<</if>>
			<<set $repGain += Math.trunc(($beauty*$FResult)*(1+(0.003*$slaves[_FLs].entertainSkill))*0.1*0.5)>>

    Since she doesn't have enough sluts in $clubName to make it worthwhile for her to be on stage 24/7, she spends her extra time time slutting it up herself. She has sex with $beauty citizens, @@color:green;pleasing them immensely,@@ since it's more appealing to fuck the DJ than some club slut.
		<</if>>
	<</if>>
	<<if ($clubSlaves > 0)>>
<</if>>
<</if>>

<<if ($clubSlaves > 0)>>
	<<set _possibleBonuses = 0>>
	    <<if ($clubSlaves != 1)>>''The $clubSlaves slaves pleasing citizens in $clubName''<<else>>''The one slave pleasing citizens in $clubName''<</if>> worked hard to @@color:green;increase your reputation@@ this week.
<</if>>

<<if ($DJ != 0)>>
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages == 1 && $imageChoice == 0>>

			<<SlaveArt $slaves[_FLs] 0 0>>

		<</if>>
		/* 000-250-006 */
		''__@@color:pink;$slaves[_FLs].slaveName@@__'' is performing as the DJ in the club.

		<<if $slaves[_FLs].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[_FLs].devotion <= 20)>>
			<<set $slaves[_FLs].devotion -= 5>>
		<<else>>
			<<set $slaves[_FLs].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<if $slaves[_FLs].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[$i].devotion <= 20)>>
			<<set $slaves[_FLs].devotion -= 5>>
		<<else>>
			<<set $slaves[_FLs].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set $DJ = $slaves[_FLs]>>
<</if>>

<<if $clubSlaves > 0>>
	<<SlaveSort $ClubiIDs>>
	<<for _dI = 0; _dI < _DL; _dI++>>
	<<set _i = $ClubiIDs[_dI].Index, _ID = $ClubiIDs[_dI].ID>>
	<<if _ID != $slaves[_i].ID>>
		/% Slaves.ID and $ClubiIDs.ID's don't match-up so let's find her %/
		<<for _i = 0; _i < _SL; _i++>>
		<<if _ID == $slaves[_i].ID>>
			/% Correct the Index %/
			<<set $ClubiIDs[_dI].Index = _i>>
			<<break>>
		<</if>>
		<</for>>
	<</if>>
	<<set $i = _i>>
	<<if ($legendaryEntertainerID == 0) && ($slaves[_i].prestige == 0) && ($slaves[_i].entertainSkill >= 100) && ($slaves[_i].devotion > 50) && ($slaves[_i].prestige == 0)>>
	<<set $legendaryEntertainerID = $slaves[_i].ID>>
	<</if>>
	<<if ($legendaryWombID == 0) && ($slaves[_i].amp != 1) && ($slaves[_i].preg > 30) && ($slaves[_i].pregType < 50) && ($slaves[_i].eggType == "human") && ($slaves[_i].births > 10) && ($slaves[_i].devotion > 50) && ($slaves[_i].prestige == 0)>>
	<<set $legendaryWombID = $slaves[_i].ID>>
	<</if>>
	<<if ($slaves[_i].devotion <= 20) && ($slaves[_i].trust > -20)>>
	<<set $slaves[_i].devotion -= 5, $slaves[_i].trust -= 5>>
	<<elseif ($slaves[_i].devotion < 45)>>
	<<set $slaves[_i].devotion += 4>>
	<<elseif ($slaves[_i].devotion >= 50)>>
	<<set $slaves[_i].devotion -= 4>>
	<</if>>
	<<if ($slaves[_i].trust < 30)>>
	<<set $slaves[_i].trust += 5>>
	<</if>>
	<<if ($slaves[_i].health < -80)>>
	<<set $slaves[_i].health += 20>>
	<<elseif ($slaves[_i].health < -40)>>
	<<set $slaves[_i].health += 15>>
	<<elseif ($slaves[_i].health < 0)>>
	<<set $slaves[_i].health += 10>>
	<<elseif ($slaves[_i].health < 90)>>
	<<set $slaves[_i].health += 7>>
	<</if>>
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages == 1 && $imageChoice == 0>>

			<<SlaveArt $slaves[$i] 0 0>>

		<</if>>
		/* 000-250-006 */
		''__@@color:pink;$slaves[$i].slaveName@@__'' is serving in the club.

    She <<include "SA serve the public">>

		<<if $slaves[$i].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[$i].devotion <= 20)>>
			<<set $slaves[$i].devotion -= 5>>
		<<else>>
			<<set $slaves[$i].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA serve the public">>
		<<if $slaves[$i].choosesOwnClothes == 1>>
		<<include "SA chooses own clothes">>
		<<if ($slaves[$i].devotion <= 20)>>
			<<set $slaves[$i].devotion -= 5>>
		<<else>>
			<<set $slaves[$i].devotion++>>
		<</if>>
		<</if>>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
<</for>>

	<<if $clubAdsSpending != 0>>
		An ad campaign is getting citizens into the club every night, and sluts that match it gratify patrons.
	<</if>>

	<<if ($arcologies[0].FSAssetExpansionist == "unset") && ($arcologies[0].FSSlimnessEnthusiast == "unset")>>
	<<if ($clubAdsSpending == 0) || ($clubAdsStacked == 0)>>
		<<set _possibleBonuses++>>
		<<if ($slim > 0) && ($stacked > 0) && (Math.abs($slim-$stacked) <= ($clubSlaves/3))>>
		<<set $repGain += $clubSlaves*random(5,10), $clubBonuses++>>
		There is a @@color:green;wide@@ variety of slim and stacked slaves working the club.
		<</if>>
	<</if>>
	<</if>>
	<<if ($arcologies[0].FSDegradationist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>>
	<<if ($clubAdsSpending == 0) || ($clubAdsModded == 0)>>
		<<set _possibleBonuses++>>
		<<if ($modded > 0) && ($unmodded > 0) && (Math.abs($modded-$unmodded) <= ($clubSlaves/3))>>
		<<set $repGain += $clubSlaves*random(5,10), $clubBonuses++>>
		There are @@color:green;both@@ heavily pierced and tattooed slaves and slaves with more natural bodies filling the club.
		<</if>>
	<</if>>
	<</if>>
	<<if ($arcologies[0].FSTransformationFetishist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>>
	<<if ($clubAdsSpending == 0) || ($clubAdsImplanted == 0)>>
		<<set _possibleBonuses++>>
		<<if ($implanted > 0) && ($pure > 0) && (Math.abs($implanted-$pure) <= ($clubSlaves/3))>>
		<<set $repGain += $clubSlaves*random(5,10), $clubBonuses++>>
		Citizens in $clubName can easily find @@color:yellowgreen;both@@ all-natural girls, and slaves whose beauty has been improved by surgical means.
		<</if>>
	<</if>>
	<</if>>
	<<if ($seeDicks != 0)>>
	<<if ($clubAdsSpending == 0) || ($clubAdsXX == 0)>>
		<<set _possibleBonuses++>>
		<<if ($XX > 0) && ($XY > 0) && (Math.abs($XX-$XY) <= ($clubSlaves/3))>>
		<<set $repGain += $clubSlaves*random(5,10), $clubBonuses++>>
		The club offers a @@color:green;mix@@ of sluts that can appeal to varied tastes in genitalia.
		<</if>>
	<</if>>
	<</if>>
	<<if ($arcologies[0].FSMaturityPreferentialist == "unset") && ($arcologies[0].FSYouthPreferentialist == "unset")>>
	<<if ($clubAdsSpending == 0) || ($clubAdsOld == 0)>>
		<<set _possibleBonuses++>>
		<<if ($young > 0) && ($old > 0) && (Math.abs($young-$old) <= ($clubSlaves/3))>>
		<<set $repGain += $clubSlaves*random(5,10), $clubBonuses++>>
		There are girls @@color:green;both@@ young and mature in $clubName.
		<</if>>
	<</if>>
	<</if>>
	<<if ($arcologies[0].FSRepopulationFocus == "unset") && ($arcologies[0].FSRestart == "unset")>>
	<<if ($clubAdsSpending == 0) || ($clubAdsPreg == 0)>>
		<<set _possibleBonuses++>>
		<<if ($pregYes > 0) && ($pregNo > 0) && (Math.abs($pregYes-$pregNo) <= ($clubSlaves/3))>>
		<<set $repGain += $clubSlaves*random(5,10), $clubBonuses++>>
		There is a @@color:green;wide@@ variety of slaves with swollen, round bellies and flat bellies working the club.
		<</if>>
	<</if>>
	<</if>>

	<<if (_possibleBonuses > 0) && ($clubBonuses >= _possibleBonuses)>>
		<<set $repGain += $clubSlaves*random(10,15)>>
		There is a ''@@color:green;perfect variety@@'' of slaves serving the public from the club.
	<</if>>
	<<if $clubDecoration != "standard">>
		$clubNameCaps's customers enjoy @@color:green;having sex in $clubDecoration surroundings.@@
	<</if>>

	<<if ($club <= $clubSlaves)>>
	<<set $clubSpots = 0>>
	<<else>>
	<<set $clubSpots = $club - $clubSlaves>>
	<</if>>
<<else>>
	<<set $clubSpots = $club>>
<</if>>
<<if $clubSlaves || $DJ>>

<</if>>


code:
:: Complete Catalog

<<set $nextButton = "Back to Main">>\
<<set $nextLink = "Main">>\
<<set $returnTo = "Main">>\
//This is the complete catalog of slaves that you can acquire from other slaveowners. Most of these slaves are not for sale, so persuading their owners to part with them will be extremely expensive.//

<<nobr>>
<<for $i = 0; $i < $heroSlaves.length; $i++>>
<<print "[[$heroSlaves[$i].slaveName|Complete Catalog][$activeSlave = $heroSlaves[" + $i + "]]]">> |
<</for>>
<</nobr>>

<<set $specialSlavesPriceOverride = 1>>
<<include "Long Slave Description">>\
<<slaveCost $activeSlave>>\
<<set $slaveCost = (10*Math.trunc(($slaveCost/10)*2))>>
<<if $slaveCost < 40000>>
	<<set $slaveCost += random(20000,60000)>>
<</if>>
<<set $specialSlavesPriceOverride = 0>>

The offered price is ¤<<print $slaveCost>>.

[[Buy her slave contract|New Slave Intro][$cash -= $slaveCost, $activeSlave.weekAcquired = $week,$nextButton = "Continue",$nextLink = "AS Dump",$returnTo = "Main",$specialSlave = 1]]


code:
:: Concubine Select

<<nobr>>
<<set $nextButton = "Back">>
<<set $nextLink = "Master Suite">>
<<set $showEncyclopedia = 0>>

<<for _i = 0; _i < $slaves.length; _i++>>
<<if $Concubine.ID == $slaves[_i].ID>>
	''__@@color:pink;$slaves[_i].slaveName@@__'' is serving as your Concubine.
	<<set $slaves[_i].assignment = "be your Concubine">>
	<<set $slaves[_i].assignmentVisible = 0>>

She will take the lead in seeing to your pleasure.
	<<break>>
<</if>>
<</for>>
<<if ($Concubine == 0)>>
	You have not selected a Concubine.
<</if>>

''Appoint a Concubine from your devoted slaves:''
<<include "Slave Summary">>

[[None|Concubine Workaround][$Concubine = 0]]
<</nobr>>


code:
:: Concubine Workaround

	<<for $i = 0; $i < $slaves.length; $i++>>
	<<if ($slaves[$i].assignment == "be your Concubine") && ($slaves[$i].ID != $Concubine.ID)>>
		<<set $slaves[$i].assignment = "rest">>
		<<set $slaves[$i].assignmentVisible = 1>>
		<<break>>
	<</if>>
	<</for>>

	<<for $i = 0; $i < $slaves.length; $i++>>
	<<if $Concubine.ID == $slaves[$i].ID>>
		<<set $slaves[$i].assignment = "be your Concubine">>
		<<if $slaves[$i].choosesOwnClothes == 1>><<include "SA chooses own clothes">><</if>>
		<<set $slaves[$i].assignmentVisible = 0>>
		<<set $slaves[$i].sentence = 0>>
		<<set $slaves[$i].livingRules = "luxurious">>
		<<if $slaves[$i].ID == $personalAttention>>
		<<if $PC.career == "escort">>
		<<set $personalAttention = "whoring">>
		<<elseif $PC.career == "servant">>
		<<set $personalAttention = "upkeep">>
		<<else>>
		<<set $personalAttention = "business">>
		<</if>>
		<</if>>
		<<if $slaves[$i].ID == $HeadGirl.ID>>
			<<set $HeadGirl = 0>>
		<</if>>
		<<if $slaves[$i].ID == $Recruiter.ID>>
			<<set $Recruiter = 0>>
		<</if>>
		<<if $slaves[$i].ID == $Bodyguard.ID>>
			<<set $Bodyguard = 0>>
		<</if>>
		<<break>>
	<</if>>
	<</for>>

<<goto "Master Suite">>


code:
:: Confinement Workaround

<<set $activeSlave.assignment = "stay confined">>
<<set $activeSlave.choosesOwnAssignment = 0>>
<<for $i = 0; $i < $slaves.length; $i++>>
	<<if $activeSlave.ID == $slaves[$i].ID>>
	<<set $slaves[$i] = $activeSlave>>
	<<break>>
	<</if>>
<</for>>

<<goto "Main">>