From 042d01bb07ae9e4e84c534fa80e082e3871ff825 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sat, 23 Dec 2017 21:18:51 -0500
Subject: [PATCH] saRules milkmaid stuff.

---
 src/uncategorized/dairy.tw       |   4 +-
 src/uncategorized/dairyReport.tw |  30 +++---
 src/uncategorized/saRules.tw     | 163 ++++++++++++++++++++++++++++---
 3 files changed, 170 insertions(+), 27 deletions(-)

diff --git a/src/uncategorized/dairy.tw b/src/uncategorized/dairy.tw
index ce5ab3fdd9e..b5e9aa79794 100644
--- a/src/uncategorized/dairy.tw
+++ b/src/uncategorized/dairy.tw
@@ -208,7 +208,7 @@ $dairyNameCaps
 <<case "Degradationist">>
 	is harsh and utilitarian. There are stands to restrain cows who aren't being milked for dosing, punishment, or sexual use. There are cattle prods here and there to use on resistant cows, unproductive cows, or cows one wishes to hear scream.
 <<case "Repopulation Focus">>
-	is comfortable and well-kept. The milking machines are specially designed to maximize a pregnant cow's comfort.
+	is comfortable and well-kept. The milking machines are specially designed to maximize a pregnant cow's comfort. After a milking, cows have a wide selection of soft furniture to choose from, so comfortable that most fall fast asleep.
 <<case "Eugenics">>
 	is comfortable, well-kept and well-monitored. Cows are kept track of at all times to make sure no-one tries to increase milk production via pregnancy.
 <<case "Asset Expansionist">>
@@ -238,7 +238,7 @@ $dairyNameCaps
 <<case "Slimness Enthusiast">>
 	is quite unusual. Since the cows it milks may not necessarily have gigantic boobs, the milking machines here can adapt to drain cream from any body.
 <<case "Hedonistic">>
-	is comfortable and fun. The stalls are filled with thick, soft pillows to lounge on while hooked to the milking machines with plenty of toys to make use of while getting milked. Cows here are expected to binge eat between milkings, since the best milk comes from cattle who are immobile, stuffed with food and hugely fat.
+	is comfortable and fun. The stalls are filled with thick, soft pillows to lounge on while hooked to the milking machines and with plenty of toys to make use of while getting milked. Cows here are expected to binge eat between milkings, since the best milk comes from cattle who are immobile, stuffed with food and hugely fat.
 <<default>>
 	is comfortable and well-kept. It features nice rest areas for cows to lounge in after a milking, and exercise equipment to keep them healthy.
 <</switch>>
diff --git a/src/uncategorized/dairyReport.tw b/src/uncategorized/dairyReport.tw
index 3e87e4de7f5..dfc93333f18 100644
--- a/src/uncategorized/dairyReport.tw
+++ b/src/uncategorized/dairyReport.tw
@@ -34,6 +34,9 @@
 	<<if ($slaves[_FLs].health >= 80)>>
 		<<set $milkmaidHealthBonus++>>
 	<</if>>
+	<<if $slaves[_FLs].livingRules != "luxurious">>
+		<<set $slaves[_FLs].livingRules = "luxurious">>
+	<</if>>
 	<<if $slaves[_FLs].fetishStrength <= 95>>
 		<<if $slaves[_FLs].fetish != "boobs">>
 			<<fetishChangeChance $slaves[_FLs]>>
@@ -74,7 +77,7 @@
 				<<set $slaves[_FLs].devotion++>>
 			<</if>>
 			<<set _Tmult = (_milkmaidImpregnated * 10), $slaves[_FLs].penetrativeCount += _Tmult, $Milkmaid.penetrativeCount += _Tmult, $penetrativeTotal += _Tmult>>
-			<<set $slaves[_FLs].need -= (_milkmaidImpregnated * 10)>>
+			<<set $slaves[_FLs].need = 0>>
 		<</if>>
 	<</if>>
 	<<if (_FLsFetish == 1)>>
@@ -165,7 +168,7 @@
 			<<set $i = $slaveIndices[$DairyiIDs[_dI]]>>
 			<<if ($slaves[$i].balls > 0)>>
 				She uses her turgid cock to give prostate stimulation to slaves that need help ejaculating.
-				<<set $slaves[_FLs].need -= 5>>
+				<<set $slaves[_FLs].need -= 50>>
 				<<break>>
 			<</if>>
 		<</for>>
@@ -192,15 +195,18 @@
 			<<elseif $slaves[$i].ID == $Milkmaid.father>>
 				She pays special attention to her father, $slaves[$i].slaveName, making sure she is well kept and happy.
 				<<set $slaves[$i].trust++>>
-			<<elseif areSisters($slaves[$i], $Milkmaid) == 1>>
-				She pays special attention to her twin sister, $slaves[$i].slaveName, making sure she is well kept and happy.
-				<<set $slaves[$i].trust++>>
-			<<elseif areSisters($slaves[$i], $Milkmaid) == 2>>
-				She pays special attention to her sister, $slaves[$i].slaveName, making sure she is well kept and happy.
-				<<set $slaves[$i].trust++>>
-			<<elseif areSisters($slaves[$i], $Milkmaid) == 3>>
-				She pays special attention to her half-sister, $slaves[$i].slaveName, making sure she is well kept and happy.
-				<<set $slaves[$i].trust++>>
+			<<else>>
+				<<switch areSisters($slaves[$i], $Milkmaid)>>
+				<<case 1>>
+					She pays special attention to her twin sister, $slaves[$i].slaveName, making sure she is well kept and happy.
+					<<set $slaves[$i].trust++>>
+				<<case 2>>
+					She pays special attention to her sister, $slaves[$i].slaveName, making sure she is well kept and happy.
+					<<set $slaves[$i].trust++>>
+				<<case 3>>
+					She pays special attention to her half-sister, $slaves[$i].slaveName, making sure she is well kept and happy.
+					<<set $slaves[$i].trust++>>
+				<</switch>>
 			<</if>>
 		<<elseif $Milkmaid.relationTarget == $slaves[$i].ID && $familyTesting == 0>>
 			She pays special attention to her $slaves[$i].relation, $slaves[$i].slaveName, making sure she is well kept and happy.
@@ -255,6 +261,7 @@
 		''__@@.pink;<<SlaveFullName $slaves[_FLs]>>@@__'' is serving as your Milkmaid.
 		<br>&nbsp;&nbsp;&nbsp;
 		<<include "SA chooses own clothes">>
+		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
 		<<include "SA drugs">>
@@ -264,6 +271,7 @@
 	<<else>>
 		<<silently>>
 		<<include "SA chooses own clothes">>
+		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
 		<<include "SA drugs">>
diff --git a/src/uncategorized/saRules.tw b/src/uncategorized/saRules.tw
index 356857c16a1..748d23fc25f 100644
--- a/src/uncategorized/saRules.tw
+++ b/src/uncategorized/saRules.tw
@@ -160,7 +160,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -468,7 +468,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -627,7 +627,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -907,7 +907,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -1067,7 +1067,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -1308,7 +1308,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -1414,7 +1414,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -1689,7 +1689,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -2013,7 +2013,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -2184,7 +2184,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -2487,7 +2487,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -2647,7 +2647,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -2960,7 +2960,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
@@ -2997,6 +2997,141 @@
 					<<set $slaves[$i].trust -= _punishments>>
 				<</switch>>
 			<</if>>
+		<<case "be the Milkmaid">>
+			<<set $slaves[$i].need -= $DairyiIDs.length*5>>
+			<<if $slaves[$i].energy <= 20>>
+				is frigid and has little interest in getting off<<if ($slaves[$i].releaseRules != "permissive")>>, making the rule restricting her sexual outlets superfluous<</if>>.	
+				<<set $slaves[$i].need = 0>>
+			<<elseif $slaves[$i].need < $slaves[$i].energy*0.5>>
+				<<if ($slaves[$i].releaseRules != "permissive") && ($slaves[$i].releaseRules != "masturbation")>>
+					gets off while performing her duties, so being forbidden from masturbation doesn't really bother her.
+					<<set $slaves[$i].need -= 20>>
+				<<else>>
+					gets off while performing her duties, so she doesn't feel the need for release that often.
+					<<set $slaves[$i].need -= 20>>
+				<</if>>
+			<<else>>
+				<<if ($slaves[$i].releaseRules == "restrictive")>>
+					willingly begs you to
+					<<saRulesPlayerFetishPlay>>
+					whenever you inspect $dairyName.
+					<<saRulesPlayerEnergy>>
+					<<saRulesPlayerDiscoversFetish>>
+					<<saRulesPlayerDrugEffects>>
+				<<elseif ($slaves[$i].releaseRules == "masturbation")>>
+					<<if ($slaves[$i].devotion < 80)>>
+						is a little disappointed that she's limited to her hands and toys when off duty, but @@.mediumaquamarine;trusts you know what's best for her.@@ 
+						<<set $slaves[$i].trust += 1, $slaves[$i].need = 0>>
+					<<else>>
+						@@.mediumaquamarine;trusts your judgement@@ that only she really knows how to pleasure herself, though she @@.mediumorchid;often wonders why you don't use her.@@
+						<<set $slaves[$i].trust += 1, $slaves[$i].devotion -= 2, $slaves[$i].need = 0>>
+					<</if>>
+					<<if $slaves[$i].devotion > 20>>
+						When she does play with herself, she
+						<<saRulesMasturbationFetishPlay>>
+						<<saRulesMasturbationDiscoversFetish>>
+					<</if>>
+					<<saRulesMasturbationDrugEffects>>
+				<<else>> /* releaseRules not restrictive */
+					<<if ($universalRulesConsent == 0)>>
+						happily @@.mediumaquamarine;avails herself@@ of your permission to demand that other slaves have sex with her.
+						<<set $slaves[$i].trust += 1, $slaves[$i].need = 0>>
+						<<saRulesRapeFetish>>
+						<<saRulesRapeDiscoversFetish>>
+					<<else>> /* universalRulesConsent is not zero */
+						@@.mediumaquamarine;relies@@ on your other slaves for mutual satisfaction,
+						<<set $slaves[$i].trust += 1, $slaves[$i].need = 0>>
+						<<saRulesConsentFetish>>
+						<<saRulesConsentDiscoversFetish>>
+					<</if>> /* closes universalRulesConsent */
+					<<saRulesPermissiveDrugEffects>>
+				<</if>> /* closes releaseRules not restrictive */
+			<</if>>
+
+			She is @@.hotpink;very happy@@ with her private room in $dairyName and @@.mediumaquamarine;trusts@@ you a bit more for placing her in charge of it.
+			<<set $slaves[$i].devotion += 1, $slaves[$i].trust += 1>>
+
+			<<if ($universalRulesConsent == 0)>>
+				<<if ($slaves[$i].releaseRules != "restrictive")>>
+					<<if ($slaves[$i].energy > 95)>>
+						<<if $DairyiIDs.length > 2>>
+							Under the rules, she's allowed to demand that other slaves get her off, and she @@.hotpink;adores@@ you for leaving plentiful outlets for her nymphomania under her charge.
+						<<else>>
+							Under the rules, she's allowed to demand that other slaves get her off, and she @@.hotpink;eagerly awaits@@ the day you assign more cows to $dairyName.
+						<</if>>
+						<<set $slaves[$i].devotion += 1>>
+					<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetishStrength > 60)>>
+						<<if ($slaves[$i].fetish == "sadist")>>
+							<<if $DairyiIDs.length > 2>>
+								Under the rules, she's allowed to sexually abuse other slaves, and she @@.hotpink;adores@@ you for providing so many cows for her to rape.
+							<<else>>
+								Under the rules, she's allowed to sexually abuse other slaves, and she @@.hotpink;eagerly awaits@@ the day you assign more cows to $dairyName for her to rape.
+							<</if>>
+							<<set $slaves[$i].devotion += 1>>
+						<<elseif ($slaves[$i].fetish == "dom")>>
+							<<if $DairyiIDs.length > 2>>
+								Under the rules, she's allowed to force other slaves to have sex with her, and she @@.hotpink;adores@@ you for allowing her so many cows to dominate.
+							<<else>>
+								Under the rules, she's allowed to force other slaves to have sex with her, and she @@.hotpink;eagerly awaits@@ the day you assign more cows to her domain.
+							<</if>>
+							<<set $slaves[$i].devotion += 1>>
+						<</if>>
+					<</if>>
+				<</if>>
+			<</if>>
+
+			<<if ($slaves[$i].attrKnown == 0)>>
+				<<if ($week-$slaves[$i].weekAcquired > 4) && $slaves[$i].energy > 20>>
+					<<set $slaves[$i].attrKnown = 1>>
+					<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> has been monitoring her as she cares for the cattle, analyzing her preferences. It seems she is
+					<<saRulesAttractionDiscovery>>
+				<</if>>
+			<</if>>
+
+			She does her best for you, so she frequently deserves a reward and never needs to be punished.
+			<<set _punishments = 0>>
+			<<set _rewards = 3>>
+			
+			<<if _rewards > 0>>
+				<<switch $slaves[$i].standardReward>>
+				<<case "relaxation">>
+					She's given free time, which she
+					<<if $spa != 0>>
+						usually spends in $spaName<<if $Attendant != 0>> enjoying $Attendant.slaveName's care<</if>>.
+					<<else>>
+						usually spends relaxing in her room<<if $DairyiIDs.length > 1>> with the softest cow available<</if>>.
+					<</if>>
+					<<if $slaves[$i].relationship > 0>>
+						She often asks to save these breaks so she can spend them with her <<if $slaves[$i].relationship == 1>>friend<<elseif $slaves[$i].relationship == 2>>best friend<<elseif $slaves[$i].relationship == 3>>friend with benefits<<elseif $slaves[$i].relationship == 4>>sweetheart<<else>>wife<</if>>.
+					<</if>>
+					These breaks are @@.green;good for her.@@
+					<<set $slaves[$i].health += _rewards>>
+				<<case "drugs">>
+					She's @@.hotpink;rewarded@@ with hits of mild recreational drugs, which @@.red;isn't healthy,@@ but helps bind her to you strongly.
+					<<set $slaves[$i].health -= _rewards>>
+					<<set $slaves[$i].devotion += _rewards*2>>
+				<<case "orgasm">>
+					She's @@.hotpink;rewarded@@ with
+					<<if $slaves[$i].clitPiercing >= 3>>
+						sustained orgasm from her <<if $slaves[$i].dick == 0>>clit<<else>>dick<</if>> piercing,
+					<<elseif $activeSlave.releaseRules == "sapphic">>
+						immediate sex with any nearby slave,
+					<<else>>
+						a quick climax from a vibrator,
+					<</if>>
+					@@.green;boosting her libido.@@
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
+					<<set $slaves[$i].devotion += _rewards>>
+				<<default>>
+					She's @@.hotpink;rewarded@@
+					<<if (_punishments > 0) && ($slaves[$i].standardReward == "situational")>>
+						and @@.gold;punished@@
+					<</if>>
+					situationally, letting her develop normally.
+					<<set $slaves[$i].devotion += _rewards>>
+				<</switch>>
+			<</if>>
+		<<case "work in the dairy">>
 		<<default>>
 			<<if $slaves[$i].devotion < -50>>
 				is so unhappy that she has little interest in getting off<<if ($slaves[$i].releaseRules != "permissive")>>, making the rule restricting her sexual outlets superfluous<</if>>.
@@ -3340,7 +3475,7 @@
 						a quick climax from a vibrator,
 					<</if>>
 					@@.green;boosting her libido.@@
-					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>>
+					<<if $slaves[$i].energy < 98>><<set $slaves[$i].energy += _rewards>><</if>><<set $slaves[$i].need -= (_rewards*10)>>
 					<<set $slaves[$i].devotion += _rewards>>
 				<<default>>
 					She's @@.hotpink;rewarded@@
-- 
GitLab