diff --git a/devTools/javaSanityCheck/ignoredVariables b/devTools/javaSanityCheck/ignoredVariables index 20a462dbff031219ad7bc0187cee56f93bdd3e50..cfffc71facb09837477daf57065bff2233a30160 100644 --- a/devTools/javaSanityCheck/ignoredVariables +++ b/devTools/javaSanityCheck/ignoredVariables @@ -6,7 +6,6 @@ acquire ############################ totalMerc securityHQ -waterwayTime dickSize dinnerParty seed \ No newline at end of file diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 4f2b71a016380147a83ec30740745baa92bcd36d..15483baaa4359620d860116ca76cf22ea5ff7eca 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -403,12 +403,6 @@ App.Data.resetOnNGPlus = { FSNonconformist: "", econAdvantage: 0, - /* rebellions */ - slaveRebellion: 0, - citizenRebellion: 0, - repairTime: 3, - arcRepairTime: 0, - garrison: {}, SecExp: {}, reminderEntry: "", diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index f8ef89bcac4428ec3de560d9e7f937d173d0e4bb..c1d74fa5a9d7b1b5afa58049b9f2e91c6e0be892 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -2,5 +2,5 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "4.0.0-alpha.2", commitHash: null, - release: 1130 // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1131 // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. }; diff --git a/src/Mods/SecExp/events/rebellionHandler.tw b/src/Mods/SecExp/events/rebellionHandler.tw index 666ebdf17bf6ddbec509b3087fca8ed6e2c7e37a..ffa703f6475d9c0c3cf9421345776a5a5848137c 100644 --- a/src/Mods/SecExp/events/rebellionHandler.tw +++ b/src/Mods/SecExp/events/rebellionHandler.tw @@ -90,22 +90,22 @@ <<set _defense *= _engageMod>> <<set _hp *= _engageMod>> -<<if $garrison.assistant == 1>> +<<if $SecExp.war.assistantDefense>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> <</if>> -<<if $garrison.reactor == 1>> +<<if $SecExp.war.reactorDefense>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> <</if>> -<<if $garrison.penthouse == 1>> +<<if $SecExp.war.penthouseDefense>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> <</if>> -<<if $garrison.waterway == 1>> +<<if $SecExp.war.waterwayDefense>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> @@ -134,7 +134,7 @@ <<set _armyMod = Math.trunc(_armyMod)>> <<set _rebellingSlaves = 0, _rebellingMilitia = 0, _rebellingMercs = 0>> -<<if $slaveRebellion == 1>> +<<if $SecExp.war.type.includes("Slave")>> <<set _rebellingSlaves = 1>> <<set _unit = App.SecExp.getIrregularUnit("Slaves", $SecExp.war.attacker.troops, $SecExp.war.attacker.equip)>> <<else>> diff --git a/src/Mods/SecExp/events/rebellionOptions.tw b/src/Mods/SecExp/events/rebellionOptions.tw index 5a8e8d2dcf5771c6711e660418812e07caafed68..8f456dd42b2ccc43f157249b3abaf82341d53c7f 100644 --- a/src/Mods/SecExp/events/rebellionOptions.tw +++ b/src/Mods/SecExp/events/rebellionOptions.tw @@ -1,9 +1,9 @@ :: rebellionOptions [nobr] <<set $nextButton = " ", $encyclopedia = "Battles">> -<<set _isSlaveRebellion = $slaveRebellion === 1, _loyalUnits = App.SecExp.unit.list().slice(1).reduce((acc, cur) => {acc + V.SecExp.units[cur].squads.length;}, 0) - $SecExp.war.rebellingID.length>> +<<set _isSlaveRebellion = $SecExp.war.type.includes("Slave"), _loyalUnits = App.SecExp.unit.list().slice(1).reduce((acc, cur) => {acc + V.SecExp.units[cur].squads.length;}, 0) - $SecExp.war.rebellingID.length>> -<strong> <<if _isSlaveRebellion>>Slave<<else>>Citizen<</if>> Rebellion!</strong> +<strong> $SecExp.war.type!</strong> <hr> In the end it happened, the <<if _isSlaveRebellion>>slaves<<else>>citizens<</if>> @@ -80,31 +80,31 @@ In order to preserve the structural integrity of the building and the lives of o <</if>> <br><br>We can dedicate some of our forces to the protection of the vital parts of the arcology, doing so will prevent the failure of said systems, but will also take away strength from our assault. -<<if $garrison.penthouse == 0>> - <br>[[Garrison the penthouse|rebellionOptions][$garrison.penthouse = 1]] +<<if !$SecExp.war.penthouseDefense>> + <br>[[Garrison the penthouse|rebellionOptions][$SecExp.war.penthouseDefense = 1]] <<else>> <br>Troops will be dispatched to the penthouse. - [[Discard the order|rebellionOptions][$garrison.penthouse = 0]] + [[Discard the order|rebellionOptions][delete $SecExp.war.penthouseDefense]] <</if>> -<<if $garrison.reactor == 0>> - <br>[[Garrison the reactors|rebellionOptions][$garrison.reactor = 1]] +<<if !$SecExp.war.reactorDefense>> + <br>[[Garrison the reactors|rebellionOptions][$SecExp.war.reactorDefense = 1]] <<else>> <br>Troops will be dispatched to the reactors. - [[Discard the order|rebellionOptions][$garrison.reactor = 0]] + [[Discard the order|rebellionOptions][delete $SecExp.war.reactorDefense]] <</if>> -<<if $garrison.assistant == 0>> - <br>[[Garrison the assistant's central CPU|rebellionOptions][$garrison.assistant = 1]] +<<if !$SecExp.war.assistantDefense>> + <br>[[Garrison the assistant's central CPU|rebellionOptions][$SecExp.war.assistantDefense = 1]] <<else>> <br>Troops will be dispatched to the assistant's central CPU. - [[Discard the order|rebellionOptions][$garrison.assistant = 0]] + [[Discard the order|rebellionOptions][delete $SecExp.war.assistantDefense]] <</if>> -<<if $garrison.waterway == 0>> - <br>[[Garrison the waterways|rebellionOptions][$garrison.waterway = 1]] +<<if !$SecExp.war.waterwayDefense>> + <br>[[Garrison the waterways|rebellionOptions][$SecExp.war.waterwayDefense = 1]] <<else>> <br>Troops will be dispatched to the waterways. - [[Discard the order|rebellionOptions][$garrison.waterway = 0]] + [[Discard the order|rebellionOptions][delete $SecExp.war.waterwayDefense]] <</if>> <br><br> <<includeDOM App.SecExp.unit.replenishAll()>> [[Proceed|rebellionHandler][$SecExp.war.result = 4, $SecExp.war.foughtThisWeek = 1]] /* sets $SecExp.war.result to a value outside accepted range (-3,3) to avoid evaluation problems */ -<br>[[Surrender|rebellionReport][$SecExp.war.result = -1, $SecExp.war.foughtThisWeek = 1]] +<br>[[Surrender|rebellionReport][$SecExp.war.result = -1, $SecExp.war.foughtThisWeek = 1]] \ No newline at end of file diff --git a/src/Mods/SecExp/events/rebellionReport.tw b/src/Mods/SecExp/events/rebellionReport.tw index 75d8742a2c7a5f00f02f44d3a35db3fa1d303210..7008b22dd34edb78568b0871018143c6bdf965ab 100644 --- a/src/Mods/SecExp/events/rebellionReport.tw +++ b/src/Mods/SecExp/events/rebellionReport.tw @@ -1,8 +1,10 @@ :: rebellionReport [nobr] <<set $nextButton = "Continue", $nextLink = "Scheduled Event", $encyclopedia = "Battles">> +<<set _repairTime = 3>> <<set _oldRep = $rep>> <<set _oldAuth = $SecExp.core.authority>> +<<set _slaveRebellion = $SecExp.war.type.includes("Slave")>> <<set $SecExp.war.attacker.losses = Math.trunc($SecExp.war.attacker.losses)>> <<if $SecExp.war.attacker.losses > $SecExp.war.attacker.troops>> <<set $SecExp.war.attacker.losses = $SecExp.war.attacker.troops>> @@ -27,448 +29,251 @@ <</if>> <hr> -<<if $slaveRebellion == 1>> - Today, <<= asDateString($week, random(0,7))>>, our arcology was inflamed by the fires of rebellion. <<print num(Math.trunc($SecExp.war.attacker.troops))>> rebels from all over the structure dared rise up against their owners and conquer their freedom through blood. Our defense force, <<print num(Math.trunc(App.SecExp.battle.troopCount()))>> strong, fought with them street by street - <<if $SecExp.war.attacker.losses != $SecExp.war.attacker.troops>> - inflicting <<print num(Math.trunc($SecExp.war.attacker.losses))>> casualties, while sustaining <<if $SecExp.war.losses > 1>><<print num(Math.trunc($SecExp.war.losses))>> casualties<<elseif $SecExp.war.losses > 0>>a casualty<<else>>zero<</if>> themselves. +Today, <<= asDateString($week, random(0,7))>>, our arcology was inflamed by the fires of rebellion. <<print num(Math.trunc($SecExp.war.attacker.troops))>> rebels from all over the structure dared rise up +<<if _slaveRebellion>> + against their owners and conquer their freedom through blood. +<<else>> + to dethrone their arcology owner. +<</if>> + +Our defense force, <<print num(App.SecExp.battle.troopCount())>> strong, fought with them street by street +<<if $SecExp.war.attacker.losses != $SecExp.war.attacker.troops>> + inflicting <<print num(Math.trunc($SecExp.war.attacker.losses))>> casualties, while sustaining <<if $SecExp.war.losses > 1>><<print num(Math.trunc($SecExp.war.losses))>> casualties<<elseif $SecExp.war.losses > 0>>a casualty<<else>>zero<</if>> themselves. +<<else>> + completely annihilating their troops, while sustaining + <<if $SecExp.war.losses > 1>> + <<print num(Math.trunc($SecExp.war.losses))>> casualties + <<elseif $SecExp.war.losses > 0>> + a casualty <<else>> - completely annihilating their troops, while sustaining <<if $SecExp.war.losses > 1>><<print num(Math.trunc($SecExp.war.losses))>> casualties<<elseif $SecExp.war.losses > 0>>a casualty<<else>>zero casualties<</if>>. - <</if>> - <<if $SecExp.rebellions.sfArmor>> - More units were able to survive thanks to wearing $SF.Lower's combat armor suits. + zero casualties + <</if>>. +<</if>> +<<if $SecExp.rebellions.sfArmor>> + More units were able to survive thanks to wearing $SF.Lower's combat armor suits. +<</if>> +<<run App.SecExp.slavesDamaged($SecExp.war.attacker.losses)>> +<<if $SecExp.war.result === 3>> + <<if $SecExp.war.turns <= 5>> + The fight was quick and one sided: our men easily stopped the disorganized revolt in a few well aimed assaults. + <<elseif $SecExp.war.turns <= 7>> + The fight was hard, but in the end our men stopped the disorganized revolt with several well aimed assaults. + <<else>> + The fight was long and hard, but in the end our men stopped the revolt before it could accumulate momentum. <</if>> - <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $SecExp.war.attacker.losses), - $menials -= Math.trunc(($menials / $ASlaves) * $SecExp.war.attacker.losses), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $SecExp.war.attacker.losses), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $SecExp.war.attacker.losses)>> - <<if $SecExp.war.result == 3>> - <<if $SecExp.war.turns <= 5>> - The fight was quick and one sided: our men easily stopped the disorganized revolt in a few well aimed assaults. - <<elseif $SecExp.war.turns <= 7>> - The fight was hard, but in the end our men stopped the disorganized revolt with several well aimed assaults. - <<else>> - The fight was long and hard, but in the end our men stopped the revolt before it could accumulate momentum. - <</if>> - <<elseif $SecExp.war.result == -3>> - <<if $SecExp.war.turns <= 5>> - The fight was quick and one sided: our men were easily crushed by the furious charge of the rebels. - <<elseif $SecExp.war.turns <= 7>> - The fight was hard and in the end the rebels proved too much to handle for our men. - <<else>> - The fight was long and hard, but despite their bravery the rebels proved too much for our men. - <</if>> - <<elseif $SecExp.war.result == 2>> - The fight was long and hard, but in the end our men managed to stop the revolt, though not without difficulty. - <<elseif $SecExp.war.result == -2>> - The fight was long and hard. In the end, our men had to yield to the rebelling slaves, which were fortunately unable to capitalize on their victory. - <<elseif $SecExp.war.result == -1>> - You gave your troops the order to surrender; they obediently stand down. +<<elseif $SecExp.war.result === -3>> + <<if $SecExp.war.turns <= 5>> + The fight was quick and one sided: our men were easily crushed by the furious charge of the rebels. + <<elseif $SecExp.war.turns <= 7>> + The fight was hard and in the end the rebels proved too much to handle for our men. + <<else>> + The fight was long and hard, but despite their bravery the rebels proved too much for our men. <</if>> +<<elseif $SecExp.war.result === 2>> + The fight was long and hard, but in the end our men managed to stop the revolt, though not without difficulty. +<<elseif $SecExp.war.result === -2>> + The fight was long and hard. In the end, our men had to yield to the rebelling slaves, which were fortunately unable to capitalize on their victory. +<<elseif $SecExp.war.result === -1>> + You gave your troops the order to surrender; they obediently stand down. +<</if>> - /* effects */ - <<if $SecExp.war.result == 3>> - Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. - <<run repX(random(800,1000), "war")>> - <<set $SecExp.core.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 $NPCSlaves -= random(10,30)>> - <<elseif $SecExp.war.result == -3>> - Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. - <<run repX(random(-800,-1000), "war")>> - <<set $SecExp.core.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 $lowerClass -= random(50,100)>> - <<set _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $rebelDefeatAftermath = 5>> - <<elseif $SecExp.war.result == -2>> - Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. - <<run repX(random(-600,-800), "war")>> - <<set $SecExp.core.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 $lowerClass -= random(40,80)>> - <<set _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $rebelDefeatAftermath = 3>> - <<elseif $SecExp.war.result == 2>> - Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. - <<run repX(random(600,180), "war")>> - <<set $SecExp.core.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. +/* effects */ +<<if $SecExp.war.result === 3>> + Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. + <<run repX(random(800,1000), "war")>> + <<set $SecExp.core.authority += random(800,1000)>> + <<if _slaveRebellion>> + <br>Many of the rebelling slaves were recaptured and punished. + <<else>> + <br>Many of the rebelling citizens were captured and punished, many others enslaved. + <</if>> + The instigators were executed one after another in a public trial that lasted for almost three days. + <<if _slaveRebellion>> <<set $NPCSlaves -= random(10,30)>> - <<elseif $SecExp.war.result == -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. - <<run repX(random(-1000,-1200), "war")>> - <<set $SecExp.core.authority -= random(1000,1200)>> - <br> - 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. - <<run cashX(-1000, "war")>> - <<if $week <= 30>> - <<set $lowerClass -= random(100)>> - <<set _lostSlaves = random(150), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(5)>> - <<elseif $week <= 60>> - <<set $lowerClass -= random(120)>> - <<set _lostSlaves = random(170), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(10)>> - <<elseif $week <= 90>> - <<set $lowerClass -= random(140)>> - <<set _lostSlaves = random(190), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(15)>> - <<elseif $week <= 120>> - <<set $lowerClass -= random(160)>> - <<set _lostSlaves = random(210), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(20)>> - <<else>> - <<set $lowerClass -= random(180)>> - <<set _lostSlaves = random(230), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(25)>> - <</if>> + <<else>> + <<set $lowerClass -= random(10,30)>> + <</if>> +<<elseif $SecExp.war.result === -3>> + Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. + <<run repX(random(-800,-1000), "war")>> + <<set $SecExp.core.authority -= random(800,1000)>> + <<if _slaveRebellion>> <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 $lowerClass -= random(50,100)>> - <<set _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $rebelDefeatAftermath = 5>> + <<set _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8)>> + <<run App.SecExp.slavesDamaged(_lostSlaves)>> + <<else>> + <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 $lowerClass -= Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8)>> <</if>> -<<else>> - Today, <<= asDateString($week, random(0,7))>>, our arcology was inflamed by the fires of rebellion. <<print num(Math.trunc($SecExp.war.attacker.troops))>> rebels from all over the structure dared rise up to dethrone their arcology owner. Our defense force, <<print num(App.SecExp.battle.troopCount())>> strong, fought with them street by street - <<if $SecExp.war.attacker.losses != $SecExp.war.attacker.troops>> - inflicting <<print num(Math.trunc($SecExp.war.attacker.losses))>> casualties, while sustaining <<if $SecExp.war.losses > 1>> <<print num(Math.trunc($SecExp.war.losses))>> casualties <<else>> a casualty<</if>> themselves. +<<elseif $SecExp.war.result === -2>> + Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. + <<run repX(random(-600,-800), "war")>> + <<set $SecExp.core.authority -= random(600,800)>> + <br>After the battle most of the rebelling + <<if _slaveRebellion>> + 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 _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8)>> <<else>> - completely annihilating their troops, while sustaining <<if $SecExp.war.losses > 1>> <<print num(Math.trunc($SecExp.war.losses))>> casualties <<else>> a casualty.<</if>> + 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 _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.6)>> <</if>> - <<if $SecExp.rebellions.sfArmor>> - More units were able to survive thanks to wearing $SF.Lower's combat armor suits. + <<set $lowerClass -= random(40,80)>> + <<run App.SecExp.slavesDamaged(_lostSlaves)>> +<<elseif $SecExp.war.result === 2>> + Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. + <<run repX(random(600,180), "war")>> + <<set $SecExp.core.authority += random(600,800)>> + <<if _slaveRebellion>> + <br>Many of the rebelling slaves were recaptured and punished. + <<else>> + <br>Many of the rebelling citizens were captured and punished, many others enslaved. <</if>> - <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $SecExp.war.attacker.losses), - $menials -= Math.trunc(($menials / $ASlaves) * $SecExp.war.attacker.losses), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $SecExp.war.attacker.losses), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $SecExp.war.attacker.losses)>> - <<if $SecExp.war.result == 3>> - <<if $SecExp.war.turns <= 5>> - The fight was quick and one sided, our men easily stopped the disorganized revolt in a few well aimed assaults. - <<elseif $SecExp.war.turns <= 7>> - The fight was hard, but in the end our men stopped the disorganized revolt with several well aimed assaults. - <<else>> - The fight was long and hard, but in the end our men stopped the revolt before it could accumulate momentum. - <</if>> - <<elseif $SecExp.war.result == -3>> - <<if $SecExp.war.turns <= 5>> - The fight was quick and one sided, our men were easily crushed by the furious charge of the rebels. - <<elseif $SecExp.war.turns <= 7>> - The fight was hard and in the end the rebels proved too much to handle for our men. - <<else>> - The fight was long and hard, but despite their bravery the rebels proved too much for our men. - <</if>> - <<elseif $SecExp.war.result == 2>> - The fight was long and hard, but in the end our men managed to stop the revolt, though not without difficulty. - <<elseif $SecExp.war.result == -2>> - The fight was long and hard. Our men in the end had to yield to the rebelling slaves, which were fortunately unable to fully capitalize on their victory. - <<elseif $SecExp.war.result == -1>> - You gave your troops the order to surrender, obediently they stand down. + The instigators were executed one after another in a public trial that lasted for almost three days. + <<set $NPCSlaves -= random(10,30)>> +<<elseif $SecExp.war.result === -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. + <<run repX(random(-1000,-1200), "war")>> + <<set $SecExp.core.authority -= random(1000,1200)>> + <br> + 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. + <<run cashX(-1000, "war")>> + <<if $week <= 30>> + <<set $lowerClass -= random(100)>> + <<run App.SecExp.slavesDamaged(random(150))>> + <<set $arcologies[0].prosperity -= random(5)>> + <<elseif $week <= 60>> + <<set $lowerClass -= random(120)>> + <<run App.SecExp.slavesDamaged(random(170))>> + <<set $arcologies[0].prosperity -= random(10)>> + <<elseif $week <= 90>> + <<set $lowerClass -= random(140)>> + <<run App.SecExp.slavesDamaged(random(190))>> + <<set $arcologies[0].prosperity -= random(15)>> + <<elseif $week <= 120>> + <<set $lowerClass -= random(160)>> + <<run App.SecExp.slavesDamaged(random(210))>> + <<set $arcologies[0].prosperity -= random(20)>> + <<else>> + <<set $lowerClass -= random(180)>> + <<run App.SecExp.slavesDamaged(random(230))>> + <<set $arcologies[0].prosperity -= random(25)>> <</if>> - - /* effects */ - <<if $SecExp.war.result == 3>> - Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. - <<run repX(random(800,1000), "war")>> - <<set $SecExp.core.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 $lowerClass -= random(10,30)>> - <<elseif $SecExp.war.result == -3>> - Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. - <<run repX(random(-800,-1000), "war")>> - <<set $SecExp.core.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 $lowerClass -= Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8)>> - <<set $rebelDefeatAftermath = 5>> - <<elseif $SecExp.war.result == -2>> - Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. - <<run repX(random(-600,-800), "war")>> - <<set $SecExp.core.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 $lowerClass -= random(40,80)>> - <<set _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.6), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $rebelDefeatAftermath = 3>> - <<elseif $SecExp.war.result == 2>> - Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. - <<run repX(random(600,180), "war")>> - <<set $SecExp.core.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 $NPCSlaves -= random(10,30)>> - <<elseif $SecExp.war.result == -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. - <<run repX(random(-1000,-1200), "war")>> - <<set $SecExp.core.authority -= random(1000,1200)>> - <br> - 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. - <<run cashX(-1000, "war")>> - <<if $week <= 30>> - <<set $lowerClass -= random(100)>> - <<set _lostSlaves = random(150), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(5)>> - <<elseif $week <= 60>> - <<set $lowerClass -= random(120)>> - <<set _lostSlaves = random(170), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(10)>> - <<elseif $week <= 90>> - <<set $lowerClass -= random(140)>> - <<set _lostSlaves = random(190), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(15)>> - <<elseif $week <= 120>> - <<set $lowerClass -= random(160)>> - <<set _lostSlaves = random(210), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(20)>> - <<else>> - <<set $lowerClass -= random(180)>> - <<set _lostSlaves = random(230), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $arcologies[0].prosperity -= random(25)>> - <</if>> + <<if _slaveRebellion>> + <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. + <<else>> <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 $lowerClass -= random(50,100)>> - <<set _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> - <<set $rebelDefeatAftermath = 5>> <</if>> + <<set $lowerClass -= random(50,100)>> + <<set _lostSlaves = Math.trunc(($SecExp.war.attacker.troops - $SecExp.war.attacker.losses) * 0.8)>> + <<run App.SecExp.slavesDamaged(_lostSlaves)>> <</if>> /* engage rules */ -<<if $SecExp.war.result != -1>> - <<if $SecExp.war.engageRule == 0>> +<<if $SecExp.war.result !== -1>> + <<if $SecExp.war.engageRule === 0>> Since you ordered your troops to limit their weaponry to low caliber or nonlethal, the arcology reported only @@.red;minor damage.@@ Most citizens and non involved slaves remained unharmed, though some casualties between the civilians were inevitable. A few businesses were looted and burned, but the damage was pretty limited. - <<set $arcRepairTime += 3, IncreasePCSkills('engineering', 0.1)>> + <<set $SecExp.rebellions.repairTime.arc = 3>> + <<= IncreasePCSkills('engineering', 0.1)>> <<if $week <= 30>> <<set $lowerClass -= random(40)>> - <<set _lostSlaves = random(65), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(65))>> <<set $arcologies[0].prosperity -= random(2)>> <<elseif $week <= 60>> <<set $lowerClass -= random(50)>> - <<set _lostSlaves = random(75), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(75))>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 90>> <<set $lowerClass -= random(60)>> - <<set _lostSlaves = random(85), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(85))>> <<set $arcologies[0].prosperity -= random(7)>> <<elseif $week <= 120>> <<set $lowerClass -= random(70)>> - <<set _lostSlaves = random(95), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(95))>> <<set $arcologies[0].prosperity -= random(10)>> <<else>> <<set $lowerClass -= random(80)>> - <<set _lostSlaves = random(105), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(105))>> <<set $arcologies[0].prosperity -= random(12)>> <</if>> - <<elseif $SecExp.war.engageRule == 1>> + <<elseif $SecExp.war.engageRule === 1>> You ordered your troops to limit their weaponry to non-heavy, non-explosive, because of this the arcology reported @@.red;moderate damage.@@ Most citizens and non involved slaves remained unharmed or only lightly wounded, but many others did not make it. Unfortunately casualties between the civilians were inevitable. A few businesses were looted and burned, but the damage was pretty limited. - <<set $arcRepairTime += 5, IncreasePCSkills('engineering', 0.1)>> + <<set $SecExp.rebellions.repairTime.arc = 5>> + <<= IncreasePCSkills('engineering', 0.1)>> <<if $week <= 30>> <<set $lowerClass -= random(60)>> - <<set _lostSlaves = random(85), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(85))>> <<set $arcologies[0].prosperity -= random(4)>> <<elseif $week <= 60>> <<set $lowerClass -= random(70)>> - <<set _lostSlaves = random(95), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(95))>> <<set $arcologies[0].prosperity -= random(7)>> <<elseif $week <= 90>> <<set $lowerClass -= random(80)>> - <<set _lostSlaves = random(105), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(105))>> <<set $arcologies[0].prosperity -= random(9)>> <<elseif $week <= 120>> <<set $lowerClass -= random(90)>> - <<set _lostSlaves = random(115), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(115))>> <<set $arcologies[0].prosperity -= random(12)>> <<else>> <<set $lowerClass -= random(100)>> - <<set _lostSlaves = random(125), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(125))>> <<set $arcologies[0].prosperity -= random(14)>> <</if>> - <<elseif $SecExp.war.engageRule == 2>> + <<elseif $SecExp.war.engageRule === 2>> Since you did not apply any restriction on the weapons your forces should use, the arcology reported @@.red;heavy damage.@@ Many citizens and uninvolved slaves are reported killed or missing. Casualties between the civilians were inevitable. 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, IncreasePCSkills('engineering', 0.1)>> + <<set $SecExp.rebellions.repairTime.arc = 7>> + <<= IncreasePCSkills('engineering', 0.1)>> <<if $week <= 30>> <<set $lowerClass -= random(100)>> - <<set _lostSlaves = random(150), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(150))>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 60>> <<set $lowerClass -= random(120)>> - <<set _lostSlaves = random(170), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(170))>> <<set $arcologies[0].prosperity -= random(10)>> <<elseif $week <= 90>> <<set $lowerClass -= random(140)>> - <<set _lostSlaves = random(190), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(190))>> <<set $arcologies[0].prosperity -= random(15)>> <<elseif $week <= 120>> <<set $lowerClass -= random(160)>> - <<set _lostSlaves = random(210), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(210))>> <<set $arcologies[0].prosperity -= random(20)>> <<else>> <<set $lowerClass -= random(180)>> - <<set _lostSlaves = random(230), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(230))>> <<set $arcologies[0].prosperity -= random(25)>> <</if>> <<else>> Thanks to the advance riot control weaponry developed by your experts, the rebels were mostly subdued or killed with @@.yellow;little to no collateral damage to the arcology@@ and its inhabitants. A few businesses were looted, but the damage was very limited. - <<set $arcRepairTime += 2, IncreasePCSkills('engineering', 0.1)>> + <<set $SecExp.rebellions.repairTime.arc = 2>> + <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(-1000, "war")>> <<if $week <= 30>> <<set $lowerClass -= random(20)>> - <<set _lostSlaves = random(45), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(45))>> <<set $arcologies[0].prosperity -= random(2)>> <<elseif $week <= 60>> <<set $lowerClass -= random(30)>> - <<set _lostSlaves = random(55), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(55))>> <<set $arcologies[0].prosperity -= random(4)>> <<elseif $week <= 90>> <<set $lowerClass -= random(40)>> - <<set _lostSlaves = random(65), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(65))>> <<set $arcologies[0].prosperity -= random(6)>> <<elseif $week <= 120>> <<set $lowerClass -= random(50)>> - <<set _lostSlaves = random(75), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(75))>> <<set $arcologies[0].prosperity -= random(8)>> <<else>> <<set $lowerClass -= random(60)>> - <<set _lostSlaves = random(85), - $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), - $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), - $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), - $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> + <<run App.SecExp.slavesDamaged(random(85))>> <<set $arcologies[0].prosperity -= random(10)>> <</if>> <</if>> @@ -477,11 +282,12 @@ <<set $NPCSlaves = Math.max($NPCSlaves, 0)>> /* garrisons */ -<<if $garrison.reactor == 0>> +<<if !$SecExp.war.reactorDefense>> <<if random(1,100) <= (75 - (($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.reactor : 0) * 25))>> Unfortunately during the fighting a group of slaves infiltrated the reactor complex and sabotaged it, causing massive power fluctuations and blackouts. It will take @@.red;time and money to repair the damage.@@ - <<set $garrison.reactorTime = $repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.reactor : 0), IncreasePCSkills('engineering', 0.1)>> + <<set $SecExp.rebellions.repairTime.reactor = _repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.reactor : 0)>> + <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> While the reactor was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky. @@ -489,11 +295,12 @@ <<else>> The garrison assigned to the reactor protected it from the multiple sabotage attempts carried out by the rebels. <</if>> -<<if $garrison.waterway == 0>> +<<if !$SecExp.war.waterwayDefense>> <<if random(1,100) <= (75 - (($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.waterway : 0) * 25))>> Unfortunately during the fighting a group of slaves infiltrated the water management complex and sabotaged it, causing huge water leaks throughout the arcology and severely limiting the water supply. It will take @@.red;time and money to repair the damage.@@ - <<set $garrison.waterwayTime = $repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.waterway : 0), IncreasePCSkills('engineering', 0.1)>> + <<set $SecExp.rebellions.repairTime.waterway = _repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.waterway : 0)>> + <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> While the water management complex was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky. @@ -501,11 +308,12 @@ <<else>> The garrison assigned to the water management complex protected it from the sabotage attempt of the rebels. <</if>> -<<if $garrison.assistant == 0>> +<<if !$SecExp.war.assistantDefense>> <<if random(1,100) <= (75 - (($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.assistant : 0) * 25))>> Unfortunately during the fighting a group of slaves infiltrated the facility housing $assistant.name's mainframe and sabotaged it. Without its AI, the arcology will be next to impossible to manage. It will take @@.red;time and money to repair the damage.@@ - <<set $garrison.assistantTime = $repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.assistant : 0), IncreasePCSkills('engineering', 0.1)>> + <<set $SecExp.rebellions.repairTime.assistant = _repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.assistant : 0)>> + <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> While the $assistant.name's mainframe was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky. @@ -513,10 +321,10 @@ <<else>> The garrison assigned to the facility housing $assistant.name's mainframe prevented any sabotage attempt. <</if>> -<<if $garrison.penthouse == 1 && $BodyguardID != 0>> +<<if $SecExp.war.penthouseDefense && $BodyguardID !== 0>> <<setLocalPronouns _S.Bodyguard 2>> The garrison assigned to the penthouse together with your loyal Bodyguard stopped all assaults against your penthouse with ease. -<<elseif $BodyguardID != 0>> +<<elseif $BodyguardID !== 0>> <<if random(1,100) <= 75>> During the fighting a group of slaves assaulted the penthouse. Your Bodyguard, _S.Bodyguard.slaveName, stood strong against the furious attack. <<set _woundChance = 0>> @@ -673,11 +481,11 @@ <<else>> While the penthouse was left without a sizable garrison, there was no dangerous assault against it. Let's hope we'll always be this lucky. <</if>> -<<elseif $garrison.penthouse == 1>> +<<elseif $SecExp.war.penthouseDefense>> <<if random(1,100) <= 75>> During the fighting a group of slaves assaulted the penthouse. The garrison stood strong against the furious attack. <<set _woundChance = 0>> - <<if $PC.career == "mercenary" || $PC.career == "gang">> + <<if $PC.career === "mercenary" || $PC.career === "gang">> <<set _woundChance -= 5>> <<elseif $PC.skill.warfare >= 75>> <<set _woundChance -= 3>> @@ -780,7 +588,7 @@ <<if random(1,100) <= 75>> During the fighting a group of slaves assaulted the penthouse. Isolated and alone, you stood strong against the furious attack. <<set _woundChance = 0>> - <<if $PC.career == "mercenary" || $PC.career == "gang">> + <<if $PC.career === "mercenary" || $PC.career === "gang">> <<set _woundChance -= 5>> <<elseif $PC.skill.warfare >= 75>> <<set _woundChance -= 3>> @@ -881,13 +689,11 @@ <<include "unitsRebellionReport">> /* resets variables and flags */ -<<if $slaveRebellion == 1>> +<<if _slaveRebellion>> <<set $SecExp.rebellions.slaveProgress = 0>> <<set $SecExp.rebellions.citizenProgress = Math.clamp($SecExp.rebellions.citizenProgress - random(50,100), 0, 100)>> <<else>> <<set $SecExp.rebellions.citizenProgress = 0>> <<set $SecExp.rebellions.slaveProgress = Math.clamp($SecExp.rebellions.slaveProgress - random(50,100), 0, 100)>> <</if>> -<<set $slaveRebellion = 0>> -<<set $citizenRebellion = 0>> <<set $SecExp.rebellions.tension = Math.clamp($SecExp.rebellions.tension - random(50,100), 0, 100)>> \ No newline at end of file diff --git a/src/Mods/SecExp/js/Unit.js b/src/Mods/SecExp/js/Unit.js index 5e40ff7b1844fb2f282e614f0d173a060988c6db..2a53c6d509bc83100c1ad3b909e198247ba62166 100644 --- a/src/Mods/SecExp/js/Unit.js +++ b/src/Mods/SecExp/js/Unit.js @@ -466,7 +466,7 @@ App.SecExp.unit = (function() { } function isDeployed(unit) { - return (V.citizenRebellion === 0 && V.slaveRebellion === 0 && unit.isDeployed === 1) || ((V.citizenRebellion > 0 || V.slaveRebellion > 0) && unit.active === 1 && !V.SecExp.war.rebellingID.includes(unit.ID)); + return (V.SecExp.war.type.includes("Attack") && unit.isDeployed === 1) || (V.SecExp.war.type.includes("Rebellion") && unit.active === 1 && !V.SecExp.war.rebellingID.includes(unit.ID)); } function humanSquads() { @@ -999,7 +999,7 @@ App.SecExp.HumanUnit = class SecExpHumanUnit extends App.SecExp.Unit { }; App.SecExp.troopsFromSF = function() { - if (V.slaveRebellion === 0 && V.citizenRebellion === 0) { // attack: how many troops can we actually carry? + if (V.SecExp.war.type.includes("Attack")) { const transportMax = Math.trunc(125 * (V.SF.Squad.GunS + (V.terrain !== "oceanic" ? ((V.SF.Squad.AV + V.SF.Squad.TV)/2) : 0))); return Math.min(transportMax, V.SF.ArmySize); } else { @@ -1010,7 +1010,7 @@ App.SecExp.troopsFromSF = function() { App.SecExp.SFUnit = class SFUnit extends App.SecExp.Unit { constructor() { super(null, App.SecExp.BaseSpecialForcesUnit); - this._distancePenalty = (V.slaveRebellion === 0 && V.citizenRebellion === 0) ? 0.10 : 0.0; + this._distancePenalty = (V.SecExp.war.type.includes("Attack")) ? 0.10 : 0.0; } get attack() { diff --git a/src/Mods/SecExp/js/secExp.js b/src/Mods/SecExp/js/secExp.js index f2ad76912d6edb36ad6870a6ba797e090c81e3f1..0132e26a1a7e3d0f35795282197f3715e115d9d1 100644 --- a/src/Mods/SecExp/js/secExp.js +++ b/src/Mods/SecExp/js/secExp.js @@ -13,7 +13,7 @@ App.SecExp.generator = (function() { function attack() { let attackChance = 0; // attackChance value is the chance out of 100 of an attack happening this week // attacks are deactivated if security drones are not around yet, there is not a rebellion this week or the last attack/rebellion happened within 3 weeks - if (V.arcologyUpgrade.drones === 1 && V.citizenRebellion === 0 && V.slaveRebellion === 0 && V.SecExp.battles.lastEncounterWeeks > 3 && V.SecExp.rebellions.lastEncounterWeeks > 3) { + if (V.arcologyUpgrade.drones === 1 && V.SecExp.war.type === "" && V.SecExp.battles.lastEncounterWeeks > 3 && V.SecExp.rebellions.lastEncounterWeeks > 3) { if (V.week < 30) { attackChance = 5; } else if (V.week < 60) { @@ -180,10 +180,9 @@ App.SecExp.generator = (function() { } function rebellion() { - let type; if (V.SecExp.rebellions.slaveProgress >= 100) { if (random(1, 100) <= 80) { // 80% of firing a rebellion once progress is at 100 - type = V.slaveRebellion = 1; + V.SecExp.war.type = "Slave Rebellion"; V.SecExp.rebellions.slaveProgress = 0; V.SecExp.rebellions.citizenProgress *= 0.2; } else { @@ -191,7 +190,7 @@ App.SecExp.generator = (function() { } } else if (V.SecExp.rebellions.citizenProgress >= 100) { if (random(1, 100) <= 80) { - type = V.citizenRebellion = 1; + V.SecExp.war.type = "Citizen Rebellion"; V.SecExp.rebellions.citizenProgress = 0; V.SecExp.rebellions.slaveProgress *= 0.2; } else { @@ -200,13 +199,13 @@ App.SecExp.generator = (function() { } if (V.SecExp.settings.rebellion.force === 1 && V.SecExp.war.foughtThisWeek === 0) { - type = random(1, 100) <= 50 ? V.slaveRebellion = 1 : V.citizenRebellion = 1; + V.SecExp.war.type = random(1, 100) <= 50 ? 'Slave' : 'Citizen' + ' Rebellion'; } - if (!type) { + if (V.SecExp.war.type === "") { V.SecExp.rebellions.lastEncounterWeeks++; } else { - const isSlaveRebellion = V.slaveRebellion === 1; + const isSlaveRebellion = V.SecExp.war.type.includes("Slave"); let weekMod; if (V.week <= 30) { weekMod = 0.75 + (0.01+(V.week/200)); @@ -383,7 +382,8 @@ App.SecExp.generalInit = function() { citizenProgress: 0, victories: 0, losses: 0, - lastEncounterWeeks: 0 + lastEncounterWeeks: 0, + repairTime: {}, }, core: { trade: 0, @@ -421,12 +421,6 @@ App.SecExp.generalInit = function() { currency: "", type: "crime" }, - /* repairTime: { - waterway: 0, - assistant: 0, - reactor: 0, - arc: 0 - }, */ units: {}, edicts: { alternativeRents: 0, @@ -610,7 +604,7 @@ App.SecExp.battle = (function() { function deployedUnits(input = '') { let count = {}, init = 0; App.SecExp.unit.list().forEach(s => { count[s] = 0; }); - if (V.slaveRebellion === 0 && V.citizenRebellion === 0) { // attack + if (V.SecExp.war.type.includes("Attack")) { if (V.SecExp.units.bots.isDeployed > 0) { count.bots++; } @@ -657,7 +651,7 @@ App.SecExp.battle = (function() { } } - if (V.slaveRebellion === 0 && V.citizenRebellion === 0) { // attack + if (V.SecExp.war.type.includes("Attack")) { if (V.SecExp.units.bots.isDeployed === 1) { troops += V.SecExp.units.bots.troops; } @@ -957,3 +951,37 @@ App.SecExp.slavesDamaged = function(adjustValue) { V.fuckdolls -= Math.trunc((V.fuckdolls / V.ASlaves) * adjustValue); V.menialBioreactors -= Math.trunc((V.menialBioreactors / V.ASlaves) * adjustValue); }; + +App.SecExp.updateFacilityDamage = function(facility) { + let text = ``; + let security_effect = 0; + let crime_effect = 0; + let growth_effect = 0; + if (V.SecExp.rebellions.repairTime[facility] !== undefined) { + if (facility === 'assistant') { + text += `With the central CPU core of the assistant down, managing security is a much harder task. Inevitably some little but important details will slip past your agents.`; + security_effect = 1; + crime_effect = 1; + } else if (facility === 'reactor') { + text += `The damage to the reactor caused by the last rebellion is extensive. Businesses and private citizens struggle to operate with the unreliable and limited energy production offered by the auxiliary generators.`; + growth_effect = random(1, 2); + } else if (facility === 'waterway') { + text += `The damage caused to the water supply of the arcology discourages immigration and causes the death of some of the poorest residents.`; + V.lowerClass -= random(20, 40); + V.middleClass -= random(10, 20); + V.upperClass -= random(10, 20); + V.topClass -= random(10, 20); + } else if (facility === 'arc') { + text += `The recent rebellion left the arcology wounded and it falls to its owner to fix it.`; + cashX(-5000, "personalBusiness"); + } + text += ` It will still take ${numberWithPluralOne(V.SecExp.rebellions.repairTime[facility], 'week')} to finish repair works.`; + + V.SecExp.rebellions.repairTime[facility]--; + IncreasePCSkills('engineering', 0.1); + if (V.SecExp.rebellions.repairTime[facility] === 0) { + delete V.SecExp.rebellions.repairTime[facility]; + } + } + return {text: text, security: security_effect, crime: crime_effect, growth: growth_effect}; +}; diff --git a/src/Mods/SecExp/js/secExpBC.js b/src/Mods/SecExp/js/secExpBC.js index cd64d30599ab68d3ab4f743296aa45562f9a6eea..1f9091c3cddbb82bf9c7e99e92405a95029b405c 100644 --- a/src/Mods/SecExp/js/secExpBC.js +++ b/src/Mods/SecExp/js/secExpBC.js @@ -293,18 +293,22 @@ App.SecExp.generalBC = function() { if (jsDef(V.proclamationType) && V.proclamationType !== "none") { V.SecExp.proclamation.type = V.proclamationType; } - /* + V.SecExp.rebellions.repairTime = V.SecExp.rebellions.repairTime || {}; - V.SecExp.rebellions.repairTime.waterway = V.SecExp.rebellions.repairTime.waterway || 0; - V.SecExp.rebellions.repairTime.assistant = V.SecExp.rebellions.repairTime.assistant || 0; - V.SecExp.rebellions.repairTime.reactor = V.SecExp.rebellions.repairTime.reactor || 0; - V.SecExp.rebellions.repairTime.arc = V.SecExp.rebellions.repairTime.arc || 0; if (jsDef(V.garrison)) { - V.SecExp.rebellions.repairTime.waterway = V.garrison.waterwayTime; - V.SecExp.rebellions.repairTime.assistant = V.garrison.assistantTime; - V.SecExp.rebellions.repairTime.reactor = V.garrison.reactorTime; + if (V.garrison.waterwayTime > 0) { + V.SecExp.rebellions.repairTime.waterway = V.garrison.waterwayTime; + } + if (V.garrison.assistantTime > 0) { + V.SecExp.rebellions.repairTime.assistant = V.garrison.assistantTime; + } + if (V.garrison.reactorTime > 0) { + V.SecExp.rebellions.repairTime.reactor = V.garrison.reactorTime; + } + } + if (V.arcRepairTime && V.arcRepairTime > 0) { V.SecExp.rebellions.repairTime.arc = V.arcRepairTime; } - */ + delete V.SecExp.settings.show; }; diff --git a/src/Mods/SecExp/js/securityReport.js b/src/Mods/SecExp/js/securityReport.js index 08a7b58bbcbb14ea0d9045629eb8f630f6121944..386dd731b3b73afeb3704578f2e48d8ed80f8c08 100644 --- a/src/Mods/SecExp/js/securityReport.js +++ b/src/Mods/SecExp/js/securityReport.js @@ -162,14 +162,10 @@ App.SecExp.securityReport = function() { secGrowth += 0.5 * random(1, 2); } - const assistantDamaged = V.garrison.assistantTime; - if (assistantDamaged > 0) { - r.push(`With the central CPU core of the assistant down, managing security is a much harder task. Inevitably some little but important details will slip past your agents.`); - r.push(`${numberWithPluralOne(assistantDamaged, 'week')} to finish repair works.`); - secGrowth--; - crimeGrowth++; - V.garrison.assistantTime--; IncreasePCSkills('engineering', 0.1); - } + const assistantDamaged = App.SecExp.updateFacilityDamage("assistant"); + r.push(assistantDamaged.text); + secGrowth -= assistantDamaged.security; + crimeGrowth += assistantDamaged.crime; if (V.SF.Toggle && V.SF.Active >= 1) { if (V.SecExp.edicts.SFSupportLevel >= 3) { diff --git a/src/Mods/SecExp/potentialToDo.txt b/src/Mods/SecExp/potentialToDo.txt index eb00bfaed65dd8144fbdff1c78cfe73640c7060a..8e3613cd21693b56e1fb57528cbf8fcd058aafec 100644 --- a/src/Mods/SecExp/potentialToDo.txt +++ b/src/Mods/SecExp/potentialToDo.txt @@ -8,7 +8,6 @@ Hexall90's last merged commit: 52dde0b3 - While at it decoupling of propaganda slave and recruiter when? - Would it be possible to add option for assigning hacker to security HQ that would work similarly to giving office for recruiter in propaganda hub? Preferably with smiling man slave giving extra bonuses there - Does having a large standing army give any bonus to authority/reputation growth? -- Fix broken immigration stuff (https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2073 && https://gitgud.io/pregmodfan/fc-pregmod/-/merge_requests/7375) - My personal asst keeps getting the credit, even though I choose to personally lead my forces. (Has been this way for a fewish days): Military01.swf Fine, I'll Do It Myself @@ -42,4 +41,4 @@ Hexall90's last merged commit: 52dde0b3 - It would be a start if the tactics talking about the size difference of the armies actually took the size difference into account. - How about to start off with option to send one or two of your combat trained slaves to assist the merc's when they are on a raid with the possibility of receiving battle wounds. - If there are choices, they should be along the lines of "higher risk, higher reward" (defeating the enemy with fewer casualties and damage if it goes right, but suffering higher casualties and damage if it goes wrong), or things like accepting more/less military casualties for better/worse protection of economic assets (costing money/damaging economy) and civilians (costing reputation/damaging population). -- The ability to send units to the general to increase relationship as an alternative to sending slaves. +- The ability to send units to the general to increase relationship as an alternative to sending slaves. \ No newline at end of file diff --git a/src/endWeek/economics/arcmgmt.js b/src/endWeek/economics/arcmgmt.js index e5feb621a3b54e0d5ba7b15d589830427746ea96..65bf1a3c88cf6bf9191c09c0e578a22fc6f0abed 100644 --- a/src/endWeek/economics/arcmgmt.js +++ b/src/endWeek/economics/arcmgmt.js @@ -621,13 +621,9 @@ App.EndWeek.arcManagement = function() { delete V.SecExp.smilingMan.globalCrisisWeeks; } } - const reactorDamaged = V.garrison.reactorTime; - if (reactorDamaged > 0) { - r.push(`The damage to the reactor caused by the last rebellion is extensive. Businesses and private citizens struggle to operate with the unreliable and limited energy production offered by the auxiliary generators. It will still take ${numberWithPluralOne(reactorDamaged, 'week')} to finish repair works.`); - _AWeekGrowth -= random(1, 2); - V.garrison.reactorTime--; - IncreasePCSkills('engineering', 0.1); - } + const reactorDamaged = App.SecExp.updateFacilityDamage("reactor"); + r.push(reactorDamaged.text); + _AWeekGrowth -= reactorDamaged.growth; const secExpTrade = App.SecExp.tradeReport(); r.push(secExpTrade.text); @@ -1476,6 +1472,8 @@ App.EndWeek.arcManagement = function() { _transportHub += V.SecExp.buildings.transportHub.airport / 10 + V.SecExp.buildings.transportHub.surfaceTransport / 10; } _crime = (100 - V.SecExp.core.crimeLow) / 100 + 0.2; + const waterwayDamaged = App.SecExp.updateFacilityDamage("waterway"); + appendDiv(waterwayDamaged.text); } if (V.terrain === "urban") { _terrain = 1.2; @@ -1491,6 +1489,7 @@ App.EndWeek.arcManagement = function() { } const _oldVisitors = V.visitors; V.visitors = Math.trunc(((V.arcologies[0].prosperity + _FSScore * 5 + _honeymoon) * _transportHub * _terrain * _crime) * _econMult); + if (V.visitors < 50) { V.visitors = normalRandInt(50, 2); } diff --git a/src/endWeek/economics/persBusiness.js b/src/endWeek/economics/persBusiness.js index 0ef3830aa2dab08b752e1bb72d9068cd88b596e8..0665171a46cd6aeb7c7b8a38a26009e04458fa0e 100644 --- a/src/endWeek/economics/persBusiness.js +++ b/src/endWeek/economics/persBusiness.js @@ -881,13 +881,9 @@ App.EndWeek.personalBusiness = function() { cashX(blackMarket, "personalBusiness"); } - const arcDamaged = V.arcRepairTime; - if (arcDamaged > 0) { - r.push(`The recent rebellion left the arcology wounded and it falls to its owner to fix it. It will still take ${numberWithPluralOne(arcDamaged, 'week')} to finish repair works.`); - cashX(-5000, "personalBusiness"); - V.arcRepairTime--; - IncreasePCSkills('engineering', 0.1); - } + const arcDamaged = App.SecExp.updateFacilityDamage("arc"); + r.push(arcDamaged.text); + App.Events.addParagraph(el, r); if (V.SecExp.buildings.weapManu) { diff --git a/src/events/gameover.tw b/src/events/gameover.tw index 29ded15f78436cd466bfe66f8895ccac39530160..02c755263191f452371aac546e70901b7eb57d12 100644 --- a/src/events/gameover.tw +++ b/src/events/gameover.tw @@ -80,13 +80,8 @@ <</if>> <<case "Rebellion defeat">> - <<if $slaveRebellion == 1>> - As the furious horde of slaves invades your penthouse you are left a few precious seconds to decide your fate. You embrace for the last time your faithful revolver and just as the rebels break through your doors you squeeze the trigger. - The end of your story has come and your arcology is now in the hands of whoever will take control of the vermin that dared rise up this day. - <<else>> - As the furious horde of citizens invades your penthouse you are left a few precious seconds to decide your fate. You embrace for the last time your faithful revolver and just as the rebels break through your doors you squeeze the trigger. - The end of your story has come and your arcology is now in the hands of whoever will take control of the vermin that dared rise up this day. - <</if>> + As the furious horde of <<= $SecExp.war.type.toLowerCase().replace(" rebellion","")>>s invades your penthouse you are left a few precious seconds to decide your fate. You embrace for the last time your faithful revolver and just as the rebels break through your doors you squeeze the trigger. + The end of your story has come and your arcology is now in the hands of whoever will take control of the vermin that dared rise up this day. <<case "Idiot Ball 2 The Dumbassening" "Idiot Ball 3 Totally Not Idiot Ball 2 Again">> As you leave your penthouse to conduct your daily rounds, you promptly get <<if $arcologyUpgrade.drones == 1>>tased by the nearest drone<<else>>tackled hard against the wall<</if>>. When you awake, it hits you like a truck; you idiotically enslaved your $PC.race ass by decreeing all <<if $gameover == "Idiot Ball 2 The Dumbassening">>non-<<print $arcologies[0].FSSupremacistRace>><<else>><<print $arcologies[0].FSSubjugationistRace>><</if>><<if $PC.race != "mixed race">>s<<else>> individuals<</if>> slaves, and since you are now a slave, lack the authority to revert the policy. The story of your remaining years may be worth telling, as is your legendary blunder, but it must be told elsewhere. diff --git a/src/events/intro/initNationalities.js b/src/events/intro/initNationalities.js index dfa24c6782e16d1652d00ea5bc33574365c38fa4..e9c09d2b3e35e0ff902e2d500a42dc566efdd164 100644 --- a/src/events/intro/initNationalities.js +++ b/src/events/intro/initNationalities.js @@ -1,17 +1,4 @@ App.Intro.initNationalities = function() { - function initSecExp() { - App.SecExp.generalInit(); - V.garrison = { - penthouse: 0, - reactor: 0, - assistant: 0, - waterway: 0, - reactorTime: 0, - assistantTime: 0, - waterwayTime: 0 - }; - } - function applyPCQualities() { resetEyeColor(V.PC); generatePlayerPronouns(V.PC); @@ -546,9 +533,7 @@ App.Intro.initNationalities = function() { const random12 = jsRandomMany(sellable, 12); random12.forEach(cell => { cell.owner = 0; }); - if (V.secExpEnabled > 0) { - initSecExp(); - } + App.SecExp.generalInit(); if (V.experimental.food === 1) { if (V.localEcon > 100) { diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js index 03f7cfe0b96b4d8a1eb2dcacedf5db9c88e88c3c..ab955569109f2a9be4bfbc89159b5a6c2e057e57 100644 --- a/src/events/nonRandomEvent.js +++ b/src/events/nonRandomEvent.js @@ -15,7 +15,7 @@ App.Events.getNonrandomEvents = function() { new App.Events.TwineEvent().wrapPassage([ () => V.secExpEnabled > 0, () => V.SecExp.war.foughtThisWeek === 0, - () => (V.slaveRebellion === 1 || V.citizenRebellion === 1) + () => V.SecExp.war.type.includes("Rebellion") ], "rebellionOptions"), new App.Events.attackOptions(), new App.Events.SEPlayerBirth(),