From 17ad8bcc90eea9295dc4623d917e7ed2957f1904 Mon Sep 17 00:00:00 2001 From: Jones <Jones> Date: Mon, 12 Nov 2018 11:25:57 +0100 Subject: [PATCH] ASlaves and ACitizen tweaks and replacements --- src/SecExp/attackReport.tw | 180 +++++++++--- src/SecExp/rebellionGenerator.tw | 2 +- src/SecExp/rebellionReport.tw | 308 +++++++++++++++----- src/SecExp/secExpOptions.tw | 4 +- src/cheats/mod_EditArcologyCheat.tw | 4 +- src/init/storyInit.tw | 1 + src/uncategorized/BackwardsCompatibility.tw | 4 + src/uncategorized/arcmgmt.tw | 96 +++--- src/uncategorized/arcologyDescription.tw | 2 +- 9 files changed, 407 insertions(+), 194 deletions(-) diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw index a22dd5afcca..ad1fe4f5b9f 100644 --- a/src/SecExp/attackReport.tw +++ b/src/SecExp/attackReport.tw @@ -460,24 +460,44 @@ In the raiding following the battle @@.red;the arcology sustained heavy damage@@, which will cost quite the amount of cash to fix. Reports of @@.red;citizens or slaves killed or missing@@ flood your office for a few days following the defeat. <<set $cash -= 5000 * _majorBattleMod, $PC.engineering += .1>> <<if $week <= 30>> - <<set $ACitizens -= random(100) * _majorBattleMod>> - <<set $ASlaves -= random(150) * _majorBattleMod>> + <<set $lowerClass -= random(100) * _majorBattleMod>> + <<set _lostSlaves = random(150) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 60>> - <<set $ACitizens -= random(120) * _majorBattleMod>> - <<set $ASlaves -= random(170) * _majorBattleMod>> + <<set $lowerClass -= random(120) * _majorBattleMod>> + <<set _lostSlaves = random(170) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<elseif $week <= 90>> - <<set $ACitizens -= random(140) * _majorBattleMod>> - <<set $ASlaves -= random(190) * _majorBattleMod>> + <<set $lowerClass -= random(140) * _majorBattleMod>> + <<set _lostSlaves = random(190) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>> <<elseif $week <= 120>> - <<set $ACitizens -= random(160) * _majorBattleMod>> - <<set $ASlaves -= random(210) * _majorBattleMod>> + <<set $lowerClass -= random(160) * _majorBattleMod>> + <<set _lostSlaves = random(210) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>> <<else>> - <<set $ACitizens -= random(180) * _majorBattleMod>> - <<set $ASlaves -= random(230) * _majorBattleMod>> + <<set $lowerClass -= random(180) * _majorBattleMod>> + <<set _lostSlaves = random(230) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>> <</if>> <<if $PClossStreak >= 3>> @@ -524,8 +544,12 @@ <br> Damage to the city was @@.red;limited@@, it won't take much to rebuild. Very few citizens or slaves were involved in the fight and even fewer met their end, safeguarding the prosperity of the arcology. <<set $cash -= 2000 * _majorBattleMod, $PC.engineering += .1>> - <<set $ACitizens -= random(10) * _majorBattleMod>> - <<set $ASlaves -= random(20) * _majorBattleMod>> + <<set $lowerClass -= random(10) * _majorBattleMod>> + <<set _lostSlaves = random(20) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<elseif $battleResult == -2>> It was a close defeat, but nonetheless your @@.red;reputation@@ and @@.red;authority@@ slightly decreased. Your troops were not able to capture anyone or anything. <<if $attackType == "raiders">> @@ -546,24 +570,44 @@ Some business sustained heavy damage, slightly impacting the arcology's prosperity. <<set $cash -= 3000 * _majorBattleMod, $PC.engineering += .1>> <<if $week <= 30>> - <<set $ACitizens -= random(50) * _majorBattleMod>> - <<set $ASlaves -= random(75) * _majorBattleMod>> + <<set $lowerClass -= random(50) * _majorBattleMod>> + <<set _lostSlaves = random(75) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(2) * _majorBattleMod>> <<elseif $week <= 60>> - <<set $ACitizens -= random(60) * _majorBattleMod>> - <<set $ASlaves -= random(65) * _majorBattleMod>> + <<set $lowerClass -= random(60) * _majorBattleMod>> + <<set _lostSlaves = random(85) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 90>> - <<set $ACitizens -= random(70) * _majorBattleMod>> - <<set $ASlaves -= random(95) * _majorBattleMod>> + <<set $lowerClass -= random(70) * _majorBattleMod>> + <<set _lostSlaves = random(95) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(7) * _majorBattleMod>> <<elseif $week <= 120>> - <<set $ACitizens -= random(80) * _majorBattleMod>> - <<set $ASlaves -= random(105) * _majorBattleMod>> + <<set $lowerClass -= random(80) * _majorBattleMod>> + <<set _lostSlaves = random(105) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<else>> - <<set $ACitizens -= random(90) * _majorBattleMod>> - <<set $ASlaves -= random(115) * _majorBattleMod>> + <<set $lowerClass -= random(90) * _majorBattleMod>> + <<set _lostSlaves = random(115) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(12) * _majorBattleMod>> <</if>> <<elseif $battleResult == -1>> @@ -585,24 +629,44 @@ The surrender allows the arcology to survive @@.red;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<set $cash -= 1000 * _majorBattleMod, $PC.engineering += .1>> <<if $week <= 30>> - <<set $ACitizens -= random(80) * _majorBattleMod>> - <<set $ASlaves -= random(120) * _majorBattleMod>> + <<set $lowerClass -= random(80) * _majorBattleMod>> + <<set _lostSlaves = random(120) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 60>> - <<set $ACitizens -= random(100) * _majorBattleMod>> - <<set $ASlaves -= random(140) * _majorBattleMod>> + <<set $lowerClass -= random(100) * _majorBattleMod>> + <<set _lostSlaves = random(140) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<elseif $week <= 90>> - <<set $ACitizens -= random(120) * _majorBattleMod>> - <<set $ASlaves -= random(160) * _majorBattleMod>> + <<set $lowerClass -= random(120) * _majorBattleMod>> + <<set _lostSlaves = random(160) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>> <<elseif $week <= 120>> - <<set $ACitizens -= random(140) * _majorBattleMod>> - <<set $ASlaves -= random(180) * _majorBattleMod>> + <<set $lowerClass -= random(140) * _majorBattleMod>> + <<set _lostSlaves = random(180) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>> <<else>> - <<set $ACitizens -= random(160) * _majorBattleMod>> - <<set $ASlaves -= random(190) * _majorBattleMod>> + <<set $lowerClass -= random(160) * _majorBattleMod>> + <<set _lostSlaves = random(200) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>> <</if>> <<elseif $battleResult == 0>> @@ -625,24 +689,44 @@ Fortunately the arcology survives @@.yellow;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<set $cash -= 1000, $PC.engineering += .1>> <<if $week <= 30>> - <<set $ACitizens -= random(80) * _majorBattleMod>> - <<set $ASlaves -= random(120) * _majorBattleMod>> + <<set $lowerClass -= random(80) * _majorBattleMod>> + <<set _lostSlaves = random(120) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 60>> - <<set $ACitizens -= random(100) * _majorBattleMod>> - <<set $ASlaves -= random(140) * _majorBattleMod>> + <<set $lowerClass -= random(100) * _majorBattleMod>> + <<set _lostSlaves = random(140) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<elseif $week <= 90>> - <<set $ACitizens -= random(120) * _majorBattleMod>> - <<set $ASlaves -= random(160) * _majorBattleMod>> + <<set $lowerClass -= random(120) * _majorBattleMod>> + <<set _lostSlaves = random(160) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>> <<elseif $week <= 120>> - <<set $ACitizens -= random(140) * _majorBattleMod>> - <<set $ASlaves -= random(180) * _majorBattleMod>> + <<set $lowerClass -= random(140) * _majorBattleMod>> + <<set _lostSlaves = random(180) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>> <<else>> - <<set $ACitizens -= random(160) * _majorBattleMod>> - <<set $ASlaves -= random(190) * _majorBattleMod>> + <<set $lowerClass -= random(160) * _majorBattleMod>> + <<set _lostSlaves = random(200) * _majorBattleMod, + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>> <</if>> <br> @@ -660,18 +744,18 @@ <</if>> <<set $cash -= $bribeCost>> <</if>> -<<if !isInt($ACitizens)>> - <<if isNaN($ACitizens)>> +<<if !isInt($lowerClass)>> + <<if isNaN($lowerClass)>> <br>@@.red;Error: ACitizens is NaN, please report this issue@@ <<else>> - <<set $ACitizens = Math.clamp(Math.trunc($ACitizens),100,$ACitizenLimit)>> + <<set $lowerClass = Math.clamp(Math.trunc($lowerClass),0,$ACitizenLimit)>> <</if>> <</if>> -<<if !isInt($ASlaves)>> - <<if isNaN($ASlaves)>> +<<if !isInt($NPCSlaves)>> + <<if isNaN($NPCSlaves)>> <br>@@.red;Error: ASlaves is NaN, please report this issue@@ <<else>> - <<set $ASlaves = Math.clamp(Math.trunc($ASlaves),1000,$ASlaveLimit)>> + <<set $NPCSlaves = Math.clamp(Math.trunc($NPCSlaves),0,$ASlaveLimit)>> <</if>> <</if>> diff --git a/src/SecExp/rebellionGenerator.tw b/src/SecExp/rebellionGenerator.tw index 216b32af218..b6a6683a336 100644 --- a/src/SecExp/rebellionGenerator.tw +++ b/src/SecExp/rebellionGenerator.tw @@ -2,7 +2,7 @@ <<set _slave = 0>> <<set _citizen = 0>> -<<set _CSratio = $ACitizens / ($ASlaves + $helots)>> +<<set _CSratio = $ACitizens / ($ASlaves)>> <strong>Slaves security analysis:</strong> <<if $authority <= 3000>> diff --git a/src/SecExp/rebellionReport.tw b/src/SecExp/rebellionReport.tw index f360f6a0d71..bc447191e64 100644 --- a/src/SecExp/rebellionReport.tw +++ b/src/SecExp/rebellionReport.tw @@ -91,7 +91,10 @@ <<if $SFGear>> More units were able to survive thanks to wearining $SF.Lower's combat armour suits. <</if>> - <<set $ASlaves -= $enemyLosses>> + <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses), + $helots -= Math.trunc(($helots / $ASlaves) * $enemyLosses), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $enemyLosses), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $enemyLosses)>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men easily stopped the disorganized revolt in a few well aimed assaults. @@ -122,29 +125,37 @@ <<set $rep += random(800,1000)>> <<set $authority += random(800,1000)>> <br>Many of the rebelling slaves were recaptured and punished. The instigators were executed one after another in a public trial that lasted for almost three days. - <<set $ASlaves -= random(10,30)>> + <<set $NPCSlaves -= random(10,30)>> <<elseif $battleResult == -3>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<set $rep -= random(800,1000)>> <<set $authority -= random(800,1000)>> <br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time. - <<set $ACitizens -= random(50,100)>> - <<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>> + <<set $lowerClass -= random(50,100)>> + <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 5>> <<elseif $battleResult == -2>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<set $rep -= random(600,800)>> <<set $authority -= random(600,800)>> <br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time. - <<set $ACitizens -= random(40,80)>> - <<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.6)>> + <<set $lowerClass -= random(40,80)>> + <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 3>> <<elseif $battleResult == 2>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. <<set $rep += random(600,180)>> <<set $authority += random(600,800)>> <br>Many of the rebelling slaves were recaptured and punished. The instigators were executed one after another in a public trial that lasted for almost three days. - <<set $ASlaves -= random(10,30)>> + <<set $NPCSlaves -= random(10,30)>> <<elseif $battleResult == -1>> Rather than waste the lives of your men you decided to surrender, hoping the rebels will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted. <<set $rep -= random(1000,1200)>> @@ -153,29 +164,53 @@ The surrender allows the arcology to survive @@.yellow;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<set $cash -= 1000>> <<if $week <= 30>> - <<set $ACitizens -= random(100)>> - <<set $ASlaves -= random(150)>> + <<set $lowerClass -= random(100)>> + <<set _lostSlaves = random(150), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 60>> - <<set $ACitizens -= random(120)>> - <<set $ASlaves -= random(170)>> + <<set $lowerClass -= random(120)>> + <<set _lostSlaves = random(170), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<elseif $week <= 90>> - <<set $ACitizens -= random(140)>> - <<set $ASlaves -= random(190)>> + <<set $lowerClass -= random(140)>> + <<set _lostSlaves = random(190), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15)>> <<elseif $week <= 120>> - <<set $ACitizens -= random(160)>> - <<set $ASlaves -= random(210)>> + <<set $lowerClass -= random(160)>> + <<set _lostSlaves = random(210), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20)>> <<else>> - <<set $ACitizens -= random(180)>> - <<set $ASlaves -= random(230)>> + <<set $lowerClass -= random(180)>> + <<set _lostSlaves = random(230), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25)>> <</if>> <br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time. - <<set $ACitizens -= random(50,100)>> - <<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>> + <<set $lowerClass -= random(50,100)>> + <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 5>> <</if>> <<else>> @@ -188,7 +223,10 @@ <<if $SFGear>> More units were able to survive thanks to wearining $SF.Lower's combat armour suits. <</if>> - <<set $ASlaves -= $enemyLosses>> + <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses), + $helots -= Math.trunc(($helots / $ASlaves) * $enemyLosses), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $enemyLosses), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $enemyLosses)>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men easily stopped the disorganized revolt in a few well aimed assaults. @@ -219,28 +257,32 @@ <<set $rep += random(800,1000)>> <<set $authority += random(800,1000)>> <br>Many of the rebelling citizens were captured and punished, many others enslaved. The instigators were executed one after another in a public trial that lasted for almost three days. - <<set $ACitizens -= random(10,30)>> + <<set $lowerClass -= random(10,30)>> <<elseif $battleResult == -3>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<set $rep -= random(800,1000)>> <<set $authority -= random(800,1000)>> <br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time. - <<set $ACitizens -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>> + <<set $lowerClass -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>> <<set $rebelDefeatAftermath = 5>> <<elseif $battleResult == -2>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<set $rep -= random(600,800)>> <<set $authority -= random(600,800)>> <br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time. - <<set $ACitizens -= random(40,80)>> - <<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.6)>> + <<set $lowerClass -= random(40,80)>> + <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.6), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 3>> <<elseif $battleResult == 2>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. <<set $rep += random(600,180)>> <<set $authority += random(600,800)>> <br>Many of the rebelling citizens were captured and punished, many others enslaved. The instigators were executed one after another in a public trial that lasted for almost three days. - <<set $ASlaves -= random(10,30)>> + <<set $NPCSlaves -= random(10,30)>> <<elseif $battleResult == -1>> Rather than waste the lives of your men you decided to surrender, hoping the rebels will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted. <<set $rep -= random(1000,1200)>> @@ -249,29 +291,53 @@ The surrender allows the arcology to survive @@.yellow;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<set $cash -= 1000>> <<if $week <= 30>> - <<set $ACitizens -= random(100)>> - <<set $ASlaves -= random(150)>> + <<set $lowerClass -= random(100)>> + <<set _lostSlaves = random(150), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 60>> - <<set $ACitizens -= random(120)>> - <<set $ASlaves -= random(170)>> + <<set $lowerClass -= random(120)>> + <<set _lostSlaves = random(170), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<elseif $week <= 90>> - <<set $ACitizens -= random(140)>> - <<set $ASlaves -= random(190)>> + <<set $lowerClass -= random(140)>> + <<set _lostSlaves = random(190), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15)>> <<elseif $week <= 120>> - <<set $ACitizens -= random(160)>> - <<set $ASlaves -= random(210)>> + <<set $lowerClass -= random(160)>> + <<set _lostSlaves = random(210), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20)>> <<else>> - <<set $ACitizens -= random(180)>> - <<set $ASlaves -= random(230)>> + <<set $lowerClass -= random(180)>> + <<set _lostSlaves = random(230), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25)>> <</if>> <br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time. - <<set $ACitizens -= random(50,100)>> - <<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>> + <<set $lowerClass -= random(50,100)>> + <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 5>> <</if>> <</if>> @@ -283,24 +349,44 @@ A few businesses were looted and burned, but the damage was pretty limited. <<set $arcRepairTime += 3, $PC.engineering += .1>> <<if $week <= 30>> - <<set $ACitizens -= random(40)>> - <<set $ASlaves -= random(65)>> + <<set $lowerClass -= random(40)>> + <<set _lostSlaves = random(65), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(2)>> <<elseif $week <= 60>> - <<set $ACitizens -= random(50)>> - <<set $ASlaves -= random(55)>> + <<set $lowerClass -= random(50)>> + <<set _lostSlaves = random(75), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 90>> - <<set $ACitizens -= random(60)>> - <<set $ASlaves -= random(85)>> + <<set $lowerClass -= random(60)>> + <<set _lostSlaves = random(85), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(7)>> <<elseif $week <= 120>> - <<set $ACitizens -= random(70)>> - <<set $ASlaves -= random(95)>> + <<set $lowerClass -= random(70)>> + <<set _lostSlaves = random(95), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<else>> - <<set $ACitizens -= random(80)>> - <<set $ASlaves -= random(105)>> + <<set $lowerClass -= random(80)>> + <<set _lostSlaves = random(105), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(12)>> <</if>> <<elseif $engageRule == 1>> @@ -308,24 +394,44 @@ A few businesses were looted and burned, but the damage was pretty limited. <<set $arcRepairTime += 5, $PC.engineering += .1>> <<if $week <= 30>> - <<set $ACitizens -= random(60)>> - <<set $ASlaves -= random(85)>> + <<set $lowerClass -= random(60)>> + <<set _lostSlaves = random(85), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(4)>> <<elseif $week <= 60>> - <<set $ACitizens -= random(70)>> - <<set $ASlaves -= random(75)>> + <<set $lowerClass -= random(70)>> + <<set _lostSlaves = random(95), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(7)>> <<elseif $week <= 90>> - <<set $ACitizens -= random(80)>> - <<set $ASlaves -= random(105)>> + <<set $lowerClass -= random(80)>> + <<set _lostSlaves = random(105), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(9)>> <<elseif $week <= 120>> - <<set $ACitizens -= random(90)>> - <<set $ASlaves -= random(115)>> + <<set $lowerClass -= random(90)>> + <<set _lostSlaves = random(115), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(12)>> <<else>> - <<set $ACitizens -= random(100)>> - <<set $ASlaves -= random(125)>> + <<set $lowerClass -= random(100)>> + <<set _lostSlaves = random(125), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(14)>> <</if>> <<elseif $engageRule == 2>> @@ -333,24 +439,44 @@ Many businesses were damaged during the battle either by the fight itself, by fires which spread unchecked for hours or by looters. <<set $arcRepairTime += 7, $PC.engineering += .1>> <<if $week <= 30>> - <<set $ACitizens -= random(100)>> - <<set $ASlaves -= random(150)>> + <<set $lowerClass -= random(100)>> + <<set _lostSlaves = random(150), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 60>> - <<set $ACitizens -= random(120)>> - <<set $ASlaves -= random(170)>> + <<set $lowerClass -= random(120)>> + <<set _lostSlaves = random(170), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<elseif $week <= 90>> - <<set $ACitizens -= random(140)>> - <<set $ASlaves -= random(190)>> + <<set $lowerClass -= random(140)>> + <<set _lostSlaves = random(190), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15)>> <<elseif $week <= 120>> - <<set $ACitizens -= random(160)>> - <<set $ASlaves -= random(210)>> + <<set $lowerClass -= random(160)>> + <<set _lostSlaves = random(210), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20)>> <<else>> - <<set $ACitizens -= random(180)>> - <<set $ASlaves -= random(230)>> + <<set $lowerClass -= random(180)>> + <<set _lostSlaves = random(230), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25)>> <</if>> <<else>> @@ -359,33 +485,53 @@ <<set $arcRepairTime += 2, $PC.engineering += .1>> <<set $cash -= 1000>> <<if $week <= 30>> - <<set $ACitizens -= random(20)>> - <<set $ASlaves -= random(45)>> + <<set $lowerClass -= random(20)>> + <<set _lostSlaves = random(45), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(2)>> <<elseif $week <= 60>> - <<set $ACitizens -= random(30)>> - <<set $ASlaves -= random(35)>> + <<set $lowerClass -= random(30)>> + <<set _lostSlaves = random(55), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(4)>> <<elseif $week <= 90>> - <<set $ACitizens -= random(40)>> - <<set $ASlaves -= random(65)>> + <<set $lowerClass -= random(40)>> + <<set _lostSlaves = random(65), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(6)>> <<elseif $week <= 120>> - <<set $ACitizens -= random(50)>> - <<set $ASlaves -= random(75)>> + <<set $lowerClass -= random(50)>> + <<set _lostSlaves = random(75), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(8)>> <<else>> - <<set $ACitizens -= random(60)>> - <<set $ASlaves -= random(85)>> + <<set $lowerClass -= random(60)>> + <<set _lostSlaves = random(85), + $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), + $helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves), + $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), + $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <</if>> <</if>> <</if>> -<<if $ACitizens < 100>> - <<set $ACitizens = 100>> +<<if $lowerClass < 0>> + <<set $lowerClass = 0>> <</if>> -<<if $ASlaves < 200>> - <<set $ASlaves = 200>> +<<if $NPCSlaves < 0>> + <<set $NPCSlaves = 0>> <</if>> /* garrisons */ diff --git a/src/SecExp/secExpOptions.tw b/src/SecExp/secExpOptions.tw index 1e0eae270ce..09ea7020cb3 100644 --- a/src/SecExp/secExpOptions.tw +++ b/src/SecExp/secExpOptions.tw @@ -500,9 +500,9 @@ __Debug/cheats:__ <<set $ACitizens = Math.clamp($ACitizens - 200, 0, $ACitizenLimit)>> <</link>> <br><<link "Add slaves" "secExpOptions">> - <<set $ASlaves = Math.clamp($ASlaves + 200, 0, $ASlaveLimit)>> + <<set $NPCSlaves = Math.clamp($NPCSlaves + 200, 0, $ASlaveLimit)>> <</link>> | <<link "Remove slaves" "secExpOptions">> - <<set $ASlaves = Math.clamp($ASlaves - 200, 0, $ASlaveLimit)>> + <<set $NPCSlaves = Math.clamp($NPCSlaves - 200, 0, $ASlaveLimit)>> <</link>> <br><<link "Raise prosperity" "secExpOptions">> <<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity + 10, 0, 1000)>> diff --git a/src/cheats/mod_EditArcologyCheat.tw b/src/cheats/mod_EditArcologyCheat.tw index 473019194eb..7e2de8a517f 100644 --- a/src/cheats/mod_EditArcologyCheat.tw +++ b/src/cheats/mod_EditArcologyCheat.tw @@ -190,8 +190,8 @@ International slave variety is <<textbox "$ACitizens" $ACitizens>> <br>Arcology citizen limit: <<print commaNum($ACitizenLimit)>> <<textbox "$ACitizenLimit" $ACitizenLimit>> -<br>Arcology sex slaves: <<print commaNum($ASlaves)>> -<<textbox "$ASlaves" $ASlaves>> +<br>Arcology sex slaves: <<print commaNum($NPCSlaves)>> +<<textbox "$NPCSlaves" $NPCSlaves>> <br>Arcology sex slave limit: <<print commaNum($ASlaveLimit)>> <<textbox "$ASlaveLimit" $ASlaveLimit>> <br>Arcology prosperity: $arcologies[0].prosperity diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index ec1ca202104..2b765d3a77a 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -1062,6 +1062,7 @@ DairyRestraintsSetting($dairyRestraintsSetting) <<set $TCRent = 650>> <<set $GDP = 278.6>> <<set $ACitizenLimit = 4800>> +<<set $NPCSlaves = 900>> <<set $ASlaves = 900>> <<set $slaveDemandU = 2>> <<set $slaveDemandT = 12>> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index e4928f1da1e..7b90f3f3d18 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -2652,6 +2652,10 @@ Setting missing global variables: <<if $economy == 1.5>> <<set $economy = 67>> <</if>> +<<if ndef $NPCSlaves>> + <<set $NPCSlaves = $ASlaves, + $ASlaves += $helots + $fuckdolls + $menialBioreactors>> +<</if>> <<if ndef $lowerClass>> <<set $lowerClass = 3120>> <</if>> diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index f936b16e486..6110e1df071 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -400,7 +400,7 @@ _topClassP = 1>> <<if $FSSupLawTrigger == 1>> <<set _slavesSupLaw = 0, _slavesSupLaw += Math.trunc(($lowerClass + $middleClass + $upperClass) * 0.65), - $ASlaves += Math.trunc(_slavesSupLaw * 0.7), + $NPCSlaves += Math.trunc(_slavesSupLaw * 0.7), $helots += Math.trunc(_slavesSupLaw * 0.2), $lowerClass = Math.trunc($lowerClass * 0.35), $middleClass = Math.trunc($middleClass * 0.35), @@ -421,7 +421,7 @@ _topClassP = 1>> _topClassP *= 1.02>> <<if $FSSubLawTrigger == 1 && $arcologies[0].FSSupremacistLawME < 1>> <<set _slavesSubLaw = Math.trunc(($lowerClass + $middleClass + $upperClass) * 0.2), - $ASlaves += Math.trunc(_slavesSubLaw * 0.7), + $NPCSlaves += Math.trunc(_slavesSubLaw * 0.7), $helots += Math.trunc(_slavesSubLaw * 0.2), $lowerClass = Math.trunc($lowerClass * 0.8), $middleClass = Math.trunc($middleClass * 0.8), @@ -531,9 +531,9 @@ _middleClass *= 1 + ($TSS.subsidize + $GRI.subsidize + $SCP.subsidize + $LDE.sub /*Slave retirement trigger pulled (one time only)*/ <<if $CitizenRetirementTrigger == 1>> <<if $arcologies[0].FSSupremacistLawME < 1 && $arcologies[0].FSSubjugationistLawME < 1>> - <<set $lowerClass += Math.trunc(($ASlaves + $helots + $fuckdolls + $menialBioreactors) * 0.2)>> + <<set $lowerClass += Math.trunc(($NPCSlaves + $helots + $fuckdolls + $menialBioreactors) * 0.2)>> <<elseif $arcologies[0].FSSubjugationistLawME == 1>> - <<set $lowerClass += Math.trunc(($ASlaves + $helots + $fuckdolls + $menialBioreactors) * 0.15)>> + <<set $lowerClass += Math.trunc(($NPCSlaves + $helots + $fuckdolls + $menialBioreactors) * 0.15)>> <</if>> _helotsRetirement = Math.trunc($helots * 0.8), $helots = Math.trunc($helots * 0.8), @@ -541,8 +541,8 @@ _middleClass *= 1 + ($TSS.subsidize + $GRI.subsidize + $SCP.subsidize + $LDE.sub $fuckdolls = Math.trunc($fuckdolls * 0.8), _menialBioreactorsRetirement = Math.trunc($menialBioreactors * 0.8), $menialBioreactors = Math.trunc($menialBioreactors * 0.8), - _ASlavesRetirement = Math.trunc($ASlaves * 0.8), - $ASlaves = Math.trunc($ASlaves * 0.8), + _ASlavesRetirement = Math.trunc($NPCSlaves * 0.8), + $NPCSlaves = Math.trunc($NPCSlaves * 0.8), $CitizenRetirement = 2>> You have enacted citizen retirement, the slaves of eligible age are granted freedom. <<if _helotsRetirement > 1>> @@ -567,10 +567,14 @@ _middleClass *= 1 + ($TSS.subsidize + $GRI.subsidize + $SCP.subsidize + $LDE.sub /*Slave expiration*/ <<set _expirationPC = Math.trunc($helots * ($slaveExpiration * _expirationFS)), -_expirationNPC = Math.trunc($ASlaves * ($slaveExpiration * _expirationFS)), -_expiration = _expirationPC + _expirationNPC, -$ASlaves -= _expirationNPC, -$helots -= _expirationPC>> +_expirationFD = Math.trunc($fuckdolls * ($slaveExpiration * _expirationFS)), +_expirationBR = Math.trunc($menialBioractors * ($slaveExpiration * _expirationFS)), +_expirationNPC = Math.trunc($NPCSlaves * ($slaveExpiration * _expirationFS)), +_expiration = _expirationPC + _expirationNPC + _expirationFD + _expirationBR, +$NPCSlaves -= _expirationNPC, +$helots -= _expirationPC, +$fuckdolls -= _expirationFD, +$menialBioreactors -= _expirationBR>> <<if _expiration > 1>> @@.red;<<print _expiration>> Slaves died@@ due to the tough working conditions in your arcology. <<if _expirationPC > 1>> @@ -662,37 +666,37 @@ _SCD = Math.trunc(($upperClass * ($slaveDemandU + _slaveDemandU)) + ($topClass * <br><<print _LSCD>> LSCD <br><<print _SCD>> SCD /*More slaves than there is work*/ -<<if $ASlaves > _LSCD / $slaveProductivity>> - <<set $menialDemandFactor -= $ASlaves - Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity)), - $ASlaves = Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity))>> +<<if $NPCSlaves > _LSCD / $slaveProductivity>> + <<set $menialDemandFactor -= $NPCSlaves - Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity)), + $NPCSlaves = Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity))>> /*More slaves than they know what to do with*/ -<<elseif $ASlaves > _SCD * 1.6>> - <<set $menialDemandFactor -= $ASlaves - Math.trunc(_SCD * 1.6), - $ASlaves = Math.trunc(_SCD * 1.6)>> +<<elseif $NPCSlaves > _SCD * 1.6>> + <<set $menialDemandFactor -= $NPCSlaves - Math.trunc(_SCD * 1.6), + $NPCSlaves = Math.trunc(_SCD * 1.6)>> /*Cutting back on slaves*/ -<<elseif $ASlaves > _SCD * 1.4>> +<<elseif $NPCSlaves > _SCD * 1.4>> <<if $slaveCostFactor > 0.95>> - <<set $menialDemandFactor -= Math.trunc(($ASlaves - _SCD) * 0.4), - $ASlaves -= Math.trunc(($ASlaves - _SCD) * 0.4)>> + <<set $menialDemandFactor -= Math.trunc(($NPCSlaves - _SCD) * 0.4), + $NPCSlaves -= Math.trunc(($NPCSlaves - _SCD) * 0.4)>> <</if>> /*Selling excess slaves for profit*/ -<<elseif $ASlaves > _SCD * 1.2>> +<<elseif $NPCSlaves > _SCD * 1.2>> <<if $slaveCostFactor > 1.1>> - <<set $menialDemandFactor -= Math.trunc(($ASlaves - _SCD) * 0.4), - $ASlaves -= Math.trunc(($ASlaves - _SCD) * 0.4)>> + <<set $menialDemandFactor -= Math.trunc(($NPCSlaves - _SCD) * 0.4), + $NPCSlaves -= Math.trunc(($NPCSlaves - _SCD) * 0.4)>> <</if>> <</if>> /*Buying slaves because they are really cheap*/ <<if $slaveCostFactor < 0.8>> - <<if $ASlaves < _SCD * 1.5>> + <<if $NPCSlaves < _SCD * 1.5>> <<set $menialSupplyFactor -= Math.trunc(_SCD * 0.05), - $ASlaves += Math.trunc(_SCD * 0.05)>> + $NPCSlaves += Math.trunc(_SCD * 0.05)>> <</if>> <</if>> /*Lower Class Citizens*/ /*Work left for lower class citizens*/ -<<set _LCD = Math.trunc((($LSCBase * ($localEcon / 100)) + ($arcologies[0].prosperity * 4) + _lowerClass + (($middleClass + $visitors * 0.6) * 1.5) + (($upperClass + $visitors * 0.2) * 3.5) + ($topClass * 18) - ($ASlaves + $helots) * ($slaveProductivity + _slaveProductivity)) * $rentEffectL * _lowerClassP)>> +<<set _LCD = Math.trunc((($LSCBase * ($localEcon / 100)) + ($arcologies[0].prosperity * 4) + _lowerClass + (($middleClass + $visitors * 0.6) * 1.5) + (($upperClass + $visitors * 0.2) * 3.5) + ($topClass * 18) - ($NPCSlaves + $helots) * ($slaveProductivity + _slaveProductivity)) * $rentEffectL * _lowerClassP)>> <<if _LCD < 0>> <<set _LCD = 0>> <</if>> @@ -732,7 +736,7 @@ _SCD = Math.trunc(($upperClass * ($slaveDemandU + _slaveDemandU)) + ($topClass * <</if>> <</if>> <<set $helots += _enslavedPC, -$ASlaves += _enslavedNPC>> +$NPCSlaves += _enslavedNPC>> <br><<print _enslavedPC>> slave PC <br><<print _enslavedNPC>> slave NPC <<if _enslaved > 1>> @@ -742,14 +746,14 @@ $ASlaves += _enslavedNPC>> <br>@@.green;As arcology owner you claimed the slave.@@ <</if>> /*Need more slaves still*/ -<<if $ASlaves < _SCD>> - <<set $menialSupplyFactor -= Math.trunc((_SCD - $ASlaves) * 0.75) + 1, - $ASlaves += Math.trunc((_SCD - $ASlaves) * 0.75) + 1>> +<<if $NPCSlaves < _SCD>> + <<set $menialSupplyFactor -= Math.trunc((_SCD - $NPCSlaves) * 0.75) + 1, + $NPCSlaves += Math.trunc((_SCD - $NPCSlaves) * 0.75) + 1>> <</if>> /*Middle Class Citizens*/ /*Demand for Middle Class*/ -<<set _MCD = Math.trunc((($MCBase * ($localEcon / 100)) + $arcologies[0].prosperity + _middleClass + ($ASlaves * 0.15) + ($lowerClass * 0.1) + (($upperClass + $visitors * 0.2) * 0.5) + ($topClass * 2.5)) * $rentEffectM * _middleClassP)>> +<<set _MCD = Math.trunc((($MCBase * ($localEcon / 100)) + $arcologies[0].prosperity + _middleClass + ($NPCSlaves * 0.15) + ($lowerClass * 0.1) + (($upperClass + $visitors * 0.2) * 0.5) + ($topClass * 2.5)) * $rentEffectM * _middleClassP)>> <br><<print _MCD>> MCD /*Middle Class Citizens immigrating*/ <<if $middleClass < _MCD>> @@ -773,7 +777,7 @@ $ASlaves += _enslavedNPC>> /*Upper Class Citizens*/ /*Demand for Upper Class*/ -<<set _UCD = Math.trunc((($UCBase * ($localEcon / 100)) + ($arcologies[0].prosperity * 0.2) + _upperClass + ($ASlaves * 0.02) + ($lowerClass * 0.025) + (($middleClass + $visitors * 0.6) * 0.05) + ($topClass * 0.3)) * $rentEffectU * _upperClassP)>> +<<set _UCD = Math.trunc((($UCBase * ($localEcon / 100)) + ($arcologies[0].prosperity * 0.2) + _upperClass + ($NPCSlaves * 0.02) + ($lowerClass * 0.025) + (($middleClass + $visitors * 0.6) * 0.05) + ($topClass * 0.3)) * $rentEffectU * _upperClassP)>> /*Upper Class Citizens immigrating*/ <<if $upperClass < _UCD>> <<set _UCImmigration = Math.trunc((_UCD - $upperClass) * (0.3 * _terrain)) + 1, @@ -796,7 +800,7 @@ $ASlaves += _enslavedNPC>> /*Top Class Citizens*/ /*Setting GDP depending on population*/ -<<set $GDP = Math.trunc((($ASlaves + $helots) * 0.35 * $slaveProductivity) + ($lowerClass * 0.35) + ($middleClass * 0.75) + ($upperClass * 2) + ($topClass * 10)) / 10, +<<set $GDP = Math.trunc((($NPCSlaves + $helots) * 0.35 * $slaveProductivity) + ($lowerClass * 0.35) + ($middleClass * 0.75) + ($upperClass * 2) + ($topClass * 10)) / 10, /*Top Class Interest in living in your arcology*/ _TCD = Math.trunc(($GDP / 15 + _topClass) * $rentEffectT * _topClassP + $TCBase)>> /*Top Class Citizens immigrating*/ @@ -820,6 +824,7 @@ _TCD = Math.trunc(($GDP / 15 + _topClass) * $rentEffectT * _topClassP + $TCBase) <</if>> <</if>> /*ends _weatherFreeze*/ <<set $ACitizens = $lowerClass + $middleClass + $upperClass + $topClass, +$ASlaves = $NPCSlaves + $helots + $fuckdolls + $menialBioreactors, _difACitizens = $ACitizens - $oldACitizens, _difASlaves = $ASlaves - _oldASlaves, _difLowerClass = $lowerClass - _oldLowerClass, @@ -879,33 +884,6 @@ _percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>> <br> -/* -<<set _rents = random(1,100)>> -<<for _i = 1; _i < $sectors.length; _i++>> - <<if $sectors[_i].ownership == 1>> - <<if $sectors[_i].type != "Brothel">> - <<if $sectors[_i].type != "Club">> - <<if $sectors[_i].type != "Arcade">> - <<if $sectors[_i].type != "Dairy">> - <<if $sectors[_i].type != "Pit">> - <<if $sectors[_i].type != "Sweatshops">> - <<if $sectors[_i].type != "Pens">> - <<if $sectors[_i].type != "Barracks">> - <<if $sectors[_i].type != "weapManu">> - <<set _rents += $arcologies[0].prosperity*10>> - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> -<</for>> -*/ - <<set _rentMultiplier = 1>> <<if $arcologies[0].FSPaternalistLaw == 1>> <<set _rentMultiplier *= 0.95>> diff --git a/src/uncategorized/arcologyDescription.tw b/src/uncategorized/arcologyDescription.tw index 26c9630f5d5..f6d34edeefd 100644 --- a/src/uncategorized/arcologyDescription.tw +++ b/src/uncategorized/arcologyDescription.tw @@ -633,7 +633,7 @@ Its<<if $weatherCladding == 2>> glorious<<elseif $weatherCladding > 0>> dull<<el The noise in the thriving open space is almost oppressive, with the sounds of drunken merriment, traditional music, and distant intercourse forming an omnipresent hum. <</if>> -<<print commaNum($ACitizens)>> citizens and <<print commaNum($ASlaves+$helots+$slaves.length)>> slaves live in $arcologies[0].name. +<<print commaNum($ACitizens)>> citizens and <<print commaNum($ASlaves+$slaves.length)>> slaves live in $arcologies[0].name. <<if $arcologies[0].FSSupremacistLawME == 1>>The citizenry is entirely $arcologies[0].FSSupremacistRace.<</if>> <<if $arcologies[0].FSRomanRevivalistLaw == 1>>Every citizen has military responsibilities, which are a point of pride to many, with most opting to wear utilitarian clothing even when off duty.<</if>> <<if $arcologies[0].FSAztecRevivalistLaw == 1>>Most citizens wear satin loincloths and cloaks, distinguished from those of slaves by the richness of their adornments.<</if>> -- GitLab