From f358234e86f753c1543255b46b29274264cab32b Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sun, 15 Mar 2020 13:47:25 -0400
Subject: [PATCH] stud work

---
 src/interaction/slaveInteract.js            |  3 ++
 src/uncategorized/saLongTermEffects.tw      |  3 +-
 src/uncategorized/saServeYourOtherSlaves.tw |  2 +-
 src/uncategorized/slaveAssignmentsReport.tw | 46 ++++++++++-----------
 4 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/src/interaction/slaveInteract.js b/src/interaction/slaveInteract.js
index 540e7de6964..540184a6b54 100644
--- a/src/interaction/slaveInteract.js
+++ b/src/interaction/slaveInteract.js
@@ -172,6 +172,9 @@ App.UI.SlaveInteract.assignmentBlock = function(blockId, slave) {
 		if (target) {
 			title.appendChild(document.createTextNode(`Serving ${target.slaveName} exclusively. `));
 			linkText = `Change`;
+		} else if (slave.subTarget === -1) {
+			title.appendChild(document.createTextNode(`Serving as a Stud. `));
+			linkText = `Change role `;
 		} else {
 			title.appendChild(document.createTextNode(`Serving all your other slaves. `));
 			linkText = `Choose a specific slave to submit to`;
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index 41432bc80e0..68cde24c73f 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -4247,6 +4247,7 @@
 	<<if canGetPregnant($slaves[$i]) && (($slaves[$i].assignment == "work in the dairy" && $dairyPregSetting == 0) || $slaves[$i].assignment != "work in the dairy")>>
 
 		<<set _conceptionSeed = random(1,100)>>
+		<<set _studIgnoresRules = ($Stud != 0 && $universalRulesImpregnation == "Stud" && $Stud.career == "a breeding bull" && $Stud.fetish == "mindbroken" && canWalk($Stud)) ? 1 : 0>>
 
 		<<if ($universalRulesImpregnation == "PC") && canImpreg($slaves[$i], $PC)>>
 			$slaves[$i].slaveName is ripe for breeding, so you ejaculate inside $him often. When you bore of $his fertile <<if $slaves[$i].mpreg == 1>>ass<<else>>cunt<</if>>, you keep $him around as you fuck other slaves so you can pull out of them, shove your cock into $him, and fill $him with your seed anyway.
@@ -4282,7 +4283,7 @@
 			<<set WombImpregnate($slaves[$i], $slaves[$i].pregType, -1, 1)>>
 			<<set $activeSlave = $slaves[$i]>><<if $slaves[$i].mpreg == 1>><<= VCheck.Anal(10)>><<else>><<= VCheck.Vaginal(10)>><</if>><<set $slaves[$i] = $activeSlave>>
 
-		<<elseif (($slaves[$i].vagina == 0) || (($slaves[$i].anus == 0) && ($slaves[$i].mpreg > 0))) && ($Stud == 0 || $universalRulesImpregnation != "Stud" || $Stud.career != "a breeding bull" || $Stud.fetish != "mindbroken" || !canWalk($Stud))>>
+		<<elseif (($slaves[$i].vagina == 0) || (($slaves[$i].anus == 0) && ($slaves[$i].mpreg > 0))) && !_studIgnoresRules>>
 		<<elseif ($HeadGirl != 0) && ($HeadGirl.dick > 0) && ($slaves[$i].ID != $HeadGirl.ID) && ($universalRulesImpregnation == "HG") && canPenetrate($HeadGirl)>>
 			<<setLocalPronouns $HeadGirl 2>>
 			<<if $slaves[$i].HGExclude == 1>>
diff --git a/src/uncategorized/saServeYourOtherSlaves.tw b/src/uncategorized/saServeYourOtherSlaves.tw
index f889e220192..bed8ae13d50 100644
--- a/src/uncategorized/saServeYourOtherSlaves.tw
+++ b/src/uncategorized/saServeYourOtherSlaves.tw
@@ -55,7 +55,7 @@
 				<</if>>
 			<</if>>
 		<<else>>
-			obediently seeds your fertile slaves. Being used as a stud @@.hotpink;keeps $him in a good frame of mind@@ and @@.mediumorchid;builds $his trust in you.@@
+			obediently seeds your fertile slaves. Being used as a stud @@.hotpink;keeps $him in a good frame of mind@@ and @@.mediumaquamarine;builds $his trust in you.@@
 			<<set $slaves[$i].devotion += 2, $slaves[$i].trust += 2>>
 			<<if $slaves[$i].fetish == "pregnancy">>
 				$He @@.hotpink;openly enjoys@@ getting the honor of fathering new slaves on your behalf.
diff --git a/src/uncategorized/slaveAssignmentsReport.tw b/src/uncategorized/slaveAssignmentsReport.tw
index a38fb78c8b3..e8809ef5352 100644
--- a/src/uncategorized/slaveAssignmentsReport.tw
+++ b/src/uncategorized/slaveAssignmentsReport.tw
@@ -789,34 +789,13 @@ $sexDemandResult.topClass = Math.trunc((($NPCSexSupply.topClass + $slaveJobValue
 	<<set $Concubine = $slaves[$i], $fuckSlaves++>>
 <<case "serve in the master suite" "please you">>
 	<<set $fuckSlaves++>>
-<</switch>>
-
-<<if $Lurcher>>
-	<<if $slaves[$i].ID == $Lurcher.ID>>
-		<<set $Lurcher = $slaves[$i]>>
-		<<if !canWalk($Lurcher)>>
-			<span class='slave-name'>$Lurcher.slaveName</span> is no longer able to run @@.yellow;and cannot course as a lurcher.@@<br>
-			<<set $Lurcher = 0>>
-		<<elseif !canHold($Lurcher)>>
-			<span class='slave-name'>$Lurcher.slaveName</span> is no longer able to catch the hares @@.yellow;and cannot course as a lurcher.@@<br>
-			<<set $Lurcher = 0>>
-		<<elseif !canHear($Lurcher) && !canSee($Lurcher)>>
-			<span class='slave-name'>$Lurcher.slaveName</span> is no longer able to track the hares @@.yellow;and cannot course as a lurcher.@@<br>
-			<<set $Lurcher = 0>>
-		<<elseif $Lurcher.bellyPreg >= 60000>>
-			<span class='slave-name'>$Lurcher.slaveName</span> is too pregnant to run @@.yellow;and cannot course as a lurcher.@@
-			<<set $Lurcher = 0>>
-		<</if>>
-	<</if>>
-<</if>>
-
-<<if $Stud>>
-	<<if $slaves[$i].ID == $Stud.ID>>
+<<case "be a subordinate slave">>
+	<<if $slaves[$i].subTarget == -1>>
 		<<set $Stud = $slaves[$i]>>
 		<<if $slaves[$i].balls == 0>>
 			<span class='slave-name'>$Stud.slaveName</span> no longer has sperm @@.yellow;and cannot serve as a Stud any more.@@<br>
 			<<set $Stud = 0>>
-		<<elseif slave.ballType == "sterile">>
+		<<elseif $slaves[$i].ballType == "sterile">>
 			<span class='slave-name'>$Stud.slaveName</span> no longer produces potent sperm @@.yellow;and cannot serve as a Stud any more.@@<br>
 			<<set $Stud = 0>>
 		<<elseif $slaves[$i].pubertyXY != 1>>
@@ -842,6 +821,25 @@ $sexDemandResult.topClass = Math.trunc((($NPCSexSupply.topClass + $slaveJobValue
 			<</if>>
 		<</if>>
 	<</if>>
+<</switch>>
+
+<<if $Lurcher>>
+	<<if $slaves[$i].ID == $Lurcher.ID>>
+		<<set $Lurcher = $slaves[$i]>>
+		<<if !canWalk($Lurcher)>>
+			<span class='slave-name'>$Lurcher.slaveName</span> is no longer able to run @@.yellow;and cannot course as a lurcher.@@<br>
+			<<set $Lurcher = 0>>
+		<<elseif !canHold($Lurcher)>>
+			<span class='slave-name'>$Lurcher.slaveName</span> is no longer able to catch the hares @@.yellow;and cannot course as a lurcher.@@<br>
+			<<set $Lurcher = 0>>
+		<<elseif !canHear($Lurcher) && !canSee($Lurcher)>>
+			<span class='slave-name'>$Lurcher.slaveName</span> is no longer able to track the hares @@.yellow;and cannot course as a lurcher.@@<br>
+			<<set $Lurcher = 0>>
+		<<elseif $Lurcher.bellyPreg >= 60000>>
+			<span class='slave-name'>$Lurcher.slaveName</span> is too pregnant to run @@.yellow;and cannot course as a lurcher.@@
+			<<set $Lurcher = 0>>
+		<</if>>
+	<</if>>
 <</if>>
 
 <<if $fighterIDs.includes($slaves[$i])>>
-- 
GitLab