:: Cellblock Report [nobr]

<<SlaveSort $CellBiIDs>>
<<set _DL = $CellBiIDs.length, $cellblockSlaves = _DL, _SL = $slaves.length, _brokenSlaves = 0, _idleBonus = 0, _softenedQuirks = 0, _trustMalus = 0, _FLsFetish = 0>>

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

<<if ($Wardeness != 0)>>
	<<set _FLs = $slaves.findIndex(function(s) { return s.ID == $Wardeness.ID; })>>

	<<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 += 2>>
	<</if>>
	<<set $slaves[_FLs].devotion += _devBonus>>
	<<if $slaves[_FLs].trust < 60>>
		<<set $slaves[_FLs].trust += 3>>
	<</if>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
		<<if $slaves[_FLs].fetish != "sadist">>
			<<fetishChangeChance $slaves[_FLs]>>
			<<if $fetishChangeChance > random(0,100)>>
				<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "sadist">>
			<</if>>
		<<elseif $slaves[_FLs].fetishKnown == 0>>
			<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
		<<else>>
			<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
		<</if>>
	<</if>>
	<<set $Wardeness = $slaves[_FLs]>>
	<<if ($Wardeness.energy > 95) || ($Wardeness.fetish == "sadist")>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
	<</if>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<SlaveFullName $Wardeness>> is serving as the Wardeness.
	<<if $Wardeness.relationship == -3 && $Wardeness.devotion > 50>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		As your wife, she tries her best to break the disobedient slaves to your will.
	<</if>>
	<<if (_FLsFetish == 1)>>
		One day she demands obedience. The next day she strikes a slave when it isn't given. The next, she seems more excited than embarrassed when beating a prisoner. Soon, she's looking for an excuse to punish. She's @@.pink;become more of a sadist.@@
	<<elseif (_FLsFetish == 2)>>
		Being not only allowed but encouraged to get off while punishing prisoners @@.lightsalmon;deepens her sadism.@@
	<</if>>
	<<if setup.wardenessCareers.includes($Wardeness.career)>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		She has experience with detecting security issues and grinding down potential miscreants from her life before she was a slave, making her more effective.
	<</if>>
	<<if $Wardeness.fetish == "sadist">>
		She uses the prisoners to gratify her sadism, terrifying them and quickly breaking their resistance.
	<<elseif $Wardeness.energy > 95>>
		She is so sexually depraved that she constantly molests the prisoners, breaking them to a life of servitude.
	<</if>>
	<<if $Wardeness.sexualFlaw == "malicious">>
		<<set _devBonus++, _trustMalus += 2, _idleBonus += 2>>
		Sexual abuse of prisoners has become an end for her, not a means. She inspires her prisoners to do everything possible to qualify to get away from her, even as she slowly grinds away their interest in sex to do it.
	<</if>>
	<<if ($Wardeness.dick > 2) && (canPenetrate($Wardeness))>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		Her molestation of the prisoners is more varied and effective because she has a dick to fuck them with.
	<</if>>
	<<if ($Wardeness.muscles > 35)>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		She is strong enough to restrain anyone that tries anything with her own hands.
	<</if>>
	<<if ($Wardeness.devotion > 95)>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		Her devotion to you is so absolute that she sees breaking bitches for your service as a noble calling.
	<</if>>
	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set $i = $slaveIndices[$CellBiIDs[_dI]]>>
		<<if $Wardeness.rivalryTarget == $slaves[$i].ID>>
			She greatly enjoys breaking her <<if $Wardeness.rivalry == 1>>growing rival<<elseif $Wardeness.rivalry == 2>>rival<<elseif $Wardeness.rivalry == 3>>bitter rival<</if>>, $slaves[$i].slaveName's will.
			<<set $slaves[$i].devotion++, $slaves[$i].trust -= 3>>
			<<if random(1,100) > 30>>
				<<set $Wardeness.rivalry++, $slaves[_FLs].rivalry++, $slaves[$i].rivalry++>>
			<</if>>
		<<elseif $Wardeness.relationshipTarget == $slaves[$i].ID>>
			She hates having to break her <<if $Wardeness.relationship == 1>>friend<<elseif $Wardeness.relationship == 2>>best friend<<elseif $Wardeness.relationship == 3>>friend with benefits<<elseif $Wardeness.relationship == 4>>lover<<elseif $Wardeness.relationship == 5>>slave wife<</if>>, $slaves[$i].slaveName, but her devotion to you wins out in the end.
			<<set $slaves[$i].devotion++, $slaves[$i].trust -= 3>>
			<<if random(1,100) >= 50>>
				Her and $slaves[$i].slaveName's relationship has been shattered by these events.
				<<set $Wardeness.relationship = 0, $Wardeness.relationshipTarget = 0, $slaves[_FLs].relationship = 0, $slaves[_FLs].relationshipTarget = 0, $slaves[$i].relationship = 0, $slaves[$i].relationshipTarget = 0>>
			<</if>>
		<<elseif $familyTesting == 1 && totalRelatives($slaves[$i]) > 0>>
			<<if $slaves[$i].mother == $Wardeness.ID || $slaves[$i].father == $Wardeness.ID>>
				She shows her daughter $slaves[$i].slaveName no mercy, making sure she understands her place.
				<<set $slaves[$i].devotion++, $slaves[$i].trust-->>
			<<elseif $slaves[$i].ID == $Wardeness.mother>>
				She shows her mother $slaves[$i].slaveName no mercy, making sure she understands her place.
				<<set $slaves[$i].devotion++, $slaves[$i].trust-->>
			<<elseif $slaves[$i].ID == $Wardeness.father>>
				She shows her father $slaves[$i].slaveName no mercy, making sure she understands her place.
				<<set $slaves[$i].devotion++, $slaves[$i].trust-->>
			<<elseif areSisters($slaves[$i], $Wardeness) == 1>>
				She shows her twin sister $slaves[$i].slaveName no mercy, making sure she understands her place.
				<<set $slaves[$i].devotion++, $slaves[$i].trust-->>
			<<elseif areSisters($slaves[$i], $Wardeness) == 2>>
				She shows her sister $slaves[$i].slaveName no mercy, making sure she understands her place.
				<<set $slaves[$i].devotion++, $slaves[$i].trust-->>
			<<elseif areSisters($slaves[$i], $Wardeness) == 3>>
				She shows her half-sister $slaves[$i].slaveName no mercy, making sure she understands her place.
				<<set $slaves[$i].devotion++, $slaves[$i].trust-->>
			<</if>>
		<<elseif $Wardeness.relationTarget == $slaves[$i].ID && $familyTesting == 0>>
			She shows her $slaves[$i].relation $slaves[$i].slaveName no mercy, making sure she understands her place.
			<<set $slaves[$i].devotion++, $slaves[$i].trust-->>
		<</if>>
	<</for>>
	<<if (_DL < 5)>>
		<<set _seed = random(1,10)+((5-_DL)*(random(150,170)+(_idleBonus*10))), $cash += _seed>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;Since she doesn't have enough prisoners to manage to keep her busy, she works on citizens' slaves, earning @@.yellowgreen;¤_seed.@@
	<</if>>
	<<if (_DL > 0)>><br><br><</if>>
<</if>>

<<if (_DL > 0)>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<if (_DL == 1)>>''One slave is being confined in $cellblockName until she is willing to obey.''<<else>>''_DL slaves are being confined in $cellblockName until they are willing to obey.''<</if>>
<</if>>

<<if ($Wardeness != 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[$i]>>@@__'' is serving as the Wardeness in $cellblockName.
		<br>&nbsp;&nbsp;&nbsp;&nbsp;
		<<include "SA chooses own clothes">>
		<<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 clothes">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set $Wardeness = $slaves[_FLs]>>
<</if>>

<<for _dI = 0; _dI < _DL; _dI++>>
	<<set $i = $slaveIndices[$CellBiIDs[_dI]]>>
	<<if ($slaves[$i].devotion <= 20)>>
		<<if ($slaves[$i].trust > -20)>>
			<<set $slaves[$i].devotion -= 4, $slaves[$i].trust -= 4>>
		<<else>>
			<<set $slaves[$i].devotion++>>
		<</if>>
	<</if>>
	<<if $cellblockDecoration == "Hedonistic">>
		<<if $slaves[$i].weight < 200>>
			<<set $slaves[$i].weight += 3>>
		<</if>>
		<<if $slaves[$i].muscles > -100>>
			<<set $slaves[$i].muscles -= 2>>
		<</if>>
	<</if>>
	<<if $cellblockUpgrade == 1>>
		<<if ($slaves[$i].behavioralFlaw != "none") && ($slaves[$i].behavioralQuirk == "none")>>
			<<SoftenBehavioralFlaw $slaves[$i]>>
			<<set $slaves[$i].devotion -= 10, _softenedQuirks++>>
		<<elseif ($slaves[$i].sexualFlaw != "none") && ($slaves[$i].sexualQuirk == "none")>>
			<<SoftenSexualFlaw $slaves[$i]>>
			<<set $slaves[$i].devotion -= 10, _softenedQuirks++>>
		<</if>>
	<</if>>
	<<set $slaves[$i].devotion += _devBonus, $slaves[$i].trust -= _trustMalus>>
	<<if ($Wardeness != 0) && ($Wardeness.sexualFlaw == "malicious") && ($slaves[$i].energy >= 2)>>
		<<set $slaves[$i].energy -= 2>>
	<</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 < 40)>>
		<<set $slaves[$i].health += 7>>
	<<elseif ($slaves[$i].health < 100)>>
		<<set $slaves[$i].health += 3>>
	<</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 confined in $cellblockName.
		<</if>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;She <<include "SA stay confined">>
		<br>&nbsp;&nbsp;&nbsp;
		<<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">>
		<<include "SA stay confined">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
<</for>>
<<if (_softenedQuirks) || (_brokenSlaves)>>
	<br><br>&nbsp;&nbsp;&nbsp;&nbsp;
	<<if (_softenedQuirks > 0)>>
		$cellblockNameCaps's advanced compliance systems successfully softened
		<<if (_softenedQuirks == 1)>>
			one slave's mental flaw into an @@.green;appealing quirk,@@ though the constant correction caused her @@.mediumorchid;considerable anguish.@@
		<<else>>
			_softenedQuirks slaves' mental flaws into @@.green;appealing quirks,@@ though the constant correction caused them @@.mediumorchid;considerable anguish.@@
		<</if>>
	<</if>>
	<<if (_brokenSlaves > 0)>>
		<<if (_brokenSlaves == 1)>>
			One slave is now willing to @@.hotpink;do as she's told@@ and has been released.
		<<else>>
			_brokenSlaves slaves are now willing to @@.hotpink;do as they're told@@ and have been released.
		<</if>>
		<<if $cellblockDecoration != "standard">>
			$cellblockNameCaps's $cellblockDecoration atmosphere @@.hotpink;had an impact on <<if _brokenSlaves == 1>>her while she<<else>>them while they<</if>>@@ were imprisoned.
		<</if>>
	<</if>>
<</if>>
<<if _DL > 0 || $Wardeness != 0>>
	<br><br>
<</if>>
