:: End Week [nobr]

<<set $gingering = 0>>

<<set $oralUseWeight = 5>>
<<set $vaginalUseWeight = 5>>
<<set $analUseWeight = 5>>
<<set $mammaryUseWeight = 1>>
<<set $penetrativeUseWeight = 1>>

<<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 = 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>>

<<if $organs.length > 0>>
<<for _i = 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 $completedOrgans.push($organs[_i])>>
		<<set $organs.deleteAt(_i)>>
	<</if>>
<</for>>
<</if>>
<<if $incubatorOrgans.length > 0>>
<<for _i = 0; _i < $incubatorOrgans.length; _i++>>
	<<if $incubatorOrgans[_i].weeksToCompletion > 0>>
		<<if $organFarmUpgrade == 3>>
			<<set $incubatorOrgans[_i].weeksToCompletion -= 4>>
		<<elseif $organFarmUpgrade == 2>>
			<<set $incubatorOrgans[_i].weeksToCompletion -= 2>>
		<<else>>
			<<set $incubatorOrgans[_i].weeksToCompletion-->>
		<</if>>
	<</if>>
<</for>>
<</if>>

<<if $limbs.length > 0>>
<<for _i = 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 && $minimumSlaveAge > 0>>
<<else>>
  <<set $minimumSlaveAge = 18>>
  <<set $pedo_mode = 0>>
  <<if $fertilityAge <= 18 && $fertilityAge > 0>>
  <<else>>
	<<set $fertilityAge = 13>>
  <</if>>
  <<if $potencyAge <= 18 && $potencyAge > 0>>
  <<else>>
	<<set $potencyAge = 13>>
  <</if>>
<</if>>
/% End section: ensure minimum age is set. %/

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

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

<<set $PC.sexualEnergy = 4>>
<<if $personalAttention == "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.balls > 2>>
	<<set $PC.sexualEnergy += 2>>
<<elseif $PC.balls > 1>>
	<<set $PC.sexualEnergy++>>
<</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++>>
	<<set _newBelly = getPregBellySize($PC)>>
	<<if _newBelly >= $PC.belly>>
		<<set $PC.belly = _newBelly>>
	<<elseif $PC.belly > 500>>
		<<set $PC.belly *= .75>>
	<</if>>
	<<if $PC.fertDrugs != 0>>
		<<set $PC.fertDrugs = 0>>
	<</if>>
<<elseif $PC.belly > 0>>
	<<if $PC.belly < 100>>
		<<set $PC.belly = 0>>
	<<else>>
		<<set $PC.belly *= .75>>
	<</if>>
<</if>>

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

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