:: assay widgets [widget nobr]

<<widget "Beauty">>

<<modScore $args[0]>>
<<if $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>>
	<<set $modded += 1>>
<<elseif $args[0].corsetPiercing == 0 && $piercingScore < 3 && $tatScore < 2>>
	<<set $unmodded += 1>>
<</if>>
<<if $args[0].vagina == -1>>
	<<set $XY += 1>>
<<else>>
	<<set $XX += 1>>
<</if>>
<<if $args[0].visualAge >= 30>>
	<<set $old += 1>>
<<else>>
	<<set $young += 1>>
<</if>>

<<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>>
	<<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 -= (0-($arcologies[0].FSGenderRadicalist/25))*($args[0].face/30)>>
	<<elseif ($arcologies[0].FSGenderFundamentalist != "unset")>>
	<<set $beauty -= ($arcologies[0].FSGenderFundamentalist/25)*($args[0].face/30)>>
	<<else>>
	<<set $beauty -= $args[0].face/30>>
	<</if>>
<<elseif $args[0].faceShape is "exotic">>
	<<set $beauty += 2*($args[0].face/30)>>
<<elseif $args[0].faceShape is "sensual">>
	<<set $beauty += 2+($args[0].face/30)>>
<<elseif $args[0].faceShape is "cute">>
	<<set $beauty += 4>>
<</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/30)+$arcologies[0].FSSupremacistLawME>>
<</if>>
<</if>>
<<if $arcologies[0].FSSubjugationist != "unset">>
<<if $args[0].race == $arcologies[0].FSSubjugationistRace>>
	<<set $beauty += ($arcologies[0].FSSubjugationist/20)+$arcologies[0].FSSubjugationistLawME>>
<</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 is "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 += 100 + ($args[0].waist/20) - ($args[0].muscles/30) +($args[0].lips/10) + ($args[0].face/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>>
		<<if $args[0].analSkill > 60 && $args[0].anus >= 2>>
			<<set $beauty += 2*($args[0].anus-2)>> /*6*/
		<</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].SlimnessEnthusiast == "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].pregType >= 50>>
		<<set $beauty += 10*($arcologies[0].FSRepopulationFocus/25)>> /*40 limited due to constant presence. Also good breeders, but subpar mothers*/
	<<elseif $args[0].pregType >= 20>>
		<<set $beauty += 10*($arcologies[0].FSRepopulationFocus/10)>> /*100*/
	<<elseif $args[0].pregType >= 10>>
		<<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>>
<<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].pregType >= 20>>
		<<set $beauty -= 50*($arcologies[0].FSRestart/40)>> /*-125*/
	<<elseif $args[0].pregType >= 10>>
		<<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 >= 1000>>
	<<if $arcologies[0].FSTransformationFetishist > 20>>
		<<set $beauty += Math.trunc($args[0].bellyImplant/500)>> /*84*/
	<<elseif $arcologies[0].FSRepopulationFocus > 60>>
		<<if ($args[0].ovaries == 0 && $args[0].mpreg == 0) || $args[0].preg < -1>>
			<<set $beauty += 20>>
		<</if>>
	<<else>>
		<<set $beauty = ($beauty*0.9)>>
	<</if>>
<</if>>

<<if visibleBellyPreg($args[0]) || ($args[0].bellyImplant >= 4000)>>
	<<set $pregYes += 1>>
<<elseif !visibleBelly($args[0]) && ($args[0].weight <= 10)>>
	<<set $pregNo -= 1>>
<</if>>

<<if $args[0].bellySag > 0>>
<<if $args[0].preg < 10 && $args[0].inflation == 0 && $args[0].bellyImplant < 2000>>
<<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>>
	<<set $stacked += 1>>
	<<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>>
		<<set $slim += 1>>
		<<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>>
			<<set $slim += 1>>
			<<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>>
			<<set $slim += 1>>
			<<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>>
			<<set $slim += 1>>
			<<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>>
			<<set $slim += 1>>
			<<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>>
	<<set $implanted += 1>>
	<<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>>
<</if>>

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

<<if canTalk($args[0]) == false>>
	<<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 "FResult">>

<<set $FResult = (3-$args[0].anus)+($args[0].muscles/30)>>

<<if $args[0].muscles < -95>>
	<<set $FResult -= 5>>
<<elseif $args[0].muscles < -30>>
	<<set $FResult -= 2>>
<</if>>

<<set $seed = $oralUseWeight + $vaginalUseWeight + $analUseWeight>>

<<if $seed > 0>>
<<set $FResult += (6+$args[0].tonguePiercing)*($oralUseWeight/$seed)*($args[0].oralSkill/30)>>
<<if $args[0].sexualFlaw == "cum addict">>
	<<set $FResult += ($oralUseWeight/$seed)*($args[0].oralSkill/30)>>
<</if>>
<<if $args[0].vagina > -1>>
<<if $args[0].vaginalAccessory != "chastity belt">>
	<<set $FResult += 6*($vaginalUseWeight/$seed)*($args[0].vaginalSkill/30)>>
	<<set $FResult += (3-$args[0].vagina)>>
	<<set $FResult += ($args[0].vaginaLube)>>
<</if>>
<</if>>
	<<set $FResult += 6*($analUseWeight/$seed)*($args[0].analSkill/30)>>
<<if $args[0].sexualFlaw == "anal addict">>
	<<set $FResult += ($analUseWeight/$seed)*($args[0].analSkill/30)>>
<</if>>
<<if $args[0].inflationType == "aphrodisiac">>
	<<set $FResult += ($analUseWeight/$seed)*($args[0].inflation*3)>>
<</if>>
<</if>>

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

<<if $familyTesting == 1>>
	<<if totalRelatives($args[0]) > 0>>
	<<for $j = 0; $j < $slaves.length; $j++>>
		<<if $args[0].mother == $slaves[$j].ID>>
			<<if $slaves[$j].assignment == $args[0].assignment>>
			<<set $FResult += 1>>
				<<if $arcologies[0].FSEgyptianRevivalist > 20>>
					<<set $FResult += 1>>
				<</if>>
			<</if>>
		<</if>>
		<<if $args[0].father == $slaves[$j].ID>>
			<<if $slaves[$j].assignment == $args[0].assignment>>
			<<set $FResult += 1>>
				<<if $arcologies[0].FSEgyptianRevivalist > 20>>
					<<set $FResult += 1>>
				<</if>>
			<</if>>
		<</if>>
		<<if $slaves[$j].mother == $args[0].ID || $slaves[$j].father == $args[0].ID>>
			<<if $slaves[$j].assignment == $args[0].assignment>>
			<<set $FResult += 1>>
				<<if $arcologies[0].FSEgyptianRevivalist > 20>>
					<<set $FResult += 1>>
				<</if>>
			<</if>>
		<</if>>
		<<if areSisters($args[0], $slaves[$j]) > 0>>
			<<if $slaves[$j].assignment == $args[0].assignment>>
			<<set $FResult += 1>>
				<<if $arcologies[0].FSEgyptianRevivalist > 20>>
					<<set $FResult += 1>>
				<</if>>
			<</if>>
		<</if>>
	<</for>>
	<</if>>
<<else>>
	<<if $args[0].relation != 0>>
	<<for $j = 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID == $args[0].relationTarget>>
			<<if $slaves[$j].assignment == $args[0].assignment>>
			<<set $FResult += 2>>
				<<if $arcologies[0].FSEgyptianRevivalist > 20>>
					<<set $FResult += 2>>
				<</if>>
			<</if>>
			<<break>>
		<</if>>
	<</for>>
	<</if>>
<</if>>
<<if $args[0].relationship > 0>>
	<<for $j = 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID == $args[0].relationshipTarget>>
		<<if $slaves[$j].assignment == $args[0].assignment>>
		<<set $FResult += 1>>
		<</if>>
		<<break>>
	<</if>>
	<</for>>
<<elseif $args[0].relationship == -1>>
	<<set $FResult += 2>>
<</if>>
<<if $args[0].rivalry != 0>>
	<<for $j = 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID == $args[0].rivalryTarget>>
		<<if $slaves[$j].assignment == $args[0].assignment>>
		<<set $FResult -= 1>>
		<</if>>
		<<break>>
	<</if>>
	<</for>>
<</if>>

<<if $args[0].drugs == "male hormone injections" || $args[0].drugs == "female hormone injections">>
	<<set $FResult -= 10>>
<</if>>

<<if $args[0].diet == "XXY">>
	<<set $FResult += 2>>
<<elseif $args[0].diet == "XY" || $args[0].diet == "XX">>
	<<set $FResult += 1>>
<<elseif $args[0].diet == "cum production">>
	<<set $FResult += 1>>
<</if>>

<<if $arcologies[0].FSRepopulationFocus > 20>>
	<<if $args[0].preg > 10>>
	<<set $FResult += 2>>
	<<else>>
	<<set $FResult -= 2>>
	<</if>>
<<elseif $arcologies[0].FSRestart > 20>>
	<<if $args[0].bellyPreg >= 500 && $args[0].breedingMark == 1>>
		<<set $FResult += 1>>
	<<elseif $args[0].preg > 10>>
		<<set $FResult -= 10>>
	<<else>>
		<<set $FResult += 0>>
	<</if>>
<</if>>

<<if ($args[0].clitPiercing > 2)>>
	<<set $FResult += 1>>
<</if>>

<<if ($args[0].fetishKnown == 1)>>
<<if ($args[0].fetishStrength > 60)>>
<<if ($args[0].fetish != "none")>>
	<<set $FResult += $args[0].fetishStrength/5>>
<</if>>
<</if>>
<</if>>
<<if ($args[0].attrKnown == 1)>>
<<set $FResult += Math.trunc($args[0].attrXX/20)>>
<<set $FResult += Math.trunc($args[0].attrXY/20)>>
<<if ($args[0].energy > 95)>>
	<<set $FResult += 3>>
<<elseif ($args[0].energy > 80)>>
	<<set $FResult += 2>>
<<elseif ($args[0].energy > 60)>>
	<<set $FResult += 1>>
<<elseif ($args[0].energy <= 40)>>
	<<set $FResult -= 1>>
<<elseif ($args[0].energy <= 20)>>
	<<set $FResult -= 2>>
<</if>>
<</if>>

<<if ($args[0].sexualFlaw != "none")>>
	<<set $FResult -= 2>>
<</if>>
<<if ($args[0].sexualQuirk != "none")>>
	<<set $FResult += 2>>
<</if>>
<<if ($args[0].behavioralFlaw != "none")>>
	<<set $FResult -= 2>>
<</if>>
<<if ($args[0].behavioralQuirk != "none")>>
	<<set $FResult += 2>>
<</if>>

<<if setup.whoreCareers.includes($args[0].career)>>
	<<set $FResult += 1>>
<<elseif ($args[0].oralCount + $args[0].analCount + $args[0].vaginalCount + $args[0].mammaryCount + $args[0].penetrativeCount > 1000)>>
	<<set $FResult += 1>>
<</if>>

<<if !canSee($args[0])>>
	<<set $FResult -= 3>>
<<elseif $args[0].eyes <= -1>>
	<<if $args[0].eyewear != "corrective glasses">>
	<<if $args[0].eyewear != "corrective contacts">>
	<<set $FResult -= 1>>
	<</if>>
	<</if>>
<<elseif $args[0].eyewear == "blurring glasses">>
	<<set $FResult -= 1>>
<<elseif $args[0].eyewear == "blurring contacts">>
	<<set $FResult -= 1>>
<</if>>

<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
	<<if ndef $racialVarieties>>
	<<set $racialVarieties = []>>
	<</if>>
	<<set $seed = 0>>
	<<for $j = 0; $j < $racialVarieties.length; $j++>>
	<<if $args[0].race == $racialVarieties[$j]>>
		<<set $seed = 1>>
	<</if>>
	<</for>>
	<<if $seed == 0>>
	<<set $racialVarieties.push($args[0].race)>>
	<</if>>
<</if>>

<<if $arcologies[0].FSYouthPreferentialist != "unset">>
	<<if $args[0].visualAge < 30>>
		<<if $args[0].actualAge > 30>>
			<<set $FResult += 5>> /* experienced for her apparent age */
		<</if>>
		<<if $args[0].physicalAge > 30>>
			<<set $FResult -= $args[0].physicalAge/2>> /* young bodies shouldn't be creaking like that */
		<</if>>
	<</if>>
<<elseif $arcologies[0].FSMaturityPreferentialist != "unset">>
	<<if $args[0].visualAge >= 30 && $args[0].actualAge >= 30 && $args[0].physicalAge < $args[0].visualAge>>
		<<set _kickingBody = Math.min((($args[0].physicalAge-$args[0].visualAge)*2),20)>> /* looks and acts mature, but has a body that just won't quit */
		<<set $FResult += _kickingBody>>
	<</if>>
<</if>>

<<else>> /* FUCKDOLL */

<<set $FResult += $args[0].fuckdoll/10>>

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

<<set $FResult += Math.max(0, $args[0].aphrodisiacs)*2>>
<<if $args[0].inflationType == "aphrodisiac">>
	<<set $FResult += $args[0].inflation*4>>
<</if>>

<<if ($args[0].lactation > 0)>>
	<<set $FResult += 1>>
<</if>>

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

<<if ($args[0].fetish == "mindbroken")>>
	<<set $FResult = Math.trunc($FResult*0.4)>>
<<else>>
	<<set $FResult = Math.trunc($FResult*0.7)>>
<</if>>

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

<<if $arcologies[0].FSHedonisticDecadence > 20>>
	<<if $args[0].weight < 10>>
		<<set $FResult -= 2>>
	<<elseif $args[0].weight > 190>> /* literally too fat to fuck */
		<<set $FResult -= 5>>
	<</if>>
<</if>>

<<if $FResult < 2>>
	<<set $FResult = 2>>
<</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>>
<</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].inflation == 3>>
	<<set $deadliness -= 3>>
<<elseif $args[0].inflation == 2>>
	<<set $deadliness -= 2>>
<<elseif $args[0].inflation == 1>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].bellyImplant >= 32000>>
	<<set $deadliness -= 5>>
<<elseif $args[0].bellyImplant >= 16000>>
	<<set $deadliness -= 4>>
<<elseif $args[0].bellyImplant >= 8000>>
	<<set $deadliness -= 3>>
<<elseif $args[0].bellyImplant >= 4000>>
	<<set $deadliness -= 2>>
<<elseif $args[0].bellyImplant >= 2000>>
	<<set $deadliness -= 1>>
<</if>>

<<if $args[0].pregKnown == 1 || $args[0].bellyPreg >= 1500>>
	<<if $args[0].bellyPreg >= 750000>>
		<<set $deadliness -= 50>>
	<<elseif $args[0].bellyPreg >= 600000>>
		<<set $deadliness -= 25>>
	<<elseif $args[0].bellyPreg >= 450000>>
		<<set $deadliness -= 15>>
	<<elseif $args[0].bellyPreg >= 300000>>
		<<set $deadliness -= 10>>
	<<elseif $args[0].bellyPreg >= 150000>>
		<<set $deadliness -= 8>>
	<<elseif $args[0].bellyPreg >= 100000>>
		<<set $deadliness -= 7>>
	<<elseif $args[0].bellyPreg >= 10000>>
		<<set $deadliness -= 3>>
	<<elseif $args[0].bellyPreg >= 5000>>
		<<set $deadliness -= 2>>
	<<elseif $args[0].bellyPreg >= 1500>>
		<<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>>
<<else>>
	<<set $deadliness -= 1>>
<</if>>

<<if !canSee($args[0])>>
	<<set $deadliness -= 8>>
<<elseif ($args[0].eyes == -1 && ($args[0].eyewear != "corrective glasses" || $args[0].eyewear != "corrective contacts")) || ($args[0].eyes == 1 && ($args[0].eyewear == "blurring glasses" || $args[0].eyewear == "blurring contacts"))>>
	<<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 > -1 && $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].vagina > -1>>
		<<set $desc = "loli " + $desc>>
	<<else>>
		<<set $desc = "shota " + $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].births >= 10>>
	<<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].preg > 30) && ($args[0].pregType >= 20)) || ($args[0].bellyImplant >= 32000)>>
	<<set $tatScore += 0.75>>
<<elseif (($args[0].preg > 20) && ($args[0].pregType >= 20)) || (($args[0].preg > 30) && ($args[0].pregType >= 10)) || ($args[0].bellyImplant >= 16000)>>
	<<set $tatScore += 1>>
<<elseif ($args[0].belly >= 10000) || ($args[0].inflation == 3) || ($args[0].bellyImplant >= 8000)>>
	<<set $tatScore += 1>>
<<elseif (($args[0].preg >= 10) && ($args[0].pregType >= 20)) || (($args[0].preg > 10) && ($args[0].pregType >= 10)) || ($args[0].bellyPreg >= 5000) || ($args[0].inflation == 2) || ($args[0].bellyImplant >= 4000)>>
	<<set $tatScore += 0.5>>
<<elseif ($args[0].belly >= 1500) || ($args[0].inflation == 1) || ($args[0].bellyImplant >= 2000)>>
	<<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>>
	<<set $fetishChangeChance = Math.trunc(Math.clamp(($args[0].devotion/4)-($args[0].fetishStrength/4), 0, 100))>>
<<else>>
	<<set $fetishChangeChance = 0>>
<</if>>

<</widget>>

<<widget "slaveCost">>

<<Beauty $args[0]>>
<<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].pregType >= 10) && ($args[0].preg > 20)>>
		<<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].pregType >= 10) && ($args[0].preg > 20)>>
		<<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 ($args[0].pregType >= 10) && ($args[0].preg > 20)>>
		<<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 && $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>>
	<</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 $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)>>

<<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>>

<</widget>>
