:: Clinic Report [nobr]

<<set $clinicSlaves = 0, _idleBonus = 0, _nurseFetish = 0, _restedSlaves = 0, _SL = $slaves.length, _NR = -1>>

<<if $Nurse != 0>>
<<for _NR = 0; _NR < _SL; _NR++>>
<<if $slaves[_NR].ID is $Nurse.ID>>
<<break>>
<</if>>
<</for>>
<</if>>
<<if _NR != -1>>

/* 000-250-006 */
/* <<if $seeImages == 1>><<SlaveArt $slaves[_NR] 0 0>><</if>> */
<<if $seeImages == 1>>
    <div class="imageRef tinyImg">
    <<SlaveArt $slaves[_NR] 0 0>>
</div>
<</if>>
/* 000-250-006 */

	<<silently>>
	<<set $i = _NR>>
	<<include "SA long term effects">>
	<<include "SA relationships">>
	<<include "SA rivalries">>
	<</silently>>
	<<if ($slaves[_NR].health < 100)>>
	<<set $slaves[_NR].health += 20>>
	<</if>>
	<<if ($slaves[_NR].devotion <= 60)>>
	<<set $slaves[_NR].devotion += 1>>
	<</if>>
	<<if $clinicDecoration != "standard">>
	<<set $slaves[_NR].devotion += 1>>
	<</if>>
	<<if $slaves[_NR].trust < 60>>
	<<set $slaves[_NR].trust += 1>>
	<</if>>
	<<if $slaves[_NR].fetishStrength <= 95>>
	<<if $slaves[_NR].fetish != "dom">>
		<<fetishChangeChance $slaves[_NR]>>
		<<if $fetishChangeChance > random(0,100)>>
			<<set _nurseFetish to 1, $slaves[_NR].fetishKnown to 1, $slaves[_NR].fetish to "dom">>
		<</if>>
	<<elseif $slaves[_i].fetishKnown == 0>>
		<<set _nurseFetish to 1, $slaves[_NR].fetishKnown to 1>>
	<<else>>
		<<set _nurseFetish to 2, $slaves[_NR].fetishStrength += 4>>
	<</if>>
	<</if>>
	<<set $Nurse = $slaves[_NR]>>
<</if>>

<<for _i to 0; _i < _SL; _i++>>
	<<if ($slaves[_i].assignment != "get treatment in the clinic")>><<continue>><</if>>
	<<if $seeImages == 1>><<SlaveArt $slaves[_i] 0 0>><</if>>
	<<set $clinicSlaves++>>
	<<silently>>
	<<set $i = _i>>
	<<include "SA rest">>
	<<include "SA long term effects">>
	<<include "SA relationships">>
	<<include "SA rivalries">>
	<</silently>>
	<<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 $clinicDecoration != "standard">>
	<<set $slaves[_i].devotion += 1>>
	<</if>>
	<<if $slaves[_i].trust < 45>>
	<<set $slaves[_i].trust += 4>>
	<</if>>
	<<if $Nurse != 0>>
	<<if ($Nurse.fetish is "dom")>>
		<<set $slaves[_i].health += 1>>
	<</if>>
	<<if ($Nurse.muscles > 5) || ($slaves[_i].devotion >= -20)>>
		<<set $slaves[_i].health += 1>>
	<</if>>
	<<if ($Nurse.intelligence > 1)>>
		<<set $slaves[_i].health += 1>>
	<</if>>
	<<if ($Nurse.face > 1)>>
		<<set $slaves[_i].devotion += 1>>
	<</if>>
	<<if $nurseCareers.contains($Nurse.career)>>
		<<set $slaves[_i].health += 1>>
	<</if>>
	<<if $Nurse.relationship is -3>>
		<<set $slaves[_i].health += 2>>
	<</if>>
	<<if $familyTesting == 1>>
		<<if $slaves[_i].mother == $Nurse.ID>>
			<<set $slaves[_i].health += 1>>
		<</if>>
		<<if $slaves[_i].father == $Nurse.ID>>
			<<set $slaves[_i].health += 1>>
		<</if>>
		<<if $slaves[_i].ID == $Nurse.father>>
			<<set $slaves[_i].health += 1>>
		<</if>>
		<<if $slaves[_i].ID == $Nurse.mother>>
			<<set $slaves[_i].health += 1>>
		<</if>>
		<<if areSisters($slaves[_i], $Nurse) == 1>>
			<<set $slaves[_i].health += 1>>
		<<elseif areSisters($slaves[_i], $Nurse) == 2>>
			<<set $slaves[_i].health += 1>>
		<<elseif areSisters($slaves[_i], $Nurse) == 3>>
			<<set $slaves[_i].health += 1>>
		<</if>>
	<<else>>
		<<if $Nurse.relationTarget is $slaves[_i].ID>>
			<<set $slaves[_i].health += 1>>
		<</if>>
	<</if>>
	<<if $Nurse.relationshipTarget is $slaves[_i].ID>>
		<<set $slaves[_i].health += 3>>
	<</if>>
	<<if $Nurse.rivalryTarget is $slaves[_i].ID>>
		<<set $slaves[_i].health -= 3>>
	<</if>>
	<<switch $slaves[_i].prestigeDesc>>
	<<case "She is a famed Free Cities whore, and commands top prices." "She is a famed Free Cities slut, and can please anyone.">>
		<<set $slaves[_i].health += 2>>
	<<case "She is remembered for winning best in show as a cockmilker." "She is remembered for winning best in show as a dairy cow." "She is remembered for winning best in show as a breeder.">>
		<<set $slaves[_i].health += 4>>
	<</switch>>
	<</if>>
	<<if $clinicSpeedGestation == 1>>
		<<if $slaves[_i].preg > 0>>
			<<set $slaves[_i].pregControl = "speed up">>
		<</if>>
	<</if>>
	<<if ($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>>
		<<set $slaves[$i].assignment to "rest">>
		<<set $slaves[$i].assignmentVisible to 1>>
		<<set $restedSlaves += 1>>
		<<set $clinicSlaves-->>
	<</if>>
	/* end of rewriten slave release check */
<</for>>

<<if ($clinicSlaves > 0)>>
	<<if $seeImages == 1>><br style="clear:both" /><</if>>
	<<if ($clinicSlaves == 1)>>''There is one slave receiving treatment in the clinic.''<<else>>''There are $clinicSlaves slaves receiving treatment in the clinic.''<</if>>

	<<if ($Nurse != 0)>>
	$Nurse.slaveName is serving as the clinical nurse.<<if $Nurse.relationship is -3>> She does her best to be a caring and nurturing wife.<</if>>
	<<if (_nurseFetish == 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 (_nurseFetish == 2)>>
		Every new patient in the clinic is a new target for her authority. @@color:lightsalmon;She becomes more dominant.@@
	<</if>>
	<<if $nurseCareers.contains($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++>>
	<</if>>
	<<if ($Nurse.fetish is "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++>>
	<</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++>>
	<</if>>
	<<if ($Nurse.face > 1)>>
		Patients rarely object to seeing her gorgeous face hovering over them.
		<<set _idleBonus++>>
	<</if>>
	<<for _i to 0; _i < _SL; _i++>>
	<<if ($slaves[_i].assignment != "get treatment in the clinic")>><<continue>><</if>>
	<<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 += 1>>
		<</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 += 1>>
		<</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 += 1>>
		<</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 += 1>>
		<</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 += 1>>
		<<elseif areSisters($slaves[_i], $Nurse) == 2>>
			She makes sure to spend extra time caring for her sister, $slaves[_i].slaveName.
			<<set $slaves[_i].trust += 1>>
		<<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 += 1>>
		<</if>>
	<<else>>
		<<if $Nurse.relationTarget is $slaves[_i].ID>>
			She makes sure to spend extra time caring for her $slaves[_i].relation, $slaves[_i].slaveName.
			<<set $slaves[_i].trust += 1>>
		<</if>>
	<</if>>
	<<if $Nurse.relationshipTarget is $slaves[_i].ID>>
		She dedicates most of her attention to her <<if $Nurse.relationship == 1>>friend<<elseif $Nurse.relationship is 2>>best friend<<elseif $Nurse.relationship is 3>>friend with benefits<<elseif $Nurse.relationship is 4>>lover<<elseif $Nurse.relationship is 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 += 1, $slaves[_i].trust += 1>>
	<</if>>
	<<if $Nurse.rivalryTarget is $slaves[_i].ID>>
		She purposefully neglects the needs of her <<if $Nurse.rivalry == 1>>growing rival<<elseif $Nurse.rivalry is 2>>rival<<elseif $Nurse.rivalry is 3>>bitter rival<</if>>, $slaves[_i].slaveName, hindering her recovery and deepening their dislike for each other.
		<<set $slaves[_i].devotion -= 1, $slaves[_i].trust -= 1>>
		<<if random(1,100) > 65>>
			<<set $Nurse.rivalry += 1, $slaves[_NR].rivalry += 1, $slaves[_i].rivalry += 1>>
		<</if>>
	<</if>>
	<<if $slaves[_i].prestigeDesc is "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.
	<</if>>
	<<if $slaves[_i].prestigeDesc is "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.
	<</if>>
	<<if $slaves[_i].prestigeDesc is "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.
		<<if (random(1,100) > 65) && (($Nurse.fetish == "none") || ($Nurse.fetish == "cumslut"))>>
		<<if $Nurse.fetish == "none">>
		<<set $Nurse.fetish = "cumslut", $slaves[_NR].fetish = "cumslut">>
		<<else>>
		<<set $Nurse.fetishStrength += 4, $slaves[_NR].fetishStrength += 4>>
		<</if>>
		<</if>>
	<</if>>
	<<if $slaves[_i].prestigeDesc is "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.
		<<if (random(1,100) > 65) && (($Nurse.fetish is "none") || ($Nurse.fetish is "boobs"))>>
		<<if $Nurse.fetish == "none">>
		<<set $Nurse.fetish = "boobs", $slaves[_NR].fetish = "boobs">>
		<<else>>
		<<set $Nurse.fetishStrength += 4, $slaves[_NR].fetishStrength += 4>>
		<</if>>
		<</if>>
	<</if>>
	<<if $slaves[_i].prestigeDesc is "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.
	<</if>>
	<<if $slaves[_i].prestigeDesc is "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.
	<</if>>
	<<if $slaves[_i].bellyImplant > 0 && $clinicInflateBelly == 1>>
		<br>''@@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>>
		<<set $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">>
		<br>''@@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 ($clinicSlaves < $clinic)>>
		<<set _seed to random(1,10)+(($clinic-$clinicSlaves)*(random(150,170)+(_idleBonus*10)))>>
		<<set $cash += _seed>>
		Since $Nurse.slaveName 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>>

	<<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>>
	<<set $clinicSlaves -= _restedSlaves>>
	<</if>>

<<else>>
	''$clinicNameCaps is empty.''
	<<if ($Nurse != 0)>>
		<<set _seed to random(1,10)+(($clinic-$clinicSlaves)*(random(150,170)+(_idleBonus*10)))>>
		<<set $cash += _seed>>
		except for $Nurse.slaveName, the nurse. Since she doesn't have any of your slaves under her care to fill her time, the Clinic admits citizens' slaves, earning @@color:yellowgreen;¤_seed.@@
	<</if>>
<</if>>
<br><br>

src/uncategorized/clinicReport.tw