:: Clinic Report [nobr]

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

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

<<if $Nurse != 0>>
	<<set _FLs = $slaveIndices[$Nurse.ID]>>

	<<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>>

	<<if $slaves[_FLs].livingRules != "luxurious">>
		<<set $slaves[_FLs].livingRules = "luxurious">>
	<</if>>

	<<set $slaves[_FLs].devotion += _devBonus>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
		<<if $slaves[_FLs].fetish != "dom">>
			<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
				<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "dom">>
			<</if>>
		<<elseif $slaves[_FLs].fetishKnown == 0>>
			<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
		<<else>>
			<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
		<</if>>
	<</if>>
	<<set $Nurse = $slaves[_FLs]>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<= SlaveFullName($Nurse)>> is serving as the clinical nurse.
	<<if $Nurse.relationship == -3 && $Nurse.devotion > 50>>
		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 @@.lightsalmon;becomes more dominant.@@
	<<elseif (_FLsFetish == 2)>>
		Every new patient in the clinic is a new target for her authority. @@.lightsalmon;She becomes more dominant.@@
	<</if>>
	<<if setup.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++>>
	<<elseif $Nurse.skillNU >= $masteredXP>>
		She has experience with medicine from working for you, and can often recognize conditions before even the medical scanners can.
		<<set _idleBonus++, _healthBonus++>>
	<<else>>
		<<set $slaves[_FLs].skillNU += random(1,Math.ceil(($Nurse.intelligence+$Nurse.intelligenceImplant)/15) + 8)>>
	<</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+$Nurse.intelligenceImplant > 50)>>
		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[_FLs].devotion >= 60)>>
		<<set _healthBonus++>>
	<</if>>
	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set $i = $slaveIndices[$CliniciIDs[_dI]]>>
		<<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>>
		<<elseif $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>>
		<<elseif $familyTesting == 1 && totalRelatives($slaves[$i]) > 0>>
			<<if $slaves[$i].mother == $Nurse.ID || $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++>>
			<<elseif $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++>>
			<<elseif $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++>>
			<<else>>
				<<switch areSisters($slaves[$i], $Nurse)>>
				<<case 1>>
					She makes sure to spend extra time caring for her twin sister, $slaves[$i].slaveName.
					<<set $slaves[$i].trust++, $slaves[$i].health++>>
				<<case 2>>
					She makes sure to spend extra time caring for her sister, $slaves[$i].slaveName.
					<<set $slaves[$i].trust++, $slaves[$i].health++>>
				<<case 3>>
					She makes sure to spend extra time caring for her half-sister, $slaves[$i].slaveName.
					<<set $slaves[$i].trust++, $slaves[$i].health++>>
				<</switch>>
			<</if>>
		<<elseif $Nurse.relationTarget == $slaves[$i].ID && $familyTesting == 0>>
			She makes sure to spend extra time caring for her $slaves[$i].relation, $slaves[$i].slaveName.
			<<set $slaves[$i].trust++, $slaves[$i].health++>>
		<</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.">>
			<<if ($slaves[$i].balls > 4) && ($slaves[$i].dick != 0)>>
				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>>
			<</if>>
		<<case "She is remembered for winning best in show as a dairy cow.">>
			<<if ($slaves[$i].lactation > 0) && (($slaves[$i].boobs-$slaves[$i].boobsImplant) > 6000)>>
				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>>
			<</if>>
		<<case "She is remembered for winning best in show as a breeder.">>
			<<if $slaves[$i].bellyPreg >= 1500>>
				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>>
			<<elseif $slaves[$i].ovaries == 1 || $slaves[$i].mpreg == 1>>
				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>>
			<<else>>
				She lays out plans on how to restore the breeder $slaves[$i].slaveName to her former gravid glory.
			<</if>>
		<</switch>>
		<<if $slaves[$i].bellyImplant > -1 && $clinicInflateBelly == 1>>
			<br>''@@.pink;$slaves[$i].slaveName@@'' spent a lot of time during the week under IV-like stands with bags of inert 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 += 5000, $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 > ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000)>>
				<<set $slaves[$i].bellyImplant = ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000)>>
				She is filled to the maximum that her implant can stand.
			<</if>>
		<</if>>
		<<if $slaves[$i].pregKnown == 1 && $slaves[$i].preg < 40 && $slaves[$i].pregControl == "speed up">>
			<br>''@@.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 >= 35 && $slaves[$i].pregControl == "speed up">>
				<<set $slaves[$i].pregControl = "none">>
				''@@.pink;$slaves[$i].slaveName's@@'' child is ready to pop out of her womb, ''@@.yellow;her course of rapid gestation agents is finished''.
			<</if>>
		<<elseif $slaves[$i].preg > 2 && $slaves[$i].pregKnown == 0>>
			During her tests, she discovers that $slaves[$i].slaveName @@.lime;is pregnant.@@
			<<set $slaves[$i].pregKnown = 1>>
		<</if>>
	<</for>>
	<<if (_DL < $clinic)>>
		<<set _seed = random(1,10)+(($clinic-_DL)*(random(150,170)+(_idleBonus*10))), $cash += _seed>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;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 @@.yellowgreen;<<print cashFormat(_seed)>>.@@
	<</if>>
	<<if (_DL > 0)>><br><br><</if>>
<</if>>

<<if (_DL > 0)>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<if (_DL == 1)>>''There is one slave receiving treatment in the clinic.''<<else>>''There are _DL slaves receiving treatment in the clinic.''<</if>>
<</if>>

<<if ($Nurse != 0)>>
	<<set $i = _FLs>> /* apply following SA passages to facility leader */
	<<if $showEWD != 0>>
		<br><br>
		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>
		<div class="imageRef tinyImg">
			<<SlaveArt $slaves[_FLs] 0 0>>
		</div>
		<</if>>
		/* 000-250-006 */
		''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as the clinical nurse.
		<br>&nbsp;&nbsp;&nbsp;
		<<= saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<br><<include "SA devotion">>
	<<else>>
		<<silently>>
		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<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>>

<<for _dI = 0; _dI < _DL; _dI++>>
	<<set $i = $slaveIndices[$CliniciIDs[_dI]]>>
	<<if $slaves[$i].devotion < 45>>
		<<set $slaves[$i].devotion += 4>>
	<</if>>
	<<set $slaves[$i].devotion += _devBonus>>
	<<if $slaves[$i].trust < 45>>
		<<set $slaves[$i].trust += 4>>
	<</if>>
	<<if $slaves[$i].health < 90>>
		<<set $slaves[$i].health += 10 + ($curativeUpgrade * 10) + _healthBonus>>
	<</if>>

	<<switch $clinicDecoration>>
	<<case "Repopulation Focus" "Eugenics" "Gender Radicalist" "Gender Fundamentalist" "Paternalist" "Maturity Preferentialist" "Youth Preferentialist" "Slimness Enthusiast" "Hedonistic">>
		<<set $slaves[$i].livingRules = "luxurious">>
	<<case "Roman Revivalist" "Aztec Revivalist" "Egyptian Revivalist" "Arabian Revivalist" "Chinese Revivalist" "Chattel Religionist" "Edo Revivalist">>
		<<set $slaves[$i].livingRules = "normal">>
	<<default>>
		<<set $slaves[$i].livingRules = "spare">>
	<</switch>>

	<<if ($Nurse != 0) && ($clinicSpeedGestation == 1) && ($slaves[$i].pregKnown == 1)>>
		<<set $slaves[$i].pregControl = "speed up">>
	<</if>>
	<<if ($Nurse != 0) && ($slaves[$i].chem > 10) && ($clinicUpgradeFilters == 1)>>
		<<set $slaves[$i].chem -= 5 + (50 * $clinicUpgradePurge)>>
		<<if $clinicUpgradePurge == 1 && $slaves[$i].health > -50>>
			<<set $slaves[$i].health = -50>>
		<</if>>
		<<set $slaves[$i].chem = Math.max($slaves[$i].chem, 0)>>
	<</if>>
	<<if ($slaves[$i].health <= 40)>>
	<<elseif ($Nurse != 0) && ($slaves[$i].chem > 15) && ($clinicUpgradeFilters == 1)>>
	<<elseif ($Nurse != 0) && ($slaves[$i].pregKnown == 1) && ($clinicSpeedGestation >= 0 || $slaves[$i].pregControl == "speed up")>>
	<<elseif ($Nurse != 0) && ($clinicInflateBelly > 0) && ($slaves[$i].bellyImplant >= 0) && ($slaves[$i].bellyImplant <= ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000))>>
	<<else>>
		<br><br>''__@@.pink;$slaves[$i].slaveName@@__'' has been returned to health<<if ($Nurse != 0) && ($clinicUpgradeFilters == 1)>> and purity<</if>>, so @@.yellow;her assignment has defaulted to rest.@@
		<<= removeJob($slaves[$i], "get treatment in the clinic")>>
		<<set _restedSlaves++, _dI--, _DL-->>
		<<continue>>
	<</if>>
	<<if $showEWD != 0>>
		<br><br>
		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>
		<div class="imageRef tinyImg">
			<<SlaveArt $slaves[$i] 0 0>>
		</div>
		<</if>>
		/* 000-250-006 */
		''__@@.pink;<<= SlaveFullName($slaves[$i])>>@@__''
		<<if $slaves[$i].choosesOwnAssignment == 2>>
			<<include "SA chooses own job">>
		<<else>>
			is receiving treatment in $clinicName.
		<</if>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;She <<= saRest($slaves[$i])>>
		<br>&nbsp;&nbsp;&nbsp;
		<<= saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<br><<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA chooses own job">>
		<<set _dump = saRest($slaves[$i])>>
		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<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)>>
	<br><br>&nbsp;&nbsp;&nbsp;&nbsp;
	<<if (_restedSlaves == 1)>>
		One slave has
	<<else>>
		_restedSlaves slaves have
	<</if>>
	been returned to @@.green;health<<if ($Nurse != 0) && ($clinicUpgradeFilters == 1)>> and purity<</if>>@@ and will be released from the clinic before the end of the week.
	<<if $clinicDecoration != "standard">>
		<br><br>&nbsp;&nbsp;&nbsp;&nbsp;$clinicNameCaps's $clinicDecoration atmosphere @@.hotpink;had an impact on <<if _restedSlaves == 1>>her while she was<<else>>them while they were<</if>>@@ getting treatment.
	<</if>>
<</if>>
<<if _DL > 0 || $Nurse != 0>>
	<br><br>
<</if>>
