diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 274db428506cbeea52d1ac8ecef6127284d7faf2..7f2cad463ad7cba6d02561c9edcf042d49d466d1 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -500,6 +500,12 @@ App.Data.resetOnNGPlus = { SavedSFI: 0, sectionInFirebase: 0, + militiaFounded: 0, + recruitVolunteers: 0, + conscription: 0, + militaryService: 0, + militarizedSociety: 0, + /* base vars */ SecExp: {}, PCvictories: 0, diff --git a/src/Mods/SecExp/attackOptions.tw b/src/Mods/SecExp/attackOptions.tw index c0a5dceba83518b37263dd11f3e5d5787d49aaa8..c107e95d2a16d621b4516b159b0ca81fa8cd2899 100644 --- a/src/Mods/SecExp/attackOptions.tw +++ b/src/Mods/SecExp/attackOptions.tw @@ -206,7 +206,7 @@ __Battle Plan__: <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> - <<if $SecExp.edicts.defense.militiaFounded == 1>> + <<if $militiaFounded == 1>> | <<link "Let the citizens' militia officers lead the troops">> <<set $leadingTroops = "citizen">> diff --git a/src/Mods/SecExp/buildings/secBarracks.tw b/src/Mods/SecExp/buildings/secBarracks.tw index 6889fe1c1ff0ee7196d04aaeb630bcac43212c76..0fbe76bf1a140780ea578f17e03b84edec1c5da8 100644 --- a/src/Mods/SecExp/buildings/secBarracks.tw +++ b/src/Mods/SecExp/buildings/secBarracks.tw @@ -275,18 +275,18 @@ You are free to organize your menial slaves into fighting units. Currently you h <</capture>> <</for>> -<<if $SecExp.edicts.defense.militiaFounded == 1>> +<<if $militiaFounded == 1>> <br> __Militia__ <br>/* militia */ You founded the $arcologies[0].name free militia. You are now able to organize your citizens into fighting units. - <<if $SecExp.edicts.defense.recruitVolunteers == 1>> + <<if $recruitVolunteers == 1>> The militia is composed entirely of volunteers, your manpower is approximately 1.5% of the citizens population of your arcology. - <<elseif $SecExp.edicts.defense.conscription == 1>> + <<elseif $conscription == 1>> With the establishment of conscription, your available manpower has increased to now approximately 3% of the arcology's citizens population. - <<elseif $SecExp.edicts.defense.militaryService == 1>> + <<elseif $militaryService == 1>> By establishing obligatory military service to obtain citizenship you have enlarged your manpower pool to be approximately 5% of the arcology's citizens population. - <<elseif $SecExp.edicts.defense.militarizedSociety == 1>> + <<elseif $militarizedSociety == 1>> With the adoption of a militarized society, your available manpower has swelled to be approximately 15% of the arcology's citizens population. <</if>> Your current total manpower is <<print num(App.SecExp.Manpower.totalMilitia)>>, of which <<print num(App.SecExp.Manpower.employedMilitia)>> is in active duty. You lost in total <<print num($militiaTotalCasualties)>> citizens, leaving you with <<print num($militiaFreeManpower)>> available citizens. diff --git a/src/Mods/SecExp/edicts.tw b/src/Mods/SecExp/edicts.tw index 5612e7fa2bbf17b4ddce3520afe18f61c4099e66..b02a9d74928e28298b782922124a1fcb88565f27 100644 --- a/src/Mods/SecExp/edicts.tw +++ b/src/Mods/SecExp/edicts.tw @@ -118,18 +118,18 @@ <</if>> <</if>> - <<if $SecExp.edicts.defense.militiaFounded == 1>> - <<if $SecExp.edicts.defense.conscription == 1>> + <<if $militiaFounded == 1>> + <<if $conscription == 1>> <br>''Conscription:'' every citizen is required to train in the militia and serve the arcology for a limited amount of time. - [[Repeal|edicts][$SecExp.edicts.defense.conscription = 0, $SecExp.edicts.defense.recruitVolunteers = 1]] + [[Repeal|edicts][$conscription = 0, $recruitVolunteers = 1]] <</if>> - <<if $SecExp.edicts.defense.militaryService == 1>> + <<if $militaryService == 1>> <br>''Obligatory military service:'' every citizen is required to register and serve under the militia. - [[Repeal|edicts][$SecExp.edicts.defense.militaryService = 0, $SecExp.edicts.defense.recruitVolunteers = 1]] + [[Repeal|edicts][$militaryService = 0, $recruitVolunteers = 1]] <</if>> - <<if $SecExp.edicts.defense.militarizedSociety == 1>> + <<if $militarizedSociety == 1>> <br>''Militarized Society:'' every adult citizen is required to train and actively participate in the military of the arcology. - [[Repeal|edicts][$SecExp.edicts.defense.militarizedSociety = 0, $SecExp.edicts.defense.recruitVolunteers = 1]] + [[Repeal|edicts][$militarizedSociety = 0, $recruitVolunteers = 1]] <</if>> <<if $SecExp.edicts.defense.militaryExemption == 1>> @@ -485,55 +485,55 @@ <</if>> <</if>> - <<if $SecExp.edicts.defense.militiaFounded == 0>> + <<if $militiaFounded == 0>> <br>''Found the militia:'' lay the groundwork for the formation of the arcology's citizens' army. <<if $SecExp.core.authority >= 1000>> - [[Implement|edicts][$SecExp.edicts.defense.militiaFounded = 1, $SecExp.edicts.defense.recruitVolunteers = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]] + [[Implement|edicts][$militiaFounded = 1, $recruitVolunteers = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will allow for the recruitment and training of citizens.// <</if>> - <<if $SecExp.edicts.defense.militiaFounded == 1>> - <<if $SecExp.edicts.defense.recruitVolunteers == 0>> + <<if $militiaFounded == 1>> + <<if $recruitVolunteers == 0>> <br>''Volunteers' militia:'' only volunteers will be accepted in the militia. <<if $SecExp.core.authority >= 1000>> - [[Implement|edicts][$SecExp.edicts.defense.militarizedSociety = 0, $SecExp.edicts.defense.militaryService = 0, $SecExp.edicts.defense.conscription = 0, $SecExp.edicts.defense.recruitVolunteers = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]] + [[Implement|edicts][$militarizedSociety = 0, $militaryService = 0, $conscription = 0, $recruitVolunteers = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will replenish militia manpower slowly and will cap at 2% of the total citizens population.// <</if>> - <<if $SecExp.edicts.defense.conscription == 0>> + <<if $conscription == 0>> <br>''Conscription:'' every citizen is required to train in the militia and serve the arcology if the need arises. <<if $SecExp.core.authority >= 4000>> - [[Implement|edicts][$SecExp.edicts.defense.militarizedSociety = 0, $SecExp.edicts.defense.militaryService = 0, $SecExp.edicts.defense.conscription = 1, $SecExp.edicts.defense.recruitVolunteers = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 4000]] + [[Implement|edicts][$militarizedSociety = 0, $militaryService = 0, $conscription = 1, $recruitVolunteers = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 4000]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will replenish militia manpower moderately fast and will cap at 5% of the total citizens population, but has a high authority cost// <</if>> - <<if $SecExp.edicts.defense.militaryService == 0>> + <<if $militaryService == 0>> <br>''Obligatory military service:'' every citizen is required to register and serve under the militia. <<if $SecExp.core.authority >= 6000>> - [[Implement|edicts][$SecExp.edicts.defense.militarizedSociety = 0, $SecExp.edicts.defense.militaryService = 1, $SecExp.edicts.defense.conscription = 0, $SecExp.edicts.defense.recruitVolunteers = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 6000]] + [[Implement|edicts][$militarizedSociety = 0, $militaryService = 1, $conscription = 0, $recruitVolunteers = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 6000]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will quickly replenish militia manpower and will cap at 10% of the total citizens population, but has a very high authority cost// <</if>> - <<if $SecExp.edicts.defense.militarizedSociety == 0>> + <<if $militarizedSociety == 0>> <br>''Militarized Society:'' every adult citizen is required to train and participate in the defense of the arcology. <<if $SecExp.core.authority >= 8000>> - [[Implement|edicts][$SecExp.edicts.defense.militarizedSociety = 1, $SecExp.edicts.defense.militaryService = 0, $SecExp.edicts.defense.conscription = 0, $SecExp.edicts.defense.recruitVolunteers = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 8000]] + [[Implement|edicts][$militarizedSociety = 1, $militaryService = 0, $conscription = 0, $recruitVolunteers = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 8000]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will very quickly replenish militia manpower and will cap at 20% of the total citizens population, but has an extremely high authority cost// <</if>> - <<if $SecExp.edicts.defense.militaryExemption == 0 && ($SecExp.edicts.defense.conscription == 1 || $SecExp.edicts.defense.militaryService == 1 || $SecExp.edicts.defense.militarizedSociety == 1)>> + <<if $SecExp.edicts.defense.militaryExemption == 0 && ($conscription == 1 || $militaryService == 1 || $militarizedSociety == 1)>> <br>''Military exemption:'' allow citizens to avoid military duty by paying a weekly fee. <<if $SecExp.core.authority >= 1000>> [[Implement|edicts][$SecExp.edicts.defense.militaryExemption = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]] @@ -567,7 +567,7 @@ <</if>> <</if>> - <<if $arcologies[0].FSRepopulationFocus >= 40 && ($SecExp.edicts.defense.conscription == 1 || $SecExp.edicts.defense.militaryService == 1 || $SecExp.edicts.defense.militarizedSociety == 1)>> + <<if $arcologies[0].FSRepopulationFocus >= 40 && ($conscription == 1 || $militaryService == 1 || $militarizedSociety == 1)>> <<if $SecExp.edicts.defense.pregExemption == 0>> <br>''@@.lime;Military exemption for pregnancies:@@'' pregnant citizens will be allowed, and encouraged, to avoid military service. <<if $SecExp.core.authority >= 1000>> @@ -580,7 +580,7 @@ <</if>> <</if>> - <<if $SecExp.edicts.defense.privilege.militiaSoldier == 0 && $SecExp.edicts.defense.militiaFounded == 1>> + <<if $SecExp.edicts.defense.privilege.militiaSoldier == 0 && $militiaFounded == 1>> <br>''Special militia privileges'' will allow citizens joining the militia to avoid paying rent. <<if $SecExp.core.authority >= 1000>> [[Implement|edicts][$SecExp.edicts.defense.privilege.militiaSoldier = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]] @@ -649,7 +649,7 @@ <<if $FSAnnounced>> <br><br>__Future Societies:__ - <<if $arcologies[0].FSRomanRevivalist >= 40 && $SecExp.edicts.defense.militiaFounded == 1>> + <<if $arcologies[0].FSRomanRevivalist >= 40 && $militiaFounded == 1>> <<if $SecExp.edicts.defense.legionTradition == 0>> <br>''@@.lime;Legionaries traditions:@@'' Fund specialized training for your recruits to turn them into the professional of Roman tradition. <<if $SecExp.core.authority >= 1000>> @@ -661,7 +661,7 @@ <</if>> <</if>> - <<if $arcologies[0].FSEgyptianRevivalist >= 40 && $SecExp.edicts.defense.militiaFounded == 1>> + <<if $arcologies[0].FSEgyptianRevivalist >= 40 && $militiaFounded == 1>> <<if $SecExp.edicts.defense.pharaonTradition == 0>> <br>''@@.lime;Pharaonic traditions:@@'' Fund specialized training for your recruits to turn them into an army worthy of a pharaoh. <<if $SecExp.core.authority >= 1000>> diff --git a/src/Mods/SecExp/js/secExp.js b/src/Mods/SecExp/js/secExp.js index 4309947856c6eb55cd0706b2f630db2115688220..0294c568c4866a1368225a526076707bb0cd2c42 100644 --- a/src/Mods/SecExp/js/secExp.js +++ b/src/Mods/SecExp/js/secExp.js @@ -25,11 +25,13 @@ App.SecExp.generalInit = function(){ soldierWages: 1, slavesOfficers: 0, discountMercenaries: 0, + /* militiaFounded: 0, recruitVolunteers: 0, conscription: 0, militaryService: 0, militarizedSociety: 0, + */ militaryExemption: 0, noSubhumansInArmy: 0, pregExemption: 0, diff --git a/src/Mods/SecExp/js/secExpBC.js b/src/Mods/SecExp/js/secExpBC.js index 58da0081b59a9868b4e4e807a0db7b9f9032822f..aa8147d4051cd008bb3454d2bccbc92363f0c380 100644 --- a/src/Mods/SecExp/js/secExpBC.js +++ b/src/Mods/SecExp/js/secExpBC.js @@ -263,11 +263,13 @@ App.SecExp.generalBC = function (){ V.SecExp.edicts.defense.soldierWages = V.SecExp.edicts.defense.soldierWages || V.soldierWages || 1; V.SecExp.edicts.defense.slavesOfficers = V.SecExp.edicts.defense.slavesOfficers || V.slavesOfficers || 0; V.SecExp.edicts.defense.discountMercenaries = V.SecExp.edicts.defense.discountMercenaries || V.discountMercenaries || 0; - V.SecExp.edicts.defense.militiaFounded = V.SecExp.edicts.defense.militiaFounded || V.militiaFounded || 0; - V.SecExp.edicts.defense.recruitVolunteers = V.SecExp.edicts.defense.recruitVolunteers || V.recruitVolunteers || 0; - V.SecExp.edicts.defense.conscription = V.SecExp.edicts.defense.conscription || V.conscription || 0; - V.SecExp.edicts.defense.militaryService = V.SecExp.edicts.defense.militaryService || V.militaryService || 0; - V.SecExp.edicts.defense.militarizedSociety = V.SecExp.edicts.defense.militarizedSociety || V.militarizedSociety || 0; + /* + V.militiaFounded = V.militiaFounded || V.militiaFounded || 0; + V.recruitVolunteers = V.recruitVolunteers || V.recruitVolunteers || 0; + V.conscription = V.conscription || V.conscription || 0; + V.militaryService = V.militaryService || V.militaryService || 0; + V.militarizedSociety = V.militarizedSociety || V.militarizedSociety || 0; + */ V.SecExp.edicts.defense.militaryExemption = V.SecExp.edicts.defense.militaryExemption || V.militaryExemption || 0; V.SecExp.edicts.defense.noSubhumansInArmy = V.SecExp.edicts.defense.noSubhumansInArmy || V.noSubhumansInArmy || 0; V.SecExp.edicts.defense.pregExemption = V.SecExp.edicts.defense.pregExemption || V.pregExemption || 0; diff --git a/src/Mods/SecExp/rebellionGenerator.tw b/src/Mods/SecExp/rebellionGenerator.tw index 5aa12213fcc5c6ce2af6c724b8574a0838d715a2..78a0737f3220dfd41533cb7943cf46fffe6b4933 100644 --- a/src/Mods/SecExp/rebellionGenerator.tw +++ b/src/Mods/SecExp/rebellionGenerator.tw @@ -121,22 +121,22 @@ The very low crime level of the arcology leaves your citizens happy and satisfied. <<set _citizen -= 5>> <</if>> -<<if $SecExp.edicts.defense.militiaFounded == 1>> +<<if $militiaFounded == 1>> <<if ($arcologies[0].FSRomanRevivalist == "unset" && $arcologies[0].FSAztecRevivalist == "unset" && $arcologies[0].FSEgyptianRevivalist == "unset" && $arcologies[0].FSEdoRevivalist == "unset" && $arcologies[0].FSArabianRevivalist == "unset" && $arcologies[0].FSChineseRevivalist == "unset")>> - <<if $SecExp.edicts.defense.militarizedSociety == 1>> + <<if $militarizedSociety == 1>> Many of your citizens are offended by your extreme militarization of the arcology's society. <<set _citizen += 20>> - <<elseif $SecExp.edicts.defense.militaryService == 1>> + <<elseif $militaryService == 1>> Many of your citizens are offended by your militarization of the arcology's society. <<set _citizen += 15>> <<else>> <<set _citizen += 10>> <</if>> <<else>> - <<if $SecExp.edicts.defense.militarizedSociety == 1>> + <<if $militarizedSociety == 1>> Some of your citizens are offended by your extreme militarization of the arcology's society. <<set _citizen += 10>> - <<elseif $SecExp.edicts.defense.militaryService == 1>> + <<elseif $militaryService == 1>> Some of your citizens are offended by your militarization of the arcology's society. <<set _citizen += 5>> <<else>> diff --git a/src/Mods/SecExp/securityReport.tw b/src/Mods/SecExp/securityReport.tw index ea55b49a1e8c362130436a127988400f2031438c..67d97ae6b24ea916c65a1e847d070e9761993642 100644 --- a/src/Mods/SecExp/securityReport.tw +++ b/src/Mods/SecExp/securityReport.tw @@ -351,7 +351,7 @@ Due to the deterioration of the old world countries, organized crime focuses mor <</if>> <<set $SecExp.core.crimeLow = Math.clamp(_newCrime,0,100)>> -<<if $SecExp.edicts.defense.militiaFounded == 1 || App.SecExp.battle.activeUnits() >= 1>> +<<if $militiaFounded == 1 || App.SecExp.battle.activeUnits() >= 1>> <br><br> <<set _size = App.SF.upgrades.total()>> <strong> Military</strong>: /* militia */ <<if $SF.Toggle && $SF.Active >= 1 && _size > 10>> @@ -377,7 +377,7 @@ Due to the deterioration of the old world countries, organized crime focuses mor <</if>> <</if>> <</if>> - <<if $SecExp.edicts.defense.recruitVolunteers == 1>> + <<if $recruitVolunteers == 1>> Your militia accepts only volunteering citizens, ready to defend their arcology. <<set _recruitLimit = 0.02>> <<if $rep >= 10000>> @@ -392,7 +392,7 @@ Due to the deterioration of the old world countries, organized crime focuses mor Your lax physical requirements to enter the militia allows for a greater number of citizens to join. <<set _recruitLimit += 0.0025>> <</if>> - <<elseif $SecExp.edicts.defense.conscription == 1>> + <<elseif $conscription == 1>> Adult citizens are required to join the militia for a period of time. <<set _recruitLimit = 0.05>> <<if $SecExp.edicts.defense.militaryExemption == 1>> @@ -412,7 +412,7 @@ Due to the deterioration of the old world countries, organized crime focuses mor Many pregnant citizens prefer to avoid military service not to endanger themselves and their children. <<set _recruitLimit -= 0.005>> <</if>> - <<elseif $SecExp.edicts.defense.militaryService == 1>> + <<elseif $militaryService == 1>> Adult citizens are required to register and serve in the militia whenever necessary. <<set _recruitLimit = 0.1>> <<if $SecExp.edicts.defense.militaryExemption == 1>> @@ -432,7 +432,7 @@ Due to the deterioration of the old world countries, organized crime focuses mor Many pregnant citizens prefer to avoid military service not to endanger themselves and their children. <<set _recruitLimit -= 0.01>> <</if>> - <<elseif $SecExp.edicts.defense.militarizedSociety == 1>> + <<elseif $militarizedSociety == 1>> Every citizen is required to train and participate in the military activities of the arcology. <<set _recruitLimit = 0.2>> <<if $SecExp.edicts.defense.militaryExemption == 1>> @@ -453,14 +453,14 @@ Due to the deterioration of the old world countries, organized crime focuses mor <<set _recruitLimit -= 0.02>> <</if>> <</if>> - <<if $SecExp.edicts.defense.militiaFounded == 1>> + <<if $militiaFounded == 1>> <<set _recruits = Math.trunc((_recruitLimit * $ACitizens - App.SecExp.Manpower.totalMilitia) / 20 * _recruitsMultiplier)>> <<if _recruits > 0>> <<set $militiaFreeManpower += _recruits>> This week <<print _recruits>> citizens joined the militia. - <<elseif $SecExp.edicts.defense.militarizedSociety == 1>> + <<elseif $militarizedSociety == 1>> No citizens joined your militia this week because your society is as militarized as it can get. - <<elseif $SecExp.edicts.defense.recruitVolunteers == 1>> + <<elseif $recruitVolunteers == 1>> There are no more citizens willing to join the arcology armed forces. You'll need to enact higher recruitment edicts if you need more manpower. <<else>> No more citizens could be drafted into your militia. You'll need to enact higher recruitment edicts if you need more manpower.