:: Slave Assignments Report [nobr]

<<set $nextLink to "Economics", $nextButton to "Continue">>

<<for _i to 0; _i < $slaves.length; _i++>>

/* PATCH, remove after 0.9.10 */
<<if $slaves[_i].fetish == "sub">>
	<<set $slaves[_i].fetish = "submissive">>
<</if>>

<<if ndef $slaves[_i].whoreSkill>>
	@@color:yellow;Reset bad whore skill for $slaves[_i].slaveName.@@ Report this as a bug if it reoccurs.<br>
	<<set $slaves[_i].whoreSkill to 0>>
<</if>>
<<if ndef $slaves[_i].entertainSkill>>
	@@color:yellow;Reset bad entertain skill for $slaves[_i].slaveName.@@ Report this as a bug if it reoccurs.<br>
	<<set $slaves[_i].entertainSkill to 0>>
<</if>>
<<if ndef $slaves[_i].vaginalSkill>>
	@@color:yellow;Reset bad vaginal skill for $slaves[_i].slaveName.@@ Report this as a bug if it reoccurs.<br>
	<<set $slaves[_i].vaginalSkill to 0>>
<</if>>
<<if ndef $slaves[_i].analSkill>>
	@@color:yellow;Reset bad anal skill for $slaves[_i].slaveName.@@ Report this as a bug if it reoccurs.<br>
	<<set $slaves[_i].analSkill to 0>>
<</if>>
<<if ndef $slaves[_i].oralSkill>>
	@@color:yellow;Reset bad skill for $slaves[_i].slaveName.@@ Report this as a bug if it reoccurs.<br>
	<<set $slaves[_i].oralSkill to 0>>
<</if>>

<<if ($seeDicks > 0) && ($slaves[_i].dick > 0) && ($slaves[_i].balls > 0) && ($slaves[_i].hormones <= 0) && ($slaves[_i].dickAccessory != ("chastity")) && ($slaves[_i].releaseRules != "restrictive")>>
	<<set $averageDick += $slaves[_i].dick, $slavesWithWorkingDicks++>>
<</if>>

<<switch $slaves[_i].assignment>>
<<case "be your Head Girl">>
	<<set $HeadGirl to $slaves[_i]>>
	<<if $HeadGirl.fetish is "mindbroken">>
		''__@@color:pink;$HeadGirl.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your head girl any more.@@<br>
		<<set $HeadGirl to 0>>
	<<elseif canTalk($HeadGirl) == false>>
		''__@@color:pink;$HeadGirl.slaveName@@__'' can't give slaves verbal orders @@color:yellow;and cannot serve as your head girl any more.@@<br>
		<<set $HeadGirl to 0>>
	<<elseif canWalk($HeadGirl) != true>>
		''__@@color:pink;$HeadGirl.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your head girl any more.@@<br>
		<<set $HeadGirl to 0>>
	<<elseif canSee($HeadGirl) != true>>
		''__@@color:pink;$HeadGirl.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your head girl any more.@@<br>
		<<set $HeadGirl to 0>>
	<<elseif $HeadGirl.preg > 31 && $HeadGirl.pregType is 50>>
		''__@@color:pink;$HeadGirl.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your head girl any longer@@.
		<<set $HeadGirl to 0>>
	<<elseif $HeadGirl.devotion <= 20>>
		''__@@color:pink;$HeadGirl.slaveName@@__'' is no longer even accepting of you, @@color:yellow;and cannot serve as your head girl any more.@@<br>
		<<set $HeadGirl to 0>>
	<</if>>
	<<if $HeadGirl != 0>>
		<<set $HGEnergy++>>
		<<if $HeadGirl.balls > 0>>
			<<set $HGBalls to 1>>
		<</if>>
		<<if $arcologies[0].FSChineseRevivalistLaw == 1>>
			<<set $HGEnergy++>>
		<</if>>
		<<if $personalAttention is "HG">>
			<<if $HeadGirl.trust > 95>>
				<<set $HGEnergy += 2>>
			<<else>>
				<<set $HGEnergy++>>
			<</if>>
		<</if>>
		<<if canAchieveErection($HeadGirl)>>
			<<set $HGCum = 2+Math.trunc(($HeadGirl.balls/5)+($HeadGirl.energy/95)+($HeadGirl.health/95)+($HeadGirl.devotion/95))>>
		<</if>>
	<<else>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "live with your Head Girl">>
	<<if random(-30,20) <= $slaves[_i].devotion>>
		<<set $HGSlaveSuccess++, $HGEnergy++>>
	<<else>>
		<<set $HGSlaveSuccess-->>
	<</if>>
<<case "recruit girls">>
	<<set $Recruiter to $slaves[_i]>>
	<<if $Recruiter.fetish is "mindbroken">>
		''__@@color:pink;$Recruiter.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your recruiter any more.@@<br>
		<<set $Recruiter to 0>>
	<<elseif canTalk($Recruiter) == false>>
		''__@@color:pink;$Recruiter.slaveName@@__'' can't verbally entice marks @@color:yellow;and cannot serve as your recruiter any more.@@<br>
		<<set $Recruiter to 0>>
	<<elseif $Recruiter.preg > 31 && $Recruiter.pregType is 50>>
		''__@@color:pink;$Recruiter.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your recruiter any longer@@.
		<<set $Recruiter to 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<<elseif canWalk($Recruiter) != true>>
		''__@@color:pink;$Recruiter.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your recruiter any more.@@<br>
		<<set $Recruiter to 0>>
	<<elseif canSee($Recruiter) != true>>
		''__@@color:pink;$Recruiter.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your recruiter any more.@@<br>
		<<set $Recruiter to 0>>
	<</if>>
	<<if $Recruiter == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the Madam">>
	<<set $Madam to $slaves[_i]>>
	<<if canTalk($Madam) == false>>
		''__@@color:pink;$Madam.slaveName@@__'' can't give whores verbal orders @@color:yellow;and cannot serve as your Madam any more.@@<br>
		<<set $Madam to 0>>
	<<elseif $Madam.preg > 31 && $Madam.pregType is 50>>
		''__@@color:pink;$Madam.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your Madam any longer@@.
		<<set $Madam to 0>>
	<<elseif $Madam.fetish is "mindbroken">>
		''__@@color:pink;$Madam.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Madam any more.@@<br>
		<<set $Madam to 0>>
	<<elseif canWalk($Madam) != true>>
		''__@@color:pink;$Madam.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your Madam any more.@@<br>
		<<set $Madam to 0>>
	<<elseif canSee($Madam) != true>>
		''__@@color:pink;$Madam.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your Madam any more.@@<br>
		<<set $Madam to 0>>
	<</if>>
	<<if $Madam == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the DJ">>
	<<set $DJ to $slaves[_i]>>
	<<if canTalk($DJ) == false>>
		''__@@color:pink;$DJ.slaveName@@__'' can't speak @@color:yellow;and cannot serve as your DJ any more.@@<br>
		<<set $DJ to 0>>
	<<elseif $DJ.preg > 31 && $DJ.pregType is 50>>
		''__@@color:pink;$DJ.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your DJ any longer@@.
		<<set $DJ to 0>>
	<<elseif $DJ.fetish is "mindbroken">>
		''__@@color:pink;$DJ.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your DJ any more.@@<br>
		<<set $DJ to 0>>
	<<elseif canWalk($DJ) != true>>
		''__@@color:pink;$DJ.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your DJ any more.@@<br>
		<<set $DJ to 0>>
	<</if>>
	<<if $DJ == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the Milkmaid">>
	<<set $Milkmaid to $slaves[_i]>>
	<<if $Milkmaid.fetish is "mindbroken">>
		''__@@color:pink;$Milkmaid.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Milkmaid any more.@@<br>
		<<set $Milkmaid to 0>>
	<<elseif $Milkmaid.preg > 31 && $Milkmaid.pregType is 50>>
		''__@@color:pink;$Milkmaid.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your Milkmaid any longer@@.
		<<set $Milkmaid to 0>>
	<<elseif canWalk($Milkmaid) != true>>
		''__@@color:pink;$Milkmaid.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your Milkmaid any more.@@<br>
		<<set $Milkmaid to 0>>
	<<elseif canSee($Milkmaid) != true>>
		''__@@color:pink;$Milkmaid.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your Milkmaid any more.@@<br>
		<<set $Milkmaid to 0>>
	<</if>>
	<<if $Milkmaid == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the Stewardess">>
	<<set $Stewardess to $slaves[_i]>>
	<<if canTalk($Stewardess) == false>>
		''__@@color:pink;$Stewardess.slaveName@@__'' can't give servants verbal orders @@color:yellow;and cannot serve as your Stewardess any more.@@<br>
		<<set $Stewardess to 0>>
	<<elseif $Stewardess.preg > 31 && $Stewardess.pregType is 50>>
		''__@@color:pink;$Stewardess.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your Stewardess any longer@@.
		<<set $Stewardess to 0>>
	<<elseif $Stewardess.fetish is "mindbroken">>
		''__@@color:pink;$Stewardess.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Stewardess any more.@@<br>
		<<set $Stewardess to 0>>
	<<elseif canWalk($Stewardess) != true>>
		''__@@color:pink;$Stewardess.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your Stewardess any more.@@<br>
		<<set $Stewardess to 0>>
	<<elseif canSee($Stewardess) != true>>
		''__@@color:pink;$Stewardess.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your Stewardess any more.@@<br>
		<<set $Stewardess to 0>>
	<</if>>
	<<if $Stewardess == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the Schoolteacher">>
	<<set $Schoolteacher to $slaves[_i]>>
	<<if canTalk($Schoolteacher) == false>>
		''__@@color:pink;$Schoolteacher.slaveName@@__'' can't give verbal instruction @@color:yellow;and cannot serve as your Schoolteacher any more.@@<br>
		<<set $Schoolteacher to 0>>
	<<elseif $Schoolteacher.preg > 31 && $Schoolteacher.pregType is 50>>
		''__@@color:pink;$Schoolteacher.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your Schoolteacher any longer@@.
		<<set $Schoolteacher to 0>>
	<<elseif $Schoolteacher.fetish is "mindbroken">>
		''__@@color:pink;$Schoolteacher.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Schoolteacher any more.@@<br>
		<<set $Schoolteacher to 0>>
	<<elseif canSee($Schoolteacher) != true>>
		''__@@color:pink;$Schoolteacher.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your Schoolteacher any more.@@<br>
		<<set $Schoolteacher to 0>>
	<</if>>
	<<if $Schoolteacher == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the Wardeness">>
	<<set $Wardeness to $slaves[_i]>>
	<<if canWalk($Wardeness) != true>>
		''__@@color:pink;$Wardeness.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your Wardeness any more.@@<br>
		<<set $Wardeness to 0>>
	<<elseif $Wardeness.preg > 31 && $Wardeness.pregType is 50>>
		''__@@color:pink;$Wardeness.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your Wardeness any longer@@.
		<<set $Wardeness to 0>>
	<<elseif canSee($Wardeness) != true>>
		''__@@color:pink;$Wardeness.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your Wardeness any more.@@<br>
		<<set $Wardeness to 0>>
	<</if>>
	<<if $Wardeness == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the Attendant">>
	<<set $Attendant to $slaves[_i]>>
	<<if $Attendant.fetish is "mindbroken">>
		''__@@color:pink;$Attendant.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Attendant any more.@@<br>
		<<set $Attendant to 0>>
	<<elseif $Attendant.preg > 31 && $Attendant.pregType is 50>>
		''__@@color:pink;$Attendant.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your Attendant any longer@@.
		<<set $Attendant to 0>>
	<<elseif canWalk($Attendant) != true>>
		''__@@color:pink;$Attendant.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your Attendant any more.@@<br>
		<<set $Attendant to 0>>
	<</if>>
	<<if $Attendant == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be the Nurse">>
	<<set $Nurse to $slaves[_i]>>
	<<if $Nurse.fetish is "mindbroken">>
		''__@@color:pink;$Nurse.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Nurse any more.@@<br>
		<<set $Nurse to 0>>
	<<elseif $Nurse.preg > 31 && $Nurse.pregType is 50>>
		''__@@color:pink;$Nurse.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your Nurse any longer@@.
		<<set $Nurse to 0>>
	<<elseif canWalk($Nurse) != true>>
		''__@@color:pink;$Nurse.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your Nurse any more.@@<br>
		<<set $Nurse to 0>>
	<<elseif canSee($Nurse) != true>>
		''__@@color:pink;$Nurse.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your Nurse any more.@@<br>
		<<set $Nurse to 0>>
	<</if>>
	<<if $Nurse == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "guard you">>
	<<set $Bodyguard to $slaves[_i]>>
	<<if canWalk($Bodyguard) != true>>
		''__@@color:pink;$Bodyguard.slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot serve as your bodyguard any more.@@<br>
		<<set $Bodyguard to 0>>
	<<elseif $Bodyguard.preg > 31 && $Bodyguard.pregType is 50>>
		''__@@color:pink;$Bodyguard.slaveName@@__'' spends so much time giving birth and laboring that @@color:yellow;she cannot effectively serve as your bodyguard any longer@@.
		<<set $Bodyguard to 0>>
	<<elseif canSee($Bodyguard) != true>>
		''__@@color:pink;$Bodyguard.slaveName@@__'' can no longer see @@color:yellow;and cannot serve as your Bodyguard any more.@@<br>
		<<set $Bodyguard to 0>>
	<</if>>
	<<if $Bodyguard == 0>>
		<<set $slaves[_i].assignment to "rest", $slaves[_i].assignmentVisible to 1>>
	<</if>>
<<case "be your Concubine">>
	<<set $Concubine to $slaves[_i], $fuckSlaves++>>
<<case "serve in the master suite" "please you">>
	<<set $fuckSlaves++>>
<</switch>>

<<if $Lurcher>>
	<<if $slaves[_i].ID is $Lurcher.ID>>
		<<set $Lurcher to $slaves[_i]>>
		<<if canWalk($Lurcher) != true>>
			''__@@color:pink;$Lurcher.slaveName@@__'' is no longer able to run @@color:yellow;and cannot course as a lurcher.@@<br>
			<<set $Lurcher to 0>>
		<<elseif $Lurcher.preg > 31 && $Lurcher.pregType >= 10>>
			''__@@color:pink;$Lurcher.slaveName@@__'' is too pregnant to run @@color:yellow;and cannot course as a lurcher.@@
			<<set $Lurcher to 0>>
		<</if>>
	<</if>>
<</if>>

<<if $fighterIDs.contains($slaves[_i])>>
	<<if canWalk($slaves[_i]) != true>>
		''__@@color:pink;$slaves[_i].slaveName@@__'' is no longer independently mobile @@color:yellow;and cannot fight any more.@@ She has been removed from $pitName roster<br>.
		<<for _k to 0; _k < $fighterIDs.length; _k++>>
		<<if $slaves[_i].ID == $fighterIDs[_k]>>
			<<set $dump to $fighterIDs.pluck([_k],[_k])>>
			<<set _k-->>
		<</if>>
		<</for>>
	<</if>>
<</if>>

<<if $slaves[_i].origin>>
<<set $toSearch to $slaves[_i].origin>>
<<if $toSearch.indexOf("Slave Shelter") != -1>>
	<<set $shelterGirlsIDs.push($slaves[_i].ID)>>
<</if>>
<</if>>

<<if $slaves[_i].bellyPain != 0>>
	<<set $slaves[_i].bellyPain = 0>>
<</if>>
/* preg speed control changes*/
<<if $slaves[_i].preg > 0>>
	<<if $slaves[_i].pregControl == "slow gestation">>
		<<set $slaves[_i].preg += 0.5>>
		<<set $slaves[_i].preg = (Math.ceil($slaves[_i].preg*10)/10)>> /* trick to avoid precission lost error showed like week: 29.499999999999998*/
	<<elseif $slaves[_i].pregControl == "speed up">>
		<<set $slaves[_i].preg += 2>>
	<<else>>
		<<set $slaves[_i].preg++>>
	<</if>>
<</if>>
/* end of preg speed control changes*/
<<if ($slaves[_i].scars == 3)>> 
	<<set $slaves[_i].scarheal += 1>>
<</if>>

<</for>>
<<if $averageDick > 0>><<set $averageDick to $averageDick/$slavesWithWorkingDicks>><</if>>
<<set $freeSexualEnergy = $PC.sexualEnergy-$fuckSlaves>>
<<if $freeSexualEnergy > 0>>
<<if $freeSexualEnergy > $slavesVisible/2>>
	<<set $freeSexualEnergy = 3>>
<<elseif $freeSexualEnergy > $slavesVisible/4>>
	<<set $freeSexualEnergy = 2>>
<<else>>
	<<set $freeSexualEnergy = 1>>
<</if>>
<</if>>


/* Accordion 000-250-006 */
<<if ($brothel > 0)>>
    <<if ($brothelSlaves eq 0) and ($Madam eq 0)>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="Mandatory sensitivity classes">''$brothelNameCaps'' is currently unstaffed</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $brothelSlaves eq 1>>
                    <<set _str1 to "There is one slave serving">>
                <<else>>
                    <<set _str1 to "There are " + $brothelSlaves + " serving">>
                <</if>>
                <<= '<button id="passage-brothel-report" class="accordion" data-after="' + _str1 + ' in ' + $brothelNameCaps + '">$brothelNameCaps Report</button>'>>
            <<else>>
                ''$brothelNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Brothel Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($club > 0)>>
    <<if ($clubSlaves eq 0) and ($DJ eq 0)>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="Who said disco is dead?">''$clubNameCaps'' is currently dark and silent</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $clubSlaves eq 1>>
                    <<set _str1 to "There is one slave serving">>
                <<else>>
                    <<set _str1 to "There are " + $clubSlaves + " serving">>
                <</if>>
                <<= '<button id="passage-club-report" class="accordion" data-after="' + _str1 + ' in ' + $clubNameCaps + '">$clubNameCaps Report</button>'>>
            <<else>>
                ''$brothelNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Club Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($arcade > 0)>>
    <<if $arcadeSlaves eq 0>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="No glory (hole), no guts ...">''$arcadeNameCaps'' is currently empty</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $arcadeSlaves eq 1>>
                    <<set _str1 to "There is one slave serving">>
                <<else>>
                    <<set _str1 to "There are " + $arcadeSlaves + " slaves serving">>
                <</if>>
                <<= '<button id="passage-arcade-report" class="accordion" data-after="' + _str1 + ' in ' + $arcadeNameCaps + '">$arcadeNameCaps Report</button>'>>
            <<else>>
                ''$arcadeNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Arcade Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($dairy > 0)>>
    <<if ($dairySlaves eq 0) and ($Milkmaid eq 0)>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="Cows gone to pasture?">''$dairyNameCaps'' is empty</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $dairySlaves eq 1>>
                    <<set _str1 to "There is one">>
                    <<set _plurals to "">>
                <<else>>
                    <<set _str1 to "There are " + $dairySlaves>>
                    <<set _plurals to "s">>
                <</if>>
                <<if ($dairyRestraintsSetting > 1)>> 
                    <<set _str2 to " bioreactor" + _plurals>> 
                <<else>>
                    <<set _str2 to " cow" + _plurals>> 
                <</if>>
                <<= '<button id="passage-dairy-report" class="accordion" data-after="' + _str1 + _str2 + ' in ' + $dairyNameCaps + '">$dairyNameCaps Report</button>'>>
            <<else>>
                ''$dairyNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Dairy Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($servantsQuarters > 0)>>
    <<if ($servantsQuartersSlaves eq 0) and ($Stewardess eq 0)>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="Those sheets aren't gonna fold themselves">''$servantsQuartersNameCaps'' is currently unstaffed</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $servantsQuartersSlaves eq 1>>
                    <<set _str1 to "There is slave serving">>
                <<else>>
                    <<set _str1 to "There are " + $servantsQuartersSlaves + " serving">>
                <</if>>
                <<= '<button id="passage-servants-quarters-report" class="accordion" data-after="' + _str1 + ' in ' + $servantsQuartersNameCaps + '">$servantsQuartersNameCaps Report</button>'>>
            <<else>>
                ''$servantsQuartersNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Servants' Quarters Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($schoolroom > 0)>>
    <<if ($schoolroomSlaves eq 0) and ($Schoolteacher eq 0)>> /* Is there even anyone home? */ /* DEV: Is this the right camelcase for schooteacher? */
        <div class="unStaffed" data-after="School's out for summer!">''$schoolroomNameCaps'' is empty</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $schoolroomSlaves eq 1>>
                    <<set _str1 to "There is one slave">>
                <<else>>
                    <<set _str1 to "There are " + $schoolroomSlaves + " slaves serving">>
                <</if>>
                <<= '<button id="passage-schoolroom-report" class="accordion" data-after="' + _str1 + ' in ' + $schoolroomNameCaps + '">$schoolroomNameCaps Report</button>'>>
            <<else>>
                ''$schoolroomNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Schoolroom Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($spa > 0)>>
    <<if ($spaSlaves eq 0) and ($Attendant eq 0)>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="All work and no play ...">''$spaNameCaps'' is currently unstaffed</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $spaSlaves eq 1>>
                    <<set _str1 to "There is one slave relaxing">>
                <<else>>
                    <<set _str1 to "There are " + $spaSlaves + " slaves relaxing">>
                <</if>>
                <<= '<button id="passage-spa-report" class="accordion" data-after="' + _str1 + ' in ' + $spaNameCaps + '">$spaNameCaps Report</button>'>>
            <<else>>
                ''$spaNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Spa Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($clinic > 0)>>
  <<if ($clinicSlaves eq 0) and ($Nurse eq 0)>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="What is the nature of the medical emergency?">''$clinicNameCaps'' is currently unstaffed</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $clinicSlaves eq 1>>
                    <<set _str1 to "There is one slave recovering">>
                <<else>>
                    <<set _str1 to "There are " + $brothelSlaves + " recovering">>
                <</if>>
                <<= '<button id="passage-clinic-report" class="accordion" data-after="' + _str1 + ' in ' + $clinicNameCaps + '">$clinicNameCaps Report</button>'>>
            <<else>>
                ''$clinicNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Clinic Report" "div">>
        </div>
    <</if>>
<</if>>

<<if ($cellblock > 0)>>
    <<if ($cellblockSlaves eq 0) and ($Wardeness eq 0)>> /* Is there even anyone home? */ 
        <div class="unStaffed" data-after="Just means you haven't caught them yet">''$cellblockNameCaps'' is empty</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $cellblockSlaves eq 1>>
                    <<set _str1 to "There is one slave confined">>
                <<else>>
                    <<set _str1 to "There are " + $cellblockSlaves + " slaves confined">>
                <</if>>
                <<= '<button id="passage-cellblock-report" class="accordion" data-after="' + _str1 + ' in ' + $cellblockNameCaps + '">$cellblockNameCaps Report</button>'>>
            <<else>>
                ''$cellblockNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Cellblock Report" "div">>
        </div>
    <</if>>
<</if>>
<<if ($incubator > 0)>>
    <<if ($incubatorSlaves == 0)>>
        <div class="unStaffed" data-after="The tanks stand dormant">''$incubatorNameCaps'' is empty</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion == 1>>
                <<if $incubatorSlaves == 1>>
                    <<set _str1 to "There is one child aging">>
                <<else>>
                    <<set _str1 to "There are " + $incubatorSlaves + " children aging">>
                <</if>>
                <<= '<button id="passage-incubator-report" class="accordion" data-after="' + _str1 + ' in ' + $incubatorNameCaps + '">$incubatorNameCaps Report</button>'>>
            <<else>>
                ''$incubatorNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Incubator Report" "div">>
        </div>
    <</if>>
<</if>>
<<if ($masterSuite > 0)>>
    <<if ($masterSuiteSlaves eq 0) and ($Concubine eq 0)>> /* Is there even anyone home? */
        <div class="unStaffed" data-after="You have the TV remote control to yourself for once!">''$masterSuiteNameCaps'' is empty</div>
    <<else>>
        <div class="staffed">
            <<if $useAccordion eq 1>>
                <<if $masterSuiteSlaves eq 1>>
                    <<set _str1 to "There is one slave awaiting you">>
                <<else>>
                    <<set _str1 to "There are " + $masterSuiteSlaves + " slaves awaiting you">>
                <</if>>
                <<= '<button id="passage-mastersuite-report" class="accordion" data-after="' + _str1 + ' in ' + $masterSuiteNameCaps + '">$masterSuiteNameCaps Report</button>'>>
            <<else>>
                ''$masterSuiteNameCaps Report''
                <hr style="margin:0">
            <</if>>
            <<include "Master Suite Report" "div">>
        </div>
    <</if>>
<</if>>

/* Accordion 000-250-006 */

<<if $slavesVisible > 0>>
__''Penthouse Report''__<br>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if $slaves[$i].assignmentVisible == 1>>
	<<if $slaves[$i].assignment is "be your Head Girl">>
		<<include "Full Report">>
		<<set _iTemp to $i>>
		<<for $i to 0; $i < $slaves.length; $i++>>
			<<if $slaves[$i].assignment is "live with your Head Girl">>
			<<set $HGRelease to 1>>
			<br><br><<include "SA live with HG">>
			<<break>>
			<</if>>
		<</for>>
		<<set $i to _iTemp>>
	<<else>>
		<<include "Full Report">>
	<</if>>
	<<if ($rulesAssistantAuto == 1)>>
		<<if ($slaves[$i].useRulesAssistant == 1)>>
			<<set _rulesapplied to false>>
			<<for _r to 0; _r < $defaultRules.length; _r++>>
				<<if ($slaves[$i].assignmentVisible == 1) || ruleAppliedToSlaveFacility($defaultRules[_r], $slaves[$i])>>
					<<set _rulesapplied to true>>
					<<break>>
				<</if>>
			<</for>>
			<<if (_rulesapplied == true)>>
				<<set $activeSlave to $slaves[$i]>>
				<<include "Check Auto Rules Activate">>
				<<include "Default Rules">>
				<<set $slaves[$i] to $activeSlave>>
			<</if>>
		<</if>>
	<</if>>
	<br><br>
<<else>>
	<<if ($rulesAssistantAuto == 1)>>
		<<if ($slaves[$i].useRulesAssistant == 1)>>
			<<set _rulesapplied to false>>
			<<for _r to 0; _r < $defaultRules.length; _r++>>
				<<if ($slaves[$i].assignmentVisible == 1) || ruleAppliedToSlaveFacility($defaultRules[_r], $slaves[$i])>>
					<<set _rulesapplied to true>>
					<<break>>
				<</if>>
			<</for>>
			<<if (_rulesapplied == true)>>
				<<set $activeSlave to $slaves[$i]>>
				<<include "Check Auto Rules Activate">>
				<<include "Default Rules">>
				<<set $slaves[$i] to $activeSlave>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
<</for>>
<</if>>
