diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 2e263adb01972875320282a0c9d1b0d0119d49e2..6ae89e116988058bcc822e265e15a07063e7dcd3 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -461,12 +461,8 @@ App.Data.resetOnNGPlus = { citizenRebellionEventFires: 0, slaveRebellion: 0, citizenRebellion: 0, - rebellingUnits: [], engageRule: 0, irregulars: 0, - rebellingMilitia: 0, - rebellingSlaves: 0, - rebellingMercs: 0, repairTime: 3, arcRepairTime: 0, garrison: {}, @@ -493,7 +489,6 @@ App.Data.resetOnNGPlus = { /* battle relevant vars */ slaveVictories: [], - slaveIncreasedPrestige: 0, totalKills: 0, battlesCount: 0, majorBattlesCount: 0, diff --git a/src/Mods/SecExp/SecExpBackwardCompatibility.tw b/src/Mods/SecExp/SecExpBackwardCompatibility.tw index 08918c7a8bec79259e5e71a9c9ec1b16ebfa7543..1be97c1e45594dfc2c7fc66c51d6cf35dd3470d8 100644 --- a/src/Mods/SecExp/SecExpBackwardCompatibility.tw +++ b/src/Mods/SecExp/SecExpBackwardCompatibility.tw @@ -404,24 +404,12 @@ <<if ndef $citizenRebellion>> <<set $citizenRebellion = 0>> <</if>> -<<if ndef $rebellingUnits>> - <<set $rebellingUnits = []>> -<</if>> <<if ndef $engageRule>> <<set $engageRule = 0>> <</if>> <<if ndef $irregulars>> <<set $irregulars = 0>> <</if>> -<<if ndef $rebellingMilitia>> - <<set $rebellingMilitia = 0>> -<</if>> -<<if ndef $rebellingSlaves>> - <<set $rebellingSlaves = 0>> -<</if>> -<<if ndef $rebellingMercs>> - <<set $rebellingMercs = 0>> -<</if>> <<if ndef $repairTime>> <<set $repairTime = 3>> <</if>> @@ -527,9 +515,6 @@ <<if ndef $slaveVictories>> <<set $slaveVictories = []>> <</if>> -<<if ndef $slaveIncreasedPrestige>> - <<set $slaveIncreasedPrestige = 0>> -<</if>> <<if ndef $totalKills>> <<set $totalKills = 0>> <</if>> diff --git a/src/Mods/SecExp/attackReport.tw b/src/Mods/SecExp/attackReport.tw index b89024af6704e1034bb32e937ffed3c24539aac3..3d92154f759cf10cbf5c02957d47bd4e55e5581b 100644 --- a/src/Mods/SecExp/attackReport.tw +++ b/src/Mods/SecExp/attackReport.tw @@ -976,7 +976,7 @@ <<set $slaves[_j].prestigeDesc = "$He is known as a legendary commander all over the world.">> <</if>> <<set $slaveVictories[_i].victories = 0>> - <<set $slaveIncreasedPrestige = 1>> + $He brought your army to victory so many times that $his @@.green;prestige has increased.@@ <</if>> <</if>> <<break>> @@ -987,9 +987,6 @@ <<set $slaveVictories.push(_newSlave)>> <</if>> <</if>> - <<if $slaveIncreasedPrestige == 1>> - $He brought your army to victory so many times that $his @@.green;prestige has increased.@@ - <</if>> <<elseif $leadingTroops == "headGirl">> <<setLocalPronouns $HeadGirl>> <<if $auto == 1>>$assistant.name<<else>>You<</if>> decided it will be your Head Girl that leads the troops. @@ -1113,7 +1110,7 @@ <<set $slaves[_j].prestigeDesc = "$He is known as a legendary commander all over the world.">> <</if>> <<set $slaveVictories[_i].victories = 0>> - <<set $slaveIncreasedPrestige = 1>> + $He brought your army to victory so many times that $his @@.green;prestige has increased.@@ <</if>> <</if>> <<break>> @@ -1124,9 +1121,6 @@ <<set $slaveVictories.push(_newSlave)>> <</if>> <</if>> - <<if $slaveIncreasedPrestige == 1>> - $He brought your army to victory so many times that $his @@.green;prestige has increased.@@ - <</if>> <<elseif $leadingTroops == "citizen">> <<if $auto == 1>>$assistant.name<<else>>You<</if>> decided to appoint one of your volunteers as the commander. <<if $arcologies[0].FSDegradationist == "unset" && $arcologies[0].FSPaternalist == "unset">> @@ -1506,7 +1500,6 @@ <<run delete $bribeCost>> <<set $leaderWounded = 0>> <<set $gainedWarfare = 0>> -<<set $slaveIncreasedPrestige = 0>> <<set $woundType = 0>> <<set $tacticsSuccessful = 0>> <<set $attackType = "none">> diff --git a/src/Mods/SecExp/rebellionHandler.tw b/src/Mods/SecExp/rebellionHandler.tw index 18e30661da325da76bc71c4ee6792c18b3266a90..ae14f8f02ccea25fc49addc0d46ee2e71902966c 100644 --- a/src/Mods/SecExp/rebellionHandler.tw +++ b/src/Mods/SecExp/rebellionHandler.tw @@ -138,10 +138,10 @@ <<set _armyMod = Math.trunc(_armyMod)>> <<if $slaveRebellion == 1>> - <<set $rebellingSlaves = 1>> + <<set _rebellingSlaves = 1>> <<set _unit = App.SecExp.getIrregularUnit("Slaves", $attackTroops, $attackEquip)>> <<else>> - <<set $rebellingMilitia = 1>> + <<set _rebellingMilitia = 1>> <<set _unit = App.SecExp.getIrregularUnit("Militia", $attackTroops, $attackEquip)>> <</if>> <<set _enemyAttack += _unit.attack * _armyMod>> @@ -150,7 +150,7 @@ <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && $rebellingID.includes($militiaUnits[_i].ID)>> - <<set $rebellingMilitia = 1>> + <<set _rebellingMilitia = 1>> <<set $attackTroops += $militiaUnits[_i].troops>> <<set $militiaUnits[_i].loyalty = 0>> <<set _unit = App.SecExp.getUnit("Militia", _i)>> @@ -161,7 +161,7 @@ <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && $rebellingID.includes($slaveUnits[_i].ID)>> - <<set $rebellingSlaves = 1>> + <<set _rebellingSlaves = 1>> <<set $attackTroops += $slaveUnits[_i].troops>> <<set $slaveUnits[_i].loyalty = 0>> <<set _unit = App.SecExp.getUnit("Slaves", _i)>> @@ -172,7 +172,7 @@ <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && $rebellingID.includes($mercUnits[_i].ID)>> - <<set $rebellingMercs = 1>> + <<set _rebellingMercs = 1>> <<set $attackTroops += $mercUnits[_i].troops>> <<set $mercUnits[_i].loyalty = 0>> <<set _unit = App.SecExp.getUnit("Mercs", _i)>> @@ -184,9 +184,9 @@ <<set _enemyMoraleTroopMod = Math.clamp($attackTroops / 100,1,10)>> -<<set _enemyMorale = 1.5 * (App.SecExp.BaseMilitiaUnit.morale * $rebellingMilitia + App.SecExp.BaseSlaveUnit.morale * $rebellingSlaves + App.SecExp.BaseMercUnit.morale * $rebellingMercs) / ($rebellingMilitia + $rebellingSlaves + $rebellingMercs)>> +<<set _enemyMorale = 1.5 * (App.SecExp.BaseMilitiaUnit.morale * _rebellingMilitia + App.SecExp.BaseSlaveUnit.morale * _rebellingSlaves + App.SecExp.BaseMercUnit.morale * _rebellingMercs) / (_rebellingMilitia + _rebellingSlaves + _rebellingMercs)>> <<set _enemyMorale *= _enemyMoraleTroopMod>> -<<set _enemyBaseHp = (App.SecExp.BaseMilitiaUnit.hp * $rebellingMilitia + App.SecExp.BaseSlaveUnit.hp * $rebellingSlaves + App.SecExp.BaseMercUnit.hp * $rebellingMercs) / ($rebellingMilitia + $rebellingSlaves + $rebellingMercs)>> +<<set _enemyBaseHp = (App.SecExp.BaseMilitiaUnit.hp * _rebellingMilitia + App.SecExp.BaseSlaveUnit.hp * _rebellingSlaves + App.SecExp.BaseMercUnit.hp * _rebellingMercs) / (_rebellingMilitia + _rebellingSlaves + _rebellingMercs)>> <<if isNaN(_attack)>> <br>@@.red;Error: attack value reported NaN@@