:: Assistant Autosurgery

<<nobr>>

<<set $surgeries = []>>

<<if $HGTastes == 1>>
	<<set $thisSurgery to {lactation: 0, cosmetic: 1, faceShape: "cute", lips: 10, hips: 0, hipsImplant: 0, butt: 0, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 0, holes: 0}>>
	<<elseif $HGTastes is 2>>
	<<set $thisSurgery to {lactation: 0, cosmetic: 1, faceShape: "cute", lips: 60, hips: 0, hipsImplant: 0, butt: 4, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 1200, holes: 0}>>
<<else>>
	<<set $thisSurgery to {lactation: 0, cosmetic: 1, faceShape: "cute", lips: 95, hips: 0, hipsImplant: 0, butt: 8, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 10000, holes: 2}>>
<</if>>

<<set $seed to 0>>
<<for $seed == 0>>

<<if ($slaves[$i].health <= 40)>>
	<<set $seed = 1>>
<<else>>
<<if ($slaves[$i].lactation != 2) && ($thisSurgery.lactation == 1)>>
	<<set $surgeries.push("lactation inducing implanted drugs")>>
	<<set $slaves[$i].lactation to 2>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].anus > 3) && ($thisSurgery.cosmetic > 0)>>
	<<set $surgeries.push("a restored anus")>>
	<<set $slaves[$i].anus to 3>>
	<<if $slaves[$i].analSkill > 10>>
		<<set $slaves[$i].analSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].vagina > 3) && ($thisSurgery.cosmetic > 0)>>
	<<set $surgeries.push("a restored pussy")>>
	<<set $slaves[$i].vagina to 3>>
	<<if $slaves[$i].vaginalSkill > 10>>
		<<set $slaves[$i].vaginalSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].faceImplant == 0) && ($slaves[$i].face < 3) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape is "masculine">><<set $slaves[$i].faceShape to "androgynous">><</if>>
	<<set $slaves[$i].faceImplant to 1>>
	<<set $slaves[$i].face += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].ageImplant != 1) && ($slaves[$i].physicalAge >= 25) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("an age lift")>>
	<<set $slaves[$i].ageImplant to 1>>
	<<if $slaves[$i].visualAge > 80>>
		<<set $slaves[$i].visualAge -= 40>>
	<<elseif $slaves[$i].visualAge >= 70>>
		<<set $slaves[$i].visualAge -= 30>>
	<<elseif $slaves[$i].visualAge > 50>>
		<<set $slaves[$i].visualAge -= 20>>
	<<elseif $slaves[$i].visualAge > 36>>
		<<set $slaves[$i].visualAge -= 10>>
	<<else>>
		<<set $slaves[$i].visualAge -= 5>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].waist == 0) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("a narrower waist")>>
	<<set $slaves[$i].waist to 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].voice == 1) && ($slaves[$i].voiceImplant == 0) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("a feminine voice")>>
	<<set $slaves[$i].voice += 1>>
	<<set $slaves[$i].voiceImplant += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].lips < $thisSurgery.lips)>>
	<<set $surgeries.push("bigger lips")>>
	<<set $slaves[$i].lipsImplant += 10>>
	<<set $slaves[$i].lips += 10>>
	<<if $slaves[$i].oralSkill > 10>>
		<<set $slaves[$i].oralSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].faceImplant == 1) && ($slaves[$i].face < 3) && ($thisSurgery.cosmetic is 2)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape is "masculine">><<set $slaves[$i].faceShape to "androgynous">><</if>>
	<<set $slaves[$i].faceImplant to 2>>
	<<set $slaves[$i].face += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].faceImplant > 0) && ($slaves[$i].face < 3) && ($surgeryUpgrade == 1) && ($thisSurgery.cosmetic is 2)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape is "masculine">><<set $slaves[$i].faceShape to "androgynous">><</if>>
	<<set $slaves[$i].faceImplant to 2>>
	<<set $slaves[$i].face += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].waist == 1) && ($thisSurgery.cosmetic is 2) && ($seeExtreme == 1)>>
	<<set $surgeries.push("a narrower waist")>>
	<<set $slaves[$i].waist to 2>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 30.5>><<else>><<set $slaves[$i].health -= 4>><</if>>
<<elseif ($slaves[$i].voice < 3) && ($slaves[$i].voiceImplant == 0) && ($thisSurgery.cosmetic is 2)>>
	<<set $surgeries.push("a bimbo's voice")>>
	<<set $slaves[$i].voice += 1>>
	<<set $slaves[$i].voiceImplant += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].butt <= 3) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<set $surgeries.push("a bigger butt")>>
	<<set $slaves[$i].buttImplant to 1>>
	<<set $slaves[$i].butt += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].boobs <= 600) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+400 <= $thisSurgery.boobs)>>
	<<set $surgeries.push("bigger boobs")>>
	<<set $slaves[$i].boobsImplant += 400>>
	<<set $slaves[$i].boobs += 400>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].boobs <= 600) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+200 <= $thisSurgery.boobs)>>
	<<set $surgeries.push("modestly bigger boobs")>>
	<<set $slaves[$i].boobsImplant += 200>>
	<<set $slaves[$i].boobs += 200>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].butt <= 5) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<set $surgeries.push("a bigger butt")>>
	<<set $slaves[$i].buttImplant to 1>>
	<<set $slaves[$i].butt += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].boobs <= 2000) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+400 < $thisSurgery.boobs)>>
	<<set $surgeries.push("bigger boobs")>>
	<<set $slaves[$i].boobsImplant += 400>>
	<<set $slaves[$i].boobs += 400>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].anus > 0) && ($surgeryUpgrade == 1) && ($thisSurgery.holes is 2)>>
	<<set $surgeries.push("a virgin anus")>>
	<<set $slaves[$i].anus to 0>>
	<<if $slaves[$i].analSkill > 10>>
		<<set $slaves[$i].analSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].vagina > 0) && ($surgeryUpgrade == 1) && ($thisSurgery.holes is 2)>>
	<<set $surgeries.push("a virgin pussy")>>
	<<set $slaves[$i].vagina to 0>>
	<<if $slaves[$i].vaginalSkill > 10>>
		<<set $slaves[$i].vaginalSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].anus > 1) && ($thisSurgery.holes == 1)>>
	<<set $surgeries.push("a tighter anus")>>
	<<set $slaves[$i].anus to 1>>
	<<if $slaves[$i].analSkill > 10>>
		<<set $slaves[$i].analSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].vagina > 1) && ($thisSurgery.holes == 1)>>
	<<set $surgeries.push("a tighter pussy")>>
	<<set $slaves[$i].vagina to 1>>
	<<if $slaves[$i].vaginalSkill > 10>>
		<<set $slaves[$i].vaginalSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].butt <= 8) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<set $surgeries.push("a bigger butt")>>
	<<set $slaves[$i].buttImplant to 1>>
	<<set $slaves[$i].butt += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].boobs <= 9000) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs < $thisSurgery.boobs)>>
	<<set $surgeries.push("bigger boobs")>>
	<<set $slaves[$i].boobsImplant += 200>>
	<<set $slaves[$i].boobs += 200>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.career is "medicine">><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<else>>
	<<set $seed = 1>>
<</if>>
<</if>>

<</for>>

<<if $surgeries.length > 0>>

<<set $surgeriesDisplay to "">>

<<for $j to 0; $j < $surgeries.length; $j++>>
	<<set $seed to $surgeries[$j]>>
	<<set $surgeriesDisplay to ($surgeriesDisplay + $seed)>>
	<<if $j < $surgeries.length-2>>
	<<set $surgeriesDisplay to ($surgeriesDisplay + ", ")>>
	<<elseif $j < $surgeries.length-1>>
	<<if $surgeries.length > 2>>
		<<set $surgeriesDisplay to ($surgeriesDisplay + ", and ")>>
	<<else>>
		<<set $surgeriesDisplay to ($surgeriesDisplay + " and ")>>
	<</if>>
	<</if>>
<</for>>

<<if $assistantName is "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>>, ordered to apply surgery at will, gives $slaves[$i].slaveName @@color:lime;$surgeriesDisplay.@@

<</if>>

<</nobr>>
