From aa716b4536c140cf1e6a0f71befdbba3f98561b9 Mon Sep 17 00:00:00 2001 From: x <okp57855@psoxs.com> Date: Sun, 19 Aug 2018 16:30:55 +1200 Subject: [PATCH] Toggle fix --- src/SecExp/attackGenerator.tw | 2 +- src/SecExp/attackHandler.tw | 6 +-- src/SecExp/attackOptions.tw | 4 +- src/SecExp/attackReport.tw | 58 ++++++++++++++--------------- src/SecExp/authorityReport.tw | 2 +- src/SecExp/edicts.tw | 2 +- src/SecExp/rebellionHandler.tw | 2 +- src/SecExp/rebellionOptions.tw | 4 +- src/SecExp/securityReport.tw | 6 +-- src/SecExp/seeUnit.tw | 10 ++--- src/SecExp/tradeReport.tw | 2 +- src/SecExp/unitsBattleReport.tw | 6 +-- src/SecExp/unitsRebellionReport.tw | 6 +-- src/SecExp/weaponsManufacturing.tw | 6 +-- src/SecExp/widgets/battleWidgets.tw | 2 +- src/SecExp/widgets/unitsWidgets.tw | 6 +-- src/uncategorized/manageArcology.tw | 2 +- 17 files changed, 63 insertions(+), 63 deletions(-) diff --git a/src/SecExp/attackGenerator.tw b/src/SecExp/attackGenerator.tw index a36480e9089..c2f48d97cbc 100644 --- a/src/SecExp/attackGenerator.tw +++ b/src/SecExp/attackGenerator.tw @@ -234,7 +234,7 @@ <<if ($week >= 120 && $attackType != "none") || ($forceMajorBattle == 1 && $foughtThisWeek == 0)>> <<if random(1,100) >= 50 || $forceMajorBattle == 1>> <<set $majorBattle = 1>> - <<if $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <<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 5cfbaedde46..a2bd0448483 100644 --- a/src/SecExp/attackHandler.tw +++ b/src/SecExp/attackHandler.tw @@ -97,7 +97,7 @@ <<set _enemyMod = 1.5>> <<set _SFMod = 1.5>> <<set _turns = $maxTurns * 2>> - <<if $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <<if $SFUnit.Firebase >= 7>> <<set _atkMod += ($SFUnit.Firebase - 6) * 0.05>> <</if>> @@ -961,7 +961,7 @@ <</if>> <</for>> -<<if $SF.Toggle && $SF.Active && $SFIntervention>> +<<if $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> +<<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> <br>special 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 ed50d4e312d..90f43736c3b 100644 --- a/src/SecExp/attackOptions.tw +++ b/src/SecExp/attackOptions.tw @@ -247,7 +247,7 @@ __Battle Plan__: <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> - <<if $SF.Toggle && $SF.Active && $SFTradeShow.CanAttend === -1>> + <<if $SF.Toggle && $SF.Active === 1 && $SFTradeShow.CanAttend === -1>> | <<link "Let The Colonel lead the troops">> <<set $leadingTroops = "colonel">> @@ -391,7 +391,7 @@ Units about to be deployed: <</for>> <</if>> -<<if $SF.Toggle && $SF.Active && $majorBattle>> +<<if $SF.Toggle && $SF.Active === 1 && $majorBattle>> <br> <br> The size of the incoming attack warrants the intervention of the special 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 21a2e25268b..fbeb7d18724 100644 --- a/src/SecExp/attackReport.tw +++ b/src/SecExp/attackReport.tw @@ -787,7 +787,7 @@ 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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> <<if $PC.career == "mercenary" || $PC.career == "slaver" || $PC.career == "capitalist" || $PC.career == "gang" || $PC.warfare > 75>> 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">> @@ -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 $SF.Toggle && $SF.Active && $deployingMercs == 1 && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $deployingMercs == 1 && $SFIntervention>> commander and neither are your mercenaries or your soldiers. <<elseif $deployingMercs == 1>> commander and neither are your mercenaries. - <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $SFIntervention>> commander and neither are your soldiers. <<else>> commander. <</if>> - <<elseif $SF.Toggle && $SF.Active && $deployingMercs == 1 && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $SFIntervention>> commander and neither are your mercenaries or your soldiers. <<elseif $deployingMercs == 1>> commander and neither are your mercenaries. - <<elseif $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $SFIntervention>> commander and neither are your soldiers. <<else>> commander. <</if>> - <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active === 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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 && $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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" && $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $arcologies[0].FSRomanRevivalist != "unset" && $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> Your soldiers feel more confident going into battle with an experienced commander. <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && $deployingMilitia == 1>> @@ -1166,7 +1166,7 @@ <<if $deployingMercs == 1>> Your mercenaries approve of such decisions, as they feel more confident by having a good, experienced commander. <</if>> - <<if $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> The soldiers of $SF.Lower obviously approved of your decision. <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && $deployingMilitia == 1>> diff --git a/src/SecExp/authorityReport.tw b/src/SecExp/authorityReport.tw index b9e1f8113d3..5d3f893e700 100644 --- a/src/SecExp/authorityReport.tw +++ b/src/SecExp/authorityReport.tw @@ -106,7 +106,7 @@ Your authority is <<set _authGrowth += 12 * $activeUnits>> <</if>> -<<if $SF.Toggle && $SF.Active && $SF.Units > 10>> +<<if $SF.Toggle && $SF.Active === 1 && $SF.Units > 10>> Having a powerful special force, increases your authority. <<set _authGrowth += $SF.Units/10>> <</if>> diff --git a/src/SecExp/edicts.tw b/src/SecExp/edicts.tw index 731b9ff3661..a569dca5326 100644 --- a/src/SecExp/edicts.tw +++ b/src/SecExp/edicts.tw @@ -307,7 +307,7 @@ <</if>> <</if>> -<<if $SF.Toggle && $SF.Active && $SFSupportLevel < 5>> +<<if $SF.Toggle && $SF.Active === 1 && $SFSupportLevel < 5>> <br><br>__Special Force:__ <<if !$SFSupportLevel && $reqHelots > 5>> <br>''Equipment provision:'' $SF.Caps will provide the security HQ with advanced equipment. diff --git a/src/SecExp/rebellionHandler.tw b/src/SecExp/rebellionHandler.tw index e2d5ce16e7f..6d71865467b 100644 --- a/src/SecExp/rebellionHandler.tw +++ b/src/SecExp/rebellionHandler.tw @@ -136,7 +136,7 @@ <</if>> <</for>> -<<if $SF.Toggle && $SF.Active>> +<<if $SF.Toggle && $SF.Active === 1>> <<set $SFatk = 0>> <<set $SFdef = 0>> <<set $SFhp = 0>> diff --git a/src/SecExp/rebellionOptions.tw b/src/SecExp/rebellionOptions.tw index ab5da909ad9..d05aa0ee003 100644 --- a/src/SecExp/rebellionOptions.tw +++ b/src/SecExp/rebellionOptions.tw @@ -97,10 +97,10 @@ <</if>> <</if>> <</for>> - <<if $SF.Toggle && $SF.Active>>and $SF.Lower, <<print commaNum($SFUnit.Troops)>> strong<</if>> + <<if $SF.Toggle && $SF.Active === 1>>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 $SF.Toggle && $SF.Active>>and $SF.Lower, <<print commaNum($SFUnit.Troops)>> strong<</if>> <</if>> + <<if $arcologyUpgrade.drones == 1>>Your security drones<<if $SF.Toggle && $SF.Active === 1>>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/securityReport.tw b/src/SecExp/securityReport.tw index b4ef834de63..cd9265bacd1 100644 --- a/src/SecExp/securityReport.tw +++ b/src/SecExp/securityReport.tw @@ -125,7 +125,7 @@ <<set $garrison.assistantTime--, $PC.engineering += .1>> <</if>> -<<if $SF.Toggle && $SF.Active>> +<<if $SF.Toggle && $SF.Active === 1>> <<if $SFSupportLevel >= 3>> The two squads of $SF.Lower assigned to the Security HQ provide an essential help to the security department. <</if>> @@ -254,7 +254,7 @@ <<if $militiaFounded == 1 || $activeUnits >= 1>> <br> <strong> Military</strong>: /* militia */ - <<if $SF.Toggle && $SF.Active && $SF.Units > 10>> + <<if $SF.Toggle && $SF.Active === 1 && $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>> @@ -406,7 +406,7 @@ <<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>> + <<if $SF.Toggle && $SF.Active === 1 && $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>> diff --git a/src/SecExp/seeUnit.tw b/src/SecExp/seeUnit.tw index 54d375f65aa..aa9f605e630 100644 --- a/src/SecExp/seeUnit.tw +++ b/src/SecExp/seeUnit.tw @@ -26,7 +26,7 @@ <</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 $SF.Toggle && $SF.Active && $secBots.maxTroops < 100 && $SFSupportLevel >= 1>> + <<elseif $SF.Toggle && $SF.Active === 1 && $secBots.maxTroops < 100 && $SFSupportLevel >= 1>> <br> <<link "Refine the drone network with $SF.Lower assistance">> <<set $secBots.maxTroops += 10>> @@ -35,7 +35,7 @@ <</link>> 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 $SF.Toggle && $SF.Active && $SFSupportLevel < 1>> + <<elseif $SF.Toggle && $SF.Active === 1 && $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. @@ -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 $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <<if $militiaUnits[$targetIndex].SF == 0>> <br> <<link "Attach Special Force advisors">> @@ -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 $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <<if $slaveUnits[$targetIndex].SF == 0>> <br> <<link "Attach Special Force advisors">> @@ -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 $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <<if $mercUnits[$targetIndex].SF == 0>> <br> <<link "Attach Special Force advisors">> diff --git a/src/SecExp/tradeReport.tw b/src/SecExp/tradeReport.tw index a864e80e2e5..cf19d937880 100644 --- a/src/SecExp/tradeReport.tw +++ b/src/SecExp/tradeReport.tw @@ -99,7 +99,7 @@ <</if>> <</if>> -<<if $SF.Toggle && $SF.Active && $SF.Units > 10>> +<<if $SF.Toggle && $SF.Active === 1 && $SF.Units > 10>> Having a powerful special force, increases trade security. <<set _tradeChange += $SF.Units/10>> <</if>> diff --git a/src/SecExp/unitsBattleReport.tw b/src/SecExp/unitsBattleReport.tw index 1ec2fd7d87b..8bdc0f32311 100644 --- a/src/SecExp/unitsBattleReport.tw +++ b/src/SecExp/unitsBattleReport.tw @@ -5,7 +5,7 @@ <br> Security Drones: no casualties. <</if>> - <<if $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> <br> <<print commaNum($SFUnit.Troops)>> soldiers from $SF.Lower joined the battle: no casualties suffered. <</if>> @@ -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 $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> <<set $deployedUnits++>> <</if>> <<set _averageLosses = Math.trunc(_losses / $deployedUnits)>> @@ -122,7 +122,7 @@ <</if>> <br> <</if>> - <<if $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> <br> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$SFUnit.Troops)>> diff --git a/src/SecExp/unitsRebellionReport.tw b/src/SecExp/unitsRebellionReport.tw index 3384460a143..b59b9b3b8dc 100644 --- a/src/SecExp/unitsRebellionReport.tw +++ b/src/SecExp/unitsRebellionReport.tw @@ -8,7 +8,7 @@ <br> Security drones: no casualties suffered. <</if>> - <<if $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <br>$SF.Lower, <<print commaNum($SFUnit.Troops)>> strong, was called to join the battle: no casualties suffered. <</if>> <<set _count = 0>> @@ -255,7 +255,7 @@ <<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 $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <<set $deployedUnits++>> <</if>> <<if $irregulars > 0>> @@ -345,7 +345,7 @@ The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> - <<if $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <br> <br> <<set _loss = _lossesList.pluck()>> diff --git a/src/SecExp/weaponsManufacturing.tw b/src/SecExp/weaponsManufacturing.tw index 92a6646fc62..d3da70da903 100644 --- a/src/SecExp/weaponsManufacturing.tw +++ b/src/SecExp/weaponsManufacturing.tw @@ -322,7 +322,7 @@ __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 $SF.Toggle && $SF.Active>> + <<if $SF.Toggle && $SF.Active === 1>> <<if !$completedUpgrades.includes(6) && $weapLab >= 2 && $SFSupportLevel >= 2 && $SFUnit.Firebase >= 7>> <br> <<link "Develop combined training regimens with $SF.Lower">> @@ -365,11 +365,11 @@ __Upgrades__: <br>//Will take _time weeks, cost <<print cashFormat(1000000*$HackingSkillMultiplier)>> and will increase all base stats of human troops.// <</if>> <</if>> - <<if $SF.Toggle && $SF.Active && ($humanUpgrade.attack >= 4 || $humanUpgrade.hp >= 4 || $humanUpgrade.morale >= 40 || $humanUpgrade.defense >= 4)>> + <<if $SF.Toggle && $SF.Active === 1 && ($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 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))>> + <<if $SF.Toggle && $SF.Active === 1 && ($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>> diff --git a/src/SecExp/widgets/battleWidgets.tw b/src/SecExp/widgets/battleWidgets.tw index 0c14603cd1c..c3d99382261 100644 --- a/src/SecExp/widgets/battleWidgets.tw +++ b/src/SecExp/widgets/battleWidgets.tw @@ -83,7 +83,7 @@ <<set _troops += $mercUnits[_i].troops>> <</if>> <</for>> - <<if $SF.Toggle && $SF.Active && $SFIntervention>> + <<if $SF.Toggle && $SF.Active === 1 && $SFIntervention>> <<set _troops += $carriableSoldiers>> <</if>> <<set $troopCount = _troops>> diff --git a/src/SecExp/widgets/unitsWidgets.tw b/src/SecExp/widgets/unitsWidgets.tw index 51ab96f5ac8..fbe908798ac 100644 --- a/src/SecExp/widgets/unitsWidgets.tw +++ b/src/SecExp/widgets/unitsWidgets.tw @@ -38,7 +38,7 @@ <<if $args[0].medics == 1>> The unit has a dedicated squad of medics that will follow them in battle. <</if>> - <<if $SF.Toggle && $SF.Active && $args[0].SF>> + <<if $SF.Toggle && $SF.Active === 1 && $args[0].SF>> The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <<else>> @@ -84,7 +84,7 @@ <<if $args[0].medics == 1>> The unit has a dedicated squad of medics that will follow them in battle. <</if>> - <<if $SF.Toggle && $SF.Active && $args[0].SF>> + <<if $SF.Toggle && $SF.Active === 1 && $args[0].SF>> The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <<else>> @@ -130,7 +130,7 @@ <<if $args[0].medics == 1>> The unit has a dedicated squad of medics that will follow them in battle. <</if>> - <<if $SF.Toggle && $SF.Active && $args[0].SF>> + <<if $SF.Toggle && $SF.Active === 1 && $args[0].SF>> The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active. <</if>> <<else>> diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index eecb70ab936..f192a9941d5 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -280,7 +280,7 @@ Your slaves have participated in approximately <<print commaNum($oralTotal+$vagi <br><br> <<if !$SF.Toggle||!$SF.Active>> Your army counts <<print commaNum($militiaEmployedManpower + $slavesEmployedManpower + $mercEmployedManpower)>> total soldiers. -<<elseif $SF.Toggle && $SF.Active>>>> +<<elseif $SF.Toggle && $SF.Active === 1>>>> Your army counts <<print commaNum($militiaEmployedManpower + $slavesEmployedManpower + $mercEmployedManpower + $SFUnit.Troops)>> total soldiers of which <<print commaNum($SFUnit.Troops)>> under the special force command and the rest under your direct control. <</if>> <<if $hasFoughtOnce == 1>> -- GitLab