From b1300ceebc6cbee3b46fb5cc428b7eb0cd06a054 Mon Sep 17 00:00:00 2001
From: j <okp57855@psoxs.com>
Date: Thu, 14 Dec 2017 12:09:39 +1300
Subject: [PATCH] Final touches.

---
 src/init/storyInit.tw                        |  6 ++++++
 src/uncategorized/BackwardsCompatibility.tw  |  2 ++
 src/uncategorized/costs.tw                   |  4 +++-
 src/uncategorized/costsReport.tw             |  4 ++++
 src/uncategorized/personalAttentionSelect.tw | 16 ++++++++--------
 5 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index 828a997bb21..8cd055f2c4f 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -1274,6 +1274,12 @@ erectileImplant: 0
 <<if ndef $AgeTrainingLowerBounds>>
 	<<set $AgeTrainingLowerBounds = 12>>
 <</if>>
+<<if ndef $MinEffectedAge>>
+	<<set $MinEffectedAge = 3>>
+<</if>>
+<<if ndef $PastPrimeAge>>
+	<<set $PastPrimeAge = 21>>
+<</if>>
 
 /* Security Expansion */
 <<set $secExp = 0>>
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index b7020065fe1..54813453e65 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -2813,6 +2813,8 @@ Setting missing slave variables:
 <<set $AgeTrainingEffect = 1>>
 <<set $AgeTrainingUpperBounds = 14>>
 <<set $AgeTrainingLowerBounds = 12>>
+<<set $MinEffectedAge = 3>>
+<<set $PastPrimeAge = 21>>
 
 <<HeroSlavesCleanup>>
 Done!
diff --git a/src/uncategorized/costs.tw b/src/uncategorized/costs.tw
index 4ec588dcc85..dd1bd526e8b 100644
--- a/src/uncategorized/costs.tw
+++ b/src/uncategorized/costs.tw
@@ -433,12 +433,14 @@
 	<<set $costs += 1000>>
 <</if>>
 
+<<set $MinEffectedAge = 3, $PastPrimeAge = 21>>
 <<set $cost = 10000*$AgePricing>>	
 
-
+<<if $PC.actualAge >= $MinEffectedAge && $PC.actualAge < $PastPrimeAge>>
 <<if ($personalAttention == "trading") || ($personalAttention == "warfare") || ($personalAttention == "slaving") || ($personalAttention == "engineering") || ($personalAttention == "medicine")>>
 	<<set $costs += $cost>>
 <</if>>
+<</if>>
 
 <<if $cyberMod != 0 && $researchLab.built == "true">>
 	<<set $costs += ((100*$researchLab.maxSpace)+(300*$researchLab.hired)+(100*$researchLab.hired))>>
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index 6114ac39697..97a3c27be0e 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -208,6 +208,9 @@
 <</if>>
 
 <<set $cost = 10000*$AgePricing>>	
+
+<<set $MinEffectedAge = 3, $PastPrimeAge = 21>>
+<<if $PC.actualAge >= $MinEffectedAge && $PC.actualAge < $PastPrimeAge>>
 <<if ($personalAttention == "trading")>>
 	<br>Trading trainer fees: ¤$cost
 <<elseif ($personalAttention == "warfare")>>
@@ -219,6 +222,7 @@
 <<elseif ($personalAttention == "medicine")>>
 	<br>Medicine trainer fees: ¤$cost
 <</if>>
+<</if>>
 
 <br>
 
diff --git a/src/uncategorized/personalAttentionSelect.tw b/src/uncategorized/personalAttentionSelect.tw
index 7b43c4f9a9d..7d88c60880a 100644
--- a/src/uncategorized/personalAttentionSelect.tw
+++ b/src/uncategorized/personalAttentionSelect.tw
@@ -32,9 +32,9 @@
 
 <<set $cost = 10000*$AgePricing>>
 
-<<set _MinEffectedAge = 3, _PastPrimeAge = 21>>
+<<set $MinEffectedAge = 3, $PastPrimeAge = 21>>
 
-<<if $PC.actualAge >= _MinEffectedAge>>
+<<if $PC.actualAge >= $MinEffectedAge>>
 <<if $PC.trading >= 100>>
 	<br>//You are a master trader.//
 <<else>>
@@ -47,7 +47,7 @@
 	<</if>>
 	<<if $personalAttention == "trading">>
 		You are training in venture capitalism.
-	<<elseif $PC.trading < 100 && $PC.actualAge < _PastPrimeAge>>
+	<<elseif $PC.trading < 100 && $PC.actualAge < $PastPrimeAge>>
 		<br>[[Hire a merchant to train you in commerce|Main][$personalAttention = "trading", $personalAttentionChanged = 1]]
 	<</if>>
 <</if>>
@@ -63,7 +63,7 @@
 	<</if>>
 	<<if $personalAttention == "warfare">>
 		You are training in tactics.
-	<<elseif $PC.warfare < 100 && $PC.actualAge < _PastPrimeAge>>
+	<<elseif $PC.warfare < 100 && $PC.actualAge < $PastPrimeAge>>
 		<br>[[Hire a mercenary to train you in warfare|Main][$personalAttention = "warfare", $personalAttentionChanged = 1]]
 	<</if>>
 <</if>>
@@ -79,7 +79,7 @@
 	<</if>>
 	<<if $personalAttention == "slaving">>
 		You are training in slaving.
-	<<elseif $PC.slaving < 100 && $PC.actualAge < _PastPrimeAge>>
+	<<elseif $PC.slaving < 100 && $PC.actualAge < $PastPrimeAge>>
 		<br>[[Hire a slaver to train you in slaving|Main][$personalAttention = "slaving", $personalAttentionChanged = 1]]
 	<</if>>
 <</if>>
@@ -95,7 +95,7 @@
 	<</if>>
 	<<if $personalAttention == "engineering">>
 		You are training in arcology engineering.
-	<<elseif $PC.engineering < 100 && $PC.actualAge < _PastPrimeAge>>
+	<<elseif $PC.engineering < 100 && $PC.actualAge < $PastPrimeAge>>
 		<br>[[Hire an engineer to train you in engineering|Main][$personalAttention = "engineering", $personalAttentionChanged = 1]]
 	<</if>>
 <</if>>
@@ -111,12 +111,12 @@
 	<</if>>
 	<<if $personalAttention == "medicine">>
 		You are training in slave surgery.
-	<<elseif $PC.medicine < 100 && $PC.actualAge < _PastPrimeAge>>
+	<<elseif $PC.medicine < 100 && $PC.actualAge < $PastPrimeAge>>
 		<br>[[Hire a doctor to train you in medicine|Main][$personalAttention = "medicine", $personalAttentionChanged = 1]]
 	<</if>>
 <</if>>
 <</if>>
-<<if $PC.actualAge >= _MinEffectedAge && $PC.actualAge < _PastPrimeAge && ($PC.medicine < 100 || $PC.engineering < 100 || $PC.slaving < 100 || $PC.warfare < 100 || $PC.trading < 100)>><br>//Training will cost ¤$cost per week.//<br><br><<else>><br><br><</if>>
+<<if $PC.actualAge >= $MinEffectedAge && $PC.actualAge < $PastPrimeAge && ($PC.medicine < 100 || $PC.engineering < 100 || $PC.slaving < 100 || $PC.warfare < 100 || $PC.trading < 100)>><br>//Training will cost ¤$cost per week.//<br><br><<else>><br><br><</if>>
 
 <<if ($personalAttentionChanged == 1)>>
 <<if ($activeSlave.health < -20)>>
-- 
GitLab