From 72367f60c40f4d54cf04d6e4d30bac6f5e815660 Mon Sep 17 00:00:00 2001
From: klorpa <30924131+klorpa@users.noreply.github.com>
Date: Thu, 28 Feb 2019 15:09:15 -0600
Subject: [PATCH] Works

---
 src/js/utilJS.js                       |  2 +-
 src/npc/startingGirls/startingGirls.tw |  2 +-
 src/pregmod/eliteTakeOver.tw           |  2 +-
 src/utility/descriptionWidgets.tw      |  4 ++--
 src/utility/extendedFamilyWidgets.tw   | 24 ++++++++++++++++--------
 5 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/src/js/utilJS.js b/src/js/utilJS.js
index 547798ba739..aae2cc6e5d1 100644
--- a/src/js/utilJS.js
+++ b/src/js/utilJS.js
@@ -1421,7 +1421,7 @@ window.originPronounReplace = /** @param {App.Entity.SlaveState} slave */ functi
 		case "You acquired her in the last stages of your career as a noted private military contractor.":
 		case "You never thought you would be capable of impregnating yourself, but years of pleasuring yourself with yourself after missions managed to create her.":
 		case "A fresh capture once overpowered you and had his way with you. You kept her as a painful reminder to never lower your guard again.":
-		case "Your slaving troop kept several girls as fucktoys, and you sired her in your favorite.":
+		case "Your slaving troop kept several girls as fucktoys; you sired her in your favorite.":
 		case "You enslaved her personally during the last stages of your slaving career.":
 		case "You sired her in yourself after an arcology owner, impressed by your work, rewarded you with a night you'll never forget.":
 		case "You conceived her after a male arcology owner, impressed by your work, rewarded you with a night you'll never forget.":
diff --git a/src/npc/startingGirls/startingGirls.tw b/src/npc/startingGirls/startingGirls.tw
index 0e2cda5d7ad..4f65be65a8d 100644
--- a/src/npc/startingGirls/startingGirls.tw
+++ b/src/npc/startingGirls/startingGirls.tw
@@ -218,7 +218,7 @@ __You are customizing this slave:__
 			<<set $activeSlave.origin = "A fresh capture once overpowered you and had his way with you. You kept her as a painful reminder to never lower your guard again.">>
 			<<set $activeSlave.customTat = "She has your tiny slaving emblem tattooed behind her left ear.">>
 		<<elseif $activeSlave.father == -1>>
-			<<set $activeSlave.origin = "Your slaving troop kept several girls as fucktoys, and you sired her in your favorite.">>
+			<<set $activeSlave.origin = "Your slaving troop kept several girls as fucktoys; you sired her in your favorite.">>
 			<<set $activeSlave.customTat = "She has your tiny slaving emblem tattooed behind her left ear.">>
 		<<else>>
 			<<set $activeSlave.origin = "You enslaved her personally during the last stages of your slaving career.">>
diff --git a/src/pregmod/eliteTakeOver.tw b/src/pregmod/eliteTakeOver.tw
index 4a194afe076..50380036be1 100644
--- a/src/pregmod/eliteTakeOver.tw
+++ b/src/pregmod/eliteTakeOver.tw
@@ -39,7 +39,7 @@ You look up from your desk as the locked door to your office unseals, and a doze
 		<br><br>
 		''GAME OVER''
 	<</if>>
-<<elseif $PC.pregSource != -6>>
+<<else>>
 	The leader reaches into his jacket and extracts a syringe, you recognize it as a powerful drug used in lobotomies, and places it to your left. From his hip he pulls a revolver, six-chambered, and loads five bullets, spins the chamber, and places it to your right.
 	<br>
 	"You are no longer worthy of being a part of our society. You know you can't be allowed to spread any information. But we are not merciless; one of our members has taken an interest in having you as her pet. You may choose to lose your mind, and service her until she tires of you, or gamble for your life and serve her anyway. Now decide."
diff --git a/src/utility/descriptionWidgets.tw b/src/utility/descriptionWidgets.tw
index 3a7e0549768..a6401585bc6 100644
--- a/src/utility/descriptionWidgets.tw
+++ b/src/utility/descriptionWidgets.tw
@@ -329,8 +329,8 @@
 		<<print "You never thought you would be capable of impregnating yourself, but years of pleasuring yourself with yourself after missions managed to create $him.">>
 	<<case "A fresh capture once overpowered you and had his way with you. You kept her as a painful reminder to never lower your guard again.">>
 		<<print "A fresh capture once overpowered you and had his way with you. You kept $him as a painful reminder to never lower your guard again.">>
-	<<case "Your slaving troop kept several girls as fucktoys, and you sired her in your favorite.">>
-		<<print "Your slaving troop kept several girls as fucktoys, and you sired $him in your favorite.">>
+	<<case "Your slaving troop kept several girls as fucktoys; you sired her in your favorite.">>
+		<<print "Your slaving troop kept several girls as fucktoys; you sired $him in your favorite.">>
 	<<case "You enslaved her personally during the last stages of your slaving career.">>
 		<<print "You enslaved $him personally during the last stages of your slaving career.">>
 	<<case "You sired her in yourself after an arcology owner, impressed by your work, rewarded you with a night you'll never forget.">>
diff --git a/src/utility/extendedFamilyWidgets.tw b/src/utility/extendedFamilyWidgets.tw
index b17033cfb18..820c05ee616 100644
--- a/src/utility/extendedFamilyWidgets.tw
+++ b/src/utility/extendedFamilyWidgets.tw
@@ -1045,11 +1045,11 @@
 	<<set $activeSlave.mother = 0>>
 	<<redisplayFamily>>
 <</link>>
-<<if $PC.vagina == 1 && (($PC.actualAge - $activeSlave.actualAge) >= $fertilityAge) && $saveImported == 0>>
+<<if $PC.vagina == 1 && (($PC.actualAge - $activeSlave.actualAge) >= $fertilityAge) && (($PC.mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && $saveImported == 0>>
 | <<link "You">><<set $activeSlave.mother = $PC.ID>><<redisplayFamily>><</link>>
 <</if>>
 <<for _efw = 0; _efw < $slaves.length; _efw++>>
-	<<if $slaves[_efw].vagina > 0 && (($slaves[_efw].actualAge - $activeSlave.actualAge) >= $fertilityAge) && $slaves[_efw].newGamePlus == 0>>
+	<<if $slaves[_efw].vagina > 0 && (($slaves[_efw].actualAge - $activeSlave.actualAge) >= $fertilityAge) && (($slaves[_efw].mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && $slaves[_efw].newGamePlus == 0>>
 	|
 	<<set _id = $slaves[_efw].ID>>
 	<<set _slaveName = $slaves[_efw].slaveName>>
@@ -1067,11 +1067,11 @@
 	<<set $activeSlave.father = 0>>
 	<<redisplayFamily>>
 <</link>>
-<<if ($PC.dick == 1) && (($PC.actualAge - $activeSlave.actualAge) >= $potencyAge) && $saveImported == 0>>
+<<if ($PC.dick == 1) && (($PC.actualAge - $activeSlave.actualAge) >= $potencyAge) && (($PC.father != $activeSlave.father) || ($activeSlave.father == 0)) && $saveImported == 0>>
 | <<link "You">><<set $activeSlave.father = $PC.ID>><<redisplayFamily>><</link>>
 <</if>>
 <<for _efw = 0; _efw < $slaves.length; _efw++>>
-	<<if ($slaves[_efw].dick > 0) && ((($slaves[_efw].actualAge - $activeSlave.actualAge) >= $potencyAge)) && $slaves[_efw].newGamePlus == 0>>
+	<<if ($slaves[_efw].dick > 0) && ((($slaves[_efw].actualAge - $activeSlave.actualAge) >= $potencyAge)) && (($slaves[_efw].father != $activeSlave.father) || ($activeSlave.father == 0)) && $slaves[_efw].newGamePlus == 0>>
 		|
 		<<set _id = $slaves[_efw].ID>>
 		<<set _slaveName = $slaves[_efw].slaveName>>
@@ -1107,6 +1107,9 @@
 	<<if $slaves[_efw].newGamePlus == 0>>
 		<<if $saveImported == 1>>|<</if>>
 		<<set _slaveName = $slaves[_efw].slaveName>>
+		<<set _slave = $slaves[_efw]>>
+		<<if ($activeSlave.mother != _slave.ID) && (_slave.mother != $activeSlave.ID)>>
+		|
 		<<print "
 			<<link _slaveName>>
 				<<set _slave = $slaves[" + _efw + "]>>
@@ -1121,6 +1124,7 @@
 				<<redisplayFamily>>
 			<</link>>
 		">>
+		<</if>>
 	<</if>>
 <</for>>
 
@@ -1149,6 +1153,9 @@
 	<<if $slaves[_efw].newGamePlus == 0>>
 		<<if $saveImported == 1>>|<</if>>
 		<<set _slaveName = $slaves[_efw].slaveName>>
+		<<set _slave = $slaves[_efw]>>
+		<<if ($activeSlave.father != _slave.ID) && (_slave.father != $activeSlave.ID)>>
+		|
 		<<print "
 			<<link _slaveName>>
 				<<set _slave = $slaves[" + _efw + "]>>
@@ -1163,6 +1170,7 @@
 				<<redisplayFamily>>
 			<</link>>
 		">>
+		<</if>>
 	<</if>>
 <</for>>
 
@@ -1179,7 +1187,7 @@
 	<<redisplayFamily>>
 <</link>>
 <<if $activeSlave.vagina >= 0>>
-	<<if ($activeSlave.actualAge - $PC.actualAge) >= $fertilityAge && ($saveImported == 0)>>
+	<<if (($activeSlave.actualAge - $PC.actualAge) >= $fertilityAge) && (($PC.mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && ($saveImported == 0)>>
 		|
 		<<link "You">>
 			<<set $PC.mother = $activeSlave.ID>>
@@ -1194,7 +1202,7 @@
 		<<if $slaves[_efw].newGamePlus == 0>>
 			<<set _slaveName = $slaves[_efw].slaveName>>
 			<<set _slave = $slaves[_efw]>>
-			<<if ($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge>>
+			<<if (($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge) && ((_slave.mother != $activeSlave.mother) || ($activeSlave.mother == 0))>>
 				|
 				<<print "
 					<<link _slaveName>>
@@ -1224,7 +1232,7 @@
 	<<redisplayFamily>>
 <</link>>
 <<if $activeSlave.dick > 0>>
-	<<if ($activeSlave.actualAge - $PC.actualAge) >= $potencyAge && ($saveImported == 0)>>
+	<<if (($activeSlave.actualAge - $PC.actualAge) >= $potencyAge) && (($PC.father != $activeSlave.father) || ($activeSlave.father == 0)) && ($saveImported == 0)>>
 		|
 		<<link "You">>
 			<<set $PC.father = $activeSlave.ID>>
@@ -1236,7 +1244,7 @@
 		<<if $slaves[_efw].newGamePlus == 0>>
 			<<set _slaveName = $slaves[_efw].slaveName>>
 			<<set _slave = $slaves[_efw]>>
-			<<if ($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge>>
+			<<if (($activeSlave.actualAge - _slave.actualAge) >= $potencyAge) && ((_slave.father != $activeSlave.father) || ($activeSlave.father == 0))>>
 				|
 				<<print "
 					<<link _slaveName>>
-- 
GitLab