diff --git a/src/SecExp/attackGenerator.tw b/src/SecExp/attackGenerator.tw index d2113e2d7d190e3ceeaf5b745406bec527ab32a7..a36480e90898c6f09e151ad5a5a5565a07406050 100644 --- a/src/SecExp/attackGenerator.tw +++ b/src/SecExp/attackGenerator.tw @@ -94,7 +94,7 @@ <<set _freeCity -= 8>> <<set _free -= 8>> <</if>> - + /* makes the actual roll */ <<set _roll = random(1,100)>> <<if _roll <= _raider>> @@ -112,7 +112,7 @@ /* if an attack happens */ <<if $attackThisWeek == 1>> - + /* terrain */ <<if $terrain == "urban">> <<set $battleTerrain = either("outskirts","urban","wasteland")>> @@ -127,7 +127,7 @@ <<else>> <<set $battleTerrain = "error">> <</if>> - + <<if $attackType == "raiders">> <<set $attackTroops = random(40,80)>> <<if $week < 30>> @@ -234,7 +234,7 @@ <<if ($week >= 120 && $attackType != "none") || ($forceMajorBattle == 1 && $foughtThisWeek == 0)>> <<if random(1,100) >= 50 || $forceMajorBattle == 1>> <<set $majorBattle = 1>> - <<if $securityForceCreate == 1>> + <<if $SF.Toggle && $SF.Active>> <<set $attackTroops = Math.trunc($attackTroops * random(4,6) * $majorBattleMult)>> <<set $attackEquip = either(3,4)>> <<else>> diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw index 4fae71757dba80f2da4e2069f62fd8e14d8db943..023befaedea39b332b520d814f3d630d42a07b46 100644 --- a/src/SecExp/attackHandler.tw +++ b/src/SecExp/attackHandler.tw @@ -58,7 +58,7 @@ <<else>> <<goto "attackReport">> <</if>> - + <<else>> /*Init*/ @@ -97,22 +97,22 @@ <<set _enemyMod = 1.5>> <<set _SFMod = 1.5>> <<set _turns = $maxTurns * 2>> - <<if $securityForceCreate == 1>> - <<if $securityForceArcologyUpgrades >= 7>> - <<set _atkMod += ($securityForceArcologyUpgrades - 6) * 0.05>> + <<if $SF.Toggle && $SF.Active>> + <<if $SFUnit.Firebase >= 7>> + <<set _atkMod += ($SFUnit.Firebase - 6) * 0.05>> <</if>> - <<if $securityForceFortressZeppelin >= 1>> - <<set _defMod += $securityForceFortressZeppelin * 0.05>> + <<if $SFUnit.GunS >= 1>> + <<set _defMod += $SFUnit.GunS * 0.05>> <</if>> - <<if $securityForceSatellitePower >= 11>> - <<set _atkMod += ($securityForceSatellitePower - 10) * 0.05>> + <<if $SFUnit.Satellite >= 5>> + <<set _atkMod += ($SFUnit.Satellite - 5) * 0.05>> <</if>> - <<if $securityForceGiantRobot >= 6>> - <<set _defMod += ($securityForceGiantRobot - 5) * 0.05>> + <<if $SFUnit.GiantRobot >= 6>> + <<set _defMod += ($SFUnit.GiantRobot - 5) * 0.05>> <</if>> - <<if $securityForceMissileSilo >= 1>> - <<set _atkMod += $securityForceMissileSilo * 0.05>> - <<set _defMod += $securityForceMissileSilo * 0.05>> + <<if $SFUnit.MissileSilo >= 1>> + <<set _atkMod += $SFUnit.MissileSilo * 0.05>> + <<set _defMod += $SFUnit.MissileSilo * 0.05>> <</if>> <</if>> <</if>> @@ -961,7 +961,7 @@ <</if>> <</for>> -<<if $SFIntervention == 1>> +<<if $SF.Toggle && $SF.Active && $SFIntervention>> <<set $SFatk = 0>> <<set $SFdef = 0>> <<set $SFhp = 0>> @@ -1124,7 +1124,7 @@ __Army__: <br>militia morale modifier: <<if _militiaMod > 0>>+<</if>>_militiaMod% <br>slaves morale modifier: <<if _slaveMod > 0>>+<</if>>_slaveMod% <br>mercenaries morale modifier: <<if _mercMod > 0>>+<</if>>_mercMod% -<<if $SFIntervention == 1>> +<<if $SF.Toggle && $SF.Active && $SFIntervention>> <br>security force morale modifier: <<if _SFMod > 0>>+<</if>>_SFMod% <</if>> <<if $secBarracksUpgrades.luxury >= 1>> diff --git a/src/SecExp/attackOptions.tw b/src/SecExp/attackOptions.tw index c517473f02e1b8eaab0458701c956a8c50e582fb..8ffb3df854b69a79ac023ccc9c7562f3f8313108 100644 --- a/src/SecExp/attackOptions.tw +++ b/src/SecExp/attackOptions.tw @@ -198,7 +198,7 @@ __Battle Plan__: <<case "mercenary">> <<set _leader = "The mercenary commander">> <<case "colonel">> - <<set _leader = $securityForceName +"'s Colonel">> + <<set _leader = $SF.Lower +"'s Colonel">> <</switch>> /* leader assignment */ @@ -247,11 +247,11 @@ __Battle Plan__: <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> - <<if $securityForceCreate == 1>> + <<if $SF.Toggle && $SF.Active && $SFTradeShow.CanAttend === -1>> | <<link "Let The Colonel lead the troops">> <<set $leadingTroops = "colonel">> - <<set _leader = $securityForceName +"'s Colonel">> + <<set _leader = $SF.Lower +"'s Colonel">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> @@ -391,7 +391,7 @@ Units about to be deployed: <</for>> <</if>> -<<if $majorBattle == 1 && $securityForceCreate == 1>> +<<if $SF.Toggle && $SF.Active && $majorBattle == 1>> <br> <br> The size of the incoming attack warrants the intervention of the security force in its full force. They will <span id="SFI">not intervene</span>. diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw index 83696e8eb68695f6d26a749dcf1b2c097e6b1842..21a2e25268b0943f580bdb5d056e76f237e13b9c 100644 --- a/src/SecExp/attackReport.tw +++ b/src/SecExp/attackReport.tw @@ -787,17 +787,17 @@ Your reputation is so high your name carries power by itself. Having you on the battlefield puts fear even in the hardiest of warriors. <</if>> <</if>> - <<if $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active && $SFIntervention>> <<if $PC.career == "mercenary" || $PC.career == "slaver" || $PC.career == "capitalist" || $PC.career == "gang" || $PC.warfare > 75>> - The soldiers of the $securityForceName are ready and willing to follow you into battle, confident in your past experience. + The soldiers of the $SF.Lower are ready and willing to follow you into battle, confident in your past experience. <<elseif $PC.career == "wealth" || $PC.career == "medicine" || $PC.career == "engineer">> - The soldiers of the $securityForceName, as loyal as they are, are not enthusiastic to follow the orders of someone who has no experience leading men. + The soldiers of the $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of someone who has no experience leading men. <<elseif $PC.career == "servant">> - The soldiers of the $securityForceName, as loyal as they are, are not enthusiastic to follow the orders of an ex-servant. + The soldiers of the $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of an ex-servant. <<elseif $PC.career == "escort">> - The soldiers of the $securityForceName, as loyal as they are, are not enthusiastic to follow the orders of an ex-escort. + The soldiers of the $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of an ex-escort. <<elseif $PC.career == "BlackHat">> - The soldiers of the $securityForceName, as loyal as they are, are not enthusiastic to follow the orders of a dubious incursion specialist. + The soldiers of the $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of a dubious incursion specialist. <</if>> <</if>> <<if $PC.warfare <= 25 && $PC.warfare > 10>> @@ -845,58 +845,58 @@ <<if _oldRep < 10000 && _oldAuth < 10000 || $Bodyguard.prestige < 1>> <<if $deployingMilitia == 1>> Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a - <<if $deployingMercs == 1 && $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active && $deployingMercs == 1 && $SFIntervention>> commander and neither are your mercenaries or your soldiers. <<elseif $deployingMercs == 1>> commander and neither are your mercenaries. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> commander and neither are your soldiers. <<else>> commander. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $deployingMercs == 1 && $SFIntervention>> Your mercenaries and soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander. <<elseif $deployingMercs == 1>> Your mercenaries <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> Your soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander. <</if>> <<elseif $Bodyguard.prestige >= 2>> <<if $deployingMilitia == 1>> Your - <<if $deployingMercs == 1 && $SFIntervention == 1>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> volunteers, your mercenaries and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <<elseif $deployingMercs == 1>> volunteers and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> volunteers and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <<else>> volunteers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> Your mercenaries and soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <<elseif $deployingMercs == 1>> Your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> Your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <</if>> <<else>> <<if $deployingMilitia == 1>> Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a - <<if $deployingMercs == 1 && $SFIntervention == 1>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> commander and neither are your mercenaries and soldiers, but they trust you enough not to question your decision. <<elseif $deployingMercs == 1>> commander and neither are your mercenaries, but they trust you enough not to question your decision. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> commander and neither are your soldiers, but they trust you enough not to question your decision. <<else>> commander, but they trust you enough not to question your decision. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> Your mercenaries and soldiers <<if $deployingSlaves == 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <<elseif $deployingMercs == 1>> Your mercenaries <<if $deployingSlaves == 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> Your soldiers <<if $deployingSlaves == 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <</if>> <</if>> @@ -981,58 +981,58 @@ <<if _oldRep < 10000 && _oldAuth < 10000 || $HeadGirl.prestige < 1>> <<if $deployingMilitia == 1>> Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a - <<if $deployingMercs == 1 && $SFIntervention == 1>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> commander and neither are your mercenaries or your soldiers. <<elseif $deployingMercs == 1>> commander and neither are your mercenaries. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> commander and neither are your soldiers. <<else>> commander. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> Your mercenaries and soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander. <<elseif $deployingMercs == 1>> Your mercenaries <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> Your soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander. <</if>> <<elseif $HeadGirl.prestige >= 2>> <<if $deployingMilitia == 1>> Your - <<if $deployingMercs == 1 && $SFIntervention == 1>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> volunteers, your mercenaries and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <<elseif $deployingMercs == 1>> volunteers and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> volunteers and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <<else>> volunteers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> Your mercenaries and soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <<elseif $deployingMercs == 1>> Your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> Your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. <</if>> <<else>> <<if $deployingMilitia == 1>> Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a - <<if $deployingMercs == 1 && $SFIntervention == 1>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> commander and neither are your mercenaries and soldiers, but they trust you enough not to question your decision. <<elseif $deployingMercs == 1>> commander and neither are your mercenaries, but they trust you enough not to question your decision. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> commander and neither are your soldiers, but they trust you enough not to question your decision. <<else>> commander, but they trust you enough not to question your decision. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> Your mercenaries and soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <<elseif $deployingMercs == 1>> Your mercenaries <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> Your soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <</if>> <</if>> @@ -1134,9 +1134,9 @@ <<elseif $deployingMercs == 1>> You mercenaries are not thrilled to be lead by a civilian without any formal martial training or education. <</if>> - <<if $arcologies[0].FSRomanRevivalist != "unset" && $SFIntervention == 1>> + <<if $arcologies[0].FSRomanRevivalist != "unset" && $SF.Toggle && $SF.Active && $SFIntervention>> Since you decided to revive old Rome, many of your citizens took on themselves to educate themselves in martial matters, because of this your soldiers feel safe enough in the hands of one of your volunteers. - <<elseif $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> You soldiers are not thrilled to be lead by a civilian without any formal martial training or education. <</if>> <<if $leaderWounded == 1>> @@ -1147,7 +1147,7 @@ <<if $deployingMercs == 1>> Your mercenaries of course approve of your decision. <</if>> - <<if $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active && $SFIntervention>> Your soldiers feel more confident going into battle with an experienced commander. <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && $deployingMilitia == 1>> @@ -1166,8 +1166,8 @@ <<if $deployingMercs == 1>> Your mercenaries approve of such decisions, as they feel more confident by having a good, experienced commander. <</if>> - <<if $SFIntervention == 1>> - The soldiers of $securityForceName obviously approved of your decision. + <<if $SF.Toggle && $SF.Active && $SFIntervention>> + The soldiers of $SF.Lower obviously approved of your decision. <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && $deployingMilitia == 1>> Since you decided to revive old Rome, your volunteers are more willing to trust one of your soldiers as their leader. @@ -1421,23 +1421,21 @@ <br> <<include "unitsBattleReport">> - <<if $securityForceArcologyUpgrades >= 7 || $securityForceFortressZeppelin >= 1 || $securityForceSatellitePower >= 11 || $securityForceGiantRobot >= 6 || $securityForceMissileSilo >= 1>> - /* SF upgrades effects */ - <br> - <br> - <<if $securityForceArcologyUpgrades >= 7>> - The artillery pieces installed around the $securityForceName barracks provided vital fire support to the troops in the field. + <<if $SF.Toggle && ($SFUnit.Firebase >= 7 || $SFUnit.GunS >= 1 || $SFUnit.Satellite >= 5 || $SFUnit.GiantRobot >= 6 || $SFUnit.MissileSilo >= 1)>> + /* SF upgrades effects */ <br><br> + <<if $SFUnit.Firebase >= 7>> + The artillery pieces installed around the $SF.Lower firebase provided vital fire support to the troops in the field. <</if>> - <<if $securityForceFortressZeppelin >= 1>> - The fortress zeppelin gave our troops an undeniable advantage in recon capabilities, air superiority and fire support. + <<if $SFUnit.GunS >= 1>> + The gunship gave our troops an undeniable advantage in recon capabilities, air superiority and fire support. <</if>> - <<if $securityForceSatellitePower >= 11>> - The $securityForceName Satellite devastating power was employed with great efficiency against the enemy. + <<if $SFUnit.Satellite >= 5>> + The $SF.Lower SF.Satellite devastating power was employed with great efficiency against the enemy. <</if>> - <<if $securityForceGiantRobot >= 6>> - The giant robot of the $securityForceName proved to be a great boon to our troops, shielding many from the worst the enemy had to offer. + <<if $SFUnit.GiantRobot >= 6>> + The giant robot of the $SF.Lower proved to be a great boon to our troops, shielding many from the worst the enemy had to offer. <</if>> - <<if $securityForceMissileSilo >= 1>> + <<if $SFUnit.MissileSilo >= 1>> The missile silo exterminated many enemy soldiers even before the battle would begin. <</if>> <</if>> diff --git a/src/SecExp/authorityReport.tw b/src/SecExp/authorityReport.tw index 11370b0273149328b0d63ea4948b0f80374e402f..b9e1f8113d38448020bc1357f10d3db97a61bcca 100644 --- a/src/SecExp/authorityReport.tw +++ b/src/SecExp/authorityReport.tw @@ -106,6 +106,11 @@ Your authority is <<set _authGrowth += 12 * $activeUnits>> <</if>> +<<if $SF.Toggle && $SF.Active && $SF.Units > 10>> + Having a powerful special force, increases your authority. + <<set _authGrowth += $SF.Units/10>> +<</if>> + <<if $arcologies[0].FSChattelReligionist >= 90>> Religious organizations have a tight grip on the minds of your residents and their dogma greatly helps your authority grow. <<set _authGrowth += $arcologies[0].FSChattelReligionist>> diff --git a/src/SecExp/edicts.tw b/src/SecExp/edicts.tw index 3ed4ab94dfbe3b63ad9a2937c9de7073e61a835b..731b9ff3661c64603104309c2e72c9e5eb33c787 100644 --- a/src/SecExp/edicts.tw +++ b/src/SecExp/edicts.tw @@ -44,22 +44,22 @@ [[Repeal|edicts][$subsidyChurch = 0, $edictsUpkeep -= 1000]] <</if>> -<<if $SFSupportLevel > 0>> +<<if $SF.Toggle && $SFSupportLevel > 0>> <br><br>__Special Force:__ - <<if $SFSupportLevel == 1>> - <br>''Equipment provision:'' $securityForceName is providing the security HQ with advanced equipment, boosting its efficiency. + <<if $SFSupportLevel === 1>> + <br>''Equipment provision:'' $SF.Caps is providing the security HQ with advanced equipment, boosting its efficiency. [[Repeal|edicts][$SFSupportLevel--, $SFSupportUpkeep -= 1000, $reqHelots += 5]] - <<elseif $SFSupportLevel == 2>> - <br>''Personnel training:'' $securityForceName is currently providing advanced equipment and training to security HQ personnel. + <<elseif $SFSupportLevel === 2>> + <br>''Personnel training:'' $SF.Caps is currently providing advanced equipment and training to security HQ personnel. [[Repeal|edicts][$SFSupportLevel--, $SFSupportUpkeep -= 2000, $reqHelots += 5]] - <<elseif $SFSupportLevel == 3>> - <br>''Troops detachment:'' $securityForceName has currently transferred troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. + <<elseif $SFSupportLevel === 3>> + <br>''Troops detachment:'' $SF.Caps has currently transferred troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. [[Repeal|edicts][$SFSupportLevel--, $SFSupportUpkeep -= 3000, $reqHelots += 5]] - <<elseif $SFSupportLevel == 4>> - <br>''Full support:''$securityForceName is currently providing its full support to the security department, while transferring troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. + <<elseif $SFSupportLevel === 4>> + <br>''Full support:''$SF.Caps is currently providing its full support to the security department, while transferring troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. [[Repeal|edicts][$SFSupportLevel--, $SFSupportUpkeep -= 3000, $reqHelots += 5]] - <<elseif $SFSupportLevel == 5>> - <br>''Network assistance:''$securityForceName is currently assisting with a local install of its custom network full support and has transferred troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. + <<elseif $SFSupportLevel === 5>> + <br>''Network assistance:''$SF.Caps is currently assisting with a local install of its custom network full support and has transferred troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. [[Repeal|edicts][$SFSupportLevel--, $SFSupportUpkeep -= 4000, $secHQUpkeep -= 1000, $reqHelots += 5]] <</if>> <</if>> @@ -307,42 +307,42 @@ <</if>> <</if>> -<<if $securityForceCreate == 1 && $SFSupportLevel < 5>> +<<if $SF.Toggle && $SF.Active && $SFSupportLevel < 5>> <br><br>__Special Force:__ - <<if $SFSupportLevel == 0 && $reqHelots > 5>> - <br>''Equipment provision:'' $securityForceName will provide the security HQ with advanced equipment. + <<if !$SFSupportLevel && $reqHelots > 5>> + <br>''Equipment provision:'' $SF.Caps will provide the security HQ with advanced equipment. <<if $authority >= 1000>> [[Implement|edicts][$SFSupportLevel++, $cash -=5000, $authority -= 1000, $SFSupportUpkeep += 1000, $reqHelots -= 5]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will lower the amount of personnel necessary to man the security HQ by 5, but will incur upkeep costs.// - <<elseif $SFSupportLevel == 1 && $securityForceArcologyUpgrades != 4 && $reqHelots > 5>> - <br>''Personnel training:'' $securityForceName will provide the security HQ personnel with advanced training. + <<elseif $SFSupportLevel && $SFUnit.Firebase >= 4 && $reqHelots > 5>> + <br>''Personnel training:'' $SF.Caps will provide the security HQ personnel with advanced training. <<if $authority >= 1000>> [[Implement|edicts][$SFSupportLevel++, $cash -=5000, $authority -= 1000, $SFSupportUpkeep += 2000, $reqHelots -= 5]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will lower the amount of personnel necessary to man the security HQ by a further 5, but will incur additional upkeep costs.// - <<elseif $SFSupportLevel == 2 && $securityForceArcologyUpgrades != 6 && $reqHelots > 5>> - <br>''Troops detachment:'' $securityForceName will provide troops to the security department. + <<elseif $SFSupportLevel === 2 && $SFUnit.Firebase >= 6 && $reqHelots > 5>> + <br>''Troops detachment:'' $SF.Caps will provide troops to the security department. <<if $authority >= 1000>> [[Implement|edicts][$SFSupportLevel++, $cash -=5000, $authority -= 1000, $SFSupportUpkeep += 3000, $reqHelots -= 5]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will lower the amount of personnel necessary to man the security HQ by a further 5, but will incur additional upkeep costs.// - <<elseif $SFSupportLevel == 3 && $securityForceArcologyUpgrades != 6 && $reqHelots > 5>> - <br>''Full Support:'' $securityForceName will give the security department its full support. + <<elseif $SFSupportLevel === 3 && $SFUnit.Firebase >= 6 && $reqHelots > 5>> + <br>''Full Support:'' $SF.Caps will give the security department its full support. <<if $authority >= 1000>> [[Implement|edicts][$SFSupportLevel++, $cash -=5000, $authority -= 1000, $SFSupportUpkeep += 3000, $reqHelots -= 5]] <<else>> <br>//Not enough Authority.// <</if>> <br> //Will lower the amount of personnel necessary to man the security HQ by a further 5, but will incur additional upkeep costs.// - <<elseif $SFSupportLevel == 4 && $securityForceArcologyUpgrades == 13 && $reqHelots > 5>> - <br>''Network assistance:'' $securityForceName will assist the security department with installing a local version of their custom network. + <<elseif $SFSupportLevel === 4 && $SFUnit.Firebase === 10 && $reqHelots > 5>> + <br>''Network assistance:'' $SF.Caps will assist the security department with installing a local version of their custom network. <<if $authority >= 1000>> [[Implement|edicts][$SFSupportLevel++, $cash -=50000, $authority -= 1000, $SFSupportUpkeep += 4000, $secHQUpkeep += 1000, $reqHelots -= 5]] <<else>> diff --git a/src/SecExp/rebellionHandler.tw b/src/SecExp/rebellionHandler.tw index 624c40e9543d9b441708b921ab2b149fbb74f487..e2d5ce16e7fcd77339b2edacd44ee88bc02d2301 100644 --- a/src/SecExp/rebellionHandler.tw +++ b/src/SecExp/rebellionHandler.tw @@ -136,7 +136,7 @@ <</if>> <</for>> -<<if $securityForceCreate == 1>> +<<if $SF.Toggle && $SF.Active>> <<set $SFatk = 0>> <<set $SFdef = 0>> <<set $SFhp = 0>> @@ -144,7 +144,6 @@ <<set _attack += $SFatk>> <<set _defense += $SFdef>> <<set _hp += $SFhp>> - <</if>> <<set _attack *= _engageMod>> @@ -177,10 +176,10 @@ <<set _moraleTroopMod = Math.clamp($troopCount / 100,1,10)>> /* morale and baseHp calculation */ -<<set _morale = ($secBotsMorale * $secBots.active + $militiaBaseMorale * $deployingMilitia + $slaveBaseMorale * $deployingSlaves + $mercBaseMorale * $deployingMercs + $SFBaseMorale * $securityForceCreate) / ($secBots.active + $deployingMilitia +$deployingSlaves + $deployingMercs + $securityForceCreate)>> +<<set _morale = ($secBotsMorale * $secBots.active + $militiaBaseMorale * $deployingMilitia + $slaveBaseMorale * $deployingSlaves + $mercBaseMorale * $deployingMercs + $SFBaseMorale * $SF.Active) / ($secBots.active + $deployingMilitia +$deployingSlaves + $deployingMercs + $SF.Active)>> <<set _morale = _morale + _morale * $secBarracksUpgrades.luxury * 0.05>> /* barracks bonus */ <<set _morale *= _moraleTroopMod>> -<<set _baseHp = ($secBotsBaseHp * $secBots.active + $militiaBaseHp * $deployingMilitia + $slaveBaseHp * $deployingSlaves + $mercBaseHp * $deployingMercs + $SFBaseHp * $securityForceCreate) / ($secBots.active + $deployingMilitia +$deployingSlaves + $deployingMercs + $securityForceCreate)>> +<<set _baseHp = ($secBotsBaseHp * $secBots.active + $militiaBaseHp * $deployingMilitia + $slaveBaseHp * $deployingSlaves + $mercBaseHp * $deployingMercs + $SFBaseHp * $SF.Active) / ($secBots.active + $deployingMilitia +$deployingSlaves + $deployingMercs + $SF.Active)>> /* calculates rebelling army stats */ <<if $week <= 30>> diff --git a/src/SecExp/rebellionOptions.tw b/src/SecExp/rebellionOptions.tw index cb0035eface5921beb55d2d20c33c3173b09369f..ab5da909ad950827327acd615725bdb82645bbd5 100644 --- a/src/SecExp/rebellionOptions.tw +++ b/src/SecExp/rebellionOptions.tw @@ -97,10 +97,10 @@ <</if>> <</if>> <</for>> - <<if $securityForceActive == 1>>and $securityForceName, <<print commaNum($securityForcePersonnel)>> strong<</if>> + <<if $SF.Toggle && $SF.Active>>and $SF.Lower, <<print commaNum($SFUnit.Troops)>> strong<</if>> are called to defend the arcology from this menace. <<else>> - <<if $arcologyUpgrade.drones == 1>>Your security drones<<if $securityForceActive == 1>>and <<print commaNum($securityForceName, $securityForcePersonnel)>> strong<</if>><</if>> + <<if $arcologyUpgrade.drones == 1>>Your security drones<<if $SF.Toggle && $SF.Active>>and $SF.Lower, <<print commaNum($SFUnit.Troops)>> strong<</if>> <</if>> are called to defend the arcology from this menace. <</if>> <hr> diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw index c621fb3f53857f4b231f3651d05dfae0c45330c6..27bd2fe8036433376f83ce32035a8957dc9aefd2 100644 --- a/src/SecExp/secBarracks.tw +++ b/src/SecExp/secBarracks.tw @@ -139,7 +139,7 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s <hr> __Units__ <br> -Your maximum number of units is <<print $maxUnits>>, currently you have <<print $activeUnits>>. <<if $secBarracksUpgrades.luxury > 0>>The barracks provides <<print $secBarracksUpgrades.luxury * 5>>% bonus morale when battle occurs.<</if>><<if $secBarracksUpgrades.training > 0>> The training facility will increase the effectiveness of your units with time.<</if>> +Your current maximum number of units is <<print $maxUnits>> (<<print commaNum($secBots.maxTroops+(50*$maxUnits))>> troops), <<print $activeUnits>> (<<print commaNum($secBots.maxTroops+($slavesEmployedManpower)+($militiaEmployedManpower)+($mercEmployedManpower))>> troops) are active and <<print (2 * $readiness)>> units can be deployed. <<if $secBarracksUpgrades.luxury > 0>>The barracks provides <<print $secBarracksUpgrades.luxury * 5>>% bonus morale when battle occurs.<</if>> <<if $secBarracksUpgrades.training > 0>>The training facility will increase the effectiveness of your units with time.<</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSChineseRevivalist != "unset" || $arcologies[0].FSArabianRevivalist != "unset" || $arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSEgyptianRevivalist != "unset" || $arcologies[0].FSAztecRevivalist != "unset">> <</if>> <br> @@ -302,7 +302,7 @@ You are free to organize your menial slaves into fighting units. Currently you h <<goto "secBarracks">> <</link>> <</if>> - + <<else>> <br> <br> @@ -354,8 +354,8 @@ __Militia__ With the establishment of conscription, your available manpower has increased to now approximately 3% of the arcology's citizens population. <<elseif $militiaRecruitment == 2>> By establishing obligatory military service to obtain citizenship you have enlarged your manpower pool to be approximately 5% of the arcology's citizens population. - <</if>> - Your current total manpower is <<print commaNum($militiaTotalManpower)>>, of which <<print commaNum($militiaEmployedManpower)>> is in active duty. You lost in total <<print commaNum($militiaTotalCasualties)>> citizens, leaving you with <<print commaNum($militiaFreeManpower)>> available citizens. + <</if>> + Your current total manpower is <<print commaNum($militiaTotalManpower)>>, of which <<print commaNum($militiaEmployedManpower)>> is in active duty. You lost in total <<print commaNum($militiaTotalCasualties)>> citizens, leaving you with <<print commaNum($militiaFreeManpower)>> available citizens. <br> <<set _mL = $militiaUnits.length>> <<if $militiaFreeManpower > 0 && $activeUnits < $maxUnits>> @@ -618,7 +618,7 @@ __Mercenaries__ <<goto "secBarracks">> <</link>> <</if>> - + <<else>> <br> <br> diff --git a/src/SecExp/securityReport.tw b/src/SecExp/securityReport.tw index 56eb883bc4e6bf774492d6ea8c6d288a2ff6a2e8..b4ef834de63d30021fd6c131ff575e97f6032df8 100644 --- a/src/SecExp/securityReport.tw +++ b/src/SecExp/securityReport.tw @@ -125,14 +125,16 @@ <<set $garrison.assistantTime--, $PC.engineering += .1>> <</if>> -<<if $SFSupportLevel >= 3>> - The two squads of $securityForceName assigned to the Security HQ provide an essential help to the security department. -<</if>> -<<if $SFSupportLevel >= 2>> - The training officers of $securityForceName assigned to the Security HQ improve its effectiveness. -<</if>> -<<if $SFSupportLevel >= 1>> - Providing your Security Department with equipment from $securityForceName slightly boosts the security of your arcology. +<<if $SF.Toggle && $SF.Active>> + <<if $SFSupportLevel >= 3>> + The two squads of $SF.Lower assigned to the Security HQ provide an essential help to the security department. + <</if>> + <<if $SFSupportLevel >= 2>> + The training officers of $SF.Lower assigned to the Security HQ improve its effectiveness. + <</if>> + <<if $SFSupportLevel >= 1>> + Providing your Security Department with equipment from $SF.Lower slightly boosts the security of your arcology. + <</if>> <</if>> /* resting point */ @@ -252,6 +254,10 @@ <<if $militiaFounded == 1 || $activeUnits >= 1>> <br> <strong> Military</strong>: /* militia */ + <<if $SF.Toggle && $SF.Active && $SF.Units > 10>> + Having a powerful special force attracts a lot of citizens, hopeful that they may be able to fight along side it. + <<set _recruits += random(0,(Math.round($SF.Units/10)))>> + <</if>> <<if $propCampaign >= 1 && $propFocus == "recruitment">> <<if $RecuriterOffice == 0 || $Recruiter == 0>> <<if $propCampaignBoost == 1>> @@ -400,6 +406,10 @@ <<if $crime > 60>> The powerful crime organizations that nested themselves in the arcology have an unending need for cheap guns for hire, many mercenaries flock to your free city in search of employment.<<set _newMercs += random(1,2)>> <</if>> + <<if $SF.Toggle && $SF.Active && $SF.Units > 10>> + Having a powerful special force attracts a lot of mercenaries, hopeful that they may be able to fight along side it. + <<set _newMercs += random(0,Math.round($SF.Units/10))>> + <</if>> <<set _newMercs = Math.trunc(_newMercs / 2)>> <<if _newMercs > 0>> <<set $mercTotalManpower += _newMercs>> diff --git a/src/SecExp/seeUnit.tw b/src/SecExp/seeUnit.tw index 2ad539ccd55eb46712e8154f5c871fe961d21f8f..54d375f65aad6e40f3ef95bf49ea4417665ba411 100644 --- a/src/SecExp/seeUnit.tw +++ b/src/SecExp/seeUnit.tw @@ -26,17 +26,17 @@ <</link>> Invest in the development of more refined controls for your drones to increase the maximum number of drones in the unit. <br>//Costs <<print cashFormat(5000)>> per upgrade and each will increase the max by 10// - <<elseif $secBots.maxTroops < 100 && $SFSupportLevel >= 1>> + <<elseif $SF.Toggle && $SF.Active && $secBots.maxTroops < 100 && $SFSupportLevel >= 1>> <br> - <<link "Refine the drone network with $securityForceName assistance">> + <<link "Refine the drone network with $SF.Lower assistance">> <<set $secBots.maxTroops += 10>> <<set $cash -= 5000 + 10 * $secBotsUpgradeCost * $secBots.equip>> <<goto "seeUnit">> <</link>> - Utilize the technological developments made by $securityForceName to further improve the control matrix of the security drones. + Utilize the technological developments made by $SF.Lower to further improve the control matrix of the security drones. <br>//Costs <<print cashFormat(5000 + 10 * $secBotsUpgradeCost * $secBots.equip)>> and will increase the max by 10// - <<elseif $SFSupportLevel < 1 && $securityForceCreate == 1>> - There's little left to improve in the matrix. However support from $securityForceName might give some more room from improvement. + <<elseif $SF.Toggle && $SF.Active && $SFSupportLevel < 1>> + There's little left to improve in the matrix. However support from $SF.Lower might give some more room from improvement. <<else>> There's little left to improve in the matrix. Your control systems are at top capacity and won't be able to handle a bigger drone unit. <</if>> @@ -160,7 +160,7 @@ <<else>> <br>The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers. <</if>> - <<if $securityForceActive == 1>> + <<if $SF.Toggle && $SF.Active>> <<if $militiaUnits[$targetIndex].SF == 0>> <br> <<link "Attach Special Force advisors">> @@ -168,10 +168,10 @@ <<set $cash -= ($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 5000>> <<goto "seeUnit">> <</link>> - Attach $securityForceName advisors to the unit. + Attach $SF.Lower advisors to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 5000)>> and will slightly increase the base stats of the unit.// <<else>> - <br>The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active. + <br>The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <</if>> @@ -318,7 +318,7 @@ <<else>> <br>The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers. <</if>> - <<if $securityForceActive == 1>> + <<if $SF.Toggle && $SF.Active>> <<if $slaveUnits[$targetIndex].SF == 0>> <br> <<link "Attach Special Force advisors">> @@ -326,10 +326,10 @@ <<set $cash -= ($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 5000>> <<goto "seeUnit">> <</link>> - Attach $securityForceName advisors to the unit. + Attach $SF.Lower advisors to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 5000)>> and will slightly increase the base stats of the unit.// <<else>> - <br>The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active. + <br>The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <</if>> <<if $showBattleStatistics == 1>> @@ -474,7 +474,7 @@ <<else>> <br>The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers. <</if>> - <<if $securityForceActive == 1>> + <<if $SF.Toggle && $SF.Active>> <<if $mercUnits[$targetIndex].SF == 0>> <br> <<link "Attach Special Force advisors">> @@ -482,10 +482,10 @@ <<set $cash -= ($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 5000>> <<goto "seeUnit">> <</link>> - Attach $securityForceName advisors to the unit. + Attach $SF.Lower advisors to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 5000)>> and will slightly increase the base stats of the unit.// <<else>> - <br>The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active. + <br>The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <</if>> <<if $showBattleStatistics == 1>> diff --git a/src/SecExp/tradeReport.tw b/src/SecExp/tradeReport.tw index ccd0c030a586cc98d469fe723de464630ee51881..a864e80e2e51584a8334b1ac63e1909d81367e86 100644 --- a/src/SecExp/tradeReport.tw +++ b/src/SecExp/tradeReport.tw @@ -44,7 +44,7 @@ <<elseif $rep > 12000>> Your high reputation attracts trade from all over the world. <</if>> - + <<if $assistantPower == 1>> Thanks to the computing power available to her, $assistantName is able to guide the commercial development of the arcology to greater levels. <<set _tradeChange++>> <<elseif $assistantPower == 2>> @@ -98,7 +98,12 @@ <</if>> <</if>> <</if>> - + +<<if $SF.Toggle && $SF.Active && $SF.Units > 10>> + Having a powerful special force, increases trade security. + <<set _tradeChange += $SF.Units/10>> +<</if>> + <<if _tradeChange > 0>> This week @@.green;trade improved.@@ <<elseif _tradeChange == 0>> diff --git a/src/SecExp/unitsBattleReport.tw b/src/SecExp/unitsBattleReport.tw index b702f98375e4eda6d3a5c8a81a4d61d71ea12f56..1ec2fd7d87b4cc7f6bbf09895596a1f857ae4473 100644 --- a/src/SecExp/unitsBattleReport.tw +++ b/src/SecExp/unitsBattleReport.tw @@ -5,9 +5,9 @@ <br> Security Drones: no casualties. <</if>> - <<if $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active && $SFIntervention>> <br> - <<print $securityForcePersonnel>> soldiers from $securityForceName joined the battle: no casualties suffered. + <<print commaNum($SFUnit.Troops)>> soldiers from $SF.Lower joined the battle: no casualties suffered. <</if>> <<if $deployingMilitia == 1>> <<for _j = 0; _j < $militiaUnits.length; _j++>> @@ -56,7 +56,7 @@ /* if the losses are more than zero */ /* generates a list of randomized losses, from which each unit picks one at random */ <<set _losses = $losses>> - <<if $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active && $SFIntervention>> <<set $deployedUnits++>> <</if>> <<set _averageLosses = Math.trunc(_losses / $deployedUnits)>> @@ -77,7 +77,7 @@ <<set _lossesList[random(_lossesList.length - 1)] += _losses>> <</if>> <<set _lossesList.shuffle()>> - + /* sanity check for losses */ <<set _count = 0>> <<for _i = 0; _i < _lossesList.length; _i++>> @@ -94,7 +94,7 @@ <<set _rand = random(_lossesList.length - 1)>> <<set _lossesList[_rand] = Math.trunc(_lossesList[_rand]-_diff,0,100)>> <</if>> - + /* assigns the losses and notify the player */ <<if $deployingBots == 1>> <br> @@ -116,17 +116,17 @@ suffered. <<if $secBots.troops <= 5>> <<set $secBots.active = 0>> - Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. It will take quite the investment to rebuild them. + Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. It will take quite the investment to rebuild them. <<elseif $secBots.troops <= 10>> The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <br> <</if>> - <<if $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active && $SFIntervention>> <br> <<set _loss = _lossesList.pluck()>> - <<set _loss = Math.clamp(_loss,0,$securityForcePersonnel)>> - <<print $securityForcePersonnel>> soldiers from the $securityForceName joined the battle: + <<set _loss = Math.clamp(_loss,0,$SFUnit.Troops)>> + <<print commaNum($SFUnit.Troops)>> soldiers from $SF.Lower joined the battle: <<if _loss <= 0>> no casualties <<elseif _loss <= 10>> @@ -139,7 +139,7 @@ catastrophic casualties <</if>> suffered. - <<set $securityForcePersonnel -= _loss>> + <<set $SFUnit.Troops -= _loss>> <br> <</if>> <<if $deployingMilitia == 1>> @@ -178,7 +178,7 @@ <</if>> <<if $militiaUnits[_j].troops <= 5>> <<set $militiaUnits[_j].active = 0>> - <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. + <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $militiaUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> @@ -221,7 +221,7 @@ <</if>> <<if $slaveUnits[_j].troops <= 5>> <<set $slaveUnits[_j].active = 0>> - <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The survivors will be sent home honored as veterans or reorganized in a new unit. + <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The survivors will be sent home honored as veterans or reorganized in a new unit. <<elseif $slaveUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> @@ -261,10 +261,10 @@ Experience has increased. <<set $mercUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> - <</if>> + <</if>> <<if $mercUnits[_j].troops <= 5>> <<set $mercUnits[_j].active = 0>> - <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. + <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $mercUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> diff --git a/src/SecExp/unitsRebellionReport.tw b/src/SecExp/unitsRebellionReport.tw index b07d60ec4d8bce574ef184674790e2a999ac205c..3384460a1437589441f997aa0a6fd1c9b273b75b 100644 --- a/src/SecExp/unitsRebellionReport.tw +++ b/src/SecExp/unitsRebellionReport.tw @@ -8,9 +8,8 @@ <br> Security drones: no casualties suffered. <</if>> - <<if $securityForceCreate == 1>> - <br> - $securityForceName, <<print commaNum($securityForcePersonnel)>> strong, was called to join the battle: no casualties suffered. + <<if $SF.Toggle && $SF.Active>> + <br>$SF.Lower, <<print commaNum($SFUnit.Troops)>> strong, was called to join the battle: no casualties suffered. <</if>> <<set _count = 0>> <<if $loyalID.length > 0>> @@ -18,7 +17,7 @@ <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && ($loyalID.includes($militiaUnits[_i].ID))>> <<set _count++>> - <<if _count < $loyalID.length>> + <<if _count < $loyalID.length>> $militiaUnits[_i].platoonName, <<else>> $militiaUnits[_i].platoonName @@ -28,7 +27,7 @@ <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && ($loyalID.includes($slaveUnits[_i].ID))>> <<set _count++>> - <<if _count < $loyalID.length>> + <<if _count < $loyalID.length>> $slaveUnits[_i].platoonName, <<else>> $slaveUnits[_i].platoonName @@ -38,7 +37,7 @@ <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && ($loyalID.includes($mercUnits[_i].ID))>> <<set _count++>> - <<if _count < $loyalID.length>> + <<if _count < $loyalID.length>> $mercUnits[_i].platoonName, <<else>> $mercUnits[_i].platoonName @@ -101,7 +100,7 @@ <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> - + /* slaves */ <<set _slaveRebelledID = []>> <<set _slaveManpower = 0>> @@ -155,7 +154,7 @@ <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> - + /* mercs */ <<set _mercRebelledID = []>> <<set _mercManpower = 0>> @@ -214,7 +213,7 @@ <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $militiaUnits[_j].active == 1 && $rebellingID.includes($militiaUnits[_j].ID)>> <<set _militiaRebelledID.push($militiaUnits[_j].ID)>> - $militiaUnits[_j].platoonName, + $militiaUnits[_j].platoonName, <</if>> <</for>> <<if _militiaRebelledID.length > 0>> @@ -256,12 +255,12 @@ <<elseif $losses > 0>> /* if the losses are more than zero */ /* generates a list of randomized losses, from which each unit picks one at random */ - <<if $securityForceCreate == 1>> + <<if $SF.Toggle && $SF.Active>> <<set $deployedUnits++>> <</if>> <<if $irregulars > 0>> <<set $deployedUnits++>> - <</if>> + <</if>> <<set _averageLosses = Math.trunc($losses / $deployedUnits)>> <<set _lossesList = []>> <<for _i = 0; _i < $deployedUnits; _i++>> @@ -278,7 +277,7 @@ <<set _lossesList[random(_lossesList.length - 1)] += $losses>> <</if>> <<set _lossesList.shuffle()>> - + /* sanity check for losses */ <<set _count = 0>> <<for _i = 0; _i < _lossesList.length; _i++>> @@ -295,7 +294,7 @@ <<set _rand = random(_lossesList.length - 1)>> <<set _lossesList[_rand] = Math.trunc(_lossesList[_rand]-_diff,0,100)>> <</if>> - + /* assigns the losses and notify the player */ <<if $irregulars > 0>> <br> @@ -341,18 +340,18 @@ suffered. <<if $secBots.troops <= 0>> <<set $secBots.active = 0>> - Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. It will take quite the investment to rebuild them. + Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. It will take quite the investment to rebuild them. <<elseif $secBots.troops <= 10>> The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> - <<if $securityForceCreate == 1>> + <<if $SF.Toggle && $SF.Active>> <br> <br> <<set _loss = _lossesList.pluck()>> - <<set _loss = Math.clamp(_loss,0,$securityForcePersonnel)>> - $securityForceName, $securityForcePersonnel strong, is called to join the battle: - <<set $securityForcePersonnel -= _loss>> + <<set _loss = Math.clamp(_loss,0,$SFUnit.Troops)>> + $SF.Lower, $SFUnit.Troops strong, is called to join the battle: + <<set $SFUnit.Troops -= _loss>> <<if _loss <= 0>> no casualties <<elseif _loss <= 10>> @@ -403,7 +402,7 @@ <</if>> <<if $militiaUnits[_j].troops <= 0>> <<set $militiaUnits[_j].active = 0>> - <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. + <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $militiaUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> @@ -452,7 +451,7 @@ <</if>> <<if $slaveUnits[_j].troops <= 0>> <<set $slaveUnits[_j].active = 0>> - <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The survivors will be sent home honored as veterans or reorganized in a new unit. + <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The survivors will be sent home honored as veterans or reorganized in a new unit. <<elseif $slaveUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> @@ -493,15 +492,15 @@ Experience gained. <<set $mercUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> - <</if>> + <</if>> <<if $mercUnits[_j].troops <= 0>> <<set $mercUnits[_j].active = 0>> - <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. + <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $mercUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> - <</for>> + <</for>> <</if>> <br> <br> @@ -558,7 +557,7 @@ <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> - + /* slaves */ <<set _slaveRebelledID = []>> <<set _slaveManpower = 0>> @@ -611,7 +610,7 @@ <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> - + /* mercs */ <<set _mercRebelledID = []>> <<set _mercManpower = 0>> @@ -664,14 +663,14 @@ <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> - + /* loss */ <<elseif $rebellingID.length > 0>> <<set _militiaRebelledID = []>> <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $militiaUnits[_j].active == 1 && $rebellingID.includes($militiaUnits[_j].ID)>> <<set _militiaRebelledID.push($militiaUnits[_j].ID)>> - $militiaUnits[_j].platoonName, + $militiaUnits[_j].platoonName, <</if>> <</for>> <<if _militiaRebelledID.length > 0>> diff --git a/src/SecExp/weaponsManufacturing.tw b/src/SecExp/weaponsManufacturing.tw index 339b434aa738fab80187fa0a79fb8eeab57fc03d..92a6646fc62b7ad6411479faf3e2135feb22d0a0 100644 --- a/src/SecExp/weaponsManufacturing.tw +++ b/src/SecExp/weaponsManufacturing.tw @@ -232,7 +232,7 @@ __Upgrades__: <<elseif $secBotsBaseDefense <= 3 || $droneUpgrades >= 3>> Upgrade the research facility further to unlock more upgrades for the security drones. <<else>> - You fully upgraded the security drones. + You have fully upgraded the security drones. <</if>> <br><br> /* human troops upgrades */ @@ -322,10 +322,10 @@ __Upgrades__: <br>//Will take _time weeks, cost <<print cashFormat(120000*$HackingSkillMultiplier)>> and will increase the base hp and morale values of human troops.// <</if>> <br> - <<if $securityForceCreate == 1>> - <<if !$completedUpgrades.includes(6) && $weapLab >= 2 && $SFSupportLevel >= 2 && $securityForceArcologyUpgrades >= 7>> + <<if $SF.Toggle && $SF.Active>> + <<if !$completedUpgrades.includes(6) && $weapLab >= 2 && $SFSupportLevel >= 2 && $SFUnit.Firebase >= 7>> <br> - <<link "Develop combined training regimens with $securityForceName">> + <<link "Develop combined training regimens with $SF.Lower">> <<set $currentUpgrade = { ID: 6, name: "combined training regimens with the special force", @@ -336,9 +336,9 @@ __Upgrades__: <</link>> <br>//Will take _time weeks, and will increase the base attack and defense values of human troops.// <</if>> - <<if !$completedUpgrades.includes(7) && $weapLab >= 2 && $SFSupportLevel >= 4 && $securityForceStimulantPower >= 8>> + <<if !$completedUpgrades.includes(7) && $weapLab >= 2 && $SFSupportLevel >= 4 && $SFUnit.Drugs >= 8>> <br> - <<link "Develop a variant of the stimulant cocktail that $securityForceName created">> + <<link "Develop a variant of the stimulant cocktail that $SF.Lower created">> <<set $currentUpgrade = { ID: 7, name: "a variant of the stimulant cocktail that the special force created", @@ -352,7 +352,7 @@ __Upgrades__: <</if>> <<if !$completedUpgrades.includes(8) && $weapLab >= 3 && $SFSupportLevel >= 5>> <br> - <<link "Create a mesh network based off the custom network of $securityForceName">> + <<link "Create a mesh network based off the custom network of $SF.Lower">> <<set $currentUpgrade = { ID: 8, name: "a mesh network based off the custom network of the special force", @@ -365,12 +365,12 @@ __Upgrades__: <br>//Will take _time weeks, cost <<print cashFormat(1000000*$HackingSkillMultiplier)>> and will increase all base stats of human troops.// <</if>> <</if>> - <<if $securityForceCreate == 1 && ($humanUpgrade.attack >= 4 || $humanUpgrade.hp >= 4 || $humanUpgrade.morale >= 40 || $humanUpgrade.defense >= 4)>> - You fully upgraded your human troops. + <<if $SF.Toggle && $SF.Active && ($humanUpgrade.attack >= 4 || $humanUpgrade.hp >= 4 || $humanUpgrade.morale >= 40 || $humanUpgrade.defense >= 4)>> + You have fully upgraded your human troops. <<elseif $humanUpgrade.attack >= 2 || $humanUpgrade.hp >= 2 || $humanUpgrade.morale >= 20 || $humanUpgrade.defense >= 2>> - You fully upgraded your human troops. - <<if $securityForceCreate == 1 && ($humanUpgrade.attack < 4 || $humanUpgrade.hp < 4 || $humanUpgrade.morale < 40 || $humanUpgrade.defense < 4) && (($SFSupportLevel >= 2 && $securityForceArcologyUpgrades >= 7) || ($SFSupportLevel >= 4 && $securityForceStimulantPower >= 8) || ($SFSupportLevel >= 5))>> - With support from $securityForceName, however, we may be able to further upgrade our troops. + You have fully upgraded your human troops. + <<if $SF.Toggle && $SF.Active && ($humanUpgrade.attack < 4 || $humanUpgrade.hp < 4 || $humanUpgrade.morale < 40 || $humanUpgrade.defense < 4) && (($SFSupportLevel >= 2 && $SFUnit.Firebase >= 7) || ($SFSupportLevel >= 4 && $SFUnit.Drugs >= 8) || ($SFSupportLevel >= 5))>> + With support from $SF.Lower, however, we may be able to further upgrade our troops. <</if>> <<elseif $weapLab < 3>> Upgrade the research facility further to unlock more upgrades for human troops. diff --git a/src/SecExp/widgets/battleWidgets.tw b/src/SecExp/widgets/battleWidgets.tw index 26edaff84521764dddd5cfd17038e8fdbf96ab8e..0c14603cd1c48aca349cb671e7fd2f59c15db0c0 100644 --- a/src/SecExp/widgets/battleWidgets.tw +++ b/src/SecExp/widgets/battleWidgets.tw @@ -3,7 +3,7 @@ <<widget "calcSFStatistics">> <<if $slaveRebellion != 1 || $citizenRebellion != 1>> /* atk, def */ - <<set _upgradesSum = $securityForceInfantryPower + $securityForceStimulantPower + $securityForceAircraftPower + $securityForceAircraftPower>> + <<set _upgradesSum = $SFUnit.Armoury + $SFUnit.Drugs + $SFUnit.AirForce + $SFUnit.Vehicles>> <<if !isInt(_upgradesSum)>> <<set _upgradesSum = random(10,15)>> <</if>> @@ -12,30 +12,30 @@ /* hp */ <<set $carriableSoldiers = 125 * ($securityForceAC130 + $securityForceVehiclePower)>> <<if !isInt($carriableSoldiers)>> - <<set $carriableSoldiers = $securityForcePersonnel / 10>> + <<set $carriableSoldiers = $SFUnit.Troops / 10>> <</if>> - <<if $securityForcePersonnel > $carriableSoldiers>> + <<if $SFUnit.Troops > $carriableSoldiers>> <<set $SFhp = $carriableSoldiers * $SFBaseHp>> <<else>> - <<set $carriableSoldiers = $securityForcePersonnel>> + <<set $carriableSoldiers = $SFUnit.Troops>> <<set $SFhp = $carriableSoldiers * $SFBaseHp>> <</if>> <<else>> /* atk, def */ - <<set _upgradesSum = $securityForceInfantryPower + $securityForceStimulantPower + $securityForceAircraftPower + $securityForceAircraftPower>> + <<set _upgradesSum = $SFUnit.Armoury + $SFUnit.Drugs + $SFUnit.AirForce + $SFUnit.Vehicles>> <<if !isInt(_upgradesSum)>> <<set _upgradesSum = random(10,15)>> <</if>> <<set $SFatk = Math.trunc(0.75 * _upgradesSum)>> <<set $SFdef = Math.trunc(0.50 * _upgradesSum)>> /* hp */ - <<set $SFhp = $securityForcePersonnel * $SFBaseHp>> + <<set $SFhp = $SFUnit.Troops * $SFBaseHp>> <</if>> <</widget>> <<widget "removeUnits">> /* args[0] is the array of IDs of units to be eliminated */ - + <<set _newMilitia = []>> <<set _newSlave = []>> <<set _newMerc = []>> @@ -53,13 +53,13 @@ <</if>> <</for>> <<set $slaveUnits = _newSlave>> - + <<for _i = 0; _i < $mercUnits.length; _i++>> <<if !($args[0].includes($mercUnits[_i].ID))>> <<set _newMerc.push($mercUnits[_i])>> <</if>> <</for>> - <<set $mercUnits = _newMerc>> + <<set $mercUnits = _newMerc>> <</widget>> <<widget "calcTroopCount">> @@ -83,13 +83,13 @@ <<set _troops += $mercUnits[_i].troops>> <</if>> <</for>> - <<if $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active && $SFIntervention>> <<set _troops += $carriableSoldiers>> <</if>> <<set $troopCount = _troops>> - + <<elseif $slaveRebellion == 1 || $citizenRebellion == 1>> - + <<if $irregulars > 0>> <<set _troops += $irregulars>> <</if>> @@ -115,9 +115,9 @@ <<set _troops += $carriableSoldiers>> <</if>> <<set $troopCount = _troops>> - + <<else>> - <br>@@.red;Error: widget called outside battle@@ + <br>@@.red;Error: widget called outside battle@@ <</if>> <</widget>> diff --git a/src/SecExp/widgets/unitsWidgets.tw b/src/SecExp/widgets/unitsWidgets.tw index 1760c71c98d228b9917db7a3d258f14c54341d58..51ab96f5ac8b654f06f5ea2eca237e48cc04df41 100644 --- a/src/SecExp/widgets/unitsWidgets.tw +++ b/src/SecExp/widgets/unitsWidgets.tw @@ -26,7 +26,7 @@ <<elseif $args[0].loyalty < 33>> Their loyalty is low. Careful monitoring of their activities and relationships is advised. <<elseif $args[0].loyalty < 66>> - Their loyalty is not as high as it can be, but they are not actively working against their arcology owner. + Their loyalty is not as high as it can be, but they are not actively working against their arcology owner. <<elseif $args[0].loyalty < 90>> Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent. <<else>> @@ -38,8 +38,8 @@ <<if $args[0].medics == 1>> The unit has a dedicated squad of medics that will follow them in battle. <</if>> - <<if $args[0].SF == 1>> - The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active. + <<if $SF.Toggle && $SF.Active && $args[0].SF>> + The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <<else>> $args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all. @@ -72,7 +72,7 @@ <<elseif $args[0].loyalty < 33>> Their loyalty is low. Careful monitoring of their activities and relationships is advised. <<elseif $args[0].loyalty < 66>> - Their loyalty is not as high as it can be, but they are not actively working against their arcology owner. + Their loyalty is not as high as it can be, but they are not actively working against their arcology owner. <<elseif $args[0].loyalty < 90>> Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent. <<else>> @@ -84,8 +84,8 @@ <<if $args[0].medics == 1>> The unit has a dedicated squad of medics that will follow them in battle. <</if>> - <<if $args[0].SF == 1>> - The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active. + <<if $SF.Toggle && $SF.Active && $args[0].SF>> + The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <<else>> $args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all. @@ -118,7 +118,7 @@ <<elseif $args[0].loyalty < 33>> Their loyalty is low. Careful monitoring of their activities and relationships is advised. <<elseif $args[0].loyalty < 66>> - Their loyalty is not as high as it can be, but they are not actively working against their arcology owner. + Their loyalty is not as high as it can be, but they are not actively working against their arcology owner. <<elseif $args[0].loyalty < 90>> Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent. <<else>> @@ -130,14 +130,14 @@ <<if $args[0].medics == 1>> The unit has a dedicated squad of medics that will follow them in battle. <</if>> - <<if $args[0].SF == 1>> - The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active. + <<if $SF.Toggle && $SF.Active && $args[0].SF>> + The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <<else>> $args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all. <</if>> <</widget>> - + <<widget "secBotsDescription">> <<if $secBots.active == 1>> <strong>The <<print $secBots.troops>> security drones</strong> are assembled in an ordered line in front of you, absolutely silent and ready to receive their orders. @@ -170,12 +170,12 @@ <<set _newID = $slaveUnits[_i].ID + 1>> <</if>> <</for>> - + <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].ID >= _newID>> <<set _newID = $mercUnits[_i].ID + 1>> <</if>> <</for>> - + <<set $args[0].ID = _newID>> <</widget>>