From cda5019ee50212ba3c9824fc8497e62cdfbb0919 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Mon, 27 Mar 2017 10:39:02 -0400
Subject: [PATCH] Fixes, tweaks and bodyswapping groundwork.

---
 src/cheats/mod_EditArcologyCheat.tw           |  2 +-
 src/init/storyInit.tw                         |  1 +
 src/pregmod/huskSlaveSwap.tw                  |  1 +
 src/pregmod/pBodyswapReveal.tw                |  9 +++++++++
 src/pregmod/seHuskSlaveDelivery.tw            |  2 +-
 src/uncategorized/buySlaves.tw                |  4 ++++
 src/uncategorized/economics.tw                |  2 +-
 src/uncategorized/futureSocities.tw           |  2 +-
 src/uncategorized/longSlaveDescription.tw     | 10 +++++-----
 src/uncategorized/nonRandomEvent.tw           |  2 ++
 src/uncategorized/randomNonindividualEvent.tw |  8 ++++++++
 src/uncategorized/reNickname.tw               |  4 ++--
 src/uncategorized/slaveInteract.tw            |  4 ++--
 src/uncategorized/slaveSummary.tw             |  2 +-
 14 files changed, 39 insertions(+), 14 deletions(-)
 create mode 100644 src/pregmod/huskSlaveSwap.tw
 create mode 100644 src/pregmod/pBodyswapReveal.tw

diff --git a/src/cheats/mod_EditArcologyCheat.tw b/src/cheats/mod_EditArcologyCheat.tw
index a465d92f0b8..6789cac8f2f 100644
--- a/src/cheats/mod_EditArcologyCheat.tw
+++ b/src/cheats/mod_EditArcologyCheat.tw
@@ -3,7 +3,7 @@
 
 	<<set $nextButton to "Continue">>
 	<<set $nextLink to "MOD_Edit Arcology Cheat Datatype Cleanup">>
-	<<set $PC.actualAge to Math.clamp($PC.actualAge, 18, 80)>>
+	<<set $PC.actualAge to Math.clamp($PC.actualAge, 14, 80)>>
 	
 ''Cheating Edit Arcology''
 
diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index d5b32673386..6c750586ce1 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -783,6 +783,7 @@ DairyRestraintsSetting($dairyRestraintsSetting)
 <<set $clinicSpeedGestation = 0>>
 <<set $playerSurgery = 0>>
 <<set $playerSurgeryType = 0>>
+<<set $bodyswapAnnounced = 0>>
 
 <<set $fakeBellies to ["a small empathy belly", "a medium empathy belly", "a large empathy belly", "a huge empathy belly"]>> /* lets fake bellies be separated from other .bellyAccessory */
 
diff --git a/src/pregmod/huskSlaveSwap.tw b/src/pregmod/huskSlaveSwap.tw
new file mode 100644
index 00000000000..8bb0f338e7d
--- /dev/null
+++ b/src/pregmod/huskSlaveSwap.tw
@@ -0,0 +1 @@
+:: Husk Slave Swap [nobr]
\ No newline at end of file
diff --git a/src/pregmod/pBodyswapReveal.tw b/src/pregmod/pBodyswapReveal.tw
new file mode 100644
index 00000000000..f93f819f805
--- /dev/null
+++ b/src/pregmod/pBodyswapReveal.tw
@@ -0,0 +1,9 @@
+:: P Bodyswap Reveal [nobr]
+
+<<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">>
+
+<<set $bodyswapAnnounced = 1>>
+
+You recieve countless messages throughout the day; mostly worthless spam, several uninterseting business offers and the occasional enslavement request. This one catches your eye however. It's an offer from a top surgeon who has recently been experimenting with radical new surgeries. You've been loosely following their work for the last few weeks, ever since they succesfully transfered the brain from one slave to another with minimal side effects, and it seems the are now offering their work to anyone with a surgical suite capable of performing the surgery and willing to undertake the risk.
+<br><br>
+It's an interesting offer and your remote surgery will suffice should you want to change up your slaves' bodies more than any drug or implant ever could. You'll need a slave to place their brain into, however. Perhaps one the mindless slaves from the Flesh Heap will suit your needs.
diff --git a/src/pregmod/seHuskSlaveDelivery.tw b/src/pregmod/seHuskSlaveDelivery.tw
index ebe1ebf9a5e..8fd239b240d 100644
--- a/src/pregmod/seHuskSlaveDelivery.tw
+++ b/src/pregmod/seHuskSlaveDelivery.tw
@@ -92,7 +92,7 @@
 \
 \
 
-A slave come in matching fitting the description you provided.
+A slave came in matching fitting the description you provided.
 <br>
 //As expected, she is a complete vegetable, but that is what you ordered after all. You lack the facilities to care for her in this state, so you should do what you are planning quickly. Or you could return her to the flesh Heap, though you won't get your credits back.//
 <br><br>
diff --git a/src/uncategorized/buySlaves.tw b/src/uncategorized/buySlaves.tw
index 7b5f3f04d52..5449d8361b5 100644
--- a/src/uncategorized/buySlaves.tw
+++ b/src/uncategorized/buySlaves.tw
@@ -28,6 +28,10 @@ __Sex Slave Purchase Options__
 
 <br>[[The Flesh Heap|Slave Markets][$slaveMarket to "heap", $slavesSeen += 1]] | //Broken and discarded slaves. Near useless, but cheap.//
 
+<<if $bodyswapAnnounced == 1>>
+<br>[[Order a custom husk slave from the Flesh Heap|Husk Slave]] | //Will need to be used on arrival.//
+<</if>>
+
 <<if ($rep > 500)>>
 <br>[[Kidnappers' Market|Slave Markets][$slaveMarket to "kidnappers", $slavesSeen += 1]] | //Slaves will tend to be low quality and resistant.//
 <</if>>
diff --git a/src/uncategorized/economics.tw b/src/uncategorized/economics.tw
index df962e6050b..231f55b5268 100644
--- a/src/uncategorized/economics.tw
+++ b/src/uncategorized/economics.tw
@@ -1628,7 +1628,7 @@ earning you @@color:yellowgreen;¤$seed.@@
 		<<set $AWeekGrowth += $desc.length>>
 	<</if>>
 	<<if $descNeg.length > 0>>
-		<<if $desc.length = 0>>Your arcology's economy<</if>> is hindered by social conflicts with
+		<<if $desc.length == 0>>Your arcology's economy<</if>> is hindered by social conflicts with
 		<<if $descNeg.length > 2>>
 		''$descNeg[0]'',
 		<<for $k to 1; $k < $descNeg.length; $k++>>
diff --git a/src/uncategorized/futureSocities.tw b/src/uncategorized/futureSocities.tw
index 941b0b0b9ca..ef95f4f9904 100644
--- a/src/uncategorized/futureSocities.tw
+++ b/src/uncategorized/futureSocities.tw
@@ -760,7 +760,7 @@ You are spending ¤$FSSpending each week to support your societal goals.
 <</if>>
 
 
-<<if $seeDicks != 0>>
+<<if $seeDicks != 0 || $makeDicks == 1>>
 <<if $arcologies[0].FSGenderFundamentalist is "unset">>
 <<if $arcologies[0].FSGenderRadicalist != "unset">>
 	<br>''You are pursuing'' a radical redefinition of gender that identifies powerful people as male, and everyone else as female.
diff --git a/src/uncategorized/longSlaveDescription.tw b/src/uncategorized/longSlaveDescription.tw
index 7e5114a7df8..42985c0ad17 100644
--- a/src/uncategorized/longSlaveDescription.tw
+++ b/src/uncategorized/longSlaveDescription.tw
@@ -2117,8 +2117,8 @@ Her scars make her look like she's in the right place.
 		The upper half of her face is covered by the hood of her latex suit: though she can see through eye-holes, these can easily be closed to blind her.
 	<<case "harem gauze">>
 		Her harem outfit includes the traditional veil for her face.
-+	<<case "a hijab and abaya">>
-+		Above the shoulders of her abaya, her hijab leaves only her face bare.
+	<<case "a hijab and abaya">>
+		Above the shoulders of her abaya, her hijab leaves only her face bare.
 	<<case "a chattel habit">>
 		A golden circlet crowns her white cowl, securing her habit to her head.
 	<<case "a succubus outfit">>
@@ -2178,12 +2178,12 @@ Her scars make her look like she's in the right place.
 		  <</if>>
 		<</if>>
 	<<else>>
-		<<if $activeSlave.eyes > -1>>
+		<<if $activeSlave.eyes == -2>>
+			She is @@color:red;blind@@, and moves very carefully as a result.
+		<<elseif $activeSlave.eyes > -1>>
 		  <<if $activeSlave.eyewear is "blurring contacts">>
 			She's wearing contacts designed to blur her vision, making her clumsy.
 		  <</if>>
-		<<elseif $activeSlave.eyes is -2>>
-			She is @@color:red;blind@@, and moves very carefully as a result.
 		<<else>>
 		  <<if $activeSlave.eyewear is "corrective contacts">>
 			She's wearing contact lenses to correct her @@color:yellow;nearsightedness@@.
diff --git a/src/uncategorized/nonRandomEvent.tw b/src/uncategorized/nonRandomEvent.tw
index 6041e616bf1..dcd8842741f 100644
--- a/src/uncategorized/nonRandomEvent.tw
+++ b/src/uncategorized/nonRandomEvent.tw
@@ -83,6 +83,8 @@
 <<elseif (_effectiveWeek > 18) && ($assistant > 0) && ($assistantOptions == 0)>>
 	<<set $Event = "assistant SP">>
 	<<goto "Assistant Events">>
+<<elseif (_effectiveWeek > 45) && ($bodyswapAnnounced == 1) && ($surgeryUpgrade == 1)>>
+	<<goto "P Bodyswap Reveal">>
 <<elseif ($arcologies[0].prosperity > 80) && ($TSS.schoolPresent+$GRI.schoolPresent+$SCP.schoolPresent+$LDE.schoolPresent+$TGA.schoolPresent+$TFS.schoolPresent == 0) && ($schoolSuggestion == 0)>>
 	<<goto "P school suggestion">>
 <<elseif ($assistantFSOptions == 0) && ($assistant > 0) && ($assistantAppearance != "normal") && ($arcologies[0].FSGenderRadicalistDecoration > 20 or $arcologies[0].FSGenderFundamentalistDecoration > 20 or $arcologies[0].FSPaternalistDecoration > 20 or $arcologies[0].FSDegradationistDecoration > 20 or $arcologies[0].FSBodyPuristDecoration > 20 or $arcologies[0].FSTransformationFetishistDecoration > 20 or $arcologies[0].FSYouthPreferentialistDecoration > 20 or $arcologies[0].FSMaturityPreferentialistDecoration > 20 or $arcologies[0].FSSlimnessEnthusiastDecoration > 20 or $arcologies[0].FSAssetExpansionistDecoration > 20 or $arcologies[0].FSPastoralistDecoration > 20 or $arcologies[0].FSPhysicalIdealistDecoration > 20 or $arcologies[0].FSChattelReligionistDecoration > 20 or $arcologies[0].FSRomanRevivalistDecoration > 20 or $arcologies[0].FSEgyptianRevivalistDecoration > 20 or $arcologies[0].FSEdoRevivalistDecoration > 20 or $arcologies[0].FSArabianRevivalistDecoration > 20 or $arcologies[0].FSChineseRevivalistDecoration > 20)>>
diff --git a/src/uncategorized/randomNonindividualEvent.tw b/src/uncategorized/randomNonindividualEvent.tw
index fc81caff87d..9beb58942fb 100644
--- a/src/uncategorized/randomNonindividualEvent.tw
+++ b/src/uncategorized/randomNonindividualEvent.tw
@@ -421,10 +421,14 @@
 	<<if ($Concubine != 0)>>
 	<<if $fuckSlaves > 1>>
 	<<if canTalk($Concubine)>>
+	<<if canSee($Concubine)>>
+	<<if canWalk($Concubine)>>
 		<<set $events.push("PE headgirl concubine")>>
 	<</if>>
 	<</if>>
 	<</if>>
+	<</if>>
+	<</if>>
 
 	<<if ($HeadGirl.dick > 0)>>
 	<<if ($HeadGirl.hormones < 1)>>
@@ -584,10 +588,14 @@
 <</if>>
 
 <<if ($Concubine != 0)>>
+	<<if canWalk($Concubine)>>
+	<<if canSee($Concubine)>>
 	<<set $PESSevent.push("loving concubine")>>
+	<</if>>
 	<<if canTalk($Concubine)>>
 		<<set $events.push("PE concubine interview")>>
 	<</if>>
+	<</if>>
 <</if>>
 
 /* Acquisition Events */
diff --git a/src/uncategorized/reNickname.tw b/src/uncategorized/reNickname.tw
index e658d4ad17c..6e3fc706a45 100644
--- a/src/uncategorized/reNickname.tw
+++ b/src/uncategorized/reNickname.tw
@@ -502,7 +502,7 @@
 	<<set $notApplyDesc to "realizes that her form isn't necessarily due to some master plan and that you may see fit to change it; she begins to regard the remote surgery with apprehension.">>
 	
 <<elseif ($nickname is "flat")>>
-	<<set $nickname to either("'Flatty'", "'Ironing Board'", "'Plank'", "'Undersized'", "'Itty Bitty'", "'Flat'")>>
+	<<set $nickname to either("'Flatty'", "'Ironing Board'", "'Plank'", "'Undersized'", "'Itty Bitty'", "'Flat'", "'DFC'")>>
 	<<set $situationDesc to "has barely any breats to speak of, she is completely flat. The slave society of the Free Cities tends to follow average male desires, which is to say that many slaves find themselves carrying comically oversized breasts. It's natural that slaves required to carry such burdens should resent her.">>
 	<<set $applyDesc to "further believes that chests should be deliciously flat, and is a little relieved at the added evidence that you don't plan to give her breasts the size of her head any time soon.">>
 	<<set $notApplyDesc to "realizes that her form isn't necessarily due to some master plan and that you may see fit to change it; she begins to regard the remote surgery with apprehension.">>
@@ -550,7 +550,7 @@
 	<<set $notApplyDesc to "accepts that her intellect is merely of slight interest.">>
 
 <<elseif ($nickname is "chubby")>>
-	<<set $nickname to either("'Plush'", "'Chubby'", "'Hambeast'", "'Jabba'", "'Bloated'", "'Landwhale'", "'Jiggly'", "'Tubby'", "'Whale'", "'Rotund'", "'Rubenesque'", "'Ample'", "'Jumbo'", "'Double Wide'")>>
+	<<set $nickname to either("'Plush'", "'Chubby'", "'Hambeast'", "'Jabba'", "'Bloated'", "'Landwhale'", "'Jiggly'", "'Tubby'", "'Whale'", "'Rotund'", "'Rubenesque'", "'Ample'", "'Jumbo'", "'Double Wide'", "'Feedee'", "'Plump'", "'Thicc'")>>
 	<<set $situationDesc to "is carrying a little extra weight. The cruelty of life as a slave increases your property's willingness to do cruelty where they can get away with it - what is passed to them, they pass to others - so she finds herself mocked for her size.">>
 	<<set $applyDesc to "knows that being fat makes her less valuable on the market, but she begins to accept that she's going to have to put up with being chubby for now.">>
 	<<set $notApplyDesc to "believes that this means she's going to have to lose weight soon, causing her some trepidation.">>
diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw
index 00d8ee40e17..89328d3a484 100644
--- a/src/uncategorized/slaveInteract.tw
+++ b/src/uncategorized/slaveInteract.tw
@@ -651,8 +651,8 @@ __Contraception__: <span id="fertility"><strong><<if $activeSlave.preg is -1>><<
 	<<if $activeSlave.reservedChildren > 0>>
 		$activeSlave.reservedChildren of her children will be placed in $incubatorName.
 		<<if ($activeSlave.reservedChildren < $activeSlave.pregType) && ($reservedChildren < ($incubator-$incubatorSlaves))>>
-			<<print "[[Keep another child|Incubator][$slaves[" + _i + "].reservedChildren += 1, $reservedChildren += 1]]">>
-			<<if $slaves[_i].reservedChildren > 0>>
+			<<print "[[Keep another child|Slave Interact][$activeSlave.reservedChildren += 1, $reservedChildren += 1]]">>
+			<<if $activeSlave.reservedChildren > 0>>
 				| [[Keep one less child|Slave Interact][$activeSlave.reservedChildren -= 1, $reservedChildren -= 1]]
 			<</if>>
 		<<elseif ($activeSlave.reservedChildren == $activeSlave.pregType) || ($reservedChildren == ($incubator-$tanks.length))>>
diff --git a/src/uncategorized/slaveSummary.tw b/src/uncategorized/slaveSummary.tw
index c8cae594d31..434659f05ff 100644
--- a/src/uncategorized/slaveSummary.tw
+++ b/src/uncategorized/slaveSummary.tw
@@ -346,7 +346,7 @@
 	<</if>>
 <</if>>
 <<case "Concubine Select">>
-<<if (_Slave.assignmentVisible == 1) && (_Slave.fuckdoll == 0) && (_Slave.devotion > 50) && canWalk(_Slave) && canSee(_Slave)>>
+<<if (_Slave.assignmentVisible == 1) && (_Slave.fuckdoll == 0) && (_Slave.devotion > 50) && _Slave.amp != 1>>
 	<br style="clear:both" /><<if $lineSeparations == 0>><br><<else>><hr style="margin:0"><</if>><<if $seeImages == 1>><div class="imageRef smlImg"><<SlaveArt _Slave 1>></div><</if>><<print "[[_Slave.slaveName|Concubine Workaround][$Concubine to $slaves["+_i+"]]]">>
 <<else>>
 	<<continue>>
-- 
GitLab