From c11744ecd580a4306fe368119aaa613a0c6070f8 Mon Sep 17 00:00:00 2001
From: hexall <hexall90.gmail.com>
Date: Sun, 10 Sep 2017 14:04:35 +0200
Subject: [PATCH] Growth stimulants are now a standard upgrade. Updated
 economyJS to consider stimulants costs.

---
 src/init/storyInit.tw              |  1 +
 src/js/economyJS.tw                |  1 +
 src/uncategorized/dispensary.tw    | 25 ++++++++++---------------
 src/uncategorized/saDrugs.tw       |  2 +-
 src/uncategorized/slaveInteract.tw | 14 +++++++-------
 5 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index 2904a4fd61d..59f8d16fc66 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -815,6 +815,7 @@ DairyRestraintsSetting($dairyRestraintsSetting)
 <<set $dietCleanse = 0>>
 <<set $cumProDiet = 0>>
 <<set $curativeUpgrade = 0>>
+<<set $growthStim = 0>>
 <<set $aphrodisiacUpgrade = 0>>
 <<set $aphrodisiacUpgradeRefine = 0>>
 <<set $healthyDrugsUpgrade = 0>>
diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw
index 0d80f3c45d7..3dfc0abd8fd 100644
--- a/src/js/economyJS.tw
+++ b/src/js/economyJS.tw
@@ -409,6 +409,7 @@ window.getSlaveCost = function(s) {
 	case 'intensive butt injections': case 'intensive penis enhancement': case 'intensive testicle enhancement':
 	case 'intensive lip injections': case 'hyper breast injections': case 'hyper butt injections':
 	case 'hyper penis enhancement': case 'hyper testicle enhancement': case 'hyper lip injections':
+	case 'growth stimulants':
 		cost += drugsCost * 5;
 		break;
 	case 'sag-B-gone':
diff --git a/src/uncategorized/dispensary.tw b/src/uncategorized/dispensary.tw
index bb5816a343a..5a8de5e40e1 100644
--- a/src/uncategorized/dispensary.tw
+++ b/src/uncategorized/dispensary.tw
@@ -211,6 +211,16 @@ The hormone replacement therapies
 
 <br><br>
 
+<<if ($growthStim == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>>
+	[[Purchase data on growth stimulants|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $growthStim = 1]]
+	//Costs ¤<<print 20000*$upgradeMultiplierMedicine>>//
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will allow the manufactoring of drugs able to increase the height of slaves.//
+<<elseif ($growthStim == 1)>>
+	The fabricator is able to produce growth stimulants.
+<</if>>
+
+<br><br>
+
 <<if ($aphrodisiacUpgradeRefine == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>>
 	[[Purchase data on refined aphrodisiacs|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $aphrodisiacUpgradeRefine = 1]]
 	//Costs ¤<<print 20000*$upgradeMultiplierMedicine>>//
@@ -395,21 +405,6 @@ __Societal Focused Research__
 	// Gender Radicalist focused research unavailable. //
 <</if>>
 
-<<if $arcologies[0].FSPhysicalIdealistDecoration == 100>>
-	<br>
-	<<if ($arcologies[0].FSPhysicalIdealistResearch == 0)>>
-		<<if ($rep >= 10000*$upgradeMultiplierMedicine)>>
-		  [[Fund research into developing growth stimulants|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine,$arcologies[0].FSPhysicalIdealistResearch = 1]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>. Will allow the manufactoring of growth stimulants to increase the height of slaves.//
-		<<else>>
-		  // You lack the reputation to access the research necessary to develop growth stimulants. //
-		<</if>>
-	<<else>>
-	  The fabricator has been upgraded to manufacture growth stimulants.
-	<</if>>
-<<else>>
-	<br>// Physical Idealist focused research unavailable. //
-<</if>>
-
 <<if ($ImplantProductionUpgrade == 1) and ($arcologies[0].FSTransformationFetishistDecoration >= 100)>>
 	<br>
 	<<if ($arcologies[0].FSTransformationFetishistResearch == 0) and ($rep <= 5000*$upgradeMultiplierMedicine)>>
diff --git a/src/uncategorized/saDrugs.tw b/src/uncategorized/saDrugs.tw
index a6324c86c6b..c467bc65846 100644
--- a/src/uncategorized/saDrugs.tw
+++ b/src/uncategorized/saDrugs.tw
@@ -1127,7 +1127,7 @@
 /* DRUG EXPIRY */
 <<switch $slaves[$i].drugs>>
 <<case "growth stimulants">>
-	<<set _maxHeight = Math.clamp((Height.mean($slaves[$i]) * 1.5),0,274)>>
+	<<set _maxHeight = Math.clamp((Height.mean($slaves[$i]) * 1.25),0,274)>>	/*max achievable height is expected height plus 25%*/
 	<<if  $slaves[$i].height >= _maxHeight>>
 		$possessiveCap body has already grown far past $possessive natural limits, further injections of stimulants will have no effect. @@.yellow;$possessiveCap drug regimen has been ended.@@
 		<<set $slaves[$i].height = Math.clamp($slaves[$i].height,0,_maxHeight), $slaves[$i].drugs = "no drugs">>
diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw
index 30f860b1a10..b4a91fe2249 100644
--- a/src/uncategorized/slaveInteract.tw
+++ b/src/uncategorized/slaveInteract.tw
@@ -840,13 +840,6 @@
 <<else>>
 	| Breasts
 <</if>>
-<<if $arcologies[0].FSPhysicalIdealistResearch == 1>>
-<<if $activeSlave.height < 274>>
-	| <<link "Growth Stimulants">><<set $activeSlave.drugs = "growth stimulants">><<replace "#drugs">><strong>$activeSlave.drugs</strong><</replace>><</link>>
-<<else>>
-	| Growth Stimulants
-<</if>>
-<</if>>
 <<if $arcologies[0].FSAssetExpansionistResearch == 1>>
 <<if ($activeSlave.boobs < 25000)>>
   | <<link "Hyper-Breasts">><<set $activeSlave.drugs = "hyper breast injections">><<replace "#drugs">><strong>$activeSlave.drugs</strong><</replace>><</link>>
@@ -897,6 +890,13 @@
   | Lip reducers
 <</if>>
 <</if>>
+<<if $growthStim == 1>>
+<<if $activeSlave.height < 274>>
+	| <<link "Growth Stimulants">><<set $activeSlave.drugs = "growth stimulants">><<replace "#drugs">><strong>$activeSlave.drugs</strong><</replace>><</link>>
+<<else>>
+	| Growth Stimulants
+<</if>>
+<</if>>
 | <<link "Fertility">><<set $activeSlave.drugs = "fertility drugs">><<replace "#drugs">><strong>$activeSlave.drugs</strong><</replace>><</link>>
 <<if ($seeHyperPreg == 1) && ($activeSlave.indentureRestrictions < 1) && ($superFertilityDrugs == 1) && $activeSlave.breedingMark != 1>>
  | <<link "Fertility+">><<set $activeSlave.drugs = "super fertility drugs">><<replace "#drugs">><strong>$activeSlave.drugs</strong><</replace>><</link>>
-- 
GitLab