From 573af21bf5f101e3e971ecb2459d81d7f5ab3dfe Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sat, 2 Sep 2017 16:59:35 -0400
Subject: [PATCH] fixeds, overrides and more overhauling.

---
 src/uncategorized/RETS.tw             |  4 ++--
 src/uncategorized/brothelReport.tw    |  2 +-
 src/uncategorized/jeSlaveDispute.tw   |  2 +-
 src/uncategorized/saGetMilked.tw      |  2 +-
 src/uncategorized/saServeThePublic.tw | 20 +++++---------------
 src/uncategorized/saWhore.tw          | 22 +++++-----------------
 src/utility/miscWidgets.tw            |  9 +++++++--
 7 files changed, 22 insertions(+), 39 deletions(-)

diff --git a/src/uncategorized/RETS.tw b/src/uncategorized/RETS.tw
index 2c969b4c8cb..980aaa3396c 100644
--- a/src/uncategorized/RETS.tw
+++ b/src/uncategorized/RETS.tw
@@ -346,9 +346,9 @@ She's sitting on the end of the couch, though only her legs, crotch and hands ar
 	$activeSlave.slaveName is using the biggest dildo $subSlave.slaveName's <<if $subSlave.anus > 2>>loose<<elseif $subSlave.anus > 1>>welcoming<<else>>tight<</if>> anus can handle, and she's bouncing her anal bottom up and down fast.
 <</if>>
 Surprisingly, the slave on top doesn't seem too unhappy with this. She's no slavishly devoted buttslut, but
-<<if ($subSlave.dickAccessory == "chastity")>>
+<<if ($subSlave.dickAccessory == "chastity" || $subSlave.dickAccessory == "combined chastity")>>
 	she's taking it well, and even looking a little uncomfortable as the beginnings of a hardon press against her chastity cage.
-<<elseif ($subSlave.dick > 0) && canAchieveErection($subSlave.balls)>>
+<<elseif ($subSlave.dick > 0) && canAchieveErection($subSlave)>>
 	her cock is proudly erect, sticking straight up as she reclines against $activeSlave.slaveName beneath her, wiggling a little with the rhythm of the pounding.
 <<elseif ($subSlave.dick > 0)>>
 	she looks aroused, though her flopping dick can't show it.
diff --git a/src/uncategorized/brothelReport.tw b/src/uncategorized/brothelReport.tw
index 45de8d52b7a..13c600eafd5 100644
--- a/src/uncategorized/brothelReport.tw
+++ b/src/uncategorized/brothelReport.tw
@@ -341,7 +341,7 @@
 					<<set _seed++>>
 				<</if>>
 			<<elseif $brothelAdsImplanted == -1>>
-				<<if $slaves[$i].boobsImplant == 0 && $slaves[$i].buttImplant == 0 && $slaves[$i].waist >= -95 && $slaves[$i].lipsImplant == 0 && $slaves[$i].faceImplant < 30 &&  $slaves[$i].bellyImplant == -1>>
+				<<if $slaves[$i].boobsImplant == 0 && $slaves[$i].buttImplant == 0 && $slaves[$i].waist >= -95 && $slaves[$i].lipsImplant == 0 && $slaves[$i].faceImplant < 30 &&  $slaves[$i].bellyImplant <= 0>>
 					<<set _seed++>>
 				<</if>>
 			<</if>>
diff --git a/src/uncategorized/jeSlaveDispute.tw b/src/uncategorized/jeSlaveDispute.tw
index e3a539ef57a..7563eac0129 100644
--- a/src/uncategorized/jeSlaveDispute.tw
+++ b/src/uncategorized/jeSlaveDispute.tw
@@ -128,7 +128,7 @@
 		<<set $activeSlave.vagina = 2>>
 		<<set $activeSlave.ovaries = 1>>
 		<<if isFertile($activeSlave)>>
-			<<KnockMeUp $activeSlave 100 2 -2>>
+			<<KnockMeUp $activeSlave 100 2 -2 1>>
 		<</if>>
 	<</if>>
 <</switch>>
diff --git a/src/uncategorized/saGetMilked.tw b/src/uncategorized/saGetMilked.tw
index 3f95f82e0c6..17bec519704 100644
--- a/src/uncategorized/saGetMilked.tw
+++ b/src/uncategorized/saGetMilked.tw
@@ -84,7 +84,7 @@ gets milked this week.
 	<</if>>
 	<</if>>
 
-	<<if ($slaves[$i].preg > 5)>>
+	<<if ($slaves[$i].preg > 5) && ($slaves[$i].pregKnown == 1)>>
 		Her pregnancy helps her body produce more milk naturally<<if $slaves[$i].lactationAdaptation < 100>>, and also helps it adapt to milk production<<set $slaves[$i].lactationAdaptation += 1>><</if>>.
 	<</if>>
 
diff --git a/src/uncategorized/saServeThePublic.tw b/src/uncategorized/saServeThePublic.tw
index 6f17043449f..381e9921e56 100644
--- a/src/uncategorized/saServeThePublic.tw
+++ b/src/uncategorized/saServeThePublic.tw
@@ -86,26 +86,16 @@ the public.
 		<</if>>
 		<</if>>
 		<<if $clubAdsPreg == 1>>
-		<<if ($slaves[$i].preg > 10) || ($slaves[$i].bellyImplant >= 4000)>>
+		<<if ($slaves[$i].bellyPreg >= 5000) || ($slaves[$i].bellyImplant >= 4000)>>
 			<<set $beautyMultiplier += 0.05>>
 			Her gravid body fits $clubName's ad campaign, getting her more attention.
 		<</if>>
 		<<elseif $clubAdsPreg == -1>>
-		<<if ($slaves[$i].pregType < 10)>>
-		<<if ($slaves[$i].preg < 1)>>
-		<<if ($slaves[$i].weight < 30)>>
-		<<if (!setup.fakeBellies.includes($bellyAccessory))>>
-		<<if ($slaves[$i].bellyImplant <= 0)>>
-		<<if ($slaves[$i].inflation == 0)>>
+		<<if ($slaves[$i].belly < 100) && ($slaves[$i].weight < 30) && (!setup.fakeBellies.includes($bellyAccessory)) && ($slaves[$i].bellyImplant <= 0) && ($slaves[$i].inflation == 0)>>
 			<<set $beautyMultiplier += 0.05>>
 			Her flat belly fits $clubName's ad campaign, getting her more attention.
 		<</if>>
 		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
 		<<if $clubAdsModded == 1>>
 		<<if $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>>
 			<<set $beautyMultiplier += 0.05>>
@@ -753,7 +743,7 @@ Her appearance attracted $beauty members of the public (<<print Math.trunc($beau
 	She appeals to citizens who like lactation play, or just like sluts they can drink milk from.
 <</if>>
 
-<<if $slaves[$i].preg > 10 || setup.fakeBellies.includes($bellyAccessory) || $slaves[$i].bellyImplant >= 2000>>
+<<if $slaves[$i].bellyPreg >= 1500 || setup.fakeBellies.includes($bellyAccessory) || $slaves[$i].bellyImplant >= 2000>>
 <<if $arcologies[0].FSRepopulationFocus != "unset">>
 	In the new culture of $arcologies[0].name, her pregnancy gets her lots of attention.
 <<elseif $arcologies[0].FSRestart != "unset">>
@@ -1409,7 +1399,7 @@ Her appearance attracted $beauty members of the public (<<print Math.trunc($beau
 <<if ($slaves[$i].addict > 50)>>
 	<<set $vignettes.push({text: "she zoned out badly due to a low point between aphrodisiac doses, disappointing a citizen,", type: "rep", effect: -1})>>
 <</if>>
-<<if ($slaves[$i].preg > 20)>>
+<<if ($slaves[$i].bellyPreg >= 10000) || ($slaves[$i].bellyImplant >= 10000)>>
 	<<set $vignettes.push({text: "she earned extra gratitude from a citizen who likes to do nothing more than cuddle with her swollen belly,", type: "rep", effect: 1})>>
 	<<set $vignettes.push({text: "a night with guy who likes rough, hard sex with heavily pregnant girls took its toll on her", type: "health", effect: -1})>>
 <</if>>
@@ -1573,7 +1563,7 @@ Her appearance attracted $beauty members of the public (<<print Math.trunc($beau
 	<</if>>
 <</if>>
 <<if $arcologies[0].FSRepopulationFocus != "unset">>
-	<<if ($slaves[$i].pregType > 1)>>
+	<<if ($slaves[$i].pregType > 1) && ($slaves[$i].pregKnown > 1) && ($slaves[$i].belly >= 10000)>>
 	<<set $vignettes.push({text: "she gratified a citizen who enjoys the feeling of a womb filled with more than a single child,", type: "rep", effect: 1})>>
 	<</if>>
 <<elseif $arcologies[0].Restart != "unset">>
diff --git a/src/uncategorized/saWhore.tw b/src/uncategorized/saWhore.tw
index 2dbb2e5b511..637b2c252cb 100644
--- a/src/uncategorized/saWhore.tw
+++ b/src/uncategorized/saWhore.tw
@@ -80,26 +80,16 @@ her body.
 		<</if>>
 		<</if>>
 		<<if $brothelAdsPreg == 1>>
-		<<if ($slaves[$i].preg > 10) || ($slaves[$i].bellyImplant >= 4000)>>
+		<<if ($slaves[$i].bellyPreg >= 5000) || ($slaves[$i].bellyImplant >= 4000)>>
 			<<set $beautyMultiplier += 0.05>>
 			Her gravid body fits $brothelName's ad campaign, getting her more attention.
 		<</if>>
 		<<elseif $brothelAdsPreg == -1>>
-		<<if ($slaves[$i].pregType < 10)>>
-		<<if ($slaves[$i].preg < 1)>>
-		<<if ($slaves[$i].weight < 30)>>
-		<<if (!setup.fakeBellies.includes($bellyAccessory))>>
-		<<if ($slaves[$i].bellyImplant <= 0)>>
-		<<if ($slaves[$i].inflation == 0)>>
+		<<if ($slaves[$i].belly < 100) && ($slaves[$i].weight < 30) && (!setup.fakeBellies.includes($bellyAccessory)) && ($slaves[$i].bellyImplant <= 0) && ($slaves[$i].inflation == 0)>>
 			<<set $beautyMultiplier += 0.05>>
 			Her flat belly fits $brothelName's ad campaign, getting her more attention.
 		<</if>>
 		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
 		<<if $brothelAdsModded == 1>>
 		<<if $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>>
 			<<set $beautyMultiplier += 0.05>>
@@ -760,7 +750,7 @@ Her appearance attracted $beauty customers (<<print Math.trunc($beauty/7)>> a da
 	She appeals to customers who like lactation play, or just want a whore they can drink milk from.
 <</if>>
 
-<<if $slaves[$i].preg > 10 || setup.fakeBellies.includes($bellyAccessory) || $slaves[$i].bellyImplant >= 2000>>
+<<if $slaves[$i].bellyPreg >= 1500 || setup.fakeBellies.includes($bellyAccessory) || $slaves[$i].bellyImplant >= 2000>>
 	<<if $arcologies[0].FSRepopulationFocus != "unset">>
 		In the new culture of $arcologies[0].name, her pregnancy makes her a profitable whore.
 	<<elseif $arcologies[0].FSRestart != "unset">>
@@ -1409,16 +1399,14 @@ In total, you were paid @@.yellowgreen;¤<<print Math.trunc($beauty*$FResult)>>@
 <<if ($slaves[$i].addict > 50)>>
 	<<set $vignettes.push({text: "she zoned out badly due to a low point between aphrodisiac doses, disappointing a customer,", type: "rep", effect: -1})>>
 <</if>>
-<<if ($slaves[$i].preg > 20)>>
+<<if ($slaves[$i].bellyPreg >= 10000)>>
 	<<set $vignettes.push({text: "she earned repeat business from a customer who likes to do nothing more than cuddle with her swollen belly,", type: "cash", effect: 1})>>
 	<<set $vignettes.push({text: "a night with guy who likes rough, hard sex with heavily pregnant girls took its toll on her", type: "health", effect: -1})>>
 <</if>>
 <<if ($slaves[$i].inflation > 1)>>
 	<<set $vignettes.push({text: "she earned repeat business from a customer who loved the way her belly moved as he fucked her,", type: "cash", effect: 1})>>
-<<if ($slaves[$i].inflation > 1)>>
 	<<set $vignettes.push({text: "she disgusted a customer when his forceful fucking caused her to release her contained $slaves[$i].inflationType all over him,", type: "rep", effect: -2})>>
 <</if>>
-<</if>>
 <<if ($slaves[$i].hormones > 0) && !canAchieveErection($slaves[$i])>>
 	<<if ($slaves[$i].dick > 0)>>
 		<<set $vignettes.push({text: "she disappointed a customer who was sure she could get $slaves[$i].slaveName's cock erect,", type: "rep", effect: -1})>>
@@ -1597,7 +1585,7 @@ In total, you were paid @@.yellowgreen;¤<<print Math.trunc($beauty*$FResult)>>@
 	<</if>>
 <</if>>
 <<if $arcologies[0].FSRepopulationFocus != "unset">>
-	<<if ($slaves[$i].pregType > 1)>>
+	<<if ($slaves[$i].pregType > 1) && ($slaves[$i].pregKnown > 1) && ($slaves[$i].belly >= 10000)>>
 	<<set $vignettes.push({text: "she got repeat business from a customer who loves fucking girls with wombs filled by more than a single child,", type: "cash", effect: 1})>>
 	<</if>>
 <<elseif $arcologies[0].Restart != "unset">>
diff --git a/src/utility/miscWidgets.tw b/src/utility/miscWidgets.tw
index 459a88a7770..babd1a7916b 100644
--- a/src/utility/miscWidgets.tw
+++ b/src/utility/miscWidgets.tw
@@ -2656,6 +2656,7 @@ This experience
  $args[1] is the % chance to concieve.
  $args[2] control's the hole involved (0 - vagina, 1 - ass, 2 - both). .mpreg did this.
  $args[3] is the ID of her sire or 0 if undefined.
+ $args[4] is an override if defined - $args[3] must be defined in this case.
 */
 <<widget "KnockMeUp">>
 	<<if random(0,99) < $args[1]>>
@@ -2667,7 +2668,7 @@ This experience
 			<</if>>
 			<<SetPregType $args[0]>>
 			<<if $menstruation == 1>>
-			<<else>>
+			<<elseif ndef $args[4]>>>>
 				<<set $args[0].pregKnown = 1>>
 				<<if $args[0].ID == -1>>
 					/*@@.lime;You have gotten pregnant.@@*/
@@ -2676,6 +2677,8 @@ This experience
 				<<else>>
 					@@.lime;It has become pregnant.@@
 				<</if>>
+			<<else>>
+				<<set $args[0].pregKnown = 1>>
 			<</if>>
 		<<elseif $args[2] == 2>>
 			<<set $args[0].preg = 1>>
@@ -2685,7 +2688,7 @@ This experience
 			<</if>>
 			<<SetPregType $args[0]>>
 			<<if $menstruation == 1>>
-			<<else>>
+			<<elseif ndef $args[4]>>
 				<<set $args[0].pregKnown = 1>>
 				<<if $args[0].ID == -1>>
 					/*@@.lime;You have gotten pregnant.@@*/
@@ -2694,6 +2697,8 @@ This experience
 				<<else>>
 					@@.lime;It has become pregnant.@@
 				<</if>>
+			<<else>>
+				<<set $args[0].pregKnown = 1>>
 			<</if>>
 		<</if>>
 	<</if>>
-- 
GitLab