code:
:: assay widgets [widget nobr]

<<widget "Beauty">>

<<modScore $args[0]>>

<<set $beauty = 0>>

<<if $args[0].fuckdoll == 0>> /* NOT A FUCKDOLL */

<<set $beauty += 150 - ($args[0].visualAge*3) + (Math.min($args[0].health,100)/5) - ($args[0].waist/20) - ($args[0].muscles/30) +($args[0].lips/10) + ($args[0].face/5) + ($args[0].clit) + (($args[0].height-160)/10) + ($args[0].voice) + (3*$args[0].intelligence) + ($args[0].entertainSkill/10) + ($args[0].whoreSkill/10) + (2*$args[0].hips)>>

<<if $arcologies[0].FSDegradationist != "unset">>
	<<set $beauty -= ($arcologies[0].FSDegradationist/10)*$args[0].intelligence>>
<</if>>

<<if $arcologies[0].FSGenderFundamentalistLawBimbo == 1>>
	<<set $beauty -= 6*$args[0].intelligence>>
<</if>>

<<if $args[0].teeth == "crooked">>
	<<set $beauty -= 3>>
<<elseif ($args[0].teeth == "braces" || $args[0].teeth == "cosmetic braces") && ($args[0].visualAge > 14) && ($args[0].visualAge < 18)>>
	<<set $beauty += 1>>
<<elseif $args[0].teeth != "normal">>
	<<set $beauty -= 1>>
<</if>>

<<if $args[0].faceShape == "masculine">>
	<<if ($arcologies[0].FSGenderRadicalist != "unset")>>
	<<set $beauty -= (2-($arcologies[0].FSGenderRadicalist/25))*($args[0].face/30)>>
	<<elseif ($arcologies[0].FSGenderFundamentalist != "unset")>>
	<<set $beauty -= (2+($arcologies[0].FSGenderFundamentalist/25))*($args[0].face/30)>>
	<<else>>
	<<set $beauty -= 2*($args[0].face/30)>>
	<</if>>
<<elseif $args[0].faceShape == "androgynous">>
	<<if ($arcologies[0].FSGenderRadicalist != "unset")>>
	<<set $beauty += 2-((1-($arcologies[0].FSGenderRadicalist/25))*($args[0].face/30))>>
	<<elseif ($arcologies[0].FSGenderFundamentalist != "unset")>>
	<<set $beauty += 2-((1+($arcologies[0].FSGenderFundamentalist/25))*($args[0].face/30))>>
	<<else>>
	<<set $beauty += 2-($args[0].face/30)>>
	<</if>>
<<elseif $args[0].faceShape == "exotic">>
	<<set $beauty += 2*($args[0].face/30)>>
<<elseif $args[0].faceShape == "sensual">>
	<<set $beauty += 2+($args[0].face/30)>>
<<elseif $args[0].faceShape == "cute">>
	<<set $beauty += 8/3>>
<</if>>

<<if $args[0].brand != 0>>
	<<if $rep > 10000>>
	<<set $beauty += 1>>
	<<elseif $rep < 5000>>
	<<set $beauty -= 1>>
	<</if>>
<</if>>

<<if $args[0].minorInjury != 0>>
	<<set $beauty -= 2>>
<</if>>

<<if $args[0].cSec == 1>>
	<<set $beauty -= 2>>
<</if>>

<<if $args[0].nails > 0>><<set $beauty += 1>><</if>>
<<if $args[0].makeup > 0>><<set $beauty += 1>><</if>>

<<if ($arcologies[0].FSTransformationFetishist > 20) || ($arcologies[0].FSDegradationist > 20)>>
	<<if $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>>
	<<set $beauty += 8+($modScore*0.25)>>
	<<elseif $modScore > 7>>
	<<set $beauty += $modScore-7>>
	<</if>>
<<elseif ($arcologies[0].FSBodyPurist > 20) || ($arcologies[0].FSPaternalist > 20)>>
	<<if $modScore <= 7>>
	<<set $beauty += 10>>
	<<else>>
	<<set $beauty += 15-$modScore>>
	<</if>>
<<else>>
	<<if $modScore <= 7>>
	<<set $beauty += $modScore>>
	<<elseif $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>>
	<<set $beauty += 11>>
	<<else>>
	<<set $beauty += 7+(0.5*($modScore-7))>>
	<</if>>
<</if>>

<<if $arcologies[0].FSSupremacist != "unset">>
	<<if $args[0].race == $arcologies[0].FSSupremacistRace>>
		<<set $beauty += ($arcologies[0].FSSupremacist/3)+($arcologies[0].FSSupremacistLawME*10)>>
	<</if>>
<</if>>
<<if $arcologies[0].FSSubjugationist != "unset">>
	<<if $args[0].race == $arcologies[0].FSSubjugationistRace>>
		<<set $beauty -= ($arcologies[0].FSSubjugationist/2)-($arcologies[0].FSSubjugationistLawME*10)>>
	<</if>>
<</if>>
<<if $arcologies[0].FSEdoRevivalist != "unset">>
<<if ($args[0].nationality == "Japanese") || ($args[0].nationality == "Edo Revivalist")>>
	<<set $beauty += ($arcologies[0].FSEdoRevivalist/2)>>
<<elseif $args[0].race == "asian" || $args[0].race == "surgically altered to look asian">>
	<<set $beauty += ($arcologies[0].FSEdoRevivalist/5)>>
<<else>>
	<<set $beauty -= ($arcologies[0].FSEdoRevivalist/4)>>
<</if>>
<<if $language == "Japanese" && canTalk($args[0])>>
	<<if $args[0].accent > 1>>
		<<set $beauty -= ($arcologies[0].FSEdoRevivalist/2)>>
	<<elseif $args[0].accent > 0>>
		<<set $beauty -= ($arcologies[0].FSEdoRevivalist/5)>>
	<<else>>
		<<set $beauty += ($arcologies[0].FSEdoRevivalist/10)>>
	<</if>>
<</if>>
<</if>>
<<if $arcologies[0].FSChineseRevivalist != "unset">>
<<if ($args[0].nationality == "Chinese") || ($args[0].nationality == "Ancient Chinese Revivalist")>>
	<<set $beauty += ($arcologies[0].FSChineseRevivalist/2)>>
<<elseif $args[0].race == "asian" || $args[0].race == "surgically altered to look asian">>
	<<set $beauty += ($arcologies[0].FSChineseRevivalist/5)>>
<<else>>
	<<set $beauty -= ($arcologies[0].FSChineseRevivalist/4)>>
<</if>>
<<if $language == "Chinese" && canTalk($args[0])>>
	<<if $args[0].accent > 1>>
		<<set $beauty -= ($arcologies[0].FSChineseRevivalist/2)>>
	<<elseif $args[0].accent > 0>>
		<<set $beauty -= ($arcologies[0].FSChineseRevivalist/5)>>
	<<else>>
		<<set $beauty += ($arcologies[0].FSChineseRevivalist/10)>>
	<</if>>
<</if>>
<</if>>

<<if $args[0].race == "white">>
	<<set $beauty += 4>>
<<elseif $args[0].race == "surgically altered to look white">>
	<<set $beauty += 2>>
<</if>>

<<if $arcologies[0].FSYouthPreferentialist != "unset">>
	<<set $beauty += (30-$args[0].visualAge)/(30-$minimumSlaveAge)*(($arcologies[0].FSYouthPreferentialist/2)+($arcologies[0].FSYouthPreferentialistLaw*10))>> /*60*/
<<elseif $arcologies[0].FSMaturityPreferentialist != "unset">>
	<<set $beauty += (30-$args[0].visualAge)/(30-$retirementAge)*(($arcologies[0].FSMaturityPreferentialist/2)+($arcologies[0].FSMaturityPreferentialistLaw*10))>> /*60*/
<</if>>

<<if ($args[0].markings != "none")>>
	<<if ($args[0].markings == "beauty mark")>>
	<<if ($args[0].face > 40)>>
		<<set $beauty += 6>>
	<<elseif ($args[0].face < -10)>>
		<<set $beauty -= 6>>
	<</if>>
	<<elseif ($args[0].markings == "birthmark")>>
	<<if ($args[0].prestige > 0)>>
		<<set $beauty += 4>>
	<<else>>
		<<set $beauty -= 4>>
	<</if>>
	<<else>>
	<<if ($args[0].skin == "pale") || ($args[0].skin == "fair")>>
		<<set $beauty += 2>>
		<<if ($args[0].hColor == "red")>>
		<<set $beauty += 2>>
		<</if>>
	<</if>>
	<</if>>
<</if>>

<<if setup.entertainmentCareers.includes($args[0].career)>>
	<<set $beauty += 20>>
<<elseif ($week-$args[0].weekAcquired >= 20) && ($args[0].entertainSkill >= 100)>>
	<<set $beauty += 10>>
<</if>>

<<if ($arcologies[0].FSBodyPurist > 20)>> /*bonus for virgin slaves*/
	<<if $args[0].vagina == 0 && $args[0].vaginalCount == 0>>
		<<set $beauty += 30*($arcologies[0].FSBodyPurist/100)>>
	<</if>>
	<<if $args[0].anus == 0 && $args[0].analCount == 0>>
		<<set $beauty += 30*($arcologies[0].FSBodyPurist/100)>>
	<</if>>
<</if>>

<<if $seeAge == 1>>
<<if $args[0].physicalAge == $minimumSlaveAge && $args[0].physicalAge == $fertilityAge && canGetPregnant($args[0]) && ($arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderFundamentalist != "unset") && $arcologies[0].FSRestart == "unset">>
	<<set $beauty += 1>>
	<<if $args[0].birthWeek == 0>>
		<<set $beauty += 1.6*$beauty>>
	<<elseif $args[0].birthWeek < 4>>
		<<set $beauty += 0.2*$beauty>>
	<</if>>
<<elseif $args[0].physicalAge == $minimumSlaveAge>>
	<<set $beauty += 1>>
	<<if $args[0].birthWeek == 0>>
		<<set $beauty += 0.8*$beauty>>
	<<elseif $args[0].birthWeek < 4>>
		<<set $beauty += 0.1*$beauty>>
	<</if>>
<<elseif $args[0].physicalAge == $fertilityAge && canGetPregnant($args[0]) && ($arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderFundamentalist != "unset")>>
	<<set $beauty += 1>>
	<<if $args[0].birthWeek == 0>>
		<<set $beauty += 0.8*$beauty>>
	<<elseif $args[0].birthWeek < 4>>
		<<set $beauty += 0.1*$beauty>>
	<</if>>
<</if>>
<</if>>

<<else>> /* FUCKDOLL */

<<set $beauty += 120 - ($args[0].waist/20) - ($args[0].muscles/30) + ($args[0].lips/10) + ($args[0].clit) + (($args[0].height-160)/10) + (2*$args[0].hips)>>

<</if>> /* CLOSES FUCKDOLL CHECK */

<<if ($arcologies[0].FSTransformationFetishist > 20)>>
	<<if $args[0].lips > 70>>
	<<if ($args[0].lipsImplant/$args[0].lips < .50)>>
		<<set $beauty -= (($args[0].lips/10)+($arcologies[0].FSTransformationFetishist/20))>>
	<</if>>
	<</if>>
<</if>>

<<if $args[0].butt <= 10>>
	<<set $beauty += (1.5*$args[0].butt)>> /*15*/
<<else>>
	<<set $beauty += (15+($args[0].butt/4))>> /*20*/
<</if>>

/* Cock + Balls */

<<if ($arcologies[0].FSAssetExpansionist > 20) && $arcologies[0].FSGenderFundamentalist == "unset">>
	<<if $args[0].dick >= 20>>
		<<set $beauty += 17+($args[0].dick*($arcologies[0].FSAssetExpansionist/500))>> /*23*/
	<<elseif $args[0].dick >= 10>>
		<<set $beauty += 10+($args[0].dick*($arcologies[0].FSAssetExpansionist/300))>> /*16.3*/
	<<elseif $args[0].dick > 6>>
		<<set $beauty += $args[0].dick*(1+($arcologies[0].FSAssetExpansionist/100))>> /*10*/
	<</if>>
	<<if $args[0].balls > 100>>
		<<set $beauty += 41+($args[0].balls*($arcologies[0].FSAssetExpansionist/500))>> /*66*/
	<<elseif $args[0].balls > 80>>
		<<set $beauty += 16+($args[0].balls*($arcologies[0].FSAssetExpansionist/400))>> /*41*/
	<<elseif $args[0].balls > 60>>
		<<set $beauty += 6+($args[0].balls*($arcologies[0].FSAssetExpansionist/800))>> /*16*/
	<<elseif $args[0].balls > 10>>
		<<set $beauty += $args[0].balls*(($arcologies[0].FSAssetExpansionist/1000))>> /*6*/
	<</if>>
<<elseif $arcologies[0].FSGenderFundamentalist != "unset">>
	<<if $args[0].dick > 0>>
		<<set $beauty += 3-$args[0].dick>>
	<</if>>
	<<if $args[0].scrotum > 0>>
		<<set $beauty -= $args[0].balls*(1+($arcologies[0].FSGenderFundamentalist/200))>>
		<<if $args[0].pubertyXY == 0>>
			<<set $beauty += 5>>
		<</if>>
	<</if>>
<<elseif $arcologies[0].FSGenderRadicalist != "unset">>
	<<if $args[0].dick > 20>>
		<<set $beauty += 20+($args[0].dick*($arcologies[0].FSGenderRadicalist/400))>> /*27.5*/
	<<elseif $args[0].dick >= 10>>
		<<set $beauty += 10+($args[0].dick*($arcologies[0].FSGenderRadicalist/200))>> /*20*/
	<<elseif $args[0].dick > 0>>
		<<set $beauty += $args[0].dick*(1+($arcologies[0].FSGenderRadicalist/100))>> /*10*/
	<</if>>
	<<if $args[0].scrotum > 0>>
		<<if $args[0].balls > 100>>
			<<set $beauty += 40+($args[0].balls*($arcologies[0].FSGenderRadicalist/2000))>> /*46.25*/
		<<elseif $args[0].balls > 60>>
			<<set $beauty += 30+($args[0].balls*($arcologies[0].FSGenderRadicalist/1000))>> /*40*/
		<<elseif $args[0].balls > 10>>
			<<set $beauty += 15+($args[0].balls*($arcologies[0].FSGenderRadicalist/400))>> /*30*/
		<<else>>
			<<set $beauty += $args[0].balls*(1+($arcologies[0].FSGenderRadicalist/200))>> /*15*/
		<</if>>
	<</if>>
<<else>>
	<<set $beauty -= 2*$args[0].dick>>
	<<if $args[0].scrotum > 0>>
		<<set $beauty -= $args[0].balls>>
	<</if>>
<</if>>

/* bonus for dick focused genderrads */
<<if $arcologies[0].FSGenderRadicalistLawFuta != 0>>
	<<if ($arcologies[0].FSGenderRadicalistLawFuta == 1)>>
		<<if $args[0].dick > 0>>
			<<if $args[0].vagina > -1>>
				<<if $args[0].dick > 0 && $args[0].dick <= 10>>
					<<set $beauty += $args[0].dick>> /*10*/
				<</if>>
				<<if $args[0].dick > 20>>
					<<set $beauty += 2>>
				<<elseif $args[0].dick > 10>>
					<<set $beauty += 4>>
				<</if>>
			<</if>>
		<</if>>
	<<elseif ($arcologies[0].FSGenderRadicalistLawFuta == 2)>> /* erection! */
		<<if $args[0].dick > 0>>
		<<if $args[0].balls > 0>>
		<<if $args[0].scrotum > 0>>
		<<if canAchieveErection($args[0])>>
			<<set $beauty += $args[0].dick>>
			<<if $args[0].balls > 0 && $args[0].balls <= 10>>
				<<set $beauty += $args[0].balls>> /*10*/
			<</if>>
			<<if $args[0].balls > 120>>
				<<set $beauty += 14>>
			<<elseif $args[0].balls > 100>>
				<<set $beauty += 12>>
			<<elseif $args[0].balls > 80>>
				<<set $beauty += 10>>
			<<elseif $args[0].balls > 60>>
				<<set $beauty += 8>>
			<<elseif $args[0].balls > 40>>
				<<set $beauty += 6>>
			<<elseif $args[0].balls > 20>>
				<<set $beauty += 4>>
			<<elseif $args[0].balls > 10>>
				<<set $beauty += 2>>
			<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
	<<elseif ($arcologies[0].FSGenderRadicalistLawFuta == 3)>>
		<<if $args[0].butt >= 5>>
			<<set $beauty += ($args[0].butt-5)>> /*15*/
		<</if>>
		<<if $args[0].hips >= 1>>
			<<set $beauty += 4*($args[0].hips-1)>> /*8*/
			<<if $arcologies[0].FSSlimnessEnthusiast != "unset">>
				<<set $beauty += 4*($args[0].hips-1)>> /*8*/ /* offsets the malus for big butts */
			<</if>>
		<</if>>
		<<if $args[0].analSkill > 60 && $args[0].anus >= 2>>
			<<set $beauty += 2*($args[0].anus-2)>> /*6*/
			<<if $arcologies[0].FSSlimnessEnthusiast != "unset">>
				<<set $beauty += 2*($args[0].anus-2)>> /*6*/ /* offsets the malus for big butts */
			<</if>>
		<</if>>
	<<elseif ($arcologies[0].FSGenderRadicalistLawFuta == 4)>>
		<<if $args[0].dick > 0 && $args[0].vagina == -1 && $args[0].faceShape != "masculine">>
			<<if $args[0].boobs < 500 &&  $args[0].dick < 4 && $args[0].balls < 4>>
				<<if $arcologies[0].FSSlimnessEnthusiast == "unset">> /*balance with slimness*/
					<<set $beauty += 20>>
					<<if $args[0].boobs < 300>>
						<<set $beauty += 12>>
					<<elseif $args[0].boobs < 400>>
						<<set $beauty += 6>>
					<</if>>
				<</if>>
				<<if $args[0].dick == 1>>
					<<set $beauty += 12>>
				<<elseif $args[0].dick == 2>>
					<<set $beauty += 6>>
				<</if>>
				<<if $args[0].balls <= 2>>
					<<set $beauty += 8>>
				<</if>>
				<<if $args[0].faceShape == "cute" && $args[0].face > 0>> /*uggos need not apply, maybe a small boost for other faceShapes*/
					<<set $beauty += ((($arcologies[0].FSGenderRadicalist/25)*($args[0].face/30))-2)>> /*gives a slightly better boost than androgynous does with gendrad boost, 15.3*/
				<</if>>
				<<if $args[0].nipples == "tiny">>
					<<set $beauty += 5>>
				<<elseif $args[0].nipples == "cute">>
					<<set $beauty += 2>>
				<<else>>
					<<set $beauty -= 5>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if ($arcologies[0].FSTransformationFetishist > 20 && $arcologies[0].FSSlimnessEnthusiast == "unset") || ($arcologies[0].FSAssetExpansionist > 20)>>
	<<if $args[0].boobs <= 500>>
		<<set $beauty += (0.02*($args[0].boobs-250))>> /*5*/
	<<elseif $args[0].boobs <= 1500>>
		<<set $beauty += 5+(0.015*($args[0].boobs-500))>> /*20*/
	<<elseif $args[0].boobs <= 3000>>
		<<set $beauty += 20+(0.01*($args[0].boobs-1500))>> /*42.5*/
	<<elseif $args[0].boobs <= 25000>>
		<<set $beauty += 50+(0.005*($args[0].boobs-3000))>> /*160 - this might need to be lowered. Maybe drop the 50? Otherwise break it down more.*/
	<<else>>
		<<set $beauty += 145+(0.001*($args[0].boobs-10000))>> /* 185 */
	<</if>>
	<<if $args[0].butt <= 2>>
		<<set $beauty += (2*($args[0].butt-1))>> /*2*/
	<<elseif $args[0].butt <= 4>>
		<<set $beauty += 2+(1.5*($args[0].butt-2))>> /*5*/
	<<elseif $args[0].butt <= 10>>
		<<set $beauty += 5+(1*($args[0].butt-4))>> /*11*/
	<<else>>
		<<set $beauty += 7+(.5*($args[0].butt-5))>> /*14.5*/
	<</if>> /* maybe buff butts? */
<<elseif ($arcologies[0].FSSlimnessEnthusiast > 20)>>
	<<if $args[0].boobs <= 500>>
		<<set $beauty += (0.08*($args[0].boobs))>> /*40 - buff me to be in line with higher end asset exp*/
	<<elseif $args[0].boobs <= 1000>>
		<<set $beauty += 10>>
	<<elseif $args[0].boobs <= 3000>>
		<<set $beauty += 5>>
	<<else>>
		<<set $beauty -= 5+(0.005*($args[0].boobs-3000))>> /*-110*/
	<</if>>
	<<if $args[0].butt <= 3>>
		<<set $beauty += 12+(3*($args[0].butt-1))>> /*18 buff if asses get buffed*/
	<<elseif $args[0].butt <= 5>>
		<<set $beauty += 9>>
	<<else>>
		<<set $beauty -= 10+($args[0].butt*3)>> /*-70*/
	<</if>>
<<else>>
	<<if $args[0].boobs <= 1200>>
		<<set $beauty += (0.02*($args[0].boobs-200))>> /*20*/
	<<elseif $args[0].boobs <= 2400>>
		<<set $beauty += 20+(0.01*($args[0].boobs-1200))>> /*32*/
	<<elseif $args[0].boobs <= 3600>>
		<<set $beauty += 32+(0.005*($args[0].boobs-2400))>> /*38*/
	<<elseif $args[0].boobs <= 10000>>
		<<set $beauty += 38>>
	<<elseif $args[0].boobs <= 25000>>
		<<set $beauty += 30>>
	<<else>>
		<<set $beauty += 20>>
	<</if>>
	<<if $args[0].butt <= 2>>
		<<set $beauty += (2*($args[0].butt-1))>> /*2*/
	<<elseif $args[0].butt <= 4>>
		<<set $beauty += 2+(1.5*($args[0].butt-2))>> /*5*/
	<<elseif $args[0].butt <= 8>>
		<<set $beauty += 2+(1.5*($args[0].butt-2))>> /*11*/
	<<else>>
		<<set $beauty += 9>>
	<</if>>
<</if>>
<<if $arcologies[0].FSTransformationFetishist > 20>> /* the cost of using AE's values */
	<<if ($arcologies[0].FSSlimnessEnthusiast != "unset")>>
		<<if $args[0].boobs >= 400>>
			<<if $args[0].boobs >= 10000>>
				<<if $args[0].boobsImplant/$args[0].boobs < .75>>
					<<set $beauty -= ((0.05*($args[0].boobs))+10)>>
				<</if>>
			<<elseif $args[0].boobs >= 2000>>
				<<if $args[0].boobsImplant/$args[0].boobs < .50>>
					<<set $beauty -= ((0.05*($args[0].boobs))+10)>>
				<</if>>
			<<elseif $args[0].boobs >= 1000>>
				<<if $args[0].boobsImplant/$args[0].boobs < .25>>
					<<set $beauty -= ((0.05*($args[0].boobs))+10)>>
				<</if>>
			<<else>>
				<<if $args[0].boobsImplant/$args[0].boobs < .10>>
					<<set $beauty -= ((0.05*($args[0].boobs))+10)>>
				<</if>>
			<</if>>
		<</if>>
		<<if $args[0].butt >= 3>>
			<<if $args[0].buttImplant/$args[0].butt < .25>>
				<<set $beauty -= ((2*($args[0].butt-1))+10)>>
			<</if>>
		<</if>>
	<<else>>
		<<if $args[0].butt >= 6>>
			<<if $args[0].buttImplant/$args[0].butt < .50>>
				<<set $beauty -= ((1.5*$args[0].butt)+6)>> /* will get nasty at huge sizes */
			<</if>>
		<</if>>
		<<if $args[0].boobs >= 600>>
			<<if $args[0].boobs >= 10000>>
				<<if $args[0].boobsImplant/$args[0].boobs < .75>>
					<<set $beauty -= 30+(0.005*($args[0].boobs))>> /* will get nasty at huge sizes */
				<</if>>
			<<elseif $args[0].boobs >= 2000>>
				<<if $args[0].boobsImplant/$args[0].boobs < .50>>
					<<set $beauty -= 30+(0.005*($args[0].boobs))>> /* will get nasty at huge sizes */
				<</if>>
			<<elseif $args[0].boobs >= 1000>>
				<<if $args[0].boobsImplant/$args[0].boobs < .25>>
					<<set $beauty -= 30+(0.005*($args[0].boobs))>> /* will get nasty at huge sizes */
				<</if>>
			<<else>>
				<<if $args[0].boobsImplant/$args[0].boobs < .10>>
					<<set $beauty -= 30+(0.005*($args[0].boobs))>> /* will get nasty at huge sizes */
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if ($arcologies[0].FSTransformationFetishist > 20)>>
	<<if $args[0].hips >= 3>>
		<<set $beauty += 10>>
	<</if>>
<</if>>

<<if $args[0].hips < -1>> /* butts in general may need buffs */
	<<if $args[0].butt > 2>>
	<<if $arcologies[0].FSTransformationFetishist == "unset" && $arcologies[0].FSHedonisticDecadence == "unset">>
		<<set $beauty += 2-$args[0].butt>>
	<<else>>
		<<set $beauty += 1>>
	<</if>>
	<<else>>
	<<set $beauty += 1>>
	<</if>>
<<elseif $args[0].hips < 0>>
	<<if $args[0].butt > 4>>
	<<if $arcologies[0].FSTransformationFetishist == "unset" && $arcologies[0].FSHedonisticDecadence == "unset">>
		<<set $beauty += 4-$args[0].butt>>
	<<else>>
		<<set $beauty += 1>>
	<</if>>
	<<else>>
	<<set $beauty += 1>>
	<</if>>
<<elseif $args[0].hips > 2>>
	<<if $args[0].butt <= 8>>
	<<set $beauty += $args[0].butt-8>>
	<<else>>
	<<set $beauty += 1>>
	<</if>>
<<elseif $args[0].hips > 1>>
	<<if $args[0].butt <= 3>>
	<<set $beauty += $args[0].butt-4>>
	<<else>>
	<<set $beauty += 1>>
	<</if>>
<<elseif $args[0].hips > 0>>
	<<if $args[0].butt > 8>>
	<<if $arcologies[0].FSTransformationFetishist == "unset" && $arcologies[0].FSHedonisticDecadence == "unset">>
		<<set $beauty += 8-$args[0].butt>>
	<<else>>
		<<set $beauty += 1>>
	<</if>>
	<<elseif $args[0].butt <= 2>>
	<<set $beauty += $args[0].butt-3>>
	<<else>>
	<<set $beauty += 1>>
	<</if>>
<<else>>
	<<if $args[0].butt > 6>>
	<<if $arcologies[0].FSTransformationFetishist == "unset" && $arcologies[0].FSHedonisticDecadence == "unset">>
		<<set $beauty += 6-$args[0].butt>>
	<<else>>
		<<set $beauty += 1>>
	<</if>>
	<<elseif $args[0].butt <= 1>>
	<<set $beauty += $args[0].butt-2>>
	<<else>>
	<<set $beauty += 1>>
	<</if>>
<</if>>

<<if $args[0].boobs > 250>>
<<if $args[0].boobShape == "perky">>
	<<set $beauty += 6>>
<<elseif $args[0].boobShape == "torpedo-shaped">>
	<<set $beauty += 6>>
<<elseif $args[0].boobShape == "downward-facing">>
	<<set $beauty -= 4>>
<<elseif $args[0].boobShape == "saggy">>
	<<set $beauty -= 4>>
<</if>>
<</if>>

<<if $args[0].nipples == "huge">>
	<<set $beauty += 4>>
<<elseif $args[0].nipples == "inverted">>
	<<set $beauty += 2>>
<<elseif $args[0].nipples == "puffy">>
	<<set $beauty += 2>>
<<elseif $args[0].nipples == "tiny">>
	<<set $beauty -= 2>>
<</if>>

<<if $args[0].anus > 3>>
	<<set $beauty -= 10+($args[0].anus*2)>> /*-20*/
<</if>>
<<if $args[0].vagina > 3>>
	<<set $beauty -= 10+($args[0].vagina*2)>> /*-20*/
<</if>>

<<if $arcologies[0].FSHedonisticDecadence > 20>>
	<<if $args[0].weight < -95>>
		<<set $beauty += -70+($args[0].weight/10)>> /*-80*/
	<<elseif $args[0].weight < -30>>
		<<set $beauty += -30+($args[0].weight/3)>> /*-61*/
	<<elseif $args[0].weight < -10>>
		<<set $beauty += ($args[0].weight)>> /*-30*/
	<<elseif $args[0].weight <= 10>>
	<<elseif $args[0].weight <= 30>>
		<<set $beauty += ($args[0].weight/2)>> /*15*/
	<<elseif $args[0].weight <= 95>>
		<<set $beauty += 15+($args[0].weight/7)>> /*28.5*/
	<<elseif $args[0].weight <= 130>>
		<<set $beauty += 28+($args[0].weight/10)>> /*41*/
	<<elseif $args[0].weight <= 160>>
		<<set $beauty += 42+($args[0].weight/20)>> /*50*/
	<<elseif $args[0].weight <= 190>>
		<<set $beauty += 50-($args[0].weight/25)>> /*42.5*/
	<<else>>
		<<set $beauty += 40-($args[0].weight/20)>> /*30*/
	<</if>>
<<else>>
	<<if ($args[0].weight > 130)>>
		<<set $beauty -= Math.abs($args[0].weight)/5>>
	<<elseif ($args[0].hips > 2)>>
		<<if ($args[0].weight < -10)>>
			<<set $beauty -= Math.abs($args[0].weight)/10>>
		<</if>>
	<<elseif ($args[0].hips > 1)>>
		<<if ($args[0].weight > 95)>>
			<<set $beauty -= Math.abs($args[0].weight)/15>>
		<<elseif ($args[0].weight < -30)>>
			<<set $beauty -= Math.abs($args[0].weight)/10>>
		<</if>>
	<<elseif ($args[0].hips < -1)>>
		<<if ($args[0].weight < -95) || ($args[0].weight > 30)>>
			<<set $beauty -= Math.abs($args[0].weight)/10>>
		<</if>>
	<<else>>
		<<if Math.abs($args[0].weight) > 30>>
			<<set $beauty -= Math.abs($args[0].weight)/10>>
		<</if>>
	<</if>>
<</if>>

<<if ($arcologies[0].FSGenderRadicalist > 20 && $arcologies[0].FSGenderRadicalistLawFuta != 3) || ($arcologies[0].FSSlimnessEnthusiast > 20)>>
	<<if $args[0].hips < 0>>
	<<set $beauty += Math.abs($args[0].hips)>>
	<</if>>
<</if>>
<<if $arcologies[0].FSRestart != "unset">> /* Eugenics does not like slaves having working balls */
	<<if $args[0].balls > 0 && $args[0].ballType == "human">>
		<<set $beauty -= $args[0].balls*(1+($arcologies[0].FSRestart/100))>>
	<</if>>
<</if>>
<<if $arcologies[0].FSGenderRadicalist != "unset">>
	<<if ($args[0].bellyPreg >= 500) && $arcologies[0].FSRepopulationFocus == "unset" && $arcologies[0].FSRestart == "unset" && $args[0].mpreg == 0>>
		<<if $args[0].mpreg == 1>>
			<<set $beauty = ($beauty*0.9)>>
		<<else>>
			<<set $beauty = ($beauty*0.7)>>
		<</if>>
	<</if>>
<<elseif $arcologies[0].FSGenderFundamentalist != "unset">>
	<<if $args[0].shoulders > $args[0].hips>>
	<<if $args[0].boobs <= 2000*($args[0].shoulders-$args[0].hips)>>
		<<set $beauty -= ($args[0].shoulders-$args[0].hips)*(1+($arcologies[0].FSGenderFundamentalist/200))>>
	<</if>>
	<</if>>
<<else>>
	<<if $args[0].shoulders > $args[0].hips>>
	<<if $args[0].boobs <= 2000*($args[0].shoulders-$args[0].hips)>>
		<<set $beauty -= $args[0].shoulders-$args[0].hips>>
	<</if>>
	<</if>>
	<<if $args[0].preg > 10 && $arcologies[0].FSRepopulationFocus == "unset" && $arcologies[0].FSRestart == "unset">>
		<<set $beauty = ($beauty*0.8)>>
	<</if>>
<</if>>

<<if $arcologies[0].FSPhysicalIdealist != "unset">>
	<<if $arcologies[0].FSPhysicalIdealistLaw == 1>>
		<<if (Math.abs($args[0].weight) <= 30) && $args[0].health >= 20 && $args[0].muscles >= 20 && $args[0].muscles <= 50>>
			<<set $beauty += ($args[0].muscles+(Math.min($args[0].health,300)/5))*($arcologies[0].FSPhysicalIdealist/100)>>
		<<else>>
			<<set $beauty -= 30>>
		<</if>>
	<<else>>
		<<if $args[0].muscles > 30 || $args[0].muscles <= -5>>
			<<set $beauty += ($args[0].muscles*($arcologies[0].FSPhysicalIdealist/120))>> /*+-83*/
		<</if>>
	<</if>>
	<<if $arcologies[0].FSPhysicalIdealistStrongFat == 1>>
		<<if $args[0].weight > 10 && $args[0].weight <= 130>>
			<<set $beauty += ($args[0].weight*($arcologies[0].FSPhysicalIdealist/200))>> /*65*/
		<<else>>
			<<set $beauty -= Math.abs($args[0].weight)/2>>
		<</if>>
	<</if>>
	<<if $args[0].height > Height.mean($args[0])>>
		<<set $beauty += 10>>
	<</if>>
<<elseif $arcologies[0].FSHedonisticDecadence != "unset">>
	<<if $args[0].muscles < -10>>
		<<set $beauty += (Math.abs($args[0].muscles)*($arcologies[0].FSHedonisticDecadence/160))>> /*62.5*/
	<<elseif $args[0].muscles > 5>>
		<<if $arcologies[0].FSHedonisticDecadenceStrongFat == 1>>
			<<set $beauty += ($args[0].muscles*($arcologies[0].FSHedonisticDecadence/200))>> /*50*/
		<<else>>
			<<set $beauty -= ($args[0].muscles*($arcologies[0].FSHedonisticDecadence/200))>> /*-50*/
		<</if>>
	<</if>>
<</if>>
<<if $args[0].vagina == 10>>
	<<set $beauty -= 30>>
<</if>>

<<if $args[0].customDesc == "She has a massive scar down her front from where her body exploded under the pressure of her bloated womb.">>
	<<if $arcologies[0].FSDegradationist != "unset">>
		<<set $beauty += 15>>
	<<else>>
		<<set $beauty -= 15>>
	<</if>>
<</if>>

<<if $arcologies[0].FSRepopulationFocus > 40>>
<<if $args[0].preg > 30>> /*limited huge boost for full term */
	<<if $args[0].broodmother > 0>>
		<<set $beauty += 10*$args[0].broodmother*($arcologies[0].FSRepopulationFocus/25)>> /*40-80 limited due to constant presence. Also good breeders, but subpar mothers*/
	<<elseif $args[0].bellyPreg >= 600000>>
		<<set $beauty += 15*($arcologies[0].FSRepopulationFocus/10)>> /*150*/
	<<elseif $args[0].bellyPreg >= 300000>>
		<<set $beauty += 10*($arcologies[0].FSRepopulationFocus/10)>> /*100*/
	<<elseif $args[0].bellyPreg >= 120000>>
		<<set $beauty += 9*($arcologies[0].FSRepopulationFocus/10)>> /*90*/
	<<else>>
		<<set $beauty += 8*($arcologies[0].FSRepopulationFocus/10)>> /*80*/
	<</if>>
<<elseif $args[0].preg > 20>>
	<<if $args[0].pregType >= 20>>
		<<set $beauty += 10*($arcologies[0].FSRepopulationFocus/40)>> /*25*/
	<<elseif $args[0].pregType >= 10>>
		<<set $beauty += 9*($arcologies[0].FSRepopulationFocus/40)>> /*22.5*/
	<<else>>
		<<set $beauty += 8*($arcologies[0].FSRepopulationFocus/40)>> /*20*/
	<</if>>
<<elseif $args[0].preg > 10>>
	<<if $args[0].pregType >= 20>>
		<<set $beauty += 10*($arcologies[0].FSRepopulationFocus/50)>> /*20*/
	<<elseif $args[0].pregType >= 10>>
		<<set $beauty += 8*($arcologies[0].FSRepopulationFocus/50)>> /*16*/
	<<else>>
		<<set $beauty += 5*($arcologies[0].FSRepopulationFocus/50)>> /*10*/
	<</if>>
<<elseif $args[0].pregWeek < 0>>
	<<set $beauty += $arcologies[0].FSRepopulationFocus/10>> /*10*/
<<elseif $args[0].preg > 0 && $args[0].collar == "preg biometrics">>
	<<set $beauty += $arcologies[0].FSRepopulationFocus/12>> /*8.33*/
<<else>>
	<<set $beauty -= 2*($arcologies[0].FSRepopulationFocus/5)>> /*-40*/
<</if>>
<<if $args[0].births > 50>>
	<<set $beauty += 50*($arcologies[0].FSRepopulationFocus/75)>> /*66.6*/
<<else>>
	<<set $beauty += $args[0].births*($arcologies[0].FSRepopulationFocus/75)>>
<</if>>
<<elseif $arcologies[0].FSRestart > 40>>
<<if $args[0].breedingMark == 1>>
	<<if $args[0].preg > 5 && $args[0].pregSource == -1>>
		<<set $beauty += $arcologies[0].FSRestart>> /*100*/
	<</if>>
<<else>>
<<if $args[0].preg > 30>>
	<<if $args[0].bellyPreg >= 600000>>
		<<set $beauty -= 100*($arcologies[0].FSRestart/40)>> /*-250*/
	<<elseif $args[0].bellyPreg >= 300000>>
		<<set $beauty -= 50*($arcologies[0].FSRestart/40)>> /*-125*/
	<<elseif $args[0].bellyPreg >= 120000>>
		<<set $beauty -= 40*($arcologies[0].FSRestart/40)>> /*-100*/
	<<else>>
		<<set $beauty -= 30*($arcologies[0].FSRestart/40)>> /*-75*/
	<</if>>
<<elseif $args[0].preg > 20>>
	<<if $args[0].pregType >= 20>>
		<<set $beauty -= 40*($arcologies[0].FSRestart/60)>> /*-66.6*/
	<<elseif $args[0].pregType >= 10>>
		<<set $beauty -= 30*($arcologies[0].FSRestart/60)>> /*-50*/
	<<else>>
		<<set $beauty -= 20*($arcologies[0].FSRestart/60)>> /*-33.3*/
	<</if>>
<<elseif $args[0].preg > 10>>
	<<if $args[0].pregType >= 20>>
		<<set $beauty -= 30*($arcologies[0].FSRestart/80)>> /*-37.5*/
	<<elseif $args[0].pregType >= 10>>
		<<set $beauty -= 20*($arcologies[0].FSRestart/80)>> /*-25*/
	<<else>>
		<<set $beauty -= 10*($arcologies[0].FSRestart/80)>> /*-12.5*/
	<</if>>
<<elseif $args[0].preg == -2>>
	<<set $beauty += 10*($arcologies[0].FSRestart/70)>> /*14.2*/
<<elseif $args[0].preg < 1>>
	<<set $beauty += 10*($arcologies[0].FSRestart/50)>> /*20*/
<</if>>
<<if $args[0].births > 50>>
	<<set $beauty -= 50*($arcologies[0].FSRestart/50)>> /*-100*/
<<else>>
	<<set $beauty -= $args[0].births*($arcologies[0].FSRestart/50)>>
<</if>>
<</if>>
<</if>>

<<if $args[0].bellyImplant >= 1500>>
	<<if $arcologies[0].FSTransformationFetishist > 20>>
		<<set $beauty += Math.min(Math.trunc($args[0].bellyImplant/1000), 50)>> /*50*/
	<<elseif $arcologies[0].FSRepopulationFocus > 60>>
		<<if ($args[0].ovaries == 0 && $args[0].mpreg == 0) || $args[0].preg < -1>>
			<<set $beauty += 20>>
		<</if>>
	<<else>>
		<<if $args[0].bellyImplant >= 750000>>
			<<set $beauty = ($beauty*0.2)>>
		<<elseif $args[0].bellyImplant >= 450000>>
			<<set $beauty = ($beauty*0.5)>>
		<<elseif $args[0].bellyImplant >= 300000>>
			<<set $beauty = ($beauty*0.7)>>
		<<elseif $args[0].bellyImplant >= 100000>>
			<<set $beauty = ($beauty*0.80)>>
		<<elseif $args[0].bellyImplant >= 50000>>
			<<set $beauty = ($beauty*0.85)>>
		<<else>>
			<<set $beauty = ($beauty*0.9)>>
		<</if>>
	<</if>>
<</if>>

<<if $args[0].bellySag > 0>>
<<if $args[0].belly < 100>>
<<if $arcologies[0].FSRepopulationFocus != "unset">>
<<else>>
	<<set $beauty -= 20>>
<</if>>
<</if>>
<</if>>

<<if $args[0].pubertyXX == 1>>
	<<set $beauty += 5>>
<</if>>
<<if $args[0].pubertyXY == 0 && $args[0].physicalAge > $potencyAge && $args[0].balls > 0>>
	<<set $beauty += 10>>
<</if>>

<<if ($args[0].butt > 4) && ($args[0].boobs > 800)>>
	<<if $arcologies[0].FSSlimnessEnthusiast == "unset">>
	<<set $beauty += 1>>
	<</if>>
	<<if $arcologies[0].FSAssetExpansionist != "unset">>
	<<set $beauty += ($arcologies[0].FSAssetExpansionist/20)>>
	<<if canTalk($args[0])>>
	<<if $args[0].voice == 3>>
		<<set $beauty += ($arcologies[0].FSAssetExpansionist/40)>>
	<</if>>
	<</if>>
	<</if>>
<</if>>

<<if ($args[0].boobs < 500) && ($args[0].butt < 3)>>
	<<if ($args[0].muscles <= 30) && $arcologies[0].FSPhysicalIdealist == "unset" && ($args[0].weight <= 10) && $arcologies[0].FSHedonisticDecadence == "unset">>
		<<set $beauty += 40>>
		<<if $arcologies[0].FSSlimnessEnthusiast > 20>>
		<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>>
		<<if canTalk($args[0])>>
		<<if $args[0].voice == 3>>
			<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/40)>>
		<</if>>
		<</if>>
		<</if>>
	<<elseif $arcologies[0].FSPhysicalIdealist != "unset">> /* no muscle malus for muscle loving societies */
		<<if $arcologies[0].FSPhysicalIdealistStrongFat == 1 && ($args[0].weight <= 30)>> /* reduced weight malus for fat loving societies */
			<<set $beauty += 40>>
			<<if $arcologies[0].FSSlimnessEnthusiast > 20>>
				<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>>
				<<if canTalk($args[0]) && $args[0].voice == 3>>
					<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/40)>>
				<</if>>
			<</if>>
		<<elseif ($args[0].weight <= 10)>>
			<<set $beauty += 40>>
			<<if $arcologies[0].FSSlimnessEnthusiast > 20>>
				<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>>
				<<if canTalk($args[0]) && $args[0].voice == 3>>
					<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/40)>>
				<</if>>
			<</if>>
		<</if>>
	<<elseif $arcologies[0].FSHedonisticDecadence != "unset" && ($args[0].weight <= 30)>> /* reduced weight malus for fat loving societies */
		<<if $arcologies[0].FSHedonisticDecadenceStrongFat == 1>> /* no muscle malus for muscle loving societies */
			<<set $beauty += 40>>
			<<if $arcologies[0].FSSlimnessEnthusiast > 20>>
				<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>>
				<<if canTalk($args[0]) && $args[0].voice == 3>>
					<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/40)>>
				<</if>>
			<</if>>
		<<elseif ($args[0].muscles <= 30)>>
			<<set $beauty += 40>>
			<<if $arcologies[0].FSSlimnessEnthusiast > 20>>
				<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>>
				<<if canTalk($args[0]) && $args[0].voice == 3>>
					<<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/40)>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[0].FSGenderFundamentalistLawBeauty + $arcologies[0].FSGenderRadicalistLawBeauty > 0>>
	<<set $genderLawPass = 1>>
	<<if $arcologies[0].FSPhysicalIdealist == "unset" && $arcologies[0].FSHedonisticDecadenceStrongFat == 0 && $args[0].muscles > 30>> /*muscle check*/
		<<set $genderLawPass = 0>>
	<</if>>
	<<if $genderLawPass == 1>>
		<<if $arcologies[0].FSHedonisticDecadence != "unset" || $arcologies[0].FSPhysicalIdealistStrongFat == 1>> /*weight check*/
			<<if $args[0].weight > 130 || $args[0].weight <= -30>>
				<<set $genderLawPass = 0>>
			<</if>>
		<<elseif (Math.abs($args[0].weight) > 30)>>
			<<set $genderLawPass = 0>>
		<</if>>
	<</if>>
	<<if $genderLawPass == 1>> /*asset check*/
		<<if $arcologies[0].FSAssetExpansionist != "unset">>
			<<if $args[0].boobs < 500 || $args[0].boobs > 1600 || $args[0].butt < 3 || $args[0].butt > 6>>
				<<set $genderLawPass = 0>>
			<</if>>
		<<elseif $args[0].boobs < 500 || $args[0].boobs > 800 || $args[0].butt < 3 || $args[0].butt > 4>>
			<<set $genderLawPass = 0>>
		<</if>>
	<</if>>
	<<if $genderLawPass == 1>>
		<<set $beauty += 60>>
	<<else>>
		<<set $beauty -= 10>>
	<</if>>
<</if>>

<<if $arcologies[0].FSSlimnessEnthusiastLaw == 1>>
	<<if ($args[0].boobs < 300) && ($args[0].butt <= 1) && ($args[0].waist <= 10)>>
		<<set _slimPass = 1>>
		<<if $arcologies[0].FSPhysicalIdealist == "unset" && $arcologies[0].FSHedonisticDecadenceStrongFat == 0 && $args[0].muscles > 30>> /*muscle check*/
			<<set _slimPass = 0>>
		<</if>>
		<<if _slimPass == 1>>
			<<if $arcologies[0].FSHedonisticDecadence != "unset" || $arcologies[0].FSPhysicalIdealistStrongFat == 1>> /*weight check*/
				<<if $args[0].weight > 30>>
					<<set _slimPass = 0>>
				<</if>>
			<<elseif $args[0].weight > 10>>
				<<set _slimPass = 0>>
			<</if>>
		<</if>>
		<<if _slimPass == 1>>
			<<set $beauty += 40+($arcologies[0].FSSlimnessEnthusiast/20)>> /*45*/
		<<else>>
			<<set $beauty -= ($arcologies[0].FSSlimnessEnthusiast/20)>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[0].FSHedonisticDecadenceLaw2 == 1>>
	<<if ($args[0].boobs >= 2000) && ($args[0].butt >= 5) && ($args[0].weight > 95)>>
		<<set $beauty += 5+($arcologies[0].FSHedonisticDecadence/20)>> /*10*/
	<<else>>
		<<set $beauty -= 15+($arcologies[0].FSHedonisticDecadence/20)>> /*-20*/
	<</if>>
<</if>>

<<if ($args[0].boobsImplant == 0) && ($args[0].buttImplant == 0) && ($args[0].waist >= -95) && ($args[0].lipsImplant == 0) && ($args[0].faceImplant < 30) && ($args[0].bellyImplant == -1) && (Math.abs($args[0].shouldersImplant) < 2) && (Math.abs($args[0].hipsImplant) < 2)>>
	<<set $pure += 1>>
	<<if $arcologies[0].FSBodyPurist != "unset">>
	<<set $beauty += ($arcologies[0].FSBodyPurist/5)>>
	<</if>>
	<<if $arcologies[0].FSTransformationFetishist == "unset">>
	<<set $beauty += 2>>
	<</if>>
<<else>>
	<<if $arcologies[0].FSTransformationFetishist != "unset">>
	<<set $beauty += ($arcologies[0].FSTransformationFetishist/40)>>
	<</if>>
<</if>>

<<if $arcologies[0].FSTransformationFetishist != "unset">>
	<<if (Math.abs($args[0].shouldersImplant) > 1)>>
		<<set $beauty += ($arcologies[0].FSTransformationFetishist/20)+(Math.abs($args[0].shouldersImplant))>>
	<</if>>
	<<if (Math.abs($args[0].hipsImplant) > 1)>>
		<<set $beauty += ($arcologies[0].FSTransformationFetishist/20)+(Math.abs($args[0].hipsImplant))>>
	<</if>>
	<<set _race = $args[0].race>>
	<<if _race.indexOf("surgically") != -1>>
		<<set $beauty += ($arcologies[0].FSTransformationFetishist/20)>>
	<</if>>
	<<if $args[0].faceImplant > 95 && $args[0].face > 40>>
		<<set $beauty += ($arcologies[0].FSTransformationFetishist/4)>>
	<</if>>
	<<if $args[0].nipples == "fuckable">>
		<<set $beauty += ($arcologies[0].FSTransformationFetishist/10)>>
	<</if>>
<</if>>

<<if $arcologies[0].FSBodyPurist != "unset">>
	<<if $args[0].faceImplant > 5>>
		<<set $beauty -= ($arcologies[0].FSBodyPurist/100)*($args[0].faceImplant/10)>>
	<</if>>
	<<set _race = $args[0].race>>
	<<if _race.indexOf("surgically") != -1>>
		<<set $beauty -= ($arcologies[0].FSBodyPurist/20)>>
	<</if>>
<<elseif $arcologies[0].FSTransformationFetishist == "unset">>
	<<if $args[0].faceImplant > 30>>
		<<set $beauty -= ($args[0].faceImplant-30)/10>>
	<</if>>
<</if>>

<<if !canTalk($args[0])>>
	<<set $beauty -= 2>>
<<else>>
	<<if ($args[0].accent >= 3)>>
	<<set $beauty -= 1>>
	<<elseif ($args[0].accent == 1)>>
	<<set $beauty += 1>>
	<</if>>
<</if>>

<<if ($args[0].physicalAge < 11)>>
	<<set $beauty += 2>>
<<elseif ($args[0].physicalAge < 13)>>
<<elseif $args[0].underArmHStyle == "neat">>
<<elseif $args[0].underArmHStyle == "hairless">>
	<<set $beauty += 2>>
<<elseif $args[0].underArmHStyle == "bald">>
	<<set $beauty += 2>>
<<elseif ($args[0].underArmHStyle == "waxed")>>
	<<set $beauty += 2>>
<<elseif $args[0].underArmHStyle == "shaved">>
	<<set $beauty += 2>>
<<elseif $args[0].underArmHStyle == "bushy">>
	<<set $beauty -= 2>>
<</if>>

<<if ($args[0].physicalAge < 11)>>
	<<set $beauty += 2>>
<<elseif ($args[0].physicalAge < 13)>>
<<elseif $args[0].pubicHStyle == "neat">>
<<elseif $args[0].pubicHStyle == "in a strip">>
<<elseif $args[0].pubicHStyle == "hairless">>
	<<set $beauty += 2>>
<<elseif $args[0].pubicHStyle == "bald">>
	<<set $beauty += 2>>
<<elseif ($args[0].pubicHStyle == "waxed")>>
	<<set $beauty += 2>>
<<elseif $args[0].pubicHStyle == "bushy">>
	<<set $beauty -= 4>>
<<elseif $args[0].pubicHStyle == "bushy in the front and neat in the rear">>
	<<set $beauty -= 2>>
<</if>>

<<if $args[0].amp == 0>>
<<elseif $args[0].amp == 1>>
	<<set $beauty -= 10>>
<<elseif $args[0].amp == -3>>
<<elseif $args[0].amp == -5>>
<<else>>
	<<set $beauty -= 2>>
<</if>>

<<if $arcologies[0].FSChattelReligionistCreed == 1>>
<<if $nicaeaAssignment == $args[0].assignment>>
	<<set $beauty += $nicaeaPower*2>>
<</if>>
<</if>>

<<if $args[0].prestige > 0>>
	<<set $beauty = $beauty+($beauty*$args[0].prestige*0.1)>>
<</if>>

<<if $args[0].breedingMark == 1>>
	<<set $beauty = Math.trunc($beauty*2)>>
<</if>>

<<if $beauty < 1>>
	<<set $beauty = 1>>
<<else>>
	<<set $beauty = Math.trunc($beauty*0.5)>>
<</if>>

<</widget>>

<<widget "Deadliness">>

<<set $deadliness = 2>>

<<if $args[0].combatSkill > 0>>
	<<set $deadliness += 2>>
<</if>>

<<if setup.bodyguardCareers.includes($Bodyguard.career)>>
	<<set $deadliness += 1>>
<<elseif $Bodyguard.skillBG >= $masteredXP>>
	<<set $deadliness += 1>>
<</if>>

<<if ($args[0].muscles > 30) && ($args[0].muscles <= 95)>>
	<<set $deadliness += 1>>
<<elseif ($args[0].muscles > 95) && ($args[0].height >= 185)>>
	<<set $deadliness += 2>>
<<elseif ($args[0].muscles > 95)>>
	<<set $deadliness -= 1>>
<<elseif ($args[0].muscles < -95)>>
	<<set $deadliness -= 20>>
<<elseif ($args[0].muscles < -30)>>
	<<set $deadliness -= 7>>
<<elseif ($args[0].muscles < -5)>>
	<<set $deadliness -= 3>>
<</if>>

<<if $args[0].height >= 170>>
	<<set $deadliness += 1>>
<</if>>

<<if $args[0].health > 50>>
	<<set $deadliness += 1>>
<</if>>

<<if $args[0].boobs > 4000>>
	<<set $deadliness -= 2>>
<<elseif $args[0].boobs > 2000>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].butt > 6>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].hips > 2>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].weight > 190>>
	<<set $deadliness -= 20>>
<<elseif $args[0].weight > 160>>
	<<set $deadliness -= 10>>
<<elseif $args[0].weight > 130>>
	<<set $deadliness -= 3>>
<<elseif $args[0].weight > 30 || $args[0].weight < -10>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].health < -50>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].bellyFluid >= 10000>>
	<<set $deadliness -= 3>>
<<elseif $args[0].bellyFluid >= 5000>>
	<<set $deadliness -= 2>>
<<elseif $args[0].bellyFluid >= 2000>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].pregKnown == 1 || $args[0].bellyPreg >= 1500 || $args[0].bellyImplant >= 1500>>
	<<if $args[0].belly >= 750000>>
		<<set $deadliness -= 50>>
	<<elseif $args[0].belly >= 600000>>
		<<set $deadliness -= 25>>
	<<elseif $args[0].belly >= 450000>>
		<<set $deadliness -= 15>>
	<<elseif $args[0].belly >= 300000>>
		<<set $deadliness -= 10>>
	<<elseif $args[0].belly >= 150000>>
		<<set $deadliness -= 8>>
	<<elseif $args[0].belly >= 100000>>
		<<set $deadliness -= 7>>
	<<elseif $args[0].belly >= 10000>>
		<<set $deadliness -= 3>>
	<<elseif $args[0].belly >= 5000>>
		<<set $deadliness -= 2>>
	<<else>>
		<<set $deadliness -= 1>>
	<</if>>
<</if>>
<<if $args[0].labor == 1>>
	<<set $deadliness -= 15>>
<<elseif $args[0].preg >= 40 && $args[0].pregControl != "labor supressors">>
	<<set $deadliness -= 5>>
<</if>>

<<if $args[0].balls >= 15>>
	<<set $deadliness -= 1>>
<</if>>
<<if $args[0].dick >= 10>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].amp == 0>>
  <<if !canWalk($args[0])>>
	<<set $deadliness -= 20>>
  <</if>>
<<elseif $args[0].amp == 1>>
	<<set $deadliness -= 20>>
<<elseif $args[0].amp == -5>>
	<<set $deadliness += 10>>
<<elseif $args[0].amp == -4>>
	<<set $deadliness += 5>>
<<else>>
	<<set $deadliness -= 1>>
<</if>>

<<if !canSee($args[0])>>
	<<set $deadliness -= 8>>
<<elseif ($args[0].eyes == -1 && !["corrective glasses", "corrective contacts"].includes($args[0].eyewear)) || ($args[0].eyes == 1 && ["blurring glasses", "blurring contacts"].includes($args[0].eyewear))>>
	<<set $deadliness -= 1>>
<</if>>

<<if $deadliness < 1>>
	<<set $deadliness = 1>>
<</if>>

<</widget>>

<<widget "SlaveTitle">>

<<if $newDescriptions == 1>>

<<if $args[0].dick > 0 && $args[0].balls > 0 && $args[0].boobs > 300 && $args[0].vagina > -1 && $args[0].ovaries == 1>>
	<<if random(1,100) > 50>>
		<<set $desc = "futanari">>
	<<else>>
		<<set $desc = "herm">>
	<</if>>
<<elseif $args[0].dick > 0 && $args[0].balls == 0 && $args[0].boobs > 300 && $args[0].vagina > -1 && $args[0].ovaries == 1>>
	<<set $desc = "dickgirl">>
<<elseif $args[0].dick > 0 && $args[0].vagina > -1 && $args[0].ovaries == 0>>
	<<set $desc = "shemale">>
<<elseif $args[0].dick > 0 && $args[0].balls == 0 && $args[0].vagina == -1 && $args[0].ovaries == 0>>
	<<set $desc = "eunuch">>
<<elseif $args[0].dick > 0 && $args[0].balls > 0 && $args[0].vagina == -1 && $args[0].ovaries == 0>>
	<<if $args[0].face > 10 && $args[0].hips > -1 && $args[0].shoulders < 1 && $args[0].faceShape != "masculine">>
		<<set $desc = "trap">>
	<<elseif $args[0].boobs > 800>>
		<<set $desc = "tittyboy">>
	<<elseif $args[0].dick == 1 && $args[0].balls == 1>>
		<<set $desc = "sissy">>
	<<elseif $args[0].dick > 1 && $args[0].balls > 1 && $args[0].height < 165 && $args[0].muscles < 5 && $args[0].visualAge < 19 && $args[0].faceShape != "masculine">>
		<<set $desc = "twink">>
	<<elseif $args[0].dick > 1 && $args[0].balls > 1 && $args[0].height < 160 && $args[0].muscles < 5 && $args[0].visualAge < 19>>
		<<set $desc = "boytoy">>
	<<elseif $args[0].muscles > 95 && $args[0].height >= 185>>
		<<set $desc = "titan">>
	<<elseif $args[0].muscles > 30>>
		<<set $desc = "muscleboy">>
	<<else>>
		<<set $desc = "slaveboy">>
	<</if>>
<<elseif $args[0].dick == 0 && $args[0].balls == 0 && $args[0].vagina > -1>>
	<<if ($args[0].shoulders > $args[0].hips || $args[0].faceShape == "masculine") && $args[0].boobs < 400 && $args[0].genes == "XY">>
		<<set $desc = "cuntboy">>
	<<elseif $args[0].ovaries == 0 && $args[0].genes == "XY">>
		<<set $desc = "tranny">>
	<<elseif $args[0].weight > 10 && $args[0].boobs > 800 && $args[0].birthsTotal > 0 && $args[0].physicalAge > 59>>
		<<set $desc = "GMILF">>
	<<elseif $args[0].weight > 10 && $args[0].boobs > 800 && $args[0].birthsTotal > 0 && $args[0].physicalAge > 35>>
		<<set $desc = "MILF">>
	<<elseif $args[0].lips > 70 && $args[0].boobs > 2000 && $args[0].butt > 3>>
		<<set $desc = "bimbo">>
	<<elseif $args[0].hips > 1 && $args[0].boobs > 2000 && $args[0].butt > 3 && $args[0].waist < 50>>
		<<set $desc = "hourglass">>
	<<elseif $args[0].muscles > 95 && $args[0].height >= 185>>
		<<set $desc = "amazon">>
	<<elseif $args[0].muscles > 30>>
		<<set $desc = "musclegirl">>
	<<else>>
		<<set $desc = "slavegirl">>
	<</if>>
<<elseif $args[0].dick == 0 && $args[0].balls == 0 && $args[0].vagina == -1>>
	<<set $desc = "neuter">>
<<elseif $args[0].dick == 0 && $args[0].vagina == -1>>
	<<set $desc = "ballslave">>
<<else>>
	<<set $desc = "slave">>
<</if>>

<<if $args[0].visualAge < 13>>
	<<if $args[0].genes == "XY" && $args[0].vagina == -1>>
		<<set $desc = "shota " + $desc>>
	<<else>>
		<<set $desc = "loli " + $desc>>
	<</if>>
<</if>>

<<if $args[0].dick > 9 && $args[0].balls > 9 && $args[0].boobs > 12000>>
	<<set $desc = "hyper " + $desc>>
<</if>>

<<if $args[0].boobs > 4000 && $args[0].lactation > 0>>
	<<if $args[0].physicalAge < 13>>
		<<set $desc = $desc + " calf">>
	<<else>>
		<<set $desc = $desc + " cow">>
	<</if>>
<<elseif $args[0].lactation > 0>>
	<<set $desc = "milky " + $desc>>
<</if>>

<<if $args[0].boobs > 20000>>
	<<set $desc = "supermassive titted " + $desc>>
<<elseif $args[0].boobs > 10000>>
	<<set $desc = "giant titted " + $desc>>
<<elseif $args[0].boobs > 4000>>
	<<set $desc = "huge titted " + $desc>>
<<elseif $args[0].boobs > 1000>>
	<<set $desc = "busty " + $desc>>
<</if>>

<<if $args[0].dick > 5 && $args[0].balls > 5>>
	<<set $desc = "womb filling " + $desc>>
<<elseif $args[0].dick > 5>>
	<<set $desc = "well hung " + $desc>>
<</if>>

<<if $args[0].butt >= 12>>
	<<set $desc = "colossal assed " + $desc>>
<<elseif $args[0].butt >= 12>>
	<<set $desc = "massive assed " + $desc>>
<<elseif $args[0].butt >= 8>>
	<<set $desc = "fat assed " + $desc>>
<<elseif $args[0].butt >= 6>>
	<<set $desc = "bottom heavy " + $desc>>
<<elseif $args[0].butt >= 4>>
	<<set $desc = "big bottomed " + $desc>>
<</if>>

<<if $args[0].weight > 10 && $args[0].weight < 100 && $args[0].boobs > 5000 && $args[0].butt > 5 && $args[0].hips >= 2 && $args[0].bellyPreg >= 30000 && $args[0].births >= 10>>
	<<set $desc = $desc + "fertility goddess">>
<<elseif $args[0].births >= 6>>
	<<set $desc = $desc + " broodmother">>
<<elseif $args[0].births >= 3>>
	<<set $desc = $desc + " breeder">>
<</if>>

<<if $args[0].indenture > -1>>
	<<set $desc = "indentured " + $desc>>
<</if>>

<<if $args[0].preg > 10 && $args[0].pregKnown == 1>>
	<<set $desc = "pregnant " + $desc>>
<<elseif $args[0].bellyFluid >= 5000>>
	<<set $desc = "bloated " + $desc>>
<<elseif $args[0].belly >= 5000>>
	<<set $desc = "gravid " + $desc>>
<</if>>

<<if $args[0].fuckdoll > 0>>
	<<set $desc = $desc + " fuckdoll">>
<</if>>

<<else>>

<<set $desc = "slave">> /* I don't tihnk there is an 'else'? */
<<if ($args[0].dick == 0) && ($args[0].vagina == -1)>> /* NULLS */
	<<set $desc = "null">>
		<<if ($args[0].lactation > 0) && ($args[0].boobs > 2000)>>
			<<set $desc = $desc + " cow">>
		<<elseif ($args[0].boobsImplant > 0) && ($args[0].buttImplant > 0)>>
			<<set $desc = $desc + " bimbo ">>
		<<elseif $args[0].boobs > 6000>>
			<<set $desc = $desc + " boob">>
		<<elseif $args[0].butt > 6>>
			<<set $desc = $desc + " ass">>
		<<elseif ($args[0].muscles > 30) && ($args[0].height < 185)>>
				<<set $desc = $desc + " muscle">>
		<</if>>
			<<if $args[0].visualAge > 55>>
				<<set $desc = $desc + "GILF">>
			<<elseif $args[0].visualAge > 35>>
				<<set $desc = $desc + "MILF">>
			<<elseif $args[0].visualAge >= 25>>
				<<set $desc = $desc + "slave">>
			<<else>>
				<<set $desc = $desc + "girl">>
			<</if>>
<</if>>

<<if ($args[0].dick == 0) && ($args[0].vagina != -1)>> /* FEMALES */
	<<if $args[0].visualAge > 55>>
		<<set $desc = "GILF">>
	<<elseif $args[0].visualAge > 35>>
		<<set $desc = "MILF">>
	<<elseif $args[0].visualAge >= 25>>
		<<set $desc = "slave">>
	<<else>>
		<<set $desc = "slavegirl">>
	<</if>>
		<<if ($args[0].muscles > 30) && ($args[0].height < 185)>>
				<<set $desc = "muscle " + $desc>>
		<<elseif ($args[0].lactation > 0) && ($args[0].boobs > 2000)>>
			<<set $desc = $desc + " cow">>
		<<elseif ($args[0].boobsImplant > 0) && ($args[0].buttImplant > 0)>>
			<<set $desc = $desc + " bimbo">>
		<<elseif $args[0].boobs > 6000>>
			<<set $desc = "boob" + $desc>>
		<<elseif $args[0].butt > 6>>
			<<set $desc = "ass" + $desc>>
		<</if>>
<</if>>

<<if ($args[0].dick != 0) && ($args[0].vagina != -1)>>
		<<if $args[0].balls > 0>> /* FUTANARI: cock & balls & vagina */
			<<set $desc = "futanari ">>
		<<else>> /* FUTANARI: cock & vagina */
			<<set $desc = "futa ">>
		<</if>>
			<<if ($args[0].lactation > 0) && ($args[0].boobs > 2000)>>
				<<set $desc = $desc + "cow">>
			<<elseif ($args[0].boobsImplant > 0) && ($args[0].buttImplant > 0)>>
				<<set $desc = $desc + "bimbo ">>
			<<elseif $args[0].boobs > 6000>>
				<<set $desc = $desc + "boob">>
			<<elseif $args[0].butt > 6>>
				<<set $desc = $desc + "ass">>
			<<elseif ($args[0].muscles > 30) && ($args[0].height < 185)>>
				<<set $desc = $desc + "muscle">>
			<</if>>
				<<if $args[0].visualAge > 55>>
					<<set $desc = $desc + "GILF">>
				<<elseif $args[0].visualAge > 35>>
					<<set $desc = $desc + "MILF">>
				<<elseif $args[0].visualAge >= 25>>
					<<set $desc = $desc + "slave">>
				<<else>>
					<<set $desc = $desc + "girl">>
				<</if>>
					<<if $args[0].dick > 5 && $args[0].balls > 5 && $args[0].boobs > 5000>>
						<<set $desc = "hyper " + $desc>>
					<</if>>
<</if>>

<<if ($args[0].dick != 0) && ($args[0].vagina == -1) && ($args[0].balls > 0) && ($args[0].boobs > 300) && ($args[0].butt > 2)>> /* SHEMALES: cock & balls, T&A above minimum */
	<<if $args[0].visualAge > 55>>
		<<set $desc = "sheGILF">>
	<<elseif $args[0].visualAge > 35>>
		<<set $desc = "sheMILF">>
	<<elseif $args[0].visualAge >= 25>>
		<<set $desc = "shemale">>
	<<else>>
		<<set $desc = "tgirl">>
	<</if>>
		<<if ($args[0].muscles > 30) && ($args[0].height < 185)>>
				<<set $desc = "muscle" + $desc>>
		<<elseif ($args[0].lactation > 0) && ($args[0].boobs > 2000)>>
			<<set $desc = $desc + " cow">>
		<<elseif ($args[0].boobsImplant > 0) && ($args[0].buttImplant > 0)>>
			<<set $desc = $desc + " bimbo">>
		<<elseif $args[0].boobs > 6000>>
			<<set $desc = "topheavy " + $desc>>
		<<elseif $args[0].butt > 6>>
			<<set $desc = "bottomheavy " + $desc>>
		<</if>>
<</if>>

<<if ($args[0].boobs < 300) || ($args[0].butt < 2)>>
	<<if ($args[0].dick != 0) && ($args[0].vagina == -1) && ($args[0].balls > 0)>>
		<<if ($args[0].shoulders < 1) || ($args[0].muscles <= 30)>>
			<<if ($args[0].faceShape == "masculine") || ($args[0].faceShape == "androgynous")>> /* SISSIES: feminine shoulders or muscles, masculine faces */
				<<if $args[0].visualAge > 55>>
					<<set $desc = "sissyGILF">>
				<<elseif $args[0].visualAge > 35>>
					<<set $desc = "sissyMILF">>
				<<else>>
					<<set $desc = "sissy">>
				<</if>>
			<<else>> /* TRAPS: feminine shoulders or muscles, feminine faces */
				<<if $args[0].visualAge > 55>>
					<<set $desc = "trapGILF">>
				<<elseif $args[0].visualAge > 35>>
					<<set $desc = "trapMILF">>
				<<elseif $args[0].visualAge >= 25>>
					<<set $desc = "trap">>
				<<else>>
					<<set $desc = "trapgirl">>
				<</if>>
			<</if>>
				<<if $args[0].lactation > 0>>
					<<set $desc = $desc + " cow">>
				<<elseif ($args[0].boobsImplant > 0) && ($args[0].buttImplant > 0)>>
					<<set $desc = $desc + " bimbo">>
				<</if>>
		<</if>>
	<</if>>
<</if>>

<<if ($args[0].boobs < 300) || ($args[0].butt < 2)>>
	<<if ($args[0].dick != 0) && ($args[0].vagina == -1) && ($args[0].balls > 0)>>
		<<if ($args[0].shoulders > 1) || ($args[0].muscles >= 30)>>	/* BITCHES: masculine shoulders or muscles */
			<<set $desc = "bitch">>
				<<if ($args[0].muscles > 30) && ($args[0].height < 185)>>
						<<set $desc = "muscle" + $desc>>
				<<elseif $args[0].lactation > 0>>
						<<set $desc = $desc + "cow">>
				<<elseif ($args[0].boobsImplant > 0) && ($args[0].buttImplant > 0)>>
						<<set $desc = "bimbo " + $desc>>
				<</if>>
					<<if $args[0].visualAge > 55>>
						<<set $desc = "aged " + $desc>>
					<<elseif $args[0].visualAge > 35>>
						<<set $desc = "mature " + $desc>>
					<<elseif $args[0].visualAge < 25>>
						<<set $desc = "young " + $desc>>
					<</if>>
		<</if>>
	<</if>>
<</if>>

<<if ($args[0].dick != 0) && ($args[0].vagina == -1) && ($args[0].balls == 0)>>
	<<set $desc = "dick">>
		<<if $args[0].visualAge > 55>>
			<<set $desc = $desc + "GILF">>
		<<elseif $args[0].visualAge > 35>>
			<<set $desc = $desc + "MILF">>
		<<elseif $args[0].visualAge >= 25>>
			<<set $desc = $desc + "slave">>
		<<else>>
			<<set $desc = $desc + "girl">>
		<</if>>
			<<if ($args[0].muscles > 30) && ($args[0].height < 185)>>
				<<set $desc = "muscle" + $desc>>
			<<elseif ($args[0].lactation > 0) && ($args[0].boobs > 2000)>>
				<<set $desc = $desc + " cow">>
			<<elseif ($args[0].boobsImplant > 0) && ($args[0].buttImplant > 0)>>
				<<set $desc = $desc + " bimbo">>
			<<elseif $args[0].boobs > 6000>>
				<<set $desc = "boob " + $desc>>
			<<elseif $args[0].butt > 6>>
				<<set $desc = "ass " + $desc>>
			<</if>>
<</if>>

<<if ($args[0].muscles > 30) && ($args[0].height > 185)>>
	<<set $desc = "amazon " + $desc>>
<<elseif ($args[0].muscles < 30) && ($args[0].height > 185)>>
	<<set $desc = "statuesque " + $desc>>
<<elseif ($args[0].boobs < 800) && ($args[0].height < 150)>>
	<<set $desc = "petite " + $desc>>
<<elseif ($args[0].boobs > 800) && ($args[0].height < 150)>>
	<<set $desc = "shortstack " + $desc>>
<</if>>

<<if $args[0].births >= 5>>
	<<set $desc = $desc + " broodmother">>
<<elseif $args[0].births >= 2>>
	<<set $desc = $desc + " breeder">>
<</if>>

<<if $args[0].indenture > -1>>
	<<set $desc = "indentured " + $desc>>
<</if>>

<<if $args[0].preg > 10 && $args[0].pregKnown == 1>>
	<<set $desc = "pregnant " + $desc>>
<<elseif $args[0].bellyFluid >= 5000>>
	<<set $desc = "bloated " + $desc>>
<<elseif $args[0].belly >= 5000>>
	<<set $desc = "gravid " + $desc>>
<</if>>

<<if $args[0].fuckdoll > 0>>
	<<set $desc = $desc + " fuckdoll">>
<</if>>

<</if>>

<</widget>>

/* Use is <<modScore $someSlave>> where $someSlave is any variable that points to a valid slave */

<<widget "modScore">>
<<set $piercingScore = 0>>
<<set $tatScore = 0>>
<<if $args[0].earPiercing > 0>><<set $piercingScore += $args[0].earPiercing*0.75-0.5>><</if>>
<<if $args[0].nosePiercing > 0>><<set $piercingScore += $args[0].nosePiercing*0.75-0.5>><</if>>
<<if $args[0].eyebrowPiercing > 0>><<set $piercingScore += $args[0].eyebrowPiercing*0.75-0.5>><</if>>
<<if $args[0].navelPiercing > 0>><<set $piercingScore += $args[0].navelPiercing*0.75-0.5>><</if>>
<<if $args[0].corsetPiercing > 0>><<set $piercingScore += $args[0].corsetPiercing*0.75+0.5>><</if>>
<<if $args[0].nipplesPiercing > 0>><<set $piercingScore += $args[0].nipplesPiercing*0.75-0.25>><</if>>
<<if $args[0].areolaePiercing > 0>><<set $piercingScore += $args[0].areolaePiercing*0.75+0.5>><</if>>
<<if $args[0].lipsPiercing > 0>><<set $piercingScore += $args[0].lipsPiercing*0.75-0.25>><</if>>
<<if $args[0].tonguePiercing > 0 >><<set $piercingScore += $args[0].tonguePiercing*0.75-0.25>><</if>>
<<if $args[0].clitPiercing == 3>><<set $piercingScore += 1.25>> /* smart piercing */
	<<elseif $args[0].clitPiercing > 0>><<set $piercingScore += $args[0].clitPiercing*0.75-0.25>><</if>>
<<if $args[0].vaginaPiercing > 0>><<set $piercingScore += $args[0].vaginaPiercing*0.75-0.25>><</if>>
<<if $args[0].dickPiercing > 0>><<set $piercingScore += $args[0].dickPiercing*0.75-0.25>><</if>>
<<if $args[0].anusPiercing > 0>><<set $piercingScore += $args[0].anusPiercing*0.75-0.25>><</if>>
<<if $args[0].boobsTat != 0>><<set $tatScore += 1.25>><</if>>
<<if $args[0].buttTat != 0>><<set $tatScore += 1.25>><</if>>
<<if $args[0].lipsTat != 0>><<set $tatScore += 1.25>><</if>>
<<if $args[0].shouldersTat != 0>><<set $tatScore += 1>><</if>>
<<if $args[0].backTat != 0>><<set $tatScore += 1.25>><</if>>
<<if $args[0].armsTat != 0>><<set $tatScore += 1>><</if>>
<<if $args[0].legsTat != 0>><<set $tatScore += 1>><</if>>
<<if $args[0].stampTat != 0>><<set $tatScore += 1>><</if>>
<<if $args[0].vaginaTat != 0>><<set $tatScore += 1>><</if>>
<<if $args[0].dickTat != 0>><<set $tatScore += 1>><</if>>
<<if $args[0].bellyTat != 0>>
<<if ($args[0].belly >= 300000)>>
	<<set $tatScore += 0.75>>
<<elseif ($args[0].belly >= 150000)>>
	<<set $tatScore += 1>>
<<elseif ($args[0].belly >= 10000)>>
	<<set $tatScore += 1>>
<<elseif ($args[0].belly >= 5000)>>
	<<set $tatScore += 0.5>>
<<elseif ($args[0].belly >= 1500)>>
	<<set $tatScore += 0.25>>
<<else>>
	<<set $tatScore += 0.1>>
<</if>>
<</if>>
<<if $args[0].anusTat == "bleached">><<set $tatScore += 0.5>>
	<<elseif $args[0].anusTat != 0>><<set $tatScore += 1.25>><</if>>
<<set $modScore = $piercingScore+$tatScore>> /* note: always overwrites previous $modScore */
<</widget>>

<<widget "fetishChangeChance">>

<<if $args[0].clitSetting != $args[0].fetish>>
	<<if $args[0].balls>>
		<<set _sex = $potencyAge-$args[0].actualAge>>
	<<elseif $args[0].ovaries || $args[0].mpreg>>
		<<set _sex = $fertilityAge-$args[0].actualAge>>
	<<else>>
		<<set _sex = 0>>
	<</if>>
	<<set $fetishChangeChance = Math.trunc(Math.clamp(($args[0].devotion/4)-($args[0].fetishStrength/4)-(Math.max(_sex,0)*10), 0, 100))>>
<<else>>
	<<set $fetishChangeChance = 0>>
<</if>>

<</widget>>

<<widget "slaveCost">>

<<Beauty $args[0]>>
<<set FResult($args[0])>>

<<set $slaveCost = ($beauty*$FResult)>>

<<set _slaveMultiplier = $slaveCostFactor>>

<<if $args[0].behavioralFlaw != "none">>
	<<set _slaveMultiplier -= 0.1>>
<</if>>
<<if $args[0].behavioralQuirk != "none">>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if $args[0].sexualFlaw == "breeder" && $arcologies[0].FSRepopulationFocus != "unset">>
	<<set _slaveMultiplier += 0.3>>
<<elseif $args[0].sexualFlaw != "none">>
	<<set _slaveMultiplier -= 0.1>>
<</if>>
<<if $args[0].sexualQuirk != "none">>
	<<set _slaveMultiplier += 0.1>>
<</if>>

<<if $args[0].fetishKnown == 1>>
	<<if $args[0].fetish == "mindbroken">>
		<<set _slaveMultiplier -= 0.3>>
	<<elseif $args[0].fetish != "none">>
		<<set _slaveMultiplier += $args[0].fetishStrength/1000>>
	<</if>>
<<else>>
	<<set _slaveMultiplier -= 0.1>>
<</if>>

<<if $args[0].attrKnown == 1>>
	<<if $args[0].energy > 95>>
	<<set _slaveMultiplier += 0.2>>
	<</if>>
<</if>>

<<if $args[0].vagina == 0>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if $args[0].mpreg == 1>>
	<<set _slaveMultiplier += 0.2>>
<</if>>
<<if $arcologies[0].FSRepopulationFocusSMR == 1>>
	<<if $args[0].preg < -1>>
		<<set _slaveMultiplier -= 0.5>>
	<<elseif ($args[0].bellyPreg >= 300000)>>
		<<set _slaveMultiplier += 1>>
	<<elseif ($args[0].bellyPreg >= 120000)>>
		<<set _slaveMultiplier += 0.5>>
	<<elseif $args[0].preg > 10>>
		<<set _slaveMultiplier += 0.1>>
	<</if>>
<<elseif $arcologies[0].FSRestartSMR == 1>>
	<<if $args[0].preg < -1>>
		<<set _slaveMultiplier += 0.5>>
	<<elseif ($args[0].bellyPreg >= 300000)>>
		<<set _slaveMultiplier -= 2.5>>
	<<elseif ($args[0].bellyPreg >= 30000)>>
		<<set _slaveMultiplier -= 1.5>>
	<<elseif $args[0].preg > 10>>
		<<set _slaveMultiplier -= 1.0>>
	<</if>>
<<else>>
	<<if $args[0].preg < -1>>
		<<set _slaveMultiplier -= 0.1>>
	<<elseif ($activeSlave.bellyPreg >= 300000)>>
		<<set _slaveMultiplier -= 1.5>>
	<<elseif ($activeSlave.bellyPreg >= 120000)>>
		<<set _slaveMultiplier -= 0.5>>
	<<elseif $args[0].preg > 10>>
		<<set _slaveMultiplier -= 0.1>>
	<</if>>
<</if>>
<<set _slaveMultiplier += 0.05*$args[0].intelligence>>
<<if $args[0].intelligenceImplant == 1>>
	<<set _slaveMultiplier += 0.1-($args[0].intelligence*0.02)>>
<</if>>

<<if $args[0].vagina > -1 && $arcologies[0].FSRestartSMR == 1>>
	<<if $args[0].dick > 0>>
	<<if $args[0].ovaries == 0 && $args[0].balls == 0>>
		<<set _slaveMultiplier += 0.8>>
	<</if>>
	<</if>>
<<elseif $args[0].vagina > -1>>
	<<if $args[0].dick > 0>>
		<<if ($ui != "start") || ($PC.dick == 0) || ($PC.vagina == 0)>>
			<<set _slaveMultiplier += 0.2>>
			<<if $args[0].ovaries > 0>>
			<<if $args[0].balls > 0>>
				<<set _slaveMultiplier += 0.8>>
			<</if>>
			<</if>>
		<<else>>
			<<set _slaveMultiplier += 0.1>>
			<<if $args[0].ovaries > 0>>
			<<if $args[0].balls > 0>>
				<<set _slaveMultiplier += 0.2>>
			<</if>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $args[0].pubertyXY == 0 && $args[0].physicalAge >= $potencyAge && $args[0].genes == "XY" && $arcologies[0].FSGenderRadicalist == "unset">>
	<<set _slaveMultiplier += 0.5>>
<</if>>

<<if $args[0].prestige > 0>>
	<<set _slaveMultiplier += 0.7*$args[0].prestige>>
<</if>>

<<if $specialSlavesPriceOverride == 1>>
	<<if $args[0].devotion >= 50>>
		<<set _slaveMultiplier += $args[0].devotion/200>>
	<</if>>
	<<if $args[0].trust >= 50>>
		<<set _slaveMultiplier += $args[0].trust/200>>
	<</if>>
<<else>>
<<set _slaveMultiplier += $args[0].devotion/200>>
<<if $args[0].devotion <= 50>>
	<<set _slaveMultiplier += $args[0].trust/200>>
<<else>>
	<<if $args[0].trust > 0>>
		<<set _slaveMultiplier += $args[0].trust/200>>
	<</if>>
<</if>>
<</if>>

<<if $args[0].brand != 0>>
	<<if $rep > 10000>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif $rep < 5000>>
	<<set _slaveMultiplier -= 0.1>>
	<</if>>
<</if>>

<<if $arcologies[0].FSSupremacistLawME != 0>>
	<<if $args[0].race != $arcologies[0].FSSupremacistRace>>
	<<set _slaveMultiplier -= 0.1>>
	<</if>>
<</if>>
<<if $arcologies[0].FSSubjugationistLawME != 0>>
	<<if $args[0].race == $arcologies[0].FSSubjugationistRace>>
	<<set _slaveMultiplier -= 0.2>>
	<</if>>
<</if>>
<<if $arcologies[0].FSRepopulationFocusSMR != 0>>
	<<if $args[0].preg > 0>>
		<<set _slaveMultiplier += 0.1>>
	<</if>>
<</if>>
<<if $arcologies[0].FSHedonisticDecadenceSMR != 0>>
	<<if $args[0].weight > 60 && $args[0].muscles < 5>>
		<<set _slaveMultiplier += 0.1>>
	<</if>>
<</if>>
<<if $arcologies[0].FSRestartSMR != 0>>
	<<if $args[0].dick > 0>>
		<<set _slaveMultiplier -= 0.1>>
	<</if>>
	<<if $args[0].balls > 0>>
		<<set _slaveMultiplier -= 0.2>>
	<</if>>
	<<if $args[0].vagina > 0>>
		<<set _slaveMultiplier -= 0.1>>
	<</if>>
	<<if $args[0].ovaries > 0>>
		<<set _slaveMultiplier -= 0.5>>
	<</if>>
<</if>>
<<if $arcologies[0].FSGenderFundamentalistSMR != 0>>
	<<if $args[0].dick > 0>>
	<<set _slaveMultiplier -= 0.1>>
	<</if>>
	<<if $args[0].balls > 0>>
	<<set _slaveMultiplier -= 0.1>>
	<</if>>
<</if>>
<<if $arcologies[0].FSGenderRadicalist != "unset">>
	<<if $args[0].dick > 0>>
	<<set _slaveMultiplier += 0.1>>
	<</if>>
	<<if $args[0].balls > 0>>
	<<set _slaveMultiplier -= 0.1>>
	<</if>>
<</if>>
<<if $arcologies[0].FSArabianRevivalist > 50>>
	<<set _slaveMultiplier += 0.1>>
<</if>>

<<if $args[0].career != 0>>
	<<if $args[0].career == "a slave">>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.bodyguardCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.wardenessCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.attendantCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.schoolteacherCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.stewardessCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.milkmaidCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.madamCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.DJCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.HGCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.recruiterCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.1>>
	<<elseif setup.entertainmentCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.05>>
	<<elseif setup.whoreCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.05>>
	<<elseif setup.gratefulCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.05>>
	<<elseif setup.menialCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.05>>
	<<elseif setup.servantCareers.includes($args[0].career)>>
	<<set _slaveMultiplier += 0.05>>
	<</if>>
<</if>>
<<if ($week-$args[0].weekAcquired >= 20) && ($args[0].entertainSkill >= 100)>>
<<if setup.entertainmentCareers.includes($args[0].career)>>
<<else>>
	<<set _slaveMultiplier += 0.05>>
<</if>>
<</if>>
<<if ($args[0].oralCount + $args[0].analCount + $args[0].vaginalCount + $args[0].mammaryCount + $args[0].penetrativeCount > 1000)>>
<<if setup.whoreCareers.includes($args[0].career)>>
<<else>>
	<<set _slaveMultiplier += 0.05>>
<</if>>
<</if>>

<<if !setup.bodyguardCareers.includes($activeSlave.career) && $activeSlave.skillBG >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.wardenessCareers.includes($activeSlave.career) && $activeSlave.skillWA >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.attendantCareers.includes($activeSlave.career) && $activeSlave.skillAT >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.schoolteacherCareers.includes($activeSlave.career) && $activeSlave.skillTE >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.stewardessCareers.includes($activeSlave.career) && $activeSlave.skillST >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.milkmaidCareers.includes($activeSlave.career) && $activeSlave.skillMM >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.madamCareers.includes($activeSlave.career) && $activeSlave.skillMD >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.DJCareers.includes($activeSlave.career) && $activeSlave.skillDJ >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.HGCareers.includes($activeSlave.career) && $activeSlave.skillHG >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.recruiterCareers.includes($activeSlave.career) && $activeSlave.skillRC >= $masteredXP>>
	<<set _slaveMultiplier += 0.1>>
<</if>>
<<if !setup.entertainmentCareers.includes($activeSlave.career) && $activeSlave.skillE >= $masteredXP>>
	<<set _slaveMultiplier += 0.05>>
<</if>>
<<if !setup.whoreCareers.includes($activeSlave.career) && $activeSlave.skillW >= $masteredXP>>
	<<set _slaveMultiplier += 0.05>>
<</if>>
<<if !setup.servantCareers.includes($activeSlave.career) && $activeSlave.skillS >= $masteredXP>>
	<<set _slaveMultiplier += 0.05>>
<</if>>

<<if $seeAge == 1>>
<<if $args[0].physicalAge == $minimumSlaveAge && $args[0].physicalAge == $fertilityAge && canGetPregnant($args[0]) && ($arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderFundamentalist != "unset")>>
	<<if $args[0].birthWeek == 0>>
	<<set _slaveMultiplier -= 0.4>>
	<<elseif $args[0].birthWeek < 4>>
	<<set _slaveMultiplier -= 0.1>>
	<</if>>
<<elseif $args[0].physicalAge == $minimumSlaveAge>>
	<<if $args[0].birthWeek == 0>>
		<<set _slaveMultiplier -= 0.2>>
	<<elseif $args[0].birthWeek < 4>>
		<<set _slaveMultiplier -= 0.05>>
	<</if>>
<<elseif $args[0].physicalAge == $fertilityAge && canGetPregnant($args[0]) && ($arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderFundamentalist != "unset")>>
	<<if $args[0].birthWeek == 0>>
	<<set _slaveMultiplier -= 0.2>>
	<<elseif $args[0].birthWeek < 4>>
	<<set _slaveMultiplier -= 0.05>>
	<</if>>
<</if>>
<</if>>

<<if $args[0].amp == 1>>
	<<set _slaveMultiplier -= 0.2>>
<</if>>

<<if $args[0].eyes == -2>>
	<<set _slaveMultiplier -= 0.2>>
<</if>>

<<if $args[0].indenture > -1>>
	<<set _slaveMultiplier -= 0.1*$args[0].indentureRestrictions>>
	<<set _slaveMultiplier -= (260-$args[0].indenture)/260>>
<<elseif $seeAge == 1>>
<<if $args[0].actualAge >= ($retirementAge-5) && $PhysicalRetirementAgePolicy != 1>>
	<<set $seed = 52*($retirementAge-$args[0].actualAge)>>
	<<set _slaveMultiplier = _slaveMultiplier*($seed/260)>>
<</if>>
<<if $args[0].physicalAge >= ($retirementAge-5) && $PhysicalRetirementAgePolicy == 1>>
	<<set $seed = 52*($retirementAge-$args[0].physicalAge)>>
	<<set _slaveMultiplier = _slaveMultiplier*($seed/260)>>
<</if>>
<</if>>

<<set $slaveCost = ($slaveCost*_slaveMultiplier*50)>>
<<set $slaveCost = Number($slaveCost) || 0>>

<<if $slaveCost < $minimumSlaveCost>>
	<<set $slaveCost = $minimumSlaveCost>>
<<elseif $slaveCost <= 100000>>
<<elseif $slaveCost <= 200000>>
	<<set $slaveCost -= (($slaveCost-100000)*0.1)>>
<<elseif $slaveCost <= 300000>>
	<<set $slaveCost -= 10000 + (($slaveCost-200000)*0.2)>>
<<elseif $slaveCost <= 400000>>
	<<set $slaveCost -= 30000 + (($slaveCost-300000)*0.3)>>
<<elseif $slaveCost <= 500000>>
	<<set $slaveCost -= 60000 + (($slaveCost-400000)*0.4)>>
<<else>>
	<<set $slaveCost -= 100000 + (($slaveCost-500000)*0.5)>>
<</if>>
<<if $slaveCost < 1000>>
	<<set $slaveCost = 1000>>
<</if>>

<<set $slaveCost = 500*Math.trunc($slaveCost/500)>>

<</widget>>

/%
 Call as <<StartingSlaveCost $activeSlave>> or equivalent
 $args[0] is the slave.
 Fires <<slaveCost>> and adds punishment multipliers for starting with trained and/or devoted slaves.
%/
<<widget "StartingSlaveCost">>

<<slaveCost $args[0]>>

<<set _slaveMultiplier = 0>>

<<if $args[0].devotion > 20>>
	<<set _slaveMultiplier += (0.000117*($args[0].devotion-20)*($args[0].devotion-20))+(0.003167*($args[0].devotion-20))>>
<</if>>

<<if $args[0].whoreSkill>>
	<<set _slaveMultiplier += 0.00001*$args[0].whoreSkill*$args[0].whoreSkill>>
<</if>>
<<if $args[0].entertainSkill>>
	<<set _slaveMultiplier += 0.00001*$args[0].entertainSkill*$args[0].entertainSkill>>
<</if>>
<<if $args[0].vaginalSkill>>
	<<set _slaveMultiplier += 0.00001*$args[0].vaginalSkill*$args[0].vaginalSkill>>
<</if>>
<<if $args[0].analSkill>>
	<<set _slaveMultiplier += 0.00001*$args[0].analSkill*$args[0].analSkill>>
<</if>>
<<if $args[0].oralSkill>>
	<<set _slaveMultiplier += 0.00001*$args[0].oralSkill*$args[0].oralSkill>>
<</if>>
<<if $args[0].combatSkill>>
	<<set _slaveMultiplier += 0.1>>
<</if>>

<<if _slaveMultiplier>>
	<<if $args[0].actualAge > 25>>
		<<set _slaveMultiplier -= _slaveMultiplier*($args[0].actualAge-25)*0.05>>
	<</if>>
<</if>>

<<if $args[0].prestige>>
	<<set _slaveMultiplier += $args[0].prestige>>
<</if>>

<<if _slaveMultiplier>>
	<<set _slaveMultiplier = Math.clamp(_slaveMultiplier,0,10)>>
	<<set $slaveCost += $slaveCost*_slaveMultiplier>>
	<<set $slaveCost = 500*Math.trunc($slaveCost/500)>>
<</if>>

<<if $PC.career == "slaver">>
	<<set $slaveCost = $slaveCost*.5>>
<</if>>

<</widget>>


code:
:: Assign Widgets [widget nobr]

/*
	Call as <<assignJob slaveObject $returnTo | _currentRule.facilityRemove | "serve in the master suite"
	$args[0] slave object. *MUST be present*
	$args[1] Job to assign slave to. Will accept the $returnTo vars and the _currentRule.assignFacility vars and the actual job assignments "serve in the master suite" etc.

	This is basically a Widget version of assign but will work anywhere, and saves to the slaves[..] array, and changes your $args[0] var sent.
*/

<<widget assignJob>>
	<<= assignJob($args[0], $args[1]) >>
<</widget>>

/%
	Call as <<removeJob slaveObject $returnTo | _currentRule.facilityRemove | "serve in the master suite">>
	$args[0] slave object. *MUST be present*
	$args[1] Job to remove slave from. Will accept the $returnTo vars and the _currentRule.assignFacility vars and the actual job assignments "serve in the master suite" etc.

	This is basically a Widget version of Retrieve but will work anywhere. It changes the assignment and saves to the slaves[..] array, and changes your $args[0] var sent.
	Retrieve overrides the 'rest' in most cases.
%/
<<widget removeJob>>
	<<= removeJob($args[0], $args[1]) >>
<</widget>>

repo_name: NovX/fc


code:
:: description widgets [widget nobr]

<<widget "MainLinks">>

<<if $PCWounded == 1>>
	The injuries received in the recent battle prevent you from undertaking tiring efforts.
<<else>>
<<switch $personalAttention>>
<<case "business">>You plan to focus on business this week.
<<case "whoring">>You plan to focus on earning extra money this week.
<<case "upkeep">>You plan to focus on cleaning the penthouse this week.
<<case "smuggling">>You plan to make some easy (but dirty) money this week.
<<case "HG">>You plan to support your Head Girl this week, so $pronoun can give more slaves $possessive attention.
<<case "sex">>You plan to have as much sex with your slaves as possible this week.
<<case "trading">>This week you will learn trading.
<<case "warfare">>This week you will learn modern combat tactics.
<<case "slaving">>This week you will learn slaving.
<<case "engineering">>This week you will learn engineering.
<<case "medicine">>This week you will learn medicine.
<<case "hacking">>This week you will learn hacking.
<<case "proclamation">>This week you plan to issue a proclamation about $proclamationType.
<<case "technical accidents">>This week you plan to sell your technical skills to the highest bidder.
<<default>>
	<<if _PA.length > 0>>
		You plan to train
		<<for _dwi = 0; _dwi < _PA.length; _dwi++>>
			<<if _dwi > 0 && _dwi == _PA.length - 1>>and<</if>>
			''__@@.pink;<<SlaveFullName _PA[_dwi]>>@@__'' to $personalAttention[_dwi].trainingRegimen<<if _dwi > 0 && _dwi < _PA.length - 2>>,<</if>>
		<</for>>
		this week.
	<</if>>
<</switch>>
<</if>>	/* closes wound check */

<<if $PCWounded != 1>><<link "Change plans">><<goto "Personal Attention Select">><</link>> @@.cyan;[A]@@<</if>>

<<if $useSlaveSummaryOverviewTab != 1>> /* Hide this block if it will be shown on the overview tab */

	<<if def _HG>>
		''__@@.pink;<<SlaveFullName $HeadGirl>>@@__'' is serving as your head girl<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>> and Consort<</if>>.
		<<link "Manage Head Girl">><<goto "HG Select">><</link>> @@.cyan;[H]@@
	<<elseif (ndef _HG) && ($slaves.length > 1)>>
		You have not selected a Head Girl<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>> and Consort<</if>>. <<link "Select one">><<goto "HG Select">><</link>> @@.cyan;[H]@@
	<<elseif (ndef _HG)>>
		//You do not have enough slaves to keep a Head Girl//
	<</if>>

	<<if def _RC>>
		''__@@.pink;<<SlaveFullName $Recruiter>>@@__'' is working to recruit girls.
		<<link "Manage Recruiter">><<goto "Recruiter Select">><</link>> @@.cyan;[U]@@
	<<else>>
		You have not selected a Recruiter.
		<<link "Select one">><<goto "Recruiter Select">><</link>> @@.cyan;[U]@@
	<</if>>
	<<if ($dojo != 0)>>

		<<if def _BG>>
			''__@@.pink;<<SlaveFullName $Bodyguard>>@@__'' is serving as your bodyguard. <<link "Manage Bodyguard">><<goto "BG Select">><</link>> @@.cyan;[B]@@
		<<else>>
			You have not selected a Bodyguard. <<link "Select one">><<goto "BG Select">><</link>> @@.cyan;[B]@@
		<</if>>
	<</if>>
<</if>>

/* cycle through slaves, for each slave cycle through completed organs and track how many are of the interrogated slave (and if organs have a slaves to be implanted on) */
<<if $completedOrgans.length > 0>>
	<<set _validOrgans = 0>>
	<<for _dwi = 0; _dwi < $slaves.length; _dwi++>>
		<<capture _dwi>>
		<<set $dumped = 0>>
		<<set _slaveOrgans = 0>>
		<<for _dwj = 0; _dwj < $completedOrgans.length; _dwj++>>
			<<if ($completedOrgans[_dwj] != 0) && ($completedOrgans[_dwj].ID == $slaves[_dwi].ID)>>
				<<set _slaveOrgans++>>
				<<set _validOrgans++>>
			<</if>>
		<</for>>
		/* if the interrogated slave has one or more organs ready: */
		<<if _slaveOrgans > 0>>

@@.yellow;The fabricator has completed <<if _slaveOrgans > 1>><<print _slaveOrgans>> organs<<else>>an organ<</if>> for@@
			<<link "<<print $slaves[_dwi].slaveName>>">>
				<<set $activeSlave = $slaves[_dwi]>>
				<<goto "Slave Interact">>
			<</link>>
			, @@.yellow; which <<if _slaveOrgans > 1>>are<<else>>is<</if>> ready to be implanted.@@
		<</if>>
		<</capture>>
	<</for>>
	/* if the check returns true it means there are organs without slaves associated to. I think this was the purpose of the _validHost check in the original code */
	<<if _validOrgans < $completedOrgans.length>>
		<<for _dwj = 0; _dwj < $completedOrgans.length; _dwj++>>
			<<set _isValid = 0>>
			<<for _dwi = 0; _dwi < $slaves.length; _dwi++>>
				<<if ($completedOrgans[_dwj] != 0) && ($completedOrgans[_dwj].ID == $slaves[_dwi].ID)>>
					<<set _isValid = 1>>
				<</if>>
			<</for>>
			/* if there is no associated slave delete the organ, should there be a notification for the player, here? */
			<<if _isValid == 0>>
				<<set $completedOrgans.deleteAt(_dwj)>>
			<</if>>
		<</for>>
	<</if>>
<</if>>

<<if $limbsCompleted > 0>>
<<for _dwj = 0; _dwj < $limbs.length; _dwj++>>
	<<set _validHost = 0>>
	<<set $dumped = 0>>
	<<for _dwi = 0; _dwi < $slaves.length; _dwi++>>
		<<set _Slave = $slaves[_dwi]>>
		<<if ($limbs[_dwj] != 0) && ($limbs[_dwj].ID == _Slave.ID)>>
			<<set _validHost = 1>>
			<<if ($limbs[_dwj].weeksToCompletion <= 0)>>

@@.yellow;The facility has completed a set of limbs for@@ <<print "[[_Slave.slaveName|Slave Interact][$activeSlave = $slaves[" + _dwi + "]]]">>, @@.yellow; which is ready to be attached.@@
			<</if>>
		<</if>>
	<</for>>
	<<if _validHost == 0>>
		<<set $dump = $limbs.deleteAt(_dwj), _dwj-->>
	<</if>>
<</for>>
<</if>>

<<if ($completedOrgans.length > 0) && ($limbsCompleted > 0)>>

[[Implant and Attach|Multiple Organ Implant]] @@.yellow;all organs and limbs that are ready.@@
<<elseif ($completedOrgans.length > 0)>>

[[Implant|Multiple Organ Implant]] @@.yellow;all organs that are ready for implantation.@@
<<elseif ($limbsCompleted > 0)>>

[[Attach|Multiple Organ Implant]] @@.yellow;all sets of limbs that are ready to be attached.@@
<</if>>

<<if ($slaveCostFactor > 1.05)>>
	@@.yellow;There is a bull market for slaves; the price of slaves is very high.@@
<<elseif ($slaveCostFactor > 1)>>
	@@.yellow;The slave market is bullish; the price of slaves is high.@@
<<elseif ($slaveCostFactor < 0.95)>>
	@@.yellow;There is a bear market for slaves; the price of slaves is very low.@@
<<elseif ($slaveCostFactor < 1)>>
	@@.yellow;The slave market is bearish; the price of slaves is low.@@
<<else>>
	The slave market is stable; the price of slaves is average.
<</if>>
<<link "Buy Slaves">><<goto "Buy Slaves">><</link>> @@.cyan;[S]@@
	<<if $TSS.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[The Slavegirl School][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
	<</if>>
	<<if $GRI.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[Growth Research Institute][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
	<</if>>
	<<if $SCP.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[St. Claver Preparatory][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
	<</if>>
	<<if $TCR.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[The Cattle Ranch][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
	<</if>>
	<<if $HA.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[The Hippolyta Academy][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
	<</if>>
	<<if ($seeDicks != 0)>>
		<<if $LDE.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[L'école des Enculées][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
		<</if>>
		<<if $TGA.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[The Gymnasium-Academy][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
		<</if>>
		<<if $TFS.schoolSale != 0>>

@@.yellow;For your first purchase, @@[[The Futanari Sisters][$slavesSeen += 1]]@@.yellow; will sell at half price this week.@@
		<</if>>
	<</if>>

<</widget>>

<<widget "FlowerDesc">>

<<if $activeSlave.dick > 0 && $activeSlave.balls == 0>>
	a white orchid, its black stamen stiffly erect.
<<elseif $activeSlave.dick > 0>>
	a morning glory, light around its edges with a puckered pink center.
<<elseif $activeSlave.addict > 5>>
	a large poppy, its pod glistening with black opiate juice.
<<elseif $activeSlave.vagina == 0>>
	a white lily, pure and unspoiled.
<<elseif $activeSlave.pregType > 3 && $activeSlave.pregKnown == 1>>
	a pink lotus, beautiful and fertile.
<<elseif $activeSlave.energy > 95>>
	a flamboyant tiger lily.
<<elseif $activeSlave.actualAge > 40>>
	an elegant, mature orchid.
<<elseif $activeSlave.actualAge < 20>>
	an innocent little peony.
<<elseif $activeSlave.boobs > 2000>>
	a huge round sunflower.
<<else>>
	a nice red rose.
<</if>>

<</widget>>

<<widget "ImageDesc">>

<<if $activeSlave.dick > 0 && $activeSlave.balls == 0>>
	sodomy.
<<elseif $activeSlave.dick > 0>>
	stiff pricks.
<<elseif $activeSlave.oralSkill >= 100>>
	oral sex.
<<elseif $activeSlave.boobs > 1000>>
	boobs.
<<elseif $activeSlave.vagina == -1>>
	sodomy.
<<else>>
	pussies.
<</if>>

<</widget>>

<<widget "InscripDesc">>

"I <3
<<if ($activeSlave.fetishKnown == 1)>>
	<<switch $activeSlave.fetish>>
		<<case "buttslut">>
			Buttsex!"
		<<case "cumslut">>
			Cum!"
		<<case "masochist" "sadist">>
			Rape!"
		<<case "dom">>
			Topping!"
		<<case "submissive">>
			Subbing!"
		<<case "boobs">>
			Tits!"
		<<case "pregnancy">>
			Sperm!"
		<<default>>
			<<if ($activeSlave.energy > 95)>>
				Cock!"
			<<elseif ($PC.title == 0)>>
				Mistress!"
			<<else>>
				Master!"
			<</if>>
		<</switch>>
<<elseif ($PC.title == 0)>>
	Mistress!"
<<else>>
	Master!"
<</if>>

<</widget>>

<<widget "SlavePronouns">>

<<if $args[0].fuckdoll > 0>>
	<<set $pronoun = "it", $pronounCap = "It", $possessive = "its", $possessiveCap = "Its", $object = "it">>
<<elseif $args[0].dick < 0 && $args[0].vagina == -1>> /*impossible condition to keep it from running but saving it for future use*/
	<<set $pronoun = "he", $pronounCap = "He", $possessive = "his", $possessiveCap = "His", $object = "him">>
<<else>>
	<<set $pronoun = "she", $pronounCap = "She", $possessive = "her", $possessiveCap = "Her", $object = "her">>
<</if>>

<</widget>>

<<widget "brandDescription">>

<<if ($activeSlave.brand != 0)>>
	<<set $bellyAccessory = $activeSlave.bellyAccessory>>
	<<if setup.fakeBellies.includes($bellyAccessory) && ($activeSlave.brandLocation == "belly")>>
		$possessiveCap fake belly has $activeSlave.brand branded on it.
	<<else>>
		$pronounCap has $activeSlave.brand branded into the flesh of $possessive $activeSlave.brandLocation.
	<</if>>
<</if>>

<</widget>>

<<widget "originDescription">>
<<switch $args[0].origin>>

	<<case "To solidify an investment in hermaphrodite self-fertility, you took part in a test successful test trial. Nine months later your daughter was born.">>
		<<print "To solidify an investment in hermaphrodite self-fertility, you took part in a test successful test trial. Nine months later your daughter was born.">>
	<<case "Sometimes it pays off to use your body in business deals, and other times you end up burdened with child. She is the result of the latter.">>
		<<print "Sometimes it pays off to use your body in business deals, and other times you end up burdened with child. $He is the result of the latter.">>
	<<case "To seal a business deal, a client asked you to knock her up. She is the end result of that fling.">>
		<<print "To seal a business deal, a client asked you to knock $him up. $He is the end result of that fling.">>
	<<case "You acquired her in the last stages of your career as a successful venture capitalist.">>
		<<print "You acquired $him in the last stages of your career as a successful venture capitalist.">>
	<<case "Drugs and alcohol can be a potent mix; the night that followed it can sometimes be hard to remember. Needless to say, once your belly began swelling with her, you had to temporarily switch to a desk job for your mercenary group.">>
		<<print "Drugs and alcohol can be a potent mix; the night that followed it can sometimes be hard to remember. Needless to say, once your belly began swelling with $him, you had to temporarily switch to a desk job for your mercenary group.">>
	<<case "Drugs and alcohol can be a potent mix; the night that followed it can sometimes be hard to remember. Needless to say, once your belly began swelling with her, you had to temporarily switch to a desk job for your mercenary group.">>
		<<print "Drugs and alcohol can be a potent mix; the night that followed it can sometimes be hard to remember. Needless to say, once your belly began swelling with $him, you had to temporarily switch to a desk job for your mercenary group.">>
	<<case "A trip to a brothel after a mission resulted in an unexpected surprise years later.">>
		<<print "A trip to a brothel after a mission resulted in an unexpected surprise years later.">>
	<<case "You acquired her in the last stages of your career as a noted private military contractor.">>
		<<print "You acquired $him in the last stages of your career as a noted private military contractor.">>
	<<case "You never thought you would be capable of impregnating yourself, but years of pleasuring yourself with yourself after missions managed to create her.">>
		<<print "You never thought you would be capable of impregnating yourself, but years of pleasuring yourself with yourself after missions managed to create $him.">>
	<<case "A fresh capture once overpowered you and had his way with you. You kept her as a painful reminder to never lower your guard again.">>
		<<print "A fresh capture once overpowered you and had his way with you. You kept $him as a painful reminder to never lower your guard again.">>
	<<case "Your slaving troop kept several girls as fucktoys, you sired her in your favorite.">>
		<<print "Your slaving troop kept several girls as fucktoys, you sired $him in your favorite.">>
	<<case "You enslaved her personally during the last stages of your slaving career.">>
		<<print "You enslaved $him personally during the last stages of your slaving career.">>
	<<case "You sired her in yourself after an arcology owner, impressed by your work, rewarded you with a night you'll never forget.">>
		<<print "You sired $him in yourself after an arcology owner, impressed by your work, rewarded you with a night you'll never forget.">>
	<<case "You conceived her after a male arcology owner, impressed by your work, rewarded you with a night you'll never forget.">>
		<<print "You conceived $him after a male arcology owner, impressed by your work, rewarded you with a night you'll never forget.">>
	<<case "You sired her after a female arcology owner, impressed by your work, rewarded you with a night you'll never forget.">>
		<<print "You sired $him after a female arcology owner, impressed by your work, rewarded you with a night you'll never forget.">>
	<<case "You received her as a gift from an arcology owner impressed by your work.">>
		<<print "You received $him as a gift from an arcology owner impressed by your work.">>
	<<case "A client paid you a large sum of credits to prove you could literally fuck yourself. She is the result of that lucrative night.">>
		<<print "A client paid you a large sum of credits to prove you could literally fuck yourself. $He is the result of that lucrative night.">>
	<<case "She was the result of unprotected sex with a client. He paid you quite well to enjoy your body as you grew heavy with his child.">>
		<<print "$He was the result of unprotected sex with a client. He paid you quite well to enjoy your body as you grew heavy with his child.">>
	<<case "She was the result of unprotected sex with a client. Her mother tracked you down years after her birth to force her upon you.">>
		<<print "$He was the result of unprotected sex with a client. $His mother tracked you down years after $his birth to force $him upon you.">>
	<<case "She was a fellow escort you were popular with.">>
		<<print "$He was a fellow escort you were popular with.">>
	<<case "She was the result of a night of hard drugs and unprotected sex after a big score. It took quite a bit of alcohol to come to terms with drunkenly knocking yourself up.">>
		<<print "$He was the result of a night of hard drugs and unprotected sex after a big score. It took quite a bit of alcohol to come to terms with drunkenly knocking yourself up.">>
	<<case "She was the result of a night of hard drugs and unprotected sex after a big score.">>
		<<print "$He was the result of a night of hard drugs and unprotected sex after a big score.">>
	<<case "She was born from one of your sex toys you knocked up.">>
		<<print "$He was born from one of your sex toys you knocked up.">>
	<<case "You captured her during your transition to the arcology">>
		<<print "You captured $him during your transition to the arcology">>
	<<case "Your late master took pleasure in using his servants in creative ways. He inseminated you with your own sperm, and nine months later, your daughter was born.">>
		<<print "Your late master took pleasure in using his servants in creative ways. He inseminated you with your own sperm, and nine months later, your daughter was born.">>
	<<case "She was another of your late master's servants. She spent nine months in your womb, courtesy of your master.">>
		<<print "$He was another of your late master's servants. $He spent nine months in your womb, courtesy of your master.">>
	<<case "She was another of your late master's servants. Your master permitted you to knock up her mother.">>
		<<print "$He was another of your late master's servants. Your master permitted you to knock up $his mother.">>
	<<case "She was another of your late master's servants. She helped you give birth to his child.">>
		<<print "$He was another of your late master's servants. $He helped you give birth to his child.">>
	<<case "She was another of your late master's servants.">>
		<<print "$He was another of your late master's servants.">>
	<<case "She was conceived after a successful experiment in hermaphrodite self-reproduction.">>
		<<print "$He was conceived after a successful experiment in hermaphrodite self-reproduction.">>
	<<case "She was conceived after a botched birth control experiment early in your career.">>
		<<print "$He was conceived after a botched birth control experiment early in your career.">>
	<<case "She is the product of an affair with a cute nurse who assisted you in more ways than one.">>
		<<print "$He is the product of an affair with a cute nurse who assisted you in more ways than one.">>
	<<case "You kept her after her owner failed to pay your bill for performing surgery on her.">>
		<<print "You kept $him after $his owner failed to pay your bill for performing surgery on $him.">>
	<<case "She was conceived after a night of partying and a drunken bet. She nearly killed your career.">>
		<<print "$He was conceived after a night of partying and a drunken bet. $He nearly killed your career.">>
	<<case "She was conceived after a night of partying and a torn condom. She nearly killed your career.">>
		<<print "$He was conceived after a night of partying and a torn condom. $He nearly killed your career.">>
	<<case "She was conceived after a night of partying and a torn condom.">>
		<<print "$He was conceived after a night of partying and a torn condom.">>
	<<case "She was one of your groupies during your celebrity career.">>
		<<print "$He was one of your groupies during your celebrity career.">>
	<<case "You bet your body on a sure hand, only to lose. It turns out you could fuck yourself, and not only that, get yourself pregnant.">>
		<<print "You bet your body on a sure hand, only to lose. It turns out you could fuck yourself, and not only that, get yourself pregnant.">>
	<<case "You bet your body on a sure hand, only to lose. Nine months later, your daughter was born.">>
		<<print "You bet your body on a sure hand, only to lose. Nine months later, your daughter was born.">>
	<<case "You won a sexual fling with her mother after winning at cards, a gamble that ultimately burdened you.">>
		<<print "You won a sexual fling with $his mother after winning at cards, a gamble that ultimately burdened you.">>
	<<case "You won her at cards, a memento from your life as one of the idle rich before you became an arcology owner.">>
		<<print "You won $him at cards, a memento from your life as one of the idle rich before you became an arcology owner.">>
	<<case "She was the result of a night of hard celebration after a big score under the glow of monitors and the calming hum of 750 RPM fans. It took quite a bit of alcohol to come to terms with drunkenly knocking yourself up.">>
		<<print "$He was the result of a night of hard celebration after a big score under the glow of monitors and the calming hum of 750 RPM fans. It took quite a bit of alcohol to come to terms with drunkenly knocking yourself up.">>
	<<case "She was the result of an intruder brute forcing your firewall, overloading your pleasure sensors, and allowing a corrupted packet to slip by. With a quick wipe of your RAM and cache with some powerful liquor, you have no idea who planted her in your womb.">>
		<<print "$He was the result of an intruder brute forcing your firewall, overloading your pleasure sensors, and allowing a corrupted packet to slip by. With a quick wipe of your RAM and cache with some powerful liquor, you have no idea who planted her in your womb.">>
	<<case "She was born out of a trade for secure data access. Nine months later, your daughter was born.">>
		<<print "$He was born out of a trade for secure data access. Nine months later, your daughter was born.">>
	<<case "She was a case officer you captured after going dark.">>
		<<print "$He was a case officer you captured after going dark.">>
	<<case "You won her at cards, a memento from your life as one of the idle rich before you became an arcology owner.">>
		<<print "You won $him at cards, a memento from your life as one of the idle rich before you became an arcology owner.">>
	<<case "You brought her into the arcology mindbroken, little more than a walking collection of fuckable holes.">>
		<<print "You brought $him into the arcology mindbroken, little more than a walking collection of fuckable holes.">>
	<<case "You brought her into the arcology mindbroken, little more than a human onahole.">>
		<<print "You brought $him into the arcology mindbroken, little more than a human onahole.">>
	<<default>>
		<<print $args[0].origin>>
<</switch>>
<</widget>>