:: Slave Assignments Report [nobr]

<h1> <<print $arcologies[0].name + " Weekly Report - Week " + $week>></h1>

<<set $nextLink = "Economics", $nextButton = "Continue", _SL = $slaves.length>>

<<for _i = 0; _i < _SL; _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 = 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 = 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 = 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 = 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 = 0>>
<</if>>

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

<<switch $slaves[_i].assignment>>
<<case "be your Head Girl">>
	<<set $HeadGirl = $slaves[_i]>>
	<<if $HeadGirl.fetish == "mindbroken">>
		''__@@color:pink;$HeadGirl.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your head girl any more.@@<br>
		<<set $HeadGirl = 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 = 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 = 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 = 0>>
	<<elseif $HeadGirl.preg > 31 && $HeadGirl.pregType == 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 = 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 = 0>>
	<</if>>
	<<if $HeadGirl != 0>>
		<<set $HGEnergy++>>
		<<if $HeadGirl.balls > 0>>
			<<set $HGBalls = 1>>
		<</if>>
		<<if $arcologies[0].FSChineseRevivalistLaw == 1>>
			<<set $HGEnergy++>>
		<</if>>
		<<if $personalAttention == "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 = "rest", $slaves[_i].assignmentVisible = 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 = $slaves[_i]>>
	<<if $Recruiter.fetish == "mindbroken">>
		''__@@color:pink;$Recruiter.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your recruiter any more.@@<br>
		<<set $Recruiter = 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 = 0>>
	<<elseif $Recruiter.preg > 31 && $Recruiter.pregType == 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 = 0>>
	<<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 = 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 = 0>>
	<</if>>
	<<if $Recruiter == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the Madam">>
	<<set $Madam = $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 = 0>>
	<<elseif $Madam.preg > 31 && $Madam.pregType == 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 = 0>>
	<<elseif $Madam.fetish == "mindbroken">>
		''__@@color:pink;$Madam.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Madam any more.@@<br>
		<<set $Madam = 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 = 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 = 0>>
	<</if>>
	<<if $Madam == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the DJ">>
	<<set $DJ = $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 = 0>>
	<<elseif $DJ.preg > 31 && $DJ.pregType == 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 = 0>>
	<<elseif $DJ.fetish == "mindbroken">>
		''__@@color:pink;$DJ.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your DJ any more.@@<br>
		<<set $DJ = 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 = 0>>
	<</if>>
	<<if $DJ == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the Milkmaid">>
	<<set $Milkmaid = $slaves[_i]>>
	<<if $Milkmaid.fetish == "mindbroken">>
		''__@@color:pink;$Milkmaid.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Milkmaid any more.@@<br>
		<<set $Milkmaid = 0>>
	<<elseif $Milkmaid.preg > 31 && $Milkmaid.pregType == 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 = 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 = 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 = 0>>
	<</if>>
	<<if $Milkmaid == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the Stewardess">>
	<<set $Stewardess = $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 = 0>>
	<<elseif $Stewardess.preg > 31 && $Stewardess.pregType == 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 = 0>>
	<<elseif $Stewardess.fetish == "mindbroken">>
		''__@@color:pink;$Stewardess.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Stewardess any more.@@<br>
		<<set $Stewardess = 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 = 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 = 0>>
	<</if>>
	<<if $Stewardess == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the Schoolteacher">>
	<<set $Schoolteacher = $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 = 0>>
	<<elseif $Schoolteacher.preg > 31 && $Schoolteacher.pregType == 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 = 0>>
	<<elseif $Schoolteacher.fetish == "mindbroken">>
		''__@@color:pink;$Schoolteacher.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Schoolteacher any more.@@<br>
		<<set $Schoolteacher = 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 = 0>>
	<</if>>
	<<if $Schoolteacher == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the Wardeness">>
	<<set $Wardeness = $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 = 0>>
	<<elseif $Wardeness.preg > 31 && $Wardeness.pregType == 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 = 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 = 0>>
	<</if>>
	<<if $Wardeness == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the Attendant">>
	<<set $Attendant = $slaves[_i]>>
	<<if $Attendant.fetish == "mindbroken">>
		''__@@color:pink;$Attendant.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Attendant any more.@@<br>
		<<set $Attendant = 0>>
	<<elseif $Attendant.preg > 31 && $Attendant.pregType == 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 = 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 = 0>>
	<</if>>
	<<if $Attendant == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be the Nurse">>
	<<set $Nurse = $slaves[_i]>>
	<<if $Nurse.fetish == "mindbroken">>
		''__@@color:pink;$Nurse.slaveName@@__'' is mindbroken @@color:yellow;and cannot serve as your Nurse any more.@@<br>
		<<set $Nurse = 0>>
	<<elseif $Nurse.preg > 31 && $Nurse.pregType == 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 = 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 = 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 = 0>>
	<</if>>
	<<if $Nurse == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "guard you">>
	<<set $Bodyguard = $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 = 0>>
	<<elseif $Bodyguard.preg > 31 && $Bodyguard.pregType == 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 = 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 = 0>>
	<</if>>
	<<if $Bodyguard == 0>>
		<<set $slaves[_i].assignment = "rest", $slaves[_i].assignmentVisible = 1>>
	<</if>>
<<case "be your Concubine">>
	<<set $Concubine = $slaves[_i], $fuckSlaves++>>
<<case "serve in the master suite" "please you">>
	<<set $fuckSlaves++>>
<</switch>>

<<if $Lurcher>>
	<<if $slaves[_i].ID == $Lurcher.ID>>
		<<set $Lurcher = $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 = 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 = 0>>
		<</if>>
	<</if>>
<</if>>

<<if $fighterIDs.includes($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 = 0; _k < $fighterIDs.length; _k++>>
		<<if $slaves[_i].ID == $fighterIDs[_k]>>
			<<set _dump = $fighterIDs.deleteAt(_k)>>
			<<set _k-->>
		<</if>>
		<</for>>
	<</if>>
<</if>>

<<if $slaves[_i].origin>>
<<set $toSearch = $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 = $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
 * @version 0.7RC
 * @author 000-250-006
 *
 * @param array _facListArr $args
 *     Multidimensional temporary array
 *     0: The passage name for the facility's report
 *     1: The facility name capitalized (@see todo)
 *     2: max number of slaves allowed in facility - > 0 implies open
 *     3: number of slaves assigned to facility
 *     4: ID of the slave assigned to run the facility ("Boss")
 *     5: Text title of the Boss
 *
 * @todo This is a proof of concept construct, if it works and cuts overhead, intended to create an object
 *      for deeper use in multiple locations, including streamlining reports/facilities code to one widget
 * @todo Figure out if this would be better as an object rather than an array for overhead
 *       StoryInit also?
 * @todo Figure out why we're not using ndef/-1 for a bunch of these story variables. Leaky conditionals
 * @todo Figure out why we're using variable space with capitalized facility names when we can parse it from true name
 */

<<set _facListArr = [
    ["Brothel Report", $brothelNameCaps, $brothel, $brothelSlaves, $Madam, "Madam"],
    ["Club Report", $clubNameCaps, $club, $clubSlaves, $DJ, "DJ"],
    ["Arcade Report", $arcadeNameCaps, $arcade, $arcadeSlaves, -1, -1],
    ["Dairy Report", $dairyNameCaps, $dairy, $dairySlaves, $Milkmaid, "Milkmaid"],
    ["Servants' Quarters Report", $servantsQuartersNameCaps, $servantsQuarters, $servantsQuartersSlaves, $Stewardess, "Stewardess"],
    ["Schoolroom Report", $schoolroomNameCaps, $schoolroom, $schoolroomSlaves, $Schoolteacher, "Schoolteacher"],
    ["Spa Report", $spaNameCaps, $spa, $spaSlaves, $Attendant, "Attendant"],
    ["Clinic Report", $clinicNameCaps, $clinic, $clinicSlaves, $Nurse, "Nurse"],
    ["Cellblock Report", $cellblockNameCaps, $cellblock, $cellblockSlaves, $Wardeness, "Wardeness"],
    ["Incubator Report", $incubatorNameCaps, $incubator, $incubatorSlaves, -1, -1],
    ["Master Suite Report", $masterSuiteNameCaps, $masterSuite, $masterSuiteSlaves, $Concubine, "Concubine"]
]>>

<<for _ii = 0; _ii < _facListArr.length; _ii++>>
	<<if $useAccordion > 0>><<set _accText = " accordion">><</if>>	/** Quick settings check - static or pretty tops? */
    <<set _facSubArr = _facListArr[_ii], _accText = "", _disTxt = " disabled='disabled'">> /** Chunk the row from our array we're working on to make reading code easier, null some text vars we'll need */
    <<set _str = _facSubArr[0].replace(/\W+/g, '-').toLowerCase()>> /** Normalize the passage name to use as an element ID */
    <<if _facSubArr[2] > 0>> /** Do we have one of these facilities? */
        <<if $useAccordion > 0>> <<set _accText = " accordion", _disTxt = "">> <</if>> /** Is Accordion turned on? */
        <<if (_facSubArr[3] == 0) && (_facSubArr[4] <= 0)>> /** Is there anyone inside the facility? */
            <<= '<div id="button-' + _str + '" class="unStaffed">' + _facSubArr[1] + ' is currently unstaffed</div>'>> /** No, so we display the Unstaffed bar */
        <<else>>
            <<= '<button type="button"' + _disTxt + ' id="button-' + _str + '" class="buttonBar' + _accText + '" data-after="' + _facSubArr[3] + ' slaves in ' + _facSubArr[1] + '">' + _facSubArr[1] + ' Report</button>'>> /** Yes, display the bar with information */
        <</if>>
    <<include `_facSubArr[0]` "div">> /** OK, we're done with the pretty stuff, go get the guts */
    <</if>>
    <<unset _facSubArr>>
<</for>>

/* IMPORTANT FOR REASONS!!! */
<<unset _ii>>
/** /Accordion */

<<if ($researchLab.built == "true")>>
	<<include "Lab Report">><br><br>
<</if>>

<<if $slavesVisible > 0>>
<br>__''Penthouse Report''__<br>
<<for $i = 0; $i < $slaves.length; $i++>>
<<if $slaves[$i].assignmentVisible == 1>>
	<<include "Full Report">>
	<<if ($slaves[$i].assignment == "be your Head Girl") && ($HGSuiteSlaves > 0)>>
		<<set _iTemp = $i, $i = $HGSuiteiIDs[0].Index, _ID = $HGSuiteiIDs[0].ID>>
		<<if _ID != $slaves[$i].ID>>
			/% Slaves.ID and $HGSuiteiIDs.ID's don't match-up so let's find her %/
			<<for $i = 0; $i < $slaves.length; $i++>>
			<<if _ID == $slaves[$i].ID>>
				/% Correct the Index %/
				<<set $HGSuiteiIDs[0].Index = $i>>
				<<break>>
			<</if>>
			<</for>>
		<</if>>
		/% Onward bound as normal %/
		<<set $HGRelease = 1>>
		<br><br><<include "SA live with HG">>
		<<set $i = _iTemp>>
	<</if>>
<</if>>
<<if ($rulesAssistantAuto == 1) && ($slaves[$i].useRulesAssistant == 1)>>
	<<set _rulesapplied = false>>
	<<for _r = 0; _r < $defaultRules.length; _r++>>
		<<if ($slaves[$i].assignmentVisible == 1) || ruleAppliedToSlaveFacility($defaultRules[_r], $slaves[$i])>>
			<<set _rulesapplied = true>>
			<<break>>
		<</if>>
	<</for>>
	<<if (_rulesapplied == true)>>
		<<CheckAutoRulesActivate $slaves[$i]>>
		<<DefaultRules $slaves[$i]>>
	<</if>>
<</if>>
<<if $slaves[$i].assignmentVisible == 1>><br><br><</if>>
<</for>>
<</if>>
