diff --git a/src/js/utilsFC.js b/src/js/utilsFC.js index 390b3453396dceec16ae6550cdad513c20a9e7aa..714f9c6ea8ea7e192652705fe9eb9e79d17d26ef 100644 --- a/src/js/utilsFC.js +++ b/src/js/utilsFC.js @@ -3042,3 +3042,13 @@ App.Utils.masterSuiteAverages = (function() { }; }; })(); + +App.Utils.schoolCounter = function() { + let schools = 0; + for (const school of App.Data.misc.schools) { + if (V[school].schoolPresent) { + schools++; + } + } + return schools; +}; diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index 294bc591f5fdb92ee0004c3f56d3f8d58193762a..be3867847455288b3fcc102513cd419f5a8e04e8 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -2,6 +2,7 @@ <<if $useTabs == 0>>__Arcology Management__<</if>> <br> +<<set _schools = App.Utils.schoolCounter()>> <<includeDOM ownershipReport(false)>> <br><br> @@ -1471,7 +1472,6 @@ You own Your @@.springgreen;experience in the Free Cities@@ helps increase prosperity. <<set _AWeekGrowth++>> <</if>> - <<set _schools = $TSS.schoolPresent+$GRI.schoolPresent+$SCP.schoolPresent+$LDE.schoolPresent+$TGA.schoolPresent+$TFS.schoolPresent+$TCR.schoolPresent+$HA.schoolPresent+$NUL.schoolPresent>> <<if _schools == 1>> The presence of a slave school in the arcology improves the local economy. <<elseif _schools > 0>> @@ -1603,7 +1603,7 @@ You own <</if>> -<<if $TSS.schoolPresent+$GRI.schoolPresent+$SCP.schoolPresent+$LDE.schoolPresent+$TGA.schoolPresent+$TFS.schoolPresent+$TCR.schoolPresent+$HA.schoolPresent+$NUL.schoolPresent > 0>> +<<if _schools > 0>> <br> <<if $TSS.schoolPresent == 1>> diff --git a/src/uncategorized/nonRandomEvent.tw b/src/uncategorized/nonRandomEvent.tw index 81384a1b5dda6709b44084d3ead3d0128e561364..3eda44133ee553bda9e670245fdc143c0ac58ef7 100644 --- a/src/uncategorized/nonRandomEvent.tw +++ b/src/uncategorized/nonRandomEvent.tw @@ -130,7 +130,7 @@ <<goto "P Bodyswap Reveal">> <<elseif _effectiveWeek > 48 && $invasionVictory > 0 && $peacekeepers == 0 && $peacekeepersGone != 1>> <<goto "P peacekeepers intro">> -<<elseif ($arcologies[0].prosperity > 80) && ($TSS.schoolPresent+$GRI.schoolPresent+$SCP.schoolPresent+$LDE.schoolPresent+$TGA.schoolPresent+$HA.schoolPresent+$TFS.schoolPresent+$TCR.schoolPresent+$NUL.schoolPresent == 0) && ($schoolSuggestion == 0)>> +<<elseif ($arcologies[0].prosperity > 80) && (App.Utils.schoolCounter() == 0) && ($schoolSuggestion == 0)>> <<goto "P school suggestion">> <<elseif ($assistant.fsOptions !== 1) && $assistant.personality > 0 && $assistant.appearance != "normal" && FutureSocieties.HighestDecoration() >= 40>> <<set $Event = "assistant FS">>