From 536ad924b3b3a4e2e1e23229fb0df313c2129bef Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sun, 31 Mar 2019 18:54:46 -0400
Subject: [PATCH] Superfetation work

---
 src/js/eventSelectionJS.js         | 16 ++++++++++++++--
 src/uncategorized/newSlaveIntro.tw |  2 +-
 src/uncategorized/slaveInteract.tw |  4 ++--
 src/utility/miscWidgets.tw         |  2 +-
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/js/eventSelectionJS.js b/src/js/eventSelectionJS.js
index a839c0b092c..62639d25e0b 100644
--- a/src/js/eventSelectionJS.js
+++ b/src/js/eventSelectionJS.js
@@ -1275,7 +1275,13 @@ window.generateRandomEventPoolStandard = function(eventSlave) {
 									if (eventSlave.fetishKnown === 1) {
 										if (eventSlave.vagina !== 0) {
 											if (eventSlave.anus > 0) {
-												State.variables.RESSevent.push("impregnation please");
+												if (eventSlave.geneticQuirks.superfetation === 2 && (eventSlave.intelligence + eventSlave.intelligenceImplant > 15) && eventSlave.womb.length > 0) {
+													if (eventSlave.belly < (eventSlave.pregAdaptation * 1750)) {
+														State.variables.RESSevent.push("impregnation please");
+													}
+												} else {
+													State.variables.RESSevent.push("impregnation please");
+												}
 											}
 										}
 									}
@@ -2646,7 +2652,13 @@ window.generateRandomEventPoolServant = function(eventSlave) {
 								if (eventSlave.fetishKnown === 1) {
 									if (eventSlave.vagina !== 0) {
 										if (eventSlave.anus > 0) {
-											State.variables.RESSevent.push("impregnation please");
+											if (eventSlave.geneticQuirks.superfetation === 2 && (eventSlave.intelligence + eventSlave.intelligenceImplant > 15) && eventSlave.womb.length > 0) {
+												if (eventSlave.belly < (eventSlave.pregAdaptation * 1750)) {
+													State.variables.RESSevent.push("impregnation please");
+												}
+											} else {
+												State.variables.RESSevent.push("impregnation please");
+											}
 										}
 									}
 								}
diff --git a/src/uncategorized/newSlaveIntro.tw b/src/uncategorized/newSlaveIntro.tw
index b8e47889485..441a6c245c3 100644
--- a/src/uncategorized/newSlaveIntro.tw
+++ b/src/uncategorized/newSlaveIntro.tw
@@ -1297,7 +1297,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 <</if>>
 
 <<if $seePreg != 0>>
-<<if isFertile($activeSlave) && $PC.dick == 1 && $activeSlave.ballType == "human">>
+<<if isFertile($activeSlave) && $activeSlave.womb.length == 0 && $PC.dick == 1 && $activeSlave.ballType == "human">>
 	| <<link "Impregnate $him">>
 	<<replace "#introResult">>
 		You perform a careful medical examination to verify fertility, and then <<if ($activeSlave.devotion > 20) || ($activeSlave.trust < -20)>>lay the obedient $desc across your desk<<else>>restrain the resistant $desc in your office with $his ass in the air<</if>> and gently slide your hard cock <<if $activeSlave.mpreg == 1>>up $his butt<<else>>inside $his womanhood<</if>>. You take $him with care, enjoying $his body <<if ($activeSlave.devotion > 20) || ($activeSlave.trust < -20)>>and doing your best to give $him pleasure, too<<else>>without hurting $him<</if>>. You empty your balls inside $him, thrusting in as far as you can go as you climax. When $he feels the hot liquid jet into $him,
diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw
index b6180891aed..b13a268b55e 100644
--- a/src/uncategorized/slaveInteract.tw
+++ b/src/uncategorized/slaveInteract.tw
@@ -142,7 +142,7 @@
 		| <<link "Get a footjob">><<replace "#miniscene">><<include "FFeet">><br>&nbsp;&nbsp;&nbsp;&nbsp;<</replace>><</link>>
 	<</if>>
 	<span id = "impreg">
-	<<if (canGetPregnant($activeSlave)) && ($activeSlave.fuckdoll == 0) && $seePreg != 0>>
+	<<if (canGetPregnant($activeSlave)) && ($activeSlave.geneticQuirks.superfetation != 2 || $geneticMappingUpgrade != 0) && ($activeSlave.fuckdoll == 0) && $seePreg != 0>>
 		<<if canImpreg($activeSlave, $PC)>>
 			| <<link "Impregnate $him yourself">><<replace "#miniscene">><<include "FPCImpreg">><br>&nbsp;&nbsp;&nbsp;&nbsp;<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
 		<</if>>
@@ -380,7 +380,7 @@
 	<<if canDoAnal($activeSlave)>>
 		| <<link "Fuck $his rear hole">><<replace "#miniscene">><<FFuckdollAnal>><br><</replace>><</link>>
 	<</if>>
-	<<if (canGetPregnant($activeSlave)) && $seePreg != 0>>
+	<<if (canGetPregnant($activeSlave)) && ($activeSlave.geneticQuirks.superfetation != 2 || $geneticMappingUpgrade != 0) && $seePreg != 0>>
 		<<if canImpreg($activeSlave, $PC)>>
 			| <<link "Put a baby in $him">><<replace "#miniscene">><<FFuckdollImpreg>><br><</replace>><</link>>
 		<</if>>
diff --git a/src/utility/miscWidgets.tw b/src/utility/miscWidgets.tw
index 9a6bcacd6eb..827a5266414 100644
--- a/src/utility/miscWidgets.tw
+++ b/src/utility/miscWidgets.tw
@@ -23,7 +23,7 @@
 %/
 <<widget "SlaveInteractImpreg">>
 <<replace #impreg>>
-	<<if (canGetPregnant($activeSlave)) && ($activeSlave.fuckdoll == 0) && $seePreg != 0>>
+	<<if (canGetPregnant($activeSlave) && ($activeSlave.geneticQuirks.superfetation != 2 || $geneticMappingUpgrade != 0) && ($activeSlave.fuckdoll == 0) && $seePreg != 0>>
 		<<if canImpreg($activeSlave, $PC)>>
 			| <<link "Impregnate $him yourself">><<replace "#miniscene">><<include "FPCImpreg">><br>&nbsp;&nbsp;&nbsp;&nbsp;<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
 		<</if>>
-- 
GitLab