code:
:: saRulesWidgets [nobr widget]

/* needed to manage the obscene code duplication present in the revised saRules.tw */

<<widget "saRulesAttractionDiscovery">>

<<if $slaves[$i].attrXY <= 5>>
	@@.red;disgusted by men@@
<<elseif $slaves[$i].attrXY <= 15>>
	@@.red;turned off by men@@
<<elseif $slaves[$i].attrXY <= 35>>
	@@.red;not attracted to men@@
<<elseif $slaves[$i].attrXY <= 65>>
	indifferent to men
<<elseif $slaves[$i].attrXY <= 85>>
	@@.green;attracted to men@@
<<elseif $slaves[$i].attrXY <= 95>>
	@@.green;aroused by men@@
<<else>>
	@@.green;passionate about men@@
<</if>>
and
<<if $slaves[$i].attrXX <= 5>>
	@@.red;disgusted by women.@@
<<elseif $slaves[$i].attrXX <= 15>>
	@@.red;turned off by women.@@
<<elseif $slaves[$i].attrXX <= 35>>
	@@.red;not attracted to women.@@
<<elseif $slaves[$i].attrXX <= 65>>
	indifferent to women.
<<elseif $slaves[$i].attrXX <= 85>>
	@@.green;attracted to women.@@
<<elseif $slaves[$i].attrXX <= 95>>
	@@.green;aroused by women.@@
<<else>>
	@@.green;passionate about women.@@
<</if>>

<</widget>>

<<widget "saRulesPlayerFetishPlay">>

<<if ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60)>>
	<<switch $slaves[$i].fetish>>
	<<case "submissive">>
		hold $him down and
		<<if $slaves[$i].vagina <= 0 && $slaves[$i].anus <= 0>>
			use $his body
		<<else>>
			fuck $him
		<</if>>
	<<case "cumslut">>
		<<if $PC.dick != 0>>
			cum in $his mouth
		<<else>>
			use your strap-on on $his mouth
		<</if>>
	<<case "humiliation">>
		use $him in public
	<<case "buttslut">>
		fuck $his butt
	<<case "boobs">>
		fondle $his breasts
		<<if $slaves[$i].lactation > 0>>
			<<set $slaves[$i].lactationDuration = 2>>
			<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk, $slaves[$i].boobsMilk = 0>>
		<</if>>
	<<case "sadist">>
		let $him help you abuse other slaves
	<<case "masochist">>
		hurt $him
	<<case "dom">>
	let $him help you use other slaves
	<<case "pregnancy">>
		<<if isFertile($slaves[$i]) && $PC.dick != 0>>
			put a baby in $him
		<<elseif $slaves[$i].bellyPreg >= 1500 || $slaves[$i].bellyImplant >= 1500>>
			enjoy $his fecund curves
		<<else>>
			breed $him
		<</if>>
	<<default>>
		fuck $him
	<</switch>>
<<else>>
	fuck $him
<</if>>

<</widget>>

<<widget "saRulesPlayerEnergy">>

<<if $freeSexualEnergy > 0>>
	<<if $freeSexualEnergy == 3>>
		You have surplus sexual energy to burn, even when $he doesn't ask, and $he
		<<if $slaves[$i].devotion < -20>>
			@@.hotpink;hates $himself@@ for how often $he gets off on you relieving your needs with $his body.
		<<elseif $slaves[$i].devotion <= 50 || $slaves[$i].trust <= 20>>
			@@.hotpink;gets used to being a sex slave@@ every time $he climaxes as you use $him.
		<<else>>
			@@.hotpink;eagerly looks forward@@ to each climax $he shares with you.
		<</if>>
		<<set $slaves[$i].devotion += 2, $slaves[$i].need = 0>>
		<<= SimpleSexAct.Player($slaves[$i], 10)>>
	<<elseif $freeSexualEnergy == 2>>
		You have surplus sexual energy to fuck $him whenever <<if $slaves[$i].relationship == -3>> you notice $his need<<else>>$he forces $himself to ask<</if>>, and $he is @@.hotpink;sexually dependent@@ on you.
		<<set $slaves[$i].devotion += 1, $slaves[$i].need -= 40>>
		<<= SimpleSexAct.Player($slaves[$i], 5)>>
	<<elseif $slaves[$i].relationship == -3>>
		You have little surplus sexual energy, but you make sure to keep your $wife's needs in mind<<if $slaves[$i].devotion < -20>>, even if $he doesn't want it<</if>>.
		<<set $slaves[$i].need -= 40>>
		<<= SimpleSexAct.Player($slaves[$i], 5)>>
	<<else>>
		You have little surplus sexual energy, and occasionally, $he asks in vain.
		<<set $slaves[$i].need -= 20>>
		<<= SimpleSexAct.Player($slaves[$i], 2)>>
	<</if>>
<<else>>
	You have no surplus sexual energy, and $he asks in vain, @@.gold;reducing $his trust@@ in you.
	<<set $slaves[$i].trust -= 1>>
<</if>>

<</widget>>

<<widget "saRulesPlayerDiscoversFetish">>

<<if $slaves[$i].fetishKnown == 0>>
	<<if $freeSexualEnergy > 0>>
		<<if $freeSexualEnergy > random(0,5)>>
			<<set $slaves[$i].fetishKnown = 1>>
			You discover that $he really likes it when you
			<<switch $slaves[$i].fetish>>
			<<case "submissive">>
				hold $him down and fuck $him; @@.lightcoral;$he's a submissive!@@
			<<case "cumslut">>
				<<if $PC.dick != 0>>
					cum in $his mouth; @@.lightcoral;$he's a cumslut!@@
				<<else>>
					use your strap-on in $his mouth; @@.lightcoral;$he's a cumslut!@@
				<</if>>
			<<case "humiliation">>
				use $him in public; @@.lightcoral;$he's a humiliation fetishist!@@
			<<case "buttslut">>
				<<if canDoAnal($slaves[$i])>>fuck $his butt<<else>>tease $his anus<</if>>; @@.lightcoral;$he's an anal slut!@@
			<<case "boobs">>
				fondle $his breasts; @@.lightcoral;$he's a boob fetishist!@@
			<<case "sadist">>
				let $him help you abuse other slaves; @@.lightcoral;$he's a sadist!@@
			<<case "masochist">>
				hurt $him; @@.lightcoral;$he's a masochist!@@
			<<case "dom">>
				let $him help you use other slaves; @@.lightcoral;$he's dominant!@@
			<<case "pregnancy">>
				<<if $PC.dick != 0>>
					<<if $slaves[$i].mpreg == 0>>
						come <<if canDoVaginal($slaves[$i])>>inside<<else>>on<</if>> $him; @@.lightcoral;$he's a pregnancy fetishist!@@
					<<else>>
						come <<if canDoAnal($slaves[$i])>>inside<<else>>on<</if>> $him; @@.lightcoral;$he's a pregnancy fetishist!@@
					<</if>>
				<<else>>
					talk dirty and call $him a mother; @@.lightcoral;$he's a pregnancy fetishist!@@
				<</if>>
			<<default>>
				fuck $him; @@.lightcoral;$he's got a normal sexuality.@@
			<</switch>>
		<</if>>
	<</if>>
<</if>> /* closes fetish discovery */

<</widget>>

<<widget "saRulesPlayerDrugEffects">>

<<if $slaves[$i].balls > 0>>
	<<if ($slaves[$i].drugs == "testicle enhancement" || $slaves[$i].drugs == "intensive testicle enhancement")>>
		<<if ($slaves[$i].devotion > 20) || ($slaves[$i].trust < -20)>>
			<<if $slaves[$i].hormoneBalance >= 100>>
				$He can't seem to get enough cum out of $his terribly swollen balls in one orgasm to relieve the pressure:
				<<if $slaves[$i].dick>>
					$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
				<<else>>
					$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
				<</if>>
				This forces $him to come to you for release many times a day, and $he @@.mediumaquamarine;is desperately reliant@@
				<<if $slaves[$i].anus > 0 && canDoAnal($slaves[$i]) && $freeSexualEnergy > 0>>
					on your <<if $PC.dick == 0>>strap-on<<else>>penis<</if>> inside $his ass as a source of relief.
				<<else>>
					on you for relief.
				<</if>>
				<<set $slaves[$i].trust += 2>>
			<<else>>
				$His terribly swollen balls force $him to come to you for release several times a day, and $he @@.mediumaquamarine;learns to rely@@
				<<if $slaves[$i].anus > 0 && canDoAnal($slaves[$i]) && $freeSexualEnergy > 0>>
					on your <<if $PC.dick == 0>>strap-on<<else>>penis<</if>> inside $his ass as a source of relief.
				<<else>>
					on you for relief.
				<</if>>
				<<set $slaves[$i].trust += 1>>
			<</if>>
		<<else>>
			$He refuses to come to you for help with $his terribly swollen balls, no matter how backed up $he becomes. The intense blue-balling only @@.mediumorchid;makes $him dislike you more.@@
			<<set $slaves[$i].devotion -= 1>>
		<</if>>
	<<elseif $slaves[$i].drugs == "hyper testicle enhancement">>
		<<if ($slaves[$i].devotion > 20) || ($slaves[$i].trust < -20)>>
			<<if $slaves[$i].hormoneBalance >= 100>>
				$He can't seem to get enough cum out of $his grotesquely swollen balls in one orgasm to get relieve the pressure:
				<<if $slaves[$i].dick>>
					$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
				<<else>>
					$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
				<</if>>
				This forces $him to come to you for release many times a day, and $he @@.mediumaquamarine;is desperately reliant@@
				<<if $slaves[$i].anus > 0 && canDoAnal($slaves[$i]) && $freeSexualEnergy > 0>>
					on your <<if $PC.dick == 0>>strap-on<<else>>penis<</if>> inside $his ass as a source of relief.
				<<else>>
					on you for relief.
				<</if>>
				<<set $slaves[$i].trust += 2>>
			<<else>>
				$His grotesquely swollen balls force $him to come to you for release dozens of times a day, and $he @@.mediumaquamarine;is desperately reliant@@
				<<if $slaves[$i].anus > 0 && canDoAnal($slaves[$i]) && $freeSexualEnergy > 0>>
					on your <<if $PC.dick == 0>>strap-on<<else>>penis<</if>> inside $his ass as a source of relief.
				<<else>>
					on you for relief.
				<</if>>
				<<set $slaves[$i].trust += 1>>
			<</if>>
		<<else>>
			$He refuses to come to you for help with $his grotesquely swollen balls, no matter how backed up and sore $he becomes. The intense blue-balling only @@.mediumorchid;makes $him hate you more.@@
			<<set $slaves[$i].devotion -= 3>>
		<</if>>
	<</if>>
<</if>> /* close overactive balls block */
<<if $slaves[$i].drugs == "super fertility drugs" && canImpreg($slaves[$i], $PC)>>
	<<if ($slaves[$i].devotion > 20) || ($slaves[$i].trust < -20)>>
		$His reproductive system is in overdrive leading $him to come to you for insemination several times a day; $he @@.mediumaquamarine;desperately hopes@@ for the day your seed takes root in $his womb.
		<<set $slaves[$i].trust += 1>>
	<</if>>
<</if>>

<</widget>>

<<widget "saRulesMasturbationFetishPlay">>

<<if ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60)>>
	<<if ($slaves[$i].fetish == "submissive")>>
		frequently pretends to be getting held down and dominated.
	<<elseif ($slaves[$i].fetish == "cumslut")>>
		<<if $slaves[$i].dick > 5>>
			enjoys giving $himself head.
		<<elseif $slaves[$i].dick > 0>>
			enjoys licking up $his own cum.
		<<else>>
			always has a dildo in $his mouth.
		<</if>>
	<<elseif ($slaves[$i].fetish == "humiliation")>>
		usually does it out in the open for all to see.
	<<elseif ($slaves[$i].fetish == "buttslut")>>
		<<if ($slaves[$i].anus > 0)>>
			usually pounds $his ass with the largest dildo $he can find.
		<<else>>
			enjoys fiddling with $his virgin asshole.
		<</if>>
	<<elseif ($slaves[$i].fetish == "boobs")>>
		pays extra attention to $his breasts and nipples.
		<<if $slaves[$i].lactation > 0>>
			<<set $slaves[$i].lactationDuration = 2>>
			<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk, $slaves[$i].boobsMilk = 0>>
		<<else>>
			<<= induceLactation($slaves[$i])>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "sadist")>>
		frequently poses threats at $himself.
	<<elseif ($slaves[$i].fetish == "masochist")>>
		frequently pretends to be getting held down and forcibly raped.
	<<elseif ($slaves[$i].fetish == "dom")>>
		usually pretends to dominate $himself.
	<<elseif ($slaves[$i].fetish == "pregnancy")>>
		<<if $slaves[$i].belly > 1500>>
			<<set _belly = bellyAdjective($slaves[$i])>>
			always rubs and teases $his _belly belly while doing so.
		<<elseif isItemAccessible("a small empathy belly")>>
			frequently straps on a fake belly to enhance $his fun.
		<<else>>
			frequently pretends to be
			<<if $slaves[$i].balls > 0>>
				getting a girl pregnant.
			<<else>>
				getting knocked up.
			<</if>>
		<</if>>
	<<elseif ($slaves[$i].energy > 95)>>
		strives to achieve as many orgasms as $he can in one session.
	<<else>>
		quickly gets off and moves on.
	<</if>>
<<elseif ($slaves[$i].energy > 95)>>
	strives to achieve as many orgasms as $he can in one session.
<<else>>
	quickly gets off and moves on.
<</if>> /* closes ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60) */

<</widget>>

<<widget "saRulesMasturbationDiscoversFetish">>

<<if ($slaves[$i].fetishKnown == 0) && (random(1,20) == 1)>>
	<<set $slaves[$i].fetishKnown = 1>>
	However, you start to notice a trend in $his fantasies,
	<<if ($slaves[$i].fetish == "submissive")>>
		$he likes to tie $himself up and boss $himself around; @@.lightcoral;$he's a submissive!@@
	<<elseif ($slaves[$i].fetish == "cumslut")>>
		<<if $slaves[$i].dick > 0>>
			$he often eats $his own cum when $he's finished; @@.lightcoral;$he's a cumslut!@@
		<<else>>
			$he likes to have something, anything, in $his mouth while $he masturbates; @@.lightcoral;$he's a cumslut!@@
		<</if>>
	<<elseif ($slaves[$i].fetish == "humiliation")>>
		$he tends to masturbate in places where others can walk in on $him; @@.lightcoral;$he's a humiliation fetishist!@@
	<<elseif ($slaves[$i].fetish == "buttslut")>>
		$he always pays special attention to $his butthole; @@.lightcoral;$he's an anal slut!@@
	<<elseif ($slaves[$i].fetish == "boobs")>>
		$he always has a hand to $his nipples; @@.lightcoral;$he's a boob fetishist!@@
		<<if $slaves[$i].lactation > 0>>
			<<set $slaves[$i].lactationDuration = 2>>
			<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk, $slaves[$i].boobsMilk = 0>>
		<<else>>
			<<= induceLactation($slaves[$i])>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "sadist")>>
		$he tends to threaten $his toys; @@.lightcoral;$he's a sadist!@@
	<<elseif ($slaves[$i].fetish == "masochist")>>
		$he often to abuses $himself; @@.lightcoral;$he's a masochist!@@
	<<elseif ($slaves[$i].fetish == "dom")>>
		$he sometimes bosses $his toys around; @@.lightcoral;$he's dominant!@@
	<<elseif ($slaves[$i].fetish == "pregnancy")>>
		$he frequently pretends to either get pregnant, be pregnant, or get someone else pregnant; @@.lightcoral;$he's a pregnancy fetishist!@@
	<<elseif ($slaves[$i].energy > 95)>>
		$he's always horny; @@.lightcoral;$he's a nympho!@@
	<<else>>
		@@.lightcoral;they are incredibly mundane.@@
	<</if>>
<</if>>

<</widget>>

<<widget "saRulesMasturbationDrugEffects">>

<<if $slaves[$i].balls > 0>>
	<<if $slaves[$i].drugs == "testicle enhancement" || $slaves[$i].drugs == "intensive testicle enhancement">>
		<<if $slaves[$i].hormoneBalance >= 100>>
			$He can't seem to get enough cum out of $his terribly swollen balls in one orgasm to get relieve the pressure:
			<<if $slaves[$i].dick>>
				$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
			<<else>>
				$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
			<</if>>
			$He masturbates as often as $he can, but @@.mediumorchid;can't find relief.@@
			<<set $slaves[$i].devotion-->>
		<<else>>
			$His terribly swollen balls force $him to masturbate several times a day, cultivating a need for sex that @@.mediumorchid;$he can't fulfill.@@
			<<set $slaves[$i].devotion -= 1>>
		<</if>>
	<<elseif $slaves[$i].drugs == "hyper testicle enhancement">>
		<<if $slaves[$i].hormoneBalance >= 100>>
			$He can't seem to get enough cum out of $his grotesquely swollen balls in one orgasm to get relieve the pressure:
			<<if $slaves[$i].dick>>
				$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
			<<else>>
				$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
			<</if>>
			$He masturbates non-stop, but @@.mediumorchid;can't find relief.@@
			<<set $slaves[$i].devotion -= 3>>
		<<else>>
			$His grotesquely swollen balls force $him to masturbate constantly, cultivating a need for sex that @@.mediumorchid;$he can't fulfill.@@
			<<set $slaves[$i].devotion -= 1>>
		<</if>>
		<<if $slaves[$i].energy > 40>>
			The constant orgasms steadily lose their impact, @@.red;weakening $his sex drive.@@
			<<set $slaves[$i].energy -= 2>>
		<</if>>
	<</if>>
<</if>>
<<if $slaves[$i].drugs == "super fertility drugs" && canGetPregnant($slaves[$i])>>
	$His reproductive system is in overdrive,
	<<if $slaves[$i].dick > 9>>
		leaving $him @@.mediumorchid;desperately fucking $himself@@ in an effort to get pregnant since @@.gold;you won't <<if $PC.dick != 0>>give $him<<else>>let $him find<</if>> the dick $he needs.@@
		<<if canImpreg($slaves[$i], $slaves[$i])>>
			<<= knockMeUp($slaves[$i], 5, 2, $slaves[$i].ID, 1)>>
		<</if>>
		<<if $slaves[$i].mpreg == 1 && $slaves[$i].anus == 0>>
			@@.lime;$He is so baby crazed $he takes $his own anal virginity.@@
			<<set $slaves[$i].anus++>>
		<<elseif $slaves[$i].vagina == 0>>
			@@.lime;$He is so baby crazed $he takes $his own virginity.@@
			<<set $slaves[$i].vagina++>>
		<</if>>
		<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 2>>
	<<elseif ($slaves[$i].devotion >= -20)>>
		leaving $him @@.mediumorchid;completely unfulfilled@@ since @@.gold;you won't <<if $PC.dick != 0>>give $him<<else>>let $him find<</if>> the dick $he needs.@@
		<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 2>>
	<<else>>
		leaving $him desperate for a thorough seeding @@.mediumorchid;that you've forbidden $him from having.@@
		<<set $slaves[$i].devotion -= 3>>
	<</if>>
<</if>>
<<if $slaves[$i].energy > 60>>
	$His chronic masturbation @@.red;steadily dulls@@ $his sexual pleasure.
	<<set $slaves[$i].energy-->>
<</if>>

<</widget>>

<<widget "saRulesRapeFetish">>

<<set _who = ($slaves[$i].rules.release.slaves === 1) ? "other slaves" : $his + " family">> /* should be the only two choices if we get here */
<<if ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60)>>
	<<if ($slaves[$i].fetish == "submissive")>>
		plead that _who fuck $him.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*40)-($averageDick*5) < random(1,100)>>
					@@.lime;$His asshole is loosened@@ during sex with other slaves, since most of the cocks $he enticed a dominating buttfuck from are very large.
					<<set $slaves[$i].anus++>>
					<<set $slaves[$i].counter.anal += 3, $analTotal += 3>>
				<</if>>
			<</if>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*40)-($averageDick*5) < random(1,100)>>
						Since most of the slaves $he enticed a pounding from are extremely hung, @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina++>>
						<<set $slaves[$i].counter.vaginal += 3, $vaginalTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
	<<elseif ($slaves[$i].fetish == "cumslut")>>
		suck or be sucked by any <<if $slaves[$i].rules.release.slaves === 1>>slave<<else>>relative<</if>> $he fancies.
		<<set _fuckCount = random(5,15)>>
		<<set $slaves[$i].counter.oral += _fuckCount, $oralTotal += _fuckCount>>
	<<elseif ($slaves[$i].fetish == "humiliation")>>
		demand that _who let $him fuck them in public.
		<<if !$slaves[$i].rivalry>>
			<<set _rival = randomRapeRivalryTarget($slaves[$i], (s) => { return (s.devotion <= 20 && s.trust < -20); })>>
			<<if def _rival>>
				Craving a rush, $he repeatedly forces a reluctant <<= SlaveFullName(_rival)>> to have sex with $him in public. _rival.slaveName resents this, and $slaves[$i].slaveName's ongoing sexual abuse @@.lightsalmon;starts a rivalry@@ between them.
				<<set $slaves[$i].rivalry = 1, _rival.rivalry = 1, $slaves[$i].rivalryTarget = _rival.ID, _rival.rivalryTarget = $slaves[$i].ID>>
				<<run SimpleSexAct.Slave(_rival, 4)>>
				<<if canPenetrate(_rival)>>
					<<set _fuckCount = random(1,3)>>
					<<set _rival.counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
				<</if>>
				<<if !App.Utils.sexAllowed($slaves[$i], _rival)>>
					As the rules do not permit $slaves[$i].slaveName and _rival.slaveName to have sex, $he is @@.yellow;severely punished.@@
					<<set $slaves[$i].trust -= 4>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 4)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(1,3)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "buttslut") && canDoAnal($slaves[$i])>>
		demand that _who penetrate $his anus.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*30)-($averageDick*5) < random(1,100)>>
					Since most of the slaves $he demands anal sex from are extremely hung, @@.lime;$his asshole gets stretched out.@@
					<<set $slaves[$i].anus += 1>>
				<</if>>
			<</if>>
		<</if>>
		<<set _fuckCount = random(5,12)>>
		<<set $slaves[$i].counter.anal += _fuckCount, $analTotal += _fuckCount>>
	<<elseif ($slaves[$i].fetish == "boobs")>>
		demand that _who massage $his breasts.
		<<if $slaves[$i].lactation > 0>>
			<<set $slaves[$i].lactationDuration = 2>>
			<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk, $slaves[$i].boobsMilk = 0>>
		<<else>>
			<<= induceLactation($slaves[$i])>>
		<</if>>
		<<set _fuckCount = random(10,25)>>
		<<set $slaves[$i].counter.mammary += _fuckCount, $mammaryTotal += _fuckCount>>
	<<elseif ($slaves[$i].fetish == "sadist")>>
		force the most reluctant <<if $slaves[$i].rules.release.slaves === 1>>slaves<<else>>members of $his family<</if>> to let $him fuck them.
		<<if !$slaves[$i].rivalry>>
			<<set _rival = randomRapeRivalryTarget($slaves[$i], (s) => { return (s.devotion <= 50 && s.sexualFlaw !== "none"); })>>
			<<if def _rival>>
				$He focuses on <<= SlaveFullName(_rival)>>, who has a sexual flaw $slaves[$i].slaveName can exploit. $He sadistically
				<<if _rival.sexualFlaw == "hates oral">>
					rapes the poor slave's face<<if !canAchieveErection($slaves[$i])>> with <<if (hasAnyArms($slaves[$i]))>>$his fingers<<else>>a strap-on<</if>><</if>>. _rival.slaveName hates oral
				<<elseif _rival.sexualFlaw == "hates penetration" && canDoVaginal(_rival)>>
					rapes the poor slave's pussy<<if !canAchieveErection($slaves[$i])>> with <<if (hasAnyArms($slaves[$i]))>>$his fingers<<else>>a strap-on<</if>><</if>>. _rival.slaveName hates penetration
				<<elseif (_rival.sexualFlaw == "hates anal" || _rival.sexualFlaw == "hates penetration") && canDoAnal(_rival)>>
					rapes the poor slave's ass<<if !canAchieveErection($slaves[$i])>> with <<if (hasAnyArms($slaves[$i]))>>$his fingers<<else>>a strap-on<</if>><</if>>. _rival.slaveName hates anal
				<<elseif _rival.sexualFlaw == "shamefast">>
					rapes the poor slave in public. _rival.slaveName is terribly shamefast
				<<elseif _rival.sexualFlaw == "idealistic">>
					rapes the poor slave every time $he catches _him2 being romantic. _rival.slaveName is still idealistic
				<<else>>
					rapes the poor slave every chance $he gets,
				<</if>>
				and the sexual abuse @@.lightsalmon;starts a rivalry@@ between them.
				<<set $slaves[$i].rivalry = 1, _rival.rivalry = 1, $slaves[$i].rivalryTarget = _rival.ID, _rival.rivalryTarget = $slaves[$i].ID>>
				<<run SimpleSexAct.Slave(_rival, 4)>>
				<<if canPenetrate(_rival)>>
					<<set _fuckCount = random(1,3)>>
					<<set _rival.counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
				<</if>>
				<<if !App.Utils.sexAllowed($slaves[$i], _rival)>>
					As the rules do not permit $slaves[$i].slaveName and _rival.slaveName to have sex, $he is @@.yellow;severely punished.@@
					<<set $slaves[$i].trust -= 4>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 4)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(1,3)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "masochist")>>
		demand that _who hurt $him.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*30)-($averageDick*5) < random(1,100)>>
					@@.lime;$His asshole is loosened@@ during sex with hung slaves, since $he often relies on painal to address $his needs.
					<<set $slaves[$i].anus += 1>>
					<<set $slaves[$i].counter.anal += 3, $analTotal += 3>>
				<</if>>
			<</if>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*30)-($averageDick*5) < random(1,100)>>
						Since $he usually demands that hung slaves fuck $him hard enough to make $his pussy hurt, @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina += 1>>
						<<set $slaves[$i].counter.vaginal += 3, $vaginalTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 12)>>
	<<elseif ($slaves[$i].fetish == "dom")>>
		force _who to submit to $him.
		<<if !$slaves[$i].rivalry>>
			<<set _rival = randomRapeRivalryTarget($slaves[$i], (s) => { return (s.devotion <= 20 && s.trust < -20); })>>
			<<if def _rival>>
				$He repeatedly rapes a reluctant <<= SlaveFullName(_rival)>>; $he can't seem to keep $his hand<<if (hasBothArms($slaves[$i]) || !hasAnyArms($slaves[$i]))>>s<</if>><<if (!hasAnyArms($slaves[$i]))>> (so to speak)<</if>> off the poor slave, who can't avoid $him. Not surprisingly, _rival.slaveName resents this, and $slaves[$i].slaveName's ongoing sexual abuse @@.lightsalmon;starts a rivalry@@ between them.
				<<set $slaves[$i].rivalry = 1, _rival.rivalry = 1, $slaves[$i].rivalryTarget = _rival.ID, _rival.rivalryTarget = $slaves[$i].ID>>
				<<run SimpleSexAct.Slave(_rival, 4)>>
				<<if !App.Utils.sexAllowed($slaves[$i], _rival)>>
					As the rules do not permit $slaves[$i].slaveName and _rival.slaveName to have sex, $he is @@.yellow;severely punished.@@
					<<set $slaves[$i].trust -= 4>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(6,9)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "pregnancy")>>
		demand that _who indulge $his pregnancy fetish.
		<<if $averageDick > 5>>
			<<if $slaves[$i].mpreg == 0>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*40)-($averageDick*5) < random(1,100)>>
						Since $he constantly demands to be fucked deeply to get $his womb filled with cum, @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina += 1>>
						<<set _fuckCount = random(7,14)>>
						<<set $slaves[$i].counter.vaginal += _fuckCount, $vaginalTotal += _fuckCount>>
					<</if>>
				<</if>>
			<<else>>
				<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
					<<if ($slaves[$i].anus*40)-($averageDick*5) < random(1,100)>>
						Since $he constantly demands to be fucked deeply to get $his womb filled with cum, @@.lime;$his ass gets stretched out.@@
						<<set $slaves[$i].anus += 1>>
						<<set _fuckCount = random(7,14)>>
						<<set $slaves[$i].counter.anal += _fuckCount, $analTotal += _fuckCount>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(6,9)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].energy > 95)>>
		demand that _who satisfy $his formidable appetites.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*30)-($averageDick*5) < random(1,100)>>
					@@.lime;$His asshole is loosened@@ during sex with well endowed slaves, since $he's so addicted to sex all $his holes see heavy traffic.
					<<set $slaves[$i].anus += 1>>
					<<set $slaves[$i].counter.anal += 3, $analTotal += 3>>
				<</if>>
			<</if>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*30)-($averageDick*5) < random(1,100)>>
						$He indulges in non-stop sex with your well endowed slaves, so much so that @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina += 1>>
						<<set $slaves[$i].counter.vaginal += 3, $vaginalTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(3,6)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<else>>
		demand that _who have sex with $him.
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(3,6)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<</if>>
<<else>>
	demand that _who have sex with $him.
	<<run SimpleSexAct.Slave($slaves[$i], 7)>>
	<<if canPenetrate($slaves[$i])>>
		<<set _fuckCount = random(3,6)>>
		<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
	<</if>>
<</if>> /* closes ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60) */

<</widget>>

<<widget "saRulesConsentFetish">>

<<if ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60)>>
	<<if ($slaves[$i].fetish == "submissive")>>
		usually pairing off with a more dominant slave.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*40)-($averageDick*5) < random(1,100)>>
					@@.lime;$His asshole is loosened@@ during sex with other slaves, since most of the cocks $he lets dominate $his backdoor are very large.
					<<set $slaves[$i].anus += 1>>
					<<set $slaves[$i].counter.anal += 3, $analTotal += 3>>
				<</if>>
			<</if>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*40)-($averageDick*5) < random(1,100)>>
						Since most of the slaves $he takes a pounding from are extremely hung, @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina += 1>>
						<<set $slaves[$i].counter.vaginal += 3, $vaginalTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
	<<elseif ($slaves[$i].fetish == "cumslut")>>
		and is popular for $his willingness to give oral.
		<<set _fuckCount = random(5,15)>>
		<<set $slaves[$i].counter.oral += _fuckCount, $oralTotal += _fuckCount>>
	<<elseif ($slaves[$i].fetish == "humiliation")>>
		usually asking them to fuck out in the open.
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(1,3)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "buttslut")>>
		looking after anyone who will
		<<if ($slaves[$i].anus > 0)>>
			<<if canDoAnal($slaves[$i])>>
				penetrate
				<<set _fuckCount = random(5,12)>>
				<<set $slaves[$i].counter.anal += _fuckCount, $analTotal += _fuckCount>>
			<<else>>
				tease
			<</if>>
			$his ass
		<<else>>
			tease $his virgin anus
		<</if>>
		in return.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*30)-($averageDick*5) < random(1,100)>>
					Since most of the slaves $he enjoys anal sex with are extremely hung, @@.lime;$his asshole gets stretched out.@@
					<<set $slaves[$i].anus += 1>>
				<</if>>
			<</if>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "boobs")>>
		seeing to anyone who will show $his breasts some love.
		<<if $slaves[$i].lactation > 0>>
			<<set $slaves[$i].lactationDuration = 2>>
			<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk, $slaves[$i].boobsMilk = 0>>
		<<else>>
			<<= induceLactation($slaves[$i])>>
		<</if>>
		<<set _fuckCount = random(10,25)>>
		<<set $slaves[$i].counter.mammary += _fuckCount, $mammaryTotal += _fuckCount>>
	<<elseif ($slaves[$i].fetish == "sadist")>>
		usually pairing off with a masochistic slave willing to accept $his abuse.
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(1,3)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "masochist")>>
		usually pairing off with an abusive slave.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*30)-($averageDick*5) < random(1,100)>>
					@@.lime;$His asshole is loosened,@@ since $he begs hung slaves to fuck $his butt until $he cries.
					<<set $slaves[$i].anus += 1>>
					<<set $slaves[$i].counter.anal += 3, $analTotal += 3>>
				<</if>>
			<</if>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*30)-($averageDick*5) < random(1,100)>>
						Since $he eagerly begs hung slaves to fuck $him until $he cries, @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina += 1>>
						<<set $slaves[$i].counter.vaginal += 3, $vaginalTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 6)>>
	<<elseif ($slaves[$i].fetish == "dom")>>
		usually pairing off with a submissive bitch.
		<<run SimpleSexAct.Slave($slaves[$i], 6)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(1,3)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].fetish == "pregnancy")>>
		doing $his best to pair off with any pregnant slaves.
		<<if $slaves[$i].mpreg == 0>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*40)-($averageDick*5) < random(1,100)>>
						$He also takes cock whenever $he can, begging to be fucked deeply to get $his womb filled with cum, so @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina += 1>>
						<<set $slaves[$i].counter.vaginal += 3, $vaginalTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<<else>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
					<<if ($slaves[$i].anus*40)-($averageDick*5) < random(1,100)>>
						$He also takes cock whenever $he can, begging to be fucked deeply to get $his womb filled with cum, so @@.lime;$his ass gets stretched out.@@
						<<set $slaves[$i].anus += 1>>
						<<set $slaves[$i].counter.anal += 3, $analTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(6,9)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<elseif ($slaves[$i].energy > 95)>>
		and has to give out a lot of favors to get enough attention for $himself.
		<<if $averageDick > 4>>
			<<if $slaves[$i].anus > 0 && $slaves[$i].anus < 3 && canDoAnal($slaves[$i])>>
				<<if ($slaves[$i].anus*30)-($averageDick*5) < random(1,100)>>
					@@.lime;$His asshole is loosened@@ during sex with well endowed slaves, since $he's so addicted to sex all $his holes see heavy traffic.
					<<set $slaves[$i].anus += 1>>
					<<set $slaves[$i].counter.anal += 3, $analTotal += 3>>
				<</if>>
			<</if>>
			<<if $averageDick > 5>>
				<<if $slaves[$i].vagina > 0 && $slaves[$i].vagina < 3 && canDoVaginal($slaves[$i])>>
					<<if ($slaves[$i].vagina*30)-($averageDick*5) < random(1,100)>>
						$He indulges in non-stop sex with your well endowed slaves, so much so that @@.lime;$his cunt gets stretched out.@@
						<<set $slaves[$i].vagina += 1>>
						<<set $slaves[$i].counter.vaginal += 3, $vaginalTotal += 3>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(3,6)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<<else>>
		doing $his best to get off and move on.
		<<run SimpleSexAct.Slave($slaves[$i], 7)>>
		<<if canPenetrate($slaves[$i])>>
			<<set _fuckCount = random(3,6)>>
			<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
		<</if>>
	<</if>>
<<else>>
	doing $his best to get off and move on.
	<<run SimpleSexAct.Slave($slaves[$i], 7)>>
	<<if canPenetrate($slaves[$i])>>
		<<set _fuckCount = random(3,6)>>
		<<set $slaves[$i].counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
	<</if>>
<</if>> /* closes ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60) */

<</widget>>

<<widget "saRulesConsentDiscoversFetish">>

<<if ($slaves[$i].fetishKnown == 0)>>
	<<if (random(1,2) == 1)>>
		<<set $slaves[$i].fetishKnown = 1>>
		However, one of $his partners
		<<if ($slaves[$i].fetish == "submissive")>>
			holds $him down, and $he loves it; @@.lightcoral;$he's a submissive!@@
		<<elseif ($slaves[$i].fetish == "cumslut")>>
			finally has to push $him away to get $him to stop sucking; @@.lightcoral;$he's a cumslut!@@
		<<elseif ($slaves[$i].fetish == "humiliation")>>
			fucks $him in public, and $he loves it; @@.lightcoral;$he's a humiliation fetishist!@@
		<<elseif ($slaves[$i].fetish == "buttslut")>>
			<<if ($slaves[$i].anus > 0)>>
				<<if canDoAnal($slaves[$i])>>fucks $his butt<<else>>teases $his anus<</if>>, and $he loves it;
			<<else>>
				teases $his virgin anus, and $he loves it;
			<</if>>
			@@.lightcoral;$he's an anal slut!@@
		<<elseif ($slaves[$i].fetish == "boobs")>>
			fondles $his breasts, and $he loves it; @@.lightcoral;$he's a boob fetishist!@@
			<<if $slaves[$i].lactation > 0>>
				<<set $slaves[$i].lactationDuration = 2>>
				<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk, $slaves[$i].boobsMilk = 0>>
			<<else>>
				<<= induceLactation($slaves[$i])>>
			<</if>>
		<<elseif ($slaves[$i].fetish == "sadist")>>
			asks $slaves[$i].slaveName to hit $him, which $slaves[$i].slaveName enjoys doing; @@.lightcoral;$he's a sadist!@@
		<<elseif ($slaves[$i].fetish == "masochist")>>
			hits $slaves[$i].slaveName while fucking $him, which only makes $him hornier; @@.lightcoral;$he's a masochist!@@
		<<elseif ($slaves[$i].fetish == "dom")>>
			asks $slaves[$i].slaveName to make them $slaves[$i].slaveName's bitch, which $slaves[$i].slaveName manages like a natural; @@.lightcoral;$he's dominant!@@
		<<elseif ($slaves[$i].fetish == "pregnancy")>>
			pretends to get $him pregnant, which $he really enjoys; @@.lightcoral;$he's a pregnancy fetishist!@@
		<<elseif ($slaves[$i].energy > 95)>>
			discovers that $he cannot be satisfied; @@.lightcoral;$he's a nympho!@@
		<<else>>
			discovers that $he isn't terribly exciting; @@.lightcoral;$he's got a normal sexuality.@@
		<</if>>
	<</if>>
<</if>>

<</widget>>

<<widget "saRulesRapeDiscoversFetish">>

<<if ($slaves[$i].fetishKnown == 0)>>
	<<if (random(1,2) == 1)>>
		<<set $slaves[$i].fetishKnown = 1>>
		You discover that $he really likes it when the other slaves
		<<if ($slaves[$i].fetish == "submissive")>>
			hold $him down and fuck $him; @@.lightcoral;$he's a submissive!@@
		<<elseif ($slaves[$i].fetish == "cumslut")>>
			cum in $his mouth; @@.lightcoral;$he's a cumslut!@@
		<<elseif ($slaves[$i].fetish == "humiliation")>>
			use $him in public; @@.lightcoral;$he's a humiliation fetishist!@@
		<<elseif ($slaves[$i].fetish == "buttslut")>>
			<<if ($slaves[$i].anus > 0)>>
				<<if canDoAnal($slaves[$i])>>fuck $his butt<<else>>tease $his anus<</if>>;
			<<else>>
				tease $his virgin anus;
			<</if>>
			@@.lightcoral;$he's an anal slut!@@
		<<elseif ($slaves[$i].fetish == "boobs")>>
			fondle $his breasts; @@.lightcoral;$he's a boob fetishist!@@
			<<if $slaves[$i].lactation > 0>>
				<<set $slaves[$i].lactationDuration = 2>>
				<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk, $slaves[$i].boobsMilk = 0>>
			<<else>>
				<<= induceLactation($slaves[$i])>>
			<</if>>
		<<elseif ($slaves[$i].fetish == "sadist")>>
			let $him abuse them; @@.lightcoral;$he's a sadist!@@
		<<elseif ($slaves[$i].fetish == "masochist")>>
			hurt $him; @@.lightcoral;$he's a masochist!@@
		<<elseif ($slaves[$i].fetish == "dom")>>
			let $him dominate them; @@.lightcoral;$he's dominant!@@
		<<elseif ($slaves[$i].fetish == "pregnancy")>>
			<<if $slaves[$i].mpreg == 0>>
				come <<if canDoVaginal($slaves[$i])>>inside<<else>>on<</if>> $him; @@.lightcoral;$he's a pregnancy fetishist!@@
			<<else>>
				come <<if canDoAnal($slaves[$i])>>inside<<else>>on<</if>> $him; @@.lightcoral;$he's a pregnancy fetishist!@@
			<</if>>
		<<else>>
			fuck $him; @@.lightcoral;$he's got a normal sexuality.@@
		<</if>>
	<</if>>
<</if>>

<</widget>>

<<widget "saRulesPermissiveDrugEffects">>

<<set _who = ($slaves[$i].rules.release.slaves === 1) ? "other slaves" : $his + " family">> /* should be the only two choices if we get here */
<<if $slaves[$i].balls > 0>>
	<<if $slaves[$i].drugs == "testicle enhancement" || $slaves[$i].drugs == "intensive testicle enhancement">>
		<<if ($slaves[$i].devotion > 20) || ($slaves[$i].trust < -20)>>
			<<if $slaves[$i].hormoneBalance >= 100>>
				$He can't seem to get enough cum out of $his terribly swollen balls in one orgasm to relieve the pressure:
				<<if $slaves[$i].dick>>
					$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
				<<else>>
					$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
				<</if>>
				$He is very reliant on _who to help $him, which @@.mediumaquamarine;habituates $him@@ to slave sex.
			<<else>>
				$His terribly swollen balls force $him to rely on _who for release several times a day, and jetting cum into and onto them @@.mediumaquamarine;habituates $him@@ to slave sex.
			<</if>>
			<<set $slaves[$i].trust += 1>>
		<<else>>
			$He can't seem to get enough cum out of $his terribly swollen balls to relieve the pressure and is either unwilling or unable to get help with it, something $he @@.mediumorchid;blames you for.@@
			<<set $slaves[$i].devotion -= 1>>
		<</if>>
	<<elseif $slaves[$i].drugs == "hyper testicle enhancement">>
		<<if ($slaves[$i].devotion > 20) || ($slaves[$i].trust < -20) || !canPenetrate($slaves[$i])>>
			<<if $slaves[$i].hormoneBalance >= 100>>
				$He can't seem to get enough cum out of $his grotesquely swollen balls in one orgasm to get relieve the pressure:
				<<if $slaves[$i].dick>>
					$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
				<<else>>
					$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
				<</if>>
				$He is completely dependent on your _who to help $him, which @@.mediumaquamarine;habituates $him@@ to slave sex.
			<<else>>
				$His grotesquely swollen balls force $him to rely on _who for release throughout times a day, and swelling them with cum @@.mediumaquamarine;habituates $him@@ to slave sex, though you have to take precautions so $he doesn't knock up your entire stock.
			<</if>>
			<<set $slaves[$i].trust += 1>>
		<<else>>
			$He can't seem to get enough cum out of $his grotesquely swollen balls to relieve the pressure and is either unwilling or unable to get help with it, something $he @@.mediumorchid;blames you for.@@
			<<set $slaves[$i].devotion -= 1>>
		<</if>>
	<</if>>
<</if>>
<<if $slaves[$i].drugs == "super fertility drugs" && canGetPregnant($slaves[$i])>>
	$His reproductive system is in overdrive leading $him to seek out any dicked <<if $slaves[$i].rules.release.slaves === 1>>slaves<<else>>relatives<</if>> $he can find several times a day. $He @@.mediumaquamarine;desperately longs@@ for the day $his efforts fill $his womb with child.
	<<set $slaves[$i].trust += 1>>
<</if>>

<</widget>>

<<widget "saRulesNoRelease">>

	<<if (disobedience($slaves[$i]) > random(0, 100))>>
		is forbidden to masturbate or seek sexual release. In $his @@.mediumorchid;intense frustration@@ $he disobeys and is @@.gold;severely punished@@ for illicit masturbation.
		<<set $slaves[$i].devotion -= 2, $slaves[$i].trust -= 2>>
	<<else>>
		is forbidden to masturbate or seek sexual release, which @@.mediumorchid;highly frustrates@@ $him.
		<<set $slaves[$i].devotion -= 2>>
	<</if>>

<</widget>>

<<widget "saRulesNoReleaseDrugEffects">>

<<if $slaves[$i].balls > 0>>
	<<if $slaves[$i].drugs == "testicle enhancement" || $slaves[$i].drugs == "intensive testicle enhancement">>
		<<if $slaves[$i].hormoneBalance >= 100>>
			$He can't seem to get enough cum out of $his terribly swollen balls in one orgasm to get relieve the pressure:
			<<if $slaves[$i].dick>>
				$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
			<<else>>
				$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
			<</if>>
			Forbidden to masturbate or seek relief through sex, he @@.mediumorchid;can't find relief@@ and @@.red;the situation harms $his health.@@
			<<set $slaves[$i].devotion -= 2>>
		<<else>>
			$His terribly swollen balls ache, cultivating a need for sex that @@.mediumorchid;$he can't fulfill@@ and @@.red;harming $his health.@@
			<<set $slaves[$i].devotion -= 2>>
		<</if>>
		<<run healthDamage($slaves[$i], 3)>>
	<<elseif $slaves[$i].drugs == "hyper testicle enhancement">>
		<<if $slaves[$i].hormoneBalance >= 100>>
			$He can't seem to get enough cum out of $his grotesquely swollen balls in one orgasm to get relieve the pressure:
			<<if $slaves[$i].dick>>
				$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
			<<else>>
				$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
			<</if>>
			Forbidden to masturbate or seek relief through sex, he @@.mediumorchid;can't find relief@@ and @@.red;the situation harms $his health.@@
			<<set $slaves[$i].devotion -= 4>>
		<<else>>
			$His grotesquely swollen balls ache, cultivating a need for sex that @@.mediumorchid;$he can't fulfill@@ and @@.red;harming $his health.@@
			<<set $slaves[$i].devotion -= 4>>
		<</if>>
		<<run healthDamage($slaves[$i], 6)>>
	<</if>>
<</if>>
<<if $slaves[$i].drugs == "super fertility drugs" && canGetPregnant($slaves[$i])>>
	$His reproductive system is in overdrive,
	<<if ($slaves[$i].devotion >= -20)>>
		leaving $him @@.mediumorchid;completely unfulfilled@@ since @@.gold;you won't <<if $PC.dick != 0>>give $him<<else>>let $him find<</if>> the dick $he needs.@@
		<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 2>>
	<<else>>
		leaving $him desperate for a thorough seeding @@.mediumorchid;that you've forbidden $him from having.@@
		<<set $slaves[$i].devotion -= 3>>
	<</if>>
<</if>>
<<if $slaves[$i].energy > 50>>
	$His enforced chastity @@.red;habituates $him to a lack of release.@@
	<<set $slaves[$i].energy -= 2>>
<</if>>

<</widget>>

<<widget "saRulesPartnerDrugEffects">>

<<set _sr = getSlave($slaves[$i].relationshipTarget)>>
<<setLocalPronouns _sr 2>>
<<if $slaves[$i].balls > 0>>
	<<if ($slaves[$i].drugs == "testicle enhancement" || $slaves[$i].drugs == "intensive testicle enhancement")>>
		<<if $slaves[$i].hormoneBalance >= 100>>
			$He can't seem to get enough cum out of $his terribly swollen balls in one orgasm to relieve the pressure:
			<<if $slaves[$i].dick>>
				$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
			<<else>>
				$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
			<</if>>
			This forces $him to find $his <<= relationshipTerm($slaves[$i])>> for release many times a day, and $he @@.mediumaquamarine;is desperately reliant@@ on _him2 for relief.
			<<set $slaves[$i].trust += 2>>
		<<else>>
			$His terribly swollen balls force $him to find $his <<= relationshipTerm($slaves[$i])>> for release several times a day, and $he @@.mediumaquamarine;relies@@ on _him2 for relief.
			<<set $slaves[$i].trust += 1>>
		<</if>>
	<<elseif $slaves[$i].drugs == "hyper testicle enhancement">>
		<<if $slaves[$i].hormoneBalance >= 100>>
			$He can't seem to get enough cum out of $his grotesquely swollen balls in one orgasm to get relieve the pressure:
			<<if $slaves[$i].dick>>
				$his poor soft dick produces slow, anemic ejaculations, no matter how backed up $he is.
			<<else>>
				$his cumhole produces slow, anemic ejaculations, no matter how backed up $he is.
			<</if>>
			This forces $him to find $his <<= relationshipTerm($slaves[$i])>> for release many times a day, and $he @@.mediumaquamarine;is desperately reliant@@ on _him2 for relief.
			<<set $slaves[$i].trust += 2>>
		<<else>>
			$His grotesquely swollen balls force $him to come to find $his <<= relationshipTerm($slaves[$i])>> for release dozens of times a day, and $he @@.mediumaquamarine;is desperately reliant@@ on _him2 for relief.
			<<set $slaves[$i].trust += 1>>
		<</if>>
	<</if>>
<</if>> /* close overactive balls block */
<<if $slaves[$i].drugs == "super fertility drugs" && canImpreg($slaves[$i], _sr)>>
	<<if ($slaves[$i].devotion > 20) || ($slaves[$i].trust < -20)>>
		$His reproductive system is in overdrive leading $him to come to find $his <<= relationshipTerm($slaves[$i])>> for insemination several times a day; $he @@.mediumaquamarine;desperately hopes@@ for the day _his2 seed takes root in $his womb.
		<<set $slaves[$i].trust += 1>>
	<</if>>
<</if>>

<</widget>>


code:
:: slave creation widgets [widget nobr]

/%
 Call as <<StartingGirlsWorkaround>>
%/
<<widget "StartingGirlsWorkaround">>
	<<set $activeSlave = GenerateNewSlave()>>
	<<set $startingGirlCopied = 0>>
	<<run setHealth($activeSlave, 0)>>
	<<set $activeSlave.devotion = 0>>
	<<set $activeSlave.trust = 0>>
	<<set $activeSlave.sexualQuirk = "none">>
	<<set $activeSlave.behavioralQuirk = "none">>
	<<set $activeSlave.fetishKnown = 1>>
	<<if $activeSlave.vagina < 0>>
		<<set $activeSlave.ovaries = 0>>
	<<elseif $activeSlave.vagina < 1>>
		<<set $activeSlave.skill.vaginal = 0>>
	<</if>>
	<<if $activeSlave.anus < 1>>
		<<set $activeSlave.skill.anal = 0>>
	<</if>>

	<<set $activeSlave.actualAge = Number($activeSlave.actualAge) || 18>>
	<<set $activeSlave.devotion = Number($activeSlave.devotion) || 0>>
	<<set $activeSlave.trust = Number($activeSlave.trust) || 0>>
	<<if $activeSlave.indenture >= 0>>
		<<set $activeSlave.indenture = Math.clamp($activeSlave.indenture, 26, 208) || 26>>
	<</if>>
	<<set $activeSlave.height = Math.clamp($activeSlave.height, 85, 274) || 140>>
	<<set $activeSlave.boobs = Math.clamp(Math.trunc($activeSlave.boobs/50)*50, 0, 50000) || 200>>
<</widget>>

/%
 Call as <<SaleDescription>>
%/
<<widget "SaleDescription">>
	<<replace #slaveinfo>>
		<<set $saleDescription = 1>>
		<<include "Long Slave Description">>
	<</replace>>
<</widget>>

<<widget "SlaveCostDescription">>
	<<set _slaveCost = startingSlaveCost($activeSlave)>>
	<<if _slaveCost > $cash>>
	@@.red;This slave will cost ''<<print cashFormat(_slaveCost)>>.''

	You only have: <<print cashFormat($cash)>>@@
	<<else>>
	This slave will cost @@.yellowgreen;''<<print cashFormat(_slaveCost)>>.''@@

	You have <<print cashFormat($cash)>>.
	<</if>>
<</widget>>
/%
 Call as <<StartingGirlsCost>>
%/
<<widget "StartingGirlsCost">>

<<replace "#cost">>
<<SlaveCostDescription>>
<</replace>>
<<if $cash >= _slaveCost>>
	<<set $activeSlave.actualAge = Number($activeSlave.actualAge) || 18>>
	<<set $activeSlave.devotion = Number($activeSlave.devotion) || 0>>
	<<set $activeSlave.trust = Number($activeSlave.trust) || 0>>
	<<if $activeSlave.indenture >= 0>>
		<<set $activeSlave.indenture = Math.clamp($activeSlave.indenture, 26, 208) || 26>>
	<</if>>
	<<set $activeSlave.height = Math.clamp($activeSlave.height, 85, 274) || 140>>
	<<set $activeSlave.boobs = Math.clamp(Math.trunc($activeSlave.boobs/50)*50, 0, 50000) || 200>>
	<<set $slaveWithoutBonuses = $activeSlave>>
	<<if $PC.career != "engineer">>

		<<link "Add this slave">>
			<<set $returnTo = "Commit Starting Girl", $createRelatedSlave = 0, $applyCareerBonus = 1, $careerBonusApplied = 0>>
			<<set _slaveCost = startingSlaveCost($activeSlave)>>
			<<run cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave)>>
			<<goto "RG AS Dump">>
		<</link>>
		//This will apply your @@.springgreen;career bonus@@ to $him:
		<<if $PC.career == "capitalist">>
			one free level of @@.cyan;prostitution skill.@@
		<<elseif $PC.career == "mercenary">>
			@@.mediumaquamarine;+10 trust.@@
		<<elseif $PC.career == "slaver">>
			@@.hotpink;+10 devotion.@@
		<<elseif $PC.career == "medicine">>
			free @@.lime;basic implants.@@
		<<elseif $PC.career == "celebrity">>
			one free level of @@.cyan;entertainment skill.@@
		<<elseif $PC.career == "gang">>
			@@.green;+5 health@@ and a free level of @@.cyan;combat skill@@
		<<elseif $PC.career == "escort">>
			two free levels of @@.cyan;sex skills,@@ one free level of @@.cyan;prostitution skill,@@ and one free level of @@.cyan;entertainment skill.@@
		<<elseif $PC.career == "servant">>
			@@.mediumaquamarine;+10 trust@@ and @@.hotpink;+10 devotion.@@
		<<elseif $PC.career == "wealth">>
			two free levels of @@.cyan;sex skills.@@
		<<elseif $PC.career == "BlackHat">>
			one free level of @@.cyan;intelligence.@@
		<<else>>
			@@.hotpink;+10 devotion,@@ one free level of @@.cyan;prostitution skill@@ and @@.cyan;entertainment skill,@@ and two free levels of @@.cyan;sex skills.@@
		<</if>>//

		<<link "Add slave without career bonus">>
			<<set $returnTo = "Commit Starting Girl", $createRelatedSlave = 0, $applyCareerBonus = 0, $careerBonusApplied = 0>>
			<<set _slaveCost = startingSlaveCost($activeSlave)>>
			<<run cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave)>>
			<<goto "RG AS Dump">>
		<</link>>
	<<else>>

		<<link "Add slave">>
			<<set $returnTo = "Commit Starting Girl", $createRelatedSlave = 0, $applyCareerBonus = 0, $careerBonusApplied = 0>>
			<<set _slaveCost = startingSlaveCost($activeSlave)>>
			<<run cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave)>>
			<<goto "RG AS Dump">>
		<</link>>

	<</if>>
<<else>>

//You lack the necessary funds to add this slave.//
<</if>>

[[Discard this slave and continue|Acquisition]]
<</widget>>

/%
 Call as <<CustomSlaveAge>>
%/
<<widget "CustomSlaveAge">>
	<<replace #age>>
		<<if $customSlave.age < 3>>2- years old.
		<<elseif $customSlave.age < 5>>3-4 years old.
		<<elseif $customSlave.age < 7>>5-6 years old.
		<<elseif $customSlave.age < 10>>7-9 years old.
		<<elseif $customSlave.age < 13>>10-12 years old.
		<<elseif $customSlave.age < 15>>13-14 years old.
		<<elseif $customSlave.age < 18>>15-17 years old.
		<<elseif $customSlave.age < 20>>18-19 years old.
		<<elseif $customSlave.age < 25 && $retirementAge >= 25>>20-24 years old.
		<<elseif $customSlave.age < 25 && $retirementAge >= 20>>20+ years old.
		<<elseif $customSlave.age < 30 && $retirementAge >= 30>>25-29 years old.
		<<elseif $customSlave.age < 30 && $retirementAge >= 25>>25+ years old.
		<<elseif $customSlave.age < 40 && $retirementAge >= 40>>30-39 years old.
		<<elseif $customSlave.age < 40 && $retirementAge >= 30>>30+ years old.
		<<elseif $customSlave.age < 50 && $retirementAge >= 50>>40-49 years old.
		<<elseif $customSlave.age < 50 && $retirementAge >= 40>>40+ years old.
		<<elseif $customSlave.age < 60 && $retirementAge >= 60>>50-59 years old.
		<<elseif $customSlave.age < 60 && $retirementAge >= 50>>50+ years old.
		<<elseif $customSlave.age < 70 && $retirementAge >= 70>>60-69 years old.
		<<elseif $customSlave.age < 70 && $retirementAge >= 60>>60+ years old.
		<<elseif $customSlave.age < 80 && $retirementAge >= 80>>70-79 years old.
		<<elseif $customSlave.age < 80 && $retirementAge >= 70>>70+ years old.
		<<elseif $customSlave.age < 90 && $retirementAge >= 90>>80-89 years old.
		<<elseif $customSlave.age < 90 && $retirementAge >= 80>>80+ years old.
		<<elseif $customSlave.age < 100 && $retirementAge >= 100>>90-99 years old.
		<<elseif $customSlave.age < 100 && $retirementAge >= 90>>90+ years old.
		<<elseif $customSlave.age < 110 && $retirementAge >= 110>>100-109 years old.
		<<elseif $customSlave.age < 110 && $retirementAge >= 100>>100+ years old.
		<<elseif $customSlave.age < 120 && $retirementAge >= 120>>110-119 years old.
		<<elseif $customSlave.age < 120 && $retirementAge >= 110>>110+ years old.
		<<elseif $customSlave.age < 130 && $retirementAge >= 130>>120-129 years old.
		<<elseif $customSlave.age < 130 && $retirementAge >= 120>>120+ years old.
		<<else>>130+ years old.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveHealth>>
%/
<<widget "CustomSlaveHealth">>
	<<replace #health>>
		<<if $customSlave.health == 0>>Healthy.
		<<else>>Extremely healthy.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveMuscles>>
%/
<<widget "CustomSlaveMuscles">>
	<<replace #muscles>>
		<<if $customSlave.muscles > 95>>
			Ripped.
		<<elseif $customSlave.muscles > 50>>
			Muscular.
		<<elseif $customSlave.muscles > 30>>
			Well built.
		<<elseif $customSlave.muscles > 5>>
			Toned.
		<<elseif $customSlave.muscles > -6>>
			Soft.
		<<elseif $customSlave.muscles > -31>>
			Quite weak.
		<<elseif $customSlave.muscles > -51>>
			Rather weak.
		<<elseif $customSlave.muscles > -96>>
			Very weak.
		<<else>>
			Frail.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveLips>>
%/
<<widget "CustomSlaveLips">>
	<<replace #lips>>
		<<if $customSlave.lips <= 10>>Thin lips.
		<<elseif $customSlave.lips <= 20>>Normal lips.
		<<elseif $customSlave.lips <= 40>>Plush lips.
		<<elseif $customSlave.lips <= 70>>Big lips.
		<<elseif $customSlave.lips <= 95>>Huge lips.
		<<else>>Facepussy.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveVoice>>
%/
<<widget "CustomSlaveVoice">>
	<<replace #voice>>
		<<if $customSlave.voice == 3>>High, girly voice.
		<<elseif $customSlave.voice == 2>>Feminine voice.
		<<elseif $customSlave.voice == 1>>Deep voice.
		<<elseif $customSlave.voice == 0>>Mute.
		<<else>>Voice is unimportant.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveHeight>>
%/
<<widget "CustomSlaveHeight">>
	<<replace #height>>
		<<if $customSlave.heightMod == "greatly below average">>Petite.
		<<elseif $customSlave.heightMod == "below average">>Short.
		<<elseif $customSlave.heightMod == "normal">>Average height.
		<<elseif $customSlave.heightMod == "above average">>Tall.
		<<else>>Very tall.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveWeight>>
%/
<<widget "CustomSlaveWeight">>
	<<replace #weight>>
		<<if $customSlave.weight == -50>>Very thin.
		<<elseif $customSlave.weight == -15>>Thin.
		<<elseif $customSlave.weight == 0>>Average weight.
		<<elseif $customSlave.weight == 15>>Chubby.
		<<elseif $customSlave.weight == 50>>Plump.
		<<elseif $customSlave.weight == 100>>Fat.
		<<elseif $customSlave.weight == 150>>Very Fat.
		<<else>>Immobile.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveFace>>
%/
<<widget "CustomSlaveFace">>
	<<replace #face>>
		<<if $customSlave.face < -40>>Very unattractive face.
		<<elseif $customSlave.face < -10>>Unattractive face.
		<<elseif $customSlave.face <= 10>>Average face.
		<<elseif $customSlave.face <= 40>>Attractive face.
		<<elseif $customSlave.face > 40>>Very attractive face.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveRace>>
%/
<<widget "CustomSlaveRace">>
	<<replace #ethnicity>>
		<<textbox "$customSlave.race" $customSlave.race "Custom Slave">>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveSkin>>
%/
<<widget "CustomSlaveSkin">>
	<<replace #skin>>
		<<textbox "$customSlave.skin" $customSlave.skin "Custom Slave">>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveBoobs>>
%/
<<widget "CustomSlaveBoobs">>
	<<replace #boobs>>
		<<if $customSlave.boobs == 200>>Flat chest.
		<<elseif $customSlave.boobs <= 500>>Healthy breasts.
		<<elseif $customSlave.boobs <= 800>>Big breasts.
		<<elseif $customSlave.boobs <= 1400>>Huge breasts.
		<<elseif $customSlave.boobs <= 2100>>Giant breasts.
		<<else>>Massive breasts.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveButt>>
%/
<<widget "CustomSlaveButt">>
	<<replace #butt>>
		<<if $customSlave.butt == 1>>Flat buttocks.
		<<elseif $customSlave.butt < 4>>Healthy buttocks.
		<<elseif $customSlave.butt < 6>>Huge buttocks.
		<<else>>Massive buttocks.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveSex>>
%/
<<widget "CustomSlaveSex">>
	<<replace #sex>>
		<<if $customSlave.sex == 1>>Female (cock & balls options not applied).
		<<elseif $customSlave.sex == 2>>Male (pussy options not applied).
		<<else>>Futanari (clit options not applied).
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveVirgin>>
%/
<<widget "CustomSlaveVirgin">>
	<<replace #virgin>>
		<<if $customSlave.virgin == 0>>Vaginal virgin.
		<<else>>Virginity not important.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveVagina>>
%/
<<widget "CustomSlaveVagina">>
	<<replace #vagina>>
		<<if $customSlave.vagina == -1>>No vagina.
		<<elseif $customSlave.vagina == 0>>Vaginal virgin.
		<<else>>Normal vagina.
		<</if>>
		<<link "No vagina">>
			<<set $customSlave.vagina = -1, $customSlave.preg = 0, $customSlave.ovaries = 0>>
			<<CustomSlaveVagina>>
		<</link>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveDick>>
%/
<<widget "CustomSlaveDick">>
	<<replace #dick>>
		<<if $customSlave.dick == 0>>No penis.
		<<elseif $customSlave.dick == 2>>Small penis.
		<<else>>Large penis.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveBalls>>
%/
<<widget "CustomSlaveBalls">>
	<<replace #balls>>
		<<if $customSlave.balls == 0>>No testicles.
		<<elseif $customSlave.balls == 2>>Small testicles.
		<<elseif $customSlave.balls == 4>>Large testicles.
		<<else>>Huge Balls.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveClit>>
%/
<<widget "CustomSlaveClit">>
	<<replace #clit>>
		<<if $customSlave.clit == 0>>Normal clitoris.
		<<elseif $customSlave.clit == 1>>Big clitoris.
		<<elseif $customSlave.clit == 3>>Enormous clitoris.
		<<else>>Pseudophallus.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveLabia>>
%/
<<widget "CustomSlaveLabia">>
	<<replace #labia>>
		<<if $customSlave.labia == 0>>Normal labia.
		<<elseif $customSlave.labia == 1>>big labia.
		<<elseif $customSlave.labia == 2>>Huge labia.
		<<else>>Enormous labia.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveClitBalls>>
%/
<<widget "CustomSlaveClitBalls">>
	<<replace #clitballs>>
	<<if $customSlave.dick > 0>>
	<<if $customSlave.balls == 0>>No testicles.<<elseif $customSlave.balls == 2>>Small testicles.<<else>>Large testicles.<</if>>
	<<link "No testicles">>
		<<set $customSlave.balls = 0,$customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Small testicles">>
		<<set $customSlave.balls = 2,$customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Large testicles">>
		<<set $customSlave.balls = 4,$customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	<<else>>
	<<if $customSlave.clit == 0>>Normal clitoris.<<elseif $customSlave.clit == 0>>Big clitoris.<<else>>Enormous clitoris.<</if>>
	<<link "Normal clitoris">>
		<<set $customSlave.clit = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Big clitoris">>
		<<set $customSlave.clit = 1>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Enormous clitoris">>
		<<set $customSlave.clit = 2>>
		<<CustomSlaveClitBalls>>
	<</link>>

	<<if $customSlave.labia == 0>>Minimal labia.<<elseif $customSlave.labia == 1>>Normal labia.<<elseif $customSlave.labia == 2>>Huge labia.<<else>>Enormous labia.<</if>>
	<<link "Minimal labia">>
		<<set $customSlave.labia = 0>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Normal labia">>
		<<set $customSlave.labia = 1>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Huge labia">>
		<<set $customSlave.labia = 2>>
		<<CustomSlaveClitBalls>>
	<</link>>
	|
	<<link "Enormous labia">>
		<<set $customSlave.labia = 3>>
		<<CustomSlaveClitBalls>>
	<</link>>
	<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveLube>>
%/
<<widget "CustomSlaveLube">>
	<<replace #lube>>
		<<if $customSlave.vaginaLube == 0>>Dry vagina.
		<<elseif $customSlave.vaginaLube == 1>>Wet vagina.
		<<else>>Sopping wet vagina.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveAnalVirginity>>
%/
<<widget "CustomSlaveAnalVirginity">>
	<<replace #anus>>
		<<if $customSlave.analVirgin == 0>>Anal virgin.
		<<else>>Anal virginity is not important.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveAnus>>
%/
<<widget "CustomSlaveAnus">>
	<<replace #anus>>
		<<if $customSlave.anus == 0>>Anal virgin.
		<<else>>Normal anus.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveSkills>>
%/
<<widget "CustomSlaveSkills">>
	<<replace #skills>>
		<<if $customSlave.skills <= 10>>Sexually unskilled.
		<<elseif $customSlave.skills <= 35>>Basic sex skills.
		<<else>>Sexually skilled.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveWhoreSkills>>
%/
<<widget "CustomSlaveWhoreSkills">>
	<<replace #whoreskills>>
		<<if $customSlave.skill.whore <= 10>>Unskilled at prostitution and entertainment.
		<<elseif $customSlave.skill.whore <= 35>>Basic prostitution and entertainment skills.
		<<else>>Skilled at prostitution and entertainment.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveCombatSkills>>
%/
<<widget "CustomSlaveCombatSkills">>
	<<replace #combatskills>>
		<<if $customSlave.skill.combat == 0>>Unskilled at combat.
		<<else>>Skilled at combat.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveIntelligence>>
%/
<<widget "CustomSlaveIntelligence">>
	<<replace #intelligence>>
		<<if $customSlave.intelligence >= 3>>Brilliant.
		<<elseif $customSlave.intelligence == 2>>Very smart.
		<<elseif $customSlave.intelligence == 1>>Smart.
		<<elseif $customSlave.intelligence == 0>>Average intelligence.
		<<elseif $customSlave.intelligence == -1>>Stupid.
		<<elseif $customSlave.intelligence == -2>>Very stupid.
		<<else>>Moronic.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveEducation>>
%/
<<widget "CustomSlaveEducation">>
	<<replace #education>>
		<<if $customSlave.intelligenceImplant >= 30>>Well educated.
		<<elseif $customSlave.intelligenceImplant >= 15>>Educated.
		<<else>>Uneducated.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveNationality>>
%/
<<widget "CustomSlaveNationality">>
	<<replace #nationality>>
		Nationality: $customSlave.nationality.
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveEyes>>
%/
<<widget "CustomSlaveEyes">>
	<<replace #eyes>>
		<<if getBestVision($customSlave) === 2>>Normal vision.
		<<elseif getBestVision($customSlave) === 1>>Nearsighted.
		<<else>>Blind.
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveEars>>
%/
<<widget "CustomSlaveEars">>
	<<replace #hears>>
		<<if $seeExtreme == 1>>
			<<if $customSlave.hears == -2>>Deaf.
			<<elseif $customSlave.hears == -1>>Hard of hearing.
			<<else>>Normal.
			<</if>>
		<<else>>
			<<if $customSlave.hears == -1>>Hard of hearing.
			<<else>>Normal.
			<</if>>
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveSmell>>
%/
<<widget "CustomSlaveSmell">>
	<<replace #smelling>>
		<<if $seeExtreme == 1>>
			<<if $customSlave.smells == -1>>None.
			<<else>>Normal.
			<</if>>
		<</if>>
	<</replace>>
<</widget>>

/%
 Call as <<CustomSlaveTaste>>
%/
<<widget "CustomSlaveTaste">>
	<<replace #tasting>>
		<<if $seeExtreme == 1>>
			<<if $customSlave.tastes == -1>>None.
			<<else>>Normal.
			<</if>>
		<</if>>
	<</replace>>
<</widget>>

/%
	Call as <<MarketName 'market' ['arcology']>>
	If $args[0] is undefined, will generate a kidnapper's market slave.
	If $args[0] is "corporate" and $args[1] is undefined, will use neighboring arcology 1.
%/
<<widget MarketName>>
<<if $args[0]>>
	<<set _market = $args[0]>>
<<else>>
	<<set _market = "kidnappers">>
<</if>>

<<switch _market>>
<<case "corporate">>
	your corporation
<<case "neighbor">>
	<<if $args[1]>>
		<<print $arcologies[$args[1]].name>>
	<<else>>
		<<print $arcologies[1].name>>
	<</if>>
<<case "kidnappers">>
	the Kidnappers' Market
<<case "indentures">>
	the Indentures Market
<<case "hunters">>
	the Runaway Hunters' Market
<<case "raiders">>
	the Raiders' Market
<<case "underage raiders">>
	the Raiders' Black Market
<<case "heap">>
	the Flesh Heap as alive as when you purchased them.
<<case "wetware">>
	the Wetware CPU market
<<case "trainers">>
	the Trainers' Market
<<case "TSS">>
	The Slavegirl School
<<case "GRI">>
	Growth Research Institute
<<case "SCP">>
	St. Claver Preparatory
<<case "LDE">>
	L'école des Enculées
<<case "TGA">>
	The Gymnasium-Academy
<<case "TCR">>
	The Cattle Ranch
<<case "TFS">>
	The Futanari Sisters
<<case HA>>
	The Hippolyta Academy
<<case NUL>>
	Nueva Universidad de Libertad
<<case "low tier criminals" "gangs and smugglers" "white collar" "military prison">>
	the prisoner sale
<<default>>
	Someone messed up. _market is not known.

<</switch>>
<</widget>>

/%
	Call as <<MarketNamePeriod 'market' ['arcology']>>
	If $args[0] is undefined, will generate a kidnapper's market slave.
	If $args[0] is "corporate" and $args[1] is undefined, will use neighboring arcology 1.
%/
<<widget MarketNamePeriod>>
<<if $args[0]>>
	<<set _market = $args[0]>>
<<else>>
	<<set _market = "kidnappers">>
<</if>>

<<switch _market>>
<<case "corporate">>
	your corporation.
<<case "neighbor">>
	<<if $args[1]>>
		<<print $arcologies[$args[1]].name>>.
	<<else>>
		<<print $arcologies[1].name>>.
	<</if>>
<<case "kidnappers">>
	the Kidnappers' Market.
<<case "indentures">>
	the Indentures Market.
<<case "hunters">>
	the Runaway Hunters' Market.
<<case "raiders">>
	the Raiders' Market.
<<case "underage raiders">>
	the Raiders' Black Market.
<<case "heap">>
	the Flesh Heap, alive and not dead.
<<case "wetware">>
	the Wetware CPU market.
<<case "trainers">>
	the Trainers' Market.
<<case "TSS">>
	The Slavegirl School.
<<case "GRI">>
	Growth Research Institute.
<<case "SCP">>
	St. Claver Preparatory.
<<case "LDE">>
	L'école des Enculées.
<<case "TGA">>
	The Gymnasium-Academy.
<<case "TCR">>
	The Cattle Ranch.
<<case "TFS">>
	The Futanari Sisters.
<<case HA>>
	The Hippolyta Academy.
<<case NUL>>
	Nueva Universidad de Libertad.
<<case "low tier criminals" "gangs and smugglers" "white collar" "military prison">>
	the prisoner sale.
<<default>>
	Someone messed up. _market is not known.

<</switch>>
<</widget>>

/%
 Call as <<JFCSlave>>
%/
<<widget "JFCSlave">>
	<<set $activeSlaveOneTimeMinAge = 20>>
	<<set $activeSlaveOneTimeMaxAge = 36>>
	<<set $one_time_age_overrides_pedo_mode = 1>>
	<<set $oneTimeDisableDisability = 1>>
	<<set $activeSlave = GenerateNewSlave("XX")>>
	<<set $activeSlave.weight = random(-30,20), $activeSlave.waist = random(-30,10), $activeSlave.face = random(40,60)>>
	<<if $activeSlave.faceShape == "masculine">>
		<<set $activeSlave.faceShape = "sensual">>
	<</if>>
	<<if $activeSlave.boobShape == "saggy" || $activeSlave.boobShape == "downward-facing">>
		<<set $activeSlave.boobShape = "perky">>
	<</if>>
	<<run eyeSurgery($activeSlave, "both", "normal")>>
	<<set $activeSlave.hears = 0, $activeSlave.voice = 2>>
	<<set $activeSlave.intelligenceImplant = 30, $activeSlave.intelligence = random(20,100)>>
	<<set $activeSlave.trust = 80, $activeSlave.devotion = 80>>
	<<run setHealth($activeSlave, jsRandom(80,95), 0, 0, 0, 0)>>
	<<set $activeSlave.origin = "The Job Fulfillment Center offered $his contract to fill your request for a ">>
	<<set $activeSlave.origin += $Role>>
	<<set $activeSlave.origin += ".">>
	<<switch $Role>>
	/* Opens security */
		<<case "Lieutenant Colonel">>
			<<set $activeSlave.devotion = random(96,100), $activeSlave.trust = random(96, 100), $activeSlave.energy = random(96,100), $activeSlave.intelligence = 70, $activeSlave.skill.combat = 1>>
			<<set $activeSlave.career = either("a bodyguard", "a bouncer", "a bounty hunter", "a gang member", "a law enforcement officer", "a mercenary", "a prison guard", "a private detective", "a revolutionary", "a security guard", "a soldier", "a street thug", "a transporter", "an assassin", "an enforcer", "in a militia")>>
		<<case "Bodyguard">>
			<<set $activeSlave.devotion = 90, $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.weight = random(-10,10), $activeSlave.teeth = either("normal", "pointy"), $activeSlave.skill.combat = 1>>
			<<if jsRandom(0, 2) === 0>>
				<<run configureLimbs($activeSlave, "all", 5)>>
			<</if>>
			<<set $activeSlave.career = either("a bodyguard", "a kunoichi", "a law enforcement officer", "a military brat", "a revolutionary", "a soldier", "a transporter", "an assassin", "in a militia")>>
		<<case "Wardeness">>
			<<set $activeSlave.energy = random(80,100), $activeSlave.sexualFlaw = either("malicious", "none", "none", "none", "none"), $activeSlave.fetish = "sadist", $activeSlave.fetishStrength = 100, $activeSlave.muscles = random(50,80), $activeSlave.skill.combat = 1>>
			<<set $activeSlave.career = either("a bouncer", "a bounty hunter", "a gang member", "a mercenary", "a prison guard", "a private detective", "a security guard", "a street thug", "an enforcer")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,6), $activeSlave.balls = random(3,6), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2,2,3)>>
			<</if>>
	/* Closes Security */
	/* Opens management */
		<<case "Headgirl">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 100, $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.energy = random(70,90), $activeSlave.intelligence = random(60,100), $activeSlave.skill.entertainment = 100, $activeSlave.skill.whoring = 100, $activeSlave.skill.anal = 100, $activeSlave.skill.oral = 100, $activeSlave.skill.vaginal = 100, $activeSlave.career = either("a lawyer", "a military officer", "a politician")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(3,6), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,2)>>
			<</if>>
			<<set $activeSlave.vagina = random(3,4)>>
			<<if $AgePenalty == 1>>
				<<set $activeSlave.actualAge = random(36,$retirementAge-5)>>
			<<else>>
				<<set $activeSlave.actualAge = random(20,$retirementAge-5)>>
			<</if>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Teacher">>
			<<set $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.energy = random(70,90), $activeSlave.intelligence = 100, $activeSlave.skill.entertainment = 100, $activeSlave.skill.whoring = 100, $activeSlave.skill.anal = 100, $activeSlave.skill.oral = 100, $activeSlave.skill.vaginal = 100, $activeSlave.face = random(41,90), $activeSlave.career = either("a librarian", "a principal", "a private instructor", "a professor", "a scholar", "a scientist", "a teacher", "a teaching assistant")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(3,6), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2,2,3)>>
			<</if>>
			<<set $activeSlave.actualAge = random(36,$retirementAge-3)>>
			<<set $activeSlave.vagina = random(3,4)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Nurse">>
			<<set $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.muscles = random(6,50), $activeSlave.face = random(41,90), $activeSlave.sexualQuirk = "caring", $activeSlave.career = either("a doctor", "a medic", "a medical student", "a nurse", "a paramedic"), $activeSlave.intelligence = random(40,90)>>
		<<case "Motherly Attendant">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 90, $activeSlave.fetish = "submissive", $activeSlave.fetishStrength = 100, $activeSlave.face = random(60,90)>>
			<<set $activeSlave.career = either("a counselor", "a dispatch officer", "a lifeguard", "a masseuse", "a psychologist", "a therapist"), $activeSlave.counter.birthsTotal = random(1,3), $activeSlave.pregKnown = 1, $activeSlave.preg = random(20,35), $activeSlave.pregWeek = $activeSlave.preg, $activeSlave.pregType = 1>>
			<<run SetBellySize($activeSlave)>>
			<<set $activeSlave.actualAge = random(36,$retirementAge-3)>>
			<<set $activeSlave.vagina = random(3,4)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Attendant">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 90, $activeSlave.fetish = "submissive", $activeSlave.fetishStrength = 100, $activeSlave.preg = 0, $activeSlave.face = random(60,90), $activeSlave.career = either("a counselor", "a masseuse", "a therapist")>>
			<<run eyeSurgery($activeSlave, "both", either(0, 2, 2) === 2 ? "normal" : "blind")>>
			<<set $activeSlave.actualAge = random(26,$retirementAge-3)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Matron">>
			<<set $activeSlave.devotion = 90, $activeSlave.trust = 90, $activeSlave.sexualQuirk = "caring", $activeSlave.counter.birthsTotal = random(2,4), $activeSlave.vagina = 3, $activeSlave.face = random(60,90), $activeSlave.career = either( "a nanny", "a practitioner")>>
			<<run eyeSurgery($activeSlave, "both", "normal")>>
			<<set $activeSlave.actualAge = random(24,$retirementAge-3)>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Stewardess">>
			<<set $activeSlave.energy = random(70,90), $activeSlave.fetish = "dom", $activeSlave.fetishStrength = 100, $activeSlave.career = either("a barista", "a bartender", "a caregiver", "a charity worker", "a professional bartender", "a secretary", "a wedding planner", "an air hostess", "an estate agent", "an investor", "an office worker")>>
			<<if $AgePenalty == 1>>
				<<set $activeSlave.actualAge = random(36,$retirementAge-5)>>
			<<else>>
				<<set $activeSlave.actualAge = random(20,$retirementAge-5)>>
			<</if>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Milkmaid">>
			<<set $activeSlave.muscles = random(31,60), $activeSlave.skill.oral = random(31,60), $activeSlave.sexualQuirk = "caring", $activeSlave.behavioralQuirk = "funny", $activeSlave.career = either("a cowgirl", "a dairy worker", "a milkmaid", "a farmer's daughter", "a shepherd", "a veterinarian"), $activeSlave.intelligence = random(20,70)>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(4,9), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2)>>
			<</if>>
		<<case "Farmer">>
			<<set $activeSlave.devotion = 80, $activeSlave.trust = 80, $activeSlave.muscles = random(41,70), $activeSlave.sexualQuirk = "caring", $activeSlave.career = either("a farmer", "a farmer's daughter", "a rancher", "a farmhand", "a zookeeper"), $activeSlave.intelligenceImplant = 30, $activeSlave.intelligence = random(20,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.weight = random(0,30)>>
			<<run setHealth($activeSlave, jsRandom(80, 95), 0, 0, 0, 0)>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(4,9), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2)>>
			<</if>>
			<<if $AgePenalty == 1>>
				<<set $activeSlave.actualAge = random(36,$retirementAge-5)>>
			<<else>>
				<<set $activeSlave.actualAge = random(20,$retirementAge-5)>>
			<</if>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
	/* Closes management */
	/* Opens entertain */
		<<case "DJ">>
			<<set $activeSlave.skill.entertainment = 100, $activeSlave.muscles = random(6,30), $activeSlave.face = random(80,100), $activeSlave.career = either("a classical dancer", "a classical musician", "a dancer", "a house DJ", "a musician", "an aspiring pop star")>>
		<<case "Madam">>
			<<set $activeSlave.skill.whoring = 100, $activeSlave.career = either("a business owner", "a manager", "a pimp", "a procuress", "an innkeeper")>>
			<<if $seeDicks > 0>>
				<<set $activeSlave.dick = random(3,5), $activeSlave.balls = random(3,5), $activeSlave.scrotum = $activeSlave.balls, $activeSlave.prostate = either(1,1,1,2)>>
			<</if>>
			<<if $AgePenalty == 1>>
				<<set $activeSlave.actualAge = random(36,$retirementAge-5)>>
			<<else>>
				<<set $activeSlave.actualAge = random(20,$retirementAge-5)>>
			<</if>>
			<<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
		<<case "Concubine">>
			<<set $activeSlave.prestige = 3, $activeSlave.energy = random(80,100), $activeSlave.skill.entertainment = 100, $activeSlave.skill.whoring = 100, $activeSlave.skill.anal = 100, $activeSlave.skill.oral = 100, $activeSlave.skill.vaginal = 100, $activeSlave.face = 100, $activeSlave.devotion = random(90,95), $activeSlave.trust = random(90,100)>>
		/* Closes Entertain */
		<</switch>>
<</widget>>

/%
 % Shows controls for buying and advancing the queue for buying slaves from a school
 % Arguments: none
 % Call as <<buyingFromMarketControls>>
 %/
<<widget "buyingFromMarketControls">>

[["Decline to purchase " + $him + " and check out another slave"|passage()][$slavesSeen += 1]]
<<if $cash >= _slaveCost>>

[["Buy " + $him + " and check out other slaves to order"|passage()][cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave),$newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
	<<if $newSlaves.length == 0>>

[["Buy " + $his + " slave contract"|New Slave Intro][cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave),$nextButton = "Continue",$nextLink = "AS Dump",$returnTo = "Main"]]
	<<else>>

[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave), $newSlaves.push($activeSlave)]]
	<</if>>
<<else>>

//You lack the necessary funds to buy this slave.//
<</if>>
<<if $newSlaves.length > 0>>

[[Finish your order of slaves|Bulk Slave Intro]]
<</if>>

<<if $slaveMarket != "indentures" && $slaveMarket != "neighbor" && $slaveMarket != "heap" && $slaveMarket != "wetware">>
	<<set $applyLaw = 1>>
<</if>>
<<set $saleDescription = 1>><<include "Long Slave Description">>
<</widget>>

/%
 % Shows controls for buying and advancing the queue for buying slaves from a school
 % Arguments:
 % 0: school
 % 1: name for a single slave ("slave", "cow", etc.)
 % 2: name for a bunch of them ("slaves", "cattle", etc.)
 % Call as <<buyingFromSchoolControls $TCR "cow" "cattle">>
 %/
<<widget "buyingFromSchoolControls">>

[["Decline to purchase " + $him + " and check out another " + $args[1]|passage()][$slavesSeen += 1]]
<<if $cash >= _slaveCost>>
	<<set _schoolToBuyFrom = $args[0]>>

[["Buy " + $him + " and check out other " + $args[2] + " to order"|passage()][cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave), _schoolToBuyFrom.schoolSale = 0, _schoolToBuyFrom.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
	<<if $newSlaves.length == 0>>

[["Buy " + $his + " slave contract"|New Slave Intro][cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave), _schoolToBuyFrom.schoolSale = 0, _schoolToBuyFrom.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
	<<else>>

[["Buy " + $him + " and finish your order of " + $args[2]|Bulk Slave Intro][cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave), _schoolToBuyFrom.schoolSale = 0, _schoolToBuyFrom.studentsBought += 1, $newSlaves.push($activeSlave)]]
	<</if>>
<<else>>

//You lack the necessary funds to buy this $args[1].//
<</if>>
<<if $newSlaves.length > 0>>

[["Finish your order of " + $args[2]|"Bulk Slave Intro"]]
<</if>>

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

license: mit


code:
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# Start.tw
src/config/start.tw

path: .gitignore


code:
# Ignore everything in this directory
*
# Except this file
!.gitignore


code:
#!/bin/bash

# Will add all *.tw files to StoryIncludes.
rm src/config/start.tw
cp src/config/start.tw.proto start.tw.tmp
find src -name '*.tw' -print >>start.tw.tmp
mv start.tw.tmp src/config/start.tw

HASH=`git log -n1 |grep commit | sed 's/commit //'`

./devTools/tweeGo/tweego -o bin/FC_pregmod.html src/config/start.tw

rm src/config/start.tw

path: compile


code:
#!/bin/bash

# Will add all *.tw files to StoryIncludes.
rm src/config/start.tw
cp src/config/start.tw.proto start.tw.tmp
find src -name '*.tw' -print >>start.tw.tmp
mv start.tw.tmp src/config/start.tw

HASH=`git log -n1 |grep -m1 commit | sed 's/commit //'`

./devTools/tweeGo/tweego -o bin/FC_pregmod_$HASH.html src/config/start.tw

rm src/config/start.tw

echo "FC_pregmod_$HASH.html" compilation finished.

path: compile-git


code:
@echo off
:: Free Cities Basic Compiler - Windows x86_64

:: Will add all *.tw files to StoryIncludes.
del src\config\start.tw
copy src\config\start.tw.proto start.tw.tmp >nul
>>start.tw.tmp (for /r "src" %%F in (*.tw) do echo %%F)
move start.tw.tmp src\config\start.tw >nul

CALL "%~dp0devTools\tweeGo\tweego.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw"

del src\config\start.tw
ECHO Done


code:
@echo off
:: Free Cities Basic Compiler - Windows x86_64
:: Will wait for keypress before terminating.

:: Will add all *.tw files to StoryIncludes.
del src\config\start.tw
copy src\config\start.tw.proto start.tw.tmp >nul
>>start.tw.tmp (for /r "src" %%F in (*.tw) do echo %%F)
move start.tw.tmp src\config\start.tw >nul

CALL "%~dp0devTools\tweeGo\tweego.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw"

del src\config\start.tw

ECHO Done
PAUSE