From 5ebd840b690d8b2f296b2361a3ef722d341ed338 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Thu, 20 Sep 2018 20:09:34 -0400
Subject: [PATCH] fixes and tweaks to fertility

---
 devNotes/VersionChangeLog-Premod+LoliMod.txt  |  6 +++
 devNotes/twine JS.txt                         |  2 +-
 src/cheats/mod_EditFSCheat.tw                 |  2 +-
 src/js/storyJS.tw                             |  2 +-
 src/pregmod/fSlaveFeed.tw                     |  6 +--
 src/pregmod/forceFeeding.tw                   |  4 +-
 src/uncategorized/RESS.tw                     | 18 +++----
 .../freeRangeDairyAssignmentScene.tw          | 15 +++---
 src/uncategorized/saLongTermEffects.tw        | 48 +++++++++++++++++++
 9 files changed, 80 insertions(+), 23 deletions(-)

diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt
index 31dd6ccb043..9cca0cf8be4 100644
--- a/devNotes/VersionChangeLog-Premod+LoliMod.txt
+++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt
@@ -2,6 +2,12 @@
 
 0.10.7.1-0.7.x
 
+9/20/2018
+
+	37
+	-fixes
+	-non max inflation no longer blocks conception
+
 9/19/2018
 
 	36
diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index 7e7e4a92f88..03a7bd86a7c 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -324,7 +324,7 @@ window.isFertile = function(slave) {
 		return false;
 	} else if (slave.ovaryAge >= 47) {
 		return false;
-	} else if (slave.inflation != 0) {
+	} else if (slave.inflation > 2) {
 		return false;
 	} else if (slave.bellyImplant != -1) {
 		return false;
diff --git a/src/cheats/mod_EditFSCheat.tw b/src/cheats/mod_EditFSCheat.tw
index 39c3b7cdf24..46c86f0776d 100644
--- a/src/cheats/mod_EditFSCheat.tw
+++ b/src/cheats/mod_EditFSCheat.tw
@@ -98,7 +98,7 @@
 	<<radiobutton "$arcologies[0].FSGenderRadicalistLawFuta" 0>> 0 (Not passed.)
 	| <<radiobutton "$arcologies[0].FSGenderRadicalistLawFuta" 1>> 1 (Futa pref.)
 	| <<radiobutton "$arcologies[0].FSGenderRadicalistLawFuta" 2>> 2 (Big dicks and balls pref.)
-	| <<radiobutton "$arcologies[0].FSGenderRadicalistLawFuta" 3>> 3 (Butt butts and skilled buttholes pref.)
+	| <<radiobutton "$arcologies[0].FSGenderRadicalistLawFuta" 3>> 3 (Big butts and skilled buttholes pref.)
 	| <<radiobutton "$arcologies[0].FSGenderRadicalistLawFuta" 4>> 4 (Trap pref.)
 
 	<br>[[Apply and reset Gender Traditionalism|MOD_Edit FS Cheat][$arcologies[0].FSGenderFundamentalist = "unset",$arcologies[0].FSGenderFundamentalistDecoration = 20,$arcologies[0].FSGenderFundamentalistLaw = 0]]
diff --git a/src/js/storyJS.tw b/src/js/storyJS.tw
index 92af10155ab..d58fa2bea50 100644
--- a/src/js/storyJS.tw
+++ b/src/js/storyJS.tw
@@ -321,7 +321,7 @@ window.isFertile = function(slave) {
 		return false;
 	} else if (slave.ovaryAge >= 47) {
 		return false;
-	} else if (slave.inflation != 0) {
+	} else if (slave.inflation > 2) {
 		return false;
 	} else if (slave.bellyImplant != -1) {
 		return false;
diff --git a/src/pregmod/fSlaveFeed.tw b/src/pregmod/fSlaveFeed.tw
index 813b183f683..efd776df2e0 100644
--- a/src/pregmod/fSlaveFeed.tw
+++ b/src/pregmod/fSlaveFeed.tw
@@ -2,15 +2,15 @@
 
 <<set _pregDiscovery = 0>>
 
-<<if $activeSlave.inflationType == "milk">>
-<<set $activeSlave.milkSource = $milkTap.ID>>
-
 <<run clearSummaryCache($activeSlave)>>
 <<setLocalPronouns $activeSlave>>
 
 <<run clearSummaryCache($milkTap)>>
 <<setLocalPronouns $milkTap 2>>
 
+<<if $activeSlave.inflationType == "milk">>
+<<set $activeSlave.milkSource = $milkTap.ID>>
+
 The first necessary step is to prepare the milk cow and _his2 udders.
 
 <<if $milkTap.fuckdoll > 0>>
diff --git a/src/pregmod/forceFeeding.tw b/src/pregmod/forceFeeding.tw
index 40f0de860f8..55d98093ad0 100644
--- a/src/pregmod/forceFeeding.tw
+++ b/src/pregmod/forceFeeding.tw
@@ -413,9 +413,7 @@ and a little jiggle from $his gut.
 		After a few minutes of rest,
 	<</if>>
 	you order $him to continue stuffing $himself to maintain $his current size until you say otherwise.
-	<<if $activeSlave.fetish != "mindbroken"
-			&& $activeSlave.devotion >= -20
-			&& $activeSlave.behavioralFlaw == "gluttonous">>
+	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.devotion >= -20 && $activeSlave.behavioralFlaw == "gluttonous">>
 		$He squeals with glee at the order.
 	<</if>>
 
diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index c85dbc4fc85..4425250a467 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -62,7 +62,7 @@
 
 <<case "first period">>
 
-<<EventNameLink $activeSlave>> appears in the door of your office, uncertain if $he should disturb you. $He stumbles through the doorway, hands on $his <<if $activeSlave.weight >= 95>>fat belly<<elseif $activeSlave.weight >= 30>>chubby belly<<else>>flat belly<</if>>, before stepping forward to stand in front of your desk. $His chest is rising and falling with panicked hyperventilation. The poor $girl is terrified for some reason.
+<<EventNameLink $activeSlave>> appears in the door of your office, uncertain if $he should disturb you. $He stumbles through the doorway, hands on $his <<if $activeSlave.weight >= 95>>fat belly<<elseif $activeSlave.belly >= 2000>>bloated belly<<elseif $activeSlave.weight >= 30>>chubby belly<<else>>flat belly<</if>>, before stepping forward to stand in front of your desk. $His chest is rising and falling with panicked hyperventilation. The poor $girl is terrified for some reason.
 <br><br>
 You press $him on why $he is acting this way.
 <<if !canTalk($activeSlave)>>
@@ -4270,7 +4270,7 @@ $He cranes her neck, glancing over her shoulder to give you a pleading look.
 	cunt. $His new urges cause $him to reach up to hug $himself close to you,
 	<<if ($activeSlave.boobs < 600)>>
 		her modest breasts let her snuggle close to you, face-to-face, as you take $him.
-	<<elseif ($activeSlave.boobs < 1200)>>
+	<<elseif ($activeSlave.boobs < 10000)>>
 		her big tits form a soft cushion between you as you take $him.
 	<<else>>
 		her massive tits stop her from bringing $himself too close to you as you take $him.
@@ -9332,16 +9332,18 @@ You tell her kindly that you understand, and that $he'll be trained to address t
 		cunt.
 	<</if>>
 	$He smiles up reassuringly at you to let you know $he's not in pain or anguish, blinking away her happy tears. $He reaches up to hug $himself close to you,
-	<<if ($activeSlave.boobs < 600)>>
+	<<if ($activeSlave.boobs < 600) && $activeSlave.belly < 5000>>
 		and her modest breasts let her snuggle close to you, face-to-face, as you take $him.
-	<<elseif ($activeSlave.boobs < 1200)>>
-		and her big tits form a soft cushion between you as you take $him.
+	<<elseif $activeSlave.belly >= 5000 && $activeSlave.boobs < 600>>
+		her big $activeSlave.inflationType stuffed belly pushing against you as you take $him.
+	<<elseif ($activeSlave.boobs < 10000)>>
+		and her big tits <<if $activeSlave.belly >= 2000>>and $activeSlave.inflationType stuffed belly <</if>>form a soft cushion between you as you take $him.
 	<<else>>
 		but her massive tits stop her from bringing $himself too close to you as you take $him.
 	<</if>>
 	$He enjoys $himself immensely, but $he loses it again when $he feels your 
 	<<if $PC.balls == 3>>
-		seed inflating her womb until $his stomach is distended and wobbling with cum.
+		seed inflating her womb until $his stomach is <<if $activeSlave.belly >= 2000>>noticeably larger than when $he started<<else>>distended and wobbling with cum<</if>>.
 	<<elseif $PC.balls == 2>>
 		seed pumping into her until her womb is stuffed with cum.
 	<<elseif $PC.balls == 1>>
@@ -9380,7 +9382,7 @@ You tell her kindly that you understand, and that $he'll be trained to address t
 	<<else>>
 		barely reacts as $he lowers her huge
 	<</if>>
-	butthole down onto your cock. $He gets quite a workout, raising and lowering $his body to fuck her own ass on your stationary dick. Since $he's facing you you get a great view of $his body in motion. $His clitoral stimulation is having an effect, and after a while $he
+	butthole down onto your cock. $He gets quite a workout, raising and lowering $his body to fuck her own ass on your stationary dick. Since $he's facing you you get a great view of $his body in motion. $His <<if $activeSlave.clit>>clitoral <</if>>stimulation is having an effect, and after a while $he
 	<<if !canTalk($activeSlave)>>
 		takes $his hand away to make an unintelligible gesture. After $he repeats it, you figure out that $he means $he wishes $he could get pregnant anally.
 	<<else>>
@@ -9388,7 +9390,7 @@ You tell her kindly that you understand, and that $he'll be trained to address t
 	<</if>>
 	When you're close, you scoot back to pull yourself out and $he spears $his cunt down onto your cock. The sudden difference of sensation brings you to violent climax, and $he @@.hotpink;cries with joy@@ at feeling your hot
 	<<if $PC.balls == 3>>
-		seed inflating her womb until $his stomach is distended and wobbling with cum.
+		seed inflating her womb until $his stomach is <<if $activeSlave.belly >= 2000>>noticeably larger than when $he started<<else>>distended and wobbling with cum<</if>>.
 	<<elseif $PC.balls == 2>>
 		seed pumping into her until her womb is stuffed with cum.
 	<<elseif $PC.balls == 1>>
diff --git a/src/uncategorized/freeRangeDairyAssignmentScene.tw b/src/uncategorized/freeRangeDairyAssignmentScene.tw
index b930a0f276d..a4eaebe2902 100644
--- a/src/uncategorized/freeRangeDairyAssignmentScene.tw
+++ b/src/uncategorized/freeRangeDairyAssignmentScene.tw
@@ -2,8 +2,7 @@
 
 /* This scene wants $dairyRestraintsSetting == 0 && $activeSlave.devotion > 0 && $activeSlave.fetish != "mindbroken" */
 
-<<set $nextButton = "Continue">>
-<<set $nextLink = $returnTo>>
+<<set $nextButton = "Continue", $nextLink = $returnTo>>
 
 $activeSlave.slaveName reports to the dairy.
 <<if $activeSlave.energy > 90 >>
@@ -173,7 +172,11 @@ The milking chair comes with a small screen, providing mental stimulation for th
 <<if ($activeSlave.fetish == "submissive")>>
 	submitting to their sexual partners.
 <<elseif ($activeSlave.fetish == "cumslut")>>
-	sucking dick for all it's worth.
+	<<if $activeSlave.attrXY > $activeSlave.attrXX || $activeSlave.behavioralQuirk == "adores men">>
+		jacking off directly into the camera.
+	<<else>>
+		sucking dick for all it's worth.
+	<</if>>
 	<<if $dairyFeedersSetting == 1 >>
 		The dairy feeders ejaculations are synced with the events in the video. $activeSlave.slaveName receives a load of cum-like nutrition every time a dick shoots. It really draws her into the pornography.
 	<</if>>
@@ -192,9 +195,9 @@ The milking chair comes with a small screen, providing mental stimulation for th
 	abusing their sexual partners.
 <<elseif ($activeSlave.fetish == "pregnancy")>>
 	<<if $activeSlave.attrXY > $activeSlave.attrXX || $activeSlave.behavioralQuirk == "adores men">>
-		being fucked while pregnant.
-	<<else>>
 		fucking pregnant women.
+	<<else>>
+		being fucked while pregnant.
 	<</if>>
 <<else>>
 	engaging in vanilla intercourse.
@@ -269,7 +272,7 @@ It does not take long for $activeSlave.slaveName to reach her first orgasm of ma
 	<<if $activeSlave.dick > 0>>
 		Her	<<if $activeSlave.balls > 5 >>cum-engorged<</if>> balls draw up.
 		Her <<if $activeSlave.dick > 8 >>gargantuan member<<elseif $activeSlave.dick > 6 >>huge cock<<else>>dick<</if>> twitches and flexes within its receptacle.
-			<<if $activeSlave.balls >= 50>>
+		<<if $activeSlave.balls >= 50>>
 			A special tank beneath her holds her monolithic balls' endless ejaculate while the machine struggles to suck it away.
 		<<elseif $activeSlave.balls >= 37>>
 			A special tank attached to the hose holds her titanic balls' near endless ejaculate while the machine struggles to suck it away.
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index e15a3893aad..9bb514b810d 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -8094,6 +8094,54 @@
 
 /*--------------- main labor triggers: -------- */
 
+/*
+<<if $dangerousPregancy != 0>>
+	<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && $slaves[$i].pregAdaptation < 500 && $slaves[$i].broodmother < 1>>
+		<<set _miscarriageChance = 100-((($slaves[$i].pregAdaptation*1000)-($slaves[$i].bellyPreg+($slaves[$i].bellyFluid*5)))/1000)>>
+		<<set _miscarriageChance += ($slaves[$i].curatives == 1 ? 10 : 0)>>
+		<<if $slaves[$i].health < -20>>
+			<<set _miscarriageChance += ($slaves[$i].health/10)>>
+			<<if $slaves[$i].trust < -20>>
+				<<set _miscarriageChance += ($slaves[$i].trust/10)>>
+			<</if>>
+		<</if>>
+		<<set _miscarriageChance -= ($slaves[$i].chem/10)>>
+		<<if $slaves[$i].weight < -50>>
+			<<set _miscarriageChance += ($slaves[$i].weight/5)>>
+		<</if>>
+		<<if $slaves[$i].assignment == "rest">>
+			<<set _miscarriageChance += 10>>
+		<<elseif $slaves[$i].assignment == "get treatment in the clinic">>
+			<<if $Nurse != 0>>
+				<<set _miscarriageChance += 30>>
+			<<else>>
+				<<set _miscarriageChance += 15>>
+			<</if>>
+		<</if>>
+		<<set _miscarriageChance = Math.round(_miscarriageChance)>>
+		<<if random(0,100) > _miscarriageChance>>
+			<<set _chance = random(1,100)>>
+			<<if $slaves[$i].preg > 27>>
+			<<elseif $slaves[$i].preg > 25 && _chance > 10>>
+				<<set $slaves[$i].labor = 1, $slaves[$i].prematureBirth = 1, $birthee = 1>>
+				<<set _miscarriage = 1>>
+			<<elseif $slaves[$i].preg > 23 && _chance > 40>>
+				<<set $slaves[$i].labor = 1, $slaves[$i].prematureBirth = 1, $birthee = 1>>
+				<<set _miscarriage = 1>>
+			<<elseif $slaves[$i].preg > 22 && _chance > 75>>
+				<<set $slaves[$i].labor = 1, $slaves[$i].prematureBirth = 1, $birthee = 1>>
+				<<set _miscarriage = 1>>
+			<<else>>
+				miscarriage
+				<<set _miscarriage = 1>>
+			<</if>>
+		<</if>>
+	<</if>>
+	<<if _miscarriage != 1 && (($slaves[$i].belly > ($slaves[$i].pregAdaptation*3200)) || $slaves[$i].bellyPreg > 600000)>>
+	<</if>>
+<</if>>
+*/
+
 <<if $slaves[$i].pregControl != "labor supressors" && $slaves[$i].assignment != "labor in the production line">>
 	<<if $slaves[$i].broodmother < 1>>
 		<<if WombBirthReady($slaves[$i], 43) > 0>> /*check for really ready fetuses - 43 weeks - max, overdue*/
-- 
GitLab