From d4f36e9741ea2e8e3e2a8cea6dc36a6c5d88b125 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Wed, 18 Dec 2019 00:25:22 -0500
Subject: [PATCH] Couple sell slave events

---
 Changelog.txt                    |  1 +
 src/js/generateGenetics.js       | 36 ++++++++++++++++++++-----------
 src/uncategorized/reBoomerang.tw | 18 ++++++++++++++++
 src/uncategorized/sellSlave.tw   | 37 ++++++++++++++++++++++++++++++++
 src/uncategorized/slaveSold.tw   | 26 ++++++++++++++++++++++
 5 files changed, 106 insertions(+), 12 deletions(-)

diff --git a/Changelog.txt b/Changelog.txt
index 4d07d7d5bb4..01c43c94873 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -4,6 +4,7 @@ Pregmod
 
 	-added overflow feedback to demand
 	-added pit assign/remove rules to the RA
+	-fixes and cleaning
 
 	12/11/2019
 
diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js
index 705f3704170..e09e803a2d4 100644
--- a/src/js/generateGenetics.js
+++ b/src/js/generateGenetics.js
@@ -1076,8 +1076,10 @@ window.generateChild = function(mother, ova, destination) {
 					} else {
 						child.slaveName = `${genes.clone}'s clone`;
 						let cloneSeed = getSlave(genes.cloneID);
-						if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
-							child.slaveSurname = cloneSeed.slaveSurname;
+						if (cloneSeed !== undefined) {
+							if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
+								child.slaveSurname = cloneSeed.slaveSurname;
+							}
 						}
 					}
 				} else if (genes.mother === -1) {
@@ -1126,8 +1128,10 @@ window.generateChild = function(mother, ova, destination) {
 						} else {
 							child.slaveName = `${genes.clone}'s clone`;
 							let cloneSeed = getSlave(genes.cloneID);
-							if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
-								child.slaveSurname = cloneSeed.slaveSurname;
+							if (cloneSeed !== undefined) {
+								if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
+									child.slaveSurname = cloneSeed.slaveSurname;
+								}
 							}
 						}
 					} else if (genes.mother === -1) {
@@ -1153,8 +1157,10 @@ window.generateChild = function(mother, ova, destination) {
 						child.slaveSurname = V.PC.slaveSurname;
 					} else {
 						let cloneSeed = getSlave(genes.cloneID);
-						if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
-							child.slaveSurname = cloneSeed.slaveSurname;
+						if (cloneSeed !== undefined) {
+							if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
+								child.slaveSurname = cloneSeed.slaveSurname;
+							}
 						}
 					}
 				} else if (genes.mother === -1) {
@@ -1197,8 +1203,10 @@ window.generateChild = function(mother, ova, destination) {
 					} else {
 						child.slaveName = `${genes.clone}'s clone`;
 						let cloneSeed = getSlave(genes.cloneID);
-						if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
-							child.slaveSurname = cloneSeed.slaveSurname;
+						if (cloneSeed !== undefined) {
+							if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
+								child.slaveSurname = cloneSeed.slaveSurname;
+							}
 						}
 					}
 				} else if (genes.mother === -1) {
@@ -1247,8 +1255,10 @@ window.generateChild = function(mother, ova, destination) {
 						} else {
 							child.slaveName = `${genes.clone}'s clone`;
 							let cloneSeed = getSlave(genes.cloneID);
-							if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
-								child.slaveSurname = cloneSeed.slaveSurname;
+							if (cloneSeed !== undefined) {
+								if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
+									child.slaveSurname = cloneSeed.slaveSurname;
+								}
 							}
 						}
 					} else if (genes.mother === -1) {
@@ -1274,8 +1284,10 @@ window.generateChild = function(mother, ova, destination) {
 						child.slaveSurname = V.PC.slaveSurname;
 					} else {
 						let cloneSeed = getSlave(genes.cloneID);
-						if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
-							child.slaveSurname = cloneSeed.slaveSurname;
+						if (cloneSeed !== undefined) {
+							if (cloneSeed.slaveSurname !== 0 && cloneSeed.slaveSurname !== "") {
+								child.slaveSurname = cloneSeed.slaveSurname;
+							}
 						}
 					}
 				} else if (genes.mother === -1) {
diff --git a/src/uncategorized/reBoomerang.tw b/src/uncategorized/reBoomerang.tw
index 2259d449d7a..d568e9d8675 100644
--- a/src/uncategorized/reBoomerang.tw
+++ b/src/uncategorized/reBoomerang.tw
@@ -332,6 +332,24 @@ brings up the relevant feeds. There's a naked body crumpled pathetically against
 	<<set $activeSlave.health = random(-70, -60)>>
 	<<set $activeSlave.behavioralFlaw = "odd">>
 	<<set $activeSlave.sexualFlaw = either("idealistic", "repressed", "self hating", "shamefast")>>
+<<case "sex double">>
+	You sold $him to a film studio to act as a double for a famous actress where $he was used for a sex scene. "They didn't <<s>>top after the <<sh>>oot. They just kept fucking me and fucking me until they ju<<s>>t to<<ss>>ed me a<<s>>ide, <<s>>in<<c>>e that bitch
+	<<if $seePreg != 0 && $activeSlave.ovaries == 1 && ($activeSlave.preg == 0 || $activeSlave.preg == -1) && $activeSlave.bellyImplant < 0>>
+		'i<<s>>n't a bloated whore like you'. Like I even had a choi<<c>>e in getting pregnant."
+	<<else>>
+		'i<<s>>n't a blown out whore like you'."
+	<</if>>
+	<<set $activeSlave.vagina = 3>>
+	<<set $activeSlave.anus = 3>>
+	<<if $seePreg != 0>><<if $activeSlave.ovaries>><<set $activeSlave.preg = random(5,_pregWeeks-1), $activeSlave.pregType = 1, $activeSlave.pregSource = 0, $activeSlave.pregWeek = $activeSlave.preg, $activeSlave.pregKnown = 1, SetBellySize($activeSlave)>><</if>><</if>>
+<<case "monster movie">>
+	You sold $him to a film studio to act as a double for a famous actress where $he was used installed with a massive fake pregnancy for the ending. "It'<<s>> too big... Can't breath right... Wa<<s>> going to be <<s>>old... <<S>>in<<c>>e I wa<<s>> a di<<s>>po<<s>>able prop... I'd rather be your prop." $He returns to wheezing against the solid mass bulging from $his middle.
+	<<set $activeSlave.health = random(-70, -60)>>
+	<<if $seeHyperPreg != 1>>
+		<<set $activeSlave.bellyImplant = 120000, $activeSlave.belly = 120000>>
+	<<else>>
+		<<set $activeSlave.bellyImplant = 300000, $activeSlave.belly = 300000>>
+	<</if>>
 <<default>>
 	<<switch _buyer>>
 	<<case "housekeeper">>
diff --git a/src/uncategorized/sellSlave.tw b/src/uncategorized/sellSlave.tw
index cae5087bfe4..504441cbd58 100644
--- a/src/uncategorized/sellSlave.tw
+++ b/src/uncategorized/sellSlave.tw
@@ -1149,6 +1149,43 @@ __Bids Received__
 	<</if>>
 <</if>>
 
+<<if $activeSlave.vagina > 0 && $activeSlave.dick == 0 && $activeSlave.balls == 0>>
+	<<if $activeSlave.physicalAge >= 20 && $activeSlave.physicalAge < 25>>
+		<<if $activeSlave.visualAge >= 20 && $activeSlave.visualAge < 25>>
+			<<if $activeSlave.preg <= 0 && $activeSlave.bellyImplant <= 0>>
+				<<if $activeSlave.weight < 10 && $activeSlave.weight > -10>>
+					<<if $activeSlave.waist < 10 && $activeSlave.waist > -50>>
+						<<if $activeSlave.boobs >= 550 && $activeSlave.boobs < 1000>>
+							<<if $activeSlave.butt > 2 && $activeSlave.butt < 5>>
+								<<if $activeSlave.hips > 0 && $activeSlave.hips < 3>>
+									<<if $activeSlave.face >= 20>>
+										<<set _movieDouble = random(1,100)>>
+										<<if _movieDouble > 90 && $seePreg != 0>>
+											<br>''<<print cashFormat(700*Math.trunc(($slaveCost*1.35)/700))>>'' from a production studio interested in using $him as a double.
+											<<link "Accept bid" "Slave Sold">>
+												<<set _Price = 700*Math.trunc(($slaveCost*1.35)/700)>>
+												<<run cashX(_Price, "slaveTransfer", $activeSlave)>>
+												<<set $buyer = "monster movie">>
+											<</link>>
+										<<elseif _movieDouble > 70>>
+											<br>''<<print cashFormat(700*Math.trunc(($slaveCost*1.35)/700))>>'' from a production studio interested in using $him as a double.
+											<<link "Accept bid" "Slave Sold">>
+												<<set _Price = 700*Math.trunc(($slaveCost*1.35)/700)>>
+												<<run cashX(_Price, "slaveTransfer", $activeSlave)>>
+												<<set $buyer = "sex double">>
+											<</link>>
+										<</if>>
+									<</if>>
+								<</if>>
+							<</if>>
+						<</if>>
+					<</if>>
+				<</if>>
+			<</if>>
+		<</if>>
+	<</if>>
+<</if>>
+
 <<if $activeSlave.dick > 0>>
 	<<if $activeSlave.skill.oral >= 100>>
 		<<if $activeSlave.height < 160>>
diff --git a/src/uncategorized/slaveSold.tw b/src/uncategorized/slaveSold.tw
index 94e6c2b3510..55f18e48cea 100644
--- a/src/uncategorized/slaveSold.tw
+++ b/src/uncategorized/slaveSold.tw
@@ -1138,6 +1138,32 @@
 		Your other slaves lacking in manners consider being turned into a proper member of polite society @@.gold;a fate wore than death.@@
 	<</if>>
 
+<<case "sex double">>
+	$activeSlave.slaveName soon makes $his debut on the big screen in a debaucherous gangbang in place of the popular lead. $He is a spitting image of the actress, even when coated in layers of semen.
+	<<for _ss = 0; _ss < $slaves.length; _ss++>>
+		<<if ($slaves[_ss].sexualFlaw == "attention whore")>>
+			<<run clearSummaryCache($slaves[_ss])>>
+			<<set $slaves[_ss].devotion -= 2>>
+			<<set _slaveImpact = 1>>
+		<</if>>
+	<</for>>
+	<<if (_slaveImpact == 1)>>
+		The attention whores among your slaves are @@.mediumorchid;envious@@ of $activeSlave.slaveName's good fortune.
+	<</if>>
+
+<<case "monster movie">>
+	$activeSlave.slaveName soon makes $his debut on the big screen in a thrilling horror movie. At its end, the male lead finds his partner, played by $him in this scene, glued to a wall with a massively distended middle filled to capacity with the monster's spawn. The camera slowly zooms in on $him as $he gives birth to a future sequel.
+	<<for _ss = 0; _ss < $slaves.length; _ss++>>
+		<<if ($slaves[_ss].sexualFlaw == "breeder")>>
+			<<run clearSummaryCache($slaves[_ss])>>
+			<<set $slaves[_ss].devotion -= 2>>
+			<<set _slaveImpact = 1>>
+		<</if>>
+	<</for>>
+	<<if (_slaveImpact == 1)>>
+		The pregnancy obsessed sluts among your slaves are @@.mediumorchid;envious@@ of $activeSlave.slaveName's new experience, even if it is fake.
+	<</if>>
+
 <<case "peacekeepers">>
 	$activeSlave.slaveName is delivered to General $peacekeepers.generalName's forces, to serve as a barracks whore. Several days later, the purchasing officer forwards a short shot of $activeSlave.slaveName
 	<<if $peacekeepers.tastes == 0>>
-- 
GitLab