From 3bcb3e1e572ea5c34f8ec81d600da63fddcb4bd0 Mon Sep 17 00:00:00 2001
From: corncobman21 <corncobman21@hotmail.com>
Date: Mon, 1 Jan 2018 22:11:19 -0500
Subject: [PATCH] Count slim, stacked, etc. from within passage itself

---
 src/uncategorized/clubReport.tw | 77 +++++++++++++++++++++++++++------
 1 file changed, 63 insertions(+), 14 deletions(-)

diff --git a/src/uncategorized/clubReport.tw b/src/uncategorized/clubReport.tw
index a012fa6ec26..80ee00b7111 100644
--- a/src/uncategorized/clubReport.tw
+++ b/src/uncategorized/clubReport.tw
@@ -6,8 +6,7 @@
 <<SlaveSort $ClubiIDs>>
 <<set _DL = $ClubiIDs.length, $clubSlaves = _DL, _SL = $slaves.length, $clubBonuses = 0, $DJRepBonus = 0, $legendaryEntertainerID = 0, _FLsFetish = 0>>
 <<set $legendaryWombID = 0>>
-
-<<set _clubSlaves = $slaves.filter(function(s) { return s.assignment == "serve in the club" || s.ID == $DJ.ID })>>
+<<set _modded = 0, _old = 0, _pure = 0, _slim = 0, _stacked = 0, _unmodded = 0, _XX = 0, _XY = 0, _young = 0, _pregYes = 0, _pregNo = 0>>
 
 <!-- Statistics gathering; income is rep boosts in numbers, and profit will be rep per cash unit, or cash unit per rep -->
 <<set $facility = $facility || {}, $facility.club = initFacilityStatistics($facility.club)>>
@@ -163,6 +162,37 @@
 		<</silently>>
 	<</if>>
 	<<set $DJ = $slaves[_FLs]>>
+	<<if isSlim($slaves[_FLs]) == true>>
+		<<set _slim += 1>>
+	<</if>>
+	<<if isStacked($slaves[_FLs]) == true>>
+		<<set _stacked += 1>>
+	<</if>>
+	<<if isYoung($slaves[_FLs]) == true>>
+		<<set _young += 1>>
+	<<else>>
+		<<set _old += 1>>
+	<</if>>
+	<<if isModded($slaves[_FLs]) == true>>
+		<<set _young += 1>>
+	<<else>>
+		<<set _old += 1>>
+	<</if>>
+	<<if isXX($slaves[_FLs]) == true>>
+		<<set _XX += 1>>
+	<<else>>
+		<<set _XY += 1>>
+	<</if>>
+	<<if isPure($slaves[_FLs]) == true>>
+		<<set _pure += 1>>
+	<<else>>
+		<<set _implanted += 1>>
+	<</if>>
+	<<if isPreg($slaves[_FLs]) == true>>
+		<<set _pregYes += 1>>
+	<<else>>
+		<<set _pregNo += 1>>
+	<</if>>
 <</if>>
 
 <<if (_DL > 0)>>
@@ -239,6 +269,37 @@
 			<<include "SA devotion">>
 			<</silently>>
 		<</if>>
+		<<if isSlim($slaves[$i]) == true>>
+			<<set _slim += 1>>
+		<</if>>
+		<<if isStacked($slaves[$i]) == true>>
+			<<set _stacked += 1>>
+		<</if>>
+		<<if isYoung($slaves[$i]) == true>>
+			<<set _young += 1>>
+		<<else>>
+			<<set _old += 1>>
+		<</if>>
+		<<if isModded($slaves[$i]) == true>>
+			<<set _young += 1>>
+		<<else>>
+			<<set _old += 1>>
+		<</if>>
+		<<if isXX($slaves[$i]) == true>>
+			<<set _XX += 1>>
+		<<else>>
+			<<set _XY += 1>>
+		<</if>>
+		<<if isPure($slaves[$i]) == true>>
+			<<set _pure += 1>>
+		<<else>>
+			<<set _implanted += 1>>
+		<</if>>
+		<<if isPreg($slaves[$i]) == true>>
+			<<set _pregYes += 1>>
+		<<else>>
+			<<set _pregNo += 1>>
+		<</if>>
 	<</for>>
 
 	<br><br>&nbsp;&nbsp;&nbsp;
@@ -249,8 +310,6 @@
 	<<if ($arcologies[0].FSAssetExpansionist == "unset") && ($arcologies[0].FSSlimnessEnthusiast == "unset")>>
 	<<if ($clubAdsSpending == 0) || ($clubAdsStacked == 0)>>
 		<<set _possibleBonuses++>>
-		<<set _slim = slimCount(_clubSlaves)>>
-		<<set _stacked = stackedCount(_clubSlaves)>>
 		<<if (_slim > 0) && (_stacked > 0) && (Math.abs(_slim-_stacked) <= (_DL/3))>>
 		<<set $repGain += _DL*random(5,10), $clubBonuses++>>
 		There is a @@.green;wide@@ variety of slim and stacked slaves working the club.
@@ -260,8 +319,6 @@
 	<<if ($arcologies[0].FSDegradationist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>>
 	<<if ($clubAdsSpending == 0) || ($clubAdsModded == 0)>>
 		<<set _possibleBonuses++>>
-		<<set _modded = moddedCount(_clubSlaves)>>
-		<<set _unmodded = unmoddedCount(_clubSlaves)>>
 		<<if (_modded > 0) && (_unmodded > 0) && (Math.abs(_modded-_unmodded) <= (_DL/3))>>
 		<<set $repGain += _DL*random(5,10), $clubBonuses++>>
 		There are @@.green;both@@ heavily pierced and tattooed slaves and slaves with more natural bodies filling the club.
@@ -271,8 +328,6 @@
 	<<if ($arcologies[0].FSTransformationFetishist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>>
 	<<if ($clubAdsSpending == 0) || ($clubAdsImplanted == 0)>>
 		<<set _possibleBonuses++>>
-		<<set _implanted = implantedCount(_clubSlaves)>>
-		<<set _pure = pureCount(_clubSlaves)>>
 		<<if (_implanted > 0) && (_pure > 0) && (Math.abs(_implanted-_pure) <= (_DL/3))>>
 		<<set $repGain += _DL*random(5,10), $clubBonuses++>>
 		Citizens in $clubName can easily find @@.yellowgreen;both@@ all-natural girls, and slaves whose beauty has been improved by surgical means.
@@ -282,8 +337,6 @@
 	<<if ($seeDicks != 0)>>
 	<<if ($clubAdsSpending == 0) || ($clubAdsXX == 0)>>
 		<<set _possibleBonuses++>>
-		<<set _XX = XXCount(_clubSlaves)>>
-		<<set _XY = XYCount(_clubSlaves)>>
 		<<if (_XX > 0) && (_XY > 0) && (Math.abs(_XX-_XY) <= (_DL/3))>>
 		<<set $repGain += _DL*random(5,10), $clubBonuses++>>
 		The club offers a @@.green;mix@@ of sluts that can appeal to varied tastes in genitalia.
@@ -293,8 +346,6 @@
 	<<if ($arcologies[0].FSMaturityPreferentialist == "unset") && ($arcologies[0].FSYouthPreferentialist == "unset")>>
 	<<if ($clubAdsSpending == 0) || ($clubAdsOld == 0)>>
 		<<set _possibleBonuses++>>
-		<<set _young = youngCount(_clubSlaves)>>
-		<<set _old = oldCount(_clubSlaves)>>
 		<<if (_young > 0) && (_old > 0) && (Math.abs(_young-_old) <= (_DL/3))>>
 		<<set $repGain += _DL*random(5,10), $clubBonuses++>>
 		There are girls @@.green;both@@ young and mature in $clubName.
@@ -304,8 +355,6 @@
 	<<if ($arcologies[0].FSRepopulationFocus == "unset") && ($arcologies[0].FSRestart == "unset")>>
 	<<if ($clubAdsSpending == 0) || ($clubAdsPreg == 0)>>
 		<<set _possibleBonuses++>>
-		<<set _pregYes = pregYesCount(_clubSlaves)>>
-		<<set _pregNo = pregNoCount(_clubSlaves)>>
 		<<if (_pregYes > 0) && (_pregNo > 0) && (Math.abs(_pregYes-_pregNo) <= (_DL/3))>>
 		<<set $repGain += _DL*random(5,10), $clubBonuses++>>
 		There is a @@.green;wide@@ variety of slaves with swollen, round bellies and flat bellies working the club.
-- 
GitLab