:: End Week [nobr]

<<set $gingering = 0>>

<<set $oralUseWeight to 5>>
<<set $vaginalUseWeight to 5>>
<<set $analUseWeight to 5>>

<<if $OralEncouragement == 1>>
	<<set $oralUseWeight += 2>>
	<<set $vaginalUseWeight -= 1>>
	<<set $analUseWeight -= 1>>
<<elseif $VaginalEncouragement == 1>>
	<<set $oralUseWeight -= 1>>
	<<set $vaginalUseWeight += 2>>
	<<set $analUseWeight -= 1>>
<<elseif $AnalEncouragement == 1>>
	<<set $oralUseWeight -= 1>>
	<<set $vaginalUseWeight -= 1>>
	<<set $analUseWeight += 2>>
<</if>>
<<if $OralDiscouragement == 1>>
	<<set $oralUseWeight -= 2>>
	<<set $vaginalUseWeight += 1>>
	<<set $analUseWeight += 1>>
<</if>>
<<if $VaginalDiscouragement == 1>>
	<<set $oralUseWeight += 1>>
	<<set $vaginalUseWeight -= 2>>
	<<set $analUseWeight += 1>>
<</if>>
<<if $AnalDiscouragement == 1>>
	<<set $oralUseWeight += 1>>
	<<set $vaginalUseWeight += 1>>
	<<set $analUseWeight -= 2>>
<</if>>

<<set $inflatedSlavesMilk = 0>>
<<set $inflatedSlavesCum = 0>>
<<for _i to 0; _i < $slaves.length; _i++>>
	<<if $slaves[_i].inflationMethod == 1 || $slaves[_i].inflationMethod == 2>>
		<<if $slaves[_i].inflationType == "milk">>
			<<set $inflatedSlavesMilk++>>
		<<elseif $slaves[_i].inflationType == "cum">>
			<<set $inflatedSlavesCum++>>
		<</if>>
	<</if>>
<</for>>

<<set $organsCompleted to 0>>
<<if $organs.length > 0>>
<<for _i to 0; _i < $organs.length; _i++>>
	<<if $organs[_i].weeksToCompletion > 0>>
		<<if $organFarmUpgrade == 3>>
			<<set $organs[_i].weeksToCompletion -= 4>>
		<<elseif $organFarmUpgrade == 2>>
			<<set $organs[_i].weeksToCompletion -= 2>>
		<<else>>
			<<set $organs[_i].weeksToCompletion-->>
		<</if>>
	<</if>>
	<<if $organs[_i].weeksToCompletion <= 0>>
		<<set $organsCompleted++>>
	<</if>>
<</for>>
<</if>>

<<if $limbs.length > 0>>
<<for _i to 0; _i < $limbs.length; _i++>>
	<<if $limbs[_i].weeksToCompletion > 0>>
		<<set $limbs[_i].weeksToCompletion-->>
	<</if>>
	<<if $limbs[_i].weeksToCompletion == 0>>
		<<set $limbsCompleted++>>
	<</if>>
<</for>>
<</if>>

/% Begin section: ensure minimum age is set (game may have been loaded from a non-modded version). %/
<<if $minimumSlaveAge <= 18 and $minimumSlaveAge > 0>>
<<else>>
  <<set $minimumSlaveAge to 18>>
  <<set $pedo_mode to 0>>
  <<if $fertilityAge <= 18 and $fertilityAge > 0>>
  <<else>>
	<<set $fertilityAge to 13>>
  <</if>>
  <<if $potencyAge <= 18 and $potencyAge > 0>>
  <<else>>
	<<set $potencyAge to 13>>
  <</if>>
<</if>>
/% End section: ensure minimum age is set. %/

<<set $TSS.schoolSale to 0, $GRI.schoolSale to 0, $SCP.schoolSale to 0, $LDE.schoolSale to 0, $TGA.schoolSale to 0, $TFS.schoolSale to 0, $independenceDay to 0, $showEncyclopedia to 0, $racialVarieties to [], $shelterGirlsIDs to [], $oldWeek to $week, $cashLastWeek to $cash>>

<<if $manuallyRetired == 0>><<set $retiree to 0>><</if>>
<<set $expiree to 0>>

<<set $PC.sexualEnergy = 4>>
<<if $personalAttention is "sex">>
	<<set $PC.sexualEnergy += 2>>
<</if>>
<<if $PC.physicalAge >= 65>>
	<<set $PC.sexualEnergy -= 4>>
<<elseif $PC.physicalAge >= 50>>
	<<set $PC.sexualEnergy -= 2>>
<<elseif $PC.physicalAge < 35>>
	<<set $PC.sexualEnergy += 2>>
<</if>>
<<if $PC.preg > 20>>
	<<if $PC.pregMood == 2>>
		<<set $PC.sexualEnergy += 4>>
	<<else>>
		<<set $PC.sexualEnergy -= 3>>
	<</if>>
<<elseif $PC.preg > 0>>
	<<set $PC.sexualEnergy -= 1>>	
<</if>>
<<if $PC.preg > 0>>
	<<set $PC.preg++>>
<</if>>

<<set $HGEnergy to 0, $HGCum = 0, $HGSlaveSuccess to 0, $HeadGirl to 0, $HGBalls to 0, $HGRelease to 1, $Recruiter to 0, $Madam to 0, $madamCashBonus to 0, $DJ to 0, $DJRepBonus to 0, $Milkmaid to 0, $Collectrix to 0, $Stewardess to 0, $Schoolteacher to 0, $Wardeness to 0, $Concubine to 0, $Attendant to 0, $Nurse to 0, $Bodyguard to 0, $bedSlaves to 0, $fuckSlaves to 0, $freeSexualEnergy to 0, $publicServants to 0, $cumSlaves to 0, $averageDick to 0, $slavesWithWorkingDicks to 0>>

/* GAMEOVERS */
<<if $slaves.length < 1>>
	<<set $gameover to "no slaves">><<goto "Gameover">>
<<elseif $arcologies[0].ownership < $arcologies[0].minority>>
	<<set $gameover to "ownership">><<goto "Gameover">>
<<else>>
	<<goto "Slave Assignments Report">>
<</if>>