From 886009d4333d6fc3c5df5a963b76df392df03d09 Mon Sep 17 00:00:00 2001
From: DCoded <dcoded@live.com>
Date: Tue, 12 Mar 2019 00:35:06 -0400
Subject: [PATCH] Reverted revert

---
 devNotes/Useful JS Function Documentation.txt |  4 +-
 src/js/slaveSummaryWidgets.js                 |  8 +-
 src/js/utilJS.js                              |  3 +-
 src/utility/descriptionWidgetsFlesh.tw        | 92 +++++++++----------
 4 files changed, 54 insertions(+), 53 deletions(-)

diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt
index 1c43d2d4bae..ddba478313f 100644
--- a/devNotes/Useful JS Function Documentation.txt	
+++ b/devNotes/Useful JS Function Documentation.txt	
@@ -167,10 +167,10 @@ lispReplace(string) - Returns the string lispified.
 nippleColor(slave) - Returns the slave's nipple color.
 
 UtilJS [script]
-	TODO: update this
-	num() - Returns the value thousand separated with ',' if $formatNumbers > 0 else provides the raw value.
+	num() - Returns the value thousand separated with ',' if $formatNumbers > 0 else provides the raw value. Returns an integer if $showNumbers == 0, numbers up to a preset max as words if $showNumbers == 1, or only words if $showNumbers == 2.
 		line 138 of src/SpecialForce/Report.tw, '...focused their <<print num($SFUnit.Troops)>> troops'
 		if $formatNumbers > 0 'focused their 1,589 troops' else 'focused their 1589 troops'
+		if $showNumbers == 0 'focused their 1,589 troops', if $showNumbers == 1 'focused their 1,589 troops' (unless the max is set to more than 1,589), else 'focused their one thousand five hundred eighty-nine troops'
 
 	cashFormat() - uses the above function to return the value thousand separated with ',' if $formatNumbers > 0 else provides the raw value. either way prepends ¤ (the fc domination) symbol.
 		line 157 of the previously listed file, '...totaling @@.yellowgreen;<<print cashFormat(_SFIncome)>>@@'
diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js
index ad365b27121..0a99dbb15d8 100644
--- a/src/js/slaveSummaryWidgets.js
+++ b/src/js/slaveSummaryWidgets.js
@@ -2294,7 +2294,7 @@ window.SlaveSummaryUncached = (function(){
 	function long_age(slave) {
 		r += `<span class="pink">`;
 		if (V.showAgeDetail === 1) {
-			r += `Age ${slave.actualAge}.`;
+			r += `Age ` + num(`${slave.actualAge}`) + `.`;
 		} else if (slave.actualAge >= 40) {
 			r += `Forties.`;
 		} else if (slave.actualAge >= 35) {
@@ -2319,10 +2319,10 @@ window.SlaveSummaryUncached = (function(){
 		*/
 		if (((slave.geneMods.NCS === 0) || (slave.visualAge >= slave.physicalAge))) {
 			if (slave.actualAge !== slave.physicalAge) {
-				r += `${slave.physicalAge} year old body. `;
+				r += num(`${slave.physicalAge}`) + ` year old body. `;
 			}
 			if (slave.visualAge !== slave.physicalAge) {
-				r += `Looks ${slave.visualAge}. `;
+				r += `Looks ` + num(`${slave.visualAge}`) + `. `;
 			}
 		} else {
 			/*
@@ -2334,7 +2334,7 @@ window.SlaveSummaryUncached = (function(){
 			** say: 'Age 1. 11 year old body.' -- this conflicts with the way NCS works though, because she hasn't
 			** visually aged, so our change here makes it say 'Age 1. Appears to have a 10 year old body.'
 			*/
-			r += `Appears to have a ${slave.visualAge} year old body. `;
+			r += `Appears to have a ` + num(`${slave.visualAge}`) + ` year old body. `;
 		}
 		if (slave.geneMods.NCS === 1) {
 			r += `(<span class="orange">NCS</span>) `;
diff --git a/src/js/utilJS.js b/src/js/utilJS.js
index 3bc8dba19d9..cf406cf2f81 100644
--- a/src/js/utilJS.js
+++ b/src/js/utilJS.js
@@ -507,8 +507,9 @@ window.num = function(x) {
 		}
 		if (State.variables.formatNumbers !== 1) {
 			return s;
+		} else {
+			return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
 		}
-		return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
 	}
 
 	if (V.showNumbers !== 2) {
diff --git a/src/utility/descriptionWidgetsFlesh.tw b/src/utility/descriptionWidgetsFlesh.tw
index c4d21c9abdd..191048326e8 100644
--- a/src/utility/descriptionWidgetsFlesh.tw
+++ b/src/utility/descriptionWidgetsFlesh.tw
@@ -1011,36 +1011,36 @@ $His
 <<elseif $activeSlave.boobs < 500>><<print either("perky", "small")>> <<print either("boobs", "bosoms", "breasts", "tits")>><<if $showBoobCCs == 1>>, <<print $activeSlave.boobs>> CCs each,<</if>> would fill B-cups.
 <<elseif $activeSlave.boobs < 650>><<print either("curved", "healthy")>> <<print either("boobs", "bosoms", "breasts", "tits")>><<if $showBoobCCs == 1>>, <<print $activeSlave.boobs>> CCs each,<</if>> would fill C-cups.
 <<elseif $activeSlave.boobs < 800>><<print either("big", "sizable")>> <<print either("boobs", "bosoms", "breasts", "tits")>><<if $showBoobCCs == 1>>, <<print $activeSlave.boobs>> CCs each,<</if>> would fill D-cups.
-<<elseif $activeSlave.boobs < 1000>><<print either("big", "large")>> <<print either("boobs", "bosoms", "breasts", "tits")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill DD-cups.
-<<elseif $activeSlave.boobs < 1200>><<print either("hefty", "proud")>> <<print either("tits", "breasts", "mammaries", "udders", "boobs")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill F-cups.
-<<elseif $activeSlave.boobs < 1400>><<print either("hefty", "huge")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill G-cups.
-<<elseif $activeSlave.boobs < 1600>><<print either("huge", "massive")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill H-cups.
-<<elseif $activeSlave.boobs < 1800>><<print either("enormous", "massive")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill I-cups.
-<<elseif $activeSlave.boobs < 2050>><<print either("enormous", "titanic")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill J-cups.
-<<elseif $activeSlave.boobs < 2300>><<print either("stupendous", "titanic")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill K-cups.
-<<elseif $activeSlave.boobs < 2600>><<print either("magnificent", "stupendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill L-cups.
-<<elseif $activeSlave.boobs < 2900>><<print either("impressive", "magnificent")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill M-cups.
-<<elseif $activeSlave.boobs < 3250>><<print either("awe-inspiring", "impressive")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill N-cups.
-<<elseif $activeSlave.boobs < 3600>><<print either("absurd", "awe-inspiring")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill O-cups.
-<<elseif $activeSlave.boobs < 3950>><<print either("attention-grabbing", "disproportionate")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill P-cups.
-<<elseif $activeSlave.boobs < 4300>><<print either("massive", "shocking")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill Q-cups.
-<<elseif $activeSlave.boobs < 4700>><<print either("jaw-dropping", "striking")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill R-cups.
+<<elseif $activeSlave.boobs < 1000>><<print either("big", "large")>> <<print either("boobs", "bosoms", "breasts", "tits")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill DD-cups.
+<<elseif $activeSlave.boobs < 1200>><<print either("hefty", "proud")>> <<print either("tits", "breasts", "mammaries", "udders", "boobs")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill F-cups.
+<<elseif $activeSlave.boobs < 1400>><<print either("hefty", "huge")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill G-cups.
+<<elseif $activeSlave.boobs < 1600>><<print either("huge", "massive")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill H-cups.
+<<elseif $activeSlave.boobs < 1800>><<print either("enormous", "massive")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill I-cups.
+<<elseif $activeSlave.boobs < 2050>><<print either("enormous", "titanic")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill J-cups.
+<<elseif $activeSlave.boobs < 2300>><<print either("stupendous", "titanic")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill K-cups.
+<<elseif $activeSlave.boobs < 2600>><<print either("magnificent", "stupendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill L-cups.
+<<elseif $activeSlave.boobs < 2900>><<print either("impressive", "magnificent")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill M-cups.
+<<elseif $activeSlave.boobs < 3250>><<print either("awe-inspiring", "impressive")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill N-cups.
+<<elseif $activeSlave.boobs < 3600>><<print either("absurd", "awe-inspiring")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill O-cups.
+<<elseif $activeSlave.boobs < 3950>><<print either("attention-grabbing", "disproportionate")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill P-cups.
+<<elseif $activeSlave.boobs < 4300>><<print either("massive", "shocking")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill Q-cups.
+<<elseif $activeSlave.boobs < 4700>><<print either("jaw-dropping", "striking")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill R-cups.
 <<elseif $activeSlave.boobs < 5000+($activeSlave.muscles*10) && $activeSlave.physicalAge <= 3>>
 	<<if ($activeSlave.amp == 1)>>
-		<<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups and are so large that $he might not be able to walk, if $he still had legs.
+		<<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups and are so large that $he might not be able to walk, if $he still had legs.
 	<<elseif ($activeSlave.muscles > 5)>>
-		<<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups and are so large that $his <<if $activeSlave.muscles > 95>>shredded<<elseif $activeSlave.muscles > 30>>rippling<<else>>toned<</if>> back muscles get a workout just from supporting them. If they grow any larger, $he may not be able to walk.
+		<<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups and are so large that $his <<if $activeSlave.muscles > 95>>shredded<<elseif $activeSlave.muscles > 30>>rippling<<else>>toned<</if>> back muscles get a workout just from supporting them. If they grow any larger, $he may not be able to walk.
 	<<else>>
-		<<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups and are so large that $he can barely stand. If they grow any larger, $he may not be able to walk.
+		<<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups and are so large that $he can barely stand. If they grow any larger, $he may not be able to walk.
 	<</if>>
-<<elseif $activeSlave.boobs < 5100>><<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups.
-<<elseif $activeSlave.boobs < 5500>><<print either("frightening", "unmissable")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill T-cups.
-<<elseif $activeSlave.boobs < 6000>><<print either("attention-grabbing", "unmissable")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill U-cups.
-<<elseif $activeSlave.boobs < 6500>><<print either("attention-grabbing", "spectacular")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill V-cups.
-<<elseif $activeSlave.boobs < 7000>><<print either("obviously engineered", "spectacular")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill W-cups.
-<<elseif $activeSlave.boobs < 7500>><<print either("disproportionate", "obviously engineered")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill X-cups.
-<<elseif $activeSlave.boobs < 8000>><<print either("disproportionate", "nearly inhuman")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill Y-cups.
-<<elseif $activeSlave.boobs < 8500>><<print either("nearly alien", "nearly inhuman")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> would fill Z-cups.
+<<elseif $activeSlave.boobs < 5100>><<print either("astounding", "tremendous")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill S-cups.
+<<elseif $activeSlave.boobs < 5500>><<print either("frightening", "unmissable")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill T-cups.
+<<elseif $activeSlave.boobs < 6000>><<print either("attention-grabbing", "unmissable")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill U-cups.
+<<elseif $activeSlave.boobs < 6500>><<print either("attention-grabbing", "spectacular")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill V-cups.
+<<elseif $activeSlave.boobs < 7000>><<print either("obviously engineered", "spectacular")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill W-cups.
+<<elseif $activeSlave.boobs < 7500>><<print either("disproportionate", "obviously engineered")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill X-cups.
+<<elseif $activeSlave.boobs < 8000>><<print either("disproportionate", "nearly inhuman")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill Y-cups.
+<<elseif $activeSlave.boobs < 8500>><<print either("nearly alien", "nearly inhuman")>> <<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> would fill Z-cups.
 <<elseif $activeSlave.boobs < 10000+($activeSlave.muscles*20) && $activeSlave.physicalAge <= 12>>
 	<<if ($activeSlave.amp == 1)>>
 		<<print either("boobs", "breasts", "mammaries", "udders")>> have <<if $activeSlave.boobsImplant>>been altered<<else>>grown<</if>> past any pretense of proportion.<<if $showBoobCCs == 1>> At <<print num($activeSlave.boobs)>> CCs each, they<<else>> They<</if>> are so large that $he might not be able to walk, if $he still had legs.
@@ -1057,7 +1057,7 @@ $His
 	<<else>>
 		<<print either("boobs", "breasts", "mammaries", "udders")>> have <<if $activeSlave.boobsImplant>>been altered<<else>>grown<</if>> past any pretense of proportion.<<if $showBoobCCs == 1>> At <<print num($activeSlave.boobs)>> CCs each, they<<else>> They<</if>> are so large that $he can barely stand. If they grow any larger, $he may not be able to walk.
 	<</if>>
-<<elseif $activeSlave.boobs < 20000>><<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print commaNum($activeSlave.boobs)>> CCs each,<</if>> have <<if $activeSlave.boobsImplant>>been altered<<else>>grown<</if>> past any pretense of proportion.
+<<elseif $activeSlave.boobs < 20000>><<print either("breasts", "mammaries", "tits", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> have <<if $activeSlave.boobsImplant>>been altered<<else>>grown<</if>> past any pretense of proportion.
 <<elseif $activeSlave.boobs < 30000+($activeSlave.muscles*100) && $activeSlave.physicalAge >= 18>>
 	<<if $activeSlave.amp == 1>>
 		<<print either("boobs", "breasts", "mammaries", "udders")>><<if $showBoobCCs == 1>>, <<print num($activeSlave.boobs)>> CCs each,<</if>> are so large that $he might not be able to walk, if $he still had legs.
@@ -16763,9 +16763,9 @@ $He has
 			<<if $activeSlave.actualAge == 0>>
 				<<print 0+$week-$activeSlave.weekAcquired>> weeks
 			<<elseif $activeSlave.actualAge == 1>>
-				$activeSlave.actualAge year
+				<<= num($activeSlave.actualAge)>> year
 			<<else>>
-				$activeSlave.actualAge years
+				<<= num($activeSlave.actualAge)>> years
 			<</if>>
 			old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
@@ -16773,84 +16773,84 @@ $He has
 			<<if $activeSlave.actualAge == 0>>
 				<<print 0+$week-$activeSlave.weekAcquired>> weeks
 			<<elseif $activeSlave.actualAge == 1>>
-				$activeSlave.actualAge year
+				<<= num($activeSlave.actualAge)>> year
 			<<else>>
-				$activeSlave.actualAge years
+				<<= num($activeSlave.actualAge)>> years
 			<</if>>
 			old.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 5>>
 		a toddler,
 		<<if $showAgeDetail == 1>>
-			$activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			<<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
-			only $activeSlave.actualAge years old.
+			only <<= num($activeSlave.actualAge)>> years old.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 13>>
 		a little $girl,
 		<<if $showAgeDetail == 1>>
-			$activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			<<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
-			only $activeSlave.actualAge years old.
+			only <<= num($activeSlave.actualAge)>> years old.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 16>>
 		almost a child,
 		<<if $showAgeDetail == 1>>
-			$activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			<<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
 			less than 17 years old.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 17>>
-		young and fresh at $activeSlave.actualAge<<if $showAgeDetail == 1 && ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+		young and fresh at <<= num($activeSlave.actualAge)>><<if $showAgeDetail == 1 && ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 	<<elseif $activeSlave.actualAge < 18>>
 		young, fresh, and nearly 18<<if $showAgeDetail == 1 && ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<if $seeAge == 1>> and people are already beginning to eye $him<</if>><<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 	<<elseif $activeSlave.actualAge < 19>>
 		<<if $activeSlave.birthWeek == 0 && $seeAge == 1>>
-			just turned $activeSlave.actualAge this week, which many citizens find especially appealing.
+			just turned <<= num($activeSlave.actualAge)>> this week, which many citizens find especially appealing.
 		<<elseif $activeSlave.birthWeek < 4 && $seeAge == 1>>
-			only turned $activeSlave.actualAge this month.
+			only turned <<= num($activeSlave.actualAge)>> this month.
 		<<else>>
-			$activeSlave.actualAge years old<<if $showAgeDetail == 1 && ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			<<= num($activeSlave.actualAge)>> years old<<if $showAgeDetail == 1 && ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 20>>
 		in $his final year as a teenager at age 19<<if $showAgeDetail == 1 && ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 	<<elseif $activeSlave.actualAge < 26>>
 		a young $woman,
 		<<if $showAgeDetail == 1>>
-			$activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			<<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
 			in $his early twenties.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 30>>
 		a younger $woman,
 		<<if $showAgeDetail == 1>>
-			$activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			<<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
 			in $his late twenties.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 36>>
 		<<if $showAgeDetail == 1>>
-			$activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			<<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
 			in $his early thirties.
 		<</if>>
 	<<elseif $activeSlave.actualAge < 40>>
 		middle-aged for a slave,
 		<<if $showAgeDetail == 1>>
-			at $activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			at <<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
 			in $his late thirties.
 		<</if>>
 	<<else>>
 		old for a slave,
 		<<if $showAgeDetail == 1>>
-			at $activeSlave.actualAge years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
+			at <<= num($activeSlave.actualAge)>> years old<<if ($seeAge != 0)>>; <<if $activeSlave.birthWeek == 51>>$his birthday is next week<<else>>$his birthday is in <<print 52-$activeSlave.birthWeek>> weeks<</if>><</if>>.
 		<<else>>
-			<<if $activeSlave.actualAge < 50>>in $his forties.<<elseif $activeSlave.actualAge < 60>>in $his fifties. <<elseif $activeSlave.actualAge < 70>>extremely old for a slave, in $his 60s.<<elseif $activeSlave.actualAge < 80>>extremely old for a slave, in $his 70s. <<elseif $activeSlave.actualAge < 90>>extremely old for a slave, in $his 80s.<<elseif $activeSlave.actualAge < 100>>extremely old for a slave, in $his 90s.<<elseif $activeSlave.actualAge >= 100>>ancient by any measure, over a century old.<</if>>
+			<<if $activeSlave.actualAge < 50>>in $his forties.<<elseif $activeSlave.actualAge < 60>>in $his fifties. <<elseif $activeSlave.actualAge < 70>>extremely old for a slave, in $his 60s.<<elseif $activeSlave.actualAge < 80>>extremely old for a slave, in $his <<= num(70)>>s. <<elseif $activeSlave.actualAge < 90>>extremely old for a slave, in $his <<= num(80)>>s.<<elseif $activeSlave.actualAge < 100>>extremely old for a slave, in $his <<= num(90)>>s.<<elseif $activeSlave.actualAge >= 100>>ancient by any measure, over a century old.<</if>>
 		<</if>>
 	<</if>>
 	<<if $activeSlave.actualAge != $activeSlave.physicalAge>>
-		However, $he has the body of a <<print $activeSlave.physicalAge>>-year old;
+		However, $he has the body of a <<= num($activeSlave.physicalAge)>>-year old;
 		<<if $activeSlave.physicalAge < 18 && $activeSlave.actualAge >= 18>>
 			a stark contrast given $his maturity.
 		<<elseif $activeSlave.physicalAge < 18 && $activeSlave.actualAge < 18>>
-- 
GitLab