diff --git a/src/SecExp/SecExpBackwardCompatibility.tw b/src/SecExp/SecExpBackwardCompatibility.tw index b9e1585735970b6180e36f1a18d5cb3395195d62..17b38dcb25ba54c9955115271c3d74ccc42ef305 100644 --- a/src/SecExp/SecExpBackwardCompatibility.tw +++ b/src/SecExp/SecExpBackwardCompatibility.tw @@ -252,7 +252,7 @@ size: 0, luxury: 0, training: 0, - loyaltyMod:0 }>> + loyaltyMod:0 }>> <</if>> <<if ndef $secBarracksUpgrades.loyaltyMod>> <<set $secBarracksUpgrades.loyaltyMod = 0>> @@ -270,7 +270,7 @@ eyeScan: 0, cryptoAnalyzer: 0, coldstorage: 0}>> -<</if>> +<</if>> <<if ndef $crimeUpgrades>> <<set $crimeUpgrades = { autoTrial: 0, @@ -441,7 +441,7 @@ <</if>> <<if ndef $droneUpgrades.hp || !isInt($droneUpgrades.hp)>> <<set $droneUpgrades.hp = 0>> - <</if>> + <</if>> <</if>> <<if ndef $humanUpgrade>> <<set $humanUpgrade = { @@ -978,7 +978,7 @@ /* SFanon additions */ <<if ndef $SFSupportLevel>> - <<set $SFSupportLevel = 0>> + <<set $SFSupportLevel = 0>> <</if>> <<if ndef $SFSupportUpkeep>> <<set $SFSupportUpkeep = 0>> @@ -986,6 +986,15 @@ <<if ndef $secUpgrades.coldstorage>> <<set $secUpgrades.coldstorage = 0>> <</if>> +<<if ndef $SFGear>> + <<set $SFGear = 0>> +<</if>> +<<if ndef $SavedLeader>> + <<set $SavedLeader = $leadingTroops>> +<</if>> +<<if ndef $SavedSFI>> + <<set $SavedSFI = $SFIntervention>> +<</if>> /* recalculation widgets */ <<fixBrokenUnits>> diff --git a/src/SecExp/attackGenerator.tw b/src/SecExp/attackGenerator.tw index d2113e2d7d190e3ceeaf5b745406bec527ab32a7..ff6782f29054c2da0bfaa216c2f240f922f48ca2 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 >= 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 4fae71757dba80f2da4e2069f62fd8e14d8db943..b829dae4b3872ac4494fa5dcc1293ea58a718511 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 >= 1>> + <<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 && $SatLaunched > 0>> + <<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 && $SatLaunched > 0>> + <<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 >= 1 && $SFIntervention>> <<set $SFatk = 0>> <<set $SFdef = 0>> <<set $SFhp = 0>> @@ -1113,19 +1113,19 @@ __Difficulty__: <br> <br> __Army__: -<br>troops: <<print $troopCount>> -<br>attack: <<print Math.round(_attack)>> -<br>defense: <<print Math.round(_defense)>> -<br>hp: <<print Math.round(_hp)>> -<br>morale: <<print Math.round(_morale)>> +<br>troops: <<print commaNum(Math.round($troopCount))>> +<br>attack: <<print commaNum(Math.round(_attack))>> +<br>defense: <<print commaNum(Math.round(_defense))>> +<br>hp: <<print commaNum(Math.round(_hp))>> +<br>morale: <<print commaNum(Math.round(_morale))>> <br>attack modifier: <<if _atkMod > 0>>+<</if>>_atkMod% <br>defense modifier: <<if _defMod > 0>>+<</if>>_defMod% -<br>average base HP: <<print Math.round(_baseHp)>> +<br>average base HP: <<print commaNum(Math.round(_baseHp))>> <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>> -<br>security force morale modifier: <<if _SFMod > 0>>+<</if>>_SFMod% +<<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> +<br>special force morale modifier: <<if _SFMod > 0>>+<</if>>_SFMod% <</if>> <<if $secBarracksUpgrades.luxury >= 1>> <br>Barracks bonus morale modifier: +<<print _barracksBonus>>% @@ -1136,17 +1136,17 @@ __Army__: <br> <br> __Tactics__: -<br>tactic chance of success: <<print Math.round(_tacChance * 100)>>% +<br>tactic chance of success: <<print commaNum(Math.round(_tacChance * 100))>>% <br>was tactic chosen successful?: <<if $tacticsSuccessful == 1>> yes <<else>> no<</if>> <br> <br> __Enemy__: -<br>enemy troops: <<print $attackTroops>> -<br>enemy attack: <<print Math.round(_enemyAttack)>> -<br>enemy defense: <<print Math.round(_enemyDefense)>> -<br>enemy Hp: <<print Math.round(_enemyHp)>> -<br>enemy morale: <<print Math.round(_enemyMorale)>> -<br>enemy base Hp: <<print Math.round(_enemyBaseHp)>> +<br>enemy troops: <<print commaNum(Math.round($attackTroops))>> +<br>enemy attack: <<print commaNum(Math.round(_enemyAttack))>> +<br>enemy defense: <<print commaNum(Math.round(_enemyDefense))>> +<br>enemy Hp: <<print commaNum(Math.round(_enemyHp))>> +<br>enemy morale: <<print commaNum(Math.round(_enemyMorale))>> +<br>enemy base Hp: <<print commaNum(Math.round(_enemyBaseHp))>> <br>enemy morale modifier: <<if _enemyMod > 0>>+<</if>>_enemyMod% <<if _enemyMoraleTroopMod > 0>> <br>enemy morale increase due to troop numbers: +<<print _enemyMoraleTroopMod>>% @@ -1162,15 +1162,15 @@ __Enemy__: /* player army attacks */ <<set _damage = Math.clamp(_attack - _enemyDefense,_attack * 0.1,_attack)>> <br> - <<if $showBattleStatistics == 1>> player damage: <<print Math.round(_damage)>><</if>> + <<if $showBattleStatistics == 1>> player damage: <<print commaNum(Math.round(_damage))>><</if>> <<set _enemyHp -= _damage>> <br> - <<if $showBattleStatistics == 1>> remaining enemy Hp: <<print Math.round(_enemyHp)>><</if>> + <<if $showBattleStatistics == 1>> remaining enemy Hp: <<print commaNum(Math.round(_enemyHp))>><</if>> <<set $enemyLosses += _damage / _enemyBaseHp>> <<set _moraleDamage = Math.clamp(_damage / 2 + _damage / _enemyBaseHp,0,_damage*1.5)>> <<set _enemyMorale -= _moraleDamage>> <br> - <<if $showBattleStatistics == 1>> remaining enemy morale: <<print Math.round(_enemyMorale)>><</if>> + <<if $showBattleStatistics == 1>> remaining enemy morale: <<print commaNum(Math.round(_enemyMorale))>><</if>> <<if _enemyHp <= 0 || _enemyMorale <= 0>> <br> <<if $showBattleStatistics == 1>> <br>Victory!<</if>> @@ -1185,10 +1185,10 @@ __Enemy__: <<set _damage = _enemyAttack * 0.1>> <</if>> <br> - <<if $showBattleStatistics == 1>> enemy damage: <<print Math.round(_damage)>><</if>> + <<if $showBattleStatistics == 1>> enemy damage: <<print commaNum(Math.round(_damage))>><</if>> <<set _hp -= _damage>> <br> - <<if $showBattleStatistics == 1>> remaining hp: <<print Math.round(_hp)>><</if>> + <<if $showBattleStatistics == 1>> remaining hp: <<print commaNum(Math.round(_hp))>><</if>> <<set $losses += _damage / _baseHp>> <<set _moraleDamage = Math.clamp(_damage / 2 + _damage / _baseHp,0,_damage*1.5)>> <<set _morale -= _moraleDamage>> @@ -1215,8 +1215,8 @@ __Enemy__: <<if $showBattleStatistics == 1>> <br> - <br>Losses: <<print Math.trunc($losses)>> - <br>Enemy losses: <<print Math.trunc($enemyLosses)>> + <br>Losses: <<print commaNum(Math.trunc($losses))>> + <br>Enemy losses: <<print commaNum(Math.trunc($enemyLosses))>> <</if>> <<if $battleResult > 3 || $battleResult < -3>> diff --git a/src/SecExp/attackOptions.tw b/src/SecExp/attackOptions.tw index c517473f02e1b8eaab0458701c956a8c50e582fb..9cfa7d27dee6a726ac80ad3d46b7c1a7f662727a 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,17 +247,17 @@ __Battle Plan__: <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> - <<if $securityForceCreate == 1>> + <<if $SF.Toggle && $SF.Active >= 1 && $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>> /* troop deployment */ -<br><br> +<br><br> <<if $deployableUnits < 0>> <<set $deployableUnits = 0>> <</if>> With your current readiness level you can <<if $deployedUnits > 0>>still send <strong><<print $deployableUnits>></strong> more units.<<else>>send <strong><<print $deployableUnits>></strong> units.<</if>> <br>Deployable units: <br> @@ -391,29 +391,20 @@ Units about to be deployed: <</for>> <</if>> -<<if $majorBattle == 1 && $securityForceCreate == 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>. - <br> - <<if $SFIntervention == 0>> - <<link "Let the Security force intervene" "attackOptions">> +<<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. + <<if !$SFIntervention>> + <<link "Let $SF.Lower intervene" "attackOptions">> <<set $SFIntervention = 1>> - <<replace "#SFI">> - intervene - <</replace>> <</link>> - //The security force will join the battle with all the equipment they can mobilize within a short timeframe// + //The special force will join the battle with all the equipment they can mobilize within a short timeframe// <<else>> - <<link "Do not let the Security force intervene" "attackOptions">> + <<link "Do not let $SF.Lower intervene" "attackOptions">> <<set $SFIntervention = 0>> - <<replace "#SFI">> - not intervene - <</replace>> <</link>> - //The security force will not join the battle// + //The special force will not join the battle// <</if>> - <br>//Some upgrades will be able to support the troops even if the security force does not intervene directly in the fight.// + <br>//Some upgrades will be able to support the troops even if the special force does not intervene directly in the fight.// <</if>> <br><br> @@ -452,7 +443,7 @@ Units about to be deployed: <</for>> <</if>> <</for>> - <<set $saveValid = 1>> + <<set $saveValid = 1,$leadingTroops = $SavedLeader, $SFIntervention = $SavedSFI>> <</link>> <<else>> Restore saved roster @@ -479,7 +470,7 @@ Units about to be deployed: <<set $lastSelection.push($mercUnits[_i].ID)>> <</if>> <</for>> - <<set $saveValid = 1>> + <<set $saveValid = 1,$SavedLeader = $leadingTroops,$SavedSFI = $SFIntervention>> <</link>> <<else>> Save current roster diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw index 194c0aa1a090f3233501fe8ef87f20360bcaa2fd..9f43ac9f5919e90d34f78d8680a0c907c65fc6df 100644 --- a/src/SecExp/attackReport.tw +++ b/src/SecExp/attackReport.tw @@ -132,7 +132,7 @@ <<if $attackType == "raiders">> Today, the _day of _month _year, our arcology was attacked by a band of wild raiders, $attackTroops men strong. <<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>> - Our defense forces, $troopCount strong, clashed with them + Our defense forces, <<print commaNum(Math.trunc($troopCount))>> strong, clashed with them <<if $battleTerrain == "urban">> in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, <<elseif $battleTerrain == "rural">> @@ -149,7 +149,7 @@ in the wastelands outside the free city territory, <</if>> <<if $enemyLosses != $attackTroops>> - inflicting <<print $enemyLosses>> casualties, while sustaining <<if $losses > 1>> <<print commaNum(Math.trunc($losses))>> casualties <<elseif $losses > 0>> a casualty <<else>> zero <</if>> themselves. + inflicting <<print commaNum(Math.trunc($enemyLosses))>> casualties, while sustaining <<if $losses > 1>> <<print commaNum(Math.trunc($losses))>> casualties <<elseif $losses > 0>> a casualty <<else>> zero <</if>> themselves. <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print commaNum(Math.trunc($losses))>> casualties. <<elseif $losses > 0>> a casualty. <<else>> zero casualties.<</if>> <</if>> @@ -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 >= 1 && $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 >= 1 && $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 >= 1 && $SFIntervention>> commander and neither are your soldiers. <<else>> commander. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander and neither are your soldiers. <<else>> commander. <</if>> - <<elseif $deployingMercs == 1 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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" && $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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 $SFIntervention == 1>> + <<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,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 >= 1 && $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 && $SF.Active >= 1 && ($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 && $SatLaunched > 0>> + The $SF.Lower satellite's 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..d25dcdca15f0d7e3e5692fde9d64bb896027f6bc 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 >= 1 && $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 63252ce0419b777a7d13540cd45379cbfff0ac9a..ad04f902add45b146ba8b71633e29fee0aa6b764 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 && $SF.Active >= 1 && $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 >= 1 && $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..57ced876ffcaab068dceaa35f4f295e1585f1af8 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 >= 1>> <<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>> @@ -319,25 +318,25 @@ __Difficulty__: <br> <br> __Army__: -<br>troops: <<print $troopCount>> -<br>attack: <<print Math.round(_attack)>> -<br>defense: <<print Math.round(_defense)>> +<br>troops: <<print commaNum(Math.round($troopCount))>> +<br>attack: <<print commaNum(Math.round(_attack))>> +<br>defense: <<print commaNum(Math.round(_defense))>> <br>engagement rule modifier: <<if _engageMod > 0>>+<</if>><<print _engageMod>>% -<br>Hp: <<print Math.round(_hp)>> -<br>base HP: <<print Math.round(_baseHp)>> -<br>morale: <<print Math.round(_morale)>> +<br>Hp: <<print commaNum(Math.round(_hp))>> +<br>base HP: <<print commaNum(Math.round(_baseHp))>> +<br>morale: <<print commaNum(Math.round(_morale))>> <<if _enemyMoraleTroopMod > 0>> <br>morale increase due to troop numbers: +<<print _moraleTroopMod>>% <</if>> <br> <br> __Rebels__: -<br>enemy troops: <<print $attackTroops>> -<br>enemy attack: <<print Math.round(_enemyAttack)>> -<br>enemy defense: <<print Math.round(_enemyDefense)>> -<br>enemy Hp: <<print Math.round(_enemyHp)>> -<br>enemy base Hp: <<print Math.round(_enemyBaseHp)>> -<br>enemy morale: <<print Math.round(_enemyMorale)>> +<br>enemy troops: <<print commaNum(Math.round($attackTroops))>> +<br>enemy attack: <<print commaNum(Math.round(_enemyAttack))>> +<br>enemy defense: <<print commaNum(Math.round(_enemyDefense))>> +<br>enemy Hp: <<print commaNum(Math.round(_enemyHp))>> +<br>enemy base Hp: <<print commaNum(Math.round(_enemyBaseHp))>> +<br>enemy morale: <<print commaNum(Math.round(_enemyMorale))>> <<if _enemyMoraleTroopMod > 0>> <br>enemy morale increase due to troop numbers: +<<print _enemyMoraleTroopMod>>% <</if>> @@ -351,15 +350,15 @@ __Rebels__: /* player army attacks */ <<set _damage = Math.clamp(_attack - _enemyDefense,_attack * 0.1,_attack)>> <br> - <<if $showBattleStatistics == 1>> player damage: <<print Math.round(_damage)>><</if>> + <<if $showBattleStatistics == 1>> player damage: <<print commaNum(Math.round(_damage))>><</if>> <<set _enemyHp -= _damage>> <br> - <<if $showBattleStatistics == 1>> remaining enemy Hp: <<print Math.round(_enemyHp)>><</if>> + <<if $showBattleStatistics == 1>> remaining enemy Hp: <<print commaNum(Math.round(_enemyHp))>><</if>> <<set $enemyLosses += _damage / _enemyBaseHp>> <<set _moraleDamage = Math.clamp(_damage/ 2 + _damage / _enemyBaseHp,0,_damage*1.5)>> <<set _enemyMorale -= _moraleDamage>> <br> - <<if $showBattleStatistics == 1>> remaining enemy morale: <<print Math.round(_enemyMorale)>><</if>> + <<if $showBattleStatistics == 1>> remaining enemy morale: <<print commaNum(Math.round(_enemyMorale))>><</if>> <<if _enemyHp <= 0 || _enemyMorale <= 0>> <<if $showBattleStatistics == 1>> <br>Victory!<</if>> <<set $battleResult = 3>> @@ -373,15 +372,16 @@ __Rebels__: <<set _damage = _enemyAttack * 0.1>> <</if>> <br> - <<if $showBattleStatistics == 1>> enemy damage: <<print Math.round(_damage)>><</if>> - <<set _hp -= _damage>> + <<if $showBattleStatistics == 1>> enemy damage: <<print commaNum(Math.round(_damage))>><</if>> + <<if $SFGear>> <<set _S = .85>> <<else>> <<set _S = 1>> <</if>> + <<set _hp -= _damage*_S>> <br> - <<if $showBattleStatistics == 1>> remaining hp: <<print Math.round(_hp)>><</if>> + <<if $showBattleStatistics == 1>> remaining hp: <<print commaNum(Math.round(_hp))>><</if>> <<set $losses += _damage / _baseHp>> <<set _moraleDamage = Math.clamp(_damage / 2 + _damage / _baseHp,0,_damage*1.5)>> <<set _morale -= _moraleDamage>> <br> - <<if $showBattleStatistics == 1>> remaining morale: <<print Math.round(_morale)>><</if>> + <<if $showBattleStatistics == 1>> remaining morale: <<print commaNum(Math.round(_morale))>><</if>> <<if _hp <= 0 || _morale <= 0>> <<if $showBattleStatistics == 1>> <br>Defeat!<</if>> <<set $battleResult = -3>> diff --git a/src/SecExp/rebellionOptions.tw b/src/SecExp/rebellionOptions.tw index cb0035eface5921beb55d2d20c33c3173b09369f..91c470b22cd01b36d61caa6d88360e80de86d8c2 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 >= 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 $securityForceActive == 1>>and <<print commaNum($securityForceName, $securityForcePersonnel)>> 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/rebellionReport.tw b/src/SecExp/rebellionReport.tw index cc7d21844c8f93de765793122b0a2f56ed3a6d33..c5195debe8728415c6d8066dfd2a197e26fc2449 100644 --- a/src/SecExp/rebellionReport.tw +++ b/src/SecExp/rebellionReport.tw @@ -1,7 +1,6 @@ :: rebellionReport [nobr] <<set $nextButton = "Continue", $nextLink = "Scheduled Event", $showEncyclopedia = 1, $encyclopedia = "Battles">> - <<set _oldRep = $rep>> <<set _oldAuth = $authority>> <<set $enemyLosses = Math.trunc($enemyLosses)>> @@ -89,6 +88,9 @@ <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print commaNum(Math.trunc($losses))>> casualties <<else>> a casualty.<</if>> <</if>> + <<if $SFGear>> + More units were able to survive thanks to wearining $SF.Lower's combat armour suits. + <</if>> <<set $ASlaves -= $enemyLosses>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> @@ -183,6 +185,9 @@ <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print commaNum(Math.trunc($losses))>> casualties <<else>> a casualty.<</if>> <</if>> + <<if $SFGear>> + More units were able to survive thanks to wearining $SF.Lower's combat armour suits. + <</if>> <<set $ASlaves -= $enemyLosses>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> diff --git a/src/SecExp/riotControlCenter.tw b/src/SecExp/riotControlCenter.tw index dc773834bb99aa0ac8ca775f59d7fdae756ef623..43d7f51035ffbb39ba25dd828207f24405a9a963 100644 --- a/src/SecExp/riotControlCenter.tw +++ b/src/SecExp/riotControlCenter.tw @@ -206,3 +206,12 @@ The riot control center opens its guarded doors to you. The great chamber inside <<else>> You have installed additional protection layers and redundant systems in the assistant CPU core. <</if>> + +<<if $SF.Toggle && $SF.Active >= 1>> + <<if $SFSupportLevel >= 4 && !$SFGear && $SFUnit.Armoury >= 8>> <<= Count()>> + <br><br> <<link "Give the riot unit access to the combat armour suits of $SF.Lower.""riotControlCenter">> <<set $SFGear = 1,$riotUpkeep += 15000,$cash -= Math.ceil(500000*_Env*(1.15+($SFUnit.Armoury/10)))>> <</link>> + <br>//Costs <<print cashFormat(Math.ceil(500000*_Env*(1.15+($SFUnit.Armoury/10))))>> + <<else>> + <br><br>//You have given the riot unit access to the combat armour suits of $SF.Lower.// + <</if>> +<</if>> \ No newline at end of file diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw index c621fb3f53857f4b231f3651d05dfae0c45330c6..5bfe8cd772deae362f378241ec6923ed00f105bb 100644 --- a/src/SecExp/secBarracks.tw +++ b/src/SecExp/secBarracks.tw @@ -48,12 +48,11 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s <br> <br> <<if $secBarracksUpgrades.size < 5>> - <<link "Increase the size of the barracks">> + <<link "Increase the size of the barracks" "secBarracks">> <<set $cash -= 5000 * ($secBarracksUpgrades.size + 1)>> <<set $secBarracksUpgrades.size += 1>> <<set $maxUnits += 2>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(5000 * ($secBarracksUpgrades.size + 1))>> and will increase the maximum number of units by 2.// <<else>> @@ -61,35 +60,31 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s <</if>> <br> <<if $secBarracksUpgrades.luxury == 0>> - <<link "Increase the quality of life of your soldiers by installing high tech furniture and appliances.">> + <<link "Increase the quality of life of your soldiers by installing high tech furniture and appliances." "secBarracks">> <<set $secBarracksUpgrades.luxury += 1>> <<set $cash -= 5000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(5000)>> and will provide a 5% bonus to morale.// <<elseif $secBarracksUpgrades.luxury == 1>> - <<link "Further increase the quality of life of your soldiers by installing advanced kitchen equipment and hiring skilled chefs.">> + <<link "Further increase the quality of life of your soldiers by installing advanced kitchen equipment and hiring skilled chefs." "secBarracks">> <<set $secBarracksUpgrades.luxury += 1>> <<set $cash -= 10000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(10000)>> and will provide a 5% bonus to morale, for a total of +10%.// <<elseif $secBarracksUpgrades.luxury == 2>> - <<link "Further increase the quality of life of your soldiers by providing high speed, free access to digital media">> + <<link "Further increase the quality of life of your soldiers by providing high speed, free access to digital media" "secBarracks">> <<set $secBarracksUpgrades.luxury += 1>> <<set $cash -= 10000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(10000)>> and will provide a 5% bonus to morale, for a total of +15%.// <<elseif $secBarracksUpgrades.luxury == 3>> - <<link "Further increase the quality of life of your soldiers by adding and staffing an exclusive brothel to the structure">> + <<link "Further increase the quality of life of your soldiers by adding and staffing an exclusive brothel to the structure" "secBarracks">> <<set $secBarracksUpgrades.luxury += 1>> <<set $cash -= 15000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(15000)>> and will provide a 5% bonus to morale, for a total of +20%.// <<else>> @@ -97,19 +92,17 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s <</if>> <br> <<if $secBarracksUpgrades.training == 0>> - <<link "Add a training facility to the barracks">> + <<link "Add a training facility to the barracks" "secBarracks">> <<set $secBarracksUpgrades.training += 1>> <<set $cash -= 10000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(10000)>> and will allow units to accumulate some experience each week.// <<elseif $secBarracksUpgrades.training == 1>> - <<link "Improve the training facility with modern equipment and skilled personnel">> + <<link "Improve the training facility with modern equipment and skilled personnel" "secBarracks">> <<set $secBarracksUpgrades.training += 1>> <<set $cash -= 20000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(20000)>> and will allow units to accumulate experience each week.// <<else>> @@ -117,19 +110,17 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s <</if>> <br> <<if $secBarracksUpgrades.loyaltyMod == 0>> - <<link "Add an indoctrination facility to the barracks">> + <<link "Add an indoctrination facility to the barracks" "secBarracks">> <<set $secBarracksUpgrades.loyaltyMod += 1>> <<set $cash -= 10000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(10000)>> and will slowly raise loyalty of all units// <<elseif $secBarracksUpgrades.loyaltyMod == 1>> - <<link "Improve the indoctrination facility with advanced equipment and skilled personnel">> + <<link "Improve the indoctrination facility with advanced equipment and skilled personnel" "secBarracks">> <<set $secBarracksUpgrades.loyaltyMod += 1>> <<set $cash -= 20000>> <<set $secBarracksUpkeep += $upgradeUpkeep>> - <<goto "secBarracks">> <</link>> <br>//Costs <<print cashFormat(20000)>> and will raise loyalty of all units faster.// <<else>> @@ -139,45 +130,35 @@ 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 $activeUnits >= $maxUnits>> + <br>You have reached the maximum number of units. You'll have to disband one or enlarge the barracks before forming a new unit. +<</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> <<replenishAllUnits>> -<br> -<br> +<<if $secBots.active === 1>> <br><br> __Security Drones__ /* drones */ <<if $secBots.active == 1>> <br> <<secBotsDescription>> <br> - <<link "Review Equipment and upgrades">> + <<link "Review Equipment and upgrades" "seeUnit">> <<set $targetUnit = "secBots">> - <<goto "seeUnit">> <</link>> <<if $secBots.troops < $secBots.maxTroops>> | - <<link "Replenish the unit">> + <<link "Replenish the unit" "secBarracks">> <<set $cash -= ($secBots.maxTroops - $secBots.troops) * $secBotsCost>> <<set $secBots.troops = $secBots.maxTroops>> - <<goto "secBarracks">> <</link>> <</if>> -<<else>> - You have lost too many security drones to be able to field them again. - <<link "Reform the unit">> - <<set $cash -= $secBots.maxTroops * $secBotsCost>> - <<set $secBots.troops = $secBots.maxTroops>> - <<set $secBots.active = 1>> - <<goto "secBarracks">> - <</link>> +<</if>> <</if>> -<br> -<br> - -__Slaves__ +<br><br>__Slaves__ <br>/* slaves */ You are free to organize your menial slaves into fighting units. Currently you have <<print commaNum($helots)>> slaves available, while <<print commaNum($slavesEmployedManpower)>> are already employed as soldiers. During all your battles you lost a total of <<print commaNum($slavesTotalCasualties)>>. <<silently>><<= MenialPopCap()>><</silently>> @@ -202,7 +183,7 @@ You are free to organize your menial slaves into fighting units. Currently you h <<set _sL = $slaveUnits.length>> <<if $helots > 0 && $activeUnits < $maxUnits>> <br> - <<link "Form a new unit">> + <<link "Form a new unit" "secBarracks">> <<if $createdSlavesUnits == 0>> <<set _name = (1+$createdSlavesUnits) + "st slave platoon">> <<elseif $createdSlavesUnits == 1>> @@ -256,12 +237,7 @@ You are free to organize your menial slaves into fighting units. Currently you h <<set $createdSlavesUnits++>> <</if>> <<set $activeUnits++>> - <<goto "secBarracks">> <</link>> -<<elseif $helots > 0>> - You have reached the maximum number of units. You'll have to disband one or enlarge the barracks before forming a new unit. -<<elseif $activeUnits < $maxUnits>> - You don't have any free menial slave with which to form a new unit. <</if>> <<for _i = 0; _i < _sL; _i++>> <<capture _i>> @@ -270,22 +246,20 @@ You are free to organize your menial slaves into fighting units. Currently you h <br> <<slaveUnitsDescription $slaveUnits[_i]>> <br> - <<link "Disband the unit">> + <<link "Disband the unit" "secBarracks">> <<set $helots += $slaveUnits[_i].troops>> <<set $slavesEmployedManpower -= $slaveUnits[_i].troops>> <<set $slaveUnits.deleteAt(_i)>> <<set $activeUnits-->> - <<goto "secBarracks">> <</link>> | - <<link "Review Equipment and upgrades">> + <<link "Review Equipment and upgrades" "seeUnit">> <<set $targetUnit = "slaveUnits">> <<set $targetIndex = _i>> - <<goto "seeUnit">> <</link>> | <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $helots > 0>> - <<link "Replenish unit">> + <<link "Replenish unit" "secBarracks">> <<if $helots >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> <<set $helots -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> <<set $slavesEmployedManpower += $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> @@ -299,16 +273,15 @@ You are free to organize your menial slaves into fighting units. Currently you h <<set $slaveUnits[_i].troops += $helots>> <<set $helots = 0>> <</if>> - <<goto "secBarracks">> <</link>> <</if>> - + <<else>> <br> <br> $slaveUnits[_i].platoonName lost too many operatives to be considered active. <br> - <<link "Disband the unit">> + <<link "Disband the unit" "secBarracks">> <<set _elimUnit = $slaveUnits[_i]>> <<set _newSlaveUnits = []>> <<for _y = 0; _y < _sL; _y++>> @@ -318,11 +291,10 @@ You are free to organize your menial slaves into fighting units. Currently you h <</for>> <<set $slaveUnits = _newSlaveUnits>> <<set $activeUnits-->> - <<goto "secBarracks">> <</link>> | <<if $helots > 0>> - <<link "Reform the unit">> + <<link "Reform the unit" "secBarracks">> <<if $helots >= $slaveUnits[_i].maxTroops>> <<set $slavesEmployedManpower += $slaveUnits[_i].maxTroops>> <<set $helots -= $slaveUnits[_i].maxTroops>> @@ -335,7 +307,6 @@ You are free to organize your menial slaves into fighting units. Currently you h <<set $slaveUnits[_i].training = 0>> <</if>> <<set $slaveUnits[_i].active = 1>> - <<goto "secBarracks">> <</link>> <</if>> <</if>> @@ -354,13 +325,13 @@ __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>> <br> - <<link "Form a new unit">> + <<link "Form a new unit" "secBarracks">> <<if $createdMilitiaUnits == 0>> <<set _name = (1+$createdMilitiaUnits) + "st citizens' platoon">> <<elseif $createdMilitiaUnits == 1>> @@ -414,12 +385,7 @@ __Militia__ <<set $createdMilitiaUnits++>> <</if>> <<set $activeUnits++>> - <<goto "secBarracks">> <</link>> - <<elseif $militiaFreeManpower > 0>> - You have reached the maximum number of units. You'll have to disband one or enlarge the barracks before forming a new unit. - <<elseif $activeUnits < $maxUnits>> - You don't have any free recruits with which to form a new unit. <</if>> <<for _i = 0; _i < _mL; _i++>> <<capture _i>> @@ -428,22 +394,20 @@ __Militia__ <br> <<militiaUnitsDescription $militiaUnits[_i]>> <br> - <<link "Disband the unit">> + <<link "Disband the unit" "secBarracks">> <<set $militiaFreeManpower += $militiaUnits[_i].troops>> <<set $militiaEmployedManpower -= $militiaUnits[_i].troops>> <<set $militiaUnits.deleteAt(_i)>> <<set $activeUnits-->> - <<goto "secBarracks">> <</link>> | - <<link "Review Equipment and upgrades">> + <<link "Review Equipment and upgrades" "seeUnit">> <<set $targetUnit = "militiaUnits">> <<set $targetIndex = _i>> - <<goto "seeUnit">> <</link>> | <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> - <<link "Replenish unit">> + <<link "Replenish unit" "secBarracks">> <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> <<set $militiaEmployedManpower += $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> @@ -457,7 +421,6 @@ __Militia__ <<set $militiaUnits[_i].troops += $militiaFreeManpower>> <<set $militiaFreeManpower = 0>> <</if>> - <<goto "secBarracks">> <</link>> <</if>> <<else>> @@ -465,7 +428,7 @@ __Militia__ <br> $militiaUnits[_i].platoonName lost too many operatives to be considered active. <br> - <<link "Disband the unit">> + <<link "Disband the unit" "secBarracks">> <<set $militiaFreeManpower += $militiaUnits[_i].troops>> <<set $militiaEmployedManpower -= $militiaUnits[_i].troops>> <<set _elimUnit = $militiaUnits[_i]>> @@ -477,11 +440,10 @@ __Militia__ <</for>> <<set $militiaUnits = _newMilitiaUnits>> <<set $activeUnits-->> - <<goto "secBarracks">> <</link>> | <<if $militiaFreeManpower > 0>> - <<link "Reform the unit">> + <<link "Reform the unit" "secBarracks">> <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops>> <<set $militiaEmployedManpower += $militiaUnits[_i].maxTroops>> <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops>> @@ -494,7 +456,6 @@ __Militia__ <<set $militiaUnits[_i].training = 0>> <</if>> <<set $militiaUnits[_i].active = 1>> - <<goto "secBarracks">> <</link>> <</if>> <</if>> @@ -518,7 +479,7 @@ __Mercenaries__ <<set _meL = $mercUnits.length>> <<if $mercFreeManpower > 0 && $activeUnits < $maxUnits>> <br> - <<link "Form a new unit">> + <<link "Form a new unit" "secBarracks">> <<if $createdMercUnits == 0>> <<set _name = (1+$createdMercUnits) + "st mercenary platoon">> <<elseif $createdMercUnits == 1>> @@ -572,12 +533,7 @@ __Mercenaries__ <<set $createdMercUnits++>> <</if>> <<set $activeUnits++>> - <<goto "secBarracks">> <</link>> - <<elseif $mercFreeManpower > 0>> - You have reached the maximum number of units. You'll have to disband one or enlarge the barracks before forming a new unit. - <<elseif $activeUnits < $maxUnits>> - You don't have any free mercenaries with which to form a new unit. <</if>> <<for _i = 0; _i < _meL; _i++>> <<capture _i>> @@ -586,22 +542,20 @@ __Mercenaries__ <br> <<mercUnitsDescription $mercUnits[_i]>> <br> - <<link "Disband the unit">> + <<link "Disband the unit" "secBarracks">> <<set $mercFreeManpower += $mercUnits[_i].troops>> <<set $mercEmployedManpower -= $mercUnits[_i].troops>> <<set $mercUnits.deleteAt(_i)>> <<set $activeUnits-->> - <<goto "secBarracks">> <</link>> | - <<link "Review Equipment and upgrades">> + <<link "Review Equipment and upgrades" "seeUnit">> <<set $targetUnit = "mercUnits">> <<set $targetIndex = _i>> - <<goto "seeUnit">> <</link>> | <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> - <<link "Replenish unit">> + <<link "Replenish unit" "secBarracks">> <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> <<set $mercEmployedManpower += $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> @@ -615,16 +569,15 @@ __Mercenaries__ <<set $mercUnits[_i].troops += $mercFreeManpower>> <<set $mercFreeManpower = 0>> <</if>> - <<goto "secBarracks">> <</link>> <</if>> - + <<else>> <br> <br> $mercUnits[_i].platoonName lost too many operatives to be considered active. <br> - <<link "Disband the unit">> + <<link "Disband the unit" "secBarracks">> <<set _elimUnit = $mercUnits[_i]>> <<set _newMercUnits = []>> <<for _y = 0; _y < _sL; _y++>> @@ -634,11 +587,10 @@ __Mercenaries__ <</for>> <<set $mercUnits = _newMercUnits>> <<set $activeUnits-->> - <<goto "secBarracks">> <</link>> | <<if $mercFreeManpower > 0>> - <<link "Reform the unit">> + <<link "Reform the unit" "secBarracks">> <<if $mercFreeManpower >= $mercUnits[_i].maxTroops>> <<set $mercEmployedManpower += $mercUnits[_i].maxTroops>> <<set $mercFreeManpower -= $mercUnits[_i].maxTroops>> @@ -651,7 +603,6 @@ __Mercenaries__ <<set $mercUnits[_i].training = 0>> <</if>> <<set $mercUnits[_i].active = 1>> - <<goto "secBarracks">> <</link>> <</if>> <</if>> diff --git a/src/SecExp/secExpSmilingMan.tw b/src/SecExp/secExpSmilingMan.tw index d96c7dee9feff0bc724ad42af38c9bea2c7fddab..60c06553719e875202f6d74765e771757bb234c1 100644 --- a/src/SecExp/secExpSmilingMan.tw +++ b/src/SecExp/secExpSmilingMan.tw @@ -1,11 +1,11 @@ :: secExpSmilingMan [nobr] - + <strong>The Smiling Man</strong> <br> <<if $smilingManProgress == 0>> <<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">> - + <br> During your morning routine, you stumble upon a peculiar report: it's been several weeks now that your arcology has been victim of a series of cyber-crimes conducted by a mysterious figure. The egocentric criminal took great pride in their acts, to the point of signing his acts with their peculiar symbol: a stylized smiling face. Your arcology was not the only one under assault by the @@ -63,7 +63,7 @@ <<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">> <br> - You have just reached your penthouse when your faithful assistant appears in front of you, evidently excited. + You have just reached your penthouse when your faithful assistant appears in front of you, evidently excited. "<<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Sir<<else>>Ma'am<</if>>, I have just received news of a new attack by the Smiling Man. It appears a few hours ago he infiltrated another arcology and caused a catastrophic failure of its power plant. Between old debts and the loss of value for his shares, the owner went bankrupt in minutes. It seems the Smiling Man managed to keep a small auxiliary generator functioning enough to project a giant holographic picture of his symbol on the arcology's walls. Say what you will about his actions, but you can't deny he has style... Anyways, this opens up a great opportunity to gain control of the structure for ourselves." @@ -130,7 +130,7 @@ </span> <<elseif $smilingManProgress == 2>> <<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">> - + <br> <<set $smilingManWeek = $week>> When $assistantName violently wakes you up, her worried expression can mean only one thing: the Smiling Man had been back. "Today at midnight a new site popped up in the web: it's a very simple site, no visuals, no text; only a countdown ticking away. It will reach zero this evening." your assistant says. @@ -196,7 +196,7 @@ <<set $security = Math.clamp($security * 0.2,0,100)>> <<set $crime = Math.clamp($crime * 1.5, 20,100)>> <</if>> - + <br>A short, meek man approaches you with a weak smile. "Not all is lost, <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>. We have a lead on him - he is here, in $arcologies[0].name." <br>Despite the bleak situation, you cannot help but smile back. <br> @@ -237,7 +237,7 @@ </span> <<elseif $smilingManProgress == 3>> <<set $nextButton = " ">> - + <br> The day has come to finally put an end to this story. Your men are ready to go, waiting only on your signal. You quickly don your protective gear and proceed down the busy streets of your arcology. You carefully planned the day so that nothing could exit the arcology without being scanned at least three times and poked twice. The Smiling Man has no escape. @@ -257,7 +257,7 @@ <<link "Offer her a new life">> <<set $smilingManFate = 0>> <<replace "#result">> - You decide it would a criminally wasteful to throw away such talent. You offer her a new life at your side. Her expertise will surely guarantee safety, if not supremacy, to your arcology in cyberspace, while she will have safety and luxury in the physical world. + You decide it would be criminally wasteful to throw away such talent. You offer her a new life at your side. Her expertise will surely guarantee safety, if not supremacy, to your arcology in cyberspace, while she will have safety and luxury in the physical world. <br> <<link "Continue">> <<set $smilingManProgress += 1>> diff --git a/src/SecExp/secInit.tw b/src/SecExp/secInit.tw index 97535043e2b85ff5b0b6591adb63e836d505e0da..84654fea324a557daadaa58dc5aa99f3cf083d91 100644 --- a/src/SecExp/secInit.tw +++ b/src/SecExp/secInit.tw @@ -342,6 +342,9 @@ /* SFanon additons */ <<set $SFSupportLevel = 0>> <<set $SFSupportUpkeep = 0>> +<<set $SFGear = 0>> +<<set $SavedLeader = "none">> +<<set $SavedSFI = 0>> /* helper widgets */ <<calcInitialTrade>> \ No newline at end of file diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw index 40d44e15172e84ffb1cd3a35e3e69dd31291700c..891363eee5641aa116f398864c713720319fab5f 100644 --- a/src/SecExp/securityHQ.tw +++ b/src/SecExp/securityHQ.tw @@ -15,7 +15,7 @@ Security headquarters The security headquarters stand in front of you. Innumerable screens flood with light the great central room. <<if $secHelots > 0>>Some slaves see you enter and interrupt their work to greet you.<</if>> From here you can build a safe and prosperous arcology. <br> /* security level. Slaves */ -You have <span id="secHel"><<print $secHelots>></span> slaves working in the HQ. $reqHelots are required and you have <span id="hel"><<print commaNum($helots)>></span> free menial slaves. +You have <span id="secHel"> <<print commaNum($secHelots)>> </span> slaves working in the HQ. $reqHelots are required and you have <span id="hel"> <<print commaNum($helots)>> </span> free menial slaves. <<if $secHelots < $reqHelots>> You do not have enough slaves here. You will not receive the full benefit of the installed upgrades. <<else>> @@ -39,40 +39,141 @@ You have <span id="secHel"><<print $secHelots>></span> slaves working in the HQ. //Bulk purchases will cost <<print cashFormat(200)>> over market price.// <</if>> <</if>> -<br> -<<if $helots >= 5>> - <<link "Transfer 5 menial slaves to the headquarters">> - <<set $helots -= 5>> - <<set $secHelots += 5>> - <<replace "#secHel">><<print $secHelots>><</replace>> - <<replace "#hel">><<print $helots>><</replace>> - <<if $helots < 5 || $secHelots >= $reqHelots || $secHelots == 5>> - <<goto "securityHQ">> +<<if $helots > 0>> + <br>Transfer in: + <<if $helots >= 5>> + <<link "5">> + <<set $helots -= 5>> + <<set $secHelots += 5>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $helots < 5 || $secHelots >= $reqHelots || $secHelots == 5>> + <<goto "securityHQ">> + <</if>> + <</link>> + <</if>> + <<if $helots >= 10>> + |<<link "10">> + <<set $helots -= 10>> + <<set $secHelots += 10>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $helots < 10 || $secHelots >= $reqHelots || $secHelots == 10>> + <<goto "securityHQ">> + <</if>> + <</link>> + <</if>> + <<if $helots >= 100>> + |<<link "100">> + <<set $helots -= 100>> + <<set $secHelots += 100>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $helots < 100 || $secHelots >= $reqHelots || $secHelots == 100>> + <<goto "securityHQ">> + <</if>> + <</link>> + <</if>> + <<if $helots >= 500>> + |<<link "500">> + <<set $helots -= 500>> + <<set $secHelots += 500>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $helots < 500 || $secHelots >= $reqHelots || $secHelots == 500>> + <<goto "securityHQ">> + <</if>> + <</link>> + <</if>> + <<if $helots >= 1000>> + |<<link "1000">> + <<set $helots -= 1000>> + <<set $secHelots += 1000>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $helots < 1000 || $secHelots >= $reqHelots || $secHelots == 1000>> + <<goto "securityHQ">> + <</if>> + <</link>> + <</if>> + + <<if $secHelots > 0>> + <br>Transfer out + <<if $secHelots >= 5>> + <<link "5">> + <<set $helots += 5>> + <<set $secHelots -= 5>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $secHelots < 5>> + <<goto "securityHQ">> + <</if>> + <<if $secHelots < $reqHelots>> + <<goto "securityHQ">> + <</if>> + <</link>> <</if>> - <</link>> -<<else>> - Transfer 5 menial slaves to the headquarters -<</if>> -| -<<if $secHelots >= 5>> - <<link "Transfer out 5 slaves">> - <<set $helots += 5>> - <<set $secHelots -= 5>> - <<replace "#secHel">><<print $secHelots>><</replace>> - <<replace "#hel">><<print $helots>><</replace>> - <<if $secHelots < 5>> - <<goto "securityHQ">> + <<if $secHelots >= 10>> + |<<link "10">> + <<set $helots += 10>> + <<set $secHelots -= 10>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $secHelots < 10>> + <<goto "securityHQ">> + <</if>> + <<if $secHelots < $reqHelots>> + <<goto "securityHQ">> + <</if>> + <</link>> <</if>> - <<if $secHelots < $reqHelots>> - <<goto "securityHQ">> + <<if $secHelots >= 100>> + |<<link "100">> + <<set $helots += 100>> + <<set $secHelots -= 100>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $secHelots < 100>> + <<goto "securityHQ">> + <</if>> + <<if $secHelots < $reqHelots>> + <<goto "securityHQ">> + <</if>> + <</link>> <</if>> - <</link>> -<<else>> - Transfer out 5 slaves + <<if $secHelots >= 500>> + |<<link "500">> + <<set $helots += 500>> + <<set $secHelots -= 500>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $secHelots < 500>> + <<goto "securityHQ">> + <</if>> + <<if $secHelots < $reqHelots>> + <<goto "securityHQ">> + <</if>> + <</link>> + <</if>> + <<if $secHelots >= 1000>> + |<<link "1000">> + <<set $helots += 1000>> + <<set $secHelots -= 1000>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $secHelots < 1000>> + <<goto "securityHQ">> + <</if>> + <<if $secHelots < $reqHelots>> + <<goto "securityHQ">> + <</if>> + <</link>> + <</if>> + <</if>> <</if>> -| + <<if $secHelots != $reqHelots>> - <<link "Match the requirement">> + <br><<link "Match the requirement">> <<if $helots >= $reqHelots - $secHelots>> <<set $helots -= $reqHelots - $secHelots>> <<set $secHelots = $reqHelots>> @@ -89,12 +190,9 @@ You have <span id="secHel"><<print $secHelots>></span> slaves working in the HQ. <<goto "securityHQ">> <</if>> <</link>> -<<else>> - Match the requirement <</if>> -<br> -<br> +<br><br> /* security level and upgrades */ Your security level (@@.deepskyblue;<<print $security>>@@) diff --git a/src/SecExp/securityReport.tw b/src/SecExp/securityReport.tw index 907982fccb2f0e68b612c85fe340ddfead37b9df..a4f4ca56d5a7a57764db2cc12f1fc6f0278fdf72 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 >= 1>> + <<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 >= 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>> <<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 >= 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>> <<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..e44e03e59f439acb8d995cd47e0bc17fb9f5102c 100644 --- a/src/SecExp/seeUnit.tw +++ b/src/SecExp/seeUnit.tw @@ -10,42 +10,38 @@ <<secBotsDescription>> <<if $secBots.maxTroops > $secBots.troops>> <br> - <<link "Replenish the unit">> + <<link "Replenish the unit" "seeUnit">> <<set $cash -= ($secBots.maxTroops - $secBots.troops) * $secBotsCost>> <<set $secBots.troops = $secBots.maxTroops>> - <<goto "seeUnit">> <</link>> <</if>> <br> <<if $secBots.maxTroops < 80>> <br> - <<link "Improve the digital control matrix">> + <<link "Improve the digital control matrix" "seeUnit">> <<set $secBots.maxTroops += 10>> <<set $cash -= 5000>> - <<goto "seeUnit">> <</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 >= 1 && $secBots.maxTroops < 100 && $SFSupportLevel >= 1>> <br> - <<link "Refine the drone network with $securityForceName assistance">> + <<link "Refine the drone network with $SF.Lower assistance" "seeUnit">> <<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 >= 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. <</if>> <<if $secBots.equip < 3>> <br> - <<link "Improve drone weaponry and armor">> + <<link "Improve drone weaponry and armor" "seeUnit">> <<set $secBots.equip += 1>> <<set $cash -= (($secBotsUpgradeCost * $secBots.maxTroops) + 1000)>> - <<goto "seeUnit">> <</link>> Invest in better equipment for your drones to increase their battle effectiveness. <br>//Costs <<print cashFormat(($secBotsUpgradeCost * $secBots.maxTroops) + 1000)>> and will increase attack and defense value of the unit by 15% for every upgrade.// @@ -67,7 +63,7 @@ Rename unit <<textbox "$militiaUnits[$targetIndex].platoonName" $militiaUnits[$targetIndex].platoonName "seeUnit">> <<if $militiaUnits[$targetIndex].maxTroops > $militiaUnits[$targetIndex].troops && $militiaFreeManpower > 0>> <br> - <<link "Replenish unit">> + <<link "Replenish unit" "seeUnit">> <<if $militiaFreeManpower >= $militiaUnits[$targetIndex].maxTroops - $militiaUnits[$targetIndex].troops>> <<set $militiaFreeManpower -= $militiaUnits[$targetIndex].maxTroops - $militiaUnits[$targetIndex].troops>> <<set $militiaEmployedManpower += $militiaUnits[$targetIndex].maxTroops - $militiaUnits[$targetIndex].troops>> @@ -81,16 +77,14 @@ <<set $militiaUnits[$targetIndex].troops += $militiaFreeManpower>> <<set $militiaFreeManpower = 0>> <</if>> - <<goto "seeUnit">> <</link>> <</if>> <br> <<if $militiaUnits[$targetIndex].maxTroops < 50>> <br> - <<link "Intensive officers training">> + <<link "Intensive officers training" "seeUnit">> <<set $militiaUnits[$targetIndex].maxTroops += 10>> <<set $cash -= 5000 + 10 * $equipUpgradeCost * ($militiaUnits[$targetIndex].equip + $militiaUnits[$targetIndex].commissars + $militiaUnits[$targetIndex].cyber + $militiaUnits[$targetIndex].SF)>> - <<goto "seeUnit">> <</link>> Invest in the training of your officers to increase the maximum number of soldiers in the unit. <br>//Costs <<print cashFormat(5000 + 10 * $equipUpgradeCost * ($militiaUnits[$targetIndex].equip + $militiaUnits[$targetIndex].commissars + $militiaUnits[$targetIndex].cyber + $militiaUnits[$targetIndex].SF))>> and will increase the max by 10// @@ -100,10 +94,9 @@ <</if>> <<if $militiaUnits[$targetIndex].equip < 3>> <br> - <<link "Improve weaponry and equipment">> + <<link "Improve weaponry and equipment" "seeUnit">> <<set $militiaUnits[$targetIndex].equip += 1>> <<set $cash -= ($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000>> - <<goto "seeUnit">> <</link>> Invest in better equipment for your soldiers to increase their battle effectiveness. <br>//Costs <<print cashFormat(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000)>> and will increase attack and defense value of the unit by 15% for every upgrade.// @@ -113,19 +106,17 @@ <</if>> <<if $militiaUnits[$targetIndex].commissars == 0>> <br> - <<link "Attach commissars to the unit">> + <<link "Attach commissars to the unit" "seeUnit">> <<set $militiaUnits[$targetIndex].commissars = 1>> <<set $cash -= $equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Attach a small squad of commissars to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000)>> and will slowly increase the loyalty of the unit.// <<elseif $militiaUnits[$targetIndex].commissars < 2>> <br> - <<link "Intensive loyalty training">> + <<link "Intensive loyalty training" "seeUnit">> <<set $militiaUnits[$targetIndex].commissars += 1>> <<set $cash -= $equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Provide special training for the officers and the commissars of the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000)>> and will increase the loyalty of the unit faster.// @@ -137,10 +128,9 @@ <<if $prostheticsUpgrade >= 2 || $researchLab.advCombatPLimb == 1>> <<if $militiaUnits[$targetIndex].cyber == 0>> <br> - <<link "Provide enhanced cybernetic enhancements">> + <<link "Provide enhanced cybernetic enhancements" "seeUnit">> <<set $militiaUnits[$targetIndex].cyber += 1>> <<set $cash -= $equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 2000>> - <<goto "seeUnit">> <</link>> Will augment all soldiers of the unit with high tech cyber enhancements. <br>//Costs <<print cashFormat(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 2000)>> and will increase attack, defense and base hp values of the unit.// @@ -150,28 +140,26 @@ <</if>> <<if $militiaUnits[$targetIndex].medics == 0>> <br> - <<link "Attach trained medics to the unit">> + <<link "Attach trained medics to the unit" "seeUnit">> <<set $militiaUnits[$targetIndex].medics = 1>> <<set $cash -= $equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Attach a small squad of trained medics to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000)>> and will decrease the number of casualties suffered during battle.// <<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 >= 1>> <<if $militiaUnits[$targetIndex].SF == 0>> <br> - <<link "Attach Special Force advisors">> + <<link "Attach Special Force advisors" "seeUnit">> <<set $militiaUnits[$targetIndex].SF = 1>> <<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>> @@ -227,7 +215,7 @@ Rename unit <<textbox "$slaveUnits[$targetIndex].platoonName" $slaveUnits[$targetIndex].platoonName "seeUnit">> <<if $slaveUnits[$targetIndex].maxTroops > $slaveUnits[$targetIndex].troops && $helots > 0>> <br> - <<link "Replenish unit">> + <<link "Replenish unit" "seeUnit">> <<if $helots >= $slaveUnits[$targetIndex].maxTroops - $slaveUnits[$targetIndex].troops>> <<set $helots -= $slaveUnits[$targetIndex].maxTroops - $slaveUnits[$targetIndex].troops>> <<set $slavesEmployedManpower += $slaveUnits[$targetIndex].maxTroops - $slaveUnits[$targetIndex].troops>> @@ -241,19 +229,17 @@ <<set $slaveUnits[$targetIndex].troops += $helots>> <<set $helots = 0>> <</if>> - <<goto "seeUnit">> <</link>> <</if>> <br> <<if $slaveUnits[$targetIndex].maxTroops < 50>> <br> - <<link "Intensive officers training">> + <<link "Intensive officers training" "seeUnit">> <<set $slaveUnits[$targetIndex].maxTroops += 10>> <<set $cash -= 5000 + 10 * $equipUpgradeCost * ($slaveUnits[$targetIndex].equip + $slaveUnits[$targetIndex].commissars + $slaveUnits[$targetIndex].cyber + $slaveUnits[$targetIndex].SF)>> - <<goto "seeUnit">> <</link>> Invest in the training of your officers to increase the maximum number of soldiers in the unit. - <br>//Costs <<print 5000 + 10 * $equipUpgradeCost * ($slaveUnits[$targetIndex].equip + $slaveUnits[$targetIndex].commissars + $slaveUnits[$targetIndex].cyber + $slaveUnits[$targetIndex].SF)>> and will increase the max by 10// + <br>//Costs <<print cashFormat(5000 + 10 * $equipUpgradeCost * ($slaveUnits[$targetIndex].equip + $slaveUnits[$targetIndex].commissars + $slaveUnits[$targetIndex].cyber + $slaveUnits[$targetIndex].SF))>> and will increase the max by 10// <<else>> <br>Your officers reached their peak. Further training will have little impact on the number of troops they can effectively lead. <</if>> @@ -271,19 +257,17 @@ <</if>> <<if $slaveUnits[$targetIndex].commissars == 0>> <br> - <<link "Attach commissars to the unit">> + <<link "Attach commissars to the unit" "seeUnit">> <<set $slaveUnits[$targetIndex].commissars = 1>> <<set $cash -= $equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Attach a small squad of commissars to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 1000)>> and will slowly increase the loyalty of the unit.// <<elseif $slaveUnits[$targetIndex].commissars < 2>> <br> - <<link "Intensive loyalty training">> + <<link "Intensive loyalty training" "seeUnit">> <<set $slaveUnits[$targetIndex].commissars += 1>> <<set $cash -= $equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Provide special training for the officers and the commissars of the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 1000)>> and will increase the loyalty of the unit faster.// @@ -295,10 +279,9 @@ <<if $prostheticsUpgrade >= 2 || $researchLab.advCombatPLimb == 1>> <<if $slaveUnits[$targetIndex].cyber == 0>> <br> - <<link "Provide enhanced cybernetic enhancements">> + <<link "Provide enhanced cybernetic enhancements" "seeUnit">> <<set $slaveUnits[$targetIndex].cyber += 1>> <<set $cash -= $equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 2000>> - <<goto "seeUnit">> <</link>> Will augment all soldiers of the unit with high tech cyber enhancements. <br>//Costs <<print cashFormat(($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 2000)>> and will increase attack, defense and base hp values of the unit.// @@ -308,28 +291,26 @@ <</if>> <<if $slaveUnits[$targetIndex].medics == 0>> <br> - <<link "Attach trained medics to the unit">> + <<link "Attach trained medics to the unit" "seeUnit">> <<set $slaveUnits[$targetIndex].medics = 1>> <<set $cash -= $equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Attach a small squad of trained medics to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 1000)>> and will decrease the number of casualties suffered during battle.// <<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 >= 1>> <<if $slaveUnits[$targetIndex].SF == 0>> <br> - <<link "Attach Special Force advisors">> + <<link "Attach Special Force advisors" "seeUnit">> <<set $slaveUnits[$targetIndex].SF = 1>> <<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>> @@ -384,7 +365,7 @@ Rename unit <<textbox "$mercUnits[$targetIndex].platoonName" $mercUnits[$targetIndex].platoonName "seeUnit">> <<if $mercUnits[$targetIndex].troops < $mercUnits[$targetIndex].maxTroops && $mercFreeManpower > 0>> <br> - <<link "Replenish unit">> + <<link "Replenish unit" "seeUnit">> <<if $mercFreeManpower >= $mercUnits[$targetIndex].maxTroops - $mercUnits[$targetIndex].troops>> <<set $mercFreeManpower -= $mercUnits[$targetIndex].maxTroops - $mercUnits[$targetIndex].troops>> <<set $mercEmployedManpower += $mercUnits[$targetIndex].maxTroops - $mercUnits[$targetIndex].troops>> @@ -398,16 +379,14 @@ <<set $mercUnits[$targetIndex].troops += $mercFreeManpower>> <<set $mercFreeManpower = 0>> <</if>> - <<goto "seeUnit">> <</link>> <</if>> <br> <<if $mercUnits[$targetIndex].maxTroops < 50>> <br> - <<link "Intensive officers training">> + <<link "Intensive officers training" "seeUnit">> <<set $mercUnits[$targetIndex].maxTroops += 10>> <<set $cash -= 5000 + 10 * $equipUpgradeCost * ($mercUnits[$targetIndex].equip + $mercUnits[$targetIndex].commissars + $mercUnits[$targetIndex].cyber + $mercUnits[$targetIndex].SF)>> - <<goto "seeUnit">> <</link>> Invest in the training of your officers to increase the maximum number of soldiers in the unit. <br>//Costs <<print cashFormat(5000 + 10 * $equipUpgradeCost * ($mercUnits[$targetIndex].equip + $mercUnits[$targetIndex].commissars + $mercUnits[$targetIndex].cyber + $mercUnits[$targetIndex].SF))>> and will increase the max by 10// @@ -416,10 +395,9 @@ <</if>> <<if $mercUnits[$targetIndex].equip < 3>> <br> - <<link "Improve weaponry and equipment">> + <<link "Improve weaponry and equipment" "seeUnit">> <<set $mercUnits[$targetIndex].equip += 1>> <<set $cash -= ($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 1000>> - <<goto "seeUnit">> <</link>> Invest in better equipment for your soldiers to increase their battle effectiveness. <br>//Costs <<print cashFormat(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 1000)>> and will increase attack and defense value of the unit by 15% for every upgrade.// @@ -428,19 +406,17 @@ <</if>> <<if $mercUnits[$targetIndex].commissars == 0>> <br> - <<link "Attach commissars to the unit">> + <<link "Attach commissars to the unit" "seeUnit">> <<set $mercUnits[$targetIndex].commissars = 1>> <<set $cash -= $equipUpgradeCost * $mercUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Attach a small squad of commissars to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 1000)>> and will slowly increase the loyalty of the unit.// <<elseif $mercUnits[$targetIndex].commissars < 2>> <br> - <<link "Intensive loyalty training">> + <<link "Intensive loyalty training" "seeUnit">> <<set $mercUnits[$targetIndex].commissars += 1>> <<set $cash -= $equipUpgradeCost * $mercUnits[$targetIndex].maxTroops + 1000>> - <<goto "seeUnit">> <</link>> Provide special training for the officers and the commissars of the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 1000)>> and will increase the loyalty of the unit faster.// @@ -452,10 +428,9 @@ <<if $prostheticsUpgrade >= 2 || $researchLab.advCombatPLimb == 1>> <<if $mercUnits[$targetIndex].cyber == 0>> <br> - <<link "Provide enhanced cybernetic enhancements">> + <<link "Provide enhanced cybernetic enhancements" "seeUnit">> <<set $mercUnits[$targetIndex].cyber += 1>> <<set $cash -= $equipUpgradeCost * $mercUnits[$targetIndex].maxTroops + 2000>> - <<goto "seeUnit">> <</link>>Will augment all soldiers of the unit with high tech cyber enhancements. <br>//Costs <<print cashFormat(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 2000)>> and will increase attack, defense and base hp values of the unit.// <<else>> @@ -464,28 +439,26 @@ <</if>> <<if $mercUnits[$targetIndex].medics == 0>> <br> - <<link "Attach trained medics to the unit">> + <<link "Attach trained medics to the unit" "seeUnit">> <<set $mercUnits[$targetIndex].medics = 1>> <<set $cash -= ($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 5000>> - <<goto "seeUnit">> <</link>> Attach a small squad of trained medics to the unit. <br>//Costs <<print cashFormat(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 5000)>> and will decrease the number of casualties suffered during battle.// <<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 >= 1>> <<if $mercUnits[$targetIndex].SF == 0>> <br> - <<link "Attach Special Force advisors">> + <<link "Attach Special Force advisors" "seeUnit">> <<set $mercUnits[$targetIndex].SF = 1>> <<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..266b6fe5d297380ea3c865c25f8347290f5bb95f 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 >= 1 && $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..c30475e2cf0eb5bcc1f6c0869ce12686fb435561 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 >= 1 && $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 >= 1 && $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 >= 1 && $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..05b27294b6997bc1234b6e963e8e470e49b77ac6 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 >= 1>> + <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 >= 1>> <<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 >= 1>> <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 3a47340037fbb81d353af57d5ee61956d30e7504..862845fc31ba6e6d73417e1de691a0294bb8b858 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 >= 1>> + <<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 >= 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 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 >= 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>> 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 f64c899ef27e8cfb03597e44750d2a2fe6468abe..af41b8843d7e8cd8cd849e62446089e47bd1013d 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.AA+$SFUnit.TA < 1) + ($SFUnit.AV+$SFUnit.TV)>> <<if !isInt(_upgradesSum)>> <<set _upgradesSum = random(10,15)>> <</if>> @@ -12,24 +12,24 @@ /* 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.AA+$SFUnit.TA < 1) + ($SFUnit.AV+$SFUnit.TV)>> <<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>> @@ -59,7 +59,7 @@ <<set _newMerc.push($mercUnits[_i])>> <</if>> <</for>> - <<set $mercUnits = _newMerc>> + <<set $mercUnits = _newMerc>> <</widget>> <<widget "calcTroopCount">> @@ -83,7 +83,7 @@ <<set _troops += $mercUnits[_i].troops>> <</if>> <</for>> - <<if $SFIntervention == 1>> + <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> <<set _troops += $carriableSoldiers>> <</if>> <<set $troopCount = _troops>> @@ -117,7 +117,7 @@ <<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 d6113ae8e2f1a8b7a069c627411f212406e37328..82de323530900a1a432dd7cb745b117784a97ce1 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 >= 1 && $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 >= 1 && $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 >= 1 && $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. diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index af5496b00bae169cc00d61570e63dafb42bf8fd4..0d2c45963c9903e0f4641db469fd41cdc329770f 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -278,10 +278,10 @@ Your slaves have participated in approximately <<print commaNum($oralTotal+$vagi <<if $secExp == 1 && $battlesEnabled == 1>> <br><br> -<<if $securityForceCreate == 0>> +<<if $SF.Toggle ==== 0||$SF.Active === 0>> Your army counts <<print commaNum($militiaEmployedManpower + $slavesEmployedManpower + $mercEmployedManpower)>> total soldiers. -<<else>> - Your army counts <<print commaNum($militiaEmployedManpower + $slavesEmployedManpower + $mercEmployedManpower + $securityForcePersonnel)>> total soldiers of which <<print commaNum($securityForcePersonnel)>> under the security force command and the rest under your direct control. +<<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>> Your troops were involved in <<print commaNum($battlesCount)>> battles of which <<print commaNum($majorBattlesCount)>> were major engagements. You won diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw index cdd4e7db332ddd6074008058af978f198d0564ab..09e9ce0facd2dd3a7e630de8a7dc802fcb0fbf74 100644 --- a/src/uncategorized/persBusiness.tw +++ b/src/uncategorized/persBusiness.tw @@ -848,9 +848,9 @@ Routine upkeep of your demesne costs @@.yellow;<<print cashFormat($costs)>>.@@ <</if>> <</if>> - <<if $taxTrade == 1>> - <br>Fees on transitioning goods this week made @@.yellowgreen;<<print cashFormat($trade * random(80,120))>>.@@ - <<set $cash += $trade * 100>> + <<if $taxTrade == 1>> <<set _tradeTax = Math.ceil($trade * random(80,120))>> + <br>Fees on transitioning goods this week made @@.yellowgreen;<<print cashFormat(_tradeTax)>>.@@ + <<set $cash += Math.ceil(_tradeTax)>> <</if>> <</if>>