From 6b090f45060c519ba94278696bb79a2af5b9f0f4 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Thu, 11 Oct 2018 18:07:02 -0400
Subject: [PATCH] fixes and miscarriage/burst front end work

---
 devNotes/VersionChangeLog-Premod+LoliMod.txt |  5 +++
 src/SecExp/secBarracks.tw                    | 17 +++++---
 src/pregmod/seBurst.tw                       | 14 ++++---
 src/uncategorized/PETS.tw                    |  2 +-
 src/uncategorized/dispensary.tw              |  2 +-
 src/uncategorized/reBusyMasterSuite.tw       |  4 +-
 src/uncategorized/recETSWorkaround.tw        |  2 +
 src/uncategorized/saLongTermEffects.tw       | 44 +++++++++++++++++++-
 src/utility/descriptionWidgetsStyle.tw       |  4 --
 9 files changed, 72 insertions(+), 22 deletions(-)

diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt
index 38125845307..aa6ce4d6b5d 100644
--- a/devNotes/VersionChangeLog-Premod+LoliMod.txt
+++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt
@@ -2,6 +2,11 @@
 
 0.10.7.1-0.10.x
 
+10/11/2018
+
+	8
+	-major fix to VaginalVCheck
+
 10/10/2018
 
 	7
diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw
index 5ab920dea64..4c8c2d7efb0 100644
--- a/src/SecExp/secBarracks.tw
+++ b/src/SecExp/secBarracks.tw
@@ -138,13 +138,13 @@ Your current maximum number of units is <<print $maxUnits>> (<<print commaNum($s
 <</if>>
 <br>
 <<replenishAllUnits>>
-<<if $secBots.active === 1>> <br><br>
-__Security Drones__
+
+<br><br>__Security Drones__
 /* drones */
+<br>
+<<secBotsDescription>>
+<br>
 <<if $secBots.active == 1>>
-	<br>
-	<<secBotsDescription>>
-	<br>
 	<<link "Review Equipment and upgrades" "seeUnit">>
 		<<set $targetUnit = "secBots">>
 	<</link>>
@@ -155,7 +155,12 @@ __Security Drones__
 			<<set $secBots.troops = $secBots.maxTroops>>
 		<</link>>
 	<</if>>
-<</if>>
+<<else>>
+	<<link "Rebuild the unit" "secBarracks">>
+		<<set $cash -= ($secBots.maxTroops - $secBots.troops) * $secBotsCost>>
+		<<set $secBots.troops = $secBots.maxTroops>>
+		<<set $secBots.active = 1>>
+	<</link>>
 <</if>>
 
 <br><br>__Slaves__
diff --git a/src/pregmod/seBurst.tw b/src/pregmod/seBurst.tw
index 7ee241e2e30..6652088406a 100644
--- a/src/pregmod/seBurst.tw
+++ b/src/pregmod/seBurst.tw
@@ -5,14 +5,16 @@
 <<for _b = 0; _b < $slaves.length; _b++>>
 <<if $slaves[_b].burst == 1>>
 
-<<if $slaves[_b].inflation != 0>>
-<<pop $slaves[_b]>>
-<</if>>
+	<<if (($slaves[_b].belly > ($slaves[$i].pregAdaptation*3200)) || $slaves[$i].bellyPreg > 600000)>>
+		$slaves[_b].slaveName's straining womb finally gave out and burst, taking $his life and that of $his children. //Placeholder//
+	<<elseif $slaves[_b].inflation != 0>>
+		<<pop $slaves[_b]>>
+	<</if>>
 
-<<set $activeSlave = $slaves[_b]>>
-<<include "Remove activeSlave">>
+	<<set $activeSlave = $slaves[_b]>>
+	<<include "Remove activeSlave">>
 
-<br><br><hr style="margin:0"><br>
+	<br><br><hr style="margin:0"><br>
 <</if>>
 <</for>>
 
diff --git a/src/uncategorized/PETS.tw b/src/uncategorized/PETS.tw
index 97b0f8bdb51..57c9a5400f2 100644
--- a/src/uncategorized/PETS.tw
+++ b/src/uncategorized/PETS.tw
@@ -337,7 +337,7 @@ You decide to knit up care's raveled sleave with a break in the spa. You have yo
 	<<replace "#result">>
 	You silently interrupt $activeSlave.slaveName and indicate that $he should sit down on the cell's bed without letting $subSlave.slaveName's head out from between $his legs. $He sits down with a thump, dragging the struggling $subSlave.slaveName with $him. You<<if ($PC.dick == 0)>> pull on a strap-on, and then<</if>> seize $subSlave.slaveName's hips and hoist them into the air, giving _him2 a horrible second of anticipation as you manhandle <<if ($PC.dick == 0)>>the cruelly large phallus<<else>>your cock<</if>> into place. _He2 gives a strangled squeal of protest at the feeling of you pushing your way inexorably up _his2 poor pussy, making $activeSlave.slaveName jerk with surprise at the sensation of $subSlave.slaveName howling into $his crotch. Twenty minutes later, you and $activeSlave.slaveName leave _him2 @@.hotpink;quiescent@@ on the floor of the cell. After $he locks the door after $himself, $activeSlave.slaveName can't resist the urge to @@.hotpink;offer you a cheerful high-five.@@
 	<<set $activeSlave.devotion += 10, $activeSlave.oralCount += 1, $oralTotal += 1>>
-	<<set $subSlave.devotion += 4, $subSlave.oralCount += 2, $oralTotal += 2, $subSlave.vaginaCount += 1, $vaginalTotal += 1>>
+	<<set $subSlave.devotion += 4, $subSlave.oralCount += 2, $oralTotal += 2, $subSlave.vaginalCount += 1, $vaginalTotal += 1>>
 	<<set $slaves[$slaveIndices[$subSlave.ID]] = $subSlave>>
 	<</replace>>
 <</link>>
diff --git a/src/uncategorized/dispensary.tw b/src/uncategorized/dispensary.tw
index a0228b05feb..593178e9428 100644
--- a/src/uncategorized/dispensary.tw
+++ b/src/uncategorized/dispensary.tw
@@ -415,7 +415,7 @@ Fertility Focused Pharmacology
 		<br>
 	<</if>>
 <<else>>
-	//You lack the experience required to contact underground research labs to develop methods for controlling pregnancy progress.//
+	//You lack the experience handling pregnant slaves required to convince underground research labs to do business with you in the development of controlled fetal development.//
 	<br>
 <</if>>
 
diff --git a/src/uncategorized/reBusyMasterSuite.tw b/src/uncategorized/reBusyMasterSuite.tw
index 6fb9800e4c7..65e20b11ed9 100644
--- a/src/uncategorized/reBusyMasterSuite.tw
+++ b/src/uncategorized/reBusyMasterSuite.tw
@@ -125,10 +125,10 @@ who has paused her thrusting to issue a peremptory order to the slaves to stay w
 	$Concubine.slaveName anticipates you, and is already sliding herself partway out of <<print $slaves[_msIdx[$i]].slaveName>> and cocking her hips to spread her <<if ($Concubine.vagina > 5)>>huge<<elseif ($Concubine.vagina > 2)>>healthy<<else>>trim<</if>> pussy as wide as she can without disentangling herself from the pussy train. Up on the bed she's at just the right height, and she winks her <<if ($Concubine.vagina > 2)>>loose pussy<<elseif ($Concubine.vagina > 1)>>pussy<<else>>tight little pussy<</if>> invitingly<<if canTalk($Concubine)>>, laughing at the sheer decadence of it<</if>>. <<if ($PC.dick == 0)>>You pull on a strap-on and push it<<else>>You push yourself<</if>> home with some force, your concubine's extreme state of arousal leaving her pussy very relaxed and welcoming; the thrust shoves her forward to hilt herself in <<print $slaves[_msIdx[$i]].slaveName>>, and so on down the line, producing more giggling, some squealing, and much scrabbling for balance. It takes a while to find the rhythm, and while you wait for the inevitable tangles to be fixed you decide to challenge yourself. You reach around and <<if ($Concubine.boobs > 1000)>>heft $Concubine.slaveName's heavy boobs<<elseif ($Concubine.boobs > 300)>>tease $Concubine.slaveName's healthy breasts<<else>>massage $Concubine.slaveName's flat chest<</if>>, nibbling her $Concubine.skin neck, and generally torturing her with stimulation until she climaxes to her beloved <<if $PC.title == 1>>master<<else>>mistress<</if>>. When she does, you extract yourself and pull her unceremoniously off <<print $slaves[_msIdx[$i]].slaveName>>, replacing her up <<print $slaves[_msIdx[$i]].slaveName>>'s pussy. You work your way down the line, orgasm by orgasm, delaying your own climax until the exhausted <<print $slaves[_msIdx[0]].slaveName>> manages a pussy orgasm by heroic efforts, and you're done. As you roll off her, panting, there is scattered applause and much congratulation from your harem of @@.mediumaquamarine;trusting pussyslaves.@@
 	<<for $i = 0; $i < $slaves.length; $i++>>
 		<<if $slaves[$i].ID == $Concubine.ID>>
-			<<set $slaves[$i].trust += 1, $slaves[$i].vaginaCount += 1, $vaginaTotal += 1>>
+			<<set $slaves[$i].trust += 1, $slaves[$i].vaginalCount += 1, $vaginalTotal += 1>>
 		<<elseif $slaves[$i].assignment == "serve in the master suite">>
 			<<if $slaves[$i].vagina > 0>>
-				<<set $slaves[$i].trust += 1, $slaves[$i].vaginaCount += 1, $vaginaTotal += 1>>
+				<<set $slaves[$i].trust += 1, $slaves[$i].vaginalCount += 1, $vaginalTotal += 1>>
 			<<else>>
 				<<set $slaves[$i].trust += 1, $slaves[$i].oralCount += 1, $oralTotal += 1>>
 			<</if>>
diff --git a/src/uncategorized/recETSWorkaround.tw b/src/uncategorized/recETSWorkaround.tw
index 0429b07c218..17f73bd7e7d 100644
--- a/src/uncategorized/recETSWorkaround.tw
+++ b/src/uncategorized/recETSWorkaround.tw
@@ -215,6 +215,8 @@ The daughter cheers happily and hugs her relieved father. He leans in and kisses
 <<set $activeSlave.scrotum = 0>>
 <<set $activeSlave.clit = 1>>
 <<set $activeSlave.prostate = 0>>
+<<set $activeSlave.voice = 2>>
+<<set $activeSlave.face = "cute">>
 <<set $activeSlave.vaginalSkill = 50>>
 <<set $activeSlave.boobs = (random(3,6)*100)>>
 <<set $activeSlave.pregType = 1>>
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index 07a00e04b94..efdbc84186c 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -8161,7 +8161,47 @@
 				<<set $slaves[$i].labor = 1, $slaves[$i].prematureBirth = 1, $birthee = 1>>
 				<<set _miscarriage = 1>>
 			<<else>>
-				miscarriage
+				$His overwhelmed body has @@.orange;forced $him to miscarry,@@ possibly saving $his life.
+				<<if lastPregRule($slaves[$i],$defaultRules)>><<set $slaves[$i].preg = -1>><<else>><<set $slaves[$i].preg = 0>><</if>>
+				<<if $slaves[$i].reservedChildren > 0>><<set $reservedChildren -= $slaves[$i].reservedChildren>><<set $slaves[$i].reservedChildren = 0>><</if>>
+				<<if $slaves[$i].reservedChildrenNursery > 0>><<set $reservedChildrenNursery -= $slaves[$i].reservedChildrenNursery>><<set $slaves[$i].reservedChildrenNursery = 0>><</if>>
+				<<if $slaves[$i].fuckdoll == 0 && $slaves[$i].fetish != "mindbroken">>
+					<<if $slaves[$i].sexualFlaw == "breeder">>
+						$He is @@.mediumorchid;filled with violent, all-consuming hatred@@ at $himself for failing to carry to term and you for allowing this to happen.
+						<<if $slaves[$i].pregCount > 4>>
+							The loss of so many children at once @@.red;shatters the distraught breeder's mind.@@
+							<<set $slaves[$i].fetish = "mindbroken", $slaves[$i].behavioralQuirk = "none", $slaves[$i].behavioralFlaw = "none", $slaves[$i].sexualQuirk = "none", $slaves[$i].sexualFlaw = "none", $slaves[$i].devotion = 0, $slaves[$i].trust = 0>>
+						<<else>>
+							$He cares little for what punishment awaits for $his actions.
+							<<set $slaves[$i].devotion -= 25*$slaves[$i].pregCount>>
+						<</if>>
+					<<elseif $slaves[$i].devotion < -50>>
+						$He is @@.mediumorchid;filled with violent, consuming hatred@@ and @@.gold;fear.@@ Even though $he knew $his bab<<if $slaves[$i].pregType > 1>>ies were<<else>>y was<</if>> likely destined for a slave orphanage, it seems $he cared for <<if $slaves[$i].pregType > 1>>them<<else>>it<</if>> and blames you for the loss.
+						<<set $slaves[$i].devotion -= 25, $slaves[$i].trust -= 25>>
+					<<elseif $slaves[$i].devotion < -20>>
+						$He is @@.mediumorchid;afflicted by desperate, inconsolable grief@@ and @@.gold;horror.@@ Even though $he knew $his bab<<if $slaves[$i].pregType > 1>>ies were<<else>>y was<</if>> likely destined for a slave orphanage, it seems $he cared for <<if $slaves[$i].pregType > 1>>them<<else>>it<</if>>.
+						<<set $slaves[$i].devotion -= 10, $slaves[$i].trust -= 20>>
+					<<elseif $slaves[$i].fetish == "pregnancy">>
+						$He is @@.mediumorchid;filled with deep regret@@ and @@.gold;fear.@@
+						<<if $slaves[$i].fetishKnown == 1>>
+							To a pregnancy fetishest, ending it like this hurts far worse than birth ever would.
+						<<else>>
+							It appears $he was more attached to $his baby bump than $he let on and is hurting even more for it.
+						<</if>>
+						<<set _fetishModifier = $slaves[$i].fetishStrength/2>>
+						<<set $slaves[$i].devotion -= 1*_fetishModifier, $slaves[$i].trust -= 1*_fetishModifier>>
+					<<elseif $slaves[$i].devotion <= 20>>
+						$He is @@.mediumorchid;consumed by enduring sorrow@@ and @@.gold;horror.@@ Even though $he knew $his bab<<if $slaves[$i].pregType > 1>>ies were<<else>>y was<</if>> likely destined for a slave orphanage, it seems $he cared for <<if $slaves[$i].pregType > 1>>them<<else>>it<</if>>.
+						<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
+					<<elseif $slaves[$i].devotion <= 50>>
+						$He is dully obedient. $He has been broken to slave life so thoroughly that even this is neither surprising nor affecting.
+					<<else>>
+						$He is @@.mediumorchid;disappointed by this development@@ and @@.gold;afraid@@ of your reaction. By failing to carry to term, $he has failed your will.
+						<<set $slaves[$i].devotion -= 10, $slaves[$i].trust -= 10>>
+					<</if>>
+				<</if>>
+				<<set $slaves[$i].pregType = 0, WombFlush($slaves[$i]), $slaves[$i].pregKnown = 0, $slaves[$i].pregWeek = -4>>
+				<<run SetBellySize($slaves[$i])>>
 				<<set _miscarriage = 1>>
 			<</if>>
 		<</if>>
@@ -8189,7 +8229,7 @@
 		<</if>>
 		<<set _burstChance = Math.round(_burstChance)>>
 		<<if _burstChance > random(0,100)>>
-			slave pops
+			<<set $slaves[$i].burst = 1>>
 		<</if>>
 	<</if>>
 <</if>>
diff --git a/src/utility/descriptionWidgetsStyle.tw b/src/utility/descriptionWidgetsStyle.tw
index b28fdf86e58..ac37c2d31f8 100644
--- a/src/utility/descriptionWidgetsStyle.tw
+++ b/src/utility/descriptionWidgetsStyle.tw
@@ -1817,10 +1817,6 @@ $His
 			is in a long ponytail and is kept out of $his face by a couple of bone hairpins.		
 		<<case "kitty lingerie">>
 			is in a long ponytail and is in a long ponytail, and topped by a cat ear headband.
-		<<default>>
-			is in a long ponytail and is in a long ponytail.
-		<<case "kitty lingerie">>
-			is in a ponytail that almost reaches the ground, and topped by a cat ear headband.
 		<<default>>
 			is in a ponytail that almost reaches the ground.
 		<</switch>>
-- 
GitLab