:: Schoolroom Report [nobr]

<<set _idleBonus = 0, _FLsFetish = 0, _DL = $SchlRiIDs.length, $schoolroomSlaves = _DL, _SL = $slaves.length, _FLs = -1>>

<<for _dI = 0; _dI < _DL; _dI++>>
<<set _i = $SchlRiIDs[_dI].Index, _ID = $SchlRiIDs[_dI].ID>>
<<if _ID != $slaves[_i].ID>>
	/% Slaves.ID and $SchlRiIDs.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 $SchlRiIDs[_dI].Index = _i>>
	<</if>>
	<</for>>
<</if>>
<</for>>
<<SlaveSort $SchlRiIDs>>

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

<<if $Schoolteacher != 0>>
	<<for _FLs = 0; _FLs < _SL; _FLs++>>
	<<if $slaves[_FLs].ID == $Schoolteacher.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++>>
	<</if>>
	<<if ($slaves[_FLs].trust < -30)>>
	<<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[_FLs].fetishKnown == 0>>
		<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
	<<else>>
		<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
	<</if>>
	<</if>>
	<<set $Schoolteacher = $slaves[_FLs], $i = _FLs>>
	&nbsp;&nbsp;&nbsp;&nbsp;$Schoolteacher.slaveName is serving as your schoolteacher.<<if $Schoolteacher.relationship == -3>> As your wife, she tries her best to teach her pupils how to please you.<</if>>
	<<if (_FLsFetish == 1)>>
		She's allowed and even expected to use her students for her own sexual gratification, and in their own way her students are complicit, offering sexual favors for an easier time in the classroom. Before long, she's running a hungry eye over the tits and asses of new trainees; She is now @@.lightcoral;more dominant.@@
	<<elseif (_FLsFetish == 2)>>
		Every new student in class is a new target for her personal educational attention. @@.lightsalmon;She becomes more dominant.@@
	<</if>>
	<<if $schoolteacherCareers.includes($Schoolteacher.career)>>
		She has experience with students and learning from her life before she was a slave, making her more effective.
	<</if>>
	<<if ($Schoolteacher.visualAge > 35)>>
		Her age earns her the respect of her students.
		<<set _idleBonus++>>
	<</if>>
	<<if ($Schoolteacher.intelligence > 0)>>
		She's intelligent enough to be a good teacher.
		<<set _idleBonus++>>
	<</if>>
	<<if ($Schoolteacher.intelligenceImplant == 1)>>
		Since she's educated herself, she understands her students.
		<<set _idleBonus++>>
	<</if>>
	<<if ($Schoolteacher.face > 1)>>
		Her students want to be just like their beautiful teacher.
		<<set _idleBonus++>>
	<</if>>
	<<if ($schoolroomSlaves > 0)>>
	<<for _dI = 0; _dI < _DL; _dI++>>
	<<set _i = $SchlRiIDs[_dI].Index>>
	<<if $familyTesting == 1>>
		<<if $slaves[_i].mother == $Schoolteacher.ID>>
			She makes sure to spend extra time teaching her daughter, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++>>
		<</if>>
		<<if $slaves[_i].father == $Schoolteacher.ID>>
			She makes sure to spend extra time teaching her daughter, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++>>
		<</if>>
		<<if $slaves[_i].ID == $Schoolteacher.father>>
			She makes sure to spend extra time teaching her father, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++>>
		<</if>>
		<<if $slaves[_i].ID == $Schoolteacher.mother>>
			She makes sure to spend extra time teaching her mother, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++>>
		<</if>>
		<<if areSisters($slaves[_i], $Schoolteacher) == 1>>
			She makes sure to spend extra time teaching her twin, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++>>
		<<elseif areSisters($slaves[_i], $Schoolteacher) == 2>>
			She makes sure to spend extra time teaching her sister, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++>>
		<<elseif areSisters($slaves[_i], $Schoolteacher) == 3>>
			She makes sure to spend extra time teaching her half-sister, $slaves[_i].slaveName.
			<<set $slaves[_i].trust++>>
		<</if>>
	<<else>>
	<<if $Schoolteacher.relationTarget == $slaves[_i].ID>>
		She makes sure to spend extra time teaching her $slaves[_i].relation, $slaves[_i].slaveName.
		<<set $slaves[_i].trust++>>
	<</if>>
	<</if>> /*closes extended family mode */
	<<if $Schoolteacher.relationshipTarget == $slaves[_i].ID>>
		She dedicates most of her attention to her <<if $Schoolteacher.relationship == 1>>friend<<elseif $Schoolteacher.relationship == 2>>best friend<<elseif $Schoolteacher.relationship == 3>>friend with benefits<<elseif $Schoolteacher.relationship == 4>>lover<<elseif $Schoolteacher.relationship == 5>>slave wife<</if>>, $slaves[_i].slaveName making sure she understands that day's lesson.
		<<set $slaves[_i].devotion += 2, $slaves[_i].trust += 2>>
	<</if>>
	<<if $Schoolteacher.rivalryTarget == $slaves[_i].ID>>
		Ever since her <<if $Schoolteacher.rivalry == 1>>growing rival<<elseif $Schoolteacher.rivalry == 2>>rival<<elseif $Schoolteacher.rivalry == 3>>bitter rival<</if>>, was enrolled, she began stalking the classroom carrying a large paddle, much to $slaves[_i].slaveName's terror.
		<<set $slaves[_i].devotion -= 4, $slaves[_i].trust -= 4>>
		<<if random(1,100) > 35>>
			<<set $Schoolteacher.rivalry++, $slaves[_FLs].rivalry++, $slaves[_i].rivalry++>>
		<</if>>
	<</if>>
	<</for>>
	<</if>>
	<<if ($schoolroomSlaves < $schoolroom)>>
		<<set _seed = random(1,10)+(($schoolroom-$schoolroomSlaves)*(random(150,170)+(_idleBonus*10)))>>
		<<set $cash += _seed>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;Since she doesn't have enough students to occupy all her time, $schoolroomName takes in citizens' slaves on a contract basis and she teaches them too, earning @@.yellowgreen;¤_seed.@@<br>
	<</if>>
	<<if ($schoolroomSlaves > 0)>><br><</if>>
<</if>>

<<if ($schoolroomSlaves > 0)>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<if ($schoolroomSlaves == 1)>>''There is one slave studying in $schoolroomName.''<<else>>''There are $schoolroomSlaves slaves studying in $schoolroomName.''<</if>>
<</if>>

<<if ($Schoolteacher != 0)>>
	<<if $showEWD != 0>>
		<br><br>
		/* 000-250-006 */
		<<if $seeImages == 1 && $imageChoice == 0>>
		<div class="imageRef tinyImg">
			<<SlaveArt $slaves[_FLs] 0 0>>
		</div>
		<</if>>
		/* 000-250-006 */
		''__@@.pink;$slaves[_FLs].slaveName@@__'' is serving as your schoolteacher.
		<br>&nbsp;&nbsp;&nbsp;
		<<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">>
		<br><<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 $Schoolteacher = $slaves[_FLs]>>
<</if>>

<<if ($schoolroomSlaves > 0)>>
	<<set _restedSlaves = 0>>
<<for _dI = 0; _dI < _DL; _dI++>>
	<<set _i = $SchlRiIDs[_dI].Index, $i = _i>>
	<<set $slaves[_i].devotion += _devBonus>>
	<<if ($slaves[_i].health < -80)>>
	<<set $slaves[_i].health += 20>>
	<<elseif ($slaves[_i].health < -40)>>
	<<set $slaves[_i].health += 10>>
	<<elseif ($slaves[_i].health < 0)>>
	<<set $slaves[_i].health += 7>>
	<<elseif ($slaves[_i].health < 90)>>
	<<set $slaves[_i].health += 3>>
	<</if>>
	/% Education done? Has to be here before we run the SA's or there will be double entries for slave %/
	<<if ($slaves[_i].intelligenceImplant == 1)>>
	<<if ($slaves[_i].voice == 0) || ($slaves[_i].accent <= 1) || (($schoolroomUpgradeLanguage == 0) && ($slaves[_i].accent <= 2))>>
	<<if ($slaves[_i].oralSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[_i].oralSkill > 10))>>
	<<if ($slaves[_i].whoreSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[_i].whoreSkill > 10))>>
	<<if ($slaves[_i].entertainSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[_i].entertainSkill > 10))>>
	<<if ($slaves[_i].analSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[_i].analSkill > 10))>>
	<<if ($slaves[_i].vaginalSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[_i].vaginalSkill > 10)) || ($slaves[_i].vagina < 0)>>
		<<removeJob $slaves[_i] "schoolroom">>
		<<set _restedSlaves++, _dI--, _DL-->>
		<<continue>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<<if $showEWD != 0>>
		<br><br>
		/* 000-250-006 */
		<<if $seeImages == 1 && $imageChoice == 0>>
		<div class="imageRef tinyImg">
			<<SlaveArt $slaves[_i] 0 0>>
		</div>
		<</if>>
		/* 000-250-006 */
		''__@@.pink;$slaves[$i].slaveName@@__'' is studying in $schoolroomName.
		<br>&nbsp;&nbsp;&nbsp;&nbsp;She <<include "SA take classes">>
		<br>&nbsp;&nbsp;&nbsp;
		<<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">>
		<br><<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA take classes">>
		<<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)>>
		<br><br>&nbsp;&nbsp;&nbsp;
		<<if (_restedSlaves == 1)>>
			One slave has
		<<else>>
			_restedSlaves slaves have
		<</if>>
		@@.green;learned@@ all they can, and will be released from the schoolroom before the end of the week.
	<</if>>
	<<if $schoolroomDecoration != "standard">>
		$schoolroomNameCaps's $schoolroomDecoration atmosphere @@.hotpink;has a minor impact on the students.@@
	<</if>>
<</if>>
<<if $schoolroomSlaves || $Schoolteacher>>
	<br><br>
<</if>>
