From 724f8769a89ac736360dec341a96ca29f8357bc9 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sun, 16 Sep 2018 22:19:10 -0400
Subject: [PATCH] enema rules

---
 devNotes/twine JS.txt           | 10 +++++
 src/js/DefaultRules.tw          | 40 +++++++++++++++++
 src/js/rulesAssistant.tw        |  1 +
 src/js/rulesAssistantOptions.tw | 23 ++++++++++
 src/pregmod/saInflation.tw      | 41 +++++++++++-------
 src/uncategorized/sellSlave.tw  | 76 ++++++++++++++++++++++++---------
 src/utility/assayWidgets.tw     | 16 ++++---
 7 files changed, 163 insertions(+), 44 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index dc7a4059f5b..2af5a8e0037 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -12084,6 +12084,16 @@ window.HSM = function() {
 		return .75;
 	}
 	
+	window.TierTwoUnlockCalc = function() {
+		const V = State.variables;
+		if (V.securityForceInfantryPower > 5) V.securityForceInfantryPower = 5;
+		if (V.securityForceArcologyUpgrades > 5) V.securityForceArcologyUpgrades = 5;
+		if (V.securityForceVehiclePower > 5) V.securityForceVehiclePower = 5;
+		if (V.securityForceDronePower > 5) V.securityForceDronePower = 5;
+		if (V.securityForceStimulantPower > 5) V.securityForceStimulantPower = 5;
+		if (V.securityForceAircraftPower > 5) V.securityForceAircraftPower = 5;
+	}
+	
 /*:: colorModeJS [script]*/
 
 window.flipColors = function (lightColorMap){
diff --git a/src/js/DefaultRules.tw b/src/js/DefaultRules.tw
index 64fb8263a95..9b4e5a72f25 100644
--- a/src/js/DefaultRules.tw
+++ b/src/js/DefaultRules.tw
@@ -32,6 +32,7 @@ window.DefaultRules = (function() {
 			ProcessContraceptives(slave, rule);
 		ProcessOtherDrugs(slave, rule);
 		ProcessAssetGrowthDrugs(slave, rule);
+		ProcessEnema(slave, rule);
 		ProcessDiet(slave, rule);
 		ProcessCuratives(slave, rule);
 		ProcessAphrodisiacs(slave, rule);
@@ -1319,6 +1320,45 @@ window.DefaultRules = (function() {
 		}
 	}
 
+	function ProcessEnema(slave, rule) {
+		if ((rule.inflationType !== undefined) && (rule.inflationType !== "no default setting")) {
+			if (slave.inflationType !== rule.inflationType) {
+				if ((slave.inflationType === "curative" && slave.health > 90) || (slave.inflationType === "curative" && slave.anus <= 1 && slave.vagina <= 1)) {
+					r += `<br>${slave.slaveName} cannot benefit from her assigned enema and has been defaulted to none.`;
+					slave.inflation = 0;
+					slave.inflationType = "none";
+					slave.inflationMethod = 0;
+					slave.milkSource = 0;
+					slave.cumSource = 0;
+					SetBellySize(slave);
+				} else {
+					r += `<br>${slave.slaveName}'s current enema regimen has been set to ${slave.inflationType}.`;
+					slave.inflation = 1;
+					slave.inflationType = rule.inflationType;
+					slave.inflationMethod = 2;
+					slave.milkSource = 0;
+					slave.cumSource = 0;
+					SetBellySize(slave);
+				}
+			}
+			if (slave.inflationType !== "none" && slave.inflation > 1 && slave.health < -50) {
+				r += `<br>${slave.slaveName}'s current enema regimen risks death, so it has been reduced to a less threatening level.`;
+				slave.inflation = 1;
+				SetBellySize(slave);
+			} else if (slave.inflation > 1 && (slave.bellyPreg >= 1500 || slave.bellyImplant >= 1500)) {
+				r += `<br>${slave.slaveName}'s current enema is too much for her body, so it has been reduced.`;
+				slave.inflation = 1;
+				SetBellySize(slave);
+			} else if (slave.inflationType === "none") {
+				slave.inflation = 0;
+				slave.inflationMethod = 0;
+				slave.milkSource = 0;
+				slave.cumSource = 0;
+				SetBellySize(slave);
+			}
+		}
+	}
+
 	function ProcessDiet(slave, rule) {
 		// Diet Setting 
 		if (rule.diet !== undefined && rule.diet !== "no default setting") {
diff --git a/src/js/rulesAssistant.tw b/src/js/rulesAssistant.tw
index 1c74b120d59..39362e97c8a 100644
--- a/src/js/rulesAssistant.tw
+++ b/src/js/rulesAssistant.tw
@@ -297,6 +297,7 @@ window.emptyDefaultRule = function emptyDefaultRule() {
 			label: "no default setting",
 			removeLabel: "no default setting",
 			skinColor: "no default setting",
+			inflationType: "no default setting",
 		}
 	};
 	return rule;
diff --git a/src/js/rulesAssistantOptions.tw b/src/js/rulesAssistantOptions.tw
index a60abec4881..768df1b3b5b 100644
--- a/src/js/rulesAssistantOptions.tw
+++ b/src/js/rulesAssistantOptions.tw
@@ -936,6 +936,9 @@ window.rulesAssistantOptions = (function() {
 			this.appendChild(new ShemaleHormonesList());
 			this.appendChild(new GeldingHormonesList());
 			this.appendChild(new OtherDrugsList());
+			if (V.enema === 1) {
+				this.appendChild(new EnemaList());
+			}
 			this.appendChild(new DietList());
 			this.appendChild(new DietGrowthList());
 			this.appendChild(new DietBaseList());
@@ -1678,6 +1681,26 @@ window.rulesAssistantOptions = (function() {
 		}
 	}
 
+	class EnemaList extends List {
+		constructor() {
+			const enemas = [
+				["No default setting", "no default setting"],
+				["None", "none"],
+				["Water", "water"]
+			];
+			if (V.medicalEnema === 1) {
+				enemas.push(
+				["Aphrodisiac", "aphrodisiac"],
+				["Curative", "curative"],
+				["Tightener", "tightener"]
+				);
+			}
+			super("Enemas", enemas);
+			this.setValue(current_rule.set.inflationType);
+			this.onchange = (value) => current_rule.set.inflationType = value;
+		}
+	}
+
 	class DietList extends List {
 		constructor() {
 			const diets = [
diff --git a/src/pregmod/saInflation.tw b/src/pregmod/saInflation.tw
index 7d5da969f9c..38f05f4c0b7 100644
--- a/src/pregmod/saInflation.tw
+++ b/src/pregmod/saInflation.tw
@@ -4,7 +4,16 @@
 	<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].milkSource = 0, SetBellySize($slaves[$i])>>
 <<elseif $slaves[$i].bellyImplant >= 1500>>
 	<<if $slaves[$i].inflation > 1>>
-		Due to the mounting pressure from $his filled abdominal implant, $he can no longer fill herself as large as $he used to.
+		Due to the mounting pressure from $his filled abdominal implant, $he can no longer fill $himself as large as $he used to.
+		<<set $slaves[$i].inflation = 1>>
+		<<run SetBellySize($slaves[$i])>>
+	<<else>>
+		<<set $slaves[$i].bellyFluid = 2000>>
+		<<run SetBellySize($slaves[$i])>>
+	<</if>>
+<<elseif $slaves[$i].bellyPreg >= 1500>>
+	<<if $slaves[$i].inflation > 1>>
+		Due to the mounting pressure from $his growing pregnancy, $he can no longer fill $himself as large as $he used to.
 		<<set $slaves[$i].inflation = 1>>
 		<<run SetBellySize($slaves[$i])>>
 	<<else>>
@@ -16,7 +25,7 @@
 <<switch $slaves[$i].inflationType>>
 <<case "water">>
 	<<if $slaves[$i].inflation == 3>>
-		$He makes sure to fill $his rear with nearly two gallons of water, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps herself @@.red;painfully full@@ for you.
+		$He makes sure to fill $his rear with nearly two gallons of water, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps $himself @@.red;painfully full@@ for you.
 		<<set $slaves[$i].health -= 10>>
 	<<elseif $slaves[$i].inflation == 2>>
 		$He makes sure to fill $his rear with nearly four liters of water, leaving $him looking pregnant, whenever $he leaks or needs to release $his load. $He is full enough to be distended but not enough to grow taut.
@@ -26,7 +35,7 @@
 
 <<case "aphrodisiac">>
 	<<if $slaves[$i].inflation == 3>>
-		$He makes sure to fill $his rear with nearly two gallons of a curative solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps herself @@.red;painfully full@@ for you, though $he barely notices it over $his horniness. While having $his body packed full of aphrodisiacs doesn't make $him additionally submissive, it does amplify the effects of them. $His aphrodisiac bursting belly
+		$He makes sure to fill $his rear with nearly two gallons of a curative solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps $himself @@.red;painfully full@@ for you, though $he barely notices it over $his horniness. While having $his body packed full of aphrodisiacs doesn't make $him additionally submissive, it does amplify the effects of them. $His aphrodisiac bursting belly
 		<<set $slaves[$i].health -= 10>>
 	<<elseif $slaves[$i].inflation == 2>>
 		$He makes sure to fill $his rear with nearly four liters of an aphrodisiac solution, leaving $him looking pregnant, whenever $he leaks or $his body absorbs too much. $He is full enough to be distended but not enough to grow taut. While having $his body bloated with aphrodisiacs doesn't make $him additionally submissive, it does amplify the effects of them. $His overfilled aphrodisiac belly
@@ -62,7 +71,7 @@
 
 <<case "curative">>
 	<<if $slaves[$i].inflation == 3>>
-		$He makes sure to fill $his rear with nearly two gallons of a curative solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps herself full for you; the curatives in $his gut keeping $him healthy despite the pain.
+		$He makes sure to fill $his rear with nearly two gallons of a curative solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps $himself full for you; the curatives in $his gut keeping $him healthy despite the pain.
 		<<if (($slaves[$i].assignment == "rest") || ($slaves[$i].assignment == "rest in the spa")) && ($slaves[$i].fetish != "mindbroken")>>
 			The curative enema $he's on synergize with rest, keeping $him asleep most of the time. This is an @@.green;extremely effective health treatment,@@ though being filled to $his limit doesn't hasten $his recovery at all; it's just perverted.
 			<<set $slaves[$i].health += 4>>
@@ -110,7 +119,7 @@
 
 <<case "tightener">>
 	<<if $slaves[$i].inflation == 3>>
-		$He makes sure to fill $his rear with nearly two gallons of tightening solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps herself @@.red;painfully full@@ for you.
+		$He makes sure to fill $his rear with nearly two gallons of tightening solution, leaving $him looking ready to burst, whenever $he leaks or $his body absorbs too much. $He keeps $himself @@.red;painfully full@@ for you.
 		<<set $slaves[$i].health -= 10>>
 		<<if $slaves[$i].anus > 1>>
 			The solution slowly tightens $his anus while inside $his bowels. Being filled to $his limit with the solution does not make it tighten any better or faster; it's just perverted.
@@ -278,19 +287,19 @@
 				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
 				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
 			<<elseif $slaves[$i].inflation == 3>>
-				Throughout the week, $he makes sure to keep herself filled with nearly two gallons of milk, leaving $him looking ready to burst. $He keeps herself @@.red;painfully full@@ for you.
+				Throughout the week, $he makes sure to keep $himself filled with nearly two gallons of milk, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
 				<<set $slaves[$i].health -= 10>>
 			<<elseif $slaves[$i].inflation == 2>>
-				Throughout the week, $he makes sure to keep herself filled with nearly four liters of milk, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
+				Throughout the week, $he makes sure to keep $himself filled with nearly four liters of milk, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
 			<<elseif $slaves[$i].inflation == 1>>
-				Throughout the week, $he makes sure to keep herself filled with nearly two liters of milk, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
+				Throughout the week, $he makes sure to keep $himself filled with nearly two liters of milk, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
 			<</if>>
 		<<elseif $slaves[$i].inflationMethod == 2>>
 			<<if ($dairySlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
 				You no longer have a functional dairy. @@.yellow;$His inflation regimen has been ended.@@
 				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
 			<<elseif $slaves[$i].inflation == 3>>
-				Throughout the week, $he makes sure to fill $his rear with nearly two gallons of milk, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps herself @@.red;painfully full@@ for you.
+				Throughout the week, $he makes sure to fill $his rear with nearly two gallons of milk, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps $himself @@.red;painfully full@@ for you.
 				<<set $slaves[$i].health -= 10>>
 			<<elseif $slaves[$i].inflation == 2>>
 				Throughout the week, $he makes sure to fill $his rear with nearly four liters of milk, leaving $him looking pregnant, whenever $he leaks or needs to release $his load. $He is full enough to be distended but not enough to grow taut.
@@ -303,7 +312,7 @@
 				$slaves[_saf].slaveName is no longer lactating and thus can no longer keep $slaves[$i].slaveName filled with milk. @@.yellow;$His inflation regimen has been ended.@@
 				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].milkSource = 0, SetBellySize($slaves[$i])>>
 			<<elseif $slaves[$i].inflation == 3>>
-				Throughout the week, $he makes sure keep suckling from $slaves[_saf].slaveName until $he is filled with nearly two gallons of milk, leaving $him looking ready to give birth. $He keeps herself @@.red;painfully full@@ for you.
+				Throughout the week, $he makes sure keep suckling from $slaves[_saf].slaveName until $he is filled with nearly two gallons of milk, leaving $him looking ready to give birth. $He keeps $himself @@.red;painfully full@@ for you.
 				<<set $slaves[$i].health -= 10>>
 			<<elseif $slaves[$i].inflation == 2>>
 				Throughout the week, $he makes sure keep suckling from $slaves[_saf].slaveName until $he is filled with nearly four liters of milk, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
@@ -410,19 +419,19 @@
 				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
 				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
 			<<elseif $slaves[$i].inflation == 3>>
-				Throughout the week, $he makes sure to keep herself filled with nearly two gallons of cum, leaving $him looking ready to burst. $He keeps herself @@.red;painfully full@@ for you.
+				Throughout the week, $he makes sure to keep $himself filled with nearly two gallons of cum, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
 				<<set $slaves[$i].health -= 10>>
 			<<elseif $slaves[$i].inflation == 2>>
-				Throughout the week, $he makes sure to keep herself filled with nearly four liters of cum, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
+				Throughout the week, $he makes sure to keep $himself filled with nearly four liters of cum, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
 			<<elseif $slaves[$i].inflation == 1>>
-				Throughout the week, $he makes sure to keep herself filled with nearly two liters of cum, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
+				Throughout the week, $he makes sure to keep $himself filled with nearly two liters of cum, leaving $his belly noticeably distended. $He is full enough to be swollen but not enough to visibly jiggle.
 			<</if>>
 		<<elseif $slaves[$i].inflationMethod == 2>>
 			<<if ($dairySlaves == 0 || $cumSlaves == 0 || $dairy == 0) && $arcologies[0].FSPastoralistLaw != 1>>
 				You no longer have a functional cum dairy. @@.yellow;$His inflation regimen has been ended.@@
 				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, SetBellySize($slaves[$i])>>
 			<<elseif $slaves[$i].inflation == 3>>
-				Throughout the week, $he makes sure to fill $his rear with nearly two gallons of cum, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps herself @@.red;painfully full@@ for you.
+				Throughout the week, $he makes sure to fill $his rear with nearly two gallons of cum, leaving $him looking ready to burst, whenever $he leaks or needs to release $his load. $He keeps $himself @@.red;painfully full@@ for you.
 				<<set $slaves[$i].health -= 10>>
 			<<elseif $slaves[$i].inflation == 2>>
 				Throughout the week, $he makes sure to fill $his rear with nearly four liters of cum, leaving $him looking pregnant, whenever $he leaks or needs to release $his load. $He is full enough to be distended but not enough to grow taut.
@@ -435,7 +444,7 @@
 					$slaves[$j].slaveName has no longer has testicles and thus can no longer keep $slaves[$i].slaveName filled with cum. @@.yellow;$His inflation regimen has been ended.@@
 				<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].cumSource = 0, SetBellySize($slaves[$i])>>
 			<<elseif $slaves[$i].inflation == 3>>
-				Throughout the week, $he makes sure keep sucking $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $he is filled with nearly two gallons of cum, leaving $him looking ready to burst. $He keeps herself @@.red;painfully full@@ for you.
+				Throughout the week, $he makes sure keep sucking $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $he is filled with nearly two gallons of cum, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
 				<<set $slaves[$i].health -= 10>>
 			<<elseif $slaves[$i].inflation == 2>>
 				Throughout the week, $he makes sure keep sucking $slaves[_saf].slaveName's <<if $slaves[_saf].dick > 0>>cock<<else>>cum hole<</if>> until $he is filled with nearly four liters of cum, leaving $him looking pregnant. $He is full enough to be distended but not enough to grow taut.
@@ -470,7 +479,7 @@
 		<</if>>
 	<<else>>
 		<<if $slaves[$i].inflation == 3>>
-			Throughout the week, $he makes sure to binge eat until $his gut is stuffed with nearly two gallons of slave food, leaving $him looking ready to burst. $He keeps herself @@.red;painfully full@@ for you.
+			Throughout the week, $he makes sure to binge eat until $his gut is stuffed with nearly two gallons of slave food, leaving $him looking ready to burst. $He keeps $himself @@.red;painfully full@@ for you.
 			<<set $slaves[$i].health -= 10>>
 		<<elseif $slaves[$i].inflation == 2>>
 			Throughout the week, $he makes sure to binge eat until $his gut is filled with nearly four liters of slave food, giving $him quite the food baby. $He is full enough to be distended but not enough to grow taut.
diff --git a/src/uncategorized/sellSlave.tw b/src/uncategorized/sellSlave.tw
index e1d3804f019..4efe0513acd 100644
--- a/src/uncategorized/sellSlave.tw
+++ b/src/uncategorized/sellSlave.tw
@@ -464,40 +464,74 @@ A reputable slave appraiser arrives promptly to inspect $him and certify $his qu
 
 <<if $activeSlave.devotion > 95>>
 	$His worshipfulness is a major positive
+	<<set _trustPositive = 1>>
 <<elseif $activeSlave.devotion > 50>>
 	$His devotion is a significant positive
+	<<set _trustPositive = 1>>
 <<elseif $activeSlave.devotion > 20>>
 	$His acceptance of slavery is a minor positive
+	<<set _trustPositive = 1>>
 <<elseif $activeSlave.devotion >= -20>>
 	$His acceptance of slavery is equivocal
+	<<set _trustPositive = 0>>
 <<elseif $activeSlave.devotion >= -50>>
 	$His resistance to slavery is a minor negative
+	<<set _trustPositive = 0>>
 <<elseif $activeSlave.devotion >= -75>>
 	$His hatred of slavery is a significant negative
+	<<set _trustPositive = -1>>
 <<else>>
 	$His rebelliousness is a major negative
-<</if>>
-<<if $activeSlave.devotion >= -20 && $activeSlave.devotion <= 20 && $activeSlave.trust <= 20 && $activeSlave.trust > -20>>
-	but
-<<elseif ($activeSlave.trust > 20 && $activeSlave.devotion > 20) || ($activeSlave.trust < -20 && $activeSlave.devotion < -20)>>
-	and
-<<else>>
-	but
-<</if>>
-<<if $activeSlave.trust > 95>>
-	$his powerful trust is a major positive.
-<<elseif $activeSlave.trust > 50>>
-	$his trust is a significant positive.
-<<elseif $activeSlave.trust > 20>>
-	$his carefulness is a minor positive.
-<<elseif $activeSlave.trust >= -20>>
-	$his fearfulness is equivocal.
-<<elseif $activeSlave.trust >= -50>>
-	$his fear is a minor negative.
-<<elseif $activeSlave.devotion >= -90>>
-	$his terrified state is a significant negative.
+	<<set _trustPositive = -1>>
+<</if>>
+<<if _trustPositive == 1>>
+	<<if $activeSlave.trust > 95>>
+		and $his powerful trust is a major positive.
+	<<elseif $activeSlave.trust > 50>>
+		and $his trust is a significant positive.
+	<<elseif $activeSlave.trust > 20>>
+		and $his carefulness is a minor positive.
+	<<elseif $activeSlave.trust >= -20>>
+		and $his fearfulness is equivocal.
+	<<elseif $activeSlave.trust >= -50>>
+		but $his fear is a minor negative.
+	<<elseif $activeSlave.devotion >= -90>>
+		but $his terrified state is a significant negative.
+	<<else>>
+		but $his abjectly terrified state is a major negative.
+	<</if>>
+<<elseif _trustPositive == 0>>
+	<<if $activeSlave.trust > 95>>
+		but $his powerful trust is worrisome.
+	<<elseif $activeSlave.trust > 50>>
+		but $his trust is a little out of place.
+	<<elseif $activeSlave.trust > 20>>
+		and $his carefulness is a minor positive.
+	<<elseif $activeSlave.trust >= -20>>
+		and $his fearfulness is useful.
+	<<elseif $activeSlave.trust >= -50>>
+		and $his fear is useful.
+	<<elseif $activeSlave.devotion >= -90>>
+		but $his terrified state will aid in fully breaking $him.
+	<<else>>
+		but $his abjectly terrified state will make it easy to break $him.
+	<</if>>
 <<else>>
-	$his abjectly terrified state is a major negative.
+	<<if $activeSlave.trust > 95>>
+		and $his powerful trust is a problem.
+	<<elseif $activeSlave.trust > 50>>
+		and $his trust is troublesome.
+	<<elseif $activeSlave.trust > 20>>
+		and $his carefulness is bad sign.
+	<<elseif $activeSlave.trust >= -20>>
+		btu $his fearfulness is useful.
+	<<elseif $activeSlave.trust >= -50>>
+		but $his fear is useful.
+	<<elseif $activeSlave.devotion >= -90>>
+		but $his terrified state will aid in fully breaking $him.
+	<<else>>
+		but $his abjectly terrified state will make it easy to break $him.
+	<</if>>
 <</if>>
 
 <<if $activeSlave.brand != 0>>
diff --git a/src/utility/assayWidgets.tw b/src/utility/assayWidgets.tw
index 8c8ce255846..d9e5fdbff92 100644
--- a/src/utility/assayWidgets.tw
+++ b/src/utility/assayWidgets.tw
@@ -1385,15 +1385,17 @@
 		<<set _slaveMultiplier += $args[0].trust/200>>
 	<</if>>
 <<else>>
-<<set _slaveMultiplier += $args[0].devotion/200>>
-<<if $args[0].devotion <= 50>>
-	<<set _slaveMultiplier += $args[0].trust/200>>
-<<else>>
-	<<if $args[0].trust > 0>>
-		<<set _slaveMultiplier += $args[0].trust/200>>
+	<<set _slaveMultiplier += $args[0].devotion/200>>
+	<<if $args[0].devotion < -20>>
+		<<if $args[0].trust > 0>>
+			<<set _slaveMultiplier -= $args[0].trust/200>>
+		<</if>>
+	<<else>>
+		<<if $args[0].trust > 0>>
+			<<set _slaveMultiplier += $args[0].trust/200>>
+		<</if>>
 	<</if>>
 <</if>>
-<</if>>
 
 <<if $args[0].brand != 0>>
 	<<if $rep > 10000>>
-- 
GitLab