From 48017d2e14a456c77d4050e9a7b95459e2c36b30 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Wed, 18 Apr 2018 13:58:59 -0400
Subject: [PATCH] fixes

---
 devNotes/twine JS                         | 47 +++++++++++++++++++++--
 src/SecExp/securityReport.tw              |  6 +--
 src/uncategorized/RESS.tw                 |  8 ++--
 src/uncategorized/peConcubineInterview.tw |  4 --
 src/uncategorized/saBeYourHeadGirl.tw     |  2 +-
 src/uncategorized/saRules.tw              | 13 +++++++
 src/uncategorized/surgeryDegradation.tw   |  6 ++-
 src/uncategorized/useGuard.tw             |  5 +--
 src/uncategorized/walkPast.tw             |  2 +-
 9 files changed, 72 insertions(+), 21 deletions(-)

diff --git a/devNotes/twine JS b/devNotes/twine JS
index 502f21b4c5c..cb5ed1340d3 100644
--- a/devNotes/twine JS	
+++ b/devNotes/twine JS	
@@ -7593,6 +7593,7 @@ window.todaysOutfit = function(slave) {
 			if(ArcologyZero.FSMaturityPreferentialist > 0) {
 				if(slave.visualAge >= 30) {
 					wardrobeFS.push({text: "and wears a slutty suit to look like the ideal horny older woman.", clothes: "slutty business attire"});
+					wardrobeFS.push({text: "and wears only an apron to make herself seem more matronly.", clothes: "an apron"});
 				} else {
 					wardrobeFS.push({text: "and wears a formal suit to look more mature.", clothes: "nice business attire"});
 				}
@@ -7610,6 +7611,7 @@ window.todaysOutfit = function(slave) {
 			}
 			if(ArcologyZero.FSPastoralist > 0) {
 				wardrobeFS.push({text: "and wears Western clothing, since she thinks it fits with pastoralism.", clothes: "Western clothing"});
+				wardrobeFS.push({text: "and wears a swimsuit that leaves her breasts uncovered.", clothes: "a monokini"});
 				if(slave.lactation > 0) {
 					wardrobeFS.push({text: "and dresses up as a slutty wet nurse.", clothes: "a slutty nurse outfit"});
 				}
@@ -7637,6 +7639,7 @@ window.todaysOutfit = function(slave) {
 					wardrobeFS.push({text: "and wears a leotard to show off her lithe body.", clothes: "a leotard"});
 					wardrobeFS.push({text: "and wears a form fitting bodysuit to show off her lithe figure.", clothes: "a comfortable bodysuit"});
 					wardrobeFS.push({text: "and wears spats to hug her tight butt.", clothes: "spats and a tank top"});
+					wardrobeFS.push({text: "and wears an apron that covers her front while leaving her rear free.", clothes: "an apron"});
 				} else {
 					wardrobeFS.push({text: "and squeezes into a form fitting bodysuit in the hopes that it squishes down her assets.", clothes: "restrictive latex"});
 				}
@@ -8529,6 +8532,20 @@ function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot c
 
 var lastActiveSlave, lastSlaves, lastPC;
 
+/*
+  To use, add something like:
+
+<div id="familyTree"></div>
+	<span id="familyTreeLink">
+		<<link "Pull up the file on her family tree.">>
+		<<replace #familyTreeLink>>
+			<<run renderFamilyTree($slaves, $activeSlave.ID)>>
+		<</replace>>
+	<</link>>
+</span>
+
+*/
+
 window.renderFamilyTree = function(slaves, filterID) {
 
 	var ftreeWidth,ftreeHeight;
@@ -8630,7 +8647,7 @@ window.renderFamilyTree = function(slaves, filterID) {
 		node.append('circle')
 			.attr('r', function(d){  return d.r })
 			.attr('stroke', function(d) {
-				if(d.id == filterID) {
+				if(d.ID == filterID) {
 					return '#ffff20';
 				} else {
 					return '#5a5a5a';
@@ -8643,8 +8660,14 @@ window.renderFamilyTree = function(slaves, filterID) {
 			.text(function(d) {
 				var ssym;
 				if(d.ID == -1) {
-					ssym = '';
-				} else if(d.dick > 0 && d.vagina > -1) {
+					if(d.dick == 1 && d.vagina == 1) {
+						ssym = '☿'
+					} else if (d.dick == 1) {
+						ssym = '♂';
+					} else if (d.vagina == 1) {
+						ssym = '♀';
+					}
+				} else if (d.dick > 0 && d.vagina > -1) {
 					ssym = '☿'
 				} else if (d.dick > 0) {
 					ssym = '♂';
@@ -8896,7 +8919,7 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 		}
 		node_lookup[char_id] = family_graph.nodes.length;
 		var char_obj = {
-			id: char_id,
+			ID: char_id,
 			name: character.slaveName,
 			dick: character.dick,
 			unborn: !!unborn[char_id],
@@ -8954,6 +8977,20 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 	return family_graph;
 };
 
+/*Old version. To use, do something like: 
+<div id="editFamily">
+  <div id="graph"></div>
+</div>
+
+<<run updateFamilyTree($activeSlave, $slaves, $PC)>>
+<script>updateFamilyTree()</script>
+If you want to update the tree, just re-call the run line.
+
+If there's no active slave, you can do:
+
+<<run updateFamilyTree(null, $slaves, $PC)>>
+*/
+
 window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastSlaves, PC = lastPC) {
   lastActiveSlave = activeSlave;
   lastSlaves = slaves;
@@ -9102,6 +9139,8 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS
 
 };
 
+/* I don't know which JS I belong to */
+
 window.getHeroSlave = function(heroSlave, baseHeroSlave) {
     var newSlave = clone(baseHeroSlave);
     for (var attrname in heroSlave) {
diff --git a/src/SecExp/securityReport.tw b/src/SecExp/securityReport.tw
index 09d1093144c..434767021f7 100644
--- a/src/SecExp/securityReport.tw
+++ b/src/SecExp/securityReport.tw
@@ -438,7 +438,7 @@
 			<</if>>
 			<<set $slaveUnits[_i].loyalty = Math.clamp($slaveUnits[_i].loyalty + _loyaltyChange,0,100)>>
 			<<if $slaveUnits[_i].training < 100 && $secBarracksUpgrades.training >= 1>>
-				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowing increasing their experience level.
+				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowly increasing their experience level.
 				<<set $slaveUnits[_i].training += random(2,4) * 1.5 * $secBarracksUpgrades.training>>
 			<</if>>
 		<</for>>
@@ -478,7 +478,7 @@
 			<</if>>
 			<<set $militiaUnits[_i].loyalty = Math.clamp($militiaUnits[_i].loyalty + _loyaltyChange,0,100)>>
 			<<if $militiaUnits[_i].training < 100 && $secBarracksUpgrades.training >= 1>>
-				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowing increasing their experience level.
+				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowly increasing their experience level.
 				<<set $militiaUnits[_i].training += random(2,4) * 1.5 * $secBarracksUpgrades.training>>
 			<</if>>
 		<</for>>
@@ -518,7 +518,7 @@
 			<</if>>
 			<<set $mercUnits[_i].loyalty = Math.clamp($mercUnits[_i].loyalty + _loyaltyChange,0,100)>>
 			<<if $mercUnits[_i].training < 100 && $secBarracksUpgrades.training >= 1>>
-				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowing increasing their experience level.
+				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowly increasing their experience level.
 				<<set $mercUnits[_i].training += random(2,4) * 1.5 * $secBarracksUpgrades.training>>
 			<</if>>
 		<</for>>
diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index 7334e5860e0..b0db33b0d17 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -16332,17 +16332,17 @@ You tell her kindly that you understand, and that she'll be trained to address t
 			<<case "buttslut">>
 				She has a one track mind, and that track is anal sex. So, she assrapes them, enjoying their sobbed apologies while she <<if canPenetrate($eventSlave)>>fills their backdoors with her cum<<else>>uses a dildo on them<</if>>.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].analCount += 10>><</if>><</for>>
-				<<set $slaves[$slaveIndices[$eventSlave.ID]].penetrativeCount += 10
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].penetrativeCount += 10>>
 				<<set $analTotal += 30, $penetrativeTotal += 30>>
 			<<case "boobs">>
 				She forces them to <<if $eventSlave.lactation > 0>>nurse from her<<else>>suck her nipples until she orgasms<</if>>, mostly for how much she enjoys the sensation, but also for the revulsion it produces.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].oralCount += 10>><</if>><</for>>
-				<<set $slaves[$slaveIndices[$eventSlave.ID]].mammaryCount += 10
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].mammaryCount += 10>>
 				<<set $oralTotal += 30, $mammaryTotal += 30>>
 			<<case "pregnancy">>
 				She doesn't have permission to impregnate them, but they don't know that, and she lies shamelessly. <<if canPenetrate($eventSlave)>>They beg her not to cum inside them, but she does anyway,<<else>>She uses a strap-on with a reservoir to fill them with cum,<</if>> and they cry themselves to sleep every night.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].vaginalCount += 10>><</if>><</for>>
-				<<set $slaves[$slaveIndices[$eventSlave.ID]].penetrativeCount += 10
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].penetrativeCount += 10>>
 				<<set $vaginalTotal += 30, $penetrativeTotal += 30>>
 			<<case "dom">>
 				She prizes the opportunity to be dominant, and makes the most of it. Rather than doing something pedestrian like force them to fuck her, she forces them to fuck each other, punishing them for hesitation until they're eating each other out even while they cry.
@@ -16351,7 +16351,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 			<<case "sadist">>
 				Their tears aren't a means for her; they're an end. She extracts them with greed, enjoying the sensation of being <<if $eventSlave.dick > 0>>sucked off<<elseif $activeSlave.vagina == -1>>rimmed<<else>>eaten out<</if>> by one sobbing rich bitch while she forces another to spank her friend's pussy.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].oralCount += 10>><</if>><</for>>
-				<<set $slaves[$slaveIndices[$eventSlave.ID]].oralCount += 10
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].oralCount += 10>>
 				<<set $oralTotal += 60>>
 			<<case "masochist">>
 				As a masochist, she's naturally inclined to be on the receiving end, but in this case she makes an exception for the sake of justice. And it's to her victims' anguish that she does, because she knows pain like a lover, and inflicts it in excruciating crescendos without leaving a single mark.
diff --git a/src/uncategorized/peConcubineInterview.tw b/src/uncategorized/peConcubineInterview.tw
index 3c106474a54..edcaff4558f 100644
--- a/src/uncategorized/peConcubineInterview.tw
+++ b/src/uncategorized/peConcubineInterview.tw
@@ -185,10 +185,6 @@ You receive an official communication from a popular talk show hosted in one of
 				spats.
 			<<case "a monokini">>
 				monokini.
-			<<case "a string bikini">>
-				strign bikini.
-			<<case "spats and a tank top">>
-				scalemail bikini.
 			<<case "a cybersuit">>
 				cybersuit.
 			<<default>>
diff --git a/src/uncategorized/saBeYourHeadGirl.tw b/src/uncategorized/saBeYourHeadGirl.tw
index 6f2dc498768..b15622e7195 100644
--- a/src/uncategorized/saBeYourHeadGirl.tw
+++ b/src/uncategorized/saBeYourHeadGirl.tw
@@ -135,7 +135,7 @@
 			<<set $slaves[$i].fetishStrength += 4>>
 		<</if>>
 		<</if>>
-	<<elseif $slaves[$i].fetishStrength > random(20,40)>>
+	<<elseif $slaves[$i].fetishStrength <= random(20,60)>>
 		The sheer variety of sexual situations she sees and participates in @@.pink;broaden her sexual interests@@ and incline her to take a dominant sexual role.
 		<<set $slaves[$i].fetishStrength -= 4>>
 	<<else>>
diff --git a/src/uncategorized/saRules.tw b/src/uncategorized/saRules.tw
index 6d641ca755b..25d78109780 100644
--- a/src/uncategorized/saRules.tw
+++ b/src/uncategorized/saRules.tw
@@ -3625,6 +3625,19 @@
 					gets off regularly, so she doesn't feel the need to seek relief.
 					<<set $slaves[$i].need -= 20>>
 				<</if>>
+			<<else>>
+				<<if ($slaves[$i].devotion <= 20)>>
+					sometimes needs a little extra attention from you, @@.hotpink;habituating her to sexual slavery.@@
+					<<set $slaves[$i].devotion += 1>>
+					<<if ($slaves[$i].trust > -20) && ($slaves[$i].devotion <= 20)>>
+						She hates herself for climaxing to your touch, and knows the mild aphrodisiacs in the food are forcing her arousal, @@.gold;frightening her.@@
+						<<set $slaves[$i].trust -= 1>>
+					<</if>>
+					<<set $slaves[$i].need -= 40>>
+				<<else>>
+					sometimes needs a little extra sexual attention, not that you mind giving it to her.
+					<<set $slaves[$i].need -= 40>>
+				<</if>>
 			<</if>>
 
 			<<if ($slaves[$i].devotion <= 20)>>
diff --git a/src/uncategorized/surgeryDegradation.tw b/src/uncategorized/surgeryDegradation.tw
index 2347bd59fb3..d2d919a690c 100644
--- a/src/uncategorized/surgeryDegradation.tw
+++ b/src/uncategorized/surgeryDegradation.tw
@@ -1591,8 +1591,12 @@ As the remote surgery's long recovery cycle completes,
 	<<if ($activeSlave.devotion > 50)>>
 		<<if $activeSlave.anus == 0>>
 			Since she's still an anal virgin, she's denied the most obvious way of discovering what's been added to her. The revelation is deferred until the next time she orgasms:
-		<<elseif ($activeSlave.fetishKnown == 1) && ($activeSlave.fetish == "buttslut")>>
+		<<elseif canDoAnal($activeSlave) || canDoVaginal($activeSlave)>>
 			The next time she's penetrated, though, it's obvious:
+		<<elseif canPenetrate($activeSlave)>>
+			The next time she uses her cock, though, it's obvious:
+		<<else>>
+			The next time she climaxes, though, it's obvious:
 		<</if>>
 		she's shocked by the astounding volume of her<<if $activeSlave.dick == 0>> squirting female<</if>> ejaculation, since her new organ is of course hooked into her urethra and does its duty whenever she climaxes<<if $activeSlave.balls == 0>> despite her lack of testicles to add actual semen to her copious emissions<</if>>.
 		<<if ($activeSlave.fetishKnown == 1) && ($activeSlave.fetish == "buttslut")>>
diff --git a/src/uncategorized/useGuard.tw b/src/uncategorized/useGuard.tw
index 0f98a1137c8..3a66b9ef3a5 100644
--- a/src/uncategorized/useGuard.tw
+++ b/src/uncategorized/useGuard.tw
@@ -1,6 +1,5 @@
-:: Use Guard
+:: Use Guard [nobr]
 
-<<nobr>>
 //
 
 $slaves[$i].slaveName is standing behind your left shoulder, guarding your person.
@@ -115,4 +114,4 @@ $slaves[$i].slaveName is standing behind your left shoulder, guarding your perso
 <</switch>>
 
 //
-<</nobr>>\
+
diff --git a/src/uncategorized/walkPast.tw b/src/uncategorized/walkPast.tw
index 380a7d41f7d..ad9712162fe 100644
--- a/src/uncategorized/walkPast.tw
+++ b/src/uncategorized/walkPast.tw
@@ -1970,7 +1970,7 @@
 				Her apron exposes her cock if she moves too quickly.
 			<<elseif $activeSlave.vagina > -1>>
 				Her apron exposes her featureless groin if she moves too quickly.
-			<<else $activeSlave.vagina == -1>>
+			<<else>>
 				Her apron exposes her pussy if she moves too quickly.
 			<</if>>
 		<<case "a cybersuit">>
-- 
GitLab