From 2f950bf75685ecce0e0bac0b9a936f7a77bcfcf3 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Fri, 13 Dec 2019 17:24:22 -0500
Subject: [PATCH] better def checks

---
 src/uncategorized/RESS.tw            | 2 ++
 src/uncategorized/ptWorkaround.tw    | 6 +++++-
 src/uncategorized/saRelationships.tw | 6 +++++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index 5bcd5f755f4..bc2c7eabd0c 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -15505,6 +15505,8 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 	<<if $activeSlave.relationship == -3>>
 		<<if def $activeSlave.kindness>>
 			<<set $activeSlave.kindness += 2>>
+		<<else>
+			<<set $activeSlave.kindness = 2>>
 		<</if>>
 	<</if>>
 <</link>>
diff --git a/src/uncategorized/ptWorkaround.tw b/src/uncategorized/ptWorkaround.tw
index d793cad0564..2c68ad25dc3 100644
--- a/src/uncategorized/ptWorkaround.tw
+++ b/src/uncategorized/ptWorkaround.tw
@@ -90,7 +90,11 @@
 <<case "look after her">>
 	<<if $activeSlave.relationship == -3 && $activeSlave.fetish == "mindbroken">>
 		Since $activeSlave.slaveName is your $wife and not all there, you keep $him under a watchful eye to make sure no harm comes to the broken $girl. $He almost seems in better spirits under your care, not that it will matter in an hour or two.
-		<<set $activeSlave.kindness++>>
+		<<if def $activeSlave.kindness>>
+			<<set $activeSlave.kindness++>>
+		<<else>>
+			<<set $activeSlave.kindness = 1>>
+		<</if>>
 	<</if>>
 	<<if ($activeSlave.health < 100)>>
 		Your close and expert attention improves $his health in a way drug treatment or mere medical intervention cannot. @@.green;$His health has improved.@@
diff --git a/src/uncategorized/saRelationships.tw b/src/uncategorized/saRelationships.tw
index 080792d3c83..b49c1168c70 100644
--- a/src/uncategorized/saRelationships.tw
+++ b/src/uncategorized/saRelationships.tw
@@ -858,7 +858,11 @@
 						<<switch _SlaveI.assignment>>
 						<<case "be a servant" "work as a servant" "serve in the master suite" "please you" "be your Concubine">>
 							$He lives a nice life by your side, despite $his inability to realize it. Since $he is so malleable and willing, you rarely have reason to punish $him anymore.
-							<<set _SlaveI.kindness += 2>>
+							<<if def _SlaveI.kindness>>
+								<<set _SlaveI.kindness += 2>>
+							<<else>>
+								<<set _SlaveI.kindness = 2>>
+							<</if>>
 						<<case "whore" "work in the brothel" "serve the public" "serve in the club" "work a glory hole" "be confined in the arcade">>
 							You, others, it doesn't matter. They are all the same to your mindbroken $wife. The public, however, is less forgiving of you ordering your slave $wife to fuck random citizens, @@.red;seriously damaging your reputation.@@
 							<<run repX(-100, "PCRelationships", _SlaveI)>>
-- 
GitLab