code:
:: Analyze PC Pregnancy [nobr]

<<set $nextButton = "Continue", $nextLink = "Manage Personal Affairs">>

<<set _WL = $PC.womb.length, _incubatorReservations = WombReserveCount($PC, "incubator"), _nurseryReservations = WombReserveCount($PC, "nursery")>>

<<if _WL == 0>>
	<<goto "Manage Personal Affairs">>
<<else>>

	//You make yourself comfortable and prep your stomach for examination. <<PlayerBelly>>//

	Overall statistics:

    Fetal count: $PC.womb.length

    Estimated womb volume: <<print num(Math.round($PC.belly))>> cc

	Furthest developed pregnancy:

    Fetal development week: $PC.preg

	<<if $incubator + $nursery > 0>>

	<<if $incubator > 0>>
		<<if _incubatorReservations > 0>>
			<<link "Remove all of your children from $incubatorName" "Analyze PC Pregnancy">>
				<<run WombChangeReserveType($PC, "incubator", "")>>
				<<set $reservedChildren -= _incubatorReservations>>
			<</link>> |
		<</if>>
		<<if _incubatorReservations < _WL && ($reservedChildren + _WL - _incubatorReservations <= $freeTanks)>>
			<<link "Keep all of your children in $incubatorName" "Analyze PC Pregnancy">>
				<<run WombChangeReserveType($PC, "nursery", "incubator")>>
				<<run WombChangeReserveType($PC, "", "incubator")>>
				<<set $reservedChildrenNursery -= _nurseryReservations>>
				<<set $reservedChildren += _WL - _incubatorReservations>>
			<</link>>
		<<elseif _incubatorReservations < _WL>>
			There is not enough free space in $incubatorName for the rest of your children.
		<</if>>
	<</if>>

	<<if $nursery > 0>>
		<<if _nurseryReservations > 0>>
			<<link "Remove all of your children from $nurseryName" "Analyze PC Pregnancy">>
				<<run WombChangeReserveType($PC, "nursery", "")>>
				<<set $reservedChildrenNursery -= _nurseryReservations>>
			<</link>> |
		<</if>>
		<<if _nurseryReservations < _WL && ($reservedChildrenNursery + _WL - _nurseryReservations <= $freeCribs)>>
			<<link "Keep all of your children in $nurseryName" "Analyze PC Pregnancy">>
				<<run WombChangeReserveType($PC, "incubator", "nursery")>>
				<<run WombChangeReserveType($PC, "", "nursery")>>
				<<set $reservedChildren -= _incubatorReservations>>
				<<set $reservedChildrenNursery += _WL - _nurseryReservations>>
			<</link>>
		<<elseif _nurseryReservations < _WL>>
			There is not enough free space in $nurseryName for the rest of your children.
		<</if>>
	<</if>>
	<</if>>

	Deep scan:

	<<for _ap = 0; _ap < _WL; _ap++>>
	<<capture _ap>>
		<<if $PC.womb[_ap].age >=2 >>

			Ova: $PC.womb[_ap].genetics.name

			<<if $geneticMappingUpgrade >= 1>>

				Gender: $PC.womb[_ap].genetics.gender

				Father ID: $PC.womb[_ap].genetics.father

				Father Name: $PC.womb[_ap].genetics.fatherName

				Mother ID: $PC.womb[_ap].genetics.mother

				Mother Name: $PC.womb[_ap].genetics.motherName

				Nationality: $PC.womb[_ap].genetics.nationality

				Race: $PC.womb[_ap].genetics.race

				Skin tone: $PC.womb[_ap].genetics.skin

				Intelligence index: $PC.womb[_ap].genetics.intelligence out of 100

				Face index: $PC.womb[_ap].genetics.face out of 100

				Eye Color: $PC.womb[_ap].genetics.eyeColor

				Hair Color: $PC.womb[_ap].genetics.hColor
				<<if $PC.womb[_ap].genetics.underArmHStyle == "hairless" && $PC.womb[_ap].genetics.pubicHStyle == "hairless">>

					Body hair: none
				<<elseif $PC.womb[_ap].genetics.underArmHStyle == "hairless">>

					Body hair: lacks underarm hair
				<<elseif $PC.womb[_ap].genetics.pubicHStyle == "hairless">>

					Body hair: lacks pubic hair
				<</if>>
				<<if $PC.womb[_ap].genetics.markings == "freckles" || $PC.womb[_ap].genetics.markings == "heavily freckled">>

					Markings: $PC.womb[_ap].genetics.markings
				<</if>>
			<<else>>
				<<if $PC.womb[_ap].age > 13>>

					Gender: $PC.womb[_ap].genetics.gender
				<</if>>
				<<if $PC.womb[_ap].age > 5>>

					Father ID: $PC.womb[_ap].genetics.father

					Father Name: $PC.womb[_ap].genetics.fatherName

					Mother ID: $PC.womb[_ap].genetics.mother

					Mother Name: $PC.womb[_ap].genetics.motherName
				<</if>>
			<</if>>
			<<if $incubator > 0 || $nursery > 0>>

				Reserved: $PC.womb[_ap].reserve
			<</if>>

			Rename: <<textbox "_tempName" _tempName >> [[Apply | Analyze PC Pregnancy][$PC.womb[_ap].genetics.name = _tempName]]
			<<if $PC.womb[_ap].age < 4 && $PC.womb[_ap].fatherID != -6>>

				<<link "Terminate ovum" "Analyze PC Pregnancy">><<run WombRemoveFetus($PC, _ap)>><</link>>
				<<if $surgeryUpgrade == 1>>
					| [[Transplant ovum|Ova Transplant Workaround][$donatrix = $PC, $wombIndex = _ap, $nextLink = "Analyze PC Pregnancy"]]
				<</if>>
			<</if>>
			<<if $incubator > 0>>

				<<if $PC.womb[_ap].reserve === "incubator">>
					<<link "Don't keep this child $incubatorName" "Analyze PC Pregnancy">>
						<<set $PC.womb[_ap].reserve = "">>
						<<set $reservedChildren-->>
					<</link>>
				<<elseif $freeTanks - $reservedChildren > 0>>
					<<link "Keep this child in $incubatorName" "Analyze PC Pregnancy">>
						<<if $PC.womb[_ap].reserve === "nursery">>
							<<set $reservedChildrenNursery-->>
						<</if>>
						<<set $PC.womb[_ap].reserve = "incubator">>
						<<set $reservedChildren++>>
					<</link>>
				<<else>>
					There is not enough free space to keep this child in $incubatorName.
				<</if>>
			<</if>>
			<<if $nursery > 0>>

				<<if $PC.womb[_ap].reserve === "nursery">>
					<<link "Don't keep this child in $nurseryName" "Analyze PC Pregnancy">>
						<<set $PC.womb[_ap].reserve = "">>
						<<set $reservedChildrenNursery-->>
					<</link>>
				<<elseif $freeCribs - $reservedChildrenNursery > 0>>
					<<link "Keep this child in $nurseryName" "Analyze PC Pregnancy">>
						<<if $PC.womb[_ap].reserve === "incubator">>
							<<set $reservedChildren-->>
						<</if>>
						<<set $PC.womb[_ap].reserve = "nursery">>
						<<set $reservedChildrenNursery++>>
					<</link>>
				<<else>>
					There is not enough free space to keep this child in $nurseryName.
				<</if>>
			<</if>>
		<<else>>

			Unindefined ova found, no detailed data available.

			Age: too early for scan.

			<<link "Terminate ovum" "Analyze PC Pregnancy">><<run WombRemoveFetus($PC, _ap)>><</link>>
			<<if $surgeryUpgrade == 1>>
				| [[Transplant ovum|Ova Transplant Workaround][$donatrix = $PC, $wombIndex = _ap, $nextLink = "Analyze PC Pregnancy"]]
			<</if>>
		<</if>>

	<</capture>>
	<</for>>

<</if>>


code:
:: Analyze Pregnancy [nobr]

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

<<set _WL = $activeSlave.womb.length, _incubatorReservations = WombReserveCount($activeSlave, "incubator"), _nurseryReservations = WombReserveCount($activeSlave, "nursery")>>

<<if _WL == 0>>
	<<goto "Slave Interact">>
<<else>>

	//$activeSlave.slaveName is <<if $activeSlave.devotion < 20>>restrained<<else>>comfortably reclined<</if>> with $his stomach prepped for examination. $He shudders slightly at the cold touch of the sensor against $his skin.//

	<<set $saleDescription = 1>><<pregnancyDescription>><<set $saleDescription = 0>>

	Overall statistics:
	<<set _cc = Math.round($activeSlave.bellyPreg)>>
	<<set _safecc = Math.round($activeSlave.pregAdaptation*2000)>>
	<<if $geneticMappingUpgrade > 0>>

    Estimated pregnancy adaptation rating: <<print num(Math.round($activeSlave.pregAdaptation))>>

    Estimated safe womb volume: <<= num(_safecc)>> cc
	<</if>>

    Current fetal count: $activeSlave.womb.length

    Estimated womb volume: <<if _safecc < _cc && $geneticMappingUpgrade > 0>>@@.red;<<= num(_cc)>>@@<<else>><<= num(_cc)>><</if>> cc

	Furthest developed pregnancy:

    Fetal development week: $activeSlave.preg

	<<if $incubator + $nursery > 0>>

		<<if $incubator > 0>>
			<<if _incubatorReservations > 0>>
				<<link "Remove all of $his children from $incubatorName" "Analyze Pregnancy">>
					<<run WombChangeReserveType($activeSlave, "incubator", "")>>
					<<set $reservedChildren -= _incubatorReservations>>
				<</link>> |
			<</if>>
			<<if _incubatorReservations < _WL && ($reservedChildren + _WL - _incubatorReservations <= $freeTanks)>>
				<<link "Keep all of $his children in $incubatorName" "Analyze Pregnancy">>
					<<run WombChangeReserveType($activeSlave, "nursery", "incubator")>>
					<<run WombChangeReserveType($activeSlave, "", "incubator")>>
					<<set $reservedChildrenNursery -= _nurseryReservations>>
					<<set $reservedChildren += _WL - _incubatorReservations>>
				<</link>>
			<<elseif _incubatorReservations < _WL>>
				There is not enough free space in $incubatorName for the rest of $his children.
			<</if>>
		<</if>>

		<<if $nursery > 0>>
			<<if _nurseryReservations > 0>>
				<<link "Remove all of $his children from $nurseryName" "Analyze Pregnancy">>
					<<run WombChangeReserveType($activeSlave, "nursery", "")>>
					<<set $reservedChildrenNursery -= _nurseryReservations>>
				<</link>> |
			<</if>>
			<<if _nurseryReservations < _WL && ($reservedChildrenNursery + _WL - _nurseryReservations <= $freeCribs)>>
				<<link "Keep all of $his children in $nurseryName" "Analyze Pregnancy">>
					<<run WombChangeReserveType($activeSlave, "incubator", "nursery")>>
					<<run WombChangeReserveType($activeSlave, "", "nursery")>>
					<<set $reservedChildren -= _incubatorReservations>>
					<<set $reservedChildrenNursery += _WL - _nurseryReservations>>
				<</link>>
			<<elseif _nurseryReservations < _WL>>
				There is not enough free space in $nurseryName for the rest of $his children.
			<</if>>
		<</if>>
	<</if>>

	Deep scan:

	<<for _ap = 0; _ap < _WL; _ap++>>
	<<capture _ap>>
		<<if $activeSlave.womb[_ap].age >=2 >>

			Ova: $activeSlave.womb[_ap].genetics.name

			Age: $activeSlave.womb[_ap].age

			<<if $geneticMappingUpgrade >= 1>>

				Gender: $activeSlave.womb[_ap].genetics.gender

				Father ID: $activeSlave.womb[_ap].genetics.father

				Father Name: $activeSlave.womb[_ap].genetics.fatherName

				Mother ID: $activeSlave.womb[_ap].genetics.mother

				Mother Name: $activeSlave.womb[_ap].genetics.motherName

				Nationality: $activeSlave.womb[_ap].genetics.nationality

				Race: $activeSlave.womb[_ap].genetics.race

				Skin tone: $activeSlave.womb[_ap].genetics.skin

				Intelligence index: $activeSlave.womb[_ap].genetics.intelligence out of 100

				Face index: $activeSlave.womb[_ap].genetics.face out of 100

				Eye Color: $activeSlave.womb[_ap].genetics.eyeColor

				Hair Color: $activeSlave.womb[_ap].genetics.hColor
				<<if $activeSlave.womb[_ap].genetics.underArmHStyle == "hairless" && $activeSlave.womb[_ap].genetics.pubicHStyle == "hairless">>

					Body hair: none
				<<elseif $activeSlave.womb[_ap].genetics.underArmHStyle == "hairless">>

					Body hair: lacks underarm hair
				<<elseif $activeSlave.womb[_ap].genetics.pubicHStyle == "hairless">>

					Body hair: lacks pubic hair
				<</if>>
				<<if $activeSlave.womb[_ap].genetics.markings == "freckles" || $activeSlave.womb[_ap].genetics.markings == "heavily freckled">>

					Markings: $activeSlave.womb[_ap].genetics.markings
				<</if>>
			<<else>>
				<<if $activeSlave.womb[_ap].age > 13>>

					Gender: $activeSlave.womb[_ap].genetics.gender
				<</if>>
				<<if $activeSlave.womb[_ap].age > 5>>

					Father ID: $activeSlave.womb[_ap].genetics.father

					Father Name: $activeSlave.womb[_ap].genetics.fatherName

					Mother ID: $activeSlave.womb[_ap].genetics.mother

					Mother Name: $activeSlave.womb[_ap].genetics.motherName
				<</if>>
			<</if>>
			<<if $incubator > 0 || $nursery > 0>>

				Reserved: $activeSlave.womb[_ap].reserve
			<</if>>

			Rename: <<textbox "_tempName" _tempName >> [[Apply | Analyze Pregnancy][$activeSlave.womb[_ap].genetics.name = _tempName]]
			<<if $activeSlave.womb[_ap].age < 4 && ($activeSlave.womb[_ap].fatherID != -1 || $activeSlave.breedingMark == 0)>>

				<<link "Terminate ovum" "Analyze Pregnancy">><<run WombRemoveFetus($activeSlave, _ap)>><</link>>
				<<if $surgeryUpgrade == 1>>
					| [[Transplant ovum|Ova Transplant Workaround][$donatrix = $activeSlave, $wombIndex = _ap, $nextLink = "Analyze Pregnancy"]]
				<</if>>
			<</if>>
			<<if $incubator > 0>>

				<<if $activeSlave.womb[_ap].reserve === "incubator">>
					<<link "Don't keep this child in $incubatorName" "Analyze Pregnancy">>
						<<set $activeSlave.womb[_ap].reserve = "">>
						<<set $reservedChildren-->>
					<</link>>
				<<elseif $freeTanks - $reservedChildren > 0>>
					<<link "Keep this child in $incubatorName" "Analyze Pregnancy">>
						<<if $activeSlave.womb[_ap].reserve === "nursery">>
							<<set $reservedChildrenNursery-->>
						<</if>>
						<<set $activeSlave.womb[_ap].reserve = "incubator">>
						<<set $reservedChildren++>>
					<</link>>
				<<else>>
					There is not enough free space to keep this child in $incubatorName.
				<</if>>
			<</if>>
			<<if $nursery > 0>>

				<<if $activeSlave.womb[_ap].reserve === "nursery">>
					<<link "Don't keep this child in $nurseryName" "Analyze Pregnancy">>
						<<set $activeSlave.womb[_ap].reserve = "">>
						<<set $reservedChildrenNursery-->>
					<</link>>
				<<elseif $freeCribs - $reservedChildrenNursery > 0>>
					<<link "Keep this child in $nurseryName" "Analyze Pregnancy">>
						<<if $activeSlave.womb[_ap].reserve === "incubator">>
							<<set $reservedChildren-->>
						<</if>>
						<<set $activeSlave.womb[_ap].reserve = "nursery">>
						<<set $reservedChildrenNursery++>>
					<</link>>
				<<else>>
					There is not enough free space to keep this child in $nurseryName.
				<</if>>
			<</if>>
		<<else>>

			Unindefined ova found, no detailed data available.

			Age: too early for scan.

			<<link "Terminate ovum" "Analyze Pregnancy">><<run WombRemoveFetus($activeSlave, _ap)>><</link>>
			<<if $surgeryUpgrade == 1>>
				| [[Transplant ovum|Ova Transplant Workaround][$donatrix = $activeSlave, $wombIndex = _ap, $nextLink = "Analyze Pregnancy"]]
			<</if>>
		<</if>>

	<</capture>>
	<</for>>

<</if>>

repo_name: Fekenol/fc


code:
:: Artificial Insemination [nobr]

<<set $nextButton = "Back", $nextLink = "Remote Surgery", $impregnatrix = 0, _eligibility = 0, _eligibilityI = 0>>

//$activeSlave.slaveName is prepped for fertilization; now you must select a target to harvest sperm from.//

__Select an eligible slave to serve as the semen donatrix:__

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

[[_name|Surgery Degradation][$impregnatrix = $slaves[_ai], cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = 'insemination']]
		<<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 _ai = 0; _ai < $tanks.length; _ai++>>
	<<capture _ai>>
		<<if $tanks[_ai].balls > 0 && $tanks[_ai].dick > 0 && canBreed($activeSlave, $tanks[_ai])>>

[[$tanks[_ai].slaveName|Surgery Degradation][$impregnatrix = $tanks[_ai], cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = 'insemination']]
			<<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|Surgery Degradation][$impregnatrix = $PC, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = "insemination"]]
<<elseif $PC.storedCum > 0>>

	[[Use a vial of your own|Surgery Degradation][$impregnatrix = $PC, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = "insemination", $PC.storedCum--]]
	//You have enough sperm stored away to inseminate $PC.storedCum more slave<<if $PC.storedCum > 1>>s<</if>>.//
<</if>>


code:
:: Basenationalities Controls [nobr]

<<if hashSum($nationalities) < 1>>
	//You cannot be a slaveowner without a slave trade. Please add nationalities to continue.//
<<else>>
	<<link "Confirm customization">>
		<<unset $baseControlsFilter>>
		<<if $customWA == 0>>
			<<goto "Intro Summary">>
		<<else>>
			<<goto "Extreme Intro">>
		<</if>>
	<</link>>
<</if>>

/* Generates cloned array of $nationalities, removing duplicates and then sorting */
<<set $nationalitiescheck = Object.assign({}, $nationalities)>>

/* Prints distribution of $nationalities, using $nationalitiescheck to render array */
<<set _percentPerPoint = 100.0 / hashSum($nationalities)>>
<<set _len = Object.keys($nationalitiescheck).length>>
<<set _j = 0>>
<<for _nation, _i range $nationalitiescheck>>
	_nation @@.orange;<<= ($nationalities[_nation] * _percentPerPoint).toFixed(2)>>%@@
	<<set _j++>>
	<<if _j < _len>> | <</if>>
<</for>>
<<unset _percentPerPoint>>

/* Fine control tweaking of populations */
Adjust slave populations:

/* Filter controls */
Filter by Race:
<<for _i = 0; _i < setup.filterRaces.length; _i++>>
	<<set _race = setup.filterRaces[_i]>>
	<<if $baseControlsFilter == _race.toLowerCase().replace(/[ -]/g, '')>>
		<<print _race>>
	<<else>>
		<<print "
			<<link _race>>
				<<set $baseControlsFilter = setup.filterRaces[" + _i + "].toLowerCase().replace(/[ -]/g, '')>>
				<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
			<</link>>
		">>
	<</if>>
	<<if _i < setup.filterRaces.length-1>>
		|
	<</if>>
<</for>>

Filter by Region:
<<for _i = 0; _i < setup.filterRegions.length; _i++>>
	<<set _region = setup.filterRegions[_i]>>
	<<if $baseControlsFilter == _region.toLowerCase().replace(/[ -]/g, '')>>
		<<print _region>>
	<<else>>
		<<print "
			<<link _region>>
				<<set $baseControlsFilter = setup.filterRegions[" + _i + "].toLowerCase().replace(/[ -]/g, '')>>
				<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
			<</link>>
		">>
	<</if>>
	<<if _i < setup.filterRegions.length-1>>
		|
	<</if>>
<</for>>

/* Unfiltered pop controls */
<<if $baseControlsFilter == "all">>
	<<for _i = 0; _i < setup.baseNationalities.length; _i++>>

		<<set _nation = setup.baseNationalities[_i]>>
		<<print "
		_nation
			@@.plusButton;<<link '+'>>
				<<set hashPush($nationalities, setup.baseNationalities["+_i+"])>>
				<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
			<</link>>@@
		">>
		<<if def $nationalitiescheck[_nation]>>
			<<print "
				@@.minusButton;<<link '–'>>
					<<set $nationalities[setup.baseNationalities["+_i+"]] -= 1>>
					<<if $nationalities[setup.baseNationalities["+_i+"]] <= 0>>
						<<set delete $nationalities[setup.baseNationalities["+_i+"]]>>
					<</if>>
					<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
				<</link>>@@
			">>
		<</if>>
		<<if $nationalities[_nation] > 1 >>
			<<print "
				@@.zeroButton;<<link '0'>>
					<<set delete $nationalities[setup.baseNationalities["+_i+"]]>>
					<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
				<</link>>@@
			">>
		<</if>>
		<<if _i < setup.baseNationalities.length-1>>| <</if>>

	<</for>>

By dominant race/ethnicity (hover over the name to see the nationalities affected):

	<<for _race range setup.filterRaces>>
		<<set _racialNationalities = setup.baseNationalities.filter(function(n) {
			var races = setup.raceSelector[n] || setup.raceSelector[''];
			return races[_race.toLowerCase()] * 3.5 > hashSum(races); })>>
		<<if _racialNationalities.length > 0>>
			<<= "
 0 ? _racialNationalities.join(", ") : "(none)")
				+"'>_race @@.plusButton; <<link '+'>>
				<<run setup.baseNationalities.filter(function(n) {
						var races = setup.raceSelector[n] || setup.raceSelector[''];
						return races['" + _race.toLowerCase() + "'] * 3.5 > hashSum(races); }).forEach(function(n) { hashPush($nationalities, n);})>>
				<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
			<</link>>@@ @@.zeroButton;<<link '0'>>
				<<run setup.baseNationalities.filter(function(n) {
						var races = setup.raceSelector[n] || setup.raceSelector[''];
						return races['" + _race.toLowerCase() + "'] * 3.5 > hashSum(races); }).forEach(function(n) { delete $nationalities[n]; })>>
				<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
			<</link>>@@
">>
		<</if>>
	<</for>>
<<else>>
/* Filtered pop controls */
	<<set _controlsNationality = setup[$baseControlsFilter+'Nationalities']>>
	<<set _keys = Object.keys(_controlsNationality)>>
	<<for _i = 0; _i < _keys.length; _i++>>

		<<set _nation = _keys[_i]>>
		<<print "
		_nation
			@@.plusButton;<<link '+'>>
				<<set hashPush($nationalities, _keys[" + _i + "])>>
				<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
			<</link>>@@
		">>
		<<if def $nationalitiescheck[_nation]>>
			<<print "
				@@.minusButton;<<link '–'>>
					<<set $nationalities[_keys["+_i+"]] -= 1>>
					<<if $nationalities[_keys["+_i+"]] <= 0>>
						<<set delete $nationalities[_keys["+_i+"]]>>
					<</if>>
					<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
				<</link>>@@
			">>
			<</if>>
		<<if $nationalities[_nation] > 1 >>
			<<print "
				@@.zeroButton;<<link '0'>>
					<<set delete $nationalities[_keys["+_i+"]]>>
					<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
				<</link>>@@
			">>
		<</if>>
		<<if _i < _keys.length-1>>| <</if>>

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


code:
:: BeastFuck [nobr]

<<run clearSummaryCache($activeSlave)>>
<<setLocalPronouns $activeSlave>>

/*THIS WILL ALL NEED TO BE COMPLETELY REWORKED*/

/*
<<if $species == "horse">>
	<<set _animal = {species: "horse", dickSize: "huge", ballType: "horse"}>>
<<elseif $species == "dog">>
	<<set _animal = {species: "dog", dickSize: "large", ballType: "dog"}>>
<</if>>

<<if canWalk($activeSlave)>>
	You call $him over and tell $him you want to watch $him fuck a _animal.species.
<<else>>
	You order another slave to bring $activeSlave.slaveName over. Once $he is situated, you tell $him that you want to watch $him fuck a _animal.species.
<</if>>

<<if ($activeSlave.fetish != "mindbroken")>>
	<<if ($activeSlave.devotion > 50)>>
		<<if (canDoVaginal($activeSlave) && ($activeSlave.vagina > 0)) || (canDoAnal($activeSlave) && ($activeSlave.anus > 0))>>
			<<if $activeSlave.fetish == "masochistic">>
				$activeSlave.slaveName's face visibly brightens at the thought of the pain involved.
			<<elseif $activeSlave.fetish == "humiliation">>
				$activeSlave.slaveName's face visibly brightens at the thought of the humiliation involved.
			<<elseif $activeSlave.sexualQuirk == "perverted">>
				$activeSlave.slaveName's face visibly brightens at the thought of the committing such a perverted act.
			<<elseif $activeSlave.behavioralQuirk == "sinful">>
				$activeSlave.slaveName's face visibly brightens at the thought of committing such a sinful act.
			<<else>>
				$activeSlave.slaveName looks visibly disturbed, but is so attentive to your will that $he quickly agrees.
			<</if>>
		<<else>>
			<<if $activeSlave.fetish == "masochistic">>
				$activeSlave.slaveName's face visibly brightens at the thought of the pain soon to come, although $he seems a bit hesitant at the thought of giving $his <<if !canDoVaginal($activeSlave)>>anal<</if>> virginity to an animal.
			<<elseif $activeSlave.fetish == "humiliation">>
				$activeSlave.slaveName's face visibly brightens at the thought of the humiliation soon to come, although $he seems a bit hesitant at the thought of giving $his <<if !canDoVaginal($activeSlave)>>anal<</if>> virginity to an animal.
			<<elseif $activeSlave.sexualQuirk == "perverted">>
				$activeSlave.slaveName's face visibly brightens at the thought of the perversion soon to come, although $he seems a bit hesitant at the thought of giving $his <<if !canDoVaginal($activeSlave)>>anal<</if>> virginity to an animal.
			<<elseif $activeSlave.behavioralQuirk == "sinful">>
				$activeSlave.slaveName's face visibly brightens at the thought of the sinfulness soon to come, although $he seems a bit hesitant at the thought of giving $his <<if !canDoVaginal($activeSlave)>>anal<</if>> virginity to an animal.
			<<else>>
				$activeSlave.slaveName looks visibly shaken at the thought of having $his precious <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity taken by an animal, but is so attentive to your will that $he agrees.
			<</if>>
		<</if>>
	<</if>>

	<<if ($activeSlave.devotion > 20) && ($activeSlave.devotion <= 50)>>
		<<if (canDoVaginal($activeSlave) && ($activeSlave.vagina > 0)) || (canDoAnal($activeSlave) && ($activeSlave.anus > 0))>>
			<<if $activeSlave.fetish == "masochistic">>
				$activeSlave.slaveName isn't too keen on the idea of fucking a _animal.species, but the thought of the pain involved convinces $him to comply.
			<<elseif $activeSlave.fetish == "humiliation">>
				$activeSlave.slaveName isn't too keen on the idea of fucking a _animal.species, but the thought of the humiliation involved convinces $him to comply.
			<<elseif $activeSlave.sexualQuirk == "perverted">>
				$activeSlave.slaveName isn't too keen on the idea of being fucked by a _animal.species, but the thought of the perversion of fucking an animal soon convinces $him to comply.
			<<elseif $activeSlave.behavioralQuirk == "sinful">>
				$activeSlave.slaveName isn't too keen on the idea of being fucked by a _animal.species, but the thought of the sinfulness of fucking an animal soon convinces $him to comply.
			<<else>>
				$activeSlave.slaveName tries in vain to conceal $his horror, but quickly regains $his composure.
			<</if>>
		<<else>>
			<<if $activeSlave.fetish == "masochistic">>
				$activeSlave.slaveName clearly has some reservations about having $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity taken by a _animal.species, but the thought of the pain that comes with it soon convinces $him to comply.
			<<elseif $activeSlave.fetish == "humiliation">>
				$activeSlave.slaveName clearly has some reservations about having $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity taken by a _animal.species, but the thought of the humiliation that comes with it soon convinces $him to comply.
			<<elseif $activeSlave.sexualQuirk == "perverted">>
				$activeSlave.slaveName clearly has some reservations about having $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity taken by a _animal.species, but the thought of the perversion of fucking an animal soon convinces $him to comply.
			<<elseif $activeSlave.behavioralQuirk == "sinful">>
				$activeSlave.slaveName clearly has some reservations about having $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity taken by a _animal.species, but the thought of the sinfulness of fucking an animal soon convinces $him to comply.
			<<else>>
				$activeSlave.slaveName tries in vain to conceal $his horror at the thought of having $his <<if !canDoVaginal($activeSlave)>>rosebud<<else>>pearl<</if>> taken by a beast, but quickly regains $his composure.
			<</if>>
		<</if>>
	<</if>>

	<<if ($activeSlave.devotion > -20) && ($activeSlave.devotion <= 20)>>
		<<if (canDoVaginal($activeSlave) && ($activeSlave.vagina > 0)) || (canDoAnal($activeSlave) && ($activeSlave.anus > 0))>>
			<<if $activeSlave.fetish == "masochistic">>
				$activeSlave.slaveName looks disgusted at the thought of fucking a _animal.species at first, but the thought of the pain that comes with it seems to spark a small flame of lust in $him.
			<<elseif $activeSlave.fetish == "humiliation">>
				$activeSlave.slaveName looks disgusted at the thought of fucking a _animal.species at first, but the thought of the humiliation that comes with it seems to spark a small flame of lust in $him.
			<<elseif $activeSlave.sexualQuirk == "perverted">>
				$activeSlave.slaveName looks disgusted at the thought of fucking a _animal.species at first, but the thought of the perversion that comes with it seems to spark a small flame of lust in $him.
			<<elseif $activeSlave.behavioralQuirk == "sinful">>
				$activeSlave.slaveName looks disgusted at the thought of fucking a _animal.species at first, but the thought of the sinfulness that comes with it seems to spark a small flame of lust in $him.
			<<else>>
				$activeSlave.slaveName tries in vain to conceal $his horror,
			<</if>>
		<<else>>
			<<if $activeSlave.fetish == "masochistic">>
				$activeSlave.slaveName looks disgusted at the thought of giving up $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity to a _animal.species, but the thought of the pain that comes with it soon sparks a small flame of lust in $him.
			<<elseif $activeSlave.fetish == "humiliation">>
				$activeSlave.slaveName looks disgusted at the thought of giving up $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity to a _animal.species, but the thought of the humiliation that comes with it soon sparks a small flame of lust in $him.
			<<elseif $activeSlave.sexualQuirk == "perverted">>
				$activeSlave.slaveName looks disgusted at the thought of giving up $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity to a _animal.species, but the thought of the perversion of fucking an animal soon sparks a small flame of lust in $him.
			<<elseif $activeSlave.behavioralQuirk == "sinful">>
				$activeSlave.slaveName looks disgusted at the thought of giving up $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity to a _animal.species, but the thought of the sinfulness of fucking an animal soon sparks a small flame of lust in $him.
			<<else>>
				$activeSlave.slaveName tries in vain to conceal $his horror at the thought of giving $his <<if !canDoVaginal($activeSlave)>>anal <</if>>virginity to an animal, and only the threat of a far worse punishment keeps $him from running out of the room.
			<</if>>
		<</if>>
	<</if>>

	<<if ($activeSlave.devotion < -20)>>
		$activeSlave.slaveName's face contorts into a mixture of <<if ($activeSlave.devotion < -50)>>hatred, anger, and disgust, <<else>>anger and disgust, <</if>>
	<</if>>

<<else>>
	$activeSlave.slaveName nods $his head dumbly, $his eyes vacant.
<</if>>

<<if canWalk($activeSlave)>>
	<<if $activeSlave.devotion > -20>>
		<<if ($activeSlave.devotion <= 20) && ($activeSlave.fetish != "mindbroken") && ($activeSlave.fetish != "masochistic") && ($activeSlave.fetish != "humiliation") && ($activeSlave.sexualQuirk != "perverted") && ($activeSlave.behavioralQuirk != "sinful")>>and only the threat of worse punishment prevents $him from running out of the room.<</if>> You have $him <<if ($activeSlave.clothes != "no clothing")>>take off $his clothing and <</if>>kneel down on the floor with $his ass in the air,
	<<else>>
		and you have to physically prevent $him from running out of the room. You <<if ($activeSlave.clothes != "no clothing")>>force $him to take off $his $activeSlave.clothes and <</if>>restrain $him on the floor with $his ass in the air — all the while ignoring $his screams and pleas for mercy -
<</if>>
<<else>>
	You <<if ($activeSlave.clothes != "no clothing")>>take off $his $activeSlave.clothes and <</if>>place $him on the ground with a cushion under $his hips, $his ass in the air,
<</if>>

before calling in the _animal.species. The _animal.species slowly saunters up to the <<if ($activeSlave.devotion <= 20)>>bound <</if>>slave and takes it position <<if canWalk($activeSlave)>>behind <<else>>above <</if>>$him. You can see its _animal.dickSize penis slowly come to attention as its animalistic brain realizes that it's standing <<if canWalk($activeSlave)>>behind <<else>>above <</if>>a warm hole that needs to be filled with seed.

<<if (_animal.species == "dog")>>
	<<if canWalk($activeSlave)>>
		The dog clambers up to mount $activeSlave.slaveName, eliciting a squeal from the $girl as its claws dig into $his flesh.
	<<else>>
		The dog takes a few curious sniffs, then lines its cock up with $activeSlave.slaveName's <<if canDoVaginal($activeSlave)>>pussy<<else>>asshole<</if>>.
	<</if>>
	It takes a couple of tries, but it finally manages to sink its cock into $his <<if canDoVaginal($activeSlave)>><<if ($activeSlave.fetish == "masochistic") || ($activeSlave.fetish == "humiliation") || ($activeSlave.sexualQuirk == "perverted") || ($activeSlave.behavioralQuirk == "sinful")>>wet <</if>>pussy<<else>>ass<</if>>.

	<<if ($activeSlave.vagina == 0)>>The slave gives a loud <<if ($activeSlave.devotion > 20)>>moan<<else>>groan<</if>> as $his <<if !canDoVaginal($activeSlave)>>@@.lime;anal@@<</if>> @@.lime;virginity is taken from $him.@@<<if ($activeSlave.devotion <= -20)>>by force.<</if>><</if>>

	<<if $activeSlave.vagina == 0>>
		<<if ($activeSlave.devotion >= -20)>>
			<<if $activeSlave.fetish == "masochistic">>
				Losing $his virginity in such a painful manner has @@.hotpink;increased $his devotion to you.@@
				<<set $activeSlave.devotion += 10>>
			<<elseif $activeSlave.fetish == "humiliation">>
				Losing $his virginity in such a humiliating manner has @@.hotpink;increased $his devotion to you.@@
				<<set $activeSlave.devotion += 10>>
			<<elseif $activeSlave.sexualQuirk == "perverted">>
				Losing $his virginity in such a perverted manner has @@.hotpink;increased $his devotion to you.@@
				<<set $activeSlave.devotion += 10>>
			<<elseif $activeSlave.behavioralQuirk == "sinful">>
				Losing $his virginity in such a sinful manner has @@.hotpink;increased $his devotion to you.@@
				<<set $activeSlave.devotion += 10>>
			<<else>>
				<<if $activeSlave.devotion > 50>>
					Since $he is well broken, losing $his virginity in such a manner has @@.hotpink;increased $his submission to you.@@
					<<set $activeSlave.devotion += 5>>
				<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.devotion < 50)>>
					Losing $his virginity in such a manner has @@.hotpink;increased $his submission to you,@@ though $he is @@.gold;fearful@@ that you'll decide to only use $him to sate your animals' lust.
					<<set $activeSlave.devotion += 5, $activeSlave.trust -= 5>>
				<<elseif ($activeSlave.devotion >= -50) && ($activeSlave.devotion < -20)>>
					$He is clearly @@.mediumorchid;unhappy@@ in the manner in which $his virginity has been taken, and $he @@.gold;fears@@ you'll decide to only use $him to sate your animals' lust.
					<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
				<</if>>
			<</if>>
		<<else>>
			Having $his pearl of great price taken by a mere beast has @@.mediumorchid;reinforced the hatred $he holds towards you,@@ and $he is @@.gold;terrified@@ you'll only use $him as a plaything for your animals.
			<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
		<</if>>
	<</if>>

	The hound wastes no time in beginning to hammer away at $his <<if canDoVaginal($activeSlave)>>cunt<<else>>asshole<</if>>, causing $activeSlave.slaveName to moan uncontrollably as its thick, veiny member probes the depths of $his <<if (canDoVaginal($activeSlave))>>pussy<<else>>asshole<</if>>.
	A few short minutes later, $he gives a loud groan <<if ($activeSlave.fetish == "masochist") || ($activeSlave.fetish == "humiliation") || $activeSlave.sexualQuirk == "perverted" || $activeSlave.behavioralQuirk == "sinful">>and shakes in orgasm <</if>>as the dog's knot begins to swell and its penis begins to erupt a thick stream of jizz into $him.
	After almost a minute, the dog has finally finished cumming and its knot is sufficiently small enough that the dog is able to pull its cock out, causing a stream of cum to slide out of $his <<if ($activeSlave.vagina <= 2)>>@@.lime;now-gaping <<if (canDoVaginal($activeSlave))>>pussy<<else>>asshole<</if>>@@<<else>>
	<<if canDoVaginal($activeSlave)>>
		<<if $activeSlave.vagina == 3>>
			loose
		<<elseif $activeSlave.vagina <= 9>>
			cavernous
		<<else>>
			ruined
		<</if>>
	<<else>>
		<<if $activeSlave.anus == 0>>
			virgin
		<<elseif $activeSlave.anus == 1>>
			tight
		<<elseif $activeSlave.anus == 2>>
			loose
		<<elseif $activeSlave.anus == 3>>
			very loose
		<<else>>
			gaping
		<</if>>
	<</if>> <<if canDoVaginal($activeSlave)>>pussy<<else>>asshole<</if>><</if>>. Having finished its business, the dog runs off, presumably in search of food.

	<<if (canDoVaginal($activeSlave)) && ($activeSlave.vagina < 3)>>
		<<set $activeSlave.vagina = 3>>
	<<elseif (canDoAnal($activeSlave)) && ($activeSlave.anus < 2)>>
		<<set $activeSlave.anus = 2>>
	<</if>>

<<elseif (_animal.species == "horse")>>
	The horse stands over $him as another slave lines its massive phallus up with $activeSlave.slaveName's <<if canDoVaginal($activeSlave)>><<if ($activeSlave.fetish == "masochistic") || ($activeSlave.fetish == "humiliation") || ($activeSlave.sexualQuirk == "perverted") || ($activeSlave.behavioralQuirk == "sinful")>>wet <</if>>pussy<<else>>ass<</if>>.

	With a slight thrust, it enters $him and begins to fuck $him. $activeSlave.slaveName can't help but give a loud groan as the huge cock <<if ($activeSlave.vagina <= 2)>>@@.lime;stretches@@<<else>>@@.lime;enters@@<</if>> @@.lime;$his@@
	<<if canDoVaginal($activeSlave)>>
		<<if $activeSlave.vagina == 0>>
			@@.lime;virgin@@
		<<elseif $activeSlave.vagina == 1>>
			@@.lime;tight@@
		<<elseif $activeSlave.vagina == 2>>
			@@.lime;reasonably tight@@
		<<elseif $activeSlave.vagina == 3>>
			@@.lime;loose@@
		<<elseif $activeSlave.vagina <= 9>>
			@@.lime;cavernous@@
		<<else>>
			@@.lime;ruined@@
		<</if>>
	<<else>>
		<<if $activeSlave.anus == 0>>
			@@.lime;virgin@@
		<<elseif $activeSlave.anus == 1>>
			@@.lime;tight@@
		<<elseif $activeSlave.anus == 2>>
			@@.lime;loose tight@@
		<<elseif $activeSlave.anus == 3>>
			@@.lime;very loose@@
		<<else>>
			@@.lime;gaping@@
		<</if>>
	<</if>>
	<<if (canDoVaginal($activeSlave))>>@@.lime;pussy@@<<else>>@@.lime;asshole@@<</if>>.

	<<if canDoVaginal($activeSlave)>>
		<<if $activeSlave.vagina == 0>>
			<<if ($activeSlave.devotion >= -20)>>
				<<if $activeSlave.fetish == "masochistic">>
					@@.lime;Losing $his virginity@@ in such a painful manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<elseif $activeSlave.fetish == "humiliation">>
					@@.lime;Losing $his virginity@@ in such a humiliating manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<elseif $activeSlave.sexualQuirk == "perverted">>
					@@.lime;Losing $his virginity@@ in such a perverted manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<elseif $activeSlave.behavioralQuirk == "sinful">>
					@@.lime;Losing $his virginity@@ in such a sinful manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<else>>
					<<if $activeSlave.devotion > 50>>
						Since $he is well broken, @@.lime;losing $his virginity@@ in such a manner has @@.hotpink;increased $his submission to you.@@
						<<set $activeSlave.devotion += 5>>
					<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.devotion < 50)>>
						@@.lime;Losing $his virginity@@ in such a manner has @@.hotpink;increased $his submission to you,@@ though $he is @@.gold;fearful@@ that you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion += 5, $activeSlave.trust -= 5>>
					<<elseif ($activeSlave.devotion >= -50) && ($activeSlave.devotion < -20)>>
						$He is clearly @@.mediumorchid;unhappy@@ in the manner in which $his virginity has been taken, and $he @@.gold;fears@@ you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
					<</if>>
				<</if>>
			<<else>>
				Having $his @@.lime;pearl of great price taken@@ by a mere beast has @@.mediumorchid;reinforced the hatred $he holds towards you,@@ and $he is @@.gold;terrified@@ you'll only use $him as a plaything for your animals.
				<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
			<</if>>
		<</if>>
	<<else>>
		<<if $activeSlave.anus == 0>>
			<<if ($activeSlave.devotion >= -20)>>
				<<if $activeSlave.fetish == "masochistic">>
					@@.lime;Losing $his anal virginity@@ in such a painful manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<elseif $activeSlave.fetish == "humiliation">>
					@@.lime;Losing $his anal virginity@@ in such a humiliating manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<elseif $activeSlave.sexualQuirk == "perverted">>
					@@.lime;Losing $his anal virginity@@ in such a perverted manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<elseif $activeSlave.behavioralQuirk == "sinful">>
					@@.lime;Losing $his anal virginity@@ in such a sinful manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<else>>
					<<if $activeSlave.devotion > 50>>
						Since $he is well broken, @@.lime;losing $his anal virginity@@ in such a manner has @@.hotpink;increased $his submission to you.@@
						<<set $activeSlave.devotion += 5>>
					<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.devotion < 50)>>
						@@.lime;Losing $his anal virginity@@ in such a manner has @@.hotpink;increased $his submission to you,@@ though $he is @@.gold;fearful@@ that you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion += 5, $activeSlave.trust -= 5>>
					<<elseif ($activeSlave.devotion >= -50) && ($activeSlave.devotion < -20)>>
						$He is clearly @@.mediumorchid;unhappy@@ in the manner in which @@.lime;$his anal virginity has been taken,@@ and $he @@.gold;fears@@ you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
					<</if>>
				<</if>>
			<<else>>
				Having @@.lime;$his rosebud taken@@ by a mere beast has @@.mediumorchid;reinforced the hatred $he holds towards you,@@ and $he is @@.gold;terrified@@ you'll only use $him as a plaything for your animals.
				<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
			<</if>>
		<</if>>
	<</if>>

	The stallion begins to thrust faster and faster, causing $activeSlave.slaveName to moan and groan in pain as the <<if canDoVaginal($activeSlave)>> tip rams $his cervix<<else>> huge horsecock fills $him completely<</if>>. Before too long, the horse's movements begin to slow, and you can see its large testicles contract slightly as it begins to fill $activeSlave.slaveName's <<if (canDoVaginal($activeSlave))>>pussy<<else>>asshole<</if>> to the brim with thick horse semen.
	After what seems like an impossibly long time, the horse's dick finally begins to soften and it finally pulls out. You have a servant lead the horse away, with a fresh apple as a treat for its good performance.

	<<if (canDoVaginal($activeSlave)) && ($activeSlave.vagina < 4)>>
		<<set $activeSlave.vagina = 4>>
	<<elseif (canDoAnal($activeSlave)) && ($activeSlave.anus < 4)>>
		<<set $activeSlave.anus = 4>>
	<</if>>
<</if>>

<<if (random(1,100) > (100 + $activeSlave.devotion))>>
	<<if canDoVaginal($activeSlave)>>
		<<if ($activeSlave.energy <= 95) && ($activeSlave.sexualFlaw != "hates penetration")>>
			Having a _animal.species fuck $him by force has given $him a @@.red;hatred of penetration.@@
			<<set $activeSlave.sexualFlaw = "hates penetration">>
		<</if>>
	<<else>>
		<<if ($activeSlave.energy <= 95) && ($activeSlave.sexualFlaw != "hates anal")>>
			Having a _animal.species fuck $him by force has given $him a @@.red;hatred of anal penetration.@@
			<<set $activeSlave.sexualFlaw = "hates anal">>
		<</if>>
	<</if>>
<</if>>

<<if $postSexCleanUp > 0>>
	<<if ($activeSlave.vagina == 3)>>
		Cum drips out of $his fucked-out hole.
	<<elseif ($activeSlave.vagina == 2)>>
		Cum drips out of $his stretched vagina.
	<<elseif ($activeSlave.vagina == 1)>>
		$His still-tight vagina keeps your load inside $him.
	<<elseif ($activeSlave.vagina < 0)>>
		Cum drips out of $his girly ass.
	<<else>>
		Your cum slides right out of $his gaping hole.
	<</if>>

	<<if canWalk($activeSlave)>>
		$He uses <<if $activeSlave.vagina > 0>>a quick douche to clean $his <<if $activeSlave.vagina < 2>>tight<<elseif $activeSlave.vagina > 3>>loose<</if>> pussy<<else>>an enema to clean $his <<if $activeSlave.anus < 2>>tight<<elseif $activeSlave.anus < 3>>used<<else>>gaping<</if>> butthole<</if>>,

		<<switch $activeSlave.assignment>>
		<<case "work in the brothel">>
			just like $he does between each customer.
		<<case "serve in the club">>
			just like $he does in the club.
		<<case "work in the dairy">>
			to avoid besmirching the nice clean dairy.
		<<case "work as a farmhand">>
			to avoid tainting the food in $farmyardName.
		<<case "work as a servant">>
			mostly to keep everything $he has to clean from getting any dirtier.
		<<case "whore">>
			before returning to offering it for sale.
		<<case "serve the public">>
			before returning to offering it for free.
		<<case "rest">>
			before crawling back into bed.
		<<case "get milked">>
			<<if $activeSlave.lactation > 0>>before going to get $his uncomfortably milk-filled tits drained<<else>>and then rests until $his balls are ready to be drained again<</if>>.
		<<case "be a servant">>
			since $his chores didn't perform themselves while you used $his fuckhole.
		<<case "please you">>
			before returning to await your next use of $his fuckhole, as though nothing had happened.
		<<case "be a subordinate slave">>
			though it's only a matter of time before another slave decides to play with $his fuckhole.
		<<case "be your Head Girl">>
			worried that $his charges got up to trouble while $he enjoyed $his <<= WrittenMaster()>>'s use.
		<<case "guard you">>
			so $he can be fresh and ready for more sexual use even as $he guards your person.
		<<case "be the Schoolteacher">>
			before $he returns to teaching $his classes.
		<<default>>
			before $he returns to $activeSlave.assignment.
		<</switch>>
	<</if>>
<</if>>

<<set $species = 0>>
*/


code:
:: BeastFucked [nobr]

<<run clearSummaryCache($activeSlave)>>
<<setLocalPronouns $activeSlave>>

<<if $animalType == "canine">>
	<<set _animal = $activeCanine>>
<<elseif $animalType == "hooved">>
	<<set _animal = $activeHooved>>
<<elseif $animalType == "feline">>
	<<set _animal = $activeFeline>>
<</if>>

/* add any animal species that begin with a vowel here */
<<switch _animal.species>>
<<default>>
	<<set _a = "a">>
<</switch>>

<<if canDoVaginal($activeSlave)>>
	<<set _sexAct = "vaginal">>
	<<set _orifice = "pussy">>
	<<set _hole = 0>>
<<elseif canDoAnal($activeSlave)>>
	<<set _sexAct = "anal">>
	<<set _orifice = "asshole">>
	<<set _hole = 1>>
<<else>>
	<<set _sexAct = "oral">>
	<<set _orifice = "mouth">>
<</if>>

<<set _used = {mouth: 0, vagina: 0, anus: 0}>>
<<if $activeSlave.vagina > 0>>
	<<set _used.vagina = 1>>
<</if>>
<<if $activeSlave.anus > 0>>
	<<set _used.anus = 1>>
<</if>>
<<if $activeSlave.counter.oral > 0>>
	<<set _used.mouth = 1>>
<</if>>

<<if $activeSlave.fetish == "masochist">>
	<<set _fetishDesc = "committing such a painful act", _activeQuirk = 1, _quirk = 1>>
<<elseif $activeSlave.fetish == "humiliation">>
	<<set _fetishDesc = "committing such a humiliating act", _activeQuirk = 1, _quirk = 1>>
<<elseif $activeSlave.sexualQuirk == "perverted">>
	<<set _fetishDesc = "committing such a perverted act", _activeQuirk = 1, _quirk = 1>>
<<elseif $activeSlave.behavioralQuirk == "sinful">>
	<<set _fetishDesc = "committing such a sinful act", _activeQuirk = 1, _quirk = 1>>
<<elseif $activeSlave.fetish == "cumslut">>
	<<set _fetishDesc = "getting to drink more cum", _activeQuirk = 1, _quirk = 2>>
<<elseif $activeSlave.sexualQuirk == "gagfuck queen">>
	<<set _fetishDesc = "getting to suck more dick", _activeQuirk = 1, _quirk = 2>>
<</if>>

<<if canWalk($activeSlave)>>You call $him over and<<else>>You order another slave to bring $activeSlave.slaveName over. Once $he is situated, you<</if>> tell $him you want to watch $him <<switch _sexAct>><<case "oral">>suck off<<default>>get fucked by<</switch>> <<print _a>> _animal.species.

<<if ($activeSlave.fetish != "mindbroken")>>
	<<if ($activeSlave.devotion > 50)>>
		<<if _sexAct == "vaginal" || _sexAct == "anal">>
			<<if _used.vagina || _used.anus>>
				<<if $activeSlave.fetishKnown == 1 && _activeQuirk>>
					$activeSlave.slaveName's face visibly brightens at the thought of _fetishDesc.
				<<else>>
					$activeSlave.slaveName looks visibly disturbed, but is so attentive to your will that $he quickly agrees.
				<</if>>
			<<else>>
				<<if $activeSlave.fetishKnown == 1 && _activeQuirk>>
					$activeSlave.slaveName's face visibly brightens at the thought of _fetishDesc, although $he seems a bit hesitant at the thought of giving $his <<if _sexAct == "anal">>anal <</if>>virginity to an animal.
				<<else>>
					$activeSlave.slaveName looks visibly shaken at the thought of having $his precious <<if _sexAct == "anal">>anal <</if>>virginity taken by an animal, but is so attentive to your will that $he agrees.
				<</if>>
			<</if>>
		<<else>>
			<<if $activeSlave.fetishKnown == 1 && _activeQuirk && _quirk == 2>>
				$activeSlave.slaveName's face visibly brightens at the thought of _fetishDesc, even if it's <<print _a>> _animal.species's cum.
			<<else>>
				$activeSlave.slaveName blanches at the thought of having to suck <<print _a>> _animal.species's dick, but $he is so devoted to you that $he reluctantly agrees.
			<</if>>
		<</if>>
	<</if>>

	<<if ($activeSlave.devotion > 20) && ($activeSlave.devotion <= 50)>>
		<<if _sexAct == "vaginal" || _sexAct == "anal">>
			<<if _used.vagina || _used.anus>>
				<<if $activeSlave.fetishKnown == 1 && _activeQuirk>>
					$activeSlave.slaveName isn't too keen on the idea of fucking <<print _a>> _animal.species, but the thought of _fetishDesc soon convinces $him to comply.
				<<else>>
					$activeSlave.slaveName tries in vain to conceal $his horror, but quickly regains $his composure.
				<</if>>
			<<else>>
				<<if $activeSlave.fetishKnown == 1 && _activeQuirk>>
					$activeSlave.slaveName clearly has some reservations about having $his <<if _sexAct == "anal">>anal <</if>>virginity taken by <<print _a>> _animal.species, but the thought of _fetishDesc soon convinces $him to comply.
				<<else>>
					$activeSlave.slaveName tries in vain to conceal $his horror at the thought of having $his <<if _sexAct == "anal">>rosebud<<else>>pearl<</if>> taken by a beast, but quickly regains $his composure.
				<</if>>
			<</if>>
		<<else>>
			<<if $activeSlave.fetishKnown == 1 && _activeQuirk && _quirk == 2>>
				$activeSlave.slaveName isn't too keen on the idea of sucking off <<print _a>> _animal.species, but the thought of _fetishDesc soon convinces $him to comply.
			<<else>>
				$activeSlave.slaveName tries in vain to conceal $his horror, but quickly regains $his composure.
			<</if>>
		<</if>>
	<</if>>

	<<if ($activeSlave.devotion >= -20) && ($activeSlave.devotion <= 20)>>
		<<if _sexAct == "vaginal" || _sexAct == "anal">>
			<<if _used.vagina || _used.anus>>
				<<if $activeSlave.fetishKnown == 1 && _activeQuirk>>
					$activeSlave.slaveName looks disgusted at the thought of fucking <<print _a>> _animal.species at first, but the thought of the _fetishDesc that comes with it seems to spark a small flame of lust in $him.
				<<else>>
					$activeSlave.slaveName tries in vain to conceal $his horror,
				<</if>>
			<<else>>
				<<if $activeSlave.fetishKnown == 1 && _activeQuirk>>
					$activeSlave.slaveName looks disgusted at the thought of giving up $his <<if _sexAct == "anal">>anal <</if>>virginity to <<print _a>> _animal.species, but the thought of _fetishDesc it soon sparks a small flame of lust in $him.
				<<else>>
					$activeSlave.slaveName tries in vain to conceal $his horror at the thought of giving $his <<if _sexAct == "anal">>anal <</if>>virginity to an animal, and only the threat of a far worse punishment keeps $him from running out of the room.
				<</if>>
			<</if>>
		<<else>>
			<<if $activeSlave.fetishKnown == 1 && _activeQuirk && _quirk == 2>>
				$activeSlave.slaveName looks disgusted at the thought of sucking off <<print _a>> _animal.species at first, but the thought of _fetishDesc seems to spark a small flame of lust in $him.
			<<else>>
				$activeSlave.slaveName tries in vain to conceal $his horror,
			<</if>>
		<</if>>
	<</if>>

	<<if ($activeSlave.devotion < -20)>>
		$activeSlave.slaveName's face contorts into a mixture of <<if ($activeSlave.devotion < -50)>>hatred, anger, and disgust, <<else>>anger and disgust, <</if>>
	<</if>>

<<else>>
	$activeSlave.slaveName nods $his head dumbly, $his eyes vacant.
<</if>>

<<if canWalk($activeSlave)>>
	<<if $activeSlave.devotion >= -20>>
		<<if ($activeSlave.devotion <= 20)>>
			and only the threat of worse punishment prevents $him from running out of the room.
		<</if>>
			You have $him <<if ($activeSlave.clothes != "no clothing") && (_sexAct != "oral")>>take off $his clothing, then <</if>><<if _sexAct == "oral">>lay <<else>>kneel <</if>>down on the floor <<if _sexAct != "oral">>with $his ass in the air<<else>>on $his back<</if>>
	<<else>>
		and $Bodyguard.slaveName has to physically prevent $him from running out of the room<<if random(1,100) > 75>><<set $activeSlave.minorInjury = either("black eye", "bruise", "split lip")>>, resulting in a $activeSlave.minorInjury. <<else>>. <</if>>You <<if ($activeSlave.clothes != "no clothing")>>force $him to take off $his $activeSlave.clothes and <</if>>restrain $him on the floor <<if _sexAct != "oral">>with $his ass in the air<<else>>with a ring gag in $his mouth<</if>> — all the while ignoring $his screams and pleas for mercy —
	<</if>>
<<else>>
	but $he knows $he is powerless to stop you. You <<if ($activeSlave.clothes != "no clothing")>>take off $his clothes and <</if>><<if _sexAct == "oral">>place a ring gag in $his mouth, then<</if>>place $him on the ground with a cushion under $his hips <<if _sexAct != "oral">>, $his ass in the air,<</if>>
<</if>>

before calling in the _animal.species. The _animal.species slowly saunters up to the <<if ($activeSlave.devotion <= 20)>>bound <</if>>slave and takes its position
<<if canWalk($activeSlave)>><<if _sexAct != "oral">>behind<<else>>above<</if>><<else>>above<</if>> $him. You can see its _animal.dickSize penis slowly come to attention as its animalistic brain realizes that it's standing <<if canWalk($activeSlave)>><<if _sexAct != "oral">>behind<<else>>above<</if>><<else>>above<</if>> a warm hole that needs to be filled with seed.

<<switch _animal.type>>
<<case "canine">>
	<<if canWalk($activeSlave)>>
		<<switch _sexAct>>
		<<case "oral">>
			<<if $activeSlave.devotion > 20>>
				$activeSlave.slaveName <<if _activeQuirk != 1>>reluctantly<</if>> grabs the _animal.dickSize cock and gives it a tentative lick.
			<</if>>
		<<default>>
			The _animal.species clambers up to mount $activeSlave.slaveName, eliciting a squeal from the $girl as its claws dig into $his flesh.
		<</switch>>
	<<else>>
		The _animal.species <<if _sexAct != "oral">> takes a few curious sniffs, then <</if>>lines its cock up with $activeSlave.slaveName's <<switch _sexAct>><<case "vaginal" "anal">>_orifice.<<case "oral">>mouth, then, with a mighty shove, begins to thrust rapidly, in the way that only _animal.species can.<</switch>>
	<</if>>

	<<switch _sexAct>>
	<<case "vaginal" "anal">>
		It takes a couple of tries, but it finally manages to sink its cock into $his <<if _sexAct == "vaginal" && _activeQuirk>>wet <</if>>_orifice.
	<<case "oral">>
		<<if canWalk($activeSlave)>>
			In one swift motion, the canine buries its cock deep in $his throat, causing $him to gag. It then begins to thrust rapidly, in the way that only <<print _animal.species>>s can.
		<</if>>
	<</switch>>

	<<if _sexAct != "oral">>
		<<if (_sexAct == "vaginal" && !_used.vagina) || (_sexAct == "anal" && !_used.anus)>>The slave gives a loud <<if ($activeSlave.devotion > 20)>>moan<<else>>groan<</if>> as $his <<if _sexAct == "anal">>@@.lime;anal@@<</if>> @@.lime;virginity is taken from $him@@<<if ($activeSlave.devotion < -20)>>@@.lime; by force@@<</if>>.<</if>>
	<</if>>

<<case "hooved">>
	The _animal.species stands over $him as another slave lines its massive phallus up with $activeSlave.slaveName's <<switch _sexAct>><<case "oral">>open mouth<<case "vaginal" "anal">><<if _activeQuirk>>wet <</if>>_orifice<</switch>>.

	With a slight thrust, it enters $him and begins to fuck <<if _sexAct == "oral">>$his mouth<<else>> $him<</if>>. $activeSlave.slaveName can't help but give a loud groan as the huge cock
	<<switch _sexAct>>
	<<case "oral">>
		stretches $his throat to the limit.
	<<default>>
		<<if _sexAct == "vaginal" && ($activeSlave.vagina <= 1) || _sexAct == "anal" && ($activeSlave.anus <= 1)>>
			@@.lime;all but splits $his@@
		<<elseif _sexAct == "vaginal" && ($activeSlave.vagina <= 3) || _sexAct == "anal" && ($activeSlave.anus <= 2)>>
			@@.lime;stretches $his@@
		<<else>>
			fills $his
		<</if>>

	<<if _sexAct == "vaginal">>
		<<if $activeSlave.vagina == 0>>
			@@.lime;virgin@@
		<<elseif $activeSlave.vagina == 1>>
			@@.lime;tight@@
		<<elseif $activeSlave.vagina == 2>>
			@@.lime;reasonably tight@@
		<<elseif $activeSlave.vagina == 3>>
			@@.lime;loose@@
		<<elseif $activeSlave.vagina <= 9>>
			cavernous
		<<else>>
			ruined
		<</if>>
	<<else>>
		<<if $activeSlave.anus == 0>>
			@@.lime;virgin@@
		<<elseif $activeSlave.anus == 1>>
			@@.lime;tight@@
		<<elseif $activeSlave.anus == 2>>
			@@.lime;loose@@
		<<elseif $activeSlave.anus == 3>>
			very loose
		<<else>>
			gaping
		<</if>>
	<</if>>

	<<if (_sexAct == "vaginal" && $activeSlave.vagina <= 3) || (_sexAct == "anal" && $activeSlave.anus <= 2) >>@@.lime;_orifice@@<<else>>_orifice<</if>><<if (_sexAct == "vaginal" && ($activeSlave.vagina <= 1)) || (_sexAct == "anal" && ($activeSlave.anus <= 1))>>@@.lime; apart.@@<<elseif (_sexAct == "vaginal" && ($activeSlave.vagina <= 3)) || (_sexAct == "anal" && ($activeSlave.anus <= 2))>>@@.lime;.@@<<else>>.<</if>>
	<</switch>>

<<case "feline">>
	<<if canWalk($activeSlave)>>
		The _animal.species mounts $him, causing $him to give a squeal as its claws dig into $his flesh.
	<<else>>
		The _animal.species lines its _animal.dickSize penis with $activeSlave.slaveName's _orifice and gives a mighty shove.
	<</if>>
	$activeSlave.slaveName gives a loud <<if $activeSlave.devotion > 50>>moan<<else>>groan<</if>> as the _animal.species buries its large, barbed, cock deep in $his _orifice.
<</switch>>

<<if _sexAct != "oral">>
	<<if _sexAct == "vaginal">>
		<<if !_used.vagina>>
			<<if ($activeSlave.devotion >= -20)>>
				<<if _activeQuirk>>
					@@.lime;Losing $his virginity@@ in such a painful manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<else>>
					<<if $activeSlave.devotion > 50>>
						Since $he is well broken, @@.lime;losing $his virginity@@ in such a manner has @@.hotpink;increased $his submission to you.@@
						<<set $activeSlave.devotion += 5>>
					<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.devotion <= 50)>>
						@@.lime;Losing $his virginity@@ in such a manner has @@.hotpink;increased $his submission to you,@@ though $he is @@.gold;fearful@@ that you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion += 5, $activeSlave.trust -= 5>>
					<<elseif ($activeSlave.devotion >= -50) && ($activeSlave.devotion < -20)>>
						$He is clearly @@.mediumorchid;unhappy@@ in the manner in which $his virginity has been taken, and $he @@.gold;fears@@ you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
					<</if>>
				<</if>>
			<<else>>
				Having $his @@.lime;pearl of great price taken@@ by a mere beast has @@.mediumorchid;reinforced the hatred $he holds towards you,@@ and $he is @@.gold;terrified@@ you'll only use $him as a plaything for your animals.
				<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
			<</if>>
		<</if>>
	<<else>>
		<<if !_used.anus>>
			<<if ($activeSlave.devotion >= -20)>>
				<<if _activeQuirk>>
					@@.lime;Losing $his anal virginity@@ in such a painful manner has @@.hotpink;increased $his devotion to you.@@
					<<set $activeSlave.devotion += 10>>
				<<else>>
					<<if $activeSlave.devotion > 50>>
						Since $he is well broken, @@.lime;losing $his anal virginity@@ in such a manner has @@.hotpink;increased $his submission to you.@@
						<<set $activeSlave.devotion += 5>>
					<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.devotion <= 50)>>
						@@.lime;Losing $his anal virginity@@ in such a manner has @@.hotpink;increased $his submission to you,@@ though $he is @@.gold;fearful@@ that you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion += 5, $activeSlave.trust -= 5>>
					<<elseif ($activeSlave.devotion >= -50) && ($activeSlave.devotion < -20)>>
						$He is clearly @@.mediumorchid;unhappy@@ in the manner in which @@.lime;$his anal virginity has been taken,@@ and $he @@.gold;fears@@ you'll decide to only use $him to sate your animals' lust.
						<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
					<</if>>
				<</if>>
			<<else>>
				Having @@.lime;$his rosebud taken@@ by a mere beast has @@.mediumorchid;reinforced the hatred $he holds towards you,@@ and $he is @@.gold;terrified@@ you'll only use $him as a plaything for your animals.
				<<set $activeSlave.devotion -= 10, $activeSlave.trust -= 10>>
			<</if>>
		<</if>>
	<</if>>

	<<if (!_used.vagina && _sexAct == "vaginal") || (!_used.anus && _sexAct == "anal")>>
		The pain of having such a _animal.dickSize cock take $his <<if _sexAct == "anal">>anal <</if>>virginity has @@.red;damaged $his health.@@
		<<set $activeSlave.health -= 5>>
	<</if>>
<</if>>

<<switch _animal.type>>
<<case "canine">>
	The <<switch _animal.species>><<case "dog">>hound<<default>>_animal.species<</switch>> wastes no time in beginning to hammer away at $his _orifice, causing $activeSlave.slaveName to moan uncontrollably as its thick, veiny member probes the depths of $his <<switch _sexAct>><<case "oral">>throat<<case "vaginal">>cunt<<case "anal">>rectum<</switch>>.
	A few short minutes later, $he gives a loud groan
	<<if ($activeSlave.fetishKnown == 1) && (_activeQuirk)>> and shakes in orgasm <</if>>
	as the _animal.species's knot begins to swell and its penis begins to erupt a thick stream of jizz <<switch _sexAct>><<case "vaginal" "anal">>into $him<<case "oral">>down $his throat<</switch>>.
	After almost a minute, the _animal.species has finally finished cumming and its knot is sufficiently small enough that the _animal.species is able to pull its cock out, causing
	<<switch _sexAct>>
	<<case "vaginal" "anal">>
		a stream of cum to slide out of $his
		<<if _sexAct == "vaginal" && ($activeSlave.vagina <= 2) || _sexAct == "anal" && ($activeSlave.anus <= 1)>>
			@@.lime;now-gaping _orifice.@@
		<<else>>
			<<if _sexAct == "vaginal">>
				<<if $activeSlave.vagina == 3>>
					loose
				<<elseif $activeSlave.vagina <= 9>>
					cavernous
				<<else>>
					ruined
				<</if>>
			<<else>>
				<<if $activeSlave.anus == 0>>
					virgin
				<<elseif $activeSlave.anus == 1>>
					tight
				<<elseif $activeSlave.anus == 2>>
					loose
				<<elseif $activeSlave.anus == 3>>
					very loose
				<<else>>
					gaping
				<</if>>
			<</if>> _orifice.
		<</if>>
		<<if canGetPregnant($activeSlave) && canBreed($activeSlave, _animal)>>
			<<= knockMeUp($activeSlave, 5, _hole, -8)>>
		<</if>>
	<<case "oral">>
		$activeSlave.slaveName to immediately start coughing and retching uncontrollably.

	<</switch>> Having finished its business, the _animal.species runs off, presumably in search of food.

	<<switch _sexAct>>
	<<case "vaginal">>
		<<if $activeSlave.vagina < 3>>
			<<set $activeSlave.vagina = 3>>
		<</if>>
		<<set $activeSlave.counter.vaginal += 1>>
	<<case "anal">>
		<<if $activeSlave.anus < 2>>
			<<set $activeSlave.anus = 2>>
		<</if>>
		<<set $activeSlave.counter.vaginal += 1>>
	<<case "oral">>
		<<set $activeSlave.counter.oral += 1>>
	<</switch>>

<<case "hooved">>
	The <<switch _animal.species>><<case "horse">>stallion<<default>>_animal.species<</switch>> begins to thrust faster and faster, causing $activeSlave.slaveName to moan and groan in pain as the<<if _sexAct == "vaginal">> tip rams $his cervix<<else>> huge _animal.species cock fills $him completely<</if>>. Before too long, the _animal.species's movements begin to slow, and you can see its large testicles contract slightly as it begins to fill $activeSlave.slaveName's <<switch _sexAct>><<case "vaginal" "anal">>_orifice<<case "oral">>stomach<</switch>> to the brim with thick _animal.species semen.
	After what seems like an impossibly long time, the _animal.species's dick finally begins to soften and it finally pulls out<<if _sexAct == "oral">>, causing $activeSlave.slaveName to immediately begin to cough and retch uncontrollably<</if>>. You have a servant lead the _animal.species away, with a fresh apple as a treat for its good performance.

	<<switch _sexAct>>
	<<case "vaginal">>
		<<if $activeSlave.vagina < 4>>
			<<set $activeSlave.vagina = 4>>
		<</if>>
		<<set $activeSlave.counter.vaginal += 1>>
	<<case "anal">>
		<<if $activeSlave.anus < 4>>
			<<set $activeSlave.anus = 4>>
		<</if>>
		<<set $activeSlave.counter.anal += 1>>
	<<case "oral">>
		<<set $activeSlave.counter.oral += 1>>
	<</switch>>
	<<if _sexAct != "oral">>
		<<if canGetPregnant($activeSlave) && canBreed($activeSlave, _animal)>>
			<<= knockMeUp($activeSlave, 5, _hole, -8)>>
		<</if>>
	<</if>>

<<case "feline">>
	The _animal.species begins to move, thrusting faster and faster. The $girl beneath can't stop a groan of pain from escaping $his lips as the barbs on its dick @@.red;rub the inside of $his _orifice raw.@@ After a few minutes of painful coupling, the _animal.species's thrusts finally slow, then stop completely. With a <<if _animal.species != "cat">>deep bellow<<else>>loud //meow//<</if>>, he finally dismounts, gives you a long look, then stalks off.

	<<set $activeSlave.health -= 1>>
	<<switch _sexAct>>
	<<case "vaginal">>
		<<if $activeSlave.vagina < 2>>
			<<set $activeSlave.vagina = 2>>
		<</if>>
		<<set $activeSlave.counter.vaginal += 1>>
	<<case "anal">>
		<<if $activeSlave.anus < 2>>
			<<set $activeSlave.anus = 2>>
		<</if>>
		<<set $activeSlave.counter.vaginal += 1>>
	<<case "oral">>
		<<set $activeSlave.counter.oral += 1>>
	<</switch>>
	<<if _sexAct != "oral">>
		<<if canGetPregnant($activeSlave) && canBreed($activeSlave, _animal)>>
			<<= knockMeUp($activeSlave, 5, _hole, -8)>>
		<</if>>
	<</if>>
<</switch>>

<<if (random(1,100) > (100 + $activeSlave.devotion))>>
	<<switch _sexAct>>
	<<case "vaginal">>
		<<if ($activeSlave.energy <= 95) && ($activeSlave.sexualFlaw != "hates penetration")>>
			Having <<print _a>> _animal.species fuck $him by force has given $him a @@.red;hatred of penetration.@@
			<<set $activeSlave.sexualFlaw = "hates penetration">>
		<</if>>
	<<case "anal">>
		<<if ($activeSlave.energy <= 95) && ($activeSlave.sexualFlaw != "hates anal")>>
			Having <<print _a>> _animal.species fuck $him by force has given $him a @@.red;hatred of anal penetration.@@
			<<set $activeSlave.sexualFlaw = "hates anal">>
		<</if>>
	<<case "oral">>
		<<if ($activeSlave.energy <= 95) && ($activeSlave.sexualFlaw != "hates oral")>>
			Having <<print _a>> _animal.species fuck $him by force has given $him a @@.red;hatred of oral penetration.@@
			<<set $activeSlave.sexualFlaw = "hates oral">>
		<</if>>
	<</switch>>
<</if>>

<<if _sexAct != "oral">>
	<<if $postSexCleanUp > 0>>

		<<if ($activeSlave.vagina == 3)>>
			<<= capFirstChar(_animal.species)>> cum drips out of $his fucked-out hole.
		<<elseif ($activeSlave.vagina == 2)>>
			<<= capFirstChar(_animal.species)>> cum drips out of $his stretched vagina.
		<<elseif ($activeSlave.vagina == 1)>>
			$His still-tight vagina keeps the _animal.species's load inside $him.
		<<elseif ($activeSlave.vagina < 0)>>
			<<= capFirstChar(_animal.species)>> cum drips out of $his girly ass.
		<<else>>
			<<= capFirstChar(_animal.species)>> cum slides right out of $his gaping hole.
		<</if>>

		<<if canWalk($activeSlave)>>
			$He uses <<if $activeSlave.vagina > 0>>a quick douche to clean $his <<if $activeSlave.vagina < 2>>tight<<elseif $activeSlave.vagina > 3>>loose<</if>> pussy<<else>>an enema to clean $his <<if $activeSlave.anus < 2>>tight<<elseif $activeSlave.anus < 3>>used<<else>>gaping<</if>> butthole<</if>>,
			<<switch $activeSlave.assignment>>
			<<case "work in the brothel">>
				just like $he does between each customer.
			<<case "serve in the club">>
				just like $he does in the club.
			<<case "work in the dairy">>
				to avoid besmirching the nice clean dairy.
			<<case "work as a farmhand">>
				to avoid tainting the food in $farmyardName.
			<<case "work as a servant">>
				mostly to keep everything $he has to clean from getting any dirtier.
			<<case "whore">>
				before returning to offering it for sale.
			<<case "serve the public">>
				before returning to offering it for free.
			<<case "rest">>
				before crawling back into bed.
			<<case "get milked">>
				<<if $activeSlave.lactation > 0>>before going to get $his uncomfortably milk-filled tits drained<<else>>and then rests until $his balls are ready to be drained again<</if>>.
			<<case "be a servant">>
				since $his chores didn't perform themselves while you used $his fuckhole.
			<<case "please you">>
				before returning to await your next use of $his fuckhole, as though nothing had happened.
			<<case "be a subordinate slave">>
				though it's only a matter of time before another slave decides to play with $his fuckhole.
			<<case "be your Head Girl">>
				worried that $his charges got up to trouble while $he enjoyed $his <<= WrittenMaster()>>'s use.
			<<case "guard you">>
				so $he can be fresh and ready for more sexual use even as $he guards your person.
			<<case "be the Schoolteacher">>
				before $he returns to teaching $his classes.
			<<default>>
				before $he returns to $activeSlave.assignment.
			<</switch>>
		<</if>>
	<</if>>
<</if>>

<<set $animalType = 0>>


code:
:: BirthStorm [nobr]

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

<<set $activeSlave.curBabies = WombBirth($activeSlave, 34)>> /*Here check - how many children survive this event. 34 weeks minimum.*/
<<set _curBabies = $activeSlave.curBabies.length>>

The remote surgery allows the removal of the pregnancy generator through conventional means, an injection to induce labor and the resulting birthing of the womb's contents.
<<if $activeSlave.broodmother == 2>>
	$activeSlave.slaveName's obscenely swollen belly begins to shudder and writhe moments after being injected with the drug as all $his waters break. $He spreads $his <<if $activeSlave.amp != 1>>legs to either side of $his spasming bulk as wide as $he can<<else>>stumps as wide as $he can<</if>> with a loud moan. $His vaginal lips part as the first of $his brood is born, followed by another, and another. After hours of constant
<<elseif $activeSlave.broodmother == 1>>
	$activeSlave.slaveName's massive belly shudders and shrinks as all $his waters simultaneously break. $He spreads $his <<if $activeSlave.amp != 1>>legs<<else>>stumps<</if>> wide with a loud moan. $His vaginal lips part as the first of $his brood is born, followed not long after by another. After an hour of constant
<<else>>
	$activeSlave.slaveName's massive belly shudders and shrinks as all $his waters simultaneously break. $He spreads $his <<if $activeSlave.amp != 1>>legs<<else>>stumps<</if>> wide with a loud moan. $His vaginal lips part as $his birthing begins. After an hour of intensive
<</if>>
<<if $activeSlave.fetish == "mindbroken">>
	birthing, $he shows little interest in the changes to $his body. @@.red;The ordeal of intensive birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
<<elseif $activeSlave.sexualFlaw == "breeder">>
	birthing and the realization that you are taking away $his ideal body, $his perfect existence; $his mind @@.red;fundamentally breaks. The ordeal of intensive birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
	<<set $activeSlave.fetish = "mindbroken">>
<<elseif $activeSlave.fetish == "pregnancy" && $Nurse != 0>>
	birthing and orgasming all the time, $activeSlave.slaveName's mind would have broken. However, $Nurse.slaveName had the foresight to sedate $him after witnessing $his constant orgasming. $He awakes to find $his belly deflated, no longer crammed full of life. $He is @@.mediumorchid;disappointed@@ that you would forbid $him from such a pleasure, but @@.mediumaquamarine;understands@@ why it was done. @@.red;The ordeal of intensive birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
	<<set $activeSlave.trust += 5, $activeSlave.devotion -= 5>>
<<elseif $activeSlave.fetish == "pregnancy">>
	<<if $activeSlave.broodmother == 2>>
		birthing and orgasming each time, $activeSlave.slaveName's mind is @@.red;fundamentally broken.@@ Being under constant pleasure for so long has destroyed all but the part of $him that feels pleasure. With one final push the breeding device is expelled from $his womb as the last spark of what was $his mind is extinguished. @@.red;The ordeal of constant birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
		<<set $activeSlave.fetish = "mindbroken">>
	<<elseif $activeSlave.broodmother == 1>>
		birthing and orgasming each time, $activeSlave.slaveName is reduced to a quivering, overstimulated pile. When $he returns to $his senses, @@.hotpink;$he can only express how much $he wants to go again.@@ @@.red;The ordeal of constant birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
		<<set $activeSlave.devotion += 4>>
	<<else>>
		birthing and orgasming all the time, $activeSlave.slaveName is reduced to a quivering, overstimulated pile. When $he returns to $his senses, @@.hotpink;$he can only express how much $he wants to go again.@@ @@.red;The ordeal of intensive birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
		<<set $activeSlave.devotion += 3>>
	<</if>>
<<elseif $activeSlave.devotion <= 20>>
	birthing, @@.mediumorchid;$he hates you for destroying $his body like this.@@ $He is @@.gold;terrified of your power@@ over $his body. @@.red;The ordeal of constant birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
	<<set $activeSlave.trust -= 40, $activeSlave.devotion -= 50>>
<<elseif $activeSlave.devotion <= 50>>
	birthing, $he is dully obedient. $He has been broken to slave life so thoroughly that even this is neither surprising nor affecting. $He is @@.gold;terrified of your power@@ over $his body. @@.red;The ordeal of constant birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
	<<set $activeSlave.trust -= 40>>
<<else>>
	birthing, $he is @@.hotpink;pleased by this stark development@@ since $he is so attentive to your will. $He also expects $he'll be able to fuck better now without a massive belly getting in the way. @@.red;The ordeal of constant birthing has had a massive effect on $his health as well as completely destroying $his vagina.@@
	<<set $activeSlave.devotion += 4>>
<</if>>

<<if $activeSlave.birthsTat > -1>>
	<<set $activeSlave.birthsTat++>>
	The temporary tattoo of a child has been replaced with $his <<= ordinalSuffix($activeSlave.birthsTat)>> permanent infant.
	<<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>>
<</if>>

<<set _babyPrice = random(-20,20)>>
<<if $activeSlave.broodmother == 2>>
	<<set $activeSlave.preg = -3>>
	<<if $activeSlave.vagina < 6>>
		<<set $activeSlave.vagina = 10>>
	<</if>>
	<<set $activeSlave.health -= 80>>
<<else>>
	<<if lastPregRule($activeSlave,$defaultRules)>><<set $activeSlave.preg = -1>><<else>><<set $activeSlave.preg = 0>><</if>> /* I think, it's not logical to break her reproductive system out of repair, if she is only type 1 broodmother. In this case she have to birth only like 5-10 fully grown babies, others get progressively smaller. It's should be even smaller stress to body then for "normal" hyperpregnant with 15-20+ children - they have to birth them all at full size.*/
	<<if $activeSlave.vagina < 6>>
		<<set $activeSlave.vagina = 6>>
	<</if>>
	<<set $activeSlave.health -= 30>>
<</if>>
<<if $Cash4Babies == 1 && _curBabies > 0>>
	$His surviving <<if _curBabies > 1>>children<<else>>child<</if>> sold for a total of @@.yellowgreen;<<print cashFormat(_curBabies*(50+_babyPrice))>>.@@
	<<run cashX((_curBabies*(50+_babyPrice)), "babyTransfer", $activeSlave)>>
<</if>>
<<set $activeSlave.counter.births += _curBabies>>
<<set $activeSlave.counter.birthsTotal += _curBabies>>
<<set $birthsTotal += _curBabies>>
<<if $activeSlave.geneticQuirks.fertility+$activeSlave.geneticQuirks.hyperFertility >= 4>>
	<<set $activeSlave.pregWeek = -2>>
<<elseif $activeSlave.geneticQuirks.hyperFertility > 1>>
	<<set $activeSlave.pregWeek = -3>>
<<else>>
	<<set $activeSlave.pregWeek = -4>>
<</if>>
<<set $activeSlave.pregType = 0>>
<<set $activeSlave.pregSource = 0>>
<<set $activeSlave.pregKnown = 0>>
<<set WombFlush($activeSlave)>>
<<set $activeSlave.broodmother = 0>>
<<run SetBellySize($activeSlave)>>


code:
:: Breeder Proposal [nobr]

<<set $nextButton = " ", $nextLink = "Main", $propOutcome = -1>>

You draft a proposal to the Societal Elite proposing the use of specially tested slaves as breeding stock. If they can pass the tests required to join the Societal Elite; even as slaves, their bodies can prove valuable to furthering eugenics. They will gain no additional rights, but their wombs will be used to birth elite children; helping stave off potential threats of inbreeding and adding possible missed beneficial traits into the Elite's gene pool.

Within the hour, you are called before <<if $eugenicsFullControl == 1>>what's left of <</if>>the Societal Elite.

<<setPlayerPronouns>>
<<if $eugenicsFullControl == 1>>
	"That sounds like an acceptable proposal. We'll draft the standards for breeding stock and notify you shortly."
	<<set $propOutcome = 1>>
	<<InitStandards>>
	<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
<<elseif $PC.pregSource == -1 || $PC.pregSource == -6>>
	"Since you are doing your part and carrying an Elite child, we will gladly reward you by granting your proposal. We shall decide upon the standards for breeding stock and notify you shortly."
	<<set $propOutcome = 1>>
	<<InitStandards>>
	<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
<<elseif $PC.birthElite > 0>>
	"Since you have carried children for our cause, we will gladly reward you by granting your proposal. We shall decide upon the standards for breeding stock and notify you shortly."
	<<set $propOutcome = 1>>
	<<InitStandards>>
	<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
<<elseif $PC.dick == 0>>
	<<if $failedElite > 50>>
		"Do you really think you are in any position to make such a request? You, a fertile woman and member of the Elite, who has not taken even the slightest interest in carrying one of our children, dares to even suggest using slaves as breeding stock? Well?"

<<link "Agree to being used as a breeder and save face">>
		<<replace "#result">>
			"Good choice, _girlP. A selection of eligible donors will be provided to you; take your pick and bear our children. Or use a test tube, if that's more to your tastes."
			<<set $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

<<link "Decline being used as a breeder and face the Societal Elites' wrath">>
		<<replace "#result">>
			"You'll regret this decision. We'll have our way one way or another."
			<<set $failedElite += 275, $propOutcome = -1>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

	<<else>>
		"An interesting proposal, given your lack of equipment, though we would be much more open to listen to your request if you were heavy with one of our children.

<<link "Agree to being used as a breeder for the sake of your proposal">>
		<<replace "#result">>
			"Good choice, _girlP; your proposal is more important than your dignity after all, isn't it? A selection of eligible donors will be provided to you; take your pick and bear our children. Or use a test tube, if that's more to your tastes."
			<<set $failedElite -= 50, $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>
		<<if $failedElite <= 0>>

<<link "Decline being used as a breeder and leverage your standing">>
			<<replace "#result">>
				"Yes, you have done much to further our cause. We respect the 'balls' on you, despite your lack of them. Very well, we shall set the standards for what shall qualify as breeding stock and our standards will be delivered to you shortly."
				<<set $propOutcome = 1>>
				<<InitStandards>>
				<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
			<</replace>>
			<</link>>
		<<else>>

<<link "Decline being used as a breeder and withdraw your proposal">>
			<<replace "#result">>
				"Then why waste our time? You disappoint us, but don't worry; you'll be laden with child soon enough."
				<<set $propOutcome = -1>>
				<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
			<</replace>>
			<</link>>
		<</if>>

	<</if>>
<<else>>
	<<if $PC.dick == 1 && $PC.vagina == 1 && $failedElite > 50>>
		"We have read your proposal and propose the following: You are not well liked among us, and your medical records show you are quite capable of carrying a child. If you will carry our children, we will grant your proposal, otherwise, leave and never ask us this again."

<<link "Agree to being used as a breeder to complete the deal">>
		<<replace "#result">>
			"Your contributions will be appreciated. We shall convene to decide the qualifications for a slave to become a breeder. We will inform you of them when we send the list of eligible donors to breed you. Or send you a test tube, if that's more to your tastes."
			<<set $failedElite -= 50, $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

<<link "Decline being used as a breeder and withdraw your proposal">>
		<<replace "#result">>
			"Very well, if your masculinity is more valuable to you than your proposal, then so be it."
			<<set $propOutcome = -1>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

	<<elseif $PC.dick == 1 && $PC.vagina == 1>>
		"We have read your proposal and agree. However, we shall set the standards for what shall qualify as breeding stock, not you. Our standards will be delivered to you shortly.

		Your medical records say you have working female sex organs, and we respect your choice to not use them. But have you considered carrying another member's child? It will be extremely lucrative for you and go a long way to furthering our objectives."

<<link "Agree to being used as a breeder">>
		<<replace "#result">>
			"Your contributions will be appreciated. We shall convene to decide the qualifications for a slave to become a breeder. We will inform you of them when we send the list of eligible donors to breed you. Or send you a test tube, if that's more to your tastes."
			<<set $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

<<link "Decline being used as a breeder">>
		<<replace "#result">>
			"Very well, if you wish to waste your gift, it is your prerogative. We shall convene to decide the qualifications for a slave to become a breeder and inform you upon completion."
			<<set $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

	<<else>>
		"We have read your proposal and agree. However, we shall set the standards for what shall qualify as breeding stock, not you. Our standards will be delivered to you shortly."
		<<set $propOutcome = 1>>
		<<InitStandards>>
		<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
	<</if>>
<</if>>


code:
:: BreedingTest [nobr]

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

<<UpdateStandards>>
<<BreedingStandards>>

<<BreedingEligibility>>


code:
:: Cloning Workaround [nobr]

<<set $nextButton = "Cancel", $nextLink = "Gene Lab", _eligibility = 0>>
<<if $donatrix != "Undecided" && $donatrix.ID == -1>><<set _impreg = PlayerName()>><<elseif $donatrix != "Undecided">><<set _impreg = SlaveFullName($donatrix)>><<else>><<set _impreg = $donatrix>><</if>>
<<if $receptrix != "Undecided" && $receptrix.ID == -1>><<set _receive = PlayerName()>><<elseif $receptrix != "Undecided">><<set _receive = SlaveFullName($receptrix)>><<else>><<set _receive = $receptrix>><</if>>

//Blank ovum prepared, please select genetic source://

[[Yourself|Cloning Workaround][$donatrix = $PC]]
<<for _cw = 0; _cw < $slaves.length; _cw++>>
	<<capture _cw>>
		<<set _name = SlaveFullName($slaves[_cw])>>

[[_name|Cloning Workaround][$donatrix = $slaves[_cw]]]
	<</capture>>
<</for>>

__Chosen surrogate: _receive __

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

[[_name2|Cloning Workaround][$receptrix = $slaves[_cw1]]] <<if $slaves[_cw1].pregType >= 4>>//Using a slave carrying multiples is unadvisable//<</if>>
			<<set _eligibility = 1>>
		<</if>>
	<</capture>>
<</for>>
<<if (_eligibility == 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|Cloning Workaround][$receptrix = $PC]]
<</if>>

_impreg will be cloned and _receive shall act as the incubator.
<<if _impreg != "Undecided" && _receive != "Undecided">>
	[[Implant clone ovum|Surrogacy][cashX(forceNeg($surgeryCost*2), "slaveSurgery"), $surgeryType = 'clone']]
<</if>>


code:
:: Criminal Market [nobr]

<<set $nextButton = "Back", $nextLink = "Buy Slaves", $returnTo = "Buy Slaves", $showEncyclopedia = 1, $encyclopedia = "Slave Schools">>

<<if ndef $newSlaves>><<set $newSlaves = []>><</if>>
<<if $newSlaves.length > 0>>
	<<set $nextButton = "Continue", $nextLink = "Bulk Slave Intro", $slaveMarket = $weeklyMarket, $returnTo = "Main", $newSlaveIndex = 0>>
<</if>>

You board the transport to
<<switch $weeklyMarket>>
<<case "low tier criminals">> /* mixed prisoners */

	a small prison on the edge of the city spanning from the foot of your arcology with the appearance of an old world police station. You arrive inside and are met by a cute receptionist, asking why one such as yourself would visit such a place. With formalities out of the way, the head of the station is called and arrives shortly. "Well now, didn't expect to see you here. Came to pick up a criminal and give them a chance at not being a menial?" You are then led further into the station and into the prisoners' quarters; most of them appear downcast and dismal, but some look up to see what the commotion is about. "You! Come here! This fine <<if $PC.title == 1>>lady<<else>>gentleman<</if>> wants to take a look, so be on your best behavior!" the head calls out, bringing one of the criminals close enough to be inspected.

<<case "gangs and smugglers">> /* males only */

	a large gray prison at the edge of the Free City as word of your approach is sent ahead. The visage of the prison itself is a grim one, enclosed by a large gray concrete fence with electrified barbed wire coiled at the top. As the vehicle rolls to a stop before a large gate, the guard in control of the gate operates a board of buttons and levers, promptly opening it so it may continue. "Stay on the road," he respectfully advises, a final remark before letting your driver carry on. Beyond the fence is an array of guard towers manned with drones for 24/7 surveillance, giving you a clear idea of what was to happen if you were not to heed the guard's words and decided to wander off from the group.

	Your destination at the end of the road is a garage, where upon your disembarking, no less than 4 heavily armored guards with electric batons at their sides come to greet you. You could almost mistake them for unmanned drones had they not start speaking. "We've been expecting you; please follow us. We house some dangerous individuals in our establishment and we need to keep you safe." You accept their advice and enter the premises.

	You are met with a dimly lit concrete hallway as you enter, only for it to open up to a multi-floor prison that had placed its prisoners underground for the most part<<if $PC.title == 0 || $PC.boobsBonus > 1 || $PC.butt > 1>>, where you are met with a hailstorm of whistles, cheers and other catcalls<</if>>. You come to a bridge and look down to see its inhabitants, hard criminals that are coming together for a meal. You watch a fight break out at one point and an armored guard quickly step in and apply his baton to the offenders, coupled with a loud zap that silences the entire area. Around your level, you see the better stock: the attractive prisoners one would show to an interested customer.

	You finally reach the warden's office, "Welcome <<if $PC.title == 1>>Mister<<else>>Miss<</if>> <<= PlayerName()>>, I never thought my prison could have turned to a trade such as this, but times are hard." He beckons you to the seat opposite him, "but I'm not one to complain when an opportunity such as this comes my way." He motions to his guards to bring in a select stock for your perusal. "We house some tough nuts in this establishment, but if you believe you can capitalize on these criminals, we'll be happy to have you take them off our hands." The guard returns with a convict ready to be sold.

<<case "white collar">> /* mixed prisoners */

	what looks more like an oversized vacation home rather than something one goes to for committing crimes. You enter the premises into a small chamber with a booth to the side and are immediately met with a cheerful "Ah! We've been waiting for you. Please go in. We'll call someone to guide you immediately."

	You nod at the prompt and enter further into the luxurious building to find a formally dressed guide and what appears to be the holding area of the prison. The cells, if you can call them that, are large and cozy, each with their own computer and television. The air is also conditioned for their comfort and old world classical music is playing to provide further ambiance. Walking through, you see the prisoners themselves, lazing about in their beds, sitting at their computers, or just talking to each other. If there was ever a prison you'd rather end up in, this would be it.

	You enter the warden's office and are greeted with all due formalities. "Glad to see you at our establishment. When I heard that someone as renowned as yourself was coming over, I made the appropriate preparations." You are served a cup of tea as she brings in the chosen stock for you to observe at your leisure.

<<case "military prison">>

	a holding facility for prisoners of war located on the outskirts of the Free City, which is reasonable due to the dangers inherent to the criminals imprisoned in such an establishment. The driver radios ahead that you and several other interested parties will be arriving shortly. Once you disembark at the edge of the grounds, you are recognized by the stationed guard and ushered into a heavily armored vehicle. <<if $PC.career == "mercenary">>The interior brings back memories and you completely<<else>>Although the interior makes you feel like a prisoner, you<</if>> understand the reasoning behind such a design choice.

	Once you arrive at the prison, the door opens to a garage and another door, brightly lit to welcome you to the premises. Through the door, you find the prisoner's quarters, each of them enclosed by electrified fences to ensure your safety as you see the stock. A guard enters, asking you to follow him as he leads you across the chamber to meet with the warden.

	Entering the warden's quarters, you take a seat across from him as he takes the initiative. "Ah, fancy meeting one such as yourself here. Though we house some of the hardiest criminals you can find, I'm sure one such as yourself could find great use for them." He smirks. "... or perhaps great entertainment through the pits," he says as he beckons to his staff as they bring in the selected stock.

<</switch>>

<<= generateMarketSlave($weeklyMarket)>>

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

It will cost <<print cashFormat($slaveCost)>> to enslave $him.

<<if $cash >= $slaveCost>>

[["Enslave " + $him + " and check out other available prisoners"|Criminal Market][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave), $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
	<<if $newSlaves.length == 0>>

[["Enslave " + $him|New Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave),$nextButton = "Continue",$nextLink = "AS Dump",$returnTo = "Main"]]
	<<else>>

[["Enslave " + $him + " and finish your inspection"|Bulk Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave), $newSlaves.push($activeSlave)]]
	<</if>>
<<else>>
	//You lack the necessary funds to enslave this criminal.//
<</if>>

[[Inspect a different prisoner|Criminal Market][$slavesSeen += 1]]
<<if $newSlaves.length > 0>>

[[Finish your enslavement of prisoners|Bulk Slave Intro]]
<</if>>

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

<<set $slaveCost = slaveCost($activeSlave)>>