code:
:: Remote Surgery [nobr jump-from-safe]

<<set $nextButton = "Confirm changes", $nextLink = "Slave Interact">>

<<set $AS = $activeSlave.ID>>
<<run App.Utils.setLocalPronouns(getSlave($AS))>>
<<run updateHealth(getSlave($AS))>>

<<set $surgeryType = 0, $encyclopedia = "The Remote Surgery">>
<<set _belly = bellyAdjective(getSlave($AS))>>
/* get all prosthetics that are ready for this slave */
<<if $adjustProstheticsCompleted > 0>>
	<<set $adjustProsthetics = $adjustProsthetics.filter(function(p) {
		if (p.workLeft <= 0 && p.slaveID == $AS) {
			addProsthetic(getSlave($AS), p.id);
			$adjustProstheticsCompleted--;
			return false;
		}
		return true;
	})>>
<</if>>

<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.RemoteSurgery)>>

The Remote Surgery

		<<= getSlave($AS).slaveName>> is lying strapped down on the table in your
		<<if $surgeryUpgrade == 1>>
			heavily upgraded and customized
		<</if>>
		remote surgery. The surgical equipment reads
		<<if getSlave($AS).health.health < -20>>

				SLAVE UNHEALTHY, SURGERY NOT RECOMMENDED.

		<<elseif getSlave($AS).health.health <= 20>>

				SLAVE HEALTHY, SURGERY SAFE.

		<<else>>

				SLAVE HEALTHY, SURGERY ENCOURAGED.

		<</if>>
		<<if $PC.skill.medicine >= 100>>
			The remote surgery mechanisms that allow a surgeon to be brought in by telepresence are inactive, and the autosurgery is ready for your control inputs. Surgery on your slaves is a challenge and a pleasure you wouldn't dream of sharing.
		<</if>>

	<<if getSlave($AS).indentureRestrictions >= 1>>
		This slave is subject to a restrictive indenture which forbids many invasive surgeries.
	<</if>>

	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'hair-face')" id="tab hair-face">Hair and Face</button>
	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'upper')" id="tab upper">Upper</button>
	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'lower')" id="tab lower">Lower</button>
	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'race')" id="tab race">Race</button>
	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'structural')" id="tab structural">Structural</button>
	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'extreme-surgery')" id="tab extreme-surgery">Extreme Surgery</button>

	/* 000-250-006 */
	<<if $seeImages == 1>>
		<<if $imageChoice == 1>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

		<<else>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

		<</if>>
	<</if>>
	/* 000-250-006 */

Hair:

	/*Main Hair*/

		<<set _pubertyAge = Math.min(getSlave($AS).pubertyAgeXX, getSlave($AS).pubertyAgeXY)>>
		<<if getSlave($AS).bald == 0 && getSlave($AS).hStyle != "bald">>
			$He naturally grows <<= getSlave($AS).origHColor>> hair from $his head.

				<<if getSlave($AS).indentureRestrictions > 1>>
					$His indenture forbids elective surgery
				<<else>>
					[["Surgically remove " + $his + " ability to grow hair"|Surgery Degradation][cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),getSlave($AS).bald = 1,$surgeryType = "hair removal"]]
				<</if>>

		<<else>>
			$He is no longer capable of growing hair on $his head.
		<</if>>

	/*Eyebrows*/

		<<if (getSlave($AS).eyebrowHStyle != "bald")>>
			$He has <<= getSlave($AS).origHColor>> eyebrows.

				<<if getSlave($AS).indentureRestrictions > 1>>
					$His indenture forbids elective surgery
				<<else>>
					[["Surgically remove " + $his + " ability to grow eyebrows"|Surgery Degradation][cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),$surgeryType = "eyebrow removal"]]
				<</if>>

		<<else>>
			$He is no longer capable of growing eyebrow hair.
		<</if>>

	/*Armpit hair*/

		<<if (getSlave($AS).underArmHStyle != "bald" && getSlave($AS).underArmHStyle != "hairless") || (getSlave($AS).pubicHStyle != "bald" && getSlave($AS).pubicHStyle != "hairless")>>
			$He
			<<if getSlave($AS).physicalAge >= _pubertyAge>>
				naturally grows
			<<elseif getSlave($AS).physicalAge >= _pubertyAge-1>>
				is beginning to grow
			<<else>>
				will someday grow
			<</if>>
			<<= getSlave($AS).origHColor>> body hair.

				<<if getSlave($AS).indentureRestrictions > 1>>
					$His indenture forbids elective surgery
				<<else>>
					[["Surgically remove " + $his + " ability to grow body hair"|Surgery Degradation][cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),$surgeryType = "body hair removal"]]
				<</if>>

		<<else>>
			$His <<= getSlave($AS).skin>> skin is silky smooth and hair free from $his neck to $his
			<<if !hasAnyLegs(getSlave($AS))>>
				hips.
			<<else>>
				toes.
			<</if>>
		<</if>>

Face:

		$His <<= getSlave($AS).faceShape>> face is
		<<if getSlave($AS).face < -95>>
			very ugly.
		<<elseif getSlave($AS).face < -40>>
			ugly.
		<<elseif getSlave($AS).face < -10>>
			unattractive.
		<<elseif (getSlave($AS).face <= 10)>>
			quite average.
		<<elseif (getSlave($AS).face <= 40)>>
			attractive.
		<<elseif (getSlave($AS).face <= 95)>>
			beautiful.
		<<elseif (getSlave($AS).face > 95)>>
			very beautiful.
		<</if>>

		<<if getSlave($AS).faceImplant == 0>>
			It is entirely natural.
		<<elseif getSlave($AS).faceImplant > 5>>
			It has seen some work.
		<<elseif getSlave($AS).faceImplant > 30>>
			It has been totally reworked.
		<</if>>

			<<if getSlave($AS).indentureRestrictions >= 2>>
				$His indenture forbids elective surgery
			<<elseif getSlave($AS).faceImplant > 95>>
				$His face cannot sustain further cosmetic surgery
			<<else>>
				<<set _artificiality = 25-(5*Math.trunc($PC.skill.medicine/50))-(5*$surgeryUpgrade)>>
				<<if getSlave($AS).faceShape != "normal">>
					[[Make conventionally feminine|Surgery Degradation][getSlave($AS).faceShape = "normal",getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]] |
				<</if>>
				<<if getSlave($AS).faceShape == "masculine">>
					[[Soften to androgynous|Surgery Degradation][getSlave($AS).faceShape = "androgynous",getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]] |
				<<else>>
					<<if getSlave($AS).faceShape != "cute">>
						[[Cute|Surgery Degradation][getSlave($AS).faceShape = "cute",getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]] |
					<</if>>
					<<if getSlave($AS).faceShape != "exotic">>
						[[Exotic|Surgery Degradation][getSlave($AS).faceShape = "exotic",getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]] |
					<</if>>
					<<if getSlave($AS).faceShape != "sensual">>
						[[Sensual|Surgery Degradation][getSlave($AS).faceShape = "sensual",getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]] |
					<</if>>
					<<if getSlave($AS).faceShape != "androgynous">>
						[[Androgynous|Surgery Degradation][getSlave($AS).faceShape = "androgynous",getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]] |
					<<else>>
						[[Masculine|Surgery Degradation][getSlave($AS).faceShape = "masculine",getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]] |
					<</if>>
				<</if>>
				[[Just improve attractiveness|Surgery Degradation][getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "face"]]

					Facial surgery can either rework it and improve its attractiveness, or simply make it more attractive. No facial surgery is perfect and each surgery will make it look less natural.
					<<if $PC.skill.medicine >= 100 && $surgeryUpgrade>>
						Your surgical skills and the advanced surgical suite will minimize this effect as much as possible.
					<<elseif $PC.skill.medicine >= 100>>
						Your surgical skills will reduce this effect.
					<<elseif $surgeryUpgrade>>
						The advanced surgical suite will reduce this effect.
					<</if>>
					<<if getSlave($AS).faceImplant+_artificiality > 95>>
						<<if getSlave($AS).faceImplant != 0>>Further f<<else>>F<</if>>acial surgery will create a severe uncanny valley effect.
					<<elseif getSlave($AS).faceImplant+_artificiality > 60 && getSlave($AS).faceImplant <= 60>>
						<<if getSlave($AS).faceImplant != 0>>Further f<<else>>F<</if>>acial surgery will be extremely obvious.
					<<elseif getSlave($AS).faceImplant+_artificiality > 30 && getSlave($AS).faceImplant <= 30>>
						<<if getSlave($AS).faceImplant != 0>>Further f<<else>>F<</if>>acial surgery will eliminate a natural appearance.
					<<elseif getSlave($AS).faceImplant+_artificiality > 10 && getSlave($AS).faceImplant <= 10>>
						<<if getSlave($AS).faceImplant != 0>>Further f<<else>>F<</if>>acial surgery will disturb a perfectly natural appearance.
					<<else>>
						A single facial surgery is not projected to significantly impact artificiality.
					<</if>>

			<</if>>

		<<if getSlave($AS).indentureRestrictions < 2 && getSlave($AS).faceImplant <= 95>>
			<<if (getSlave($AS).ageImplant > 1)>>
				$He's had a multiple facelifts and other cosmetic procedures in an effort to preserve $his youth.
			<<elseif (getSlave($AS).ageImplant > 0)>>
				$He's had a face lift and other minor cosmetic procedures to make $him look younger.
			<<elseif (getSlave($AS).physicalAge >= 25) && (getSlave($AS).visualAge >= 25)>>
				$He's old enough that a face lift and other minor cosmetic procedures could make $him look younger.

					[[Age lift|Surgery Degradation][applyAgeImplant(getSlave($AS)),getSlave($AS).faceImplant = Math.clamp(getSlave($AS).faceImplant+_artificiality,0,100),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "age"]]

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

	/*Eyes*/

		$He has <<print App.Desc.eyesType(getSlave($AS))>><<if hasAnyEyes(getSlave($AS))>>, they are <<print App.Desc.eyesVision(getSlave($AS))>><</if>>.

			/* eye blur and fix */
			<<if hasAnyEyes(getSlave($AS))>>
				/* Blur eyes*/
				<<if getSlave($AS).indentureRestrictions > 1>>
					$His indenture forbids elective surgery
				<<else>>
					<<set _n = 0>>
					<<if getLeftEyeVision(getSlave($AS)) === 2 && getLeftEyeType(getSlave($AS)) === 1>>
						<<set _n++>>
						[[Blur left eye|Surgery Degradation][eyeSurgery(getSlave($AS), "left", "blur"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "eyeBlur"]]
					<</if>>
					<<if getRightEyeVision(getSlave($AS)) === 2 && getRightEyeType(getSlave($AS)) === 1>>
						<<if _n > 0>>
							|
						<</if>>
						<<set _n++>>
						[[Blur right eye|Surgery Degradation][eyeSurgery(getSlave($AS), "right", "blur"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "eyeBlur"]]
					<</if>>
					<<if _n === 2>>
						| [[Blur both eyes|Surgery Degradation][eyeSurgery(getSlave($AS), "both", "blur"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "eyeBlur"]]
					<</if>>
				<</if>>

				/* Fix eyes */
				<<set _n = 0>>
				<<if getLeftEyeVision(getSlave($AS)) === 1 && getLeftEyeType(getSlave($AS)) === 1>>
					<<set _n++>>
					| [[Fix left eye|Surgery Degradation][eyeSurgery(getSlave($AS), "left", "fix"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "eyeFix"]]
				<</if>>
				<<if getRightEyeVision(getSlave($AS)) === 1 && getRightEyeType(getSlave($AS)) === 1>>
					<<set _n++>>
					| [[Fix right eye|Surgery Degradation][eyeSurgery(getSlave($AS), "right", "fix"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "eyeFix"]]
				<</if>>
				<<if _n === 2>>
					| [[Fix both eyes|Surgery Degradation][eyeSurgery(getSlave($AS), "both", "fix"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "eyeFix"]]
				<</if>>
			<</if>>

			<<if ($seeExtreme == 1)>>
				<<if getSlave($AS).indentureRestrictions < 1>>
					/* blind */
					<<set _n = 0>>
					<<if getLeftEyeVision(getSlave($AS)) > 0 && getLeftEyeType(getSlave($AS)) === 1>>
						<<set _n++>>
						| [[Blind left eye|Surgery Degradation][eyeSurgery(getSlave($AS), "left", "blind"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "blind"]]
					<</if>>
					<<if getRightEyeVision(getSlave($AS)) > 0 && getRightEyeType(getSlave($AS)) === 1>>
						<<set _n++>>
						| [[Blind right eye|Surgery Degradation][eyeSurgery(getSlave($AS), "right", "blind"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "blind"]]
					<</if>>
					<<if _n === 2>>
						| [[Blind both eyes|Surgery Degradation][eyeSurgery(getSlave($AS), "both", "blind"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "blind"]]
					<</if>>
					/* remove */
					<<set _n = 0>>
					<<if hasLeftEye(getSlave($AS))>>
						<<set _n++>>
						| [[Remove left eye|Surgery Degradation][eyeSurgery(getSlave($AS), "left", "remove"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "remove eyes"]]
					<</if>>
					<<if hasRightEye(getSlave($AS))>>
						<<set _n++>>
						| [[Remove right eye|Surgery Degradation][eyeSurgery(getSlave($AS), "right", "remove"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "remove eyes"]]
					<</if>>
					<<if _n === 2>>
						| [[Remove both eyes|Surgery Degradation][eyeSurgery(getSlave($AS), "both", "remove"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "remove eyes"]]
					<</if>>
					/* implant */
					<<if isProstheticAvailable(getSlave($AS), "ocular")>>
						<<set _n = 0>>
						<<if !hasLeftEye(getSlave($AS))>>
							<<set _n++>>
							| [[Give left eye ocular implant|Surgery Degradation][eyeSurgery(getSlave($AS), "left", "cybernetic"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "ocular implant"]]
						<</if>>
						<<if !hasRightEye(getSlave($AS))>>
							<<set _n++>>
							| [[Give right eye ocular implant|Surgery Degradation][eyeSurgery(getSlave($AS), "right", "cybernetic"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "ocular implant"]]
						<</if>>
						<<if _n === 2>>
							| [[Give ocular implants|Surgery Degradation][eyeSurgery(getSlave($AS), "both", "cybernetic"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "ocular implant"]]
						<</if>>
					<</if>>
				<</if>>
			<</if>>

	/*Regular Ears*/

		$He has
		<<if getSlave($AS).earShape == "normal">>
			normal ears.
		<<elseif getSlave($AS).earShape == "damaged">>
			damaged ears.
			| [[Repair|Surgery Degradation][getSlave($AS).earShape = "normal", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earRestore"]]
		<<elseif getSlave($AS).earShape == "pointy">>
			small elfin ears.
		<<elseif getSlave($AS).earShape == "elven">>
			long elf ears.
		<<elseif getSlave($AS).earShape == "ushi">>
			floppy cow ears.
		<<elseif getSlave($AS).earShape == "none">>
			no ears.
		<<else>>
			bugged ears. You done goofed. Report This
		<</if>>

			<<if getSlave($AS).indentureRestrictions >= 2>>
				$His indenture forbids elective surgery
			<<else>>
				<<if getSlave($AS).earShape != "normal" && getSlave($AS).earShape != "none">>
					[[Restore to normal|Surgery Degradation][getSlave($AS).earShape = "normal", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earRestore"]]
				<</if>>
				<<if getSlave($AS).earShape != "normal" && getSlave($AS).earShape !== "none" && $seeExtreme == 1 && getSlave($AS).indentureRestrictions < 1>> | <</if>>
				<<if getSlave($AS).earShape != "none" && $seeExtreme == 1 && getSlave($AS).indentureRestrictions < 1>>
					[[Remove them|Surgery Degradation][surgeryAmp(getSlave($AS), "left ear"), surgeryAmp(getSlave($AS), "right ear"), $surgeryType = "earGone", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))]]
				<</if>>
				<<if getSlave($AS).earShape == "none">>
					<<if getSlave($AS).hears != -2 && getSlave($AS).earImplant != 1>>
						<<set getSlave($AS).hears = -1>>
					<</if>>
				<<else>>
					<<if getSlave($AS).earShape != "pointy">>
						| [[Reshape into small elfin ears|Surgery Degradation][getSlave($AS).earShape = "pointy", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMinor"]]
					<</if>>
					<<if $surgeryUpgrade == 1>>
						<<if getSlave($AS).earShape != "elven">>
							| [[Reshape into long elf ears|Surgery Degradation][getSlave($AS).earShape = "elven", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMajor"]]
						<</if>>
						<<if getSlave($AS).earShape != "ushi">>
							| [[Reshape into bovine ears|Surgery Degradation][getSlave($AS).earShape = "ushi", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMajor"]]
						<</if>>
					<</if>>
				<</if>>
			<</if>>

	/*Top Ears*/

		<<if getSlave($AS).earT != "none">>
			$He has
			<<if getSlave($AS).earT == "none">>
				<<if getSlave($AS).earShape != "none">>only one set of ears<<else>>no secondary ears<</if>>.
			<<elseif getSlave($AS).earT == "normal">>
				<<if getSlave($AS).earShape != "none">>a second pair of ears grafted to $his head<<else>>a pair of ears grafted to the top of $his head<</if>>.
			<<elseif getSlave($AS).earT == "neko">>
				a pair of cat ears adorning $his head.
			<<elseif getSlave($AS).earT == "inu">>
				a pair of dog ears adorning $his head.
			<<elseif getSlave($AS).earT == "kit">>
				a pair of fox ears adorning $his head.
			<<elseif getSlave($AS).earT == "tanuki">>
				a pair of tanuki ears adorning $his head.
			<<elseif getSlave($AS).earT == "usagi">>
				a pair of rabbit ears adorning $his head.
			<<else>>
				You done goofed. Report This
			<</if>>
			<<if getSlave($AS).indentureRestrictions >= 2>>
				$His indenture forbids elective surgery
			<<else>>
				<<if getSlave($AS).earT != "none" && $seeExtreme == 1 && getSlave($AS).indentureRestrictions < 1>>
					[[Remove them|Surgery Degradation][getSlave($AS).earT = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "earGone"]]
				<</if>>
				<<if getSlave($AS).earT == "normal">>
					<<if getSlave($AS).earT != "neko">>
						| [[Reshape into cat Ears|Surgery Degradation][getSlave($AS).earT = "neko", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMajor"]]
					<</if>>
					<<if getSlave($AS).earT != "inu">>
						| [[Reshape into dog Ears|Surgery Degradation][getSlave($AS).earT = "inu", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMajor"]]
					<</if>>
					<<if getSlave($AS).earT != "kit">>
						| [[Reshape into fox Ears|Surgery Degradation][getSlave($AS).earT = "kit", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMajor"]]
					<</if>>
					<<if getSlave($AS).earT != "tanuki">>
						| [[Reshape into tanuki Ears|Surgery Degradation][getSlave($AS).earT = "tanuki", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMajor"]]
					<</if>>
					<<if getSlave($AS).earT != "usagi">>
						| [[Reshape into rabbit Ears|Surgery Degradation][getSlave($AS).earT = "usagi", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMajor"]]
					<</if>>
				<<else>>
					<<if getSlave($AS).earTColor == "hairless">>
						They are completely bald.
						[[Implant hair mimicking fibers|Surgery Degradation][getSlave($AS).earTColor = getSlave($AS).hColor, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMinor"]]
					<<else>>
						They are covered by a multitude of implanted <<= getSlave($AS).earTColor>> fibers mimicking hair.
						[[Remove them|Surgery Degradation][getSlave($AS).earTColor = "hairless", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMinor"]]
					<</if>>
				<</if>>
			<</if>>
		<</if>>

	/*Hearing*/

		<<if getSlave($AS).earImplant == 1>>
			$He has cochlear implants.
		<<elseif (getSlave($AS).hears <= -2)>>
			$He is deaf.
		<<else>>
			$He has working
			<<if getSlave($AS).hears == -1>>
				inner ears, but is hearing impaired<<if getSlave($AS).earShape == "none">>, likely due to missing the outer structure<</if>>.
			<<else>>
				ears and good hearing.
			<</if>>
		<</if>>

		<<if getSlave($AS).earImplant !== 1>>
			<<if getSlave($AS).hears == -1>>
				<<if (getSlave($AS).earImplant != 1) && getSlave($AS).earShape != "none">>
					[[Correct hearing|Surgery Degradation][getSlave($AS).hears = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earFix"]]
				<</if>>
			<<elseif getSlave($AS).hears == 0>>
				<<if ($seeExtreme == 1) && (getSlave($AS).earImplant != 1) && getSlave($AS).indentureRestrictions < 1>>
					[[Muffle hearing|Surgery Degradation][getSlave($AS).hears = -1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "earMuffle"]]
				<</if>>
			<</if>>
		<</if>>

		<<if ($seeExtreme == 1) && getSlave($AS).indentureRestrictions < 1>>
			<<if getSlave($AS).earImplant == 0>>
				<<if (getSlave($AS).hears > -2)>>
					| [[Deafen|Surgery Degradation][getSlave($AS).hears = -2,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "deafen"]]
				<</if>>
				<<if isProstheticAvailable(getSlave($AS), "cochlear")>>
					| [["Give " + $him + " cochlear implants"|Surgery Degradation][getSlave($AS).earImplant = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "cochlear implant"]]
				<</if>>
			<</if>>
		<</if>>

	/*Horns*/

		$He has
		<<if getSlave($AS).horn == "none">>
			no horns.
		<<else>>
			<<= getSlave($AS).horn>>.
		<</if>>

			<<if getSlave($AS).indentureRestrictions >= 2>>

					$His indenture forbids elective surgery

			<<elseif getSlave($AS).horn == "none">>
				Give $him:
				<<if getSlave($AS).horn != "curved succubus horns">>
					[[Succubus horns|Surgery Degradation][getSlave($AS).horn = "curved succubus horns", getSlave($AS).hornColor = "jet black", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "horn"]]
				<</if>>
				<<if getSlave($AS).horn != "backswept horns">>
					| [[Backswept horns|Surgery Degradation][getSlave($AS).horn = "backswept horns", getSlave($AS).hornColor = "jet black", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "horn"]]
				<</if>>
				<<if getSlave($AS).horn != "cow horns">>
					| [[Bovine horns|Surgery Degradation][getSlave($AS).horn = "cow horns", getSlave($AS).hornColor = "ivory", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "horn"]]
				<</if>>
				<<if getSlave($AS).horn != "one long oni horn">>
					| [[One oni horn|Surgery Degradation][getSlave($AS).horn = "one long oni horn", getSlave($AS).hornColor = getSlave($AS).skin, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "horn"]]
				<</if>>
				<<if getSlave($AS).horn != "two long oni horns">>
					| [[Two oni horns|Surgery Degradation][getSlave($AS).horn = "two long oni horns", getSlave($AS).hornColor = getSlave($AS).skin, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "horn"]]
				<</if>>
				<<if getSlave($AS).horn != "small horns">>
					| [[Small horns|Surgery Degradation][getSlave($AS).horn = "small horns", getSlave($AS).hornColor = "ivory", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "horn"]]
				<</if>>
			<<elseif getSlave($AS).horn != "one long oni horn">>
				[[Remove them|Surgery Degradation][surgeryAmp(getSlave($AS), "horn"), $surgeryType = "hornGone", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))]]
			<<else>>
				[[Remove it|Surgery Degradation][surgeryAmp(getSlave($AS), "horn"), $surgeryType = "hornGone", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))]]
			<</if>>

	/*Lips*/

		$He has
		<<if getSlave($AS).lips <= 10>>
			thin, unattractive lips.
		<<elseif getSlave($AS).lips <= 20>>
			normal lips.
		<<elseif getSlave($AS).lips <= 40>>
			full, attractive lips.
		<<elseif getSlave($AS).lips <= 70>>
			plump, beestung lips.
		<<elseif getSlave($AS).lips <= 95>>
			huge, obviously augmented lips.
		<<else>>
			a facepussy: $his lips are so huge that they're always a bit parted in the middle, forming a moist, inviting hole for cock.
		<</if>>
		<<if getSlave($AS).lipsImplant == 0>>
		<<elseif getSlave($AS).lipsImplant <= 10>>
			$He has moderate lip implants.
		<<elseif getSlave($AS).lipsImplant <= 20>>
			$He has large lip implants.
		<<else>>
			$He has enormous lip implants.
		<</if>>

			<<if getSlave($AS).indentureRestrictions >= 2>>
				$His indenture forbids elective surgery
			<<elseif (getSlave($AS).lips <= 75) || ((getSlave($AS).lips <= 95) && ($seeExtreme == 1))>>
				<<if getSlave($AS).lipsImplant > 0>>
					[[Replace with the next size up|Surgery Degradation][getSlave($AS).lipsImplant += 20,getSlave($AS).lips += 20,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "lips"]] This will reduce $his oral skills
				<<else>>
					[[Lip implants|Surgery Degradation][getSlave($AS).lipsImplant = 20,getSlave($AS).lips += 20,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "lips"]] This will reduce $his oral skills
				<</if>>
			<</if>>
			<<if getSlave($AS).lipsImplant != 0>>
				<<if getSlave($AS).indentureRestrictions < 2>>
					| [[Remove lip implants|Surgery Degradation][surgeryAmp(getSlave($AS), "lips"), $surgeryType = "lips", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))]]
				<</if>>
			<</if>>
			<<if (getSlave($AS).lips >= 10) && (getSlave($AS).lipsImplant == 0)>>
				<<if getSlave($AS).indentureRestrictions < 2>>
					| [[Reduce lips|Surgery Degradation][getSlave($AS).lips -= 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "lips"]]
				<</if>>
			<</if>>

	/*Teeth*/

		<<switch getSlave($AS).teeth>>
			<<case "crooked">>
				$He has crooked teeth.

					[[Apply braces|Surgery Degradation][getSlave($AS).teeth = "straightening braces",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),$surgeryType = "braces"]]
					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						| [[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "sharp"]]
					<</if>>

			<<case "gapped">>
				$He has a noticeable gap in $his front teeth.

					[[Apply braces|Surgery Degradation][getSlave($AS).teeth = "straightening braces",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),$surgeryType = "braces"]]
					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						| [[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "sharp"]]
					<</if>>

			<<case "straightening braces">>
				$His crooked teeth are in braces.

					[[Remove braces|Remote Surgery][getSlave($AS).teeth = "crooked",$surgeryType = "removeBraces"]]
					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						| [[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "sharp"]]
					<</if>>

			<<case "cosmetic braces">>
				$He has braces on $his straight teeth.

					[[Remove braces|Remote Surgery][getSlave($AS).teeth = "normal"]]
					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						| [[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "sharp"]]
					<</if>>

			<<case "removable">>
				$He has prosthetic teeth that can be removed for extreme oral sex.

					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "sharp"]] |
						[[Normal dental implants|Surgery Degradation][getSlave($AS).teeth = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "oral"]]
					<</if>>

			<<case "pointy">>
				$His teeth have been replaced with sturdy, realistic implants that mimic the dentition of a predator.

					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						[[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Normal dental implants|Surgery Degradation][getSlave($AS).teeth = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "oral"]]
					<</if>>

			<<case "fangs">>
				$His upper canines have been replaced with sturdy, realistic implants that can only be described as vampiric.

					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						[[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Remove a fang|Surgery Degradation][getSlave($AS).teeth = "fang",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "fang"]] |
						[[Normal dental implants|Surgery Degradation][getSlave($AS).teeth = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "oral"]]
					<</if>>

			<<case "fang">>
				A single one of $his upper canines has been replaced with a sturdy, realistic implant shaped like a fang.
				<<if (getSlave($AS).lips <= 50)>>
					It is occasionally visible over $his lower lip.
				<</if>>

					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						[[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Add another fang|Surgery Degradation][getSlave($AS).teeth = "fangs",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "fangs"]] |
						[[Normal dental implants|Surgery Degradation][getSlave($AS).teeth = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "oral"]]
					<</if>>

			<<case "baby">>
				$He has baby teeth.

					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						[[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "sharp"]] |
						[[Normal dental implants|Surgery Degradation][getSlave($AS).teeth = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "oral"]]
					<</if>>

			<<case "mixed">>
				$He has a mix of baby and normal teeth.

					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						[[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "sharp"]] |
						[[Normal dental implants|Surgery Degradation][getSlave($AS).teeth = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "oral"]]
					<</if>>

			<<default>>
				$He has normal, healthy teeth.

					[[Unnecessary braces|Surgery Degradation][getSlave($AS).teeth = "cosmetic braces",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),$surgeryType = "braces"]]
					<<if ($seeExtreme == 1) && (getSlave($AS).indentureRestrictions < 1)>>
						| [[Replace them with removable prosthetics|Surgery Degradation][getSlave($AS).teeth = "removable",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "teeth"]] |
						[[Replace them with sharp teeth|Surgery Degradation][getSlave($AS).teeth = "pointy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "sharp"]] |
						[[Replace them with fangs|Surgery Degradation][getSlave($AS).teeth = "fangs",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "fangs"]] |
						[[Add a fang|Surgery Degradation][getSlave($AS).teeth = "fang",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "fang"]] |
					<</if>>

		<</switch>>

	/*Voice*/

		<<if getSlave($AS).electrolarynx == 1>>
			$He has an artificial larynx.
		<<else>>
			<<if getSlave($AS).voice == 0>>
				$He is mute.
			<<elseif getSlave($AS).voice == 1>>
				$He has a deep voice.
			<<elseif getSlave($AS).voice == 2>>
				$He has a feminine voice.
			<<elseif getSlave($AS).voice == 3>>
				$He has a high, girly voice.
			<</if>>
			<<if getSlave($AS).voiceImplant >= 1>>
				$He has had surgery on $his voice box to raise $his voice.
			<<elseif getSlave($AS).voiceImplant <= -1>>
				$He has had surgery on $his voice box to lower $his voice.
			<</if>>
		<</if>>
		<<if (getSlave($AS).indentureRestrictions < 1) && (getSlave($AS).electrolarynx != 1)>>

				<<if getSlave($AS).voice != 0>>
					<<if getSlave($AS).voice < 3>>
						[[Perform surgery to raise voice|Surgery Degradation][getSlave($AS).voice += 1, getSlave($AS).voiceImplant += 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "voice"]]
					<</if>>
					<<if getSlave($AS).voice == 2>>
						|
					<</if>>
					<<if getSlave($AS).voice > 1>>
						[[Perform surgery to lower voice|Surgery Degradation][getSlave($AS).voice -= 1, getSlave($AS).voiceImplant -= 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "voice2"]]
					<</if>>
					<<if $seeExtreme == 1>>
						| [[Remove vocal cords|Surgery Degradation][surgeryAmp(getSlave($AS), "voicebox"), $surgeryType = "mute", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))]]
					<</if>>
				<<elseif isProstheticAvailable(getSlave($AS), "electrolarynx")>>
					[["Give " + $him + " an electrolarynx"|Surgery Degradation][getSlave($AS).electrolarynx = 1, getSlave($AS).voice = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "electrolarynx"]]
				<</if>>

		<</if>>

	/*Smell*/

		<<if getSlave($AS).smells == 0 && getSlave($AS).tastes == 0>>
			$He has a working chemosensory system.
		<<elseif getSlave($AS).smells == 0>>
			$He has a working olfactory system and an impaired gustatory system.
		<<elseif getSlave($AS).tastes == 0>>
			$He has a working gustatory system and an impaired olfactory system.
		<<else>>
			$He has an impaired chemosensory system.
		<</if>>
		<<if getSlave($AS).indentureRestrictions < 1>>

				<<if (getSlave($AS).smells == 0) && ($seeExtreme == 1)>>
					[[Remove sense of smell|Surgery Degradation][getSlave($AS).smells = -1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "desmell"]]
				<<elseif getSlave($AS).smells == -1>>
					| [[Repair sense of smell|Surgery Degradation][getSlave($AS).smells = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "resmell"]]
				<</if>>
				<<if (getSlave($AS).tastes == 0) && ($seeExtreme == 1)>>
					| [[Remove sense of taste|Surgery Degradation][getSlave($AS).tastes = -1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "detaste"]]
				<<elseif getSlave($AS).tastes == -1>>
					| [[Repair sense of taste|Surgery Degradation][getSlave($AS).tastes = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "retaste"]]
				<</if>>

		<</if>>

	/*Scars*/

		<<if getSlave($AS).scar["left cheek"]>>
			$He has <<= App.Desc.expandScarString(getSlave($AS), "left cheek")>> on $his left cheek.

				[[Remove all scars there|Surgery Degradation][delete getSlave($AS).scar["left cheek"], cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "scarRemov"]]

		<<else>>
			$His face is unscarred.

				<<if getSlave($AS).indentureRestrictions > 1>>
					$His indenture forbids elective surgery
				<<else>>
					[[Give a menacing scar|Surgery Degradation][App.Medicine.Modification.addScar(getSlave($AS), "left cheek", "menacing"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "scarFear"]] |
					[[Give an exotic scar|Surgery Degradation][App.Medicine.Modification.addScar(getSlave($AS), "left cheek", "exotic"), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "scarExo"]]
				<</if>>

		<</if>>

		/* 000-250-006 */
		<<if $seeImages == 1>>
			<<if $imageChoice == 1>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<<else>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<</if>>
		<</if>>
		/* 000-250-006 */
		/*Generic boob desc*/

Chest:

			$His
			<<if getSlave($AS).boobs < 300>><<print either("androgynous", "flat")>> chest is barely there.
			<<elseif getSlave($AS).boobs < 400>><<print either("pointy", "tiny")>>, <<print getSlave($AS).boobs>>cc chest only fill A-cups.
			<<elseif getSlave($AS).boobs < 8500>>
				<<if $showBoobCCs == 1>>
					<<print App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, would fill %ACUP.", getSlave($AS).boobs)>>
				<<else>>
					<<print App.Desc.boobBits.format("%ADJ %NOUN, would fill %ACUP.", getSlave($AS).boobs)>>
				<</if>>
			<<else>>
				<<print App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, ", getSlave($AS).boobs)>> fill out an enormous custom bra; $his tits dominate $his entire frame.
			<</if>>

		/*Boob implants*/

			$He has
			<<if ["fillable", "advanced fillable", "hyper fillable"].includes(getSlave($AS).boobsImplantType)>>
				<<if getSlave($AS).boobsImplantType == "hyper fillable">>
					<<if getSlave($AS).boobsImplant < 20000>>
						underfilled,
					<<else>>
						enormous,
					<</if>>
				<<elseif getSlave($AS).boobsImplantType == "advanced fillable">>
					<<if getSlave($AS).boobsImplant <= 1000>>
						deflated,
					<<elseif getSlave($AS).boobsImplant < 2200>>
						underfilled,
					<<elseif getSlave($AS).boobsImplant > 10000>>
						massively overfilled,
					<<else>>
						massive,
					<</if>>
				<<else>>
					<<if getSlave($AS).boobsImplant <= 500>>
						deflated,
					<<elseif getSlave($AS).boobsImplant < 800>>
						underfilled,
					<<elseif getSlave($AS).boobsImplant > 1800>>
						massively overfilled,
					<<elseif getSlave($AS).boobsImplant > 1000>>
						massive,
					<<elseif getSlave($AS).boobsImplant >= 800>>
						giant,
					<</if>>
				<</if>>
				<<print getSlave($AS).boobsImplant>>cc <<= getSlave($AS).boobsImplantType>> breast implants.
			<<elseif getSlave($AS).boobsImplantType != "none">>
				<<if getSlave($AS).boobsImplant > 1000>>
					massive, <<print getSlave($AS).boobsImplant>>cc
				<<elseif getSlave($AS).boobsImplant > 800>>
					giant, <<print getSlave($AS).boobsImplant>>cc
				<<elseif getSlave($AS).boobsImplant > 600>>
					huge, <<print getSlave($AS).boobsImplant>>cc
				<<elseif getSlave($AS).boobsImplant > 400>>
					large, <<print getSlave($AS).boobsImplant>>cc
				<<elseif getSlave($AS).boobsImplant > 200>>
					moderate, <<print getSlave($AS).boobsImplant>>cc
				<<elseif getSlave($AS).boobsImplant > 0>>
					small, <<print getSlave($AS).boobsImplant>>cc
				<</if>>
				<<if getSlave($AS).boobsImplantType != "normal">>
					<<= getSlave($AS).boobsImplantType>>
				<</if>>
				breast implants.
				<<if getSlave($AS).boobsImplant > 8000 && getSlave($AS).boobsImplantType == "string">>
					Large string based implants are a risk to a slave's health.
				<</if>>
			<<else>>
				no implants.
			<</if>>

				<<set _surgeries = App.Medicine.Surgery.sizingProcedures.boobs(getSlave($AS), App.Medicine.Surgery.allSizingOptions())>>
				<<set _surgeryLinks = _surgeries.map(s => App.Medicine.Surgery.makeLink("Surgery Degradation", s, getSlave($AS)))>>
				<<= _surgeryLinks.join(' | ')>>

			<<if getSlave($AS).boobsImplant != 0>>
				The shape of $his breasts is determined by $his implants.
			<<else>>
				<<if getSlave($AS).boobs <= 250>>
					$He's so flat-chested that $his breasts don't have much shape.
				<<else>>
					<<switch getSlave($AS).boobShape>>
						<<case "perky">>
							They're perky, with nipples that point slightly upwards.
						<<case "downward-facing">>
							They're not attractively shaped; $his nipples pointing downward.
						<<case "torpedo-shaped">>
							They're torpedo-shaped, projecting some way from $his chest.
						<<case "wide-set">>
							They're wide-set, with nipples pointing away from $his sternum.
						<<case "saggy">>
							They're not attractively shaped, with $his nipples pointing down.
						<<default>>
							They're nicely rounded and rest naturally.
					<</switch>>

						<<if getSlave($AS).indentureRestrictions >= 2>>
							$His indenture does not allow breast restructuring
						<<elseif getSlave($AS).breastMesh == 1>>
							$His supportive mesh implant prevents reconstruction
						<<else>>
							<<if (getSlave($AS).boobShape == "saggy") || (getSlave($AS).boobShape == "downward-facing")>>
								[[Breast lift|Surgery Degradation][getSlave($AS).boobShape = "normal", surgeryDamage(getSlave($AS),20),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "breastLift"]]<<if getSlave($AS).preg > getSlave($AS).pregData.normalBirth/1.42 || (getSlave($AS).boobs >= 5000 && getSlave($AS).boobs < 8000)>> $His current state may result in $his breasts becoming saggy again<</if>>
							<<else>>
								<<if (getSlave($AS).boobShape == "normal")>>
									[[Reshape them to be perkier|Surgery Degradation][getSlave($AS).boobShape = "perky",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastReconstruction"]]
									| [[Make them torpedo-shaped|Surgery Degradation][getSlave($AS).boobShape = "torpedo-shaped",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastReconstruction"]]
								<<else>>
									[[Reshape them to be more normal|Surgery Degradation][getSlave($AS).boobShape = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastReconstruction"]]
								<</if>>
								<<if (getSlave($AS).boobShape != "saggy") && (getSlave($AS).boobShape != "downward-facing") && (getSlave($AS).boobs >= 2000) && (getSlave($AS).boobsImplant == 0) && ($meshImplants == 1) && ($surgeryUpgrade == 1)>>
									| [[Implant a supportive mesh to preserve their shape|Surgery Degradation][getSlave($AS).breastMesh = 1,cashX(forceNeg($surgeryCost*(getSlave($AS).boobs/100)), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastShapePreservation"]]
								<</if>>
							<</if>>
						<</if>>

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

		/* Nipples*/

			<<if $surgeryUpgrade == 1>>
				$He has <<= getSlave($AS).nipples>> nipples.

					<<if getSlave($AS).indentureRestrictions >= 2>>
						$His indenture forbids elective surgery
					<<elseif getSlave($AS).indentureRestrictions == 1>>
						$His indenture forbids extreme body modification
					<<else>> /* split for possible dicknips later on, should lcd wish to attempt it again. */
						<<if getSlave($AS).nipples == "fuckable">>
							[[Restore their shape and function|Surgery Degradation][getSlave($AS).nipples = "huge",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]]
						<<else>>
							<<if getSlave($AS).boobs-getSlave($AS).boobsMilk < 500>>
								$His breasts are too small to support reshaping $his nipples to be penetratable
							<<elseif getSlave($AS).boobs-getSlave($AS).boobsImplant-getSlave($AS).boobsMilk < 500>>
								$His implants are too large to support reshaping $his nipples to be penetratable
							<<elseif getSlave($AS).nipples != "huge">>
								$His nipples are too small to be made fuckable
							<<else>>
								[[Reshape them to support being penetrated|Surgery Degradation][getSlave($AS).nipples = "fuckable",getSlave($AS).nipplesPiercing = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "nippleCunts"]]<<if getSlave($AS).nipplesPiercing > 0>> Will remove piercings.<</if>>
							<</if>>
						<</if>>
					<</if>>

			<</if>>

		/*Areolae*/

			<<if getSlave($AS).areolae == 0>>
				$His areolae are small
				<<if getSlave($AS).areolaeShape != "circle">>
					and have been surgically altered to be <<= getSlave($AS).areolaeShape>>-shaped.
				<<else>>
					and fairly normal.
				<</if>>
			<<elseif getSlave($AS).areolae == 1>>
				$His areolae are large
				<<if getSlave($AS).areolaeShape != "circle">>
					and have been surgically altered to be <<= getSlave($AS).areolaeShape>>-shaped.
				<<else>>
					but still fairly normal.
				<</if>>
			<<elseif getSlave($AS).areolae > 1>>
				$He has
				<<if getSlave($AS).areolae == 2>>
					wide
				<<elseif getSlave($AS).areolae == 3>>
					huge
				<<elseif getSlave($AS).areolae == 4>>
					massive
				<</if>>
				areolae<<if getSlave($AS).areolaeShape != "circle">>, which have been surgically altered to be <<= getSlave($AS).areolaeShape>>-shaped<</if>>.
			<</if>>
			<<if getSlave($AS).indentureRestrictions < 2>>
				<<if getSlave($AS).areolaeShape != "circle">>
					$His <<= getSlave($AS).areolaeShape>>-shaped areolae can be normalized or reshaped:

						[[Normal|Surgery Degradation][getSlave($AS).areolaeShape = "circle",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]]
						<<if getSlave($AS).areolaeShape != "heart">>
							| [[Heart-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "heart",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]]
						<</if>>
						<<if getSlave($AS).areolaeShape != "star">>
							| [[Star-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "star",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] |
						<</if>>

				<</if>>
				<<if (getSlave($AS).areolae > 0) && (getSlave($AS).areolaeShape == "circle")>>
					They are big enough that they could be reshaped into a pattern. Graft skin to make $his areolae:
				<</if>>

					<<if (getSlave($AS).areolae > 0) && (getSlave($AS).areolaeShape == "circle")>>
						[[Heart-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "heart",getSlave($AS).areolae -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]]
						| [[Star-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "star",getSlave($AS).areolae -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]]
					<</if>>
					<<if getSlave($AS).areolae > 0>>
						| [[Reduce areolae|Surgery Degradation][getSlave($AS).areolae -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]]
					<</if>>
					<<if getSlave($AS).areolae > 0>>|<</if>>
					<<if getSlave($AS).areolae < 4>>
						[[Enlarge areolae|Surgery Degradation][getSlave($AS).areolae += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]]
					<</if>>

			<</if>>

		/*Lactation*/

			<<if getSlave($AS).lactation == 0>>
				$He is not lactating.
			<<elseif getSlave($AS).lactation == 2>>
				$He is implanted with slow-release pro-lactation drugs.
			<<else>>
				$He is lactating naturally.
			<</if>>

				<<if getSlave($AS).lactation < 2>>
					<<if getSlave($AS).indentureRestrictions < 2>>
						[[Implant slow-release pro-lactation drugs|Surgery Degradation][getSlave($AS).lactation = 2, getSlave($AS).lactationDuration = 2, getSlave($AS).induceLactation = 0, getSlave($AS).boobs -= getSlave($AS).boobsMilk, getSlave($AS).boobsMilk = 0, getSlave($AS).rules.lactation = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "lactation"]] This may increase $his natural breast size
					<</if>>
				<</if>>
				<<if getSlave($AS).lactation > 1>>
					| [[Remove lactation implant|Surgery Degradation][getSlave($AS).lactation = 0, getSlave($AS).lactationDuration = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "endlac"]]
				<</if>>

Midrif:

		/*Fat*/

			<<if getSlave($AS).indentureRestrictions >= 2 && getSlave($AS).weight > 30>>
				$His indenture forbids elective surgery
			<<elseif getSlave($AS).weight > 30>>
				<<if getSlave($AS).weight > 190>>
					$He is extremely fat. [[Major liposuction|Surgery Degradation][surgeryDamage(getSlave($AS),40), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "liposuction"]]
				<<elseif getSlave($AS).weight > 130>>
					$He is fat. [[Heavy liposuction|Surgery Degradation][surgeryDamage(getSlave($AS),20), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "liposuction"]]
				<<elseif getSlave($AS).weight > 30>>
					$He is overweight. [[Liposuction|Surgery Degradation][surgeryDamage(getSlave($AS),10), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "liposuction"]]
				<</if>>
				<<if $surgeryUpgrade == 1>>
					| [[Fat grafting|fat grafting workaround][surgeryDamage(getSlave($AS),40), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))*2, $availableFat = Math.round(getSlave($AS).weight/10), $boobFat = 0, $buttFat = 0, $surgeryType = "fat graft"]]
				<</if>>
			<</if>>

		/*Also fat*/

			$He has
			<<if getSlave($AS).waist > 95>>a masculine
			<<elseif getSlave($AS).waist > 40>>an ugly
			<<elseif getSlave($AS).waist > 10>>an unattractive
			<<elseif getSlave($AS).waist >= -10>>an average
			<<elseif getSlave($AS).waist >= -40>>a feminine
			<<elseif getSlave($AS).waist >= -95>>an hourglass
			<<else>>an absurd
			<</if>>
			waist.
			<<if getSlave($AS).waist >= -75>>
				<<if getSlave($AS).indentureRestrictions < 2>>
					[[Liposuction|Surgery Degradation][getSlave($AS).waist -= 20,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "lipo"]]
				<</if>>
			<</if>>
			<<if (getSlave($AS).waist >= -95) && (getSlave($AS).waist < -75) && ($seeExtreme == 1)>>
				<<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
					[["Remove ribs to severely narrow " + $his + " waist"|Surgery Degradation][getSlave($AS).waist = -100,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "ribs"]]
				<</if>>
			<</if>>

		/*Belly*/

			$He's
			<<if getSlave($AS).pregKnown > 0>>
				pregnant.
			<<elseif getSlave($AS).womb.length == 0 && getSlave($AS).broodmother > 0>>
				got a dormant broodmother implant in $his womb.
			<<elseif getSlave($AS).preg > 0>>
				showing unusual discomfort as $his stomach is inspected. A quick test reveals that $he is pregnant.
				<<set getSlave($AS).pregKnown = 1>>
			<<elseif getSlave($AS).bellyImplant > 0>>
				got a <<print getSlave($AS).bellyImplant>>cc implant filled implant located in $his abdomen.
				<<if getSlave($AS).cervixImplant == 1 >>
					$He also has micropump filter installed in $his cervix feeding into the implant.
				<<elseif getSlave($AS).cervixImplant == 2>>
					$He also has micropump filter installed in $his rectum feeding into the implant.
				<<elseif getSlave($AS).cervixImplant == 3>>
					$He also has micropump filter installed in both $his holes feeding into the implant.
				<</if>>
			<<elseif getSlave($AS).bellyFluid >= 1500>>
				got a <<print getSlave($AS).inflationType>>-filled implant located in $his abdomen.
				<<if getSlave($AS).cervixImplant == 1 >>
					$He also has micropump filter installed in $his cervix feeding into the implant.
				<<elseif getSlave($AS).cervixImplant == 2>>
					$He also has micropump filter installed in $his rectum feeding into the implant.
				<<elseif getSlave($AS).cervixImplant == 3>>
					$He also has micropump filter installed in both $his holes feeding into the implant.
				<</if>>
			<<elseif getSlave($AS).bellyImplant == 0>>
				got an empty fillable implant located in $his abdomen.
				<<if getSlave($AS).cervixImplant == 1 >>
					$He also has micropump filter installed in $his cervix feeding into the implant.
				<<elseif getSlave($AS).cervixImplant == 2>>
					$He also has micropump filter installed in $his rectum feeding into the implant.
				<<elseif getSlave($AS).cervixImplant == 3>>
					$He also has micropump filter installed in both $his holes feeding into the implant.
				<</if>>
			<<else>>
				got a normal stomach.
			<</if>>

				<<if getSlave($AS).indentureRestrictions >= 2>>
					$His indenture forbids elective surgery
				<<elseif getSlave($AS).breedingMark == 1 && $propOutcome == 1 && $eugenicsFullControl != 1 && $arcologies[0].FSRestart != "unset">>
					You are forbidden from affecting $his fertility
				<<elseif getSlave($AS).preg > 0 || getSlave($AS).inflation > 0 || getSlave($AS).broodmother > 0>>
					$He is unable to support an abdominal implant at this time
				<<elseif getSlave($AS).bellyImplant >= 750000>>
					$His abdominal implant is so far beyond its maximum limit it is at risk of rupturing
				<<elseif getSlave($AS).bellyImplant >= 600000>>
					$His abdominal implant is greatly beyond its maximum limit
				<<elseif getSlave($AS).bellyImplant >= 450000>>
					$His abdominal implant is over-filled
				<<elseif getSlave($AS).bellyImplant >= 400000>>
					$His abdominal implant is at its capacity
				<<elseif getSlave($AS).bellyImplant > 130000 && $arcologies[0].FSTransformationFetishistResearch != 1>>
					$His abdominal implant is at its capacity
				<<elseif getSlave($AS).bellyImplant == -1 && (getSlave($AS).ovaries == 1 || getSlave($AS).mpreg == 1) && $bellyImplants == 1>>
					[[Implant fillable abdominal implant|Surgery Degradation][getSlave($AS).bellyImplant = 0,getSlave($AS).preg = -2, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "bellyIn"]]
				<<elseif getSlave($AS).bellyImplant == -1 && $bellyImplants == 1>>
					[[Implant a fillable abdominal implant|Surgery Degradation][getSlave($AS).bellyImplant = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), getSlave($AS).bellyPain += 2, surgeryDamage(getSlave($AS),50), $surgeryType = "bellyInMale"]]
				<<elseif getSlave($AS).bellyPain == 2>>
					$His body cannot handle more filler this week
				<<elseif getSlave($AS).bellyImplant > -1 && getSlave($AS).bellyPain == 0>>
					[[Add inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 200, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "bellyUp"]]
					| [[Add a considerable amount of inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 500, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "bellyUp"]]
				<<elseif getSlave($AS).bellyImplant > -1 && getSlave($AS).bellyPain == 1>>
					[[Add more inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 200, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),30),$surgeryType = "bellyUp"]]
					| [[Add a considerable amount of inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 500, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "bellyUp"]]<<if getSlave($AS).health.health < 0>>This may cause severe health issues<</if>>
				<</if>>
				<<if getSlave($AS).bellyImplant > -1>>
					| [[Drain implant|Surgery Degradation][getSlave($AS).bellyImplant -= 200,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "bellyDown"]]
					<<if getSlave($AS).bellyImplant >= 500>>
						| [[Greatly drain implant|Surgery Degradation][getSlave($AS).bellyImplant -= 500, surgeryDamage(getSlave($AS),5),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "bellyDown"]]
					<</if>>
					<<if getSlave($AS).indentureRestrictions < 2>>
						| [[Remove implant|Surgery Degradation][getSlave($AS).bellyImplant = -1, getSlave($AS).cervixImplant = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "bellyOut"]]
						<<if getSlave($AS).cervixImplant != 1 && getSlave($AS).cervixImplant != 3 && $cervixImplants >= 1 && getSlave($AS).vagina > -1>> /* slave should have vagina */

								[[Install cervix micropump filter|Surgery Degradation][getSlave($AS).cervixImplant = (getSlave($AS).cervixImplant==0?1:3), surgeryDamage(getSlave($AS), 5), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "cervixPump"]]
								Will allow $his belly implant to slowly swell as people cum in $his vagina

						<</if>>
						<<if getSlave($AS).cervixImplant != 2 && getSlave($AS).cervixImplant != 3 && $cervixImplants == 2>>

								[[Install rectal micropump filter|Surgery Degradation][getSlave($AS).cervixImplant = (getSlave($AS).cervixImplant==0?2:3), surgeryDamage(getSlave($AS), 20), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "cervixPumpA"]]
								Will allow $his belly implant to slowly swell as people cum in $his anus

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

		/* Uterine Implants */

			<<if getSlave($AS).wombImplant == "none" && ($UterineRestraintMesh == 1) && (getSlave($AS).ovaries == 1 || getSlave($AS).mpreg == 1)>>
				$He has a normal uterus<<if getSlave($AS).mpreg == 1>>, though slightly repositioned<</if>>.
				<<if getSlave($AS).indentureRestrictions >= 1>>
					$His indenture forbids invasive elective surgery
				<<elseif getSlave($AS).bellyImplant > 0 || getSlave($AS).preg > 0>>
					$His womb is currently in use and unsafe to operate on
				<<else>>
					<<if $surgeryUpgrade == 1>>
						<<if $UterineRestraintMesh == 1>>
							[[Install reinforcing organic mesh|Surgery Degradation][getSlave($AS).wombImplant = "restraint", surgeryDamage(getSlave($AS),25), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "womb"]]
						<</if>>
					<</if>>
				<</if>>
			<<elseif getSlave($AS).wombImplant == "restraint">>
				$He has a mesh reinforced uterus.
				<<if getSlave($AS).indentureRestrictions >= 1>>
					$His indenture forbids invasive elective surgery
				<<elseif getSlave($AS).bellyImplant > 0 || getSlave($AS).preg > 0>>
					$His womb is currently in use and unsafe to operate on
				<<else>>
					[[Remove organic mesh|Surgery Degradation][getSlave($AS).wombImplant = "none", surgeryDamage(getSlave($AS),50), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "womb"]]<<if getSlave($AS).health.health < 0>>This may cause severe health issues<</if>>
				<</if>>
			<</if>>

		/*Belly sag*/

			<<if getSlave($AS).bellySagPreg > 0>>
				<<if getSlave($AS).belly >= 1500>>
					$He has a sagging midriff, ruined from excessive pregnancy. It is currently filled out by $his swollen belly and cannot safely be worked on.
				<<else>>
					$He has a sagging midriff, ruined from excessive pregnancy.
					[[Tummy tuck|Surgery Degradation][getSlave($AS).bellySag = 0,getSlave($AS).bellySagPreg = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "tummyTuck"]]
				<</if>>
			<<elseif getSlave($AS).bellySag > 0>>
				<<if getSlave($AS).belly >= 1500>>
					$He has a sagging midriff, ruined from excessive distention. It is currently filled out by $his swollen belly and cannot safely be worked on.
				<<else>>
					$He has a sagging midriff, ruined from excessive distention.
					[[Tummy tuck|Surgery Degradation][getSlave($AS).bellySag = 0,getSlave($AS).bellySagPreg = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "tummyTuck"]]
				<</if>>
			<</if>>

		/*Csec*/

			<<if (getSlave($AS).scar.hasOwnProperty("belly") && getSlave($AS).scar.belly.hasOwnProperty("c-section"))>>
				<<if getSlave($AS).scar.belly["c-section"] > 0>>
					$He has an unsightly c-section scar.
					<<link "Remove Caesarean scar">>
						<<run App.Medicine.Modification.removeScar(getSlave($AS), "belly", "c-section")>>
						<<run cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 10)>>
						<<set $surgeryType = "bellyscar">>
						<<goto "Surgery Degradation">>
					<</link>>
				<</if>>
			<</if>>

		/* 000-250-006 */
		<<if $seeImages == 1>>
			<<if $imageChoice == 1>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<<else>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<</if>>
		<</if>>
		/* 000-250-006 */

Butt:

			$He's got a
			<<if getSlave($AS).butt <= 1>>flat and <<print either("skinny", "slim", "taut")>> ass.
			<<elseif getSlave($AS).butt <= 2>><<print either("rounded, small", "small but rounded", "small, sleek")>> rear end.
			<<elseif getSlave($AS).butt <= 3>><<print either("big and healthy", "curved and plump", "healthy and plump")>> derrière.
			<<elseif getSlave($AS).butt <= 4>><<print either("big bubble", "curvy and enticing", "juicy and large")>> butt.
			<<elseif getSlave($AS).butt <= 5>><<print either("huge", "juicy and huge", "massive and undeniable")>> rear end.
			<<elseif !hasBothLegs(getSlave($AS))>>ridiculous ass. It's so big it would jiggle as $he walked — if $he could walk.
			<<else>>ridiculous ass. It's so big it jiggles as $he walks.
			<</if>>

			<<if getSlave($AS).buttImplant > 0>>
				$He has
				<<if getSlave($AS).buttImplantType == "string">>
					<<if getSlave($AS).buttImplant > 2>>
						massively engorged
					<</if>>
				<<elseif getSlave($AS).buttImplantType == "normal">>
					<<if getSlave($AS).buttImplant == 1>>
						moderate
					<<elseif getSlave($AS).buttImplant == 2>>
						enormous
					<<else>>
						absurd
					<</if>>
				<<elseif getSlave($AS).buttImplantType == "hyper fillable">>
					<<if getSlave($AS).buttImplant > 19>>
						overfilled
					<<elseif getSlave($AS).buttImplant < 9>>
						underfilled
					<<elseif getSlave($AS).buttImplant <= 5>>
						deflated
					<<else>>
						absurd
					<</if>>
				<<elseif getSlave($AS).buttImplantType == "advanced fillable">>
					<<if getSlave($AS).buttImplant > 8>>
						overfilled
					<<elseif getSlave($AS).buttImplant < 5>>
						underfilled
					<<elseif getSlave($AS).buttImplant <= 3>>
						deflated
					<<else>>
						massive
					<</if>>
				<<elseif getSlave($AS).buttImplantType == "fillable">>
					<<if getSlave($AS).buttImplant > 4>>
						overfilled
					<<elseif getSlave($AS).buttImplant < 3>>
						underfilled
					<<elseif getSlave($AS).buttImplant == 1>>
						deflated
					<<else>>
						massive
					<</if>>
				<</if>>
				<<if getSlave($AS).buttImplantType != "normal">>
					<<= getSlave($AS).buttImplantType>>
				<</if>>
				butt implants.
				<<if getSlave($AS).buttImplant > 3 && getSlave($AS).buttImplantType == "string">>
					Large string based implants are a risk to a slave's health.
				<</if>>
			<</if>>

				<<set _surgeries = App.Medicine.Surgery.sizingProcedures.butt(getSlave($AS), App.Medicine.Surgery.allSizingOptions())>>
				<<set _surgeryLinks = _surgeries.map(s => App.Medicine.Surgery.makeLink("Surgery Degradation", s, getSlave($AS)))>>
				<<= _surgeryLinks.join(' | ')>>

		/*Asshole*/

			$He has
			<<if getSlave($AS).anus == 0>>
				a virgin asshole.
			<<elseif getSlave($AS).anus == 1>>
				a tight asshole.
			<<elseif getSlave($AS).anus == 2>>
				a loose asshole.
			<<elseif getSlave($AS).anus == 3>>
				a very loose asshole.
			<<else>>
				a permanently gaping asshole.
			<</if>>

		/*Pucker up*/

			<<if (getSlave($AS).anus > 3)>>
				$His anal sphincter could benefit from surgical repair.

					[[Repair asshole|Surgery Degradation][getSlave($AS).anus = 3,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "anus"]] This will reduce $his anal skills

			<<elseif ($surgeryUpgrade == 1) && (getSlave($AS).indentureRestrictions < 2)>>
				<<if (getSlave($AS).anus > 1)>>
					$His anal sphincter could benefit from microsurgical rejuvenation.

						[[Tighten asshole|Surgery Degradation][getSlave($AS).anus = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "anus"]] This will reduce $his anal skills

				<<elseif (getSlave($AS).anus > 0)>>
					$His butthole is fairly narrow, but could be tightened to virgin status.

						[[Restore anal virginity|Surgery Degradation][getSlave($AS).anus = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "anus"]] This will reduce $his anal skills

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

Sex:

		/*Female sex*/

			<<if getSlave($AS).vagina > -1>>
				<<if getSlave($AS).labia == 0>>
					$He has minimal pussylips.
				<<elseif getSlave($AS).labia == 1>>
					$He has pretty, noticeable pussylips.
				<<elseif getSlave($AS).labia == 2>>
					$He has large pussylips.
				<<elseif getSlave($AS).labia > 2>>
					$He has extremely large pussylips.
				<</if>>
				<<if getSlave($AS).labia > 0>>
					<<if getSlave($AS).indentureRestrictions < 2>>
						[[Apply labiaplasty|Surgery Degradation][getSlave($AS).labia = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "labiaplasty"]]
					<</if>>
				<</if>>
				<<if (getSlave($AS).labia < 3) && ($surgeryUpgrade == 1)>>
					<<if getSlave($AS).indentureRestrictions < 1>>
						<<if getSlave($AS).labia > 0>> | <</if>>
						[[Increase labia|Surgery Degradation][getSlave($AS).labia += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "labiaplasty"]]
					<</if>>
				<</if>>

					<<if getSlave($AS).dick == 0>>
						$He has
						<<if getSlave($AS).clit == 0>>
							a small clit<<if ($seeCircumcision == 1) && getSlave($AS).foreskin > 0>> with a hood<</if>>.
						<<elseif getSlave($AS).clit == 1>>
							a big clit<<if ($seeCircumcision == 1) && getSlave($AS).foreskin > 0>> with a hood<</if>>.
						<<elseif getSlave($AS).clit == 2>>
							a huge clit<<if ($seeCircumcision == 1) && getSlave($AS).foreskin > 0>> with a hood<</if>>.
						<<elseif getSlave($AS).clit > 2>>
							an enormous clit<<if ($seeCircumcision == 1) && getSlave($AS).foreskin > 0>> with a hood<</if>>.
						<</if>>
						<<if getSlave($AS).clit > 0>>
							<<if getSlave($AS).indentureRestrictions < 2>>
								[[Apply clitoral reduction|Surgery Degradation][getSlave($AS).clit = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "clitoral reduction"]]
							<</if>>
						<</if>>
						<<if (getSlave($AS).clit < 3) && ($surgeryUpgrade == 1)>>
							<<if getSlave($AS).indentureRestrictions < 1>>
								<<if getSlave($AS).clit > 0>> | <</if>>
								[[Increase clit|Surgery Degradation][getSlave($AS).clit += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "clitoral enlargement"]]
							<</if>>
						<</if>>
						<<if (getSlave($AS).foreskin > 0) && getSlave($AS).clit > 0>>
							<<if $seeCircumcision == 1>>
								<<if getSlave($AS).indentureRestrictions < 2>>
									| [[Remove clitoral hood|Surgery Degradation][getSlave($AS).foreskin = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "circumcision"]]
								<</if>>
							<</if>>
						<</if>>

					<</if>>

			<</if>>

		/* TODO: add a check for slave's eggType */
		/*Fertility*/

			<<if (getSlave($AS).preg > -2) && (getSlave($AS).preg < 1) && (getSlave($AS).ovaries != 0 || getSlave($AS).mpreg != 0) && (getSlave($AS).pubertyXX == 0)>>
				$He has not had $his first period.
			<<elseif (getSlave($AS).preg > -2) && (getSlave($AS).preg < 1) && (getSlave($AS).ovaries != 0 || getSlave($AS).mpreg != 0)>>
				$He has a working womb.
			<<elseif (getSlave($AS).preg <= -2) && (getSlave($AS).ovaries != 0 || getSlave($AS).mpreg != 0)>>
				$He has a sterile womb.
			<</if>>

			<<if isFertile(getSlave($AS)) && getSlave($AS).preg == 0>>
				[[Artificially inseminate|Artificial Insemination]] |
			<</if>>

			<<if (getSlave($AS).preg > -2) && (getSlave($AS).preg < 1) && (getSlave($AS).ovaries != 0 || getSlave($AS).mpreg != 0)>>
				<<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
				[[Sterilize|Surgery Degradation][getSlave($AS).preg = -2,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "ster"]]
				<</if>>
			<<elseif (getSlave($AS).preg < 1) && (getSlave($AS).ovaries != 0 || getSlave($AS).mpreg != 0) && (getSlave($AS).preg != -3)>>
				[[Restore fertility|Surgery Degradation][getSlave($AS).preg = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "fert"]]
			<</if>>

			<<if (getSlave($AS).ovaries == 1 || getSlave($AS).mpreg == 1)>>

					<<if (getSlave($AS).pubertyXX == 0)>>
						$He has
						<<if (getSlave($AS).eggType != "human")>>
							<<print (getSlave($AS).eggType)>>
						<</if>>
						ovaries but has not had $his first period.
					<<else>>
						$He has working
						<<if (getSlave($AS).eggType != "human")>>
							<<print (getSlave($AS).eggType)>>
						<</if>>
						ovaries<<if getSlave($AS).mpreg>> and a womb attached to $his rectum<</if>>.
					<</if>>

					<<if getSlave($AS).indentureRestrictions > 0>>
						$His indenture forbids invasive elective surgery
					<<else>>
						<<if getSlave($AS).ovaImplant != 0>>
							<<switch getSlave($AS).ovaImplant>>
							<<case "fertility">>
								They have fertility implants attached to them.
								[[Remove implants|Surgery Degradation][getSlave($AS).ovaImplant = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "ovaImplant removed"]]
							<<case "sympathy">>
								They are linked via implants and ovulate in concert.
								[[Remove implants|Surgery Degradation][getSlave($AS).ovaImplant = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "ovaImplant removed"]]
							<<case "asexual">>
								One has been replaced with a sperm producing analog for self-fertilization.
							<</switch>>
						<<else>>
							<<if $fertilityImplant == 1>>
								[[Install fertility implants|Surgery Degradation][getSlave($AS).ovaImplant = "fertility",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "ovaImplant added"]]
							<</if>>
							<<if $fertilityImplant || $sympatheticOvaries>>

							<</if>>
							<<if $sympatheticOvaries == 1>>
								[[Install sympathetic ovulation implants|Surgery Degradation][getSlave($AS).ovaImplant = "sympathy",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "ovaImplant added"]]
							<</if>>
						<</if>>
					<</if>>

				<<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
					<<if getSlave($AS).ovaries == 1>>
						<<if getSlave($AS).preg > 0>>
							$His ovaries and womb cannot be removed while $he is pregnant.
						<<else>>
							[[Oophorectomy|Surgery Degradation][getSlave($AS).ovaries = 0,getSlave($AS).ovaImplant = 0,getSlave($AS).wombImplant = "none",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "ster"]]
						<</if>>
					<</if>>
					<<if getSlave($AS).mpreg == 1>>
						<<if getSlave($AS).preg > 0>>
							$His anal womb cannot be removed while $he is pregnant.
						<<else>>
							[[Remove anal reproductive organs|Surgery Degradation][getSlave($AS).mpreg = 0,getSlave($AS).ovaImplant = 0, getSlave($AS).wombImplant = "none",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),30),$surgeryType = "mpreg removed"]]
						<</if>>
					<</if>>
				<</if>>

				<<if $seeExtreme == 1 && $seeHyperPreg == 1 && $seePreg != 0 && $permaPregImplant == 1>>

						<<if getSlave($AS).assignment == "work in the dairy" && $dairyPregSetting > 0>>
							$His womb is already rented out for the production of calves.
						<<elseif getSlave($AS).broodmother > 0>>
							$He has been made into a
							<<if getSlave($AS).broodmother > 1>>hyper-<</if>>broodmother.
							<<if getSlave($AS).womb.length == 0 >>

									[[Remove the pregnancy generator|Surgery Degradation][getSlave($AS).preg = 0,getSlave($AS).pregWeek = -1,getSlave($AS).pregSource = 0,getSlave($AS).pregKnown = 0,getSlave($AS).pregType = 0,getSlave($AS).broodmother = 0,getSlave($AS).broodmotherFetuses = 0,getSlave($AS).broodmotherOnHold = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),getSlave($AS).pregControl = "none",surgeryDamage(getSlave($AS),10),$surgeryType = "pregRemove"]]

							<<else>>
								$He is pregnant right now, so $his broodmother implant can't be safely extracted.

									<<if getSlave($AS).broodmother == 1 && getSlave($AS).broodmotherFetuses == 1 && $PGHack == 1>> /*hack can be applied only one time, for type 1 broodmothers, and only if implant already present*/
										[[Hack the pregnancy generator|Surgery Degradation][cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),getSlave($AS).pregControl = "none",surgeryDamage(getSlave($AS),1),$surgeryType = "preg1hack"]] This will trick the generator ova release logic, forcing it to release more than one ova each week. This is an untested override and can cause severe health problems.
									<<elseif getSlave($AS).broodmother == 1 && getSlave($AS).broodmotherFetuses > 1>>
										The implant firmware has already been adjusted.
									<</if>>

							<</if>>
						<<elseif getSlave($AS).indentureRestrictions > 0 || (getSlave($AS).breedingMark == 1 && $propOutcome == 1 && $eugenicsFullControl != 1 && $arcologies[0].FSRestart != "unset")>>
							$He is protected from extreme surgery
						<<elseif isFertile(getSlave($AS)) && getSlave($AS).ovaryAge <= 46>>
							$He could be made into a broodmother.

								[[Implant a pregnancy generator|Surgery Degradation][getSlave($AS).preg = 1,getSlave($AS).pregWeek = 1,getSlave($AS).pregKnown = 1,getSlave($AS).pregType = 1,getSlave($AS).broodmother = 1,getSlave($AS).broodmotherFetuses = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),getSlave($AS).pregControl = "none",surgeryDamage(getSlave($AS),10),$surgeryType = "preg"]] This will have severe effects on $his health and mind

						<<else>>
							$His body cannot support being a broodmother.
						<</if>>

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

		/*Sex description*/

			<<if (getSlave($AS).dick == 0) && (getSlave($AS).vagina == -1)>>
				$He is a null, possessing neither penis nor vagina.
			<<elseif (getSlave($AS).dick != 0)>>
				$He has
				<<if ($seeCircumcision == 1)>>
					<<if (getSlave($AS).foreskin == 0)>>
						a circumcised
					<<elseif (getSlave($AS).foreskin >= 1)>>
						an uncircumcised
					<</if>>
				<<else>>
					a
				<</if>>
				<<if (getSlave($AS).vagina == -1)>>
					penis.
				<<elseif (getSlave($AS).ovaries != 0)>>
					penis and a
				<<elseif (getSlave($AS).vagina != -1)>>
					penis and a<<if getSlave($AS).genes == "XY">>n artificial<</if>>
				<</if>>
			<<elseif (getSlave($AS).dick == 0)>>
				$He has a
			<</if>>

			<<if getSlave($AS).vagina > -1>>
				<<if getSlave($AS).vagina == 0>>
					virgin pussy.
				<<elseif getSlave($AS).vagina == 1>>
					tight pussy.
				<<elseif getSlave($AS).vagina == 2>>
					used pussy.
				<<elseif getSlave($AS).vagina == 3>>
					loose pussy.
				<<elseif getSlave($AS).vagina == 10>>
					ruined cunt.
				<<else>>
					gaping cunt.
				<</if>>
			<</if>>

			<<if (getSlave($AS).dick != 0) && ((getSlave($AS).ovaries != 0) || (getSlave($AS).vagina != -1))>>
				It's possible to remove either and leave $him sexually functional.
			<</if>>

				<<if getSlave($AS).vagina > -1>>
					<<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
						[[Remove pussy|Surgery Degradation][surgeryAmp(getSlave($AS), "vagina"), $surgeryType = "vaginaRemoval", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))]]
						<<if getSlave($AS).ovaries == 1>>

								This will remove $his ovaries as well

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

				<<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
					<<if (getSlave($AS).vagina == -1) && (getSlave($AS).dick != 0)>>
						| [[Convert genitalia to female|Surgery Degradation][getSlave($AS).dick = 0,getSlave($AS).dickAccessory = "none",getSlave($AS).chastityPenis = 0,getSlave($AS).dickTat = 0,getSlave($AS).foreskin = 0,getSlave($AS).scrotum = 0,getSlave($AS).balls = 0,getSlave($AS).ballType = "human",getSlave($AS).vasectomy = 0,getSlave($AS).vagina = 0,getSlave($AS).preg = -2,getSlave($AS).skill.vaginal = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), $surgeryType = "mtf"]]
					<</if>>
					<<if (getSlave($AS).vagina == -1) && (getSlave($AS).dick == 0) && ($surgeryUpgrade == 1)>>
						| [[Create a vagina|Surgery Degradation][getSlave($AS).vagina = 0,getSlave($AS).skill.vaginal = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), $surgeryType = "ntf"]]
					<</if>>
					<<if (getSlave($AS).dick > 0) && ($seeExtreme == 1)>>
						| [[Remove penis|Surgery Degradation][surgeryAmp(getSlave($AS), "dick"), $surgeryType = "chop", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))]]
					<</if>>
					<<if (getSlave($AS).foreskin > 0) && getSlave($AS).dick > 0>>
						<<if getSlave($AS).indentureRestrictions < 2>>
							<<if $seeCircumcision == 1>>
								| [[Remove foreskin|Surgery Degradation][getSlave($AS).foreskin = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "circumcision"]]
							<</if>>
							<<if getSlave($AS).foreskin - getSlave($AS).dick > 0>>
								| [[Remove excess foreskin|Surgery Degradation][getSlave($AS).foreskin = getSlave($AS).dick,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "foreskinTuck"]]
							<</if>>
						<</if>>
					<</if>>
				<</if>>

				<<if (getSlave($AS).dick != 0) && (getSlave($AS).vagina == -1) && ($surgeryUpgrade == 1)>>
					<<if getSlave($AS).indentureRestrictions < 1>>
						| [[Create surgical hermaphrodite|Surgery Degradation][getSlave($AS).vagina = 0,getSlave($AS).skill.vaginal = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), $surgeryType = "herm"]]
					<</if>>
				<</if>>

		/*Extra sex surgery*/

			<<if (getSlave($AS).vagina > 3)>>
				$His vagina could benefit from surgical repair.

					[[Repair pussy|Surgery Degradation][getSlave($AS).vagina = 3,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "vagina"]] This will reduce $his vaginal skills

			<<elseif ($surgeryUpgrade == 1) && (getSlave($AS).indentureRestrictions < 2)>>
				<<if (getSlave($AS).vagina > 1)>>
					$His vaginal muscles could benefit from microsurgical rejuvenation.

						[[Tighten pussy|Surgery Degradation][getSlave($AS).vagina = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "vagina"]] This will reduce $his vaginal skills

				<<elseif (getSlave($AS).vagina > 0)>>
					$His pussy is as tight as a virgin's, and $his hymen could be restored.

						[[Restore virginity|Surgery Degradation][getSlave($AS).vagina = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "vagina"]] This will reduce $his vaginal skills

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

		<<if (getSlave($AS).balls > 0)>>

				<<if (getSlave($AS).balls == 1)>>
					$His testicles are vestigial, but $he has balls. Technically. They are
				<<elseif (getSlave($AS).balls > 1)>>
					$He has testicles
				<</if>>
				<<if (getSlave($AS).scrotum > 0)>>
					located in $his scrotum.
				<<else>>
					<<if (getSlave($AS).genes == "XY")>>
						relocated inside $his abdomen, and $his scrotum has been removed.
					<<else>>
						implanted inside $his abdomen.
					<</if>>
				<</if>>

					<<if (getSlave($AS).scrotum > 0)>>
						<<if getSlave($AS).indentureRestrictions < 2>>
							<<if getSlave($AS).scrotum - getSlave($AS).balls > 0>>
								[[Remove excess scrotal skin|Surgery Degradation][getSlave($AS).scrotum = getSlave($AS).balls,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "scrotalTuck"]]
								<<if getSlave($AS).indentureRestrictions < 1>> | <</if>>
							<</if>>
						<</if>>
						<<if getSlave($AS).indentureRestrictions < 1>>
							[[Move them inside abdomen and remove scrotum|Surgery Degradation][getSlave($AS).scrotum = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "relocate"]]
							This will have a negative impact on cum production
						<</if>>
					<</if>>
					<<if ($seeExtreme == 1)>>
						|
						[[Geld|Surgery Degradation][getSlave($AS).balls = 0,getSlave($AS).ballType = "human",getSlave($AS).scrotum = 0,getSlave($AS).vasectomy = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), $surgeryType = "geld"]]
					<</if>>
					<<if getSlave($AS).ballType != "sterile">>
						|
						[[Chemically castrate|Surgery Degradation][getSlave($AS).ballType = "sterile",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "chem castrate"]]
					<</if>>

				<<if (getSlave($AS).vasectomy == 1)>>
					$He has had a vasectomy and shoots blanks when $he cums<<if getSlave($AS).pubertyXY == 0 || getSlave($AS).ballType == "sterile">>, or would, if $he were potent<</if>>.

						[[Reverse vasectomy|Surgery Degradation][getSlave($AS).vasectomy = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "vasectomy undo"]]

				<<else>>
					<<if getSlave($AS).ballType == "sterile">>
						$He has non-functional testicles.
						<<if getSlave($AS).indentureRestrictions < 1>>

								[[Clamp vas deferens|Surgery Degradation][getSlave($AS).vasectomy = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "vasectomy"]]

						<</if>>
					<<else>>
						$He has working testicles<<if getSlave($AS).pubertyXY == 0>>, though $he isn't potent<</if>>.
						<<if getSlave($AS).indentureRestrictions < 1>>

								[[Clamp vas deferens to cull potency|Surgery Degradation][getSlave($AS).vasectomy = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "vasectomy"]]

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

	<</if>>

		/*Prostate*/

			<<if getSlave($AS).prostate>>
				$He has a
				<<if getSlave($AS).prostate > 2>>
					hyperactive, ejaculation enhancing
				<<elseif getSlave($AS).prostate > 1>>
					hyperactive
				<<else>>
					normal
				<</if>>
				prostate.

					<<if getSlave($AS).prostate >= 2 && $prostateImplants == 1>>
						<<if getSlave($AS).prostate < 3>>
							<<if getSlave($AS).indentureRestrictions < 2>>
								[[Implant prostate with an ejaculation boosting implant|Surgery Degradation][getSlave($AS).prostate = 3,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "ejaculation"]] This will thin $his ejaculate but greatly increase its quantity
							<</if>>
						<</if>>
						<<if getSlave($AS).prostate == 3>>
							| [[Remove ejaculation implant|Surgery Degradation][getSlave($AS).prostate = 2,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "endejac"]]
						<<elseif getSlave($AS).prostate == 2>>
							| [[Remove drug implant|Surgery Degradation][getSlave($AS).prostate=1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),$surgeryType="endprecum"]]
						<</if>>
					<<else>>
						<<if getSlave($AS).prostate > 1>>
							[[Remove drug implant|Surgery Degradation][getSlave($AS).prostate=1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),$surgeryType="endprecum"]]
						<</if>>
						<<if getSlave($AS).prostate < 2>>
							<<if getSlave($AS).indentureRestrictions < 2>>
								| [[Implant slow-release productivity drugs|Surgery Degradation][getSlave($AS).prostate=2,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS), 10),$surgeryType="precum"]] This may cause some leaking
							<</if>>
						<</if>>
					<</if>>
					<<if ($seeExtreme == 1)>>
						<<if getSlave($AS).indentureRestrictions < 1>>
							| [[Remove prostate|Surgery Degradation][getSlave($AS).prostate = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), $surgeryType = "prostate"]]
						<</if>>
					<</if>>

			<</if>>

		/* 000-250-006 */
		<<if $seeImages == 1>>
			<<if $imageChoice == 1>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<<else>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<</if>>
		<</if>>
		/* 000-250-006 */
		/*Race*/

			<<if getSlave($AS).indentureRestrictions < 1>>
				$He is <<= getSlave($AS).race>><<if getSlave($AS).race != getSlave($AS).origRace>>, but was originally <<= getSlave($AS).origRace>><</if>>. Surgically alter $him to look more:

					<<if getSlave($AS).race != "white">>
						[[White|Surgery Degradation][getSlave($AS).race = "white", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "latina">>
						[[Latina|Surgery Degradation][getSlave($AS).race = "latina", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "black">>
						[[Black|Surgery Degradation][getSlave($AS).race = "black", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "asian">>
						[[Asian|Surgery Degradation][getSlave($AS).race = "asian", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "middle eastern">>
						[[Middle Eastern|Surgery Degradation][getSlave($AS).race = "middle eastern", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "indo-aryan">>
						[[Indo-Aryan|Surgery Degradation][getSlave($AS).race = "indo-aryan", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "pacific islander">>
						[[Pacific Islander|Surgery Degradation][getSlave($AS).race = "pacific islander", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "malay">>
						[[Malay|Surgery Degradation][getSlave($AS).race = "malay", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "amerindian">>
						[[Amerindian|Surgery Degradation][getSlave($AS).race = "amerindian", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "southern european">>
						[[Southern European|Surgery Degradation][getSlave($AS).race = "southern european", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "semitic">>
						[[Semitic|Surgery Degradation][getSlave($AS).race = "semitic", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]] |
					<</if>>
					<<if getSlave($AS).race != "mixed race">>
						[[Mixed Race|Surgery Degradation][getSlave($AS).race = "mixed race", getSlave($AS).skin = randomRaceSkin(getSlave($AS).race), getSlave($AS).hColor = randomRaceHair(getSlave($AS).race), setEyeColor(getSlave($AS), randomRaceEye(getSlave($AS).race)), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "race"]]
					<</if>>

			<<else>>

$His indenture forbids elective surgery

			<</if>>

		/* 000-250-006 */
		<<if $seeImages == 1>>
			<<if $imageChoice == 1>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<<else>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<</if>>
		<</if>>
		/* 000-250-006 */
		/*Shoulder bones*/

			<<if getSlave($AS).indentureRestrictions < 1>>
				<<if (getSlave($AS).shoulders < -1)>>
					$He has very narrow shoulders.
				<<elseif (getSlave($AS).shoulders < 0)>>
					$He has narrow shoulders.
				<<elseif (getSlave($AS).shoulders < 1)>>
					$He has average shoulders.
				<<elseif (getSlave($AS).shoulders < 2)>>
					$He has broad shoulders.
				<<elseif (getSlave($AS).shoulders == 2)>>
					$He has very broad shoulders.
				<</if>>
				<<if (getSlave($AS).shouldersImplant == 0)>>
					$He has a natural shoulder structure.
				<<elseif (getSlave($AS).shouldersImplant > 3)>>
					$His shoulders have been completely rebuilt to be massively wider.
				<<elseif (getSlave($AS).shouldersImplant > 2)>>
					$His shoulders have been heavily restructured to broaden them.
				<<elseif (getSlave($AS).shouldersImplant > 1)>>
					$His shoulders have been repeatedly restructured to broaden them.
				<<elseif (getSlave($AS).shouldersImplant > 0)>>
					$His shoulders have been restructured to broaden them.
				<<elseif (getSlave($AS).shouldersImplant < -3)>>
					$His shoulders have been completely rebuilt to be massively narrower.
				<<elseif (getSlave($AS).shouldersImplant < -2)>>
					$His shoulders have been heavily restructured to narrow them.
				<<elseif (getSlave($AS).shouldersImplant < -1)>>
					$His shoulders have been repeatedly restructured to narrow them.
				<<elseif (getSlave($AS).shouldersImplant < 0)>>
					$His shoulders have been restructured to narrow them.
				<</if>>

					<<if (getSlave($AS).shouldersImplant == 0)>>
						<<if getSlave($AS).shoulders > -2 && getSlave($AS).shoulders < 2>>
							[[Restructure shoulders more broadly|Surgery Degradation][getSlave($AS).shouldersImplant++,getSlave($AS).shoulders++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]] | [[Restructure shoulders more narrowly|Surgery Degradation][getSlave($AS).shouldersImplant--,getSlave($AS).shoulders--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]]
						<<elseif getSlave($AS).shoulders <= -1>>
							[[Restructure shoulders more broadly|Surgery Degradation][getSlave($AS).shouldersImplant++,getSlave($AS).shoulders++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]]
						<<elseif getSlave($AS).shoulders >= 2>>
							[[Restructure shoulders more narrowly|Surgery Degradation][getSlave($AS).shouldersImplant--,getSlave($AS).shoulders--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]]
						<</if>>
					<<elseif $surgeryUpgrade == 1>>
						<<if getSlave($AS).shoulders > -2 && getSlave($AS).shoulders < 2>>
							[[Advanced shoulder broadening surgery|Surgery Degradation][getSlave($AS).shouldersImplant++,getSlave($AS).shoulders++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]] | [[Advanced shoulder narrowing surgery|Surgery Degradation][getSlave($AS).shouldersImplant--,getSlave($AS).shoulders--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]]
						<<elseif getSlave($AS).shoulders <= -1>>
							[[Advanced shoulder broadening surgery|Surgery Degradation][getSlave($AS).shouldersImplant++,getSlave($AS).shoulders++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]]
						<<elseif getSlave($AS).shoulders >= 2>>
							[[Advanced shoulder narrowing surgery|Surgery Degradation][getSlave($AS).shouldersImplant--,getSlave($AS).shoulders--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "shoulders"]]
						<</if>>
					<</if>>

			<</if>>

		/*Hip bones*/

			<<if getSlave($AS).indentureRestrictions < 1>>
				<<if (getSlave($AS).hips < -1)>>
					$He has very narrow hips.
				<<elseif (getSlave($AS).hips < 0)>>
					$He has narrow hips.
				<<elseif (getSlave($AS).hips < 1)>>
					$He has average hips.
				<<elseif (getSlave($AS).hips < 2)>>
					$He has broad hips.
				<<elseif (getSlave($AS).hips < 3)>>
					$He has very broad hips.
				<<elseif (getSlave($AS).hips == 3)>>
					$He has doorway-jamming hips.
				<</if>>
				<<if (getSlave($AS).hipsImplant == 0)>>
					They have not been altered.
				<<elseif (getSlave($AS).hipsImplant > 3)>>
					$His pelvis has been completely rebuilt to be massively wider.
				<<elseif (getSlave($AS).hipsImplant > 2)>>
					$His pelvis has been heavily broadened.
				<<elseif (getSlave($AS).hipsImplant > 1)>>
					$His pelvis has been repeatedly broadened.
				<<elseif (getSlave($AS).hipsImplant > 0)>>
					$His pelvis has been broadened.
				<<elseif (getSlave($AS).hipsImplant < -3)>>
					$His pelvis has been completely rebuilt to be massively narrower.
				<<elseif (getSlave($AS).hipsImplant < -2)>>
					$His pelvis has heavily narrowed.
				<<elseif (getSlave($AS).hipsImplant < -1)>>
					$His pelvis has been repeatedly narrowed.
				<<elseif (getSlave($AS).hipsImplant < 0)>>
					$His pelvis has been narrowed.
				<</if>>

					<<if (getSlave($AS).hipsImplant == 0)>>
						<<if getSlave($AS).hips > -2 && getSlave($AS).hips < 3 && $surgeryUpgrade == 1>>
							[[Broaden pelvis|Surgery Degradation][getSlave($AS).hipsImplant++,getSlave($AS).hips++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]] | [[Narrow pelvis|Surgery Degradation][getSlave($AS).hipsImplant--,getSlave($AS).hips--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]]
						<<elseif getSlave($AS).hips > -2 && getSlave($AS).hips < 2>>
							[[Broaden pelvis|Surgery Degradation][getSlave($AS).hipsImplant++,getSlave($AS).hips++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]] | [[Narrow pelvis|Surgery Degradation][getSlave($AS).hipsImplant--,getSlave($AS).hips--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]]
						<<elseif getSlave($AS).hips <= -1>>
							[[Broaden pelvis|Surgery Degradation][getSlave($AS).hipsImplant++,getSlave($AS).hips++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]]
						<<elseif getSlave($AS).hips >= 2>>
							[[Narrow pelvis|Surgery Degradation][getSlave($AS).hipsImplant--,getSlave($AS).hips--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]]
						<</if>>
					<<elseif $surgeryUpgrade == 1>>
						<<if getSlave($AS).hips > -2 && getSlave($AS).hips < 3>>
							[[Advanced pelvis broadening|Surgery Degradation][getSlave($AS).hipsImplant++,getSlave($AS).hips++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]] | [[Advanced pelvis narrowing|Surgery Degradation][getSlave($AS).hipsImplant--,getSlave($AS).hips--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]]
						<<elseif getSlave($AS).hips <= -1>>
							[[Advanced pelvis broadening|Surgery Degradation][getSlave($AS).hipsImplant++,getSlave($AS).hips++,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]]
						<<elseif getSlave($AS).hips >= 3>>
							[[Advanced pelvis narrowing|Surgery Degradation][getSlave($AS).hipsImplant--,getSlave($AS).hips--,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "hips"]]
						<</if>>
					<</if>>

			<</if>>

		/*Tweak height*/
		<<if hasAllNaturalLimbs(getSlave($AS))>>

				<<if (getSlave($AS).heightImplant == 0)>>
					$He has normal femurs and humeri.
				<<elseif (getSlave($AS).heightImplant > 0)>>
					$His femurs, humeri, and other major bones have been <<if getSlave($AS).heightImplant >= 1>>considerably <</if>>lengthened.
				<<elseif (getSlave($AS).heightImplant < 0)>>
					$His femurs, humeri, and other major bones have been <<if getSlave($AS).heightImplant <= -1>>considerably <</if>>shortened.
				<</if>>

					<<if getSlave($AS).indentureRestrictions < 1>>
						<<if (getSlave($AS).heightImplant == 0)>>
							[[Lengthen major bones|Surgery Degradation][getSlave($AS).heightImplant += 1,getSlave($AS).height += 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]]
							| [[Shorten major bones|Surgery Degradation][getSlave($AS).heightImplant -= 1,getSlave($AS).height -= 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]]
						<<elseif getSlave($AS).heightImplant >= 1>>
							<<if (getSlave($AS).height < (Height.mean(getSlave($AS))+15)) && $surgeryUpgrade == 1>>
								[[Advanced height gain surgery|Surgery Degradation][getSlave($AS).heightImplant += 1,getSlave($AS).height += 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]] |
							<</if>>
							<<if getSlave($AS).heightImplant == 1>>
								[[Reverse existing height surgery|Surgery Degradation][getSlave($AS).heightImplant -= 1,getSlave($AS).height -= 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]]
							<<elseif $surgeryUpgrade == 1>>
								[[Revert a stage of existing height surgery|Surgery Degradation][getSlave($AS).heightImplant -= 1,getSlave($AS).height -= 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]]
							<</if>>
						<<elseif getSlave($AS).heightImplant <= -1>>
							<<if (getSlave($AS).height >= (Height.mean(getSlave($AS))-15)) && $surgeryUpgrade == 1>>
								[[Advanced height reduction surgery|Surgery Degradation][getSlave($AS).heightImplant -= 1,getSlave($AS).height -= 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]] |
							<</if>>
							<<if getSlave($AS).heightImplant == -1>>
								[[Reverse existing height surgery|Surgery Degradation][getSlave($AS).heightImplant += 1,getSlave($AS).height += 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]]
							<<elseif $surgeryUpgrade == 1>>
								[[Revert a stage of existing height surgery|Surgery Degradation][getSlave($AS).heightImplant += 1,getSlave($AS).height += 10,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "height"]]
							<</if>>
						<</if>>
					<</if>>

				<<if (getSlave($AS).heels == 0) && hasAnyNaturalLegs(getSlave($AS))>>
					$He has healthy calves.
				<<elseif (getSlave($AS).heels == 1) && hasAnyNaturalLegs(getSlave($AS))>>
					$His calves have been altered so that $he cannot walk in anything but very high heels.
				<</if>>

					<<if (getSlave($AS).heels == 0) && hasAnyNaturalLegs(getSlave($AS)) && ($seeExtreme == 1)>>
						<<if getSlave($AS).indentureRestrictions < 1>>
							[[Shorten tendons|Surgery Degradation][getSlave($AS).heels = 1,getSlave($AS).shoes = "heels",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "heels"]] Prevents $him from walking in anything but very high heels
						<</if>>
					<</if>>
					<<if (getSlave($AS).heels == 1)>>
						[[Replace tendons|Surgery Degradation][getSlave($AS).heels = 0,getSlave($AS).shoes = "none",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "heelsRestoration"]]
					<</if>>

		<</if>>

		/* PROSTHETICS */

Prosthetics

		<<= App.Desc.limbs(getSlave($AS))>>
		<<if isAmputee(getSlave($AS))>>
			<<if getSlave($AS).PLimb == 1>>
				$He has been implanted with a basic PLimb interface.
			<<elseif getSlave($AS).PLimb == 2>>
				$He has been implanted with an advanced PLimb interface.
			<</if>>
		<</if>>

		<<if $seeExtreme === 1 && getSlave($AS).indentureRestrictions < 1 && hasAnyNaturalLimbs(getSlave($AS))>>

			<<set _LA = 0, _RA = 0, _LL = 0, _RL = 0>>

			<<if getLeftArmID(getSlave($AS)) === 1>>

Left arm:

<<radiobutton "_LA" 0 checked>> Leave

<<radiobutton "_LA" 1>> Amputate

			<</if>>
			<<if getRightArmID(getSlave($AS)) === 1>>

Right arm:

<<radiobutton "_RA" 0 checked>> Leave

<<radiobutton "_RA" 1>> Amputate

			<</if>>
			<<if getLeftLegID(getSlave($AS)) === 1>>

Left leg:

<<radiobutton "_LL" 0 checked>> Leave

<<radiobutton "_LL" 1>> Amputate

			<</if>>
			<<if getRightLegID(getSlave($AS)) === 1>>

Right leg:

<<radiobutton "_RL" 0 checked>> Leave

<<radiobutton "_RL" 1>> Amputate

			<</if>>

				<<link "Amputate limb(s)">>
					<<set _atleastOne = 0>>
					/* temporary story variable */
					<<set $oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS))>>
					<<if _LA === 1>>
						<<run removeLimbs(getSlave($AS), "left arm")>>
						<<set _atleastOne++>>
					<</if>>
					<<if _RA === 1>>
						<<run removeLimbs(getSlave($AS), "right arm")>>
						<<set _atleastOne++>>
					<</if>>
					<<if _LL === 1>>
						<<run removeLimbs(getSlave($AS), "left leg")>>
						<<set _atleastOne++>>
					<</if>>
					<<if _RL === 1>>
						<<run removeLimbs(getSlave($AS), "right leg")>>
						<<set _atleastOne++>>
					<</if>>
					<<if _atleastOne>>
						<<run surgeryDamage(getSlave($AS),_atleastOne * 10), cashX(-$surgeryCost, "slaveSurgery", getSlave($AS))>>
						<<if !hasAnyArms(getSlave($AS))>>
							<<set getSlave($AS).rules.release.masturbation = 0>>
						<</if>>
						<<set $surgeryType = "amp">>
						<<goto "Surgery Degradation">>
					<<else>>
						<<unset $oldLimbs>>
					<</if>>
				<</link>> This will greatly restrict $him.

		<</if>> /* extreme toggle */

			<<if !hasAllNaturalLimbs(getSlave($AS)) && getSlave($AS).PLimb == 0>>
				<<if isProstheticAvailable(getSlave($AS), "interfaceP1")>>
					[[Install basic prosthetic interface|Surgery Degradation][$oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "PLimb interface"]]
				<</if>>
				<<if isProstheticAvailable(getSlave($AS), "interfaceP2")>> |
					[[Install advanced prosthetic interface|Surgery Degradation][$oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "PLimb interface"]]
				<</if>>
			<<elseif getSlave($AS).PLimb == 1 && isProstheticAvailable(getSlave($AS), "interfaceP2")>>
				[[Upgrade to advanced prosthetic interface|Surgery Degradation][$oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "PLimb interface"]]
			<</if>>

			<<if getSlave($AS).PTail == 1>>
				$He has a neural interface allowing attachment of tails.
			<<elseif isProstheticAvailable(getSlave($AS), "interfaceTail")>>
				$He lacks a neural interface allowing attachment of tails.
				[[Implant interface|Surgery Degradation][getSlave($AS).PTail = 1, getSlave($AS).tail = "none", getSlave($AS).tailColor = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "tailInterface"]]
			<<else>>
				$He lacks a neural interface allowing attachment of tails and you have none ready for $him.
			<</if>>

		<<includeDOM App.Medicine.OrganFarm.fullMenu(getSlave($AS))>>

		<<if $geneticMappingUpgrade >= 1>>

Retro-virus treatments:

			<<if (getSlave($AS).indentureRestrictions >= 1)>>

					Modification at a genetic level clearly violates $his indenture contract

			<<elseif getSlave($AS).health.health < 0>>

					$He's too unhealthy to undergo gene therapy

			<<else>>

					<<if $arcologies[0].childhoodFertilityInducedNCSResearch == 1>>
						<<if getSlave($AS).geneMods.NCS == 0>>
							[[Induced NCS treatment|Surgery Degradation][getSlave($AS).geneMods.NCS = 1,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),80), getSlave($AS).chem += 40,$surgeryType = "retrograde virus injection NCS"]] This will induce NCS in $his genetic code
						<<else>>
							$He already has Induced NCS
						<</if>>
					<</if>>

					<<if $RapidCellGrowthFormula == 1>>
						<<if getSlave($AS).geneMods.rapidCellGrowth == 0>>
							[[Increased elasticity treatment|Surgery Degradation][getSlave($AS).geneMods.rapidCellGrowth = 1,cashX(forceNeg($surgeryCost * 4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "elasticity treatment"]] This will alter $his genetic code to encourage $his body to stretch
						<<else>>
							$He already has received the plasticity increasing elasticity treatment
						<</if>>
					<</if>>

					<<if getSlave($AS).geneticQuirks.albinism == 2>>
						[[Albinism prevention treatment|Surgery Degradation][induceAlbinism(getSlave($AS), 0), cashX(forceNeg($surgeryCost * 4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 40), getSlave($AS).chem += 100, $surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.albinism == 1 && $geneticMappingUpgrade >= 2>>
						[[Albinism activation treatment|Surgery Degradation][induceAlbinism(getSlave($AS), 2), cashX(forceNeg($surgeryCost * 4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 40), getSlave($AS).chem += 100, $surgeryType = "gene treatment"]] Will not have an active effect
						| [[Albinism carrier corrective treatment|Surgery Degradation][induceAlbinism(getSlave($AS), 0), cashX(forceNeg($surgeryCost * 4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced albinism treatment|Surgery Degradation][induceAlbinism(getSlave($AS), 2), cashX(forceNeg($surgeryCost * 10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce albinism in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.androgyny == 2>>
						[[Androgyny correction treatment|Surgery Degradation][getSlave($AS).geneticQuirks.androgyny = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.androgyny == 1 && $geneticMappingUpgrade >= 2>>
						[[Androgyny activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.androgyny = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Androgyny carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.androgyny = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced androgyny treatment|Surgery Degradation][getSlave($AS).geneticQuirks.androgyny = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce natural androgyny in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.dwarfism == 2>>
						[[Dwarfism correction treatment|Surgery Degradation][getSlave($AS).geneticQuirks.dwarfism = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.dwarfism == 1 && $geneticMappingUpgrade >= 2>>
						[[Dwarfism activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.dwarfism = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Dwarfism carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.dwarfism = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced dwarfism treatment|Surgery Degradation][getSlave($AS).geneticQuirks.dwarfism = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce dwarfism in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.gigantism == 2>>
						[[Gigantism correction treatment|Surgery Degradation][getSlave($AS).geneticQuirks.gigantism = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.gigantism == 1 && $geneticMappingUpgrade >= 2>>
						[[Gigantism activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.gigantism = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Gigantism carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.gigantism = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced gigantism treatment|Surgery Degradation][getSlave($AS).geneticQuirks.gigantism = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce gigantism in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.pFace == 2>>
						[[Prevent passing of perfect faces|Surgery Degradation][getSlave($AS).geneticQuirks.pFace = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<</if>>

					<<if getSlave($AS).geneticQuirks.uFace == 2>>
						[[Prevent passing of hideous faces|Surgery Degradation][getSlave($AS).geneticQuirks.uFace = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<</if>>

					<<if getSlave($AS).geneticQuirks.hyperFertility == 2>>
						[[Correct genetic hyper fertility|Surgery Degradation][getSlave($AS).geneticQuirks.hyperFertility = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.hyperFertility == 1 && $geneticMappingUpgrade >= 2>>
						[[Hyper fertility activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.hyperFertility = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Hyper fertility carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.hyperFertility = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced hyper fertility treatment|Surgery Degradation][getSlave($AS).geneticQuirks.hyperFertility = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce inhumanly high fertility in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.fertility == 2>>
						[[Correct heightened fertility|Surgery Degradation][getSlave($AS).geneticQuirks.fertility = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.fertility == 1 && $geneticMappingUpgrade >= 2>>
						[[Heightened fertility activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.fertility = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Heightened fertility carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.fertility = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced heightened fertility treatment|Surgery Degradation][getSlave($AS).geneticQuirks.fertility = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce heightened fertility in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.superfetation == 2>>
						[[Correct ova release during pregnancy|Surgery Degradation][getSlave($AS).geneticQuirks.superfetation = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.superfetation == 1 && $geneticMappingUpgrade >= 2>>
						[[Superfetation activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.superfetation = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Superfetation carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.superfetation = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced superfetation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.superfetation = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce superfetation in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.uterineHypersensitivity == 2>>
						[[Correct uterine hypersensitivity|Surgery Degradation][getSlave($AS).geneticQuirks.uterineHypersensitivity = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.uterineHypersensitivity == 1 && $geneticMappingUpgrade >= 2>>
						[[Uterine hypersensitivity activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.uterineHypersensitivity = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Uterine hypersensitivity carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.uterineHypersensitivity = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced uterine hypersensitivity treatment|Surgery Degradation][getSlave($AS).geneticQuirks.uterineHypersensitivity = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]] This will induce uterine hypersensitivity in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.gigantomastia >= 2>>
						[[Correct gigantomastia|Surgery Degradation][getSlave($AS).geneticQuirks.gigantomastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.gigantomastia == 1 && $geneticMappingUpgrade >= 2>>
						[[Gigantomastia activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.gigantomastia = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Gigantomastia carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.gigantomastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.gigantomastia == 0 && $geneticFlawLibrary == 1>>
						[[Induced gigantomastia treatment|Surgery Degradation][getSlave($AS).geneticQuirks.gigantomastia = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce gigantomastia in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.macromastia >= 2>>
						[[Correct macromastia|Surgery Degradation][getSlave($AS).geneticQuirks.macromastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.macromastia == 1 && $geneticMappingUpgrade >= 2>>
						[[Macromastia activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.macromastia = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Macromastia carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.macromastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.macromastia == 0 && $geneticFlawLibrary == 1>>
						[[Induced macromastia treatment|Surgery Degradation][getSlave($AS).geneticQuirks.macromastia = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce macromastia in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.rearLipedema == 2>>
						[[Correct lipedema|Surgery Degradation][getSlave($AS).geneticQuirks.rearLipedema = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.rearLipedema == 1 && $geneticMappingUpgrade >= 2>>
						[[Lipedema activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.rearLipedema = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Lipedema carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.rearLipedema = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced lipedema treatment|Surgery Degradation][getSlave($AS).geneticQuirks.rearLipedema = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce lipedema in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.wellHung == 2>>
						[[Correct genetic predisposition for large genitals|Surgery Degradation][getSlave($AS).geneticQuirks.wellHung = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.wellHung == 1 && $geneticMappingUpgrade >= 2>>
						[[Enhanced penile development activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wellHung = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Enhanced penile development carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wellHung = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced penile development treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wellHung = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce penile development in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.wGain == 2>>
						[[Correct hyperleptinemia|Surgery Degradation][getSlave($AS).geneticQuirks.wGain = 0, getSlave($AS).weightDirection = 0, cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.wGain == 1 && $geneticMappingUpgrade >= 2>>
						[[Hyperleptinemia activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wGain = 2, getSlave($AS).weightDirection = 1, cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Hyperleptinemia carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wGain = 0, getSlave($AS).weightDirection = 0, cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced hyperleptinemia treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wGain = 2, getSlave($AS).weightDirection = 1, cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce hyperleptinemia in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.wLoss == 2>>
						[[Correct hypoleptinemia|Surgery Degradation][getSlave($AS).geneticQuirks.wLoss = 0, getSlave($AS).weightDirection = 0, cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.wLoss == 1 && $geneticMappingUpgrade >= 2>>
						[[Hypoleptinemia activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wLoss = 2, getSlave($AS).weightDirection = -1, cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Hypoleptinemia carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wLoss = 0, getSlave($AS).weightDirection = 0, cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced hypoleptinemia treatment|Surgery Degradation][getSlave($AS).geneticQuirks.wLoss = 2, getSlave($AS).weightDirection = -1, cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce hypoleptinemia in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.mGain == 2>>
						[[Correct myotonic hypertrophy|Surgery Degradation][getSlave($AS).geneticQuirks.mGain = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.mGain == 1 && $geneticMappingUpgrade >= 2>>
						[[Myotonic hypertrophy activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.mGain = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Myotonic hypertrophy carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.mGain = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced myotonic hypertrophy treatment|Surgery Degradation][getSlave($AS).geneticQuirks.mGain = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce myotonic hypertrophy in $his genetic code
					<</if>>

					<<if getSlave($AS).geneticQuirks.mLoss == 2>>
						[[Correct myotonic dystrophy|Surgery Degradation][getSlave($AS).geneticQuirks.mLoss = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif getSlave($AS).geneticQuirks.mLoss == 1 && $geneticMappingUpgrade >= 2>>
						[[Myotonic dystrophy activation treatment|Surgery Degradation][getSlave($AS).geneticQuirks.mLoss = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
						| [[Myotonic dystrophy carrier corrective treatment|Surgery Degradation][getSlave($AS).geneticQuirks.mLoss = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 100,$surgeryType = "gene treatment"]]
					<<elseif $geneticFlawLibrary == 1>>
						[[Induced myotonic dystrophy treatment|Surgery Degradation][getSlave($AS).geneticQuirks.mLoss = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40), getSlave($AS).chem += 40,$surgeryType = "gene treatment"]] This will induce myotonic dystrophy in $his genetic code
					<</if>>

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

		/* 000-250-006 */
		<<if $seeImages == 1>>
			<<if $imageChoice == 1>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<<else>>

<<= SlaveArt(getSlave($AS), 3, 0)>>

			<</if>>
		<</if>>
		/* 000-250-006 */
		/*Fuckdoll*/

			<<if $seeExtreme == 1>>
				<<if getSlave($AS).fuckdoll == 0>>
					$He is a normal sex slave, not a living sex toy.

						<<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
							[[Encase in a Fuckdoll suit|Surgery Degradation][beginFuckdoll(getSlave($AS)), $surgeryType = "fuckdoll"]] This will greatly restrict $him
						<</if>>

				<<else>>
					$He is encased in a Fuckdoll suit.

						[["Extract " + $him|Surgery Degradation][getSlave($AS).fuckdoll = 0, getSlave($AS).clothes = "no clothing", getSlave($AS).shoes = "none", $surgeryType = "fuckdollExtraction"]]

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

		/*Scorch mind*/

			<<if ($seeExtreme == 1)>>
				<<if getSlave($AS).fetish != "mindbroken">>
					$He is mentally competent.
				<<elseif getSlave($AS).fetish == "mindbroken">>
					$His mind is gone; $he has either been chemically lobotomized, or has lost $his mind due to extreme abuse.
				<</if>>

					<<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
						<<if getSlave($AS).fetish != "mindbroken">>
							[[Chemically lobotomize|Surgery Degradation][getSlave($AS).fetish = "mindbroken",getSlave($AS).fetishKnown = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "mindbreak"]]
							Warning: this is permanent and irreversible. It will destroy $his will and $his ability to remember anything but the simplest skills.
						<</if>>
					<</if>>

			<</if>>

		/*Bodyswap*/

			<<if $bodyswapAnnounced == 1 && getSlave($AS).indenture < 0>>
				<<if getSlave($AS).bodySwap == 0>>
					$He is in $his native body.
				<<elseif getSlave($AS).origBodyOwner != "">>
					$He currently occupies <<print getSlave($AS).origBodyOwner>>'s body.
				<<else>>
					$He is no longer in $his native body.
				<</if>>

					<<if getSlave($AS).indenture == -1>>
						[["Swap " + $his + " body with another of your stock"|Slave Slave Swap Workaround]]
					<<else>>
						Indentured servants must remain in their own bodies.
					<</if>>

			<<elseif $cheatMode == 1>>

					[[Force enable bodyswapping|Remote Surgery][$bodyswapAnnounced = 1]]

			<</if>>