code:
:: SA relationships [nobr]

<<if $slaves[$i].fuckdoll == 0>>

<<if $slaves[$i].relationship == 0>>

<<if ($slaves[$i].devotion+$slaves[$i].trust > 175) && (random(1,3) == 1)>>
	$slaves[$i].slaveName is quite devoted to you, and trusts both you and her place as a slave. Since she does not have a strong relationship with another slave,
	<<if ($slaves[$i].sexualQuirk is "romantic")>>
	and persistently interprets sex in the most romantic possible terms, she has decided that she wants to be yours in her heart as well as her
	<<if $slaves[$i].vagina > -1>>
		pussy.
	<<else>>
		butthole.
	<</if>>
	@@color:lightgreen;She's become emotionally bonded to you!@@
	<<set $slaves[$i].relationship to -2>>
	<<elseif ($slaves[$i].assignment is "be your concubine")>>
	and is your concubine, she almost inevitably comes to view you as much as a lover as an owner.
	@@color:lightgreen;She's become emotionally bonded to you!@@
	<<set $slaves[$i].relationship to -2>>
	<<elseif ($slaves[$i].assignment is "serve in the master suite") && ($masterSuiteUpgradeLuxury is 2)>>
	and does nothing but eat, sleep, and make love to your other fucktoys, she slowly loses sight of any distinction between emotional attachment and sexual congress.
	@@color:lightgreen;She's become an emotional slut!@@
	<<set $slaves[$i].relationship to -1>>
	<<elseif ($slaves[$i].assignment is "please you") || ($slaves[$i].assignment is "serve in the master suite")>>
	and spends her days worshipping your <<if $PC.dick == 1>>cock<<if $PC.vagina == 1>> and <</if>><</if>><<if $PC.vagina == 1>>cunt<</if>>, she begins to focus more and more of her happiness on how happy you are.
	@@color:lightgreen;She's become emotionally bonded to you!@@
	<<set $slaves[$i].relationship to -2>>
	<<elseif ($slaves[$i].assignment is "serve the public") || ($slaves[$i].assignment is "serve in the club")>>
	and her life is an endless stream of lovers, she unconsciously loses any sense of emotional attachment outside the intimacy of sex.
	@@color:lightgreen;She's become an emotional slut!@@
	<<set $slaves[$i].relationship to -1>>
	<<elseif ($slaves[$i].energy > 95) && (($slaves[$i].analCount + $slaves[$i].vaginalCount + $slaves[$i].oralCount + $slaves[$i].mammaryCount + $slaves[$i].penetrativeCount) > ($week-$activeSlave.weekAcquired)*random(20,30))>>
	is a total sex addict, and has a spectacularly promiscuous sexual history, she begins to think of sex as her only meaningful emotional connection with people. @@color:lightgreen;She's become an emotional slut!@@
	<<set $slaves[$i].relationship to -1>>
	<<else>>
	and loves you, she begins to think of you as a woman might think of her lover - or <<if $PC.title != 0>>husband<<else>>wife<</if>>. She knows she cannot hope for more of a relationship with you than she has, but she finds emotional support in serving you nonetheless. @@color:lightgreen;She's become emotionally bonded to you!@@
	<<set $slaves[$i].relationship to -2>>
	<</if>>
<<elseif $slaves[$i].fetish != "mindbroken">>
<<if $slaves[$i].career is "a Futanari Sister">>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if ($slaves[$j].ID != $slaves[$i].ID)>>
		<<if ($slaves[$j].relationship == 0)>>
		<<if ($slaves[$j].career is "a Futanari Sister")>>
			<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
			<<if $slaves[$i].relationshipRules is "permissive">>
			<<if $slaves[$j].relationshipRules is "permissive">>
			$slaves[$i].slaveName greets $slaves[$j].slaveName with joy. It's not clear whether they ever knew each other during their lives as Futanari Sisters, but it seems that they believe themselves to be in a relationship by simple virtue of having been Sisters. In any case, $slaves[$i].slaveName and $slaves[$j].slaveName @@color:lightgreen;become inseparable lovers@@ instantly, as though there's no possibility they would do anything else. They're even surprised when other slaves ask them about it; it's as though they're unaware that other possibilities even exist.
			<<set $slaves[$j].relationship to 4>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to 4>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
			<<break>>
			<</if>>
			<</if>>
			<</if>>
		<</if>>
		<</if>>
		<</if>>
	<</for>>
<<elseif $rivalryDuration > 20 and ($rivalryFS != "Racial Supremacism" or $rivalryFS != "Paternalism") and $slaves[$i].origin is "You were acquainted with her before you were an arcology owner; your rival tried to use her to manipulate you, but you rescued her.">>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].prestigeDesc is "You bankrupted and enslaved her in revenge for her part in the attack on your arcology by the Daughters of Liberty.">>
			$slaves[$i].slaveName greets $slaves[$j].slaveName with joy, happy to see her former owner again. Without any regard to you, they continue their prior relationship.
			<<set $slaves[$j].relationship to 4>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to 4>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
			<<break>>
		<</if>>
	<</for>>
<<elseif $slaves[$i].devotion > -90>>
	<<if $slaves[$i].behavioralFlaw is "none">>
		<<set $seed to random(1,100)>>
	<<else>>
		<<set $seed to random(1,80)>>
	<</if>>
	<<if $seed > 75>>
	<<set $resentment to 0>>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID != $slaves[$i].ID>>
		<<if $slaves[$j].assignment != "stay confined">>
		<<if ($slaves[$i].assignment is "work in the brothel") && ($slaves[$j].ID is $Madam.ID)>>
		<<if ($Madam.relationship == 0)>>
			<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
			<<if random(1,100) > 0>>
				<<if $slaves[$i].relationshipRules != "restrictive">>
				<<if $Madam.relationshipRules != "restrictive">>
				$slaves[$i].slaveName manages to ingratiate herself with the Madam, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
				<<set $slaves[$j].relationship to 1>>
				<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
				<<set $slaves[$i].relationship to 1>>
				<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
				<<else>>
				<<if $slaves[$i].devotion < -20>>
				$slaves[$i].slaveName tries to strike up a friendship with the Madam, $slaves[$j].slaveName and is @@color:gold;punished@@ by $slaves[$j].slaveName for disrespect.
				<<set $slaves[$i].trust -= 4>>
					<</if>>
				<</if>>
				<</if>>
			<</if>>
			<</if>>
		<</if>>
		<<elseif ($slaves[$i].assignment is "serve in the club") && ($slaves[$j].ID is $DJ.ID)>>
		<<if ($DJ.relationship == 0)>>
		<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
		<<if random(1,100) > 0>>
		<<if $slaves[$i].relationshipRules != "restrictive">>
		<<if $DJ.relationshipRules != "restrictive">>
		$slaves[$i].slaveName manages to ingratiate herself with the DJ, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
		<<set $slaves[$j].relationship to 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 1>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
		<<if $slaves[$i].devotion < -20>>
		$slaves[$i].slaveName tries to strike up a friendship with the DJ, $slaves[$j].slaveName and is @@color:gold;punished@@ by $slaves[$j].slaveName for disrespect.
		<<set $slaves[$i].trust -= 4>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<<elseif ($slaves[$i].assignment is "work in the dairy") && ($slaves[$j].ID is $Milkmaid.ID)>>
		<<if ($Milkmaid.relationship == 0)>>
		<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
		<<if random(1,100) > 0>>
		<<if $slaves[$i].relationshipRules != "restrictive">>
		<<if $Milkmaid.relationshipRules != "restrictive">>
		$slaves[$i].slaveName manages to ingratiate herself with the Milkmaid, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
		<<set $slaves[$j].relationship to 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 1>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
		<<if $slaves[$i].devotion < -20>>
		$slaves[$i].slaveName tries to strike up a friendship with the Milkmaid, $slaves[$j].slaveName and is @@color:gold;punished@@ by $slaves[$j].slaveName for disrespect.
		<<set $slaves[$i].trust -= 4>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<<elseif ($slaves[$i].assignment is "learn in the schoolroom") && ($slaves[$j].ID is $Schoolteacher.ID)>>
		<<if ($Schoolteacher.relationship == 0)>>
		<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
		<<if random(1,100) > 0>>
		<<if $slaves[$i].relationshipRules != "restrictive">>
		<<if $Schoolteacher.relationshipRules != "restrictive">>
		$slaves[$i].slaveName manages to ingratiate herself with the Schoolteacher, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
		<<set $slaves[$j].relationship to 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 1>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
		<<if $slaves[$i].devotion < -20>>
		$slaves[$i].slaveName tries to strike up a friendship with the Schoolteacher, $slaves[$j].slaveName and is @@color:gold;punished@@ by $slaves[$j].slaveName for disrespect.
		<<set $slaves[$i].trust -= 4>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>><<elseif ($slaves[$i].assignment is "rest in the spa") && ($slaves[$j].ID is $Attendant.ID)>>
		<<if ($Attendant.relationship == 0)>>
		<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
		<<if random(1,100) > 0>>
		<<if $slaves[$i].relationshipRules != "restrictive">>
		<<if $Attendant.relationshipRules != "restrictive">>
		$slaves[$i].slaveName basks in the affection and care of the spa attendant, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
		<<set $slaves[$j].relationship to 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 1>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
		<<if $slaves[$i].devotion < -20>>
		$slaves[$i].slaveName tries to strike up a friendship with the spa attendant, $slaves[$j].slaveName. $slaves[$j].slaveName gently @@color:hotpink;counsels@@ her to obey the rules.
		<<set $slaves[$i].devotion += 1>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<<elseif ($slaves[$i].assignment is "work as a servant") && ($slaves[$j].ID is $Stewardess.ID)>>
		<<if ($Stewardess.relationship == 0)>>
		<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
		<<if random(1,100) > 0>>
		<<if $slaves[$i].relationshipRules != "restrictive">>
		<<if $Stewardess.relationshipRules != "restrictive">>
		$slaves[$i].slaveName manages to ingratiate herself with the Stewardess, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
		<<set $slaves[$j].relationship to 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 1>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
		<<if $slaves[$i].devotion < -20>>
		$slaves[$i].slaveName tries to strike up a friendship with the Stewardess, $slaves[$j].slaveName and is @@color:gold;punished@@ by $slaves[$j].slaveName for disrespect.
		<<set $slaves[$i].trust -= 4>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<<elseif ($slaves[$i].assignment is "be confined in the cellblock") && ($slaves[$j].ID is $Wardeness.ID)>>
		<<if ($Wardeness.relationship == 0)>>
		<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
		<<if random(1,100) > 0>>
		<<if $slaves[$i].relationshipRules != "restrictive">>
		<<if $Wardeness.relationshipRules != "restrictive">>
		$slaves[$i].slaveName manages to earn the respect of the Wardeness, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
		<<set $slaves[$j].relationship to 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 1>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
		<<if $slaves[$i].devotion < -20>>
		$slaves[$i].slaveName tries to strike up a friendship with the Wardeness, $slaves[$j].slaveName and is @@color:gold;beaten@@ by $slaves[$j].slaveName for her trouble.
		<<set $slaves[$i].trust -= 5>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<<elseif ($slaves[$i].assignment is "serve in the master suite") && ($slaves[$j].ID is $Concubine.ID)>>
		<<if ($Concubine.relationship == 0)>>
		<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
		<<if random(1,100) > 0>>
		<<if $slaves[$i].relationshipRules != "restrictive">>
		<<if $Concubine.relationshipRules != "restrictive">>
		$slaves[$i].slaveName becomes especially close to the Concubine, $slaves[$j].slaveName. The two slaves have @@color:lightgreen;struck up a friendship.@@
		<<set $slaves[$j].relationship to 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 1>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
		<<if $slaves[$i].devotion < -20>>
		$slaves[$i].slaveName tries to strike up a friendship with the Concubine, $slaves[$j].slaveName and is gently @@color:hotpink;counseled@@ by $slaves[$j].slaveName that such things are against the rules.
		<<set $slaves[$i].devotion += 1>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<<elseif $slaves[$j].assignment is $slaves[$i].assignment>>
		<<if ($slaves[$i].relationship == 0)>>
		<<if ($slaves[$j].relationship == 0)>>
			<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
			<<if random(1,100) > 50>>
				<<if $slaves[$i].relationshipRules != "restrictive">>
				<<if $slaves[$j].relationshipRules != "restrictive">>
				$slaves[$i].slaveName and $slaves[$j].slaveName see a lot of each other at work and @@color:lightgreen;strike up a friendship.@@
				<<set $slaves[$j].relationship to 1>>
				<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
				<<set $slaves[$i].relationship to 1>>
				<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
				<<else>>
				<<if $slaves[$i].relationshipRules is "restrictive">>
					<<if $resentment == 0>>
					$slaves[$i].slaveName tries to strike up a friendship with $slaves[$j].slaveName and is @@color:gold;punished@@ for breaking the rules against such things; she @@color:mediumorchid;resents@@ being castigated for simple sociability.
					<<set $slaves[$i].devotion -= 2>>
					<<set $slaves[$i].trust -= 2>>
					<<set $resentment to 1>>
					<</if>>
				<</if>>
				<</if>>
				<</if>>
			<</if>>
			<</if>>
		<</if>>
		<</if>>
		<<elseif $slaves[$j].fetish is $slaves[$i].fetish>>
		<<if ($slaves[$i].relationship == 0)>>
		<<if ($slaves[$j].relationship == 0)>>
			<<if ($slaves[$i].rivalryTarget != $slaves[$j].ID)>>
			<<if ($slaves[$i].fetish != "none")>>
				<<if ($slaves[$i].releaseRules != "restrictive")>>
				<<if random(1,100) > 0>>
					<<if $slaves[$i].relationshipRules is "permissive">>
					<<if $slaves[$j].relationshipRules is "permissive">>
					$slaves[$i].slaveName and $slaves[$j].slaveName share sexual inclinations, so it's only natural that they @@color:lightgreen;become friends with benefits.@@
					<<set $slaves[$j].relationship to 3>>
					<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
					<<set $slaves[$i].relationship to 3>>
					<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
					<<else>>
					$slaves[$i].slaveName tries to strike up a sexual relationship with $slaves[$j].slaveName and is @@color:gold;punished@@ for breaking the rules against such things; she @@color:mediumorchid;resents@@ being prevented from pursuing her.
					<<set $slaves[$i].devotion -= 2>>
					<<set $slaves[$i].trust -= 2>>
					<</if>>
					<</if>>
				<</if>>
				<</if>>
			<</if>>
			<</if>>
			<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
	<</for>>
	<</if>>
<</if>>
<</if>>

<<else>> /* RELATIONSHIP IS NOT 0; NOW ON TO ONGOING RELATIONSHIPS */

<<if $slaves[$i].rivalry != 0>>
<<if $slaves[$i].rivalryTarget != $slaves[$i].relationshipTarget>>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID is $slaves[$i].relationshipTarget>>
			<<set $slaves[$j].rivalry to 0>>
			<<set $slaves[$j].rivalryTarget to 0>>
			<<break>>
		<</if>>
	<</for>>
	<<set $slaves[$i].rivalry to 0>>
	<<set $slaves[$i].rivalryTarget to 0>>
<</if>>
<</if>>

<<if $slaves[$i].fetish is "mindbroken">>

Since she is mindbroken, she @@color:lightsalmon;can't really maintain@@ any meaningful relationship with
<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].relationshipTarget>>
		$slaves[$j].slaveName.
		<<set $slaves[$j].relationship to 0>>
		<<set $slaves[$j].relationshipTarget to 0>>
		<<break>>
	<</if>>
<</for>>
<<set $slaves[$i].relationship to 0>>
<<set $slaves[$i].relationshipTarget to 0>>

<<elseif $slaves[$i].relationship is -1>>

<<if ($slaves[$i].energy < 90)>>
	She is no longer such a complete nymphomaniac, and has @@color:lightsalmon;begun to rely less on sex for emotional support@@ than she once did.
	<<set $slaves[$i].relationship to 0>>
<<elseif ($slaves[$i].assignment is "serve in the master suite") && ($masterSuiteUpgradeLuxury is 2)>>
	Forming a part of the pile of copulating bodies in $masterSuiteName satisfies her voracious sexual appetite.
<<elseif ($slaves[$i].choosesOwnAssignment != 1)>>
	<<if ($slaves[$i].assignment != "whore")>>
	<<if ($slaves[$i].assignment != "work in the brothel")>>
	<<if ($slaves[$i].assignment != "serve the public")>>
	<<if ($slaves[$i].assignment != "serve in the club")>>
		<<if ($slaves[$i].devotion > 60)>>
			She is @@color:mediumorchid;emotionally unfulfilled@@ by her assignment, since it does not afford her the validation of massive promiscuity.
			<<set $slaves[$i].devotion -= 1>>
		<</if>>
		<<if ($slaves[$i].trust > 60)>>
			She is @@color:gold;impatient@@ with her limited field of potential sexual partners, and would prefer to be a publicly available nympho.
			<<set $slaves[$i].trust -= 1>>
		<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
<</if>>

<<elseif $slaves[$i].relationship is -2>>
	<<if $slaves[$i].mother == -1>>
		She
		<<if $slaves[$i].sexualQuirk is "perverted">>
			is such a pervert that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].devotion > 95>>
			is so inured to the perversities of slavery that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].behavioralQuirk is "sinful">>
			is torn between sinful delight and deep disgust that she's carrying on an incestuous relationship with her own mother.
		<<elseif $slaves[$i].devotion > 75>>
			is so devoted to you that she accepts carrying on an incestuous relationship with her own mother.
		<<elseif $slaves[$i].devotion > 50>>
			is somewhat @@color:mediumorchid;disturbed@@ that she's carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion -= 2>>
		<<elseif $slaves[$i].devotion > 20>>
			is @@color:mediumorchid;disturbed@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion -= 2>>
			<<set $slaves[$i].trust -= 2>>
		<<else>>
			is @@color:mediumorchid;revolted@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion -= 4>>
			<<set $slaves[$i].trust -= 4>>
		<</if>>
		<<if $slaves[$i].preg > 0>>
			<<if $slaves[$i].pregSource == -1>>
				<<if $slaves[$i].sexualQuirk is "perverted">>
					She's even @@color:hotpink;aroused@@ by the constant awareness that her mother is the parent of the daughter<<if $slaves[$i].pregType > 1>>s<</if>> she's carrying.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].behavioralQuirk is "sinful">>
					Her feelings about carrying her mother's child<<if $slaves[$i].pregType > 1>>ren<</if>> are @@color:hotpink;secretly less mixed,@@ though.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].devotion > 95>>
					She occasionally remembers that she's carrying her mother's child<<if $slaves[$i].pregType > 1>>ren<</if>>, but does her best to accept it by not thinking about it.
				<<elseif $slaves[$i].devotion > 50>>
					She's @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her mother's, though she tries her best not to think about it.
					<<set $slaves[$i].devotion -= 1>>
				<<elseif $slaves[$i].devotion > 20>>
					She's so @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her mother's that she often wakes up crying about it.
					<<set $slaves[$i].devotion -= 2>>
				<<else>>
					She's @@color:mediumorchid;passionately hateful@@ of you for making her carry an incestuous pregnancy.
					<<set $slaves[$i].devotion -= 4>>
				<</if>>
			<</if>>
		<</if>>
		<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
			Society @@color:green;strongly approves@@ of your incestuous relationship, which advances the Egyptian revivalist ideal of slave incest.
			<<set $repGain += 2*$FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel)>>
			<<set $arcologies[0].FSEgyptianRevivalist += 0.1*$FSSingleSlaveRep>>
			<<if $slaves[$i].preg > 0>>
				<<if $slaves[$i].pregSource == $relation.ID>>
					@@color:green;The effect is greatly enhanced@@ by $slaves[$i].slaveName's pureblooded pregnancy.
					<<set $repGain += $FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel), $arcologies[0].FSEgyptianRevivalist += 0.05*$FSSingleSlaveRep*$pornFameBonus>>
				<</if>>
			<</if>>
		<</if>>
	<<elseif $slaves[$i].father == -1>>
		She
		<<if $slaves[$i].sexualQuirk is "perverted">>
			is such a pervert that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].devotion > 95>>
			is so inured to the perversities of slavery that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].behavioralQuirk is "sinful">>
			is torn between sinful delight and deep disgust that she's carrying on an incestuous relationship with her own father.
		<<elseif $slaves[$i].devotion > 75>>
			is so devoted to you that she accepts carrying on an incestuous relationship with her own mother.
		<<elseif $slaves[$i].devotion > 50>>
			is somewhat @@color:mediumorchid;disturbed@@ that she's carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion -= 2>>
		<<elseif $slaves[$i].devotion > 20>>
			is @@color:mediumorchid;disturbed@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion -= 2>>
			<<set $slaves[$i].trust -= 2>>
		<<else>>
			is @@color:mediumorchid;revolted@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion -= 4>>
			<<set $slaves[$i].trust -= 4>>
		<</if>>
		<<if $slaves[$i].preg > 0>>
			<<if $slaves[$i].pregSource == -1>>
				<<if $slaves[$i].sexualQuirk is "perverted">>
					She's even @@color:hotpink;aroused@@ by the constant awareness that her father is the parent of the daughter<<if $slaves[$i].pregType > 1>>s<</if>> she's carrying.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].behavioralQuirk is "sinful">>
					Her feelings about carrying her father's child<<if $slaves[$i].pregType > 1>>ren<</if>> are @@color:hotpink;secretly less mixed,@@ though.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].devotion > 95>>
					She occasionally remembers that she's carrying her father's child<<if $slaves[$i].pregType > 1>>ren<</if>>, but does her best to accept it by not thinking about it.
				<<elseif $slaves[$i].devotion > 50>>
					She's @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her father's, though she tries her best not to think about it.
					<<set $slaves[$i].devotion -= 1>>
				<<elseif $slaves[$i].devotion > 20>>
					She's so @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her father's that she often wakes up crying about it.
					<<set $slaves[$i].devotion -= 2>>
				<<else>>
					She's @@color:mediumorchid;passionately hateful@@ of you for making her carry an incestuous pregnancy.
					<<set $slaves[$i].devotion -= 4>>
				<</if>>
			<</if>>
		<</if>>
		<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
			Society @@color:green;strongly approves@@ of your incestuous relationship, which advances the Egyptian revivalist ideal of slave incest.
			<<set $repGain += 2*$FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel)>>
			<<set $arcologies[0].FSEgyptianRevivalist += 0.1*$FSSingleSlaveRep>>
			<<if $slaves[$i].preg > 0>>
				<<if $slaves[$i].pregSource == $relation.ID>>
					@@color:green;The effect is greatly enhanced@@ by $slaves[$i].slaveName's pureblooded pregnancy.
					<<set $repGain += $FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel), $arcologies[0].FSEgyptianRevivalist += 0.05*$FSSingleSlaveRep*$pornFameBonus>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<<if ($slaves[$i].assignment is "be a servant") || ($slaves[$i].assignment is "work as a servant") || ($slaves[$i].assignment is "serve in the master suite") || ($slaves[$i].assignment is "please you") || ($slaves[$i].ID is $Concubine.ID)>>
	She is @@color:hotpink;happy@@ to be allowed to serve you personally, since it's as close a relationship to you as she can aspire to. In addition, her deep love for you produces a slow but steady increase of both @@color:hotpink;devotion@@ and @@color:mediumaquamarine;trust.@@
	<<set $slaves[$i].devotion += 1>>
	<<set $slaves[$i].trust += 1>>
<<else>>
	Her deep love for you produces a slow but steady increase of both @@color:hotpink;devotion@@ and @@color:mediumaquamarine;trust.@@
	<<set $slaves[$i].devotion += 1>>
	<<set $slaves[$i].trust += 1>>
<</if>>
<<if ($slaves[$i].devotion+$slaves[$i].trust < 150)>>
<<if random(1,100) > 50>>
	She is no longer as devoted to you as she once was, and has @@color:lightsalmon;begun to look elsewhere for emotional support.@@
	<<set $slaves[$i].relationship to 0>>
<</if>>
<</if>>
<<if $slaves[$i].trust < 75>>
<<if random(1,100) > 50>>
	She is no longer as trusting of you as she once was, and has @@color:lightsalmon;begun to look elsewhere for emotional support.@@
	<<set $slaves[$i].relationship to 0>>
<</if>>
<</if>>

<<elseif $slaves[$i].relationship is -3>>
	<<if $slaves[$i].mother == -1>>
		She
		<<if $slaves[$i].sexualQuirk is "perverted">>
			is such a pervert that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].devotion > 95>>
			is so inured to the perversities of slavery that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].behavioralQuirk is "sinful">>
			is torn between sinful delight and deep disgust that she's carrying on an incestuous relationship with her own mother.
		<<elseif $slaves[$i].devotion > 75>>
			is so devoted to you that she accepts carrying on an incestuous relationship with her own mother.
		<<elseif $slaves[$i].devotion > 50>>
			is somewhat @@color:mediumorchid;disturbed@@ that she's carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion -= 2>>
		<<elseif $slaves[$i].devotion > 20>>
			is @@color:mediumorchid;disturbed@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion -= 2>>
			<<set $slaves[$i].trust -= 2>>
		<<else>>
			is @@color:mediumorchid;revolted@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own mother.
			<<set $slaves[$i].devotion -= 4>>
			<<set $slaves[$i].trust -= 4>>
		<</if>>
		<<if $slaves[$i].preg > 0>>
			<<if $slaves[$i].pregSource == -1>>
				<<if $slaves[$i].sexualQuirk is "perverted">>
					She's even @@color:hotpink;aroused@@ by the constant awareness that her mother is the parent of the daughter<<if $slaves[$i].pregType > 1>>s<</if>> she's carrying.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].behavioralQuirk is "sinful">>
					Her feelings about carrying her mother's child<<if $slaves[$i].pregType > 1>>ren<</if>> are @@color:hotpink;secretly less mixed,@@ though.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].devotion > 95>>
					She occasionally remembers that she's carrying her mother's child<<if $slaves[$i].pregType > 1>>ren<</if>>, but does her best to accept it by not thinking about it.
				<<elseif $slaves[$i].devotion > 50>>
					She's @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her mother's, though she tries her best not to think about it.
					<<set $slaves[$i].devotion -= 1>>
				<<elseif $slaves[$i].devotion > 20>>
					She's so @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her mother's that she often wakes up crying about it.
					<<set $slaves[$i].devotion -= 2>>
				<<else>>
					She's @@color:mediumorchid;passionately hateful@@ of you for making her carry an incestuous pregnancy.
					<<set $slaves[$i].devotion -= 4>>
				<</if>>
			<</if>>
		<</if>>
		<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
			Society @@color:green;strongly approves@@ of your incestuous relationship, which advances the Egyptian revivalist ideal of slave incest.
			<<set $repGain += 2*$FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel)>>
			<<set $arcologies[0].FSEgyptianRevivalist += 0.1*$FSSingleSlaveRep>>
			<<if $slaves[$i].preg > 0>>
				<<if $slaves[$i].pregSource == $relation.ID>>
					@@color:green;The effect is greatly enhanced@@ by $slaves[$i].slaveName's pureblooded pregnancy.
					<<set $repGain += $FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel), $arcologies[0].FSEgyptianRevivalist += 0.05*$FSSingleSlaveRep*$pornFameBonus>>
				<</if>>
			<</if>>
		<</if>>
	<<elseif $slaves[$i].father == -1>>
		She
		<<if $slaves[$i].sexualQuirk is "perverted">>
			is such a pervert that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].devotion > 95>>
			is so inured to the perversities of slavery that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].behavioralQuirk is "sinful">>
			is torn between sinful delight and deep disgust that she's carrying on an incestuous relationship with her own father.
		<<elseif $slaves[$i].devotion > 75>>
			is so devoted to you that she accepts carrying on an incestuous relationship with her own mother.
		<<elseif $slaves[$i].devotion > 50>>
			is somewhat @@color:mediumorchid;disturbed@@ that she's carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion -= 2>>
		<<elseif $slaves[$i].devotion > 20>>
			is @@color:mediumorchid;disturbed@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion -= 2>>
			<<set $slaves[$i].trust -= 2>>
		<<else>>
			is @@color:mediumorchid;revolted@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own father.
			<<set $slaves[$i].devotion -= 4>>
			<<set $slaves[$i].trust -= 4>>
		<</if>>
		<<if $slaves[$i].preg > 0>>
			<<if $slaves[$i].pregSource == -1>>
				<<if $slaves[$i].sexualQuirk is "perverted">>
					She's even @@color:hotpink;aroused@@ by the constant awareness that her father is the parent of the daughter<<if $slaves[$i].pregType > 1>>s<</if>> she's carrying.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].behavioralQuirk is "sinful">>
					Her feelings about carrying her father's child<<if $slaves[$i].pregType > 1>>ren<</if>> are @@color:hotpink;secretly less mixed,@@ though.
					<<set $slaves[$i].devotion += 1>>
				<<elseif $slaves[$i].devotion > 95>>
					She occasionally remembers that she's carrying her father's child<<if $slaves[$i].pregType > 1>>ren<</if>>, but does her best to accept it by not thinking about it.
				<<elseif $slaves[$i].devotion > 50>>
					She's @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her father's, though she tries her best not to think about it.
					<<set $slaves[$i].devotion -= 1>>
				<<elseif $slaves[$i].devotion > 20>>
					She's so @@color:mediumorchid;disgusted@@ that the bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>> she's carrying is her father's that she often wakes up crying about it.
					<<set $slaves[$i].devotion -= 2>>
				<<else>>
					She's @@color:mediumorchid;passionately hateful@@ of you for making her carry an incestuous pregnancy.
					<<set $slaves[$i].devotion -= 4>>
				<</if>>
			<</if>>
		<</if>>
		<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
			Society @@color:green;strongly approves@@ of your incestuous relationship, which advances the Egyptian revivalist ideal of slave incest.
			<<set $repGain += 2*$FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel)>>
			<<set $arcologies[0].FSEgyptianRevivalist += 0.1*$FSSingleSlaveRep>>
			<<if $slaves[$i].preg > 0>>
				<<if $slaves[$i].pregSource == $relation.ID>>
					@@color:green;The effect is greatly enhanced@@ by $slaves[$i].slaveName's pureblooded pregnancy.
					<<set $repGain += $FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel), $arcologies[0].FSEgyptianRevivalist += 0.05*$FSSingleSlaveRep*$pornFameBonus>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<<if ($slaves[$i].assignment is "be a servant") || ($slaves[$i].assignment is "work as a servant") || ($slaves[$i].assignment is "serve in the master suite") || ($slaves[$i].assignment is "please you") || ($slaves[$i].ID is $Concubine.ID)>>
	She is @@color:hotpink;happy@@ to be allowed to live her life close to you, since she's your wife. In addition, her deep reliance on her formal relationship to you produces a steady increase of both @@color:hotpink;devotion@@ and @@color:mediumaquamarine;trust.@@
	<<set $slaves[$i].devotion += 2>>
	<<set $slaves[$i].trust += 2>>
<<elseif ($slaves[$i].assignment is "whore") || ($slaves[$i].assignment is "work in the brothel") || ($slaves[$i].assignment is "serve the public") || ($slaves[$i].assignment is "serve in the club") || ($slaves[$i].assignment is "work a glory hole") || ($slaves[$i].assignment is "be confined in the arcade")>>
	Her reliance on her formal relationship to you produces a slight increase of both @@color:hotpink;devotion@@ and @@color:mediumaquamarine;trust,@@ though this is reduced by being on a public sexual assignment rather than being kept for you alone. The public is less forgiving of you ordering your slave wife to fuck random citizens, @@color:red;seriously damaging your reputation.@@
	<<set $slaves[$i].devotion += 1>>
	<<set $slaves[$i].trust += 1>>
	<<set $rep -= 100>>
<<else>>
	Her deep reliance on her formal relationship to you produces a steady increase of both @@color:hotpink;devotion@@ and @@color:mediumaquamarine;trust.@@
	<<set $slaves[$i].devotion += 1>>
	<<set $slaves[$i].trust += 1>>
<</if>>
<<if ($slaves[$i].devotion+$slaves[$i].trust < 150)>>
<<if random(1,100) > 50>>
	Since she is no longer completely devoted to you, @@color:lightsalmon;your being married to her is no longer socially expedient.@@
	<<set $slaves[$i].relationship to 0>>
<</if>>
<</if>>
<<if $slaves[$i].trust < 75>>
<<if random(1,100) > 50>>
	Since she is no longer absolutely trusting of you, @@color:lightsalmon;your being married to her is no longer socially expedient.@@
	<<set $slaves[$i].relationship to 0>>
<</if>>
<</if>>

<<elseif $slaves[$i].relationshipRules is "restrictive">>

<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].relationshipTarget>>
	<<if $slaves[$j].relationshipRules is "restrictive">>
		Since the rules forbid the relationship between $slaves[$i].slaveName and $slaves[$j].slaveName, they are @@color:lightsalmon;forced apart.@@
		<<if $slaves[$i].relationship > 1>>
			<<set $slaves[$j].relationship -= 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
			<<set $slaves[$j].relationship to 0>>
			<<set $slaves[$j].relationshipTarget to 0>>
			<<set $slaves[$i].relationship to 0>>
			<<set $slaves[$i].relationshipTarget to 0>>
		<</if>>
		<<if $slaves[$i].devotion <= 50>>
			$slaves[$i].slaveName @@color:mediumorchid;resents@@ this.
			<<set $slaves[$i].devotion -= 2>>
		<</if>>
		<<if $slaves[$j].devotion <= 50>>
			$slaves[$j].slaveName @@color:mediumorchid;resents@@ this.
			<<set $slaves[$j].devotion -= 2>>
		<</if>>
	<</if>>
	<<break>>
	<</if>>
<</for>>

<<elseif $slaves[$i].relationshipRules is "just friends">>

<<if $slaves[$i].relationship > 2>>
<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].relationshipTarget>>
	<<if $slaves[$j].relationshipRules is "restrictive">>
		Since the sexual relationship between $slaves[$i].slaveName and $slaves[$j].slaveName is against the rules, they are @@color:lightsalmon;forced to keep their hands to themselves.@@
		<<set $slaves[$j].relationship to 2>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to 2>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<if $slaves[$i].devotion <= 50>>
			$slaves[$i].slaveName @@color:mediumorchid;resents@@ this.
			<<set $slaves[$i].devotion -= 2>>
		<</if>>
		<<if $slaves[$j].devotion <= 50>>
			$slaves[$j].slaveName @@color:mediumorchid;resents@@ this.
			<<set $slaves[$j].devotion -= 2>>
		<</if>>
	<</if>>
	<<break>>
	<</if>>
<</for>>
<</if>>

<<else>>

<<for $j to 0; $j < $slaves.length; $j++>>
<<if $slaves[$j].ID is $slaves[$i].relationshipTarget>>
<<if $slaves[$i].relationship == 1>>
	$slaves[$i].slaveName is friends with $slaves[$j].slaveName.
	<<if ($slaves[$i].devotion+$slaves[$i].trust > 170) && (random(1,2) == 1)>>
		She's very devoted to you, and strongly trusts both you and her place as a slave. Since she is just friends with $slaves[$j].slaveName,
		<<if $slaves[$i].sexualQuirk is "romantic">>
		and persistently interprets sex in the most romantic possible terms, she has decided that she wants to be yours in her heart as well as her	<<if $slaves[$i].vagina > -1>>pussy<<else>>butthole<</if>>.
		@@color:lightgreen;She's become emotionally bonded to you!@@
		<<set $slaves[$i].relationship to -2>>
		<<elseif $slaves[$i].energy > 90>>
		and is a total sex addict, she begins to think of sex as her only meaningful emotional connection with people. @@color:lightgreen;She's become an emotional slut!@@
		<<set $slaves[$i].relationship to -1>>
		<<else>>
		and loves you, she begins to think of you as a woman might think of her lover - or <<if $PC.title != 0>>husband<<else>>wife<</if>>. She knows she cannot hope for more of a relationship with you than she has, but she finds emotional support in serving you nonetheless. @@color:lightgreen;She's become emotionally bonded to you!@@
		<<set $slaves[$i].relationship to -2>>
		<</if>>
		<<set $slaves[$j].relationship to 0>>
		<<set $slaves[$j].relationshipTarget to 0>>
		<<set $slaves[$i].relationshipTarget to 0>>
	<<elseif $familyTesting == 1 && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0) && (random(1,100) > 80)>>
		They build on their family relationship and become @@color:lightgreen;best friends.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget) && (random(1,100) > 80)>>
		They build on their family relationship and become @@color:lightgreen;best friends.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif ($slaves[$i].energy > 95) && (random(1,100) > 70)>>
		$slaves[$i].slaveName obviously lusts after her friend, and does everything she can to @@color:lightgreen;draw her closer.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif ($slaves[$i].attrXX > 85) && (random(1,100) > 70)>>
		<<if ($slaves[$j].vagina > -1) || ($slaves[$j].faceShape != "masculine")>>
			$slaves[$i].slaveName obviously lusts after her friend, and does everything she can to @@color:lightgreen;draw her closer.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<</if>>
	<<elseif ($slaves[$i].attrXY > 85) && (random(1,100) > 70)>>
		<<if ($slaves[$j].balls > 0)  or ($slaves[$j].faceShape is "masculine")>>
			$slaves[$i].slaveName obviously lusts after her friend, and does everything she can to @@color:lightgreen;draw her closer.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<</if>>
	<<elseif (random(1,100) > 90)>>
		They support and reassure each other and become @@color:lightgreen;best friends.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<</if>>
<<elseif $slaves[$i].relationship is 2>>
	$slaves[$i].slaveName maintains a close friendship with $slaves[$j].slaveName.
	<<set $seed to 0>>
	<<if $slaves[$i].sexualQuirk is "romantic">>
		Her romantic bent drives her to search for a regular sexual partner.
		<<set $seed += 10>>
	<</if>>
	<<if ($slaves[$i].devotion+$slaves[$i].trust > 95) && (random(1,2) == 1)>>
		$slaves[$i].slaveName is totally devoted to you, and implicitly trusts both you and her place as a slave. Since her relationship with $slaves[$j].slaveName has not yet turned sexual,
		<<if $slaves[$i].sexualQuirk is "romantic">>
		and she persistently interprets sex in the most romantic possible terms, she has decided that she wants to be yours in her heart as well as her
		<<if $slaves[$i].vagina > -1>>
			pussy.
		<<else>>
			butthole.
		<</if>>
		@@color:lightgreen;She's become emotionally bonded to you!@@
		<<set $slaves[$i].relationship to -2>>
		<<elseif $slaves[$i].energy > 90>>
		and she's a total sex addict, she begins to think of sex as her only meaningful emotional connection with people. @@color:lightgreen;She's become an emotional slut!@@
		<<set $slaves[$i].relationship to -1>>
		<<else>>
		and she loves you, she begins to think of you as a woman might think of her lover - or <<if $PC.title != 0>>husband<<else>>wife<</if>>. She knows she cannot hope for more of a relationship with you than she has, but she finds emotional support in serving you nonetheless. @@color:lightgreen;She's become emotionally bonded to you!@@
		<<set $slaves[$i].relationship to -2>>
		<</if>>
		<<set $slaves[$j].relationship to 0>>
		<<set $slaves[$j].relationshipTarget to 0>>
		<<set $slaves[$i].relationshipTarget to 0>>
	<<elseif $familyTesting == 1 && ($slaves[$i].energy > 95) && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0) && (random(1,100) > (90-$seed))>>
		Driven by nymphomania to attempt to have sex with everyone, $slaves[$i].slaveName successfully seduces $slaves[$j].slaveName and they become @@color:lightgreen;friends with benefits.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif ($slaves[$i].energy > 95) && ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget) && (random(1,100) > (90-$seed))>>
		Driven by nymphomania to attempt to have sex with everyone, $slaves[$i].slaveName successfully seduces $slaves[$j].slaveName and they become @@color:lightgreen;friends with benefits.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif $familyTesting == 1 && ($slaves[$i].sexualQuirk is "perverted") && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0) && (random(1,100) > (80-$seed))>>
		Revelling in the taboo nature of her attraction to $slaves[$j].slaveName, $slaves[$i].slaveName successfully seduces her and they become @@color:lightgreen;friends with benefits.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif ($slaves[$i].sexualQuirk is "perverted") && ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget) && (random(1,100) > (80-$seed))>>
		Revelling in the taboo nature of her attraction to $slaves[$j].slaveName, $slaves[$i].slaveName successfully seduces her and they become @@color:lightgreen;friends with benefits.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif $familyTesting == 1 && ($slaves[$i].behavioralQuirk is "sinful") && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0) && (random(1,100) > (80-$seed))>>
		Aroused by the chance to commit the sin of incest, $slaves[$i].slaveName successfully seduces $slaves[$j].slaveName and they become @@color:lightgreen;friends with benefits.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif ($slaves[$i].behavioralQuirk is "sinful") && ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget) && (random(1,100) > (80-$seed))>>
		Aroused by the chance to commit the sin of incest, $slaves[$i].slaveName successfully seduces $slaves[$j].slaveName and they become @@color:lightgreen;friends with benefits.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif ($slaves[$i].energy > 95) && (random(1,100) > (80-$seed))>>
		$slaves[$i].slaveName successfully seduces $slaves[$j].slaveName and they become @@color:lightgreen;friends with benefits.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
	<<elseif random(1,100) > (100-$seed)-(0.2*$slaves[$i].attrXX)>>
		<<if ($slaves[$j].vagina > -1) || ($slaves[$j].faceShape != "masculine")>>
			$slaves[$i].slaveName successfully seduces $slaves[$j].slaveName and they become @@color:lightgreen;friends with benefits.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<</if>>
	<<elseif random(1,100) > (100-$seed)-(0.2*$slaves[$i].attrXY)>>
		<<if ($slaves[$j].balls > 0)  or ($slaves[$j].faceShape is "masculine")>>
			$slaves[$i].slaveName successfully seduces $slaves[$j].slaveName and they become @@color:lightgreen;friends with benefits.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<</if>>
	<<elseif $familyTesting == 1 && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0)>>
		<<if random(1,100) > (95-$seed)>>
			Eventually, they happen to be together and horny, and find themselves fucking without thinking. They have become incestuous @@color:lightgreen;friends with benefits.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<</if>>
	<<elseif ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget)>>
		<<if random(1,100) > (95-$seed)>>
			Eventually, they happen to be together and horny, and find themselves fucking without thinking. They have become incestuous @@color:lightgreen;friends with benefits.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<</if>>
	<<elseif (random(1,100) > (95-$seed))>>
		<<if ($slaves[$j].vagina != -1) && ($slaves[$i].behavioralFlaw is "hates women") && (random(1,2) == 1)>>
			Despite $slaves[$i].slaveName's dislike of pussy, they fuck in a weak moment and find themselves becoming @@color:lightgreen;friends with benefits.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<elseif (($slaves[$j].balls > 0)  or ($slaves[$j].faceShape is "masculine")) && ($slaves[$i].behavioralFlaw is "hates men") && (random(1,2) == 1)>>
			Despite $slaves[$i].slaveName's distaste for cock, they fuck in a weak moment and find themselves becoming @@color:lightgreen;friends with benefits.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<<else>>
			Living in an atmosphere of omnipresent sexuality, they fuck in a weak moment and find themselves becoming @@color:lightgreen;friends with benefits.@@
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$j].relationshipTarget to $slaves[$i].ID>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
			<<set $slaves[$i].relationshipTarget to $slaves[$j].ID>>
		<</if>>
	<</if>>
<<elseif $slaves[$i].relationship is 3>>
	$slaves[$i].slaveName keeps up a sexual friendship with $slaves[$j].slaveName.
	<<set $seed to 0>>
	<<if $slaves[$i].sexualQuirk is "romantic">>
		Her romantic bent drives her to do her best to advance her relationship to an emotional level.
		<<set $seed += 10>>
	<</if>>
	<<if $familyTesting == 1 && ($slaves[$i].energy > 95) && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0) && (random(1,100) > (90-$seed))>>
		She's such a desperate nympho that constant incest is nothing to her. She develops real feelings for $slaves[$j].slaveName as a romantic partner. Their relationship becomes @@color:lightgreen;romantically emotional@@ as well as physical and familial.
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<<elseif ($slaves[$i].energy > 95) && ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget) && (random(1,100) > (90-$seed))>>
		She's such a desperate nympho that constant incest is nothing to her. She develops real feelings for $slaves[$j].slaveName as a romantic partner. Their relationship becomes @@color:lightgreen;romantically emotional@@ as well as physical and familial.
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<<elseif $familyTesting == 1 && ($slaves[$i].sexualQuirk is "perverted") && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0) && (random(1,100) > (80-$seed))>>
		Revelling in the taboo nature of her sexual relationship with $slaves[$j].slaveName, she not only enjoys $slaves[$j].slaveName's body, but looks after her pleasure, too. Their relationship becomes @@color:lightgreen;romantically emotional@@ as well as physical and familial.
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<<elseif ($slaves[$i].sexualQuirk is "perverted") && ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget) && (random(1,100) > (80-$seed))>>
		Revelling in the taboo nature of her sexual relationship with $slaves[$j].slaveName, she not only enjoys $slaves[$j].slaveName's body, but looks after her pleasure, too. Their relationship becomes @@color:lightgreen;romantically emotional@@ as well as physical and familial.
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<<elseif $familyTesting == 1 && ($slaves[$i].behavioralQuirk is "sinful") && ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0) && (random(1,100) > (80-$seed))>>
		She gets deep, perverse satisfaction by constant commission of the sin of incest, which is extreme enough to appease even her appetite for transgression. Her incestuous relationship becomes @@color:lightgreen;romantically emotional@@ as well as physical and familial.
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<<elseif ($slaves[$i].behavioralQuirk is "sinful") && ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget) && (random(1,100) > (80-$seed))>>
		She gets deep, perverse satisfaction by constant commission of the sin of incest, which is extreme enough to appease even her appetite for transgression. Her incestuous relationship becomes @@color:lightgreen;romantically emotional@@ as well as physical and familial.
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<<elseif ($slaves[$i].energy > 95) && (random(1,100) > (80-$seed))>>
		She not only enjoys $slaves[$j].slaveName's body, but looks after her pleasure, too. Without meaning it to, their relationship becomes @@color:lightgreen;strongly emotional@@ as well as physical.
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<<elseif random(1,100) > (100-$seed)-(0.2*$slaves[$i].attrXX)>>
		<<if ($slaves[$j].vagina > -1) || ($slaves[$j].faceShape != "masculine")>>
			She not only enjoys $slaves[$j].slaveName's body, but looks after her pleasure, too. Without meaning it to, their relationship becomes @@color:lightgreen;strongly emotional@@ as well as physical.
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<</if>>
	<<elseif random(1,100) > (100-$seed)-(0.2*$slaves[$i].attrXY)>>
		<<if ($slaves[$j].balls > 0) or ($slaves[$j].faceShape is "masculine")>>
			She not only enjoys $slaves[$j].slaveName's body, but looks after her pleasure, too. Without meaning it to, their relationship becomes @@color:lightgreen;strongly emotional@@ as well as physical.
			<<set $slaves[$j].relationship += 1>>
			<<set $slaves[$i].relationship to $slaves[$j].relationship>>
		<</if>>
	<<elseif (random(1,100) > (95-$seed))>>
		They've spent enough time looking after each other's sexual and emotional needs that their relationship has become @@color:lightgreen;very strong.@@
		<<set $slaves[$j].relationship += 1>>
		<<set $slaves[$i].relationship to $slaves[$j].relationship>>
	<</if>>
<<elseif $slaves[$i].relationship is 4>>
	$slaves[$i].slaveName and $slaves[$j].slaveName are lovers.
<<else>>
	$slaves[$i].slaveName has a slave wife, $slaves[$j].slaveName.
	<<if $arcologies[0].FSChattelReligionist != "unset">>
		Society @@color:green;approves@@ of their marriage, which advances the slave sacrament.
		<<set $repGain += $FSSingleSlaveRep*($arcologies[0].FSChattelReligionist/$FSLockinLevel)>>
		<<set $arcologies[0].FSChattelReligionist += 0.05*$FSSingleSlaveRep>>
	<</if>>
<</if>>
<<if $slaves[$i].devotion <= 95>>
	<<if $slaves[$i].devotion != $slaves[$j].devotion>>
		<<if $slaves[$i].devotion > $slaves[$j].devotion>>
			$slaves[$i].slaveName absorbs <<if $slaves[$i].relationship == 1>>a touch of her friend<<elseif $slaves[$i].relationship == 2>>a little of her best friend<<elseif $slaves[$i].relationship == 3>>some of her close friend<<elseif $slaves[$i].relationship == 4>>a lot of her lover<<else>>much of her wife<</if>>'s @@color:mediumorchid;<<if $slaves[$j].devotion > 50>>remaining doubts about you<<elseif $slaves[$j].devotion > 20>>remaining hesitations about sexual slavery<<elseif $slaves[$j].devotion > -20>>unhappiness about being a sex slave<<else>>anger at being a slave<</if>>.@@
		<<else>>
			$slaves[$i].slaveName absorbs <<if $slaves[$i].relationship == 1>>a touch of her friend<<elseif $slaves[$i].relationship == 2>>a little of her best friend<<elseif $slaves[$i].relationship == 3>>some of her close friend<<elseif $slaves[$i].relationship == 4>>a lot of her lover<<else>>much of her wife<</if>>'s @@color:hotpink;<<if $slaves[$j].devotion > 50>>love for you<<elseif $slaves[$j].devotion > 20>>acceptance of sexual slavery<<elseif $slaves[$j].devotion > -20>>submission to the reality of being a sex slave<<else>>unwillingness to immediately rebel<</if>>.@@
		<</if>>
		<<set $slaves[$i].devotion -= Math.trunc(($slaves[$i].devotion-$slaves[$j].devotion)*(0.1*$slaves[$i].relationship))>>
	<</if>>
<<elseif $slaves[$j].devotion <= 95>>
	She's so devoted to you that she's unaffected by $slaves[$j].slaveName's less abject submission.
<</if>>
<<if $slaves[$i].trust <= 95>>
	<<if $slaves[$i].trust < -20>>
		$slaves[$i].slaveName cares for $slaves[$j].slaveName and is @@color:gold;terrified@@ of what you might do to her if either of them misbehave. She @@color:hotpink;does her best@@ to avoid that.
		<<set $slaves[$i].trust -= $slaves[$i].relationship>>
		<<set $slaves[$i].devotion += $slaves[$i].relationship>>
	<<else>>
		$slaves[$i].slaveName @@color:mediumaquamarine;trusts you@@
		<<if $slaves[$i].relationship <= 2>>
			a little more for allowing her to have a friend.
		<<elseif $slaves[$i].relationship == 3>>
			for letting her have a fuckbuddy.
		<<elseif $slaves[$i].relationship == 4>>
			for permitting her and her lover to be together.
		<<else>>
			for giving her a wife.
		<</if>>
		<<set $slaves[$i].trust += $slaves[$i].relationship>>
	<</if>>
<<elseif $slaves[$i].devotion > 95>>
	<<if $slaves[$i].relationship > 4>>
		She feels <<if $arcologies[0].FSChattelReligionist != "unset">>blessed with<<else>>she has<</if>> a truly good life as your slave.
	<</if>>
<</if>>
<<break>>
<</if>>
<</for>>

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

<<if $slaves[$i].relationship >= 3>>

<<if $familyTesting == 1>>

	<<if $slaves[$i].mother > 0 || $slaves[$i].father > 0 || $slaves[$i].sisters > 0 || $slaves[$i].daughters > 0>>
		<<set $relation = 0>>
		<<set $relationType = 0>>
		<<for $j to 0; $j < $slaves.length; $j++>>
			<<if $slaves[$i].relationshipTarget == $slaves[$j].ID>>
				<<if ($slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || areSisters($slaves[$i], $slaves[$j]) > 0)>>
					<<if $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID>>
						<<set $relationType = "daughter">>
					<<elseif $slaves[$i].mother == $slaves[$j].ID>>
						<<set $relationType = "mother">>
					<<elseif $slaves[$i].father == $slaves[$j].ID>>
						<<set $relationType = "father">>
					<<elseif areSisters($slaves[$i], $slaves[$j]) == 1>>
						<<set $relationType = "twin">>
					<<elseif areSisters($slaves[$i], $slaves[$j]) == 2>>
						<<set $relationType = "sister">>
					<<elseif areSisters($slaves[$i], $slaves[$j]) == 3>>
						<<set $relationType = "half-sister">>
					<</if>>
					<<set $relation = $slaves[$j]>>
					<<break>>
				<</if>>
			<</if>>
		<</for>>
		<<if $relation != 0>>
			$slaves[$i].slaveName
			<<if $slaves[$i].origin == "She offered herself to you for enslavement hoping you would preserve her incestuous relationship with her sibling." || $slaves[$i].origin == "She offered to become your slave to protect her incestuous relationship.">>
				is @@color:hotpink;grateful@@ and @@color:mediumaquamarine;trusting@@ towards you for protecting her in her long-standing incestuous relationship.
				<<set $slaves[$i].devotion += 2>>
				<<set $slaves[$i].trust += 2>>
			<<elseif $slaves[$i].sexualQuirk is "perverted">>
				is such a pervert that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own $relationType.
				<<set $slaves[$i].devotion += 1>>
			<<elseif $slaves[$i].devotion > 95>>
				is so inured to the perversities of slavery that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own $relationType.
				<<set $slaves[$i].devotion += 1>>
			<<elseif $slaves[$i].behavioralQuirk is "sinful">>
				is torn between sinful delight and deep disgust that she's carrying on an incestuous relationship with her own $relationType.
			<<elseif $slaves[$i].devotion > 75>>
				is so devoted to you that she accepts carrying on an incestuous relationship with her own $relationType.
			<<elseif $slaves[$i].devotion > 50>>
				is somewhat @@color:mediumorchid;disturbed@@ that she's carrying on an incestuous relationship with her own $relationType.
				<<set $slaves[$i].devotion -= 2>>
			<<elseif $slaves[$i].devotion > 20>>
				is @@color:mediumorchid;disturbed@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own $relationType.
				<<set $slaves[$i].devotion -= 2>>
				<<set $slaves[$i].trust -= 2>>
			<<else>>
				is @@color:mediumorchid;revolted@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own $relationType.
				<<set $slaves[$i].devotion -= 4>>
				<<set $slaves[$i].trust -= 4>>
			<</if>>
			<<if $slaves[$i].preg > 0>>
				<<if $slaves[$i].pregSource == $relation.ID>>
					<<if $slaves[$i].origin == "She offered herself to you for enslavement hoping you would preserve her incestuous relationship with her sibling." || $slaves[$i].origin == "She offered to become your slave to protect her incestuous relationship.">>
						She's @@color:hotpink;overjoyed@@ to be carrying her sister's child.
						<<set $slaves[$i].devotion += 2>>
					<<elseif $slaves[$i].sexualQuirk is "perverted">>
						She's even @@color:hotpink;aroused@@ by the constant awareness that her $relationType is the parent of the daughter she's carrying.
						<<set $slaves[$i].devotion += 1>>
					<<elseif $slaves[$i].behavioralQuirk is "sinful">>
						Her feelings about carrying her <<print $relationType>>'s child are @@color:hotpink;secretly less mixed,@@ though.
						<<set $slaves[$i].devotion += 1>>
					<<elseif $slaves[$i].devotion > 95>>
						She occasionally remembers that she's carrying her <<print $relationType>>'s child, but does her best to accept it by not thinking about it.
					<<elseif $slaves[$i].devotion > 50>>
						She's @@color:mediumorchid;disgusted@@ that the baby she's carrying is her <<print $relationType>>'s, though she tries her best not to think about it.
						<<set $slaves[$i].devotion -= 1>>
					<<elseif $slaves[$i].devotion > 20>>
						She's so @@color:mediumorchid;disgusted@@ that the baby she's carrying is her <<print $relationType>>'s that she often wakes up crying about it.
						<<set $slaves[$i].devotion -= 2>>
					<<else>>
						She's @@color:mediumorchid;passionately hateful@@ of you for making her carry an incestuous pregnancy.
						<<set $slaves[$i].devotion -= 4>>
					<</if>>
				<</if>>
			<</if>>
			<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
				Society @@color:green;strongly approves@@ of their incestuous relationship, which advances the Egyptian revivalist ideal of slave incest.
				<<set $repGain += 2*$FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel)>>
				<<set $arcologies[0].FSEgyptianRevivalist += 0.1*$FSSingleSlaveRep>>
				<<if $slaves[$i].preg > 0>>
					<<if $slaves[$i].pregSource == $relation.ID>>
						@@color:green;The effect is greatly enhanced@@ by $slaves[$i].slaveName's pureblooded pregnancy.
						<<set $repGain += $FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel), $arcologies[0].FSEgyptianRevivalist += 0.05*$FSSingleSlaveRep*$pornFameBonus>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<set $relation = 0>>
		<<set $relationType = 0>>
	<</if>>

<<else>>

<<if $slaves[$i].relation != 0>>
<<if ($slaves[$i].relationTarget is $slaves[$i].relationshipTarget)>>
	$slaves[$i].slaveName
	<<if $slaves[$i].origin == "She offered herself to you for enslavement hoping you would preserve her incestuous relationship with her sibling." || $slaves[$i].origin == "She offered to become your slave to protect her incestuous relationship.">>
		is @@color:hotpink;grateful@@ and @@color:mediumaquamarine;trusting@@ towards you for protecting her in her long-standing incestuous relationship.
		<<set $slaves[$i].devotion += 2>>
		<<set $slaves[$i].trust += 2>>
	<<elseif $slaves[$i].sexualQuirk is "perverted">>
		is such a pervert that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own <<print relationTargetWord($slaves[$i])>>.
		<<set $slaves[$i].devotion += 1>>
	<<elseif $slaves[$i].devotion > 95>>
		is so inured to the perversities of slavery that she @@color:hotpink;enjoys@@ carrying on an incestuous relationship with her own <<print relationTargetWord($slaves[$i])>>.
		<<set $slaves[$i].devotion += 1>>
	<<elseif $slaves[$i].behavioralQuirk is "sinful">>
		is torn between sinful delight and deep disgust that she's carrying on an incestuous relationship with her own <<print relationTargetWord($slaves[$i])>>.
	<<elseif $slaves[$i].devotion > 75>>
		is so devoted to you that she accepts carrying on an incestuous relationship with her own <<print relationTargetWord($slaves[$i])>>.
	<<elseif $slaves[$i].devotion > 50>>
		is somewhat @@color:mediumorchid;disturbed@@ that she's carrying on an incestuous relationship with her own <<print relationTargetWord($slaves[$i])>>.
		<<set $slaves[$i].devotion -= 2>>
	<<elseif $slaves[$i].devotion > 20>>
		is @@color:mediumorchid;disturbed@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own <<print relationTargetWord($slaves[$i])>>.
		<<set $slaves[$i].devotion -= 2>>
		<<set $slaves[$i].trust -= 2>>
	<<else>>
		is @@color:mediumorchid;revolted@@ and @@color:gold;scared@@ that she's carrying on an incestuous relationship with her own <<print relationTargetWord($slaves[$i])>>.
		<<set $slaves[$i].devotion -= 4>>
		<<set $slaves[$i].trust -= 4>>
	<</if>>
	<<if $slaves[$i].preg > 0>>
	<<if $slaves[$i].pregSource == $slaves[$i].relationTarget>>
		<<if $slaves[$i].origin == "She offered herself to you for enslavement hoping you would preserve her incestuous relationship with her sibling." || $slaves[$i].origin == "She offered to become your slave to protect her incestuous relationship.">>
			She's @@color:hotpink;overjoyed@@ to be carrying her sister's child.
			<<set $slaves[$i].devotion += 2>>
		<<elseif $slaves[$i].sexualQuirk is "perverted">>
			She's even @@color:hotpink;aroused@@ by the constant awareness that her <<print relationTargetWord($slaves[$i])>> is the parent of the daughter she's carrying.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].behavioralQuirk is "sinful">>
			Her feelings about carrying her <<print relationTargetWord($slaves[$i])>>'s child are @@color:hotpink;secretly less mixed,@@ though.
			<<set $slaves[$i].devotion += 1>>
		<<elseif $slaves[$i].devotion > 95>>
			She occasionally remembers that she's carrying her <<print relationTargetWord($slaves[$i])>>'s child, but does her best to accept it by not thinking about it.
		<<elseif $slaves[$i].devotion > 50>>
			She's @@color:mediumorchid;disgusted@@ that the baby she's carrying is her <<print relationTargetWord($slaves[$i])>>'s, though she tries her best not to think about it.
			<<set $slaves[$i].devotion -= 1>>
		<<elseif $slaves[$i].devotion > 20>>
			She's so @@color:mediumorchid;disgusted@@ that the baby she's carrying is her <<print relationTargetWord($slaves[$i])>>'s that she often wakes up crying about it.
			<<set $slaves[$i].devotion -= 2>>
		<<else>>
			She's @@color:mediumorchid;passionately hateful@@ of you for making her carry an incestuous pregnancy.
			<<set $slaves[$i].devotion -= 4>>
		<</if>>
	<</if>>
	<</if>>
	<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
		Society @@color:green;strongly approves@@ of their incestuous relationship, which advances the Egyptian revivalist ideal of slave incest.
		<<set $repGain += 2*$FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel)>>
		<<set $arcologies[0].FSEgyptianRevivalist += 0.1*$FSSingleSlaveRep>>
		<<if $slaves[$i].preg > 0>>
		<<if $slaves[$i].pregSource == $slaves[$i].relationTarget>>
			@@color:green;The effect is greatly enhanced@@ by $slaves[$i].slaveName's pureblooded pregnancy.
			<<set $repGain += $FSSingleSlaveRep*($arcologies[0].FSEgyptianRevivalist/$FSLockinLevel), $arcologies[0].FSEgyptianRevivalist += 0.05*$FSSingleSlaveRep*$pornFameBonus>>
		<</if>>
		<</if>>
	<</if>>
<</if>>
<</if>>

<</if>>

<<if $slaves[$i].releaseRules != "restrictive">>
<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].relationshipTarget>>
	<<if $slaves[$i].sexualQuirk is "size queen">>
	<<if canAchieveErection($slaves[$j])>>
		<<if $slaves[$j].dick > 5>>
		She's @@color:hotpink;very happy@@ with her romantic status, since it means she gets monster cock.
		<<set $slaves[$i].devotion += 2>>
		<<if $slaves[$i].anus > 0>>
		<<if $slaves[$i].anus < 3>>
			She's such a size queen that she takes it up her ass as often as she can bear it, despite her poor anus not being used to such abuse. This @@color:lime;stretches out her sphincter.@@
			<<set $slaves[$i].anus += 1>>
		<</if>>
		<</if>>
		For her part, $slaves[$j].slaveName @@color:hotpink;can barely believe her luck,@@ their sex life is so good.
		<<set $slaves[$j].devotion += 2>>
		<<elseif $slaves[$j].dick > 4>>
		She @@color:hotpink;quite likes@@ being in a sexual relationship with a slave who has such an impressive dick.
		<<set $slaves[$i].devotion += 1>>
		<<if $slaves[$i].anus > 0>>
		<<if $slaves[$i].anus < 2>>
			She's such a size queen that she takes it up her ass as often as she can bear it, despite her tight butt not being used to such abuse. This @@color:lime;stretches out her sphincter.@@
			<<set $slaves[$i].anus += 1>>
		<</if>>
		<</if>>
		For her part, $slaves[$j].slaveName @@color:hotpink;enjoys@@ the benefits of having a lover so interested in her junk.
		<<set $slaves[$j].devotion += 1>>
		<<elseif $slaves[$j].dick > 3>>
		$slaves[$i].slaveName @@color:hotpink;certainly doesn't mind@@ having reliable access to such a nice big dick.
		<<set $slaves[$i].devotion += 1>>
		For her part, $slaves[$j].slaveName @@color:hotpink;likes@@ having a lover who finds her penis appealing.
		<<set $slaves[$j].devotion += 1>>
		<</if>>
	<</if>>
	<</if>>
	<<if ($slaves[$i].energy <= 90)>>
	<<if ($slaves[$j].energy > 95)>>
		$slaves[$j].slaveName is such a sex addict that she drags $slaves[$i].slaveName along with her in their enthusiastic sex life, @@color:green;slowly improving her sex drive.@@
		<<set $slaves[$i].energy += 3>>
	<<elseif ($slaves[$j].fetish is $slaves[$i].fetish) && ($slaves[$j].fetishKnown == 1) && ($slaves[$i].fetishKnown == 1)>>
		$slaves[$j].slaveName and $slaves[$i].slaveName enjoy sharing their sexual fetishes so much it @@color:green;improves their sex drives@@ in proportion to the strength of their kinks.
		<<set $slaves[$i].energy += 1+Math.trunc($slaves[$i].fetishStrength/30)>>
	<<elseif ($slaves[$i].attrXX > 65) && ($slaves[$i].attrKnown == 1) && (($slaves[$j].vagina > -1) || ($slaves[$j].face > 0))>>
		$slaves[$i].slaveName is very much attracted to $slaves[$j].slaveName, and their fulfilling sexual relationship @@color:green;gradually improves $slaves[$i].slaveName's sex drive.@@
		<<set $slaves[$i].energy += 1>>
	<<elseif ($slaves[$i].attrXY > 65) && ($slaves[$i].attrKnown == 1) && ($slaves[$j].dick > 0)>>
		$slaves[$i].slaveName enjoys $slaves[$j].slaveName and her cock, and their fulfilling sexual relationship @@color:green;gradually improves $slaves[$i].slaveName's sex drive.@@
		<<set $slaves[$i].energy += 1>>
	<</if>>
	<</if>>
	<<if ($slaves[$i].attrKnown == 1)>>
	<<if ($slaves[$i].attrXX <= 95)>>
	<<if ($slaves[$j].vagina > -1) || ($slaves[$j].faceShape != "masculine")>>
	<<if (random(1,100) < ($slaves[$i].relationship*5))>>
		After finding comfort with a feminine lover, $slaves[$i].slaveName begins to experience more attraction to women.
		<<set $slaves[$i].attrXX += 2>>
	<</if>>
	<</if>>
	<</if>>
	<<if ($slaves[$i].attrXY <= 95)>>
	<<if (($slaves[$j].balls > 0)  or ($slaves[$j].faceShape is "masculine"))>>
	<<if (random(1,100) < ($slaves[$i].relationship*5))>>
		After growing close to a lover with a dick, $slaves[$i].slaveName begins to experience more attraction to men.
		<<set $slaves[$i].attrXY += 2>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<<if $slaves[$j].fetish != "none">>
	<<if $slaves[$i].fetishStrength <= 95>>
	<<if $slaves[$j].fetish != $slaves[$i].fetish>>
	<<if $fetishChangeChance > random(0,100)-($slaves[$i].relationship*5)>>
	<<if $slaves[$j].fetish is "boobs">>
		After experiencing $slaves[$j].slaveName's love of breasts, her own and $slaves[$i].slaveName's, $slaves[$i].slaveName happily joins her as a @@color:lightcoral;boob fanatic.@@
		<<set $slaves[$i].fetish to "boobs">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
	<<elseif $slaves[$j].fetish is "buttslut">>
		$slaves[$j].slaveName begs $slaves[$i].slaveName to fuck her ass so many times that $slaves[$i].slaveName reconsiders her stance on buttsex. She becomes just as much of an @@color:lightcoral;anal slut@@ as $slaves[$j].slaveName.
		<<set $slaves[$i].fetish to "buttslut">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
	<<elseif $slaves[$j].fetish is "cumslut">>
		After sharing blowjobs with $slaves[$j].slaveName enough times, $slaves[$i].slaveName develops an @@color:lightcoral;oral fixation@@ of her own.
		<<set $slaves[$i].fetish to "cumslut">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
	<<elseif $slaves[$j].fetish is "submissive">>
		<<if ($slaves[$i].fetish != "dom")>>
		$slaves[$j].slaveName begs $slaves[$i].slaveName to dominate her so many times that $slaves[$i].slaveName gets used to domination, and finds she likes it. She becomes just as much of a @@color:lightcoral;sexual dominant@@ as a slave can be.
		<<set $slaves[$i].fetish to "dom">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
		<</if>>
	<<elseif $slaves[$j].fetish is "dom">>
		<<if ($slaves[$i].fetish != "submissive")>>
		$slaves[$j].slaveName holds $slaves[$i].slaveName down and fucks her so many times that $slaves[$i].slaveName starts to get off on being used. She becomes a true @@color:lightcoral;sexual submissive@@, and loves $slaves[$j].slaveName all the more for dominating her.
		<<set $slaves[$i].fetish to "submissive">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
		<</if>>
	<<elseif $slaves[$j].fetish is "masochist">>
		<<if ($slaves[$i].fetish != "sadist")>>
		$slaves[$j].slaveName begs $slaves[$i].slaveName to hurt her so many times that $slaves[$i].slaveName gets used to sadism, and finds she likes it. She becomes just as much of an @@color:lightcoral;sexual sadist@@ as a slave can be.
		<<set $slaves[$i].fetish to "sadist">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
		<</if>>
	<<elseif $slaves[$j].fetish is "sadist">>
		<<if ($slaves[$i].fetish != "masochist")>>
		$slaves[$j].slaveName hits $slaves[$i].slaveName during sex so often that $slaves[$i].slaveName starts to get off on being beaten. She becomes a true @@color:lightcoral;masochist@@, and loves $slaves[$j].slaveName all the more for abusing her.
		<<set $slaves[$i].fetish to "masochist">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
		<</if>>
	<<elseif $slaves[$j].fetish is "humiliation">>
		$slaves[$j].slaveName begs $slaves[$i].slaveName to humiliate her sexually so many times that $slaves[$i].slaveName can't help but be embarrassed by all the public sex, herself. She gets off on the @@color:lightcoral;humiliation@@ with $slaves[$j].slaveName.
		<<set $slaves[$i].fetish to "humiliation">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
	<<elseif $slaves[$j].fetish is "pregnancy">>
		$slaves[$j].slaveName shares her hopes and dreams of pregnancy and children with $slaves[$i].slaveName all the time, and $slaves[$i].slaveName can't help but feel her @@color:lightcoral;biological clock@@ tick in time with $slaves[$j].slaveName's.
		<<set $slaves[$i].fetish to "pregnancy">>
		<<set $slaves[$i].fetishKnown to 1>>
		<<set $slaves[$i].fetishStrength = 65>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<<break>>
	<</if>>
<</for>>
<</if>>

<<if ($slaves[$i].relationship >= 4)>>
<<if ($slaves[$i].devotion > 20) || (($slaves[$i].devotion >= -20) && ($slaves[$i].trust < -20) && ($slaves[$i].trust > -10))>>
<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].relationshipTarget>>
	<<if $slaves[$j].devotion > 75>>
	<<if $slaves[$j].trust > 50>>
	<<if $slaves[$j].intelligence > 0>>
	<<if $slaves[$j].intelligenceImplant > 0>>
	<<if $slaves[$j].actualAge - $slaves[$i].actualAge > 10>>
		<<if random(1,50) > ($slaves[$i].intelligence*5) + ($slaves[$j].intelligence*10)>>
		<<if ($slaves[$j].oralSkill > $slaves[$i].oralSkill)>>
			$slaves[$i].slaveName's <<if $slaves[$i].relationship >= 5>>wife<<else>>lover<</if>> is older, more experienced, and better at blowjobs than she is. They are such good slaves that the senior girl serves as a mentor to the junior, improving her oral skills.
			<<set $skillIncrease = 5>><<OralSkillIncrease $slaves[$i]>>
		<<elseif ($slaves[$j].analSkill > $slaves[$i].analSkill) && ($slaves[$i].anus > 0)>>
			$slaves[$i].slaveName's <<if $slaves[$i].relationship >= 5>>wife<<else>>lover<</if>> is older, more experienced, and better at taking a buttfuck than she is, and they are such good slaves that the senior girl serves as a mentor to the junior, improving her anal skills.
			<<set $skillIncrease = 5>><<AnalSkillIncrease $slaves[$i]>>
		<<elseif ($slaves[$j].vaginalSkill > $slaves[$i].vaginalSkill) && ($slaves[$i].vagina > 0) && ($slaves[$j].vagina > 0)>>
			$slaves[$i].slaveName's <<if $slaves[$i].relationship >= 5>>wife<<else>>lover<</if>> is older, more experienced, and a better lover than she is, and they are such good slaves that the senior girl serves as a mentor to the junior, improving her vaginal skills.
			<<set $skillIncrease = 5>><<VaginalSkillIncrease $slaves[$i]>>
		<<elseif ($slaves[$j].trust > $slaves[$i].trust)>>
			$slaves[$i].slaveName's <<if $slaves[$i].relationship >= 5>>wife<<else>>lover<</if>> is older, more experienced, and a better slave than she is, and they are such obedient slaves that the senior girl serves as a mentor to the junior, @@color:mediumaquamarine;improving her trust.@@
			<<set $slaves[$i].trust += 11>>
		<</if>>
		<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<<break>>
	<</if>>
<</for>>
<</if>>
<</if>>

<</if>> /* CLOSES RELATIONSHIP CHECK FOR LONG TERM RELATIONSHIP EFFECTS */

/* FAMILY FEELINGS */

<<if $familyTesting == 1>>

<<if $slaves[$i].daughters > 0 || $slaves[$i].mother > 0 || $slaves[$i].father > 0 || $slaves[$i].sisters > 0>>
<<if $slaves[$i].trust <= 95>>
<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$i].trust < -20>>
		<<if $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID>>
			<<if $slaves[$i].rivalry != $slaves[$j].ID>>
			$slaves[$i].slaveName is @@color:gold;agonizingly aware@@ that her child $slaves[$j].slaveName is also your slave and might suffer if either of them angers you, and @@color:hotpink;does her best@@ to protect her.
			<<set $slaves[$i].trust -= 4>>
			<<set $slaves[$i].devotion += 4>>
			<</if>>
		<</if>>
		<<if $slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || areSisters($slaves[$i], $slaves[$j]) > 0>>
			<<if $slaves[$i].rivalry != $slaves[$j].ID>>
			$slaves[$i].slaveName is @@color:gold;painfully concious@@ that her
			<<if $slaves[$i].mother == $slaves[$j].ID>>
				mother
			<<elseif $slaves[$i].father == $slaves[$j].ID>>
				father
			<<elseif areSisters($slaves[$i], $slaves[$j]) == 1>>
				twin sister
			<<elseif areSisters($slaves[$i], $slaves[$j]) == 2>>
				sister
			<<elseif areSisters($slaves[$i], $slaves[$j]) == 3>>
				half-sister
			<</if>>
			$slaves[$j].slaveName is also your slave and might suffer if either of them displeases you, and @@color:hotpink;tries to obey@@ as best she can.
			<<set $slaves[$i].trust -= 2>>
			<<set $slaves[$i].devotion += 2>>
			<</if>>
		<</if>>
	<<else>>
		<<if $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID || $slaves[$i].mother == $slaves[$j].ID || $slaves[$i].father == $slaves[$j].ID || areSisters($slaves[$i], $slaves[$j]) > 0>>
			$slaves[$i].slaveName knows that her
			<<if $slaves[$i].mother == $slaves[$j].ID>>
				mother
			<<elseif $slaves[$i].father == $slaves[$j].ID>>
				father
			<<elseif $slaves[$j].mother == $slaves[$i].ID || $slaves[$j].father == $slaves[$i].ID>>
				daughter
			<<elseif areSisters($slaves[$i], $slaves[$j]) == 1>>
				twin sister
			<<elseif areSisters($slaves[$i], $slaves[$j]) == 2>>
				sister
			<<elseif areSisters($slaves[$i], $slaves[$j]) == 3>>
				half-sister
			<</if>>
			$slaves[$j].slaveName
			<<if $slaves[$j].devotion > 50>>
				loves being your sex slave, and is @@color:hotpink;happy@@ for her.
				<<set $slaves[$i].devotion += 2>>
			<<elseif ($slaves[$j].devotion > 20) || ($slaves[$j].trust < -20)>>
				is an obedient sex slave, and hopes she'll avoid punishment.
			<<else>>
				hates being a sex slave, and is @@color:gold;afraid@@ for her.
				<<set $slaves[$i].trust -= 2>>
			<</if>>
		<</if>>
	<</if>>
<</for>>
<</if>>
<</if>>

<<else>>

<<if $slaves[$i].relationTarget != 0>>
<<if $slaves[$i].rivalryTarget != $slaves[$i].relationTarget>>
<<for $j to 0; $j < $slaves.length; $j++>>
<<if $slaves[$j].ID is $slaves[$i].relationTarget>>
	<<if $slaves[$i].trust <= 95>>
		<<if $slaves[$i].trust < -20>>
			<<if $slaves[$i].relation is "mother">>
				$slaves[$i].slaveName is @@color:gold;agonizingly aware@@ that her child $slaves[$j].slaveName is also your slave and might suffer if either of them angers you, and @@color:hotpink;does her best@@ to protect her.
				<<set $slaves[$i].trust -= 4>>
				<<set $slaves[$i].devotion += 4>>
			<<else>>
				$slaves[$i].slaveName is @@color:gold;painfully conscious@@ that her <<if $slaves[$i].relation is "daughter">>mother<<else>>$slaves[$i].relation<</if>> $slaves[$j].slaveName is also your slave and might suffer if either of them displeases you, and @@color:hotpink;tries to obey@@ as best she can.
				<<set $slaves[$i].trust -= 2>>
				<<set $slaves[$i].devotion += 2>>
			<</if>>
		<<else>>
			$slaves[$i].slaveName knows that her <<if $slaves[$i].relation is "mother">>daughter<<elseif $slaves[$i].relation is "daughter">>mother<<else>>$slaves[$i].relation<</if>> $slaves[$j].slaveName
			<<if $slaves[$j].devotion > 50>>
				loves being your sex slave, and is @@color:hotpink;happy@@ for her.
				<<set $slaves[$i].devotion += 2>>
			<<elseif ($slaves[$j].devotion > 20) || ($slaves[$j].trust < -20)>>
				is an obedient sex slave, and hopes she'll avoid punishment.
			<<else>>
				hates being a sex slave, and is @@color:gold;afraid@@ for her.
				<<set $slaves[$i].trust -= 2>>
			<</if>>
		<</if>>
	<</if>>
	<<break>>
<</if>>
<</for>>
<</if>>
<</if>>

<</if>>

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


code:
:: SA rest [nobr]

takes the week off.
<<if $slaves[$i].fuckdoll > 0>>It has nothing to do but <<if $slaves[$i].amp == 0>>lie<<else>>stand<</if>> in place.<</if>>

<<if $slaves[$i].health > 90>>
	$possessiveCap health is so outstanding that rest does not improve it.
<<elseif $slaves[$i].health > -100>>
	$possessiveCap @@color:green;health recovers@@ with rest.
	<<set $slaves[$i].health += 10>>
<</if>>

<<if $slaves[$i].fuckdoll == 0>>
<<if $slaves[$i].fetish != "mindbroken">>
<<if $slaves[$i].devotion > 20>>
	<<if $slaves[$i].trust <= 20>>
	Being allowed to rest @@color:mediumaquamarine;reduces $possessive fear@@ of you.
	<<set $slaves[$i].trust += 4>>
	<<elseif $slaves[$i].trust <= 50>>
	Being allowed to rest @@color:mediumaquamarine;builds $possessive trust@@ in you.
	<<set $slaves[$i].trust += 2>>
	<<else>>
	Being allowed to rest @@color:mediumaquamarine;confirms $possessive trust@@ in you.
	<<set $slaves[$i].trust += 2>>
	<</if>>
<<else>>
	<<if $slaves[$i].trust < -20>>
	Being allowed to rest @@color:mediumaquamarine;reduces $possessive fear@@ of you.
	<<set $slaves[$i].trust += 4>>
	<</if>>
<</if>>
<</if>>
<</if>>

repo_name: ThreadAnon/fc


code:
:: SA rivalries [nobr]

<<if $slaves[$i].fuckdoll == 0>>

<<if $slaves[$i].rivalry == 0>>

<<if $slaves[$i].fetish != "mindbroken">>
	<<if $slaves[$i].behavioralFlaw is "none">>
		<<set $seed to random(1,100)>>
	<<else>>
		<<set $seed to random(1,110)>>
	<</if>>
	<<if $seed > 90>>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID != $slaves[$i].ID>>
		<<if $slaves[$j].assignment is $slaves[$i].assignment>>
		<<if $slaves[$j].assignment != "stay confined">>
		<<if $slaves[$j].assignment != "be confined in the arcade">>
		<<if ($slaves[$j].rivalry == 0) && ($slaves[$i].rivalry == 0)>>
		<<if ($slaves[$i].relationshipTarget != $slaves[$j].ID)>>
		<<if random(-100,100) > ($slaves[$j].devotion+$slaves[$i].devotion)>>
			$slaves[$i].slaveName and $slaves[$j].slaveName see too much of each other and @@color:lightsalmon;start to dislike each other.@@
			<<set $slaves[$j].rivalry to 1>>
			<<set $slaves[$j].rivalryTarget to $slaves[$i].ID>>
			<<set $slaves[$i].rivalry to 1>>
			<<set $slaves[$i].rivalryTarget to $slaves[$j].ID>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
	<</for>>
	<</if>>
<</if>>

<<else>>

<<if $slaves[$i].fetish is "mindbroken">>

Since she is mindbroken, she @@color:lightsalmon;can't really maintain@@ any meaningful rivalry with
<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$j].slaveName.
		<<set $slaves[$j].rivalry to 0>>
		<<set $slaves[$j].rivalryTarget to 0>>
		<<break>>
	<</if>>
<</for>>
<<set $slaves[$i].rivalry to 0>>
<<set $slaves[$i].rivalryTarget to 0>>

<<else>>

<<if (random(1,100) > 70)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
	<<if ($slaves[$j].assignment != $slaves[$i].assignment) && ($slaves[$i].subTarget != $slaves[$j].ID) && ($slaves[$j].subTarget != $slaves[$i].ID)>>
		With time apart $slaves[$i].slaveName and $slaves[$j].slaveName @@color:lightgreen;dislike each other less.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
	<<elseif ($slaves[$j].fetish is $slaves[$i].fetish) && ($slaves[$j].fetishKnown == 1) && ($slaves[$i].fetishKnown == 1)>>
		$slaves[$i].slaveName and $slaves[$j].slaveName share sexual interests, and in the sexual atmosphere of the arcology, it's @@color:lightgreen;difficult for them to keep up their dislike@@ of one another with the mutual attraction.
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
	<<elseif ($slaves[$j].devotion > 50) && ($slaves[$i].devotion > 50)>>
		Since both $slaves[$i].slaveName and $slaves[$j].slaveName are devoted to you, they work together to @@color:lightgreen;get over their feud,@@ since it gets in the way of their duties.
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
	<<elseif ($slaves[$j].trust < -20) && ($slaves[$i].devotion < -20)>>
		Since both $slaves[$i].slaveName and $slaves[$j].slaveName are terrified of you, they work together to @@color:lightgreen;get over their feud,@@ since it brings punishment on both of them.
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
	<<elseif ($slaves[$j].ID is $slaves[$i].relationshipTarget) && ($slaves[$i].relationship > 3)>>
		<<set $slaves[$j].rivalry to 0>>
		<<set $slaves[$j].rivalryTarget to 0>>
		<<set $slaves[$i].rivalry to 0>>
		<<set $slaves[$i].rivalryTarget to 0>>
	<<elseif (random(1,100) > 70)>>
		$slaves[$i].slaveName and $slaves[$j].slaveName's @@color:lightgreen;feud dissipates a little.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
	<</if>>
	<<break>>
	<</if>>
	<</for>>
<<elseif $familyTesting == 1 && ($slaves[$i].mother > 0 || $slaves[$i].father > 0 || $slaves[$i].daughters > 0 || $slaves[$i].sisters > 0) && (random(1,100) > 80)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$i].slaveName and $slaves[$j].slaveName @@color:lightsalmon;pursue their family rivalry.@@
		<<set $slaves[$j].rivalry += 1>>
		<<set $slaves[$i].rivalry += 1>>
		<<break>>
	<</if>>
	<</for>>
<<elseif ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].rivalryTarget) && (random(1,100) > 80)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$i].slaveName and $slaves[$j].slaveName @@color:lightsalmon;pursue their family rivalry.@@
		<<set $slaves[$j].rivalry += 1>>
		<<set $slaves[$i].rivalry += 1>>
		<<break>>
	<</if>>
	<</for>>
<<elseif $familyTesting == 1 && ($slaves[$i].mother > 0 || $slaves[$i].father > 0 || $slaves[$i].daughters > 0 || $slaves[$i].sisters > 0) && (random(1,100) > 80)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$i].slaveName and $slaves[$j].slaveName @@color:lightgreen;patch up their family relationship.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
		<<break>>
	<</if>>
	<</for>>
<<elseif ($slaves[$i].relation != 0) && ($slaves[$i].relationTarget is $slaves[$i].rivalryTarget) && (random(1,100) > 80)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$i].slaveName and $slaves[$j].slaveName @@color:lightgreen;patch up their family relationship.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
		<<break>>
	<</if>>
	<</for>>
<<elseif ($slaves[$i].energy > 95) && (random(1,100) > 60)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$i].slaveName lusts after $slaves[$j].slaveName, and does everything she can to @@color:lightgreen;patch up their differences.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
		<<break>>
	<</if>>
	<</for>>
<<elseif ($slaves[$i].attrXX > 85) && (random(1,100) > 70)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
	<<if ($slaves[$j].vagina > -1) || ($slaves[$j].faceShape != "masculine")>>
		$slaves[$i].slaveName lusts after $slaves[$j].slaveName, and does everything she can to @@color:lightgreen;patch up their differences.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
		<<break>>
	<</if>>
	<</if>>
	<</for>>
<<elseif ($slaves[$i].attrXY > 85) && (random(1,100) > 70)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
	<<if ($slaves[$j].balls > 0) || ($slaves[$j].faceShape is "masculine")>>
		$slaves[$i].slaveName lusts after $slaves[$j].slaveName, and does everything she can to @@color:lightgreen;patch up their differences.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
		<<break>>
	<</if>>
	<</if>>
	<</for>>
<<elseif (random(1,100) > 90)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$i].slaveName and $slaves[$j].slaveName @@color:lightsalmon;bicker@@ and indulge their rivalry whenever they can.
		<<set $slaves[$j].rivalry += 1>>
		<<set $slaves[$i].rivalry += 1>>
		<<break>>
	<</if>>
	<</for>>
<<elseif (random(1,100) > 90)>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		$slaves[$i].slaveName and $slaves[$j].slaveName manage to @@color:lightgreen;de-escalate their little feud.@@
		<<set $slaves[$j].rivalry -= 1>>
		<<set $slaves[$i].rivalry -= 1>>
		<<break>>
	<</if>>
	<</for>>
<</if>>

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

<<if $slaves[$i].rivalry != 0>>
	<<set $seed to 0>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
	<<if $slaves[$i].ID is $slaves[$j].rivalryTarget>>
		<<set $seed to 1>>
		<<break>>
	<</if>>
	<</if>>
	<</for>>
	<<if $seed == 0>>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID is $slaves[$i].rivalryTarget>>
		<<set $slaves[$j].rivalry to 0>>
		<<set $slaves[$j].rivalryTarget to 0>>
		<<break>>
		<</if>>
	<</for>>
	<<set $slaves[$i].rivalry to 0>>
	<<set $slaves[$i].rivalryTarget to 0>>
	<</if>>
<</if>>

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