code:
:: SA inflation [nobr]

<<if $slaves[$i].assignment == "be confined in the arcade" || $slaves[$i].assignment == "work in the dairy">>
	<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].milkSource = 0, SetBellySize($slaves[$i])>>
<<elseif $slaves[$i].bellyImplant >= 1500>>
	<<if $slaves[$i].inflation > 1>>
		Due to the mounting pressure from $his filled abdominal implant, $he can no longer fill $himself as large as $he used to.
		<<set $slaves[$i].inflation = 1>>
		<<run SetBellySize($slaves[$i])>>
	<<else>>
		<<set $slaves[$i].bellyFluid = 2000>>
		<<run SetBellySize($slaves[$i])>>
	<</if>>
<<elseif $slaves[$i].bellyPreg >= 1500>>
	<<if $slaves[$i].inflation > 1>>
		Due to the mounting pressure from $his growing pregnancy, $he can no longer fill $himself as large as $he used to.
		<<set $slaves[$i].inflation = 1>>
		<<run SetBellySize($slaves[$i])>>
	<<else>>
		<<set $slaves[$i].bellyFluid = 2000>>
		<<run SetBellySize($slaves[$i])>>
	<</if>>
<</if>>

<<switch $slaves[$i].inflationType>>
<<case "water">>
	<<if $slaves[$i].inflation == 3>>
		$He makes sure to fill $his rear with nearly two gallons of water, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps $himself @@.red;painfully full@@ for you.
		<<set $slaves[$i].health -= 10>>
	<<elseif $slaves[$i].inflation == 2>>
		$He makes sure to fill $his rear with nearly four liters of water, leaving $him looking pregnant, whenever $he leaks or needs to release $his load. $He is full enough to be distended but not enough to grow taut.
	<<elseif $slaves[$i].inflation == 1>>
		$He makes sure to fill $his rear with nearly two liters of water, leaving $his belly noticeably distended, whenever $he leaks or needs to release $his load. $He is full enough to be swollen but not enough to visibly jiggle.
	<</if>>

<<case "aphrodisiac">>
	<<if $slaves[$i].inflation == 3>>
		$He makes sure to fill $his rear with nearly two gallons of a curative solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps $himself @@.red;painfully full@@ for you, though $he barely notices it over $his horniness. While having $his body packed full of aphrodisiacs doesn't make $him additionally submissive, it does amplify the effects of them. $His aphrodisiac bursting belly
		<<set $slaves[$i].health -= 10>>
	<<elseif $slaves[$i].inflation == 2>>
		$He makes sure to fill $his rear with nearly four liters of an aphrodisiac solution, leaving $him looking pregnant, whenever $he leaks or $his body absorbs too much. $He is full enough to be distended but not enough to grow taut. While having $his body bloated with aphrodisiacs doesn't make $him additionally submissive, it does amplify the effects of them. $His overfilled aphrodisiac belly
	<<elseif $slaves[$i].inflation == 1>>
		$He makes sure to fill $his rear with nearly two liters of an aphrodisiac solution, leaving $his belly noticeably distended, whenever $he leaks or $his body absorbs too much. $He is full enough to be swollen but not enough to visibly jiggle. $His aphrodisiac filled belly
	<</if>>
	<<if $slaves[$i].energy <= 95>>
		@@.green;rapidly boosts $his sex drive.@@
		<<set $slaves[$i].energy += 5*$slaves[$i].inflation>>
	<<else>>
		can't improve $his absurd sex drive.
	<</if>>
	<<if $slaves[$i].fuckdoll == 0 && $slaves[$i].fetish != "mindbroken">>
		Besides being humiliating, it chemically @@.hotpink;increases $his acceptance@@ of sexual slavery.
		<<set $slaves[$i].devotion += 5>>
	<</if>>
	<<if ($arcologies[0].FSBodyPuristLaw == 0) && ($healthyDrugsUpgrade == 0)>>
		Such a high dosage held for so long @@.red;isn't healthy.@@
		<<set $slaves[$i].health -= 5>>
	<</if>>
	<<set $slaves[$i].chem += 2*$slaves[$i].inflation>>
	<<if ($slaves[$i].addict > 0)>>
		<<if $slaves[$i].inflation > 0>>
			<<set $slaves[$i].addict += $slaves[$i].inflation*3>>
		<<elseif ($aphrodisiacUpgrade == 1)>>
			Substitutes produced by your advanced pharmaceutical fabricator protect $him from the negative effects of aphrodisiac withdrawal but do little to halt the spread of aphrodisiacs through $his system from $his bowels.
			<<set $slaves[$i].addict -= 2>>
		<</if>>
	<<elseif random(1,100) < 40+(20*$slaves[$i].inflation)>>
		All the aphrodisiacs held within $his bowels cause @@.cyan;$him to become an aphrodisiac addict.@@
		<<set $slaves[$i].addict = 1>>
	<</if>>

<<case "curative">>
	<<if $slaves[$i].inflation == 3>>
		$He makes sure to fill $his rear with nearly two gallons of a curative solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps $himself full for you; the curatives in $his gut keeping $him healthy despite the pain.
		<<if (($slaves[$i].assignment == "rest") || ($slaves[$i].assignment == "rest in the spa")) && ($slaves[$i].fetish != "mindbroken")>>
			The curative enema $he's on synergize with rest, keeping $him asleep most of the time. This is an @@.green;extremely effective health treatment,@@ though being filled to $his limit doesn't hasten $his recovery at all; it's just perverted.
			<<set $slaves[$i].health += 4>>
		<<elseif ($slaves[$i].health < -20)>>
			@@.green;$His poor health rapidly improves@@ under the curative enema, though being filled to $his limit doesn't hasten $his recovery at all; it's just perverted.
			<<set $slaves[$i].health += 2>>
		<<else>>
			@@.green;$His health improves@@ under the curative enema, though being filled to $his limit doesn't hasten $his recovery at all; it's just perverted.
		<</if>>
		<<set $slaves[$i].health += 1>>
	<<elseif $slaves[$i].inflation == 2>>
		$He makes sure to fill $his rear with nearly four liters of a curative solution, leaving $him looking pregnant, whenever $he leaks or $his body absorbs too much. $He is full enough to be distended but not enough to grow taut.
		<<if (($slaves[$i].assignment == "rest") || ($slaves[$i].assignment == "rest in the spa")) && ($slaves[$i].fetish != "mindbroken")>>
			The curative enema $he's on synergize with rest, keeping $him asleep most of the time. This is an @@.green;extremely effective health treatment,@@ though being overfilled doesn't hasten $his recovery at all; it's just perverted.
			<<set $slaves[$i].health += 4>>
		<<elseif ($slaves[$i].health < -20)>>
			@@.green;$His poor health rapidly improves@@ under the curative enema, though being overfilled doesn't hasten $his recovery at all; it's just perverted.
			<<set $slaves[$i].health += 2>>
		<<else>>
			@@.green;$His health improves@@ under curative enema, though being overfilled doesn't hasten $his recovery at all; it's just perverted.
		<</if>>
		<<set $slaves[$i].health += 6>>
	<<elseif $slaves[$i].inflation == 1>>
		$He makes sure to fill $his rear with nearly two liters of a curative solution, leaving $his belly noticeably distended, whenever $he leaks or $his body absorbs too much. $He is full enough to be swollen but not enough to visibly jiggle.
		<<if (($slaves[$i].assignment == "rest") || ($slaves[$i].assignment == "rest in the spa")) && ($slaves[$i].fetish != "mindbroken")>>
			The curative enema $he's on synergize with rest, keeping $him asleep most of the time. This is an @@.green;extremely effective health treatment.@@
			<<set $slaves[$i].health += 4>>
		<<elseif ($slaves[$i].health < -20)>>
			@@.green;$His poor health rapidly improves@@ under the curative enema.
			<<set $slaves[$i].health += 2>>
		<<else>>
			@@.green;$His health improves@@ under curative enema.
		<</if>>
		<<set $slaves[$i].health += 6>>
	<</if>>
	<<if $slaves[$i].fuckdoll == 0 && $slaves[$i].fetish != "mindbroken">>
		$He @@.mediumaquamarine;trusts you more@@ for giving $his access to expensive modern medicine, even if it is really embarrassing to be seen with that belly.
		<<set $slaves[$i].trust += 1>>
	<</if>>
	<<if $slaves[$i].health >= 90>>
		$He is as healthy as $he can be. @@.yellow;$His curative enema regimen has been ended.@@
		<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
	<</if>>
	<<set $slaves[$i].chem += 2, $slaves[$i].health += $curativeUpgrade*6>>

<<case "tightener">>
	<<if $slaves[$i].inflation == 3>>
		$He makes sure to fill $his rear with nearly two gallons of tightening solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps $himself @@.red;painfully full@@ for you.
		<<set $slaves[$i].health -= 10>>
		<<if $slaves[$i].geneMods.rapidCellGrowth != 1>>
			<<if $slaves[$i].anus > 1>>
				The solution slowly tightens $his anus while inside $his bowels. Being filled to $his limit with the solution does not make it tighten any better or faster; it's just perverted.
				<<if random(1,100) > 60>>
					By week's end, @@.lime;$his butthole has tightened nicely.@@
					<<set $slaves[$i].anus-->>
				<</if>>
			<<else>>
				$His anus is as tight as the solution can possibly make it.
			<</if>>
			<<if $slaves[$i].vagina > 1>>
				As $his body slowly absorbs the solution, its benefits begin to affect $his pussy. Being filled to $his limit with the solution does not make it tighten any better or faster; it's just perverted.
				<<if random(1,100) > 80>>
					By week's end, @@.lime;$his vagina has regained some tightness.@@
					<<set $slaves[$i].vagina-->>
				<</if>>
			<<elseif $slaves[$i].vagina == 1>>
				$His pussy is as tight as the solution can possibly make it.
			<</if>>
		<<else>>
			Unfortunately for $him, $his body shows no interest in tightening up after the elasticity treatment $he underwent.
		<</if>>
	<<elseif $slaves[$i].inflation == 2>>
		$He makes sure to fill $his rear with nearly four liters of tightening solution, leaving $him looking pregnant, whenever $he leaks or $his body absorbs too much. $He is full enough to be distended but not enough to grow taut.
		<<if $slaves[$i].geneMods.rapidCellGrowth != 1>>
			<<if $slaves[$i].anus > 1>>
				The solution slowly tightens $his anus while inside $his bowels. Being overfilled with the solution does not make it tighten any better or faster; it's just perverted.
				<<if random(1,100) > 60>>
					By week's end, @@.lime;$his butthole has tightened nicely.@@
					<<set $slaves[$i].anus-->>
				<</if>>
			<<else>>
				$His anus is as tight as the solution can possibly make it.
			<</if>>
			<<if $slaves[$i].vagina > 1>>
				As $his body slowly absorbs the solution, its benefits begin to affect $his pussy. Being overfilled with the solution does not make it tighten any better or faster; it's just perverted.
				<<if random(1,100) > 80>>
					By week's end, @@.lime;$his vagina has regained some tightness.@@
					<<set $slaves[$i].vagina-->>
				<</if>>
			<<elseif $slaves[$i].vagina == 1>>
				$His pussy is as tight as the solution can possibly make it.
			<</if>>
		<<else>>
			Unfortunately for $him, $his body shows no interest in tightening up after the elasticity treatment $he underwent.
		<</if>>
	<<elseif $slaves[$i].inflation == 1>>
		$He makes sure to fill $his rear with nearly two liters of tightening solution, leaving $his belly noticeably distended, whenever $he leaks or $his body absorbs too much. $He is full enough to be swollen but not enough to visibly jiggle.
		<<if $slaves[$i].geneMods.rapidCellGrowth != 1>>
			<<if $slaves[$i].anus > 1>>
				The solution slowly tightens $his anus while inside $his bowels.
				<<if random(1,100) > 60>>
					By week's end, @@.lime;$his butthole has tightened nicely.@@
					<<set $slaves[$i].anus-->>
				<</if>>
			<<else>>
				$His anus is as tight as the solution can possibly make it.
			<</if>>
			<<if $slaves[$i].vagina > 1>>
				As $his body slowly absorbs the solution, its benefits begin to affect $his pussy.
				<<if random(1,100) > 80>>
					By week's end, @@.lime;$his vagina has regained some tightness.@@
					<<set $slaves[$i].vagina-->>
				<</if>>
			<<elseif $slaves[$i].vagina == 1>>
				$His pussy is as tight as the solution can possibly make it.
			<</if>>
		<<else>>
			Unfortunately for $him, $his body shows no interest in tightening up after the elasticity treatment $he underwent.
		<</if>>
	<</if>>
	<<if ($slaves[$i].anus <= 1 && $slaves[$i].vagina <= 1) || ($slaves[$i].geneMods.rapidCellGrowth == 1)>>
		<<if $slaves[$i].geneMods.rapidCellGrowth == 1>>
			$His hole<<if $slaves[$i].vagina >= 0>>s are<<else>> is<</if>> as tight as the drugs can get <<if $slaves[$i].vagina >= 0>>them<<else>>it<</if>> with the treatment counteracting their efforts. @@.yellow;$His tightening enema regimen has been ended.@@
			<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
		<<elseif ["serve in the club", "work in the brothel"].includes($slaves[$i].assignment)>>
			$His hole<<if $slaves[$i].vagina >= 0>>s are<<else>> is<</if>> as tight as the drugs can get <<if $slaves[$i].vagina >= 0>>them<<else>>it<</if>>, but given $his assignment, $he is likely to be stretched out again so $his tightening enema regimen continues.
		<<else>>
			$His hole<<if $slaves[$i].vagina >= 0>>s are<<else>> is<</if>> as tight as the drugs can get <<if $slaves[$i].vagina >= 0>>them<<else>>it<</if>>. @@.yellow;$His tightening enema regimen has been ended.@@
			<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
		<</if>>
	<</if>>
	<<set $slaves[$i].chem += 2>>

<<case "milk">>
	<<if $slaves[$i].behavioralFlaw == "anorexic">>
		<<if $slaves[$i].inflationMethod == 1>>
			<<if ($dairySlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of milk, leaving $him looking ready to burst. $He struggles to keep $his fatty, liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion -= 8, $slaves[$i].trust -= 8>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks from the dairy tap until $his stomach is bloated with nearly four liters of milk, leaving $him looking pregnant. $He struggles to keep $his fatty, liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks from the dairy tap until $his stomach is bloated with nearly two liters of milk, leaving $his belly noticeably distended. $He struggles to keep $his fatty, liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 3>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 2>>
			<<if ($dairySlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ fills $his rectum from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of milk, leaving $him looking ready to burst. $He struggles to keep the fattening load inside $him, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion -= 8, $slaves[$i].trust -= 8>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly four liters of milk, leaving $him looking pregnant. $He struggles to keep the fattening load inside $him, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 5,$slaves[$i].trust -= 5>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly two liters of milk, leaving $his belly noticeably distended. $He struggles to keep the fattening load inside $him, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 3>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 3>>
			<<set _saf = $slaveIndices[$slaves[$i].milkSource]>>
			<<if $slaves[_saf].lactation == 0>>
				$slaves[_saf].slaveName is no longer lactating and thus can no longer keep $slaves[$i].slaveName filled with milk. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].milkSource = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ suckles from $slaves[_saf].slaveName until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of milk, leaving $him looking ready to burst. $He struggles to keep $his fatty, liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion -= 8, $slaves[$i].trust -= 8>>
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ suckles from $slaves[_saf].slaveName until $his stomach is bloated with nearly four liters of milk, leaving $him looking pregnant. $He struggles to keep $his fatty, liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ suckles from $slaves[_saf].slaveName until $his stomach is bloated with nearly two liters of milk, leaving $his belly noticeably distended. $He struggles to keep $his fatty, liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 3>>
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<</if>>
		<</if>>
	<<elseif $slaves[$i].behavioralFlaw == "gluttonous">>
		<<if $slaves[$i].inflationMethod == 1>>
			<<if ($dairySlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of milk, leaving $him looking ready to burst. $He rubs $his full belly @@.mediumaquamarine;contently,@@ anticipating $his next gorging.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion += 5, $slaves[$i].trust += 5>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from the dairy tap until $his stomach is bloated with nearly four liters of milk, leaving $him looking pregnant. $He rubs $his taut belly @@.mediumaquamarine;contently,@@ anticipating $his next feeding.
				<<set $slaves[$i].devotion += 4, $slaves[$i].trust += 4>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from the dairy tap until $his stomach is bloated with nearly two liters of milk, leaving $his belly noticeably distended. $He rubs $his sloshing belly @@.mediumaquamarine;contently,@@ anticipating $his next meal.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 2>>
			<<if ($dairySlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.hotpink;happily@@ fills $his rectum from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of milk, leaving $him looking ready to burst. $He rubs $his taut belly @@.mediumaquamarine;contently,@@ though $he wishes $he could have swallowed it instead.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion += 4, $slaves[$i].trust += 4>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.hotpink;happily@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly four liters of milk, leaving $him looking pregnant. $He rubs $his full belly @@.mediumaquamarine;contently,@@ though $he wishes $he could have swallowed it instead.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.hotpink;happily@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly two liters of milk, leaving $his belly noticeably distended. $He rubs $his sloshing belly @@.mediumaquamarine;contently,@@ though $he wishes $he could have swallowed it instead.
				<<set $slaves[$i].devotion += 1, $slaves[$i].trust += 1>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 3>>
			<<set _saf = $slaveIndices[$slaves[$i].milkSource]>>
			<<if $slaves[_saf].lactation == 0>>
				$slaves[_saf].slaveName is no longer lactating and thus can no longer keep $slaves[$i].slaveName filled with milk. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].milkSource = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from $slaves[_saf].slaveName until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of milk, leaving $him looking ready to burst. $He rubs $his full belly @@.mediumaquamarine;contently,@@ anticipating $his next gorging.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion += 5, $slaves[$i].trust += 5>>
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from $slaves[_saf].slaveName until $his stomach is bloated with nearly four liters of milk, leaving $him looking pregnant. $He rubs $his taut belly @@.mediumaquamarine;contently,@@ anticipating $his next feeding.
				<<set $slaves[$i].devotion += 4, $slaves[$i].trust += 4>>
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from $slaves[_saf].slaveName until $his stomach is bloated with nearly two liters of milk, leaving $his belly noticeably distended. $He rubs $his sloshing belly @@.mediumaquamarine;contently,@@ anticipating $his next meal.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<</if>>
		<</if>>
	<<else>>
		<<if $slaves[$i].inflationMethod == 1>>
			<<if ($dairySlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he makes sure to keep $himself filled with nearly two gallons of milk, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
				<<set $slaves[$i].health -= 10>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he makes sure to keep $himself filled with nearly four liters of milk, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he makes sure to keep $himself filled with nearly two liters of milk, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 2>>
			<<if ($dairySlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he makes sure to fill $his rear with nearly two gallons of milk, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps $himself @@.red;painfully full@@ for you.
				<<set $slaves[$i].health -= 10>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he makes sure to fill $his rear with nearly four liters of milk, leaving $him looking pregnant, whenever $he leaks or needs to release $his load. $He is full enough to be distended but not enough to grow taut.
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he makes sure to fill $his rear with nearly two liters of milk, leaving $his belly noticeably distended, whenever $he leaks or needs to release $his load. $He is full enough to be swollen but not enough to visibly jiggle.
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 3>>
			<<set _saf = $slaveIndices[$slaves[$i].milkSource]>>
			<<if $slaves[_saf].lactation == 0>>
				$slaves[_saf].slaveName is no longer lactating and thus can no longer keep $slaves[$i].slaveName filled with milk. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].milkSource = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he makes sure keep suckling from $slaves[_saf].slaveName until $he is filled with nearly two gallons of milk, leaving $him looking ready to give birth. $He keeps $himself @@.red;painfully full@@ for you.
				<<set $slaves[$i].health -= 10>>
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he makes sure keep suckling from $slaves[_saf].slaveName until $he is filled with nearly four liters of milk, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he makes sure keep suckling from $slaves[_saf].slaveName until $he is filled with nearly two liters of milk, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
				<<set $slaves[_saf].lactationDuration = 2, $slaves[_saf].boobs -= $slaves[_saf].boobsMilk, $slaves[_saf].boobsMilk = 0>>
			<</if>>
		<</if>>
	<</if>>

<<case "cum">>
	<<if $slaves[$i].behavioralFlaw == "anorexic">>
		<<if $slaves[$i].inflationMethod == 1>>
			<<if ($dairySlaves == 0 || $cumSlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of cum, leaving $him looking ready to burst. $He struggles to keep $his liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion -= 8, $slaves[$i].trust -= 8>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks from the dairy tap until $his stomach is bloated with nearly four liters of cum, leaving $him looking pregnant. $He struggles to keep $his liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks from the dairy tap until $his stomach is bloated with nearly two liters of cum, leaving $his belly noticeably distended. $He struggles to keep $his liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 3>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 2>>
			<<if ($dairySlaves == 0 || $cumSlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ fills $his rectum from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of cum, leaving $him looking ready to burst. $He struggles to keep the massive cumshot inside $him, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion -= 8, $slaves[$i].trust -= 8>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly four liters of cum, leaving $him looking pregnant. $He struggles to keep the huge cumshot inside $him, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly two liters of cum, leaving $his belly noticeably distended. $He struggles to keep the cumshot inside $him, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 3>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 3>>
			<<set _saf = $slaveIndices[$slaves[$i].cumSource]>>
			<<if $slaves[_saf].balls == 0>>
				$slaves[_saf].slaveName has no longer has testicles and thus can no longer keep $slaves[$i].slaveName filled with cum. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].cumSource = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of cum, leaving $him looking ready to burst. $He struggles to keep $his liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion -= 8, $slaves[$i].trust -= 8>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $his stomach is bloated with nearly four liters of cum, leaving $him looking pregnant. $He struggles to keep $his liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.mediumorchid;reluctantly@@ sucks $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $his stomach is bloated with nearly two liters of cum, leaving $his belly noticeably distended. $He struggles to keep $his liquid meal down, @@.gold;fearing@@ punishment otherwise.
				<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 3>>
			<</if>>
		<</if>>
	<<elseif $slaves[$i].behavioralFlaw == "gluttonous">>
		<<if $slaves[$i].inflationMethod == 1>>
			<<if ($dairySlaves == 0 || $cumSlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of cum, leaving $him looking ready to burst. $He rubs $his full belly @@.mediumaquamarine;contently,@@ anticipating $his next gorging.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion += 5, $slaves[$i].trust += 5>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from the dairy tap until $his stomach is bloated with nearly four liters of cum, leaving $him looking pregnant. $He rubs $his taut belly @@.mediumaquamarine;contently,@@ anticipating $his next feeding.
				<<set $slaves[$i].devotion += 4, $slaves[$i].trust += 4>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks from the dairy tap until $his stomach is bloated with nearly two liters of cum, leaving $his belly noticeably distended. $He rubs $his sloshing belly @@.mediumaquamarine;contently,@@ anticipating $his next meal.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 2>>
			<<if ($dairySlaves == 0 || $cumSlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.hotpink;happily@@ fills $his rectum from the dairy tap until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of cum, leaving $him looking ready to burst. $He rubs $his taut belly @@.mediumaquamarine;contently,@@ though $he wishes $he could have swallowed it instead.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion += 4, $slaves[$i].trust += 4>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.hotpink;happily@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly four liters of cum, leaving $him looking pregnant. $He rubs $his full belly @@.mediumaquamarine;contently,@@ though $he wishes $he could have swallowed it instead.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.hotpink;happily@@ fills $his rectum from the dairy tap until $his stomach is bloated with nearly two liters of cum, leaving $his belly noticeably distended. $He rubs $his sloshing belly @@.mediumaquamarine;contently,@@ though $he wishes $he could have swallowed it instead.
				<<set $slaves[$i].devotion++, $slaves[$i].trust++>>
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 3>>
			<<set _saf = $slaveIndices[$slaves[$i].cumSource]>>
			<<if $slaves[_saf].balls == 0>>
					$slaves[_saf].slaveName has no longer has testicles and thus can no longer keep $slaves[$i].slaveName filled with cum. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].cumSource = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of cum, leaving $him looking ready to burst. $He rubs $his full belly @@.mediumaquamarine;contently,@@ anticipating $his next gorging.
				<<set $slaves[$i].health -= 10, $slaves[$i].devotion += 5, $slaves[$i].trust += 5>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $his stomach is bloated with nearly four liters of cum, leaving $him looking pregnant. $He rubs $his taut belly @@.mediumaquamarine;contently,@@ anticipating $his next feeding.
				<<set $slaves[$i].devotion += 4, $slaves[$i].trust += 4>>
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he @@.hotpink;eagerly@@ sucks $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $his stomach is bloated with nearly two liters of cum, leaving $his belly noticeably distended. $He rubs $his sloshing belly @@.mediumaquamarine;contently,@@ anticipating $his next meal.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
			<</if>>
		<</if>>
	<<else>>
		<<if $slaves[$i].inflationMethod == 1>>
			<<if ($dairySlaves == 0 || $cumSlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he makes sure to keep $himself filled with nearly two gallons of cum, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
				<<set $slaves[$i].health -= 10>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he makes sure to keep $himself filled with nearly four liters of cum, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he makes sure to keep $himself filled with nearly two liters of cum, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 2>>
			<<if ($dairySlaves == 0 || $cumSlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he makes sure to fill $his rear with nearly two gallons of cum, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps $himself @@.red;painfully full@@ for you.
				<<set $slaves[$i].health -= 10>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he makes sure to fill $his rear with nearly four liters of cum, leaving $him looking pregnant, whenever $he leaks or needs to release $his load. $He is full enough to be distended but not enough to grow taut.
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he makes sure to fill $his rear with nearly two liters of cum, leaving $his belly noticeably distended, whenever $he leaks or needs to release $his load. $He is full enough to be swollen but not enough to visibly jiggle.
			<</if>>
		<<elseif $slaves[$i].inflationMethod == 3>>
			<<set _saf = $slaveIndices[$slaves[$i].cumSource]>>
			<<if $slaves[_saf].balls == 0>>
					$slaves[$j].slaveName has no longer has testicles and thus can no longer keep $slaves[$i].slaveName filled with cum. @@.yellow;$His inflation regimen has been ended.@@
				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].cumSource = 0, SetBellySize($slaves[$i])>>
			<<elseif $slaves[$i].inflation == 3>>
				Throughout the week, $he makes sure keep sucking $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $he is filled with nearly two gallons of cum, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
				<<set $slaves[$i].health -= 10>>
			<<elseif $slaves[$i].inflation == 2>>
				Throughout the week, $he makes sure keep sucking $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $he is filled with nearly four liters of cum, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
			<<elseif $slaves[$i].inflation == 1>>
				Throughout the week, $he makes sure keep sucking $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $he is filled with nearly two liters of cum, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
			<</if>>
		<</if>>
	<</if>>

<<case "food">>
	<<if $slaves[$i].behavioralFlaw == "anorexic">>
		<<if $slaves[$i].inflation == 3>>
			Throughout the week, $he focuses $his @@.mediumorchid;loathing@@ on you as $he forces down servings of slave food until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of the paste, leaving $him looking ready to burst. $He struggles to keep $his meal down, @@.gold;fearing@@ punishment otherwise.
			<<set $slaves[$i].health -= 10, $slaves[$i].devotion -= 16, $slaves[$i].trust -= 16>>
		<<elseif $slaves[$i].inflation == 2>>
			Throughout the week, $he focuses $his @@.mediumorchid;loathing@@ on you as $he forces down servings of slave food until $his stomach is bloated with nearly four liters of the paste, giving $him quite the food baby. $He struggles to keep $his meal down, @@.gold;fearing@@ punishment otherwise.
			<<set $slaves[$i].devotion -= 10, $slaves[$i].trust -= 10>>
		<<elseif $slaves[$i].inflation == 1>>
			Throughout the week, $he focuses $his @@.mediumorchid;loathing@@ on you as $he forces down servings of slave food until $his stomach is bloated with nearly two liters of the paste, leaving $his stomach obviously distended. $He struggles to keep $his meal down, @@.gold;fearing@@ punishment otherwise.
			<<set $slaves[$i].devotion -= 6, $slaves[$i].trust -= 6>>
		<</if>>
	<<elseif $slaves[$i].behavioralFlaw == "gluttonous">>
		<<if $slaves[$i].inflation == 3>>
			Throughout the week, $he @@.hotpink;eagerly@@ stuffs $his face with servings of slave food until $his stomach is @@.red;painfully bloated@@ with nearly two gallons of the paste, leaving $him looking ready to burst. $He rubs $his stuffed belly @@.mediumaquamarine;contently,@@ anticipating $his next gorging.
			<<set $slaves[$i].health -= 10, $slaves[$i].devotion += 10, $slaves[$i].trust += 10>>
		<<elseif $slaves[$i].inflation == 2>>
			Throughout the week, $he @@.hotpink;eagerly@@ stuffs $his face with servings of slave food until $his stomach is bloated with nearly four liters of the paste, giving $him quite the food baby. $He rubs $his taut belly @@.mediumaquamarine;contently,@@ anticipating $his next meal.
			<<set $slaves[$i].devotion += 7, $slaves[$i].trust += 7>>
		<<elseif $slaves[$i].inflation == 1>>
			Throughout the week, $he @@.hotpink;eagerly@@ stuffs $his face with servings of slave food until $his stomach is bloated with nearly two liters of the paste, leaving $his belly noticeably distended. $He rubs $his stuffed belly @@.mediumaquamarine;contently,@@ anticipating $his next helping.
			<<set $slaves[$i].devotion += 5, $slaves[$i].trust += 5>>
		<</if>>
	<<else>>
		<<if $slaves[$i].inflation == 3>>
			Throughout the week, $he makes sure to binge eat until $his gut is stuffed with nearly two gallons of slave food, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
			<<set $slaves[$i].health -= 10>>
		<<elseif $slaves[$i].inflation == 2>>
			Throughout the week, $he makes sure to binge eat until $his gut is filled with nearly four liters of slave food, giving $him quite the food baby. $He is full enough to be distended but not enough to grow taut.
		<<elseif $slaves[$i].inflation == 1>>
			Throughout the week, $he makes sure to binge eat until $he's consumed nearly two liters of slave food, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
		<</if>>
	<</if>>
<</switch>>

<<if $slaves[$i].fetish == "cumslut" && $slaves[$i].inflationType == "cum" && $slaves[$i].bellyFluid >= 1500>>
	Being so full of cum fills $him with @@.hotpink;absolute bliss.@@
	<<set $slaves[$i].devotion += 5>>
<<elseif $slaves[$i].fetish == "masochist" && $slaves[$i].bellyFluid >= 10000>>
	That pain comes with @@.hotpink;absolute bliss@@ as $he relishes the unique sensation.
	<<set $slaves[$i].devotion += 5>>
<</if>>
<<if $slaves[$i].behavioralQuirk == "fitness">>
<<if $slaves[$i].inflationType == "milk" || $slaves[$i].inflationType == "cum" || $slaves[$i].inflationType == "food" && $slaves[$i].inflation > 0>>
	$He vows to exercise more to deal with @@.mediumorchid;the bloated belly you forced on $him.@@ Though gaining weight just means more opportunities to work out.
	<<set $slaves[$i].devotion -= 3>>
<</if>>
<</if>>

<<if $slaves[$i].inflationType == "milk" && $slaves[$i].bellyFluid >= 1500>>
	<<if $slaves[$i].weight < 200>>
		$His body @@.lime;grows a little more padded@@ as it absorbs the milk contained in $his digestive track.
		<<set $slaves[$i].weight += 2>>
	<</if>>
	<<if random(1,100) > 50>>
	<<if $slaves[$i].boobs < 3000>>
		$His breasts @@.lime;swell@@ with added fat as $he digests the milk contained in $his digestive track.
		<<set $slaves[$i].boobs += 200>>
	<</if>>
	<<if $slaves[$i].butt < 7>>
		$His butt @@.lime;swells@@ with added fat as $he digests the milk contained in $his digestive track.
		<<set $slaves[$i].butt += 1>>
	<</if>>
	<</if>>
<<elseif $slaves[$i].inflationType == "food" && $slaves[$i].bellyFluid >= 1500>>
	<<if $slaves[$i].weight < 200>>
		$His body @@.lime;rapidly gains weight@@ as it digests the food contained in $his digestive track.
		<<set $slaves[$i].weight += 4>>
	<</if>>
	<<if random(1,100) > 50 && $slaves[$i].boobs < 3000>>
		$His breasts @@.lime;swell@@ with added fat as $he digests the food contained in $his digestive track.
		<<set $slaves[$i].boobs += 200>>
	<</if>>
	<<if random(1,100) > 50 && $slaves[$i].butt < 7>>
		$His butt @@.lime;swells@@ with added fat as $he digests the food contained in $his digestive track.
		<<set $slaves[$i].butt += 1>>
	<</if>>
<</if>>


code:
:: SE Burst [nobr]

<<set $nextButton = "Continue", $returnTo = "Scheduled Event">>

<<for _b = 0; _b < $slaves.length; _b++>>
<<if $slaves[_b].burst == 1>>

	<<if (($slaves[_b].belly > ($slaves[_b].pregAdaptation*3200)) || $slaves[_b].bellyPreg > 600000)>>
		$slaves[_b].slaveName's straining womb finally gave out and burst, taking $his life and that of $his children. //Placeholder//
	<<elseif $slaves[_b].inflation != 0>>
		<<pop $slaves[_b]>>
	<</if>>

	<<set $activeSlave = $slaves[_b]>>
	<<include "Remove activeSlave">>

<</if>>
<</for>>

<<set $burstee = 0>>
<<set $burst = 0>>


code:
:: SE Death [nobr]

<<set $nextButton = "Continue", $nextLink = "Scheduled Event">>

<<set _killedSlaves = []>>
<<foreach _slave of $slaves>>
	<<switch _slave.death.toLowerCase()>>
		<<case "old">>
			<<DeathOldAge _slave>>

			<<set _killedSlaves.push(_slave)>>
		<<case "od">>
			<<DeathOverdose _slave>>

			<<set _killedSlaves.push(_slave)>>
		<<case "health">>
			<<DeathUnhealthy _slave>>

			<<set _killedSlaves.push(_slave)>>
		<<case "burst">>
			<<DeathPregnancyBurst _slave>>

			<<set _killedSlaves.push(_slave)>>
	<</switch>>
<</foreach>>
<<foreach _slave of _killedSlaves>>
	<<set $activeSlave = _slave>>
	<<include "Remove activeSlave">>
<</foreach>>
<<unset _killedSlaves>>

<<set $slaveDeath = 0>>


code:
:: SE FCTV Install [nobr]

<<set $nextButton = "Continue", $nextLink = "Scheduled Event", $returnTo = "Scheduled Event", $showEncyclopedia = 1, $encyclopedia = "FCTV", $receiverAvailable = 1>>
<<set $showOne = 0, $showTwo = 0, $showThree = 0, $showFour = 0, $showFive = 0, $showSix = 0, $showSeven = 0, $showEight = 0, $showNine = 0, $showTen = 0, $showEleven = 0, $showTwelve = 0, $showThirteen = 0, $showFourteen = 0, $randShow = 0, $lastShow = -1>>

You've been sitting in your office into the early afternoon going over bothersome lease documents that need your approval. When you take a break to look out the window, $assistantName speaks up. "<<= properTitle()>>, you have received an approval welcome packet from 8HGG Inc in regards to Free Cities TV. It seems that they've determined that $arcologies[0].name is now sufficiently developed enough to warrant a FCTV-Citizen connection. All the details and contracts necessary are included in the packet. From there, a receiver will need to be built onto $arcologies[0].name in order to access FCTV."

You browse the guide: Home shopping networks, random dramas, how-to shows and a myriad of other things. Of more interest are some of the programs showing glimpses into foreign arcologies and how they are using the service to help mold society.

While FCTV attempts to exclude any dick-based, pregnancy, hyperpregnancy, and extreme content based on your settings, it may still hint at that content, especially the more mundane of it. If you wish to be absolutely sure, don't watch FCTV or do not install the receiver.


code:
:: SE husk slave delivery [nobr]

<<set $huskSlaveOrdered = 0, $nextButton = "Continue", $nextLink = "Scheduled Event", $returnTo = "Scheduled Event", $showEncyclopedia = 1, $encyclopedia = "Enslaving People">>

<<set $activeSlaveOneTimeMinAge = $huskSlave.age>>
<<set $activeSlaveOneTimeMaxAge = $huskSlave.age>>
<<set $one_time_age_overrides_pedo_mode = 1>>
<<set $ageAdjustOverride = 1>>
<<set $fixedNationality = $huskSlave.nationality>>
<<set $fixedRace = $huskSlave.race>>
<<if $huskSlave.sex == 2>>
	<<include "Generate XY Slave">>
	<<set $activeSlave.boobs = 0>>
	<<set $activeSlave.boobsImplant = 0>>
<<else>>
	<<include "Generate XX Slave">>
<</if>>

<<set $activeSlave.slaveName = "Doll">>
<<set $activeSlave.birthName = "">>
<<set $activeSlave.slaveSurname = "">>
<<set $activeSlave.surname = "">>
<<set $activeSlave.origin = "You reserved a mindless slave like her from the Flesh Heap.">>
<<set $activeSlave.devotion = 0>>
<<set $activeSlave.trust = 0>>
<<set $activeSlave.fetish = "mindbroken">>
<<set $activeSlave.fetishStrength = 10>>
<<set $activeSlave.fetishKnown = 1>>
<<set $activeSlave.career = "a fuckdoll">>
<<set $activeSlave.behavioralFlaw = "none">>
<<set $activeSlave.behavioralQuirk = "none">>
<<set $activeSlave.sexualFlaw = "none">>
<<set $activeSlave.sexualQuirk = "none">>
<<set $activeSlave.intelligence = -100>>
<<set $activeSlave.intelligenceImplant = 0>>
<<set $activeSlave.vaginalSkill = 0>>
<<set $activeSlave.oralSkill = 0>>
<<set $activeSlave.analSkill = 0>>
<<set $activeSlave.whoreSkill = 0>>
<<set $activeSlave.entertainSkill = 0>>
<<set $activeSlave.combatSkill = 0>>

<<if $huskSlave.sex == 3>>
	<<set $activeSlave.dick = 1>>
	<<set $activeSlave.foreskin = 2>>
	<<set $activeSlave.prostate = 1>>
	<<set $activeSlave.balls = 1>>
	<<if $activeSlave.physicalAge >= $potencyAge>>
		<<set $activeSlave.pubertyXY = 1>>
	<</if>>
<</if>>
<<if $activeSlave.balls > 0>>
	<<set $activeSlave.scrotum = $activeSlave.balls>>
<</if>>
<<if $activeSlave.vagina == -1>>
	<<set $activeSlave.clit = 0>>
<</if>>
<<if $huskSlave.virgin == 0>>
	<<set $activeSlave.anus = 0>>
	<<if $activeSlave.vagina > -1>>
		<<set $activeSlave.vagina = 0>>
	<</if>>
<</if>>

<<setLocalPronouns $activeSlave>>

A slave came in fitting the description you provided.

//As expected, $he is a complete vegetable, but that is what you ordered after all. You lack the facilities to care for $him in this state, so you should do what you are planning quickly. Or you could return $him to the Flesh Heap, though you won't get your credits back.//

<<set $saleDescription = 1, $applyLaw = 0>><<include "Long Slave Description">><<set $saleDescription = 1>>

<<if $cash >= $surgeryCost>>
	[[Accept the offered slave and contact the bodyswap surgeon.|husk Slave Swap Workaround]] //Will significantly increase the selected slave's upkeep.//
<<else>>
	//You can't sustain $him and thus must return $him.//
<</if>>


code:
:: Slave Age Intro [nobr]

Do you want to see content involving girls younger than 18 in this game?

[[No.|PC Body Intro][$minimumSlaveAge = 18, $pedo_mode = 0]] //All slaves will be at least 18 years old, and slavery of children will be illegal in the Free Cities.//

Yes, I wish to see girls as young as <<textbox "$minimumSlaveAge" $minimumSlaveAge "PC Body Intro">> [[Continue|PC Body Intro][$pedo_mode = 0]]

[[I just want lots of lolis.|PC Body Intro][$minimumSlaveAge = 3, $pedo_mode = 1]] //Nearly all randomly generated slaves will be under the age of 18, although custom slaves and slaves related to specific events may be older.//

[[I wish to see them grow up and become fertile.|PC Body Intro][$minimumSlaveAge = 3, $pedo_mode = 0, $precociousPuberty = 1, $loliGrow = 0, $fertilityAge = 10, $potencyAge = 12, $seeAge = 1]] //Preset. Slaves' age will be random from minimal possible age. They can be made fertile younger than normal puberty age (10) in some cases, and grow up naturally.//


code:
:: SlaveOnSlaveFeedingWorkAround [nobr]

<<set $nextButton = "Back", $nextLink = "Slave Interact">>

<<set $milkTap = 0, _descM = "milk", _descC = "cum", _eligibilityMilk2 = 0, _eligibilityMilk4 = 0, _eligibilityMilk8 = 0, _eligibilityCum2 = 0, _eligibilityCum4 = 0, _eligibilityCum8 = 0>>

<<for _i = 0; _i < $slaves.length; _i++>> /* milk output */
<<if $slaves[_i].lactation > 0>>
	<<set $slaves[_i].milkOutput = 0>>
	<<set _milk = milkAmount($slaves[_i])>>
	<<set _milk = (_milk/14)>>
	<<set _milk = Math.trunc(_milk)>>
	<<set $slaves[_i].milkOutput = _milk>>
<<else>>
	<<set _milk = 0>>
	<<set $slaves[_i].milkOutput = 0>>
<</if>>
<</for>>
<<for _i = 0; _i < $slaves.length; _i++>> /* cum output */
<<if $slaves[_i].balls > 0 && $slaves[_i].dick > 0 && ($slaves[_i].dickAccessory != "chastity" || $slaves[_i].dickAccessory != "combined chastity")>>
	<<set $slaves[_i].cumOutput = 0>>
	<<set _cum = cumAmount($slaves[_i])>>
	<<set _cum = (_cum/7)>>
	<<set _cum = (_cum/10)>>
	<<set _cum = Math.trunc(_cum)>>
	<<set $slaves[_i].cumOutput = _cum>>
<<else>>
	<<set _cum = 0>>
	<<set $slaves[_i].cumOutput = 0>>
<</if>>
<</for>>

//$activeSlave.slaveName is prepped to drink $his fill; now you must select a slave capable of producing the required amount of milk or ejaculate.//

__Select an eligible slave to serve as the tap:__

__Milk Slaves__

__2 Liters__

<<for _i = 0; _i < $slaves.length; _i++>>
	<<if $slaves[_i].milkOutput >= 2>>
		<<if ($slaves[_i].ID != $activeSlave.ID) && $slaves[_i].nipples != "fuckable">>
			<<set _name = SlaveFullName($slaves[_i])>>
			<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], $activeSlave.inflation = 1, $activeSlave.inflationType = _descM, $activeSlave.inflationMethod = 3]]">>
			<<set _eligibilityMilk2 = 1>>

		<</if>>
	<</if>>
<</for>>
<<if (_eligibilityMilk2 == 0)>>
	//You have no slaves capable of producing two liters of milk.//
<</if>>

__4 Liters__

<<if $activeSlave.pregKnown == 0>>
	<<for _i = 0; _i < $slaves.length; _i++>>
		<<if $slaves[_i].milkOutput >= 4>>
			<<if ($slaves[_i].ID != $activeSlave.ID) && $slaves[_i].nipples != "fuckable">>
				<<set _name = SlaveFullName($slaves[_i])>>
				<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], $activeSlave.inflation = 2, $activeSlave.inflationType = _descM, $activeSlave.inflationMethod = 3]]">>
				<<set _eligibilityMilk4 = 1>>

			<</if>>
		<</if>>
	<</for>>
	<<if (_eligibilityMilk4 == 0)>>
		//You have no slaves capable of producing four liters of milk.//
	<</if>>

	__8 Liters__

	<<for _i = 0; _i < $slaves.length; _i++>>
		<<if $slaves[_i].milkOutput >= 8>>
			<<if ($slaves[_i].ID != $activeSlave.ID) && $slaves[_i].nipples != "fuckable">>
				<<set _name = SlaveFullName($slaves[_i])>>
				<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], $activeSlave.inflation = 3, $activeSlave.inflationType = _descM, $activeSlave.inflationMethod = 3]]">>
				<<set _eligibilityMilk8 = 1>>

			<</if>>
		<</if>>
	<</for>>
	<<if (_eligibilityMilk8 == 0)>>
		//You have no slaves capable of producing eight liters of milk.//
	<</if>>
<<else>>
	Due to her pregnancy, she is incapable of keeping down more than two liters of milk.
<</if>>

__Cum Slaves__

__2 Liters__

<<for _i = 0; _i < $slaves.length; _i++>>
	<<if $slaves[_i].cumOutput >= 2>>
		<<if ($slaves[_i].ID != $activeSlave.ID)>>
			<<set _name = SlaveFullName($slaves[_i])>>
			<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], $activeSlave.inflation = 1, $activeSlave.inflationType = _descC, $activeSlave.inflationMethod = 3]]">>
			<<set _eligibilityCum2 = 1>>

		<</if>>
	<</if>>
<</for>>
<<if (_eligibilityCum2 == 0)>>
	//You have no slaves capable of producing two liters of cum.//
<</if>>

__4 Liters__

<<if $activeSlave.pregKnown == 0>>
	<<for _i = 0; _i < $slaves.length; _i++>>
		<<if $slaves[_i].cumOutput >= 4>>
			<<if ($slaves[_i].ID != $activeSlave.ID)>>
				<<set _name = SlaveFullName($slaves[_i])>>
				<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], $activeSlave.inflation = 2, $activeSlave.inflationType = _descC, $activeSlave.inflationMethod = 3]]">>
				<<set _eligibilityCum4 = 1>>

			<</if>>
		<</if>>
	<</for>>
	<<if (_eligibilityCum4 == 0)>>
		//You have no slaves capable of producing four liters of cum.//
	<</if>>

	__8 Liters__

	<<for _i = 0; _i < $slaves.length; _i++>>
		<<if $slaves[_i].cumOutput >= 8>>
			<<if ($slaves[_i].ID != $activeSlave.ID)>>
				<<set _name = SlaveFullName($slaves[_i])>>
				<<print "[[_name.slaveName|FSlaveFeed][$milkTap = $slaves[" + _i + "], $activeSlave.inflation = 3, $activeSlave.inflationType = _descC, $activeSlave.inflationMethod = 3]]">>
				<<set _eligibilityCum8 = 1>>

			<</if>>
		<</if>>
	<</for>>
	<<if (_eligibilityCum8 == 0)>>
		//You have no slaves capable of producing eight liters of cum.//
	<</if>>
<<else>>
	Due to $his pregnancy, $he is incapable of keeping down more than two liters of cum.
<</if>>


code:
:: Slave Slave Swap [nobr]

<<set $nextButton = "Continue">>
<<set _ss1 = $slaveIndices[$activeSlave.ID]>>
<<set _ss1Clone = clone($activeSlave)>>
<<set _ss2 = $slaveIndices[$swappingSlave.ID]>>
<<set _ss2Clone = clone($swappingSlave)>>
<<set _gps1 = $genePool.findIndex(function(s) { return s.ID == $slaves[_ss1].ID; })>>
<<set _gps1Clone = clone($genePool[_gps1])>>
<<set _gps2 = $genePool.findIndex(function(s) { return s.ID == $slaves[_ss2].ID; })>>
<<set _gps2Clone = clone($genePool[_gps2])>>

<<run clearSummaryCache($slaves[_ss1])>>
<<run clearSummaryCache($slaves[_ss2])>>

You strap $activeSlave.slaveName and $swappingSlave.slaveName into the remote surgery and stand back as it goes to work.
<<BodySwap $slaves[_ss1] _ss2Clone 1>> /* passing a third argument just to detect if it's a slave from the genepool */
<<BodySwap $genePool[_gps1] _gps2Clone>>
<<BodySwap $slaves[_ss2] _ss1Clone 1>> /* passing a third argument just to detect if it's a slave from the genepool */
<<BodySwap $genePool[_gps2] _gps1Clone>>

After an honestly impressive procedure, $slaves[_ss1].slaveName is recovering nicely.

<<BodySwapReaction $slaves[_ss1] _ss1Clone>>

In the neighboring bed, $slaves[_ss2].slaveName rests peacefully.

<<BodySwapReaction $slaves[_ss2] _ss2Clone>>

/* figuring out whom has who's body now*/

<<if $slaves[_ss1].bodySwap == 0>>
	<<set $slaves[_ss1].origBodyOwnerID = _ss2Clone.ID>>
<<elseif $slaves[_ss2].origBodyOwner !== "">> /* now who's going to be looking for you? */
	<<set _myBody = $slaves.findIndex(function(s) { return s.origBodyOwnerID == $slaves[_ss2].ID; })>>
	<<if _myBody != -1>>
		<<set $slaves[_myBody].origBodyOwnerID = $slaves[_ss1].ID>>
	<</if>>
<</if>>

<<if $slaves[_ss2].bodySwap == 0>>
	<<set $slaves[_ss2].origBodyOwnerID = _ss1Clone.ID>>
<<elseif $slaves[_ss1].origBodyOwner !== "">> /* now who's going to be looking for you? */
	<<set _myBody = $slaves.findIndex(function(s) { return s.origBodyOwnerID == $slaves[_ss1].ID; })>>
	<<if _myBody != -1>>
		<<set $slaves[_myBody].origBodyOwnerID = $slaves[_ss2].ID>>
	<</if>>
<</if>>

/* now to handle who's body it is, name-wise */

<<BodySwapName $slaves[_ss1] $slaves[_ss2]>>
<<BodySwapName $slaves[_ss2] $slaves[_ss1]>>

<<if _ss1Clone.bodySwap > 0>>
	<<if $slaves[_ss1].origBodyOwnerID == $slaves[_ss1].ID>>
		<<set $slaves[_ss1].bodySwap = 0>>
		<<set $slaves[_ss1].origBodyOwnerID = 0>>
		<<set $slaves[_ss1].origBodyOwner = "">>
	<<else>>
		<<set $slaves[_ss1].bodySwap++>>
	<</if>>
<<else>>
	<<set $slaves[_ss1].bodySwap++>>
<</if>>

<<if $slaves[_ss2].bodySwap > 0>>
	<<if $slaves[_ss2].origBodyOwnerID == $slaves[_ss2].ID>>
		<<set $slaves[_ss2].bodySwap = 0>>
		<<set $slaves[_ss2].origBodyOwnerID = 0>>
		<<set $slaves[_ss2].origBodyOwner = "">>
	<<else>>
		<<set $slaves[_ss2].bodySwap++>>
	<</if>>
<<else>>
	<<set $slaves[_ss2].bodySwap++>>
<</if>>

<<set $activeSlave = 0, $swappingSlave = 0>>


code:
:: Slave Slave Swap Workaround [nobr]

<<set $nextButton = "Abort Operation", $nextLink = "Main">>
<<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>>

The surgeon awaits the pair of slaves to be strapped into the surgery. So far only $activeSlave.slaveName is prepped:

//Select the slave who will be trading bodies with $him. This operation will cost <<print cashFormat(10000)>>.//

__Select an eligible slave:__
<<for _i = 0; _i < $slaves.length; _i++>>
	<<if isSlaveAvailable($slaves[_i])>>
	<<if $slaves[_i].fuckdoll == 0>>
	<<if ($slaves[_i].ID != $activeSlave.ID)>>
		<<set _name = SlaveFullName($slaves[_i])>>

<<print "[[_name|Slave Slave Swap][$swappingSlave = $slaves[" + _i + "], $cash -= 10000]]">>
	<</if>>
	<</if>>
	<</if>>
<</for>>


code:
:: Surrogacy [nobr]

<<set $nextButton = "Continue">>

<<switch $surgeryType>>

<<case "surrogacy">>

	<<if $receptrix.ID == -1>>
		Since the surgery required only a local anesthetic, you remain fully aware of the procedure as the autosurgery carries it out. You slowly rise to your feet, a hand to your lower belly, appreciating the new life growing within you.
		<<set $PC.pregKnown = 1>>
		<<run WombSurrogate($PC, 1, $donatrix, $impregnatrix.ID, 1)>>
		<<run WombNormalizePreg($PC)>>
	<<else>>
		<<set $receptrix.pregKnown = 1>>
		<<run WombSurrogate($receptrix, 1, $donatrix, $impregnatrix.ID, 1)>>
		<<run WombNormalizePreg($receptrix)>>
		<<setLocalPronouns $receptrix>>
		<<if $receptrix.fetish == "mindbroken">>
			 $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
		<<elseif ($receptrix.fetish == "pregnancy") && ($receptrix.fetishStrength > 60) && ($receptrix.fetishKnown == 1)>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He was overjoyed at the sight of the syringe containing $his future child emptying into $his womb.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He is @@.hotpink; filled with joy@@ over the life settling into $his womb and can't wait to see the result. $He's so pleased that $he now @@.mediumaquamarine;trusts@@ your plans for $his body.
			<<set $receptrix.trust += 4, $receptrix.devotion += 10>>
		<<elseif ($receptrix.devotion > 50)>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He watched the syringe containing $his new pregnancy empty into $his womb with rapt attention.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He's @@.hotpink;grateful@@ that you think $him worthy of carrying this child, and a little nervous about how $he'll perform as a surrogate.
			<<set $receptrix.devotion += 4>>
		<<elseif ($receptrix.devotion >= -20)>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. From the syringe making contact with $his skin, to the egg's delivery into $his womb and $his subsequent impregnation, $he couldn't look away.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He understands the realities of $his life as a slave, so it isn't much of a shock. $He is @@.gold;sensibly fearful@@ of your total power over $his body.
			<<set $receptrix.trust -= 10>>
		<<else>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. The moment $he realized what was happening, $he shut $his eyes tight, only opening them again as $he feels the slight tingle of the injector exiting $his lower abdomen.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He does not understand the realities of $his life as a slave at a core level, so $he's @@.mediumorchid;terrified and angry@@ that you have forced $him to bear this child, even more so as $he realizes $he doesn't know who the father is. $He is @@.gold;sensibly fearful@@ of your total power over $his body and the future of the life $he now harbors within $him.
			<<set $receptrix.trust -= 15, $receptrix.devotion -= 15>>
		<</if>>
		<<set _surr = $slaves.findIndex(function(s) { return s.ID == $receptrix.ID; })>>
		<<set $slaves[_surr] = $receptrix>>
	<</if>>
	<<set $receptrix = 0, $impregnatrix = 0, $donatrix = 0>>

<<case "transplant">>

	<<if $receptrix.ID == -1>>
		Since the surgery required only a local anesthetic, you are very aware that you are now carrying $activeSlave.slaveName's child. You slowly rise to your feet, a hand to your lower belly, appreciating the new life growing within you.
		<<set _fetus = WombRemoveFetus($activeSlave, $wombIndex)>>
		<<run WombAddFetus($PC, _fetus)>>
		<<set $PC.pregKnown = 1, $PC.preg = WombMaxPreg($PC), $activeSlave.preg = WombMaxPreg($activeSlave)>>
		<<run WombNormalizePreg($PC)>>
		<<run WombNormalizePreg($activeSlave)>>
	<<else>>
		<<set _fetus = WombRemoveFetus($donatrix, $wombIndex)>>
		<<run WombAddFetus($receptrix, _fetus)>>
		<<set $receptrix.pregKnown = 1, $receptrix.preg = WombMaxPreg($receptrix), $donatrix.preg = WombMaxPreg($donatrix)>>
		<<run WombNormalizePreg($receptrix)>>
		<<run WombNormalizePreg($donatrix)>>
		<<if $donatrix.ID == -1>>
			<<set $PC = $donatrix>>
		<<else>>
			<<set _surr = $slaves.findIndex(function(s) { return s.ID == $donatrix.ID; })>>
			<<set $activeSlave = $donatrix>>
		<</if>>
		<<setLocalPronouns $receptrix>>
		<<if $receptrix.fetish == "mindbroken">>
			 $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
		<<elseif ($receptrix.fetish == "pregnancy") && ($receptrix.fetishStrength > 60) && ($receptrix.fetishKnown == 1)>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He was overjoyed at the sight of the syringe containing $his future child emptying into $his womb.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He is @@.hotpink; filled with joy@@ over the life resettling into $his womb and can't wait to see the result. $He's so pleased that $he now @@.mediumaquamarine;trusts@@ your plans for $his body.
			<<set $receptrix.trust += 4, $receptrix.devotion += 10>>
		<<elseif ($receptrix.devotion > 50)>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He watched the syringe containing $his new pregnancy empty into $his womb with rapt attention.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He's @@.hotpink;grateful@@ that you think $him worthy of carrying this child in <<if $donatrix.ID == -1>>your stead<<else>>lieu of $donatrix.slaveName<</if>>, and a little nervous about how $he'll perform as a surrogate.
			<<set $receptrix.devotion += 4>>
		<<elseif ($receptrix.devotion >= -20)>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. From the syringe making contact with $his skin, to the egg's delivery into $his womb and $his subsequent impregnation, $he couldn't look away.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He understands the realities of $his life as a slave, so it isn't much of a shock. $He is @@.gold;sensibly fearful@@ of your total power over $his body and how you are forcing <<if $donatrix.ID == -1>>your pregnancy upon $him<<else>>$him to carry what should have been $donatrix.slaveName's burden<</if>>.
			<<set $receptrix.trust -= 10>>
		<<else>>
			<<if canSee($receptrix)>>
				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. The moment $he realized what was happening, $he shut $his eyes tight, only opening them again as $he feels the slight tingle of the injector exiting $his lower abdomen.
			<<else>>
				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
			<</if>>
			$He does not understand the realities of $his life as a slave at a core level, so $he's @@.mediumorchid;terrified and angry@@ that you have forced $him to <<if $donatrix.ID == -1>>carry your child instead of doing so yourself<<else>>bear this child in lieu of $donatrix.slaveName<</if>>. $He is @@.gold;sensibly fearful@@ of your total power over $his body and who else's troubles may be levied upon $him.
			<<set $receptrix.trust -= 15, $receptrix.devotion -= 15>>
		<</if>>
		<<set _surr = $slaves.findIndex(function(s) { return s.ID == $receptrix.ID; })>>
		<<set $slaves[_surr] = $receptrix>>
	<</if>>
	<<set $receptrix = 0, $donatrix = 0, $wombIndex = 0>>

<</switch>>


code:
:: Surrogacy Workaround [nobr]

<<set $nextButton = "Cancel", _eligibility = 0, _eligibilityI = 0, _eligibility2 = 0>>
<<if $donatrix.ID == $PC.ID>>
	<<set _donatrixID = -1>>
<<else>>
	<<set _donatrixID = 0>>
<</if>>
<<if $impregnatrix != "Undecided" && $impregnatrix.ID == -1>><<set _impreg = PlayerName()>><<elseif $impregnatrix != "Undecided">><<set _impreg = SlaveFullName($impregnatrix)>><<else>><<set _impreg = $impregnatrix>><</if>>
<<if $receptrix != "Undecided" && $receptrix.ID == -1>><<set _receive = PlayerName()>><<elseif $receptrix != "Undecided">><<set _receive = SlaveFullName($receptrix)>><<else>><<set _receive = $receptrix>><</if>>

//<<if _donatrixID == -1>>You've prepared yourself to have an egg taken from your ovaries<<else>>$activeSlave.slaveName is prepped to have an egg harvested from $his ovaries<</if>>; now you must select a target to fertilize it and who will carry it to term.//

_impreg will provide the seed and _receive shall carry it.
<<if _impreg != "Undecided" && _receive != "Undecided">>
	[[Implant fertilized ovum|Surrogacy][$cash -= ($surgeryCost*2), $surgeryType = 'surrogacy']]
<</if>>

__Semen donatrix: _impreg __

<<for _sw = 0; _sw < $slaves.length; _sw++>>
<<capture _sw>>
	<<if $slaves[_sw].balls > 0 && $slaves[_sw].pubertyXY == 1 && isSlaveAvailable($slaves[_sw]) && canBreed($donatrix, $slaves[_sw])>>
		<<set _name = SlaveFullName($slaves[_sw])>>

<<print "[[_name|Surrogacy Workaround][$impregnatrix = $slaves[" + _sw + "]]]">>
		<<set _eligibility = 1>>
	<</if>>
<</capture>>
<</for>>
<<if (_eligibility == 0)>>

//You have no slaves with potent sperm.//
<</if>>

<<if $incubatorSlaves > 0 && $incubatorReproductionSetting == 2>>

	__Incubator settings are resulting in large-scale fluid secretion. Select an eligible incubatee to milk for semen:__

	<<for _sw3 = 0; _sw3 < $tanks.length; _sw3++>>
	<<capture _sw3>>
		<<if $tanks[_sw3].balls > 0 && $tanks[_sw3].dick > 0 && canBreed($donatrix, $tanks[_sw3])>>
			<<set _name3 = $tanks[_sw3].slaveName>>
			<<print "[[_name3|Surrogacy Workaround][$impregnatrix = $tanks[" + _sw3 + "]]]">>
			<<set _eligibilityI = 1>>
		<</if>>
	<</capture>>
	<</for>>
	<<if (_eligibilityI == 0)>>

//You have no growing slaves producing sperm.//
	<</if>>
<</if>>

<<if $PC.dick == 1>>

	[[Use your own|Surrogacy Workaround][$impregnatrix = $PC]]
<</if>>

__Chosen surrogate: _receive __

<<for _sw1 = 0; _sw1 < $slaves.length; _sw1++>>
<<capture _sw1>>
	<<if ($slaves[_sw1].ovaries > 0 || $slaves[_sw1].mpreg > 0) && isSlaveAvailable($slaves[_sw1]) && $slaves[_sw1].preg >= 0 && $slaves[_sw1].preg < 4 && $slaves[_sw1].pregWeek >= 0 && $slaves[_sw1].pubertyXX == 1 && $slaves[_sw1].pregType < 12 && $slaves[_sw1].bellyImplant == -1 && $slaves[_sw1].broodmother == 0 && $slaves[_sw1].inflation <= 2 && $slaves[_sw1].physicalAge < 70>>
		<<set _name2 = SlaveFullName($slaves[_sw1])>>

<<print "[[_name2|Surrogacy Workaround][$receptrix = $slaves[" + _sw1 + "]]]">> <<if $slaves[_sw1].pregType >= 4>>//Using a slave carrying multiples is unadvisable//<</if>>
		<<set _eligibility2 = 1>>
	<</if>>
<</capture>>
<</for>>
<<if (_eligibility2 == 0)>>

//You have no slaves capable of acting as a surrogate.//
<</if>>

<<if $PC.vagina == 1 && $PC.preg >= 0 && $PC.preg < 4 && $PC.pregType < 8 && $PC.physicalAge < 70>>

	[[Use your own womb|Surrogacy Workaround][$receptrix = $PC]]
<</if>>


code:
:: test genetics [nobr]

<<set $nextButton = "Back", $nextLink = "Main">>
<<set _seed = 0>>

All slave array slaves MUST be present in genePool or else there is a malfunction.

genePool

index	name	ID	origin

<<for _i = 0; _i < $genePool.length; _i++>>

		_i
		$genePool[_i].slaveName
		$genePool[_i].ID
		$genePool[_i].origin

<</for>>

<<set _neededProperties = ['genes', 'origSkin', 'origEye', 'origHColor', 'nationality', 'origRace', 'face', 'intelligence', 'underArmHStyle', 'pubicHStyle']>>

slaves

index	name	ID	origin	assignment

<<for _i = 0; _i < $slaves.length; _i++>>
	<<set _s = $slaves[_i]>>
	<<set _error = $genePool.every(function(g) { return $slaves[_i].ID !== g.ID; })>>
	<<if _error>><<set _errorCause = "Doesn't exist in the gene pool">><</if>>
	<<if !_error>>
		<<set _missingProperties = _neededProperties.filter(function(p) { return !(p in _s);})>>
		<<if _missingProperties.length > 0>>
			<<set _error = true, _errorCause = "Missing properties: " + _missingProperties.join(", ")>>
		<</if>>
	<</if>>
	<<if _error>>

			_i
			_s.slaveName
			_s.ID
			_s.origin
			_s.assignment
			_errorCause

	<<else>>

			_i
			_s.slaveName
			_s.ID
			_s.origin
			_s.assignment

	<</if>>
<</for>>

<<if _errorCause>>
	@@.red;Errors in the gene pool detected! Please report this.@@
	<<link "Add missing slaves to the gene pool">>
		<<for _i = 0; _i < $slaves.length; _i++>>
			<<if $genePool.every(function(g) { return $slaves[_i].ID !== g.ID; })>>
				<<set $genePool.push($slaves[_i])>>
			<</if>>
		<</for>>
		<<goto "Main">>
	<</link>> //This will not fix missing properties.//
<</if>>


code:
:: The Hippolyta Academy [nobr]

<<set $nextButton = "Back", $nextLink = "Buy Slaves", $returnTo = "Buy Slaves", $showEncyclopedia = 1, $encyclopedia = "Slave Schools">>
/* Multi-Purchase Support */
<<if ndef $newSlaves>><<set $newSlaves = []>><</if>>
<<if $newSlaves.length > 0>>
	<<set $nextButton = "Continue", $nextLink = "Bulk Slave Intro", $slaveMarket = "HA", $returnTo = "Main", $newSlaveIndex = 0>>
<</if>>

//
The Hippolyta Academy is one of the most famous slave bodyguarding schools in all free cities. Its business model is to offer very high quality, highly trained girls. Their renowned amazonian maids are some of the best combatants in the world and can be often found at the side of the wealthiest citizens.
<<if $HA.schoolUpgrade == 1>>
	Recently the school was able to enhance its educational programs thanks to your generous donation. Their slaves are now some of the most well trained and educated on the market.
<<elseif $HA.schoolUpgrade == 2>>
	Recently the school was able to improve its drug enhancement program thanks to your generous donation. Their slaves are now some of the most physically impressive specimen on the market.
<<elseif $HA.schoolUpgrade == 3>>
	Recently the school redirected its focus to better align with the strongfat ideal, as of your suggestion. Their slaves are physically impressive yet maintain a soft and feminine aspect.
<</if>>
//

The Hippolyta Academy offers a fresh graduate for inspection. The interview takes place in one of the many training areas of the school, where the physical prowess of the candidate can be easily showcased.

<<GenerateMarketSlave "HA">>
<<slaveCost $activeSlave>>
<<if $HA.schoolSale != 0>>
	<<set $slaveCost = Math.trunc($slaveCost*0.6)>>
<<elseif $HA.schoolUpgrade != 0>>
	<<set $slaveCost = Math.trunc($slaveCost*1.2)>>
<</if>>
<<if $slavesSeen > $slaveMarketLimit>><<set $slaveCost += Math.trunc($slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1))>><</if>>

The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>

<<setLocalPronouns $activeSlave>>
<<if $cash >= $slaveCost>>

[["Buy " + $him + " and check out other slaves to order"|The Hippolyta Academy][$cash -= $slaveCost, $HA.schoolSale = 0, $HA.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
	<<if $newSlaves.length == 0>>

[["Buy " + $his + " slave contract"|New Slave Intro][$cash -= $slaveCost, $HA.schoolSale = 0, $HA.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
	<<else>>

[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cash -= $slaveCost, $HA.schoolSale = 0, $HA.studentsBought += 1, $newSlaves.push($activeSlave)]]
	<</if>>
<<else>>
	//You lack the necessary funds to buy this slave.//
<</if>>

[["Decline to purchase " + $him + " and check out another slave"|The Hippolyta Academy][$slavesSeen += 1]]
<<if $newSlaves.length > 0>>

[[Finish your order of slaves|Bulk Slave Intro]]
<</if>>

<<set $saleDescription = 1>><<include "Long Slave Description">>


code:
:: Wetware CPUs [nobr]

<<set $nextButton = "Back", $nextLink = "Buy Slaves", $returnTo = "Buy Slaves", $showEncyclopedia = 1, $encyclopedia = "Slave Schools">>
/* Multi-Purchase Support */
<<if ndef $newSlaves>><<set $newSlaves = []>><</if>>
<<if $newSlaves.length > 0>>
	<<set $nextButton = "Continue", $nextLink = "Bulk Slave Intro", $slaveMarket = "wetware", $returnTo = "Main", $newSlaveIndex = 0>>
<</if>>

//Wetware CPUs offer highly trained slaves with useful career experience at a discount; That is, at the cost of the physical health of the merchandise.//

<<GenerateMarketSlave "wetware">>
<<slaveCost $activeSlave>>
<<if $slavesSeen > $slaveMarketLimit>><<set $slaveCost += Math.trunc($slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1))>><</if>>

The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>

<<setLocalPronouns $activeSlave>>
<<if $cash >= $slaveCost>>

[["Buy " + $him + " and check out other slaves to order"|Wetware CPUs][$cash -= $slaveCost, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
	<<if $newSlaves.length == 0>>

[["Buy " + $his + " slave contract"|New Slave Intro][$cash -= $slaveCost, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
	<<else>>

[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cash -= $slaveCost, $newSlaves.push($activeSlave)]]
	<</if>>
<<else>>
	//You lack the necessary funds to buy this slave.//
<</if>>

[["Decline to purchase " + $him + " and check out another slave"|Wetware CPUs][$slavesSeen += 1]]
<<if $newSlaves.length > 0>>

[[Finish your order of slaves|Bulk Slave Intro]]
<</if>>

<<set $saleDescription = 1>><<include "Long Slave Description">>


code:
:: assignment-filter widget [widget nobr]

/*
 * filters the list according to the selected Facility
 * function(y) is a loop through $slaves to set assignmentVisible to 1 and returns a new array
 * function(x) filters the slaves with the given condition ( here its the assignment )
 * so basically function(x) finds the slaves that are selected and function(y) sets them to be visible
*/

/*
 * These widgets set the visibilities for the different Facilities
*/

<<widget "resetAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 1})>><<set $slaves.filter(function(x){return x.assignment.includes("in the") || x.assignment.includes("be the") || x.assignment.includes("live with") || (x.assignment.includes("be your") && x.assignment != "be your Head Girl") || x.assignment.includes("work as a ")}).map(function(y){y.assignmentVisible = 0})>>
<</widget>>

<<widget "showallAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 1})>><<set $slaves.filter(function(x){return x.assignment.includes("agent")}).map(function(y){y.assignmentVisible = 0})>>
<</widget>>

<<widget "arcadeAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "be confined in the arcade"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "brothelAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "work in the brothel" || x.assignment == "be the Madam"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "cellblockAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "be confined in the cellblock" || x.assignment == "be the Wardeness"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "clinicAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "get treatment in the clinic" || x.assignment == "be the Nurse"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "clubAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "serve in the club" || x.assignment == "be the DJ"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "dairyAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "work in the dairy" || x.assignment == "be the Milkmaid"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "farmyardAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "work as a farmhand" || x.assignment == "be the Farmer"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "headgirlSuiteAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "live with your Head Girl"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "penthouseAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "rest" || x.assignment == "be a subordinate slave" || x.assignment == "whore" || x.assignment == "serve the public" || x.assignment == "work a glory hole" || x.assignment == "get milked" || x.assignment == "be a servant" || x.assignment == "please you"|| x.assignment == "stay confined" || x.assignment == "take classes" || x.assignment == "choose her own job" || x.assignment == "live with your Head Girl"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "schoolAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "learn in the schoolroom" || x.assignment == "be the Schoolteacher"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "spaAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "rest in the spa" || x.assignment == "be the Attendant"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "nurseryAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "work as a nanny" || x.assignment == "be the Matron"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "suiteAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "serve in the master suite" || x.assignment == "be your Concubine"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

<<widget "quartersAssignmentFilter">>
	<<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "work as a servant" || x.assignment == "be the Stewardess"}).map(function(y){y.assignmentVisible = 1})>>
<</widget>>

/*
 * Checks from which Facility its get called and removes it from the list
 * this is the Main Filter widget used on all Passages atm
 * sets Flag = zero so slave summary provides send-to-facility links
*/
<<widget "assignmentFilter">>
	<<link All>><<showallAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>>
	<<if passage() != "Arcade">><<print " | ">><<link Arcade>><<arcadeAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Brothel">><<print " | ">><<link Brothel>><<brothelAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Cellblock">><<print " | ">><<link Cellblock>><<cellblockAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Clinic">><<print " | ">><<link Clinic>><<clinicAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Club">><<print " | ">><<link Club>><<clubAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Dairy">><<print " | ">><<link Dairy>><<dairyAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Farmyard">><<print " | ">><<link Farmyard>><<farmyardAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<print " | ">><<link Penthouse>><<penthouseAssignmentFilter>><<replace #ComingGoing>><<include 'Slave Summary'>><<set $Flag = 0>><<resetAssignmentFilter>><</replace>><</link>>
	<<if passage() != "Schoolroom">><<print " | ">><<link Schoolroom>><<schoolAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Spa">><<print " | ">><<link Spa>><<spaAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Nursery">><<print " | ">><<link Nursery>><<nurseryAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Master Suite">><<print " | ">><<link Suite>><<suiteAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
	<<if passage() != "Servants' Quarters">><<print " | ">><<link Quarters>><<quartersAssignmentFilter>><<set $Flag = 0>><<replace #ComingGoing>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
<</widget>>

/*
 * undefinedAssignmentFilter serves no purpose atm
 * might use it for RA Slave filter and Matchmaking
*/
<<widget "undefinedAssignmentFilter">>
	<<link All>><<showallAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Arcade>><<arcadeAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Brothel>><<brothelAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Cellblock>><<cellblockAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Clinic>><<clinicAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Club>><<clubAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Dairy>><<dairyAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Farmyard>><<farmyardAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Penthouse>><<penthouseAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Schoolroom>><<schoolAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Spa>><<spaAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Nursery>><<nurseryAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Suite>><<suiteAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>><<print " | ">>
	<<link Quarters>><<quartersAssignmentFilter>><<replace $args.full>><<include 'Slave Summary'>><</replace>><</link>>
	<<resetAssignmentFilter>>
<</widget>>