diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 5e7dab077961f8b2dde8571e90ce695b85754f51..133a49e073bfeff5404b2118dcc925607eaaed2c 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -378,19 +378,8 @@ App.Data.resetOnNGPlus = { PCvictoryStreak: 0, PClossStreak: 0, foughtThisWeek: 0, - /* buildings */ - riotCenter: 0, - riotUpgrades: {}, - fort: {}, - sentUnitCooldown: 0, - advancedRiotEquip: 0, - brainImplant: -1, - brainImplantProject: 0, /* rebellions */ - tension: 0, - slaveProgress: 0, - citizenProgress: 0, slaveRebellionEventFires: 0, citizenRebellionEventFires: 0, slaveRebellion: 0, @@ -449,7 +438,6 @@ App.Data.resetOnNGPlus = { mercUnits: [], /* SFanon additions */ - SFGear: 0, SavedLeader: 0, SavedSFI: 0, sectionInFirebase: 0, @@ -1332,10 +1320,6 @@ App.Data.resetOnNGPlus = { diversePronouns: 0, - /* Security Expansion */ - wasToggledBefore: 0, - /* moved first build to post toggle */ - /* Career-skill gain */ masteredXP: 200, diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 80ff391fac2466b02ed1b2c15898e451547a909f..42122a712762c5209b0f3201934153bab68f07d8 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: "3.7.1", commitHash: null, - release: 1094 + release: 1096 }; diff --git a/src/Mods/SecExp/SecExpBackwardCompatibility.tw b/src/Mods/SecExp/SecExpBackwardCompatibility.tw index a30b015138745bc60a5de9dded665a0ed8efaae1..0a2fcc1cd7aacf6a77f2c73c84ab21e1d360eff2 100644 --- a/src/Mods/SecExp/SecExpBackwardCompatibility.tw +++ b/src/Mods/SecExp/SecExpBackwardCompatibility.tw @@ -6,15 +6,6 @@ <<run App.SecExp.generalBC()>> <<set $lastRebellionWeeks = Number($lastRebellionWeeks) || 0>> -/* init merc manpower if it wasn't done already */ -<<if $wasToggledBefore == 0>> - <<if $mercenaries == 1>> - <<set $mercFreeManpower = random(5,20)>> - <<elseif $mercenaries > 1>> - <<set $mercFreeManpower = random(10,30)>> - <</if>> -<</if>> - /* if we had the old one-time battle flags, make sure the counters are set to at least one */ <<if $battlesCount == 0 && $hasFoughtOnce == 1>> <<set $battlesCount = 1>> @@ -28,6 +19,5 @@ /* recalculation widgets */ <<fixBrokenStats>> -<<set $wasToggledBefore = 1>> <br>Missing Security Expansion variables set. All done! \ No newline at end of file diff --git a/src/Mods/SecExp/buildings/riotControlCenter.tw b/src/Mods/SecExp/buildings/riotControlCenter.tw index addb9acd26cf68ba91c911a287dcd71c7777326d..cda93a33c47dd7e9e3c04ca6930c1cf65d8e73d3 100644 --- a/src/Mods/SecExp/buildings/riotControlCenter.tw +++ b/src/Mods/SecExp/buildings/riotControlCenter.tw @@ -1,31 +1,27 @@ :: riotControlCenter [nobr jump-to-safe jump-from-safe] -<<set $nextButton = "Back">> -<<set $nextLink = "Main">> - -Riot Control Center -<hr> +<<set $nextButton = "Back", $nextLink = "Main">> +Riot Control Center<hr> The riot control center opens its guarded doors to you. The great chamber inside is dominated by massive screens filled with vital information and propaganda being tested. -<br> -<br> -<<if $tension <= 33>> +<br><br> +<<if $SecExp.rebellions.tension <= 33>> Tensions in the arcology are low. Political and ideological opposition against the arcology owner is almost unheard of. -<<elseif $tension <= 66>> +<<elseif $SecExp.rebellions.tension <= 66>> Tensions in the arcology are rising; political and ideological opposition against the arcology owner are becoming a part of the daily life of the arcology. <<else>> Tensions are high. Opposition to the arcology owner is a sentiment shared by many and armed resistance is on the rise. <</if>> <br> -<<if $riotUpgrades.freeMedia == 0>> - [[Provide free media access in all the arcology|riotControlCenter][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $riotUpgrades.freeMedia = 1]] +<<if $SecExp.buildings.riotCenter.upgrades.freeMedia == 0>> + [[Provide free media access in all the arcology|riotControlCenter][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $SecExp.buildings.riotCenter.upgrades.freeMedia = 1]] <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>. Will slowly lower tensions in the arcology, but will incur in upkeep costs.// <<else>> You are providing free access to many mass media in the arcology. - <<if $riotUpgrades.freeMedia < 5>> - <<set _cost = Math.trunc(5000 * $upgradeMultiplierArcology * ($riotUpgrades.freeMedia + 1)*$HackingSkillMultiplier)>> + <<if $SecExp.buildings.riotCenter.upgrades.freeMedia < 5>> + <<set _cost = Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.riotCenter.upgrades.freeMedia + 1)*$HackingSkillMultiplier)>> <br><<link "Invest more resources in the free media project" "riotControlCenter">> - <<set $riotUpgrades.freeMedia += 1>> + <<set $SecExp.buildings.riotCenter.upgrades.freeMedia++>> <<run cashX(forceNeg(_cost), "capEx")>> <<= IncreasePCSkills('hacking', 0.5)>> <</link>> @@ -35,38 +31,36 @@ The riot control center opens its guarded doors to you. The great chamber inside You upgraded your free media scheme to its limits. <</if>> <</if>> -<br> -<br> -<<if $slaveProgress <= 25>> +<br><br> +<<if $SecExp.rebellions.slaveProgress <= 25>> There is very low unrest between slaves in the arcology. The chances of a rebellion igniting are extremely low. -<<elseif $slaveProgress <= 50>> +<<elseif $SecExp.rebellions.slaveProgress <= 50>> There is some unrest between the slaves. No major movement is forming yet, but it might be time to consider preventive measures. -<<elseif $slaveProgress <= 75>> +<<elseif $SecExp.rebellions.slaveProgress <= 75>> Unrest is getting high between the slaves of the arcology. Preventive measures are necessary if we want to prevent a violent rebellion. <<else>> Unrest is extremely high between slaves. The chances of a rebellion happening in the near future are extremely high. <</if>> <br> -<<if $citizenProgress <= 25>> +<<if $SecExp.rebellions.citizenProgress <= 25>> There is very low unrest between the citizens of the arcology. The chances of a rebellion igniting are extremely low. -<<elseif $citizenProgress <= 50>> +<<elseif $SecExp.rebellions.citizenProgress <= 50>> There is some unrest between the citizens. No major movement is forming yet, but it might be time to consider preventive measures. -<<elseif $citizenProgress <= 75>> +<<elseif $SecExp.rebellions.citizenProgress <= 75>> Unrest is getting high between the citizens of the arcology. Preventive measures are necessary if we want to prevent a violent rebellion. <<else>> Unrest is extremely high between citizens. The chances of a rebellion happening in the near future are extremely high. <</if>> -<br> -<br> -<<if $riotUpgrades.rapidUnit == 0>> - [[Create rapid deployment riot units|riotControlCenter][cashX(forceNeg(Math.trunc(7500*$upgradeMultiplierArcology)), "capEx"), $riotUpgrades.rapidUnit = 1]] +<br><br> +<<if $SecExp.buildings.riotCenter.upgrades.rapidUnit == 0>> + [[Create rapid deployment riot units|riotControlCenter][cashX(forceNeg(Math.trunc(7500*$upgradeMultiplierArcology)), "capEx"), $SecExp.buildings.riotCenter.upgrades.rapidUnit = 1]] <br>//Costs <<print cashFormat(Math.trunc(7500*$upgradeMultiplierArcology))>>. Will allow spending authority or reputation to lower the progress of rebellions.// <<else>> You created a rapid deployment riot unit. - <<if $riotUpgrades.rapidUnit < 5>> - <<set _cost = Math.trunc(5000 * $upgradeMultiplierArcology * ($riotUpgrades.rapidUnit + 1))>> + <<if $SecExp.buildings.riotCenter.upgrades.rapidUnit < 5>> + <<set _cost = Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.riotCenter.upgrades.rapidUnit + 1))>> <br><<link "Invest more resources in the rapid deployment unit" "riotControlCenter">> - <<set $riotUpgrades.rapidUnit += 1>> + <<set $SecExp.buildings.riotCenter.upgrades.rapidUnit++>> <<run cashX(forceNeg(_cost), "capEx")>> <</link>> <br>Invest more resources into the project to increase its effectiveness. @@ -74,10 +68,10 @@ The riot control center opens its guarded doors to you. The great chamber inside <<else>> <br>You upgraded your rapid deployment unit to its limits. <</if>> - <<if $riotUpgrades.rapidUnitSpeed < 2>> - <<set _cost = Math.trunc(5000 * $upgradeMultiplierArcology * ($riotUpgrades.rapidUnitSpeed + 1))>> + <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed < 2>> + <<set _cost = Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed + 1))>> <br><<link "Enhance the internal informants network" "riotControlCenter">> - <<set $riotUpgrades.rapidUnitSpeed += 1>> + <<set $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed++>> <<run cashX(forceNeg(_cost), "capEx")>> <</link>> <br>Invest more resources into the effectiveness of the informants network. @@ -85,89 +79,84 @@ The riot control center opens its guarded doors to you. The great chamber inside <<else>> <br>You enhanced your informants network to its limits. <</if>> - <br> - <br>You can send out the squad to slow down the progress of hostile groups within the arcology: - <<link "spend authority" "riotControlCenter">> - <<set $riotUpgrades.rapidUnitCost = 0>> - <</link>> | - <<link "spend reputation" "riotControlCenter">> - <<set $riotUpgrades.rapidUnitCost = 1>> - <</link>> - <br> - Your - <<if $riotUpgrades.rapidUnitCost == 0>> - authority - <<else>> - reputation - <</if>> - will be leveraged to suppress the rebels. - <br> <span id="result"> - <<if $sentUnitCooldown == 0>> - <br><<link "Deploy the unit against slaves rebel leaders">> - <<if $riotUpgrades.rapidUnitCost == 0>> - <<set $SecExp.core.authority -= 1000 + 50 * $riotUpgrades.rapidUnit>> - <<else>> - <<run repX(forceNeg(1000 + 50 * $riotUpgrades.rapidUnit), "war")>> - <</if>> - <<set _change = random(15) + random(1,2) * $riotUpgrades.rapidUnit>> - <<set $slaveProgress = Math.clamp($slaveProgress - _change,0,100)>> - <<set $sentUnitCooldown = 3 - $riotUpgrades.rapidUnitSpeed>> - <<replace "#result">> - Slave rebellion progress set back by <<print _change>>%. - The unit will be able to deployed again in $sentUnitCooldown weeks. - <</replace>> - <</link>> - <br><<link "Deploy the unit against citizens rebel leaders">> - <<if $riotUpgrades.rapidUnitCost == 0>> - <<set $SecExp.core.authority -= 1000 + 50 * $riotUpgrades.rapidUnit>> - <<else>> - <<run repX(forceNeg(1000 + 50 * $riotUpgrades.rapidUnit), "war")>> - <</if>> - <<set _change = random(15) + random(1,2) * $riotUpgrades.rapidUnit>> - <<set $citizenProgress = Math.clamp($citizenProgress - _change,0,100)>> - <<set $sentUnitCooldown = 3 - $riotUpgrades.rapidUnitSpeed>> - <<replace "#result">> - Citizen rebellion progress set back by <<print _change>>%. - The unit will be able to deployed again in $sentUnitCooldown weeks. - <</replace>> - <</link>> + <<if $SecExp.buildings.riotCenter.sentUnitCooldown == 0>> + <br><br>You can send out the squad to slow down the progress of hostile groups within the arcology: + <<link "spend authority" "riotControlCenter">> + <<set $SecExp.buildings.riotCenter.upgrades.rapidUnitCost = 0>> + <</link>> | + <<link "spend reputation" "riotControlCenter">> + <<set $SecExp.buildings.riotCenter.upgrades.rapidUnitCost = 1>> + <</link>> + <br>Your + <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitCost == 0>> + authority <<else>> - <br>The unit cannot be deployed again for $sentUnitCooldown weeks. + reputation <</if>> + will be leveraged to suppress the rebels.<br> + <br><<link "Deploy the unit against slaves rebel leaders">> + <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitCost == 0>> + <<set $SecExp.core.authority -= 1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> + <<else>> + <<run repX(forceNeg(1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit), "war")>> + <</if>> + <<set _change = random(15) + random(1,2) * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> + <<set $SecExp.rebellions.slaveProgress = Math.clamp($SecExp.rebellions.slaveProgress - _change,0,100)>> + <<set $SecExp.buildings.riotCenter.sentUnitCooldown = 3 - $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed>> + <<replace "#result">> + Slave rebellion progress set back by <<print _change>>%. + The unit will be able to deployed again in $SecExp.buildings.riotCenter.sentUnitCooldown weeks. + <</replace>> + <</link>> + <br><<link "Deploy the unit against citizens rebel leaders">> + <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitCost == 0>> + <<set $SecExp.core.authority -= 1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> + <<else>> + <<run repX(forceNeg(1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit), "war")>> + <</if>> + <<set _change = random(15) + random(1,2) * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> + <<set $SecExp.rebellions.citizenProgress = Math.clamp($SecExp.rebellions.citizenProgress - _change,0,100)>> + <<set $SecExp.buildings.riotCenter.sentUnitCooldown = 3 - $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed>> + <<replace "#result">> + Citizen rebellion progress set back by <<print _change>>%. + The unit will be able to deployed again in $SecExp.buildings.riotCenter.sentUnitCooldown weeks. + <</replace>> + <</link>> + <<else>> + <br>The unit cannot be deployed again for $SecExp.buildings.riotCenter.sentUnitCooldown weeks. + <</if>> </span> <</if>> -<br> -<br> -<<if $brainImplant < 106>> - <<if $brainImplantProject == 0>> +<br><br> +<<if $SecExp.buildings.riotCenter.brainImplant < 106>> + <<if $SecExp.buildings.riotCenter.brainImplantProject == 0>> <<link "Start secretly installing brain implants in your citizens and resident slaves" "riotControlCenter">> - <<set $brainImplantProject = 1>> - <<set $brainImplant = 0>> + <<set $SecExp.buildings.riotCenter.brainImplantProject = 1>> + <<set $SecExp.buildings.riotCenter.brainImplant = 0>> <</link>> <br>//Will take weeks of work and will cost <<print cashFormat(5000)>> each week, but once finished rebellions will progress a lot slower.// - <<elseif $brainImplantProject < 5>> + <<elseif $SecExp.buildings.riotCenter.brainImplantProject < 5>> <<link "Invest more resources in the brain implant project" "riotControlCenter">> - <<set $brainImplantProject += 1>> - <<run cashX(forceNeg(Math.trunc(50000 * $upgradeMultiplierArcology * $brainImplantProject*$HackingSkillMultiplier)), "capEx")>> + <<set $SecExp.buildings.riotCenter.brainImplantProject++>> + <<run cashX(forceNeg(Math.trunc(50000 * $upgradeMultiplierArcology * $SecExp.buildings.riotCenter.brainImplantProject*$HackingSkillMultiplier)), "capEx")>> <<= IncreasePCSkills('hacking', 1)>> <</link>> <br>Invest more resources into the project to increase its speed. - <br>//One-time cost of <<print cashFormat(Math.trunc(50000 * $upgradeMultiplierArcology * $brainImplantProject*$HackingSkillMultiplier))>> with an additional <<print cashFormat(5000)>> each week in maintenance. Will shorten the time required to complete the project.// + <br>//One-time cost of <<print cashFormat(Math.trunc(50000 * $upgradeMultiplierArcology * $SecExp.buildings.riotCenter.brainImplantProject*$HackingSkillMultiplier))>> with an additional <<print cashFormat(5000)>> each week in maintenance. Will shorten the time required to complete the project.// <<else>> You sped up the project to its maximum. <</if>> - <<if $brainImplant != -1>> - <br><br>The great brain implant project is underway. Estimated time to completion: <<print Math.trunc((100 - $brainImplant) / $brainImplantProject)>> + <<if $SecExp.buildings.riotCenter.brainImplant != -1>> + <br><br>The great brain implant project is underway. Estimated time to completion: <<print Math.trunc((100 - $SecExp.buildings.riotCenter.brainImplant) / $SecExp.buildings.riotCenter.brainImplantProject)>> <</if>> <<else>> The great brain implant project is completed, rebellions against you will be extremely difficult to organize. <</if>> -<br> -<br> -<<if $advancedRiotEquip == 0>> +<br><br> +<<if $SecExp.buildings.riotCenter.advancedRiotEquip == 0>> <<link "Develop advanced anti-riot equipment" "riotControlCenter">> - <<set $advancedRiotEquip = 1>> + <<set $SecExp.buildings.riotCenter.advancedRiotEquip = 1>> <<run cashX(forceNeg(30000 * $upgradeMultiplierTrade), "capEx")>> <</link>> <br>//Costs <<print cashFormat(30000 * $upgradeMultiplierTrade)>>. Will allow the selection of advanced riot equipment in case of a rebellion, which will let your troops fight at full effectiveness while doing reduced collateral damage.// @@ -175,9 +164,9 @@ The riot control center opens its guarded doors to you. The great chamber inside You developed advanced riot equipment, which allows your troops to fight within the confines of your arcology without the fear of doing major collateral damage. <</if>> <br> -<<if $fort.reactor == 0>> +<<if $SecExp.buildings.riotCenter.fort.reactor == 0>> <<link "Reinforce the reactor complex" "riotControlCenter">> - <<set $fort.reactor = 1>> + <<set $SecExp.buildings.riotCenter.fort.reactor = 1>> <<run cashX(forceNeg(10000 * $upgradeMultiplierArcology), "capEx")>> <</link>> <br>//Costs <<print cashFormat(10000 * $upgradeMultiplierArcology)>>. Will add protection to the reactor building, making it less likely to be damaged and speeding up repairs if our defensive efforts should fail.// @@ -185,9 +174,9 @@ The riot control center opens its guarded doors to you. The great chamber inside You have installed additional protection layers and redundant systems in the reactor complex. <</if>> <br> -<<if $fort.waterway == 0>> +<<if $SecExp.buildings.riotCenter.fort.waterway == 0>> <<link "Reinforce the waterways" "riotControlCenter">> - <<set $fort.waterway = 1>> + <<set $SecExp.buildings.riotCenter.fort.waterway = 1>> <<run cashX(forceNeg(10000 * $upgradeMultiplierArcology), "capEx")>> <</link>> <br>//Costs <<print cashFormat(10000 * $upgradeMultiplierArcology)>>. Will add protection to the waterways, making it less likely to be damaged and speeding up repairs if our defensive efforts should fail.// @@ -195,9 +184,9 @@ The riot control center opens its guarded doors to you. The great chamber inside You have installed additional protection layers and redundant systems in the waterways. <</if>> <br> -<<if $fort.assistant == 0>> +<<if $SecExp.buildings.riotCenter.fort.assistant == 0>> <<link "Reinforce the assistant CPU core" "riotControlCenter">> - <<set $fort.assistant = 1>> + <<set $SecExp.buildings.riotCenter.fort.assistant = 1>> <<run cashX(forceNeg(10000 * $upgradeMultiplierArcology), "capEx")>> <</link>> <br>//Costs <<print cashFormat(10000 * $upgradeMultiplierArcology)>>. Will add protection to the assistant CPU core, making it less likely to be damaged and speeding up repairs if our defensive efforts should fail.// @@ -206,10 +195,14 @@ The riot control center opens its guarded doors to you. The great chamber inside <</if>> <<if $SF.Toggle && $SF.Active >= 1>> - <<if $SecExp.edicts.SFSupportLevel >= 4 && !$SFGear && $SF.Squad.Armoury >= 8>> <<set _Env = App.SF.env()>> - <br> <<link "Give the riot unit access to the combat armor suits of $SF.Lower.""riotControlCenter">> <<set $SFGear = 1,cashX(forceNeg(Math.ceil(500000*_Env*(1.15+($SF.Squad.Armoury/10)))), "capEx")>> <</link>> - //Costs <<print cashFormat(Math.ceil(500000*_Env*(1.15+($SF.Squad.Armoury/10))))>> + <br> + <<if $SecExp.edicts.SFSupportLevel >= 4 && $SF.Squad.Armoury >= 8 && !$SecExp.rebellions.sfArmor>> + <<set _cost = Math.ceil(500000*App.SF.env()*(1.15+($SF.Squad.Armoury/10)))>> + <<link "Give the riot unit access to the combat armor suits of $SF.Lower.""riotControlCenter">> + <<set $SecExp.rebellions.sfArmor = 1, cashX(-_cost), "capEx")>> + <</link>> + //Costs <<print cashFormat(_cost)>> <<else>> - <br>You have given the riot unit access to the combat armor suits of $SF.Lower. + You have given the riot unit access to the combat armor suits of $SF.Lower. <</if>> <</if>> \ No newline at end of file diff --git a/src/Mods/SecExp/js/buildingsJS.js b/src/Mods/SecExp/js/buildingsJS.js index 00ad32adf82113f7cb0013009e78cd9626b7024a..32cdf028b416d09007bf27cb4079db6c6f0d8f4c 100644 --- a/src/Mods/SecExp/js/buildingsJS.js +++ b/src/Mods/SecExp/js/buildingsJS.js @@ -338,7 +338,7 @@ App.SecExp.secHub = (function() { } } })(); -/* + App.SecExp.riotCenter = (function() { return { Init:Init, @@ -380,12 +380,15 @@ App.SecExp.riotCenter = (function() { V.SecExp.buildings.riotCenter.sentUnitCooldown = V.SecExp.buildings.riotCenter.sentUnitCooldown || V.sentUnitCooldown || 0; V.SecExp.buildings.riotCenter.advancedRiotEquip = V.SecExp.buildings.riotCenter.advancedRiotEquip || V.advancedRiotEquip || 0; - V.SecExp.buildings.riotCenter.brainImplant = V.SecExp.buildings.riotCenter.brainImplant || V.brainImplant || -1; + V.SecExp.buildings.riotCenter.brainImplant = V.SecExp.buildings.riotCenter.brainImplant || -1; + if (jsDef(V.brainImplant)) { + V.SecExp.buildings.riotCenter.brainImplant = V.brainImplant; + } V.SecExp.buildings.riotCenter.brainImplantProject = V.SecExp.buildings.riotCenter.brainImplantProject || V.brainImplantProject || 0; } } })(); -*/ + App.SecExp.weapManu = (function() { return { Init:Init, diff --git a/src/Mods/SecExp/js/secExp.js b/src/Mods/SecExp/js/secExp.js index ff5846282ce42459a415963eadc0348556cc36dd..bef65353ff6e879eaca86848fc09a00caed9a45c 100644 --- a/src/Mods/SecExp/js/secExp.js +++ b/src/Mods/SecExp/js/secExp.js @@ -31,16 +31,15 @@ App.SecExp.generalInit = function(){ lossStreak: 0, lastEncounterWeeks: 0, saved: {} - }, + }, */ rebellions: { tension: 0, slaveProgress: 0, citizenProgress: 0, - victories: 0, - losses: 0, - lastEncounterWeeks: 0 + // victories: 0, + // losses: 0, + // lastEncounterWeeks: 0 }, - */ core: { trade: 0, authority: 0, @@ -84,12 +83,6 @@ App.SecExp.generalInit = function(){ reactor: 0, arc: 0 }, - garrison: { - penthouse: 0, - reactor: 0, - assistant: 0, - waterway: 0 - }, units: { bots: {}, slaves: { @@ -257,16 +250,12 @@ App.SecExp.upkeep = (function() { if (V.SecExp.buildings.barracks) { value += base + upgrade* Object.values(V.SecExp.buildings.barracks).reduce((a, b) => a + b); } - if (V.riotCenter > 0) { - value += base; - let buildingUgradePool = Object.values(V.riotUpgrades); - for(let i = 0; i < buildingUgradePool.length; i++) { - value += upgrade*buildingUgradePool[i]; - } - if (V.brainImplant < 106 && V.brainImplantProject > 0) { - value += 5000*V.brainImplantProject; + if (V.SecExp.buildings.riotCenter) { + value += base + upgrade* Object.values(V.SecExp.buildings.riotCenter.upgrades).reduce((a, b) => a + b); + if (V.SecExp.buildings.riotCenter.brainImplant < 106 && V.SecExp.buildings.riotCenter.brainImplantProject > 0) { + value += 5000 * V.SecExp.buildings.riotCenter.brainImplantProject; } - if (V.SF.Toggle && V.SF.Active >= 1 && V.SFGear > 0) { + if (V.SF.Toggle && V.SF.Active >= 1 && V.SecExp.rebellions.sfArmor) { value += 15000; } } diff --git a/src/Mods/SecExp/js/secExpBC.js b/src/Mods/SecExp/js/secExpBC.js index 21b422b021426b942b9418beed63639faf4db910..4c3740d976f5410ebebb49087fa3dd4047531eb1 100644 --- a/src/Mods/SecExp/js/secExpBC.js +++ b/src/Mods/SecExp/js/secExpBC.js @@ -86,39 +86,35 @@ App.SecExp.generalBC = function() { /* if (V.secBots) { V.SecExp.units.bots = V.secBots; } - - V.SecExp.units.slaves = V.SecExp.units.slaves || {}; - V.SecExp.units.slaves.casualties = V.SecExp.units.slaves.casualties || V.slavesTotalCasualties || 0; - V.SecExp.units.slaves.created = V.SecExp.units.slaves.created || V.createdSlavesUnits || 0; - V.SecExp.units.slaves.sqauds = V.SecExp.units.slaves.sqauds || V.slaveUnits || []; */ + // V.SecExp.units.slaves = V.SecExp.units.slaves || {}; + // V.SecExp.units.slaves.casualties = V.SecExp.units.slaves.casualties || V.slavesTotalCasualties || 0; + // V.SecExp.units.slaves.created = V.SecExp.units.slaves.created || V.createdSlavesUnits || 0; + // V.SecExp.units.slaves.sqauds = V.SecExp.units.slaves.sqauds || V.slaveUnits || []; for (let i = 0; i < V.slaveUnits; i++) { App.SecExp.fixBrokenUnit(V.slaveUnits[i]); } - /* - V.SecExp.units.milita = V.SecExp.units.milita || {}; - V.SecExp.units.milita.created = V.SecExp.units.milita.created || V.createdMilitiaUnits || 0; - V.SecExp.units.milita.free = V.SecExp.units.milita.free || V.militiaFreeManpower || 0; - V.SecExp.units.milita.casualties = V.SecExp.units.milita.casualties || V.militiaTotalCasualties || 0; - V.SecExp.units.milita.sqauds = V.SecExp.units.milita.sqauds || V.militiaUnits || []; - */ + // V.SecExp.units.milita = V.SecExp.units.milita || {}; + // V.SecExp.units.milita.created = V.SecExp.units.milita.created || V.createdMilitiaUnits || 0; + // V.SecExp.units.milita.free = V.SecExp.units.milita.free || V.militiaFreeManpower || 0; + // V.SecExp.units.milita.casualties = V.SecExp.units.milita.casualties || V.militiaTotalCasualties || 0; + // V.SecExp.units.milita.sqauds = V.SecExp.units.milita.sqauds || V.militiaUnits || []; + for (let i = 0; i < V.militiaUnits; i++) { App.SecExp.fixBrokenUnit(V.militiaUnits[i]); } - /* - V.SecExp.units.mercs = V.SecExp.units.mercs || {}; - V.SecExp.units.mercs.created = V.SecExp.units.mercs.created || V.createdMercUnits || 0; - V.SecExp.units.mercs.free = V.SecExp.units.mercs.free || V.mercFreeManpower || 0; - if (V.SecExp.units.mercs.free === 0) { + // V.SecExp.units.mercs = V.SecExp.units.mercs || {}; + // V.SecExp.units.mercs.created = V.SecExp.units.mercs.created || V.createdMercUnits || 0; + // V.SecExp.units.mercs.free = V.SecExp.units.mercs.free || V.mercFreeManpower || 0; + if (V.mercFreeManpower === 0) { if (V.mercenaries === 1) { - V.SecExp.units.mercs.free = 15; + V.mercFreeManpower = 15; } else if (V.mercenaries > 1) { - V.SecExp.units.mercs.free = 30; + V.mercFreeManpower = 30; } } - V.SecExp.units.mercs.casualties = V.SecExp.units.mercs.casualties || V.mercTotalCasualties || 0; - V.SecExp.units.mercs.sqauds = V.SecExp.units.mercs.sqauds || V.mercUnits || []; - */ + // V.SecExp.units.mercs.casualties = V.SecExp.units.mercs.casualties || V.mercTotalCasualties || 0; + // V.SecExp.units.mercs.sqauds = V.SecExp.units.mercs.sqauds || V.mercUnits || []; for (let i = 0; i < V.mercUnits; i++) { App.SecExp.fixBrokenUnit(V.mercUnits[i]); } @@ -180,7 +176,7 @@ App.SecExp.generalBC = function() { V.SecExp.battles.slaveVictories = V.SecExp.battles.slaveVictories || V.slaveVictories || []; V.SecExp.battles.major = V.SecExp.battles.major || V.majorBattlesCount || 0; V.SecExp.battles.victories = V.SecExp.battles.victories || V.PCvictories || 0; - V.SecExp.batlles.victoryStreak = V.SecExp.batlles.victoryStreak || V.PCvictoryStreak || 0; + V.SecExp.battles.victoryStreak = V.SecExp.battles.victoryStreak || V.PCvictoryStreak || 0; V.SecExp.battles.losses = V.SecExp.battles.losses || V.PClosses || 0; V.SecExp.battles.lossStreak = V.SecExp.battles.lossStreak || V.PClossStreak || 0; V.SecExp.battles.lastEncounterWeeks = V.SecExp.battles.lastEncounterWeeks || V.lastAttackWeeks || 0; @@ -188,18 +184,17 @@ App.SecExp.generalBC = function() { V.SecExp.battles.saved = V.SecExp.battles.saved || {}; V.SecExp.battles.saved.commander = V.SecExp.battles.saved.commander || V.SavedLeader || ""; V.SecExp.battles.saved.sfSupport = V.SecExp.battles.saved.sfSupport || V.SavedSFI || 0; - + */ V.SecExp.rebellions = V.SecExp.rebellions || {}; V.SecExp.rebellions.tension = V.SecExp.rebellions.tension || V.tension || 0; V.SecExp.rebellions.slaveProgress = V.SecExp.rebellions.slaveProgress || V.slaveProgress || 0; V.SecExp.rebellions.citizenProgress = V.SecExp.rebellions.citizenProgress || V.citizenProgress || 0; - V.SecExp.rebellions.victories = V.SecExp.rebellions.victories || V.PCrebWon || 0; - V.SecExp.rebellions.losses = V.SecExp.rebellions.losses || V.PCrebLoss || 0; - V.SecExp.rebellions.lastEncounterWeeks = V.SecExp.battles.lastEncounterWeeks || V.lastRebellionWeeks || 0; + // V.SecExp.rebellions.victories = V.SecExp.rebellions.victories || V.PCrebWon || 0; + // V.SecExp.rebellions.losses = V.SecExp.rebellions.losses || V.PCrebLoss || 0; + // V.SecExp.rebellions.lastEncounterWeeks = V.SecExp.rebellions.lastEncounterWeeks || V.lastRebellionWeeks || 0; if (V.SFGear) { V.SecExp.rebellions.sfArmor = V.SFGear; } - */ V.SecExp.settings.difficulty = V.SecExp.settings.difficulty || 1; if (jsDef(V.difficulty)) { @@ -291,7 +286,7 @@ App.SecExp.generalBC = function() { App.SecExp.barracks.BC(); App.SecExp.secHub.BC(); App.SecExp.transportHub.BC(); - // App.SecExp.riotCenter.BC(); + App.SecExp.riotCenter.BC(); App.SecExp.weapManu.BC(); V.SecExp.proclamation = V.SecExp.proclamation || {}; @@ -315,18 +310,6 @@ App.SecExp.generalBC = function() { V.SecExp.rebellions.repairTime.reactor = V.garrison.reactorTime; V.SecExp.rebellions.repairTime.arc = V.arcRepairTime; } - - V.SecExp.rebellions.garrison = V.SecExp.rebellions.garrison || {}; - V.SecExp.rebellions.garrison.penthouse = V.SecExp.rebellions.garrison.penthouse || 0; - V.SecExp.rebellions.garrison.reactor = V.SecExp.rebellions.garrison.reactor || 0; - V.SecExp.rebellions.garrison.assistant = V.SecExp.rebellions.garrison.assistant || 0; - V.SecExp.rebellions.garrison.waterway = V.SecExp.rebellions.garrison.waterway || 0; - if (jsDef(V.garrison)) { - V.SecExp.rebellions.garrison.penthouse = V.garrison.penthouse; - V.SecExp.rebellions.garrison.reactor = V.garrison.reactor; - V.SecExp.rebellions.garrison.assistant = V.garrison.assistant; - V.SecExp.rebellions.garrison.waterway = V.garrison.waterway; - } */ } diff --git a/src/Mods/SecExp/potentialToDo.txt b/src/Mods/SecExp/potentialToDo.txt index 9167e7358e8e81de5bfcd38cced8b0adebe09575..56d49ff21c6c559d088ff1f72278edaa274ee8b3 100644 --- a/src/Mods/SecExp/potentialToDo.txt +++ b/src/Mods/SecExp/potentialToDo.txt @@ -1,5 +1,9 @@ Hexall90's last merged commit: 52dde0b3 +- While at it something for barracks(general? commissar?) and riot center([Insert player title there]'s Will?? Big Sister? ) too would be nice +- 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 - Enable oceanic battles @@ -26,7 +30,6 @@ Hexall90's last merged commit: 52dde0b3 - Does forcing every citizen to be in military raise appeal of slaves that know how to fight? - And if I am a master tactician, maybe I could get an estimate how effective the various tacticts could be? - make https://gitgud.io/pregmodfan/fc-pregmod/issues/1431 and https://gitgud.io/pregmodfan/fc-pregmod/issues/1436 more visible -- Suggestion - Weapon Manufacturing Research Queue - https://gitgud.io/pregmodfan/fc-pregmod/issues/1618 - Ability to create more drone squads. - Increase base maximum units to 18, 20 with SF. - Suggestion - Gradual Battle Frequency - https://gitgud.io/pregmodfan/fc-pregmod/issues/1245#note_82504 @@ -38,4 +41,4 @@ Hexall90's last merged commit: 52dde0b3 - 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. -- Unrelated minor suggestion: Could we perhaps set default unit names somewhere? Just a small thing so I don't have to change each new unit to (slave/citizen/mercenary) Legion in my Roman society whenever I make new ones. \ No newline at end of file +- Unrelated minor suggestion: Could we perhaps set default unit names somewhere? Just a small thing so I don't have to change each new unit to (slave/citizen/mercenary) Legion in my Roman society whenever I make new ones. diff --git a/src/Mods/SecExp/rebellionEvents.tw b/src/Mods/SecExp/rebellionEvents.tw index 93f752e2bc7bdec4de08538cdd6f97f9ef4ac872..fcf207cfee32573b25c100a950f32103ffe0f069 100644 --- a/src/Mods/SecExp/rebellionEvents.tw +++ b/src/Mods/SecExp/rebellionEvents.tw @@ -1,17 +1,17 @@ :: rebellionEvents [nobr] <<if $slaveRebellionEventFires == 1>> - <<if $tension <= 33>> + <<if $SecExp.rebellions.tension <= 33>> <<set _event = 1>> - <<elseif $tension <= 66>> + <<elseif $SecExp.rebellions.tension <= 66>> <<set _event = 2>> <<else>> <<set _event = 3>> <</if>> <<elseif $citizenRebellionEventFires == 1>> - <<if $tension <= 33>> + <<if $SecExp.rebellions.tension <= 33>> <<set _event = 4>> - <<elseif $tension <= 66>> + <<elseif $SecExp.rebellions.tension <= 66>> <<set _event = 5>> <<else>> <<set _event = 6>> @@ -38,7 +38,7 @@ <<else>> This week a slave was found dead in one of the sewer tunnels. It seems _heU was stabbed repeatedly with a sharp object. _HeU was fairly famous for _hisU capabilities as a slave trainer; _hisU old master spent not an insignificant amount of money trying to find _himU once he realized _heU was missing. The episode might have been a simple mugging gone wrong, but _hisU activities as a slave breaker might have played a role in _hisU homicide. <</if>> - <<set $tension += random(1,5)>> + <<set $SecExp.rebellions.tension += random(1,5)>> <<case 2>> /* med tension slave rebellion events */ <<set _rand = random(0,5)>> @@ -55,7 +55,7 @@ <<else>> This week a sleeper cell of a famous anti slavery organization was discovered in the low levels of the arcology. The group, however, was aware of the coming security forces and retreated before they could be dealt with. <</if>> - <<set $tension += random(5,10)>> + <<set $SecExp.rebellions.tension += random(5,10)>> <<case 3>> /* high tension slave rebellion events */ <<set _rand = random(0,4)>> @@ -68,7 +68,7 @@ <<elseif _rand == 3>> This week a number of riots inflamed the arcology. Many slaves took violent actions against citizens and security personnel. The number of victims keeps getting higher as still now the last sparks of revolt are still active. <</if>> - <<set $tension += random(10,15)>> + <<set $SecExp.rebellions.tension += random(10,15)>> <<case 4>> <<set _rand = random(0,6)>> <<if _rand == 0>> @@ -86,7 +86,7 @@ <<else>> This week a security drone was found disabled and stripped of important electronic components. It seems the act was not dictated by greed, as the most precious parts of the drone were left on the machine, but rather to cover up something that the drone saw. <</if>> - <<set $tension += random(1,5)>> + <<set $SecExp.rebellions.tension += random(1,5)>> <<case 5>> <<set _rand = random(0,5)>> <<if _rand == 0>> @@ -102,7 +102,7 @@ <<else>> This week several citizens barricaded themselves in a private brothel. It seems their intention is to protest against the use of ex-citizens in the sex trade, claiming that such a position is unfitting for them. The problem was quickly resolved with the intervention of the security department. <</if>> - <<set $tension += random(5,10)>> + <<set $SecExp.rebellions.tension += random(5,10)>> <<case 6>> <<set _rand = random(0,4)>> <<if _rand == 0>> @@ -114,7 +114,7 @@ <<elseif _rand == 3>> This week a massive protest of citizens and slaves gathered just outside the penthouse. The crowd was dispersed only after several hours. There were several victims from both sides and no shortage of injured. <</if>> - <<set $tension += random(10,15)>> + <<set $SecExp.rebellions.tension += random(10,15)>> <</switch>> -<<set $tension = Math.clamp($tension,0,100)>> \ No newline at end of file +<<set $SecExp.rebellions.tension = Math.clamp($SecExp.rebellions.tension,0,100)>> \ No newline at end of file diff --git a/src/Mods/SecExp/rebellionGenerator.tw b/src/Mods/SecExp/rebellionGenerator.tw index 74614e0ca642901473d85f2c0cb81a54cf6f454b..f34ee4d3b2c64a6253bade4a6f59e7f53b547133 100644 --- a/src/Mods/SecExp/rebellionGenerator.tw +++ b/src/Mods/SecExp/rebellionGenerator.tw @@ -181,7 +181,7 @@ <<set _citizen = 95>> <</if>> <<set _roll = random(1,_slave + _citizen)>> -<<if $brainImplant == 106>> +<<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.brainImplant == 106>> <<set _slave = Math.trunc(_slave * 0.5 * $SecExp.settings.rebellion.speed), _citizen = Math.trunc(_citizen * 0.5 * $SecExp.settings.rebellion.speed)>> <<else>> <<set _slave = Math.trunc(_slave * $SecExp.settings.rebellion.speed), _citizen = Math.trunc(_citizen * $SecExp.settings.rebellion.speed)>> @@ -190,52 +190,52 @@ <<if random(1,100) < _slave>> <<set $slaveRebellionEventFires = 1>> <<set $citizenRebellionEventFires = 0>> - <<if $tension != 0>> - <<set $slaveProgress += Math.trunc(random(1,5) * ($tension / 100) * 10)>> /* progress scales with tension */ + <<if $SecExp.rebellions.tension != 0>> + <<set $SecExp.rebellions.slaveProgress += Math.trunc(random(1,5) * ($SecExp.rebellions.tension / 100) * 10)>> /* progress scales with tension */ <<else>> - <<set $slaveProgress += random(1,5)>> + <<set $SecExp.rebellions.slaveProgress += random(1,5)>> <</if>> <</if>> <<else>> <<if random(1,100) < _citizen>> <<set $slaveRebellionEventFires = 0>> <<set $citizenRebellionEventFires = 1>> - <<if $tension != 0>> - <<set $citizenProgress += Math.trunc(random(1,5) * ($tension / 100) * 10)>> + <<if $SecExp.rebellions.tension != 0>> + <<set $SecExp.rebellions.citizenProgress += Math.trunc(random(1,5) * ($SecExp.rebellions.tension / 100) * 10)>> <<else>> - <<set $citizenProgress += random(1,5)>> + <<set $SecExp.rebellions.citizenProgress += random(1,5)>> <</if>> <</if>> <</if>> /* if there is an advancement selects a random mini event */ -<<set _oldTension = $tension>> +<<set _oldTension = $SecExp.rebellions.tension>> <<if $slaveRebellionEventFires == 1 || $citizenRebellionEventFires == 1>> <br><br> <<include "rebellionEvents">> -<<elseif $tension > 0>> +<<elseif $SecExp.rebellions.tension > 0>> /* otherwise tension decays */ <br><br> <strong>Tension</strong>: - <<if $riotUpgrades.freeMedia >= 1>> + <<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.upgrades.freeMedia >= 1>> The guaranteed free media access you offer does wonders to lower tensions in the arcology. - <<set $tension = Math.trunc(Math.clamp($tension - $riotUpgrades.freeMedia / 2,0,100))>> + <<set $SecExp.rebellions.tension = Math.trunc(Math.clamp($SecExp.rebellions.tension - $SecExp.buildings.riotCenter.upgrades.freeMedia / 2,0,100))>> <</if>> In the absence of noteworthy events, tensions in the arcology are able to relax. - <<set $tension = Math.trunc(Math.clamp($tension * 0.97,0,100))>> + <<set $SecExp.rebellions.tension = Math.trunc(Math.clamp($SecExp.rebellions.tension * 0.97,0,100))>> <</if>> <br> -<<if $tension < _oldTension>> +<<if $SecExp.rebellions.tension < _oldTension>> <br>This week @@.green;tensions relaxed.@@<br> -<<elseif $tension == _oldTension && $tension != 0>> +<<elseif $SecExp.rebellions.tension == _oldTension && $SecExp.rebellions.tension != 0>> <br>This week @@.yellow;tensions did not change.@@<br> -<<elseif $tension > _oldTension>> +<<elseif $SecExp.rebellions.tension > _oldTension>> <br>This week @@.red;tension rose@@ and <<if $slaveRebellionEventFires == 1>> @@.red;slave malcontent increased.@@<br> <<elseif $citizenRebellionEventFires == 1>> @@.red;citizen malcontent increased.@@<br> <</if>> -<<elseif !Number.isInteger($tension)>> +<<elseif !Number.isInteger($SecExp.rebellions.tension)>> <br>Error: tension is outside accepted range.<br> <</if>> @@ -244,21 +244,21 @@ <<set $citizenRebellionEventFires = 0>> /* rolls for rebellions */ -<<if $slaveProgress >= 100>> +<<if $SecExp.rebellions.slaveProgress >= 100>> <<if random(1,100) <= 80>> /* 80% of firing a rebellion once progress is at 100 */ <<set $slaveRebellion = 1>> - <<set $slaveProgress = 0>> - <<set $citizenProgress *= 0.2>> + <<set $SecExp.rebellions.slaveProgress = 0>> + <<set $SecExp.rebellions.citizenProgress *= 0.2>> <<else>> - <<set $slaveProgress = 100>> + <<set $SecExp.rebellions.slaveProgress = 100>> <</if>> -<<elseif $citizenProgress >= 100>> +<<elseif $SecExp.rebellions.citizenProgress >= 100>> <<if random(1,100) <= 80>> <<set $citizenRebellion = 1>> - <<set $citizenProgress = 0>> - <<set $slaveProgress *= 0.2>> + <<set $SecExp.rebellions.citizenProgress = 0>> + <<set $SecExp.rebellions.slaveProgress *= 0.2>> <<else>> - <<set $citizenProgress = 100>> + <<set $SecExp.rebellions.citizenProgress = 100>> <</if>> <</if>> diff --git a/src/Mods/SecExp/rebellionHandler.tw b/src/Mods/SecExp/rebellionHandler.tw index dff703c5f4e302bf525d3d68a77ef6dbc9f32ede..0af05c3cbf3749deca80c4d24cd21da739d61d47 100644 --- a/src/Mods/SecExp/rebellionHandler.tw +++ b/src/Mods/SecExp/rebellionHandler.tw @@ -284,7 +284,7 @@ __Difficulty__:<br> <<set _damage = _enemyAttack * 0.1>> <</if>> <<if $SecExp.settings.showStats == 1>> <br>enemy damage: <<print num(Math.round(_damage))>><</if>> - <<set _hp -= _damage*($SFGear ? 0.85 : 1)>> + <<set _hp -= _damage*($SecExp.rebellions.sfArmor ? 0.85 : 1)>> <<if $SecExp.settings.showStats == 1>> <br>remaining hp: <<print num(Math.round(_hp))>><</if>> <<set $losses += _damage / _baseHp>> <<set _moraleDamage = Math.clamp(_damage / 2 + _damage / _baseHp,0,_damage*1.5)>> diff --git a/src/Mods/SecExp/rebellionOptions.tw b/src/Mods/SecExp/rebellionOptions.tw index e98b7b96bcfb59ab2f515980b24c707d36d094ed..fc9072252652ab2524d2149b6510c4b578ee0539 100644 --- a/src/Mods/SecExp/rebellionOptions.tw +++ b/src/Mods/SecExp/rebellionOptions.tw @@ -216,7 +216,7 @@ In order to preserve the structural integrity of the building and the lives of o <br>Your troops will not limit their arsenal. This will put the structure and your citizens at risk, but our troops will be at full capacity. <</replace>> <</link>> -<<if $advancedRiotEquip == 1>> +<<if $SecExp.buildings.riotCenter.advancedRiotEquip == 1>> <br><<link "Advanced riot protocol">> <<set $engageRule = 3>> <<replace "#engage">> diff --git a/src/Mods/SecExp/rebellionReport.tw b/src/Mods/SecExp/rebellionReport.tw index e5ccfb4fefbf85a6bc21903882f95cc48ac36d8d..1c00ecdf3401bc896edbe8c63e650c8b2b9c425c 100644 --- a/src/Mods/SecExp/rebellionReport.tw +++ b/src/Mods/SecExp/rebellionReport.tw @@ -35,7 +35,7 @@ <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>><<print num(Math.trunc($losses))>> casualties<<elseif $losses > 0>>a casualty<<else>>zero casualties<</if>>. <</if>> - <<if $SFGear>> + <<if $SecExp.rebellions.sfArmor>> More units were able to survive thanks to wearing $SF.Lower's combat armor suits. <</if>> <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses), @@ -167,7 +167,7 @@ <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties <<else>> a casualty.<</if>> <</if>> - <<if $SFGear>> + <<if $SecExp.rebellions.sfArmor>> More units were able to survive thanks to wearing $SF.Lower's combat armor suits. <</if>> <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses), @@ -483,10 +483,10 @@ /* garrisons */ <<if $garrison.reactor == 0>> - <<if random(1,100) <= (75 - ($fort.reactor * 25))>> + <<if random(1,100) <= (75 - ($SecExp.buildings.riotCenter.fort.reactor * 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) - $fort.reactor, IncreasePCSkills('engineering', 0.1)>> + <<set $garrison.reactorTime = $repairTime + random(1) - $SecExp.buildings.riotCenter.fort.reactor, 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. @@ -495,10 +495,10 @@ The garrison assigned to the reactor protected it from the multiple sabotage attempts carried out by the rebels. <</if>> <<if $garrison.waterway == 0>> - <<if random(1,100) <= (75 - ($fort.waterway * 25))>> + <<if random(1,100) <= (75 - ($SecExp.buildings.riotCenter.fort.waterway * 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) - $fort.waterway, IncreasePCSkills('engineering', 0.1)>> + <<set $garrison.waterwayTime = $repairTime + random(1) - $SecExp.buildings.riotCenter.fort.waterway, 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. @@ -507,10 +507,10 @@ The garrison assigned to the water management complex protected it from the sabotage attempt of the rebels. <</if>> <<if $garrison.assistant == 0>> - <<if random(1,100) <= (75 - ($fort.assistant * 25))>> + <<if random(1,100) <= (75 - ($SecExp.buildings.riotCenter.fort.assistant * 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) - $fort.assistant, IncreasePCSkills('engineering', 0.1)>> + <<set $garrison.assistantTime = $repairTime + random(1) - $SecExp.buildings.riotCenter.fort.assistant, 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. @@ -893,12 +893,12 @@ <<set $battleTurns = 0>> <<set $irregulars = 0>> <<if $slaveRebellion == 1>> - <<set $slaveProgress = 0>> - <<set $citizenProgress = Math.clamp($citizenProgress - random(50,100), 0, 100)>> + <<set $SecExp.rebellions.slaveProgress = 0>> + <<set $SecExp.rebellions.citizenProgress = Math.clamp($SecExp.rebellions.citizenProgress - random(50,100), 0, 100)>> <<else>> - <<set $citizenProgress = 0>> - <<set $slaveProgress = Math.clamp($slaveProgress - random(50,100), 0, 100)>> + <<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 $tension = Math.clamp($tension - random(50,100), 0, 100)>> +<<set $SecExp.rebellions.tension = Math.clamp($SecExp.rebellions.tension - random(50,100), 0, 100)>> diff --git a/src/Mods/SecExp/securityReport.tw b/src/Mods/SecExp/securityReport.tw index 75f331b8eb89614bc78b7ca83421b4ad8240ec0a..fffe0b1b262ee3c723a07ecca3303b87746af653 100644 --- a/src/Mods/SecExp/securityReport.tw +++ b/src/Mods/SecExp/securityReport.tw @@ -485,17 +485,17 @@ Due to the deterioration of the old world countries, organized crime focuses mor <</if>> -<<if $brainImplantProject > 0 && $brainImplant < 106>> +<<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.brainImplantProject > 0 && $SecExp.buildings.riotCenter.brainImplant < 106>> <br><br> - <<set $brainImplant += $brainImplantProject>> - <<if 100 - $brainImplant <= 0>> + <<set $SecExp.buildings.riotCenter.brainImplant += $SecExp.buildings.riotCenter.brainImplantProject>> + <<if 100 - $SecExp.buildings.riotCenter.brainImplant <= 0>> The project has been completed! - <<set $brainImplant = 106>> + <<set $SecExp.buildings.riotCenter.brainImplant = 106>> <<else>> The great brain implant project is proceeding steadily. This week we made - <<if $brainImplantProject <= 2>> + <<if $SecExp.buildings.riotCenter.brainImplantProject <= 2>> some small - <<elseif $brainImplantProject <= 4>> + <<elseif $SecExp.buildings.riotCenter.brainImplantProject <= 4>> some <<else>> good diff --git a/src/descriptions/arcologyDescription.js b/src/descriptions/arcologyDescription.js index e4bc2db212d67a476f74060b938aff3a38846c0c..0ccd8e4851185d6c786d6b896c60d60e561f4c6a 100644 --- a/src/descriptions/arcologyDescription.js +++ b/src/descriptions/arcologyDescription.js @@ -464,7 +464,7 @@ App.Desc.playerArcology = function(lastElement) { if (V.SecExp.buildings.weapManu) { buffer.push(`Down in the lower levels of the arcology the weapons manufacturing facility dominates the environment; there, armaments of all kind are produced and shipped away.`); } - if (V.riotCenter === 1) { + if (V.SecExp.buildings.riotCenter) { buffer.push(`Near the penthouse the riot control center can be found. Here dissidents and dangerous political forces of ${A.name} are carefully monitored and managed.`); } if (V.SecExp.buildings.transportHub) { diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index 9e3ee9841bbae71dcce05083ae60cf8a1a71798d..a7bc28442e31beb99b19c94bd23110d141233393 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -70,9 +70,6 @@ You may review your settings before clicking "Continue" to begin.<br> <<else>> <<set $PC.rules.living = "spare">> <</if>> - <<if $secExpEnabled > 0>> - <<set $wasToggledBefore = 1>> - <</if>> <<run App.Intro.initNationalities()>> <</link>> <<if ($economy != 100) || ($seeDicks != 25) || ($continent != "North America") || ($internationalTrade != 1) || ($internationalVariety != 1) || ($seeRace != 1) || ($seeNationality != 1) || ($seeExtreme != 0) || ($seeCircumcision != 1) || ($seeAge != 1) || ($plot != 1)>> diff --git a/src/gui/quicklinks.js b/src/gui/quicklinks.js index 11381652e7e14c0829ac05c60fddc84ded99f0c3..46f9ac907b0ae7568e43ef228ae91cdc6cb33b89 100644 --- a/src/gui/quicklinks.js +++ b/src/gui/quicklinks.js @@ -107,7 +107,7 @@ App.UI.quickMenu = (function() { Pit: () => !V.pit, propagandaHub: () => V.secExpEnabled === 0 || !V.SecExp.buildings.propHub, "Prosthetic Lab": () => V.researchLab.level === 0, - riotControlCenter: () => V.secExpEnabled === 0 || V.riotCenter <= 0, + riotControlCenter: () => V.secExpEnabled === 0 || V.SecExp.buildings.riotCenter, Schoolroom: () => !V.schoolroom, secBarracks: () => V.secExpEnabled === 0 || !V.SecExp.buildings.barracks, securityHQ: () => V.secExpEnabled === 0 || !V.SecExp.buildings.secHub, diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index 680103fb271973ff448ad896355b285d0587ff52..a90a043ac4cd2672e5701f1637d45050e34c6b12 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -216,8 +216,8 @@ </div> <div> - <<if $riotCenter == 0 && $SecExp.settings.rebellion.enabled == 1>> - [[Set up the riot control center|Manage Arcology][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $riotCenter = 1, $PC.skill.engineering += 1]] + <<if !$SecExp.buildings.riotCenter && $SecExp.settings.rebellion.enabled == 1>> + [[Set up the riot control center|Manage Arcology][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), App.SecExp.riotCenter.Init(), $PC.skill.engineering += 1]] <span class="detail"> Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> <div class="indent">Building specialized in the management and suppression of rebellions.</div> diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index 1f361bf5e20cf7d74861b0607f1b41225162c96f..b93737ab525a8e73e47e51f90cd0a1427f50545c 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -270,8 +270,8 @@ <<set $foughtThisWeek = 0>> <</if>> - <<if $sentUnitCooldown > 0>> - <<set $sentUnitCooldown-->> + <<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.sentUnitCooldown > 0>> + <<set $SecExp.buildings.riotCenter.sentUnitCooldown-->> <</if>> <<if $SecExp.proclamation.cooldown > 0>> <<set $SecExp.proclamation.cooldown-->>