diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index b8bb22e895002ad45135dca2cd946e7cc01a1482..d545c3bbbecc2b461117a09039077349bce050b5 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -434,16 +434,9 @@ App.Data.resetOnNGPlus = { PCrebLoss: 0, /* armed forces stats */ - targetUnit: 0, - targetIndex: 0, - secBotsCost: 500, - secBotsUpgradeCost: 250, - equipUpgradeCost: 250, - maxTroops: 30, militiaFreeManpower: 0, militiaTotalCasualties: 0, slavesTotalCasualties: 0, - slavesMaxTroops: 30, mercFreeManpower: 0, mercTotalCasualties: 0, createdSlavesUnits: 0, diff --git a/src/Mods/SecExp/buildings/propagandaHub.tw b/src/Mods/SecExp/buildings/propagandaHub.tw index 6b72a7bc9e6edadef51bbf0853161806145f35d4..da3f9f3668003ada274cdb18c54b6a367772d136 100644 --- a/src/Mods/SecExp/buildings/propagandaHub.tw +++ b/src/Mods/SecExp/buildings/propagandaHub.tw @@ -62,13 +62,15 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the <<set $SecExp.buildings.propHub.focus = "enslavement">> <</link>> <</if>> - | - <<if $SecExp.buildings.propHub.focus == "recruitment">> - recruitment - <<else>> - <<link "recruitment" "propagandaHub">> - <<set $SecExp.buildings.propHub.focus = "recruitment">> - <</link>> + <<if $militiaFounded == 1>> + | + <<if $SecExp.buildings.propHub.focus == "recruitment">> + recruitment + <<else>> + <<link "recruitment" "propagandaHub">> + <<set $SecExp.buildings.propHub.focus = "recruitment">> + <</link>> + <</if>> <</if>> <br> You are concentrating your propaganda efforts towards diff --git a/src/Mods/SecExp/buildings/secBarracks.tw b/src/Mods/SecExp/buildings/secBarracks.tw index 0fbe76bf1a140780ea578f17e03b84edec1c5da8..e747527ba4757d49d7ef0633679e22c8eb0c5234 100644 --- a/src/Mods/SecExp/buildings/secBarracks.tw +++ b/src/Mods/SecExp/buildings/secBarracks.tw @@ -1,12 +1,9 @@ :: secBarracks [nobr jump-to-safe jump-from-safe] -<<set $nextButton = "Back">> -<<set $nextLink = "Main">> +<<set $nextButton = "Back", $nextLink = "Main">> The Barracks -<hr> -__Upgrades__ -<br> +<hr>__Upgrades__<br> While this a sore sight for many citizens of $arcologies[0].name, the barracks stand proud before you. <<if $SecExp.buildings.barracks.upgrades.size == 0>> The building is relatively small and able to house a limited number of units. @@ -46,8 +43,7 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s <<else>> The barracks have been fitted with an advanced indoctrination facility. <</if>> -<br> -<br> +<br><br> <<if $SecExp.buildings.barracks.upgrades.size < 5>> <<link "Increase the size of the barracks" "secBarracks">> <<run cashX(forceNeg(Math.trunc((5000 * ($SecExp.buildings.barracks.upgrades.size + 1))*$upgradeMultiplierArcology)), "capEx")>> @@ -118,9 +114,7 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s You have improved the indoctrination facility to the limit. <</if>> -<hr> -__Units__ -<br> +<hr>__Units__<br> Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> (<<print num($secBots.maxTroops+(50*App.SecExp.battle.maxUnits()))>> troops), <<print App.SecExp.battle.activeUnits()>> (<<print num($secBots.maxTroops+App.SecExp.Manpower.employedOverall)>> troops) are active and <<print (2 * App.SecExp.battle.deploySpeed())>> units can be deployed. <<if $SecExp.buildings.barracks.upgrades.luxury > 0>>The barracks provides <<print $SecExp.buildings.barracks.upgrades.luxury * 5>>% bonus morale when battle occurs.<</if>> <<if $SecExp.buildings.barracks.upgrades.training > 0>>The training facility will increase the effectiveness of your units with time.<</if>> <br> <<set _options = new App.UI.OptionsGroup()>> @@ -132,349 +126,312 @@ Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> ( <</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>__Security Drones__ -/* drones */ -<br> +<<replenishAllUnits>> -<<if $arcologyUpgrade.drones == 1>> - <<= App.SecExp.getUnit("Bots").describe()>> - <br> - <<if $secBots.active == 1>> - <<link "Review Equipment and upgrades" "seeUnit">> - <<set $targetUnit = "secBots">> - <</link>> - <<if $secBots.troops < $secBots.maxTroops>> - | - <<link "Replenish the unit" "secBarracks">> - <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * $secBotsCost), "securityExpansion")>> - <<set $secBots.troops = $secBots.maxTroops>> - <</link>> - <</if>> - <<else>> - <<link "Rebuild the unit" "secBarracks">> - <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * $secBotsCost), "securityExpansion")>> - <<set $secBots.troops = $secBots.maxTroops>> - <<set $secBots.active = 1>> - <</link>> - <</if>> -<<else>> +<<if $arcologyUpgrade.drones === 0>> You have not yet installed a drone security system in your arcology, you will not be able to form a unit of drones. <</if>> - -<br><br>__Slaves__ -<br>/* slaves */ -You are free to organize your menial slaves into fighting units. Currently you have <<print num($menials)>> slaves available, while <<print num(App.SecExp.Manpower.employedSlave)>> are already employed as soldiers. During all your battles you lost a total of <<print num($slavesTotalCasualties)>>. -<<run MenialPopCap()>> -<<set _menialPrice = menialSlaveCost()>> -<<set _bulkMax = $PopCap-$menials-$fuckdolls-$menialBioreactors>> -<<if $cash > _menialPrice>> - <<if _bulkMax > 0>> - <br> - [[Buy|secBarracks][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]] - <<if $cash > (menialSlaveCost(10))*10>> - [[(x10)|secBarracks][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]] - <</if>> - <<if $cash > (menialSlaveCost(100))*100>> - [[(x100)|secBarracks][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]] - <</if>> - <<if $cash > (_menialPrice+1)*2>> - <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> - [[(max)|secBarracks][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]] - <</if>> - //Bulk transactions may require offering a premium.// - <</if>> +<<if $militiaFounded === 0>> + <br>You have not yet founded the militia, you will not be able to form citizens units. <</if>> -<br> -<<set _sL = $slaveUnits.length>> -<<if $menials > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> - <br> - <<link "Form a new unit" "secBarracks">> - <<set _newUnit = { - ID: App.SecExp.generateUnitID(), - platoonName: ordinalSuffix(++$createdSlavesUnits) + " slave platoon", - active: 1, - isDeployed: 0, - troops: Math.min($maxTroops, $menials), - maxTroops: $maxTroops, - equip: 0, - training: 0, - loyalty: random(40,60), - cyber: 0, - medics: 0, - SF: 0, - commissars: 0, - battlesFought: 0}>> - <<set $slaveUnits.push(_newUnit)>> - <<set $menials -= _newUnit.troops>> - <</link>> +<<if $mercenaries === 0>> + <br>Mercenaries are not allowed inside the arcology. You will not be able to recruit mercenary units. <</if>> -<<for _i = 0; _i < _sL; _i++>> - <<capture _i>> - <<= App.SecExp.getUnit("Slaves", _i).describe()>> - <<if $slaveUnits[_i].active == 1>> - <br> - <<link "Disband the unit" "secBarracks">> - <<set $menials += $slaveUnits[_i].troops>> - <<set $slaveUnits.deleteAt(_i)>> - <</link>> - | - <<link "Review Equipment and upgrades" "seeUnit">> - <<set $targetUnit = "slaveUnits">> - <<set $targetIndex = _i>> - <</link>> - - <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $menials > 0>> - | - <<link "Replenish unit" "secBarracks">> - <<if $menials >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> - <<set $menials -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> - <<set _expLoss = ($slaveUnits[_i].maxTroops - $slaveUnits[_i].troops) / $slaveUnits[_i].troops>> - <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> - <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> - <<else>> - <<set _expLoss = $menials / $slaveUnits[_i].troops>> - <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> - <<set $slaveUnits[_i].troops += $menials>> - <<set $menials = 0>> - <</if>> - <</link>> - <</if>> - - <<else>> - <br> - <<link "Disband the unit" "secBarracks">> - <<set _elimUnit = $slaveUnits[_i]>> - <<set _newSlaveUnits = []>> - <<for _y = 0; _y < _sL; _y++>> - <<if $slaveUnits[_y] != _elimUnit>> - <<set _newSlaveUnits.push($slaveUnits[_y])>> - <</if>> - <</for>> - <<set $slaveUnits = _newSlaveUnits>> - <</link>> - - <<if $menials > 0>> - | - <<link "Reform the unit" "secBarracks">> - <<if $menials >= $slaveUnits[_i].maxTroops>> - <<set $menials -= $slaveUnits[_i].maxTroops>> - <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> - <<set $slaveUnits[_i].training = 0>> - <<else>> - <<set $slaveUnits[_i].troops += $menials>> - <<set $menials = 0>> - <<set $slaveUnits[_i].training = 0>> - <</if>> - <<set $slaveUnits[_i].active = 1>> - <</link>> - <</if>> +<div class="tabbar"> + <<if $arcologyUpgrade.drones == 1>> + <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Bots')" id="tab Bots">Security Drones</button> <</if>> - <</capture>> -<</for>> - -<<if $militiaFounded == 1>> -<br> -__Militia__ -<br>/* militia */ - You founded the $arcologies[0].name free militia. You are now able to organize your citizens into fighting units. - <<if $recruitVolunteers == 1>> - The militia is composed entirely of volunteers, your manpower is approximately 1.5% of the citizens population of your arcology. - <<elseif $conscription == 1>> - With the establishment of conscription, your available manpower has increased to now approximately 3% of the arcology's citizens population. - <<elseif $militaryService == 1>> - By establishing obligatory military service to obtain citizenship you have enlarged your manpower pool to be approximately 5% of the arcology's citizens population. - <<elseif $militarizedSociety == 1>> - With the adoption of a militarized society, your available manpower has swelled to be approximately 15% of the arcology's citizens population. + <<if $militiaFounded == 1>> + <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Militia')" id="tab Militia">Militia: ($militiaUnits.length)</button> <</if>> - Your current total manpower is <<print num(App.SecExp.Manpower.totalMilitia)>>, of which <<print num(App.SecExp.Manpower.employedMilitia)>> is in active duty. You lost in total <<print num($militiaTotalCasualties)>> citizens, leaving you with <<print num($militiaFreeManpower)>> available citizens. - <<set _mL = $militiaUnits.length>> - <<if $militiaFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> - <br><br> - <<link "Form a new unit" "secBarracks">> - <<set _newUnit = { - ID: App.SecExp.generateUnitID(), - platoonName: ordinalSuffix(++$createdMilitiaUnits) + " citizens' platoon", - active: 1, - isDeployed: 0, - troops: Math.min($maxTroops, $militiaFreeManpower), - maxTroops: $maxTroops, - equip: 0, - training: 0, - loyalty: random(40,60), - cyber: 0, - medics: 0, - SF: 0, - commissars: 0, - battlesFought: 0}>> - <<set $militiaUnits.push(_newUnit)>> - <<set $militiaFreeManpower -= _newUnit.troops>> - <</link>> + <<if $mercenaries >= 1>> + <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Mercs')" id="tab Mercs">Mercenaries: ($mercUnits.length)</button> <</if>> - <<for _i = 0; _i < _mL; _i++>> - <<capture _i>> - <<= App.SecExp.getUnit("Militia", _i).describe()>> - <<if $militiaUnits[_i].active == 1>> + <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Slaves')" id="tab Slaves">Slaves: ($slaveUnits.length)</button> +</div> +<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.secBarracks)>> +<div id="Bots" class="tabcontent"> + <div class="content"> + <<set _secBotsCost = 500, _secBotsUpgradeCost = 250>> + <<= App.SecExp.getUnit("Bots").describe()>> <br> + <<if $secBots.active == 1>> + <<if $secBots.maxTroops > $secBots.troops>> <br> + <<link "Replenish the unit" "seeUnit">> + <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * _secBotsCost), "securityExpansion")>> + <<set $secBots.troops = $secBots.maxTroops>> + <</link>> + <</if>> <br> - <<link "Disband the unit" "secBarracks">> - <<set $militiaFreeManpower += $militiaUnits[_i].troops>> - <<set $militiaUnits.deleteAt(_i)>> - <</link>> - | - <<link "Review Equipment and upgrades" "seeUnit">> - <<set $targetUnit = "militiaUnits">> - <<set $targetIndex = _i>> - <</link>> - - <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> + <<if $secBots.maxTroops < 80>> <br> + <<link "Improve the digital control matrix" "seeUnit">> + <<set $secBots.maxTroops += 10>> + <<run cashX(-5000, "securityExpansion")>> + <</link>> + Invest in the development of more refined controls for your drones to increase the maximum number of drones in the unit. + <br>//Costs <<print cashFormat(5000)>> per upgrade and each will increase the max by 10// + <<elseif $SF.Toggle && $SF.Active >= 1 && $secBots.maxTroops < 100 && $SecExp.edicts.SFSupportLevel >= 1>> <br> + <<link "Refine the drone network with $SF.Lower assistance" "seeUnit">> + <<set $secBots.maxTroops += 10>> + <<run cashX(forceNeg(5000 + 10 * _secBotsUpgradeCost * $secBots.equip), "securityExpansion")>> + <</link>> + Utilize the technological developments made by $SF.Lower to further improve the control matrix of the security drones. + <br>//Costs <<print cashFormat(5000 + 10 * _secBotsUpgradeCost * $secBots.equip)>> and will increase the max by 10// + <<elseif $SF.Toggle && $SF.Active >= 1 && $SecExp.edicts.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" "seeUnit">> + <<set $secBots.equip += 1>> + <<run cashX(forceNeg((_secBotsUpgradeCost * $secBots.maxTroops) + 1000), "securityExpansion")>> + <</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.// + <<else>> + <br>Your drones are equipped with top tier weaponry and armor. + <</if>> + <<if $SecExp.settings.showStats == 1>> + <br><<= _App.SecExp.getUnit("Bots").printStats()>> + <</if>> + <<if $secBots.troops < $secBots.maxTroops>> | - <<link "Replenish unit" "secBarracks">> - <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> - <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> - <<set _expLoss = ($militiaUnits[_i].maxTroops - $militiaUnits[_i].troops) / $militiaUnits[_i].troops>> - <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> - <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> - <<else>> - <<set _expLoss = $militiaFreeManpower / $militiaUnits[_i].troops>> - <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> - <<set $militiaUnits[_i].troops += $militiaFreeManpower>> - <<set $militiaFreeManpower = 0>> - <</if>> + <<link "Replenish the unit" "secBarracks">> + <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * _secBotsCost), "securityExpansion")>> + <<set $secBots.troops = $secBots.maxTroops>> <</link>> <</if>> <<else>> - <br> - <<link "Disband the unit" "secBarracks">> - <<set $militiaFreeManpower += $militiaUnits[_i].troops>> - <<set _elimUnit = $militiaUnits[_i]>> - <<set _newMilitiaUnits = []>> - <<for _y = 0; _y < _sL; _y++>> - <<if $militiaUnits[_y] != _elimUnit>> - <<set _newMilitiaUnits.push($militiaUnits[_y])>> - <</if>> - <</for>> - <<set $militiaUnits = _newMilitiaUnits>> + <<link "Rebuild the unit" "secBarracks">> + <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * _secBotsCost), "securityExpansion")>> + <<set $secBots.troops = $secBots.maxTroops>> + <<set $secBots.active = 1>> <</link>> - - <<if $militiaFreeManpower > 0>> - | - <<link "Reform the unit" "secBarracks">> - <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops>> - <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops>> - <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> - <<set $militiaUnits[_i].training = 0>> - <<else>> - <<set $militiaUnits[_i].troops += $militiaFreeManpower>> - <<set $militiaFreeManpower = 0>> - <<set $militiaUnits[_i].training = 0>> - <</if>> - <<set $militiaUnits[_i].active = 1>> - <</link>> + <</if>> + </div> +</div> +<div id="Slaves" class="tabcontent"> + <div class="content"> + You are free to organize your menial slaves into fighting units. Currently you have <<print num($menials)>> slaves available, while <<print num(App.SecExp.Manpower.employedSlave)>> are already employed as soldiers. During all your battles you lost a total of <<print num($slavesTotalCasualties)>>. + <<if $menials > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> + <<link "Form a new unit" "secBarracks">> + <<set $slaveUnits.push(App.SecExp.generateUnit("slaves"))>> + <</link>> + <</if>> + <<run MenialPopCap()>> + <<set _menialPrice = menialSlaveCost()>> + <<set _bulkMax = $PopCap-$menials-$fuckdolls-$menialBioreactors>> + <<if $cash > _menialPrice>> + <<if _bulkMax > 0>> <br> + [[Buy|secBarracks][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]] + <<if $cash > (menialSlaveCost(10))*10>> + [[(x10)|secBarracks][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]] + <</if>> + <<if $cash > (menialSlaveCost(100))*100>> + [[(x100)|secBarracks][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]] + <</if>> + <<if $cash > (_menialPrice+1)*2>> + <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> + [[(max)|secBarracks][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]] + <</if>> + //Bulk transactions may require offering a premium.// <</if>> <</if>> - <</capture>> - <</for>> - <br> -<<else>> - <br><br> - You have not yet founded the militia, you will not be able to form citizens units. -<</if>> - -<<if $mercenaries >= 1>> -<br> -__Mercenaries__ -<br>/* mercenaries */ - With the installation of a mercenary company in the arcology, many other are attracted to your free city, hoping to land a contract with you. - You are able to organize them in units to use in the defense of the arcology. Excluding the defense force you set up, there are <<print num(App.SecExp.Manpower.totalMerc)>> mercenaries in your arcology, of which <<print num(App.SecExp.Manpower.employedMerc)>> actively employed and <<print num($mercFreeManpower)>> not yet under contract. In total <<print num($mercTotalCasualties)>> mercenaries have died defending your arcology. - <<set _meL = $mercUnits.length>> - <<if $mercFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> - <br><br> - <<link "Form a new unit" "secBarracks">> - <<set _newUnit = { - ID: App.SecExp.generateUnitID(), - platoonName: ordinalSuffix(++$createdMercUnits) + " mercenary platoon", - active: 1, - isDeployed: 0, - troops: Math.min($maxTroops, $mercFreeManpower), - maxTroops: $maxTroops, - equip: 0, - training: 0, - loyalty: random(40,60), - cyber: 0, - medics: 0, - SF: 0, - commissars: 0, - battlesFought: 0}>> - <<set $mercUnits.push(_newUnit)>> - <<set $mercFreeManpower -= _newUnit.troops>> - <</link>> - <</if>> - <<for _i = 0; _i < _meL; _i++>> - <<capture _i>> - <<= App.SecExp.getUnit("Mercs", _i).describe()>> - <<if $mercUnits[_i].active == 1>> - <br> - <<link "Disband the unit" "secBarracks">> - <<set $mercFreeManpower += $mercUnits[_i].troops>> - <<set $mercUnits.deleteAt(_i)>> + <<set _sL = $slaveUnits.length>> + <<for _i = 0; _i < _sL; _i++>> + <<capture _i>> + <<= App.SecExp.getUnit("Slaves", _i).describe()>> <br> + Rename unit <<textbox "$slaveUnits[_i].platoonName" $slaveUnits[_i].platoonName "secBarracks">> + | <<link "Disband the unit" "secBarracks">> + <<set $menials += $slaveUnits[_i].troops>> + <<set $slaveUnits.deleteAt(_i)>> <</link>> - | - <<link "Review Equipment and upgrades" "seeUnit">> - <<set $targetUnit = "mercUnits">> - <<set $targetIndex = _i>> + <<if $slaveUnits[_i].active == 1>> + <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $menials > 0>> + | + <<link "Replenish unit" "secBarracks">> + <<if $menials >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> + <<set $menials -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> + <<set _expLoss = ($slaveUnits[_i].maxTroops - $slaveUnits[_i].troops) / $slaveUnits[_i].troops>> + <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> + <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> + <<else>> + <<set _expLoss = $menials / $slaveUnits[_i].troops>> + <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> + <<set $slaveUnits[_i].troops += $menials>> + <<set $menials = 0>> + <</if>> + <</link>> + <</if>> + <<if $SecExp.settings.showStats == 1>> + <br><<= App.SecExp.getUnit("Slaves", _i).printStats()>> + <</if>> + <<includeDOM App.SecExp.humanUnitUpgradeList($slaveUnits[_i])>> + <<else>> + <<if $menials > 0>> + | + <<link "Reform the unit" "secBarracks">> + <<if $menials >= $slaveUnits[_i].maxTroops>> + <<set $menials -= $slaveUnits[_i].maxTroops>> + <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> + <<set $slaveUnits[_i].training = 0>> + <<else>> + <<set $slaveUnits[_i].troops += $menials>> + <<set $menials = 0>> + <<set $slaveUnits[_i].training = 0>> + <</if>> + <<set $slaveUnits[_i].active = 1>> + <</link>> + <</if>> + <</if>> + <</capture>> + <</for>> + </div> +</div> +<div id="Militia" class="tabcontent"> + <div class="content"> + You founded the $arcologies[0].name free militia. You are now able to organize your citizens into fighting units. + <<if $recruitVolunteers == 1>> + The militia is composed entirely of volunteers, your manpower is approximately 1.5% of the citizens population of your arcology. + <<elseif $conscription == 1>> + With the establishment of conscription, your available manpower has increased to now approximately 3% of the arcology's citizens population. + <<elseif $militaryService == 1>> + By establishing obligatory military service to obtain citizenship you have enlarged your manpower pool to be approximately 5% of the arcology's citizens population. + <<elseif $militarizedSociety == 1>> + With the adoption of a militarized society, your available manpower has swelled to be approximately 15% of the arcology's citizens population. + <</if>> + Your current total manpower is <<print num(App.SecExp.Manpower.totalMilitia)>>, of which <<print num(App.SecExp.Manpower.employedMilitia)>> is in active duty. You lost in total <<print num($militiaTotalCasualties)>> citizens, leaving you with <<print num($militiaFreeManpower)>> available citizens. + <<if $militiaFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> <br><br> + <<link "Form a new unit" "secBarracks">> + <<set $militiaUnits.push(App.SecExp.generateUnit("militia"))>> <</link>> - - <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> - | - <<link "Replenish unit" "secBarracks">> - <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> - <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> - <<set _expLoss = ($mercUnits[_i].maxTroops - $mercUnits[_i].troops) / $mercUnits[_i].troops>> - <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> - <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> - <<else>> - <<set _expLoss = $mercFreeManpower / $mercUnits[_i].troops>> - <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> - <<set $mercUnits[_i].troops += $mercFreeManpower>> - <<set $mercFreeManpower = 0>> - <</if>> - <</link>> + <</if>> + <<set _mL = $militiaUnits.length>> + <<for _i = 0; _i < _mL; _i++>> + <<capture _i>> + <<= App.SecExp.getUnit("Militia", _i).describe()>> <br> + Rename unit <<textbox "$militiaUnits[_i].platoonName" $militiaUnits[_i].platoonName "secBarracks">> + | <<link "Disband the unit" "secBarracks">> + <<set $militiaFreeManpower += $militiaUnits[_i].troops>> + <<set $militiaUnits.deleteAt(_i)>> + <</link>> + <<if $militiaUnits[_i].active == 1>> + <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> + | + <<link "Replenish unit" "secBarracks">> + <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> + <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> + <<set _expLoss = ($militiaUnits[_i].maxTroops - $militiaUnits[_i].troops) / $militiaUnits[_i].troops>> + <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> + <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> + <<else>> + <<set _expLoss = $militiaFreeManpower / $militiaUnits[_i].troops>> + <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> + <<set $militiaUnits[_i].troops += $militiaFreeManpower>> + <<set $militiaFreeManpower = 0>> + <</if>> + <</link>> + <</if>> + <<if $SecExp.settings.showStats == 1>> + <br><<= App.SecExp.getUnit("Militia", _i).printStats()>> + <</if>> + <<includeDOM App.SecExp.humanUnitUpgradeList($militiaUnits[_i])>> + <<else>> + <<if $militiaFreeManpower > 0>> + | + <<link "Reform the unit" "secBarracks">> + <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops>> + <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops>> + <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> + <<set $militiaUnits[_i].training = 0>> + <<else>> + <<set $militiaUnits[_i].troops += $militiaFreeManpower>> + <<set $militiaFreeManpower = 0>> + <<set $militiaUnits[_i].training = 0>> + <</if>> + <<set $militiaUnits[_i].active = 1>> + <</link>> + <</if>> <</if>> - - <<else>> - <br> - <<link "Disband the unit" "secBarracks">> - <<set _elimUnit = $mercUnits[_i]>> - <<set _newMercUnits = []>> - <<for _y = 0; _y < _sL; _y++>> - <<if $mercUnits[_y] != _elimUnit>> - <<set _newMercUnits.push($mercUnits[_y])>> - <</if>> - <</for>> - <<set $mercUnits = _newMercUnits>> + <</capture>> + <</for>> + </div> +</div> +<div id="Mercs" class="tabcontent"> + <div class="content"> + With the installation of a mercenary company in the arcology, many other are attracted to your free city, hoping to land a contract with you. + You are able to organize them in units to use in the defense of the arcology. Excluding the defense force you set up, there are <<print num(App.SecExp.Manpower.totalMerc)>> mercenaries in your arcology, of which <<print num(App.SecExp.Manpower.employedMerc)>> actively employed and <<print num($mercFreeManpower)>> not yet under contract. In total <<print num($mercTotalCasualties)>> mercenaries have died defending your arcology. + <<if $mercFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> <br><br> + <<link "Form a new unit" "secBarracks">> + <<set $mercUnits.push(App.SecExp.generateUnit("mercs"))>> <</link>> + <</if>> + <<set _meL = $mercUnits.length>> + <<for _i = 0; _i < _meL; _i++>> + <<capture _i>> + <<= App.SecExp.getUnit("Mercs", _i).describe()>> <br> + Rename unit <<textbox "$mercUnits[_i].platoonName" $mercUnits[_i].platoonName "secBarracks">> + | <<link "Disband the unit" "secBarracks">> + <<set $mercFreeManpower += $mercUnits[_i].troops>> + <<set $mercUnits.deleteAt(_i)>> + <</link>> + <<if $mercUnits[_i].active == 1>> + <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> + | + <<link "Replenish unit" "secBarracks">> + <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> + <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> + <<set _expLoss = ($mercUnits[_i].maxTroops - $mercUnits[_i].troops) / $mercUnits[_i].troops>> + <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> + <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> + <<else>> + <<set _expLoss = $mercFreeManpower / $mercUnits[_i].troops>> + <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> + <<set $mercUnits[_i].troops += $mercFreeManpower>> + <<set $mercFreeManpower = 0>> + <</if>> + <</link>> + <</if>> + <<if $SecExp.settings.showStats == 1>> + <br><<= App.SecExp.getUnit("Mercs", _i).printStats()>> + <</if>> + <<includeDOM App.SecExp.humanUnitUpgradeList($mercUnits[_i])>> - <<if $mercFreeManpower > 0>> - | - <<link "Reform the unit" "secBarracks">> - <<if $mercFreeManpower >= $mercUnits[_i].maxTroops>> - <<set $mercFreeManpower -= $mercUnits[_i].maxTroops>> - <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> - <<set $mercUnits[_i].training = 0>> - <<else>> - <<set $mercUnits[_i].troops += $mercFreeManpower>> - <<set $mercFreeManpower = 0>> - <<set $mercUnits[_i].training = 0>> - <</if>> - <<set $mercUnits[_i].active = 1>> - <</link>> + <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> + | + <<link "Replenish unit" "secBarracks">> + <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> + <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> + <<set _expLoss = ($mercUnits[_i].maxTroops - $mercUnits[_i].troops) / $mercUnits[_i].troops>> + <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> + <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> + <<else>> + <<set _expLoss = $mercFreeManpower / $mercUnits[_i].troops>> + <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> + <<set $mercUnits[_i].troops += $mercFreeManpower>> + <<set $mercFreeManpower = 0>> + <</if>> + <</link>> + <</if>> + <<else>> + <<if $mercFreeManpower > 0>> + | + <<link "Reform the unit" "secBarracks">> + <<if $mercFreeManpower >= $mercUnits[_i].maxTroops>> + <<set $mercFreeManpower -= $mercUnits[_i].maxTroops>> + <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> + <<set $mercUnits[_i].training = 0>> + <<else>> + <<set $mercUnits[_i].troops += $mercFreeManpower>> + <<set $mercFreeManpower = 0>> + <<set $mercUnits[_i].training = 0>> + <</if>> + <<set $mercUnits[_i].active = 1>> + <</link>> + <</if>> <</if>> - <</if>> - <</capture>> - <</for>> -<<else>> - <br><br> - Mercenaries are not allowed inside the arcology. You will not be able to recruit mercenary units. -<</if>> \ No newline at end of file + <</capture>> + <</for>> + </div> +</div> \ No newline at end of file diff --git a/src/Mods/SecExp/js/Unit.js b/src/Mods/SecExp/js/Unit.js index 2eedd7203ea99d7c5725ce05430f8a3ffd83fabb..b1c34c32b2b97e243ce43b87f375d2ec81052074 100644 --- a/src/Mods/SecExp/js/Unit.js +++ b/src/Mods/SecExp/js/Unit.js @@ -1,3 +1,149 @@ +/** Creates the requested unit object. + * @param {string} [type] the unit type to be created. +*/ +App.SecExp.generateUnit = function(type) { + let newUnit = {ID: -1, equip: 0, active: 1, isDeployed: 0, maxTroops:30, troops: 30}; + if (type !== "bots") { + Object.assign(newUnit, { + training: 0, cyber: 0, medics: 0, + SF: 0, commissars: 0, battlesFought: 0, + loyalty: jsRandom(40, 60), + ID: App.SecExp.generateUnitID() + }); + + if (type === "slaves") { + newUnit.platoonName = ordinalSuffix(++V.createdSlavesUnits) + " slave platoon"; + newUnit.troops = Math.min(newUnit.maxTroops, V.menials); + V.menials -= newUnit.troops; + } else if (type === "militia") { + newUnit.platoonName = ordinalSuffix(++V.createdMilitiaUnits) + " citizens' platoon"; + newUnit.troops = Math.min(newUnit.maxTroops, V.militiaFreeManpower); + V.militiaFreeManpower -= newUnit.troops; + } else if (type === "mercs") { + newUnit.platoonName = ordinalSuffix(++V.createdMercUnits) + " mercenary platoon"; + newUnit.troops = Math.min(newUnit.maxTroops, V.mercFreeManpower); + V.mercFreeManpower -= newUnit.troops; + } + } + return newUnit; +}; + +/** Prints a list of upgrades that can be applied to the passed human unit. + * @param {object} [input] the human unit to be checked. +*/ +App.SecExp.humanUnitUpgradeList = function(input) { + const equipUpgradeCost = 250; let options, el = options = document.createElement("div"); + + options = document.createElement("div"); + if (input.maxTroops < 50) { + options.append(`For ${cashFormat(5000 + 10 * equipUpgradeCost * (input.equip + input.commissars + input.cyber + input.SF))} provide this unit's `); + options.append(App.UI.DOM.link("officers with intensive training", () => { + input.maxTroops += 10, + cashX(-(5000 + 10 * equipUpgradeCost * (input.equip + input.commissars + input.cyber + input.SF)), "securityExpansion"); + }, + [], passage() + )); + options.append(` to increase the maximum number of soldiers in the unit by 10.`); + } else { + options.append(`Your officers reached their peak. Further training will have little impact on the number of troops they can effectively lead.`); + } + el.append(options); + + options = document.createElement("div"); + if (input.equip < 3) { + options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} invest in `); + options.append(App.UI.DOM.link("better equipment", () => { + input.equip++, + cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); + }, + [], passage() + )); + options.append(` to increase this unit's attack and defense by 15% per investement.`); + } else { + options.append(`The unit is equipped with state of the art weaponry and equipment.`); + } + el.append(options); + + options = document.createElement("div"); + if (input.commissars === 0) { + options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} attach `); + options.append(App.UI.DOM.link("commissars", () => { + input.commissars++, + cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); + }, + [], passage() + )); + options.append(` to slowly increase this unit's loyalty.`); + } else if (input.commissars < 2) { + options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} attach `); + options.append(App.UI.DOM.link("commissars", () => { + input.commissars++, + cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); + }, + [], passage() + )); + options.append(` to slowly increase this unit's even loyalty.`); + } + if (input.commissars === 1) { + options.append("The unit has a commissar detachment, keeping under control the ambitions of the unit's officers."); + } else if (input.commissars === 2) { + options.append("The unit has a perfectly trained and loyal commissar detachment, keeping under control the ambitions of the unit's officers."); + } + el.append(options); + + options = document.createElement("div"); + if (V.prostheticsUpgrade >= 2 || V.researchLab.advCombatPLimb == 1) { + if (input.cyber === 0) { + options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} `); + options.append(App.UI.DOM.link("augment all soldiers of the unit", () => { + input.cyber++, + cashX(-(equipUpgradeCost * input.maxTroops + 2000), "securityExpansion"); + }, + [], passage() + )); + options.append(` with high tech cyber enhancements that will increase attack, defense and base hp values.`); + } else { + options.append('The unit is equipped with advanced cybernetic enhancements.'); + } + } + el.append(options); + + options = document.createElement("div"); + if (input.medics === 0) { + options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} `); + options.append(App.UI.DOM.link("attach trained medics to the unit", () => { + input.medics++, + cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); + }, + [], passage() + )); + options.append(' which will decrease the number of casualties suffered during battle.'); + } else { + options.append('The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers'); + } + el.append(options); + + if (V.SF.Toggle && V.SF.Active >= 1) { + options = document.createElement("div"); + + if (input.SF === 0) { + options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 5000)} `); + options.append(App.UI.DOM.link("attach Special Force advisors", () => { + input.SF++, + cashX(-(equipUpgradeCost * input.maxTroops + 5000), "securityExpansion"); + }, + [], passage() + )); + options.append(' which will slightly increase the base stats of the unit.'); + } else { + options.append('The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active.'); + } + el.append(options); + } + + return el; +}; + /** Generate a unit ID for a new unit * @returns {number} */ diff --git a/src/Mods/SecExp/potentialToDo.txt b/src/Mods/SecExp/potentialToDo.txt new file mode 100644 index 0000000000000000000000000000000000000000..f296e0340642562128b2a5585a1306d336a060e5 --- /dev/null +++ b/src/Mods/SecExp/potentialToDo.txt @@ -0,0 +1,40 @@ +Hexall90's last merged commit: 52dde0b3 + +- My personal asst keeps getting the credit, even though I choose to personally lead my forces. (Has been this way for a fewish days): Military01.swf +- Enable oceanic battles + Fine, I'll Do It Myself + Pirates? Enemy navies? - 328279 + Pirates could raid trade routs and such ,even could capture a high class cruise liner and you have to move retake it with an army similar to the ground battles. you could have an event where you gain a old world port to ship your goods to , and you have to defend it . -328413 +- How to make threads - 355452 + A suggestion for prisoners of war after winning the battle: maybe add an option to execute them on the spot for authority gains? + And how about giving a chance (depending on the amount of captives) to actually make one or two of them that aren't as hateful or wounded as your sex slaves instead of just menials? Perhaps you may even turn (hypothetical) female captives into sex dolls or bioreactors too. It can be an optional button. + Also, maybe make some of them actually surrender so it will be possible to get captives even when you completely overwhelm their forces in numbers/efficiency? +- How to make threads - 355478 +- One thing I find to be weird/stupid is that facilities must be manned with menial slaves. I think that it instead should be an option, like with armies, to man them with free citizens instead who then do a better job but instead require a monthly wage. +- Oni-girl soldiers. +- Modify DOL battle scene to recognise SecExp units. +- Update encyclopedia entry to reflect above. +- Add suicide units. +- Add WarAnimal's units - Optimally Functioning Code, 254511 - 3rd Military Animal Platoon. +- Loli unit - Unlocked from Black market, origin Wedding edition - 310602. +- Feature Request: Attack Imminent Layout (GUI suggestion done) - https://gitgud.io/pregmodfan/fc-pregmod/issues/1145 +- Feature Request: Potential for damage to Security Expansion Upgrades - https://gitgud.io/pregmodfan/fc-pregmod/issues/1146 +- Special Forces Morale Bonus - https://gitgud.io/pregmodfan/fc-pregmod/issues/1165 +- Suggestion - Specialized Schools, Fortifications and Militia Edicts -https://gitgud.io/pregmodfan/fc-pregmod/issues/763 +- Suggestion - Arcology Conquest - https://gitgud.io/pregmodfan/fc-pregmod/issues/760 +- Does forcing every citizen to be in military raise appeal of slaves that know how to fight? +- And if I am a master tactician, maybe I could get an estimate how effective the various tacticts could be? +- make https://gitgud.io/pregmodfan/fc-pregmod/issues/1431 and https://gitgud.io/pregmodfan/fc-pregmod/issues/1436 more visible +- Suggestion - Weapon Manufacturing Research Queue - https://gitgud.io/pregmodfan/fc-pregmod/issues/1618 +- Ability to create more drone squads. +- Increase base maximum units to 18, 20 with SF. +- Suggestion - Gradual Battle Frequency - https://gitgud.io/pregmodfan/fc-pregmod/issues/1245#note_82504 +- Option to send slaves into military unit to gain some nice scars and experience wold be nice (with retrieval). +- So would be taking slaves from slave units as personal ones. The slave units would pretty much be menial slaves I'd imagine, not sex slaves. +- If I think about it having a squad of personal slaves that you equip in whatever gear you want and send out to capture new slaves, raid caravans and cities and shit would be pretty sweet, I would even call it special forces but that's taken, also the combat skill is still a binary thing which makes the whole thing pointless. + How about to start off with option to send one or two of your combat trained slaves to assist the merc's when they are on a raid with the possibility of receiving battle wounds. +- It would be a start if the tactics talking about the size difference of the armies actually took the size difference into account. +- How about to start off with option to send one or two of your combat trained slaves to assist the merc's when they are on a raid with the possibility of receiving battle wounds. +- If there are choices, they should be along the lines of "higher risk, higher reward" (defeating the enemy with fewer casualties and damage if it goes right, but suffering higher casualties and damage if it goes wrong), or things like accepting more/less military casualties for better/worse protection of economic assets (costing money/damaging economy) and civilians (costing reputation/damaging population). +- The ability to send units to the general to increase relationship as an alternative to sending slaves. +- Unrelated minor suggestion: Could we perhaps set default unit names somewhere? Just a small thing so I don't have to change each new unit to (slave/citizen/mercenary) Legion in my Roman society whenever I make new ones. \ No newline at end of file diff --git a/src/Mods/SecExp/rebellionOptions.tw b/src/Mods/SecExp/rebellionOptions.tw index 834b91f0092fa0900d5fd2d34cbff62192e1183f..aef6f210007f6077516fb43285c2beb1a54ad299 100644 --- a/src/Mods/SecExp/rebellionOptions.tw +++ b/src/Mods/SecExp/rebellionOptions.tw @@ -287,8 +287,7 @@ We can dedicate some of our forces to the protection of the vital parts of the a <br><br> <<replenishAllUnits>> -<br> -<br> +<br><br> <<link "Proceed" "rebellionHandler">> <<set $battleResult = 4>> /* sets $battleResult value outside accepted range to avoid evaluation problems */ <<set $foughtThisWeek = 1>> diff --git a/src/Mods/SecExp/seeUnit.tw b/src/Mods/SecExp/seeUnit.tw deleted file mode 100644 index bd9769539bb0916bc37b44d90f6c5b43af821caf..0000000000000000000000000000000000000000 --- a/src/Mods/SecExp/seeUnit.tw +++ /dev/null @@ -1,372 +0,0 @@ -:: seeUnit [nobr] - -<<if $attackThisWeek == 1>> - <<set $nextButton = "Back", $nextLink = "attackOptions", $returnTo = "secBarracks">> -<<else>> - <<set $nextButton = "Back", $nextLink = "secBarracks", $returnTo = "secBarracks">> -<</if>> - -<<if $targetUnit == "secBots">> - <<set _unit = App.SecExp.getUnit("Bots")>> - <<= _unit.describe()>> - <<if $secBots.maxTroops > $secBots.troops>> - <br> - <<link "Replenish the unit" "seeUnit">> - <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * $secBotsCost), "securityExpansion")>> - <<set $secBots.troops = $secBots.maxTroops>> - <</link>> - <</if>> - <br> - <<if $secBots.maxTroops < 80>> - <br> - <<link "Improve the digital control matrix" "seeUnit">> - <<set $secBots.maxTroops += 10>> - <<run cashX(-5000, "securityExpansion")>> - <</link>> - Invest in the development of more refined controls for your drones to increase the maximum number of drones in the unit. - <br>//Costs <<print cashFormat(5000)>> per upgrade and each will increase the max by 10// - <<elseif $SF.Toggle && $SF.Active >= 1 && $secBots.maxTroops < 100 && $SecExp.edicts.SFSupportLevel >= 1>> - <br> - <<link "Refine the drone network with $SF.Lower assistance" "seeUnit">> - <<set $secBots.maxTroops += 10>> - <<run cashX(forceNeg(5000 + 10 * $secBotsUpgradeCost * $secBots.equip), "securityExpansion")>> - <</link>> - Utilize the technological developments made by $SF.Lower to further improve the control matrix of the security drones. - <br>//Costs <<print cashFormat(5000 + 10 * $secBotsUpgradeCost * $secBots.equip)>> and will increase the max by 10// - <<elseif $SF.Toggle && $SF.Active >= 1 && $SecExp.edicts.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" "seeUnit">> - <<set $secBots.equip += 1>> - <<run cashX(forceNeg(($secBotsUpgradeCost * $secBots.maxTroops) + 1000), "securityExpansion")>> - <</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.// - <<else>> - <br> - Your drones are equipped with top tier weaponry and armor. - <</if>> - <<if $SecExp.settings.showStats == 1>> - <br><<= _unit.printStats()>> - <</if>> -<<elseif $targetUnit == "militiaUnits">> - <<set _unit = App.SecExp.getUnit("Militia", $targetIndex)>> - <<= _unit.describe()>> - Rename unit <<textbox "$militiaUnits[$targetIndex].platoonName" $militiaUnits[$targetIndex].platoonName "seeUnit">> - <<if $militiaUnits[$targetIndex].maxTroops > $militiaUnits[$targetIndex].troops && $militiaFreeManpower > 0>> - <br> - <<link "Replenish unit" "seeUnit">> - <<if $militiaFreeManpower >= $militiaUnits[$targetIndex].maxTroops - $militiaUnits[$targetIndex].troops>> - <<set $militiaFreeManpower -= $militiaUnits[$targetIndex].maxTroops - $militiaUnits[$targetIndex].troops>> - <<set _expLoss = ($militiaUnits[$targetIndex].maxTroops - $militiaUnits[$targetIndex].troops) / $militiaUnits[$targetIndex].troops>> - <<set $militiaUnits[$targetIndex].training -= $militiaUnits[$targetIndex].training * _expLoss>> - <<set $militiaUnits[$targetIndex].troops = $militiaUnits[$targetIndex].maxTroops>> - <<else>> - <<set _expLoss = $militiaFreeManpower / $militiaUnits[$targetIndex].troops>> - <<set $militiaUnits[$targetIndex].training -= $militiaUnits[$targetIndex].training * _expLoss>> - <<set $militiaUnits[$targetIndex].troops += $militiaFreeManpower>> - <<set $militiaFreeManpower = 0>> - <</if>> - <</link>> - <</if>> - <br> - <<if $militiaUnits[$targetIndex].maxTroops < 50>> - <br> - <<link "Intensive officers training" "seeUnit">> - <<set $militiaUnits[$targetIndex].maxTroops += 10>> - <<run cashX(forceNeg(5000 + 10 * $equipUpgradeCost * ($militiaUnits[$targetIndex].equip + $militiaUnits[$targetIndex].commissars + $militiaUnits[$targetIndex].cyber + $militiaUnits[$targetIndex].SF)), "securityExpansion")>> - <</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// - <<else>> - <br> - Your officers reached their peak. Further training will have little impact on the number of troops they can effectively lead. - <</if>> - <<if $militiaUnits[$targetIndex].equip < 3>> - <br> - <<link "Improve weaponry and equipment" "seeUnit">> - <<set $militiaUnits[$targetIndex].equip += 1>> - <<run cashX(forceNeg(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000), "securityExpansion")>> - <</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.// - <<else>> - <br> - The unit is equipped with state of the art weaponry and equipment. - <</if>> - <<if $militiaUnits[$targetIndex].commissars == 0>> - <br> - <<link "Attach commissars to the unit" "seeUnit">> - <<set $militiaUnits[$targetIndex].commissars = 1>> - <<run cashX(forceNeg($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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" "seeUnit">> - <<set $militiaUnits[$targetIndex].commissars += 1>> - <<run cashX(forceNeg($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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.// - <<elseif $militiaUnits[$targetIndex].commissars == 1>> - <br>The unit has a commissar detachment, keeping under control the ambitions of the unit's officers. - <<else>> - <br>The unit has a perfectly trained and loyal commissar detachment, keeping under control the ambitions of the unit's officers. - <</if>> - <<if $prostheticsUpgrade >= 2 || $researchLab.advCombatPLimb == 1>> - <<if $militiaUnits[$targetIndex].cyber == 0>> - <br> - <<link "Provide enhanced cybernetic enhancements" "seeUnit">> - <<set $militiaUnits[$targetIndex].cyber += 1>> - <<run cashX(forceNeg($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 2000), "securityExpansion")>> - <</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.// - <<else>> - <br>The unit is equipped with advanced cybernetic enhancements. - <</if>> - <</if>> - <<if $militiaUnits[$targetIndex].medics == 0>> - <br> - <<link "Attach trained medics to the unit" "seeUnit">> - <<set $militiaUnits[$targetIndex].medics = 1>> - <<run cashX(forceNeg($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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 $SF.Toggle && $SF.Active >= 1>> - <<if $militiaUnits[$targetIndex].SF == 0>> - <br> - <<link "Attach Special Force advisors" "seeUnit">> - <<set $militiaUnits[$targetIndex].SF = 1>> - <<run cashX(forceNeg(($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 5000), "securityExpansion")>> - <</link>> - 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 $SF.Lower that will help the squad remain tactically aware and active. - <</if>> - <</if>> - <<if $SecExp.settings.showStats == 1>> - <br><<= _unit.printStats()>> - <</if>> -<<elseif $targetUnit == "slaveUnits">> - <<set _unit = App.SecExp.getUnit("Slaves", $targetIndex)>> - <<= _unit.describe()>> - <br> - Rename unit <<textbox "$slaveUnits[$targetIndex].platoonName" $slaveUnits[$targetIndex].platoonName "seeUnit">> - <<if $slaveUnits[$targetIndex].maxTroops > $slaveUnits[$targetIndex].troops && $menials > 0>> - <br> - <<link "Replenish unit" "seeUnit">> - <<if $menials >= $slaveUnits[$targetIndex].maxTroops - $slaveUnits[$targetIndex].troops>> - <<set $menials -= $slaveUnits[$targetIndex].maxTroops - $slaveUnits[$targetIndex].troops>> - <<set _expLoss = ($slaveUnits[$targetIndex].maxTroops - $slaveUnits[$targetIndex].troops) / $slaveUnits[$targetIndex].troops>> - <<set $slaveUnits[$targetIndex].training -= $slaveUnits[$targetIndex].training * _expLoss>> - <<set $slaveUnits[$targetIndex].troops = $slaveUnits[$targetIndex].maxTroops>> - <<else>> - <<set _expLoss = $menials / $slaveUnits[$targetIndex].troops>> - <<set $slaveUnits[$targetIndex].training -= $slaveUnits[$targetIndex].training * _expLoss>> - <<set $slaveUnits[$targetIndex].troops += $menials>> - <<set $menials = 0>> - <</if>> - <</link>> - <</if>> - <br> - <<if $slaveUnits[$targetIndex].maxTroops < 50>> - <br> - <<link "Intensive officers training" "seeUnit">> - <<set $slaveUnits[$targetIndex].maxTroops += 10>> - <<run cashX(forceNeg(5000 + 10 * $equipUpgradeCost * ($slaveUnits[$targetIndex].equip + $slaveUnits[$targetIndex].commissars + $slaveUnits[$targetIndex].cyber + $slaveUnits[$targetIndex].SF)), "securityExpansion")>> - <</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 * ($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>> - <<if $slaveUnits[$targetIndex].equip < 3>> - <br> - <<link "Improve weaponry and equipment">> - <<set $slaveUnits[$targetIndex].equip += 1>> - <<run cashX(forceNeg($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <<goto "seeUnit">> - <</link>> - Invest in better equipment for your soldiers to increase their battle effectiveness. - <br>//Costs <<print cashFormat(($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 1000)>> and will increase attack and defense value of the unit by 15% for every upgrade.// - <<else>> - <br>The unit is equipped with state of the art weaponry and equipment. - <</if>> - <<if $slaveUnits[$targetIndex].commissars == 0>> - <br> - <<link "Attach commissars to the unit" "seeUnit">> - <<set $slaveUnits[$targetIndex].commissars = 1>> - <<run cashX(forceNeg($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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" "seeUnit">> - <<set $slaveUnits[$targetIndex].commissars += 1>> - <<run cashX(forceNeg($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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.// - <<elseif $slaveUnits[$targetIndex].commissars == 1>> - <br>The unit has a commissar detachment, keeping under control the ambitions of the unit's officers. - <<else>> - <br>The unit has a perfectly trained and loyal commissar detachment, keeping under control the ambitions of the unit's officers. - <</if>> - <<if $prostheticsUpgrade >= 2 || $researchLab.advCombatPLimb == 1>> - <<if $slaveUnits[$targetIndex].cyber == 0>> - <br> - <<link "Provide enhanced cybernetic enhancements" "seeUnit">> - <<set $slaveUnits[$targetIndex].cyber += 1>> - <<run cashX(forceNeg($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 2000), "securityExpansion")>> - <</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.// - <<else>> - <br>The unit is equipped with advanced cybernetic enhancements. - <</if>> - <</if>> - <<if $slaveUnits[$targetIndex].medics == 0>> - <br> - <<link "Attach trained medics to the unit" "seeUnit">> - <<set $slaveUnits[$targetIndex].medics = 1>> - <<run cashX(forceNeg($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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 $SF.Toggle && $SF.Active >= 1>> - <<if $slaveUnits[$targetIndex].SF == 0>> - <br> - <<link "Attach Special Force advisors" "seeUnit">> - <<set $slaveUnits[$targetIndex].SF = 1>> - <<run cashX(forceNeg(($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 5000), "securityExpansion")>> - <</link>> - 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 $SF.Lower that will help the squad remain tactically aware and active. - <</if>> - <</if>> - <<if $SecExp.settings.showStats == 1>> - <br><<= _unit.printStats()>> - <</if>> -<<elseif $targetUnit == "mercUnits">> - <<set _unit = App.SecExp.getUnit("Mercs", $targetIndex)>> - <<= _unit.describe()>> - <br> - Rename unit <<textbox "$mercUnits[$targetIndex].platoonName" $mercUnits[$targetIndex].platoonName "seeUnit">> - <<if $mercUnits[$targetIndex].troops < $mercUnits[$targetIndex].maxTroops && $mercFreeManpower > 0>> - <br> - <<link "Replenish unit" "seeUnit">> - <<if $mercFreeManpower >= $mercUnits[$targetIndex].maxTroops - $mercUnits[$targetIndex].troops>> - <<set $mercFreeManpower -= $mercUnits[$targetIndex].maxTroops - $mercUnits[$targetIndex].troops>> - <<set _expLoss = ($mercUnits[$targetIndex].maxTroops - $mercUnits[$targetIndex].troops) / $mercUnits[$targetIndex].troops>> - <<set $mercUnits[$targetIndex].training -= $mercUnits[$targetIndex].training * _expLoss>> - <<set $mercUnits[$targetIndex].troops = $mercUnits[$targetIndex].maxTroops>> - <<else>> - <<set _expLoss = $mercFreeManpower / $mercUnits[$targetIndex].troops>> - <<set $mercUnits[$targetIndex].training -= $mercUnits[$targetIndex].training * _expLoss>> - <<set $mercUnits[$targetIndex].troops += $mercFreeManpower>> - <<set $mercFreeManpower = 0>> - <</if>> - <</link>> - <</if>> - <br> - <<if $mercUnits[$targetIndex].maxTroops < 50>> - <br> - <<link "Intensive officers training" "seeUnit">> - <<set $mercUnits[$targetIndex].maxTroops += 10>> - <<run cashX(forceNeg(5000 + 10 * $equipUpgradeCost * ($mercUnits[$targetIndex].equip + $mercUnits[$targetIndex].commissars + $mercUnits[$targetIndex].cyber + $mercUnits[$targetIndex].SF)), "securityExpansion")>> - <</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// - <<else>> - <br>Your officers reached their peak. Further training will have little impact on the number of troops they can effectively lead. - <</if>> - <<if $mercUnits[$targetIndex].equip < 3>> - <br> - <<link "Improve weaponry and equipment" "seeUnit">> - <<set $mercUnits[$targetIndex].equip += 1>> - <<run cashX(forceNeg(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 1000), "securityExpansion")>> - <</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.// - <<else>> - <br>The unit is equipped with state of the art weaponry and equipment. - <</if>> - <<if $mercUnits[$targetIndex].commissars == 0>> - <br> - <<link "Attach commissars to the unit" "seeUnit">> - <<set $mercUnits[$targetIndex].commissars = 1>> - <<run cashX(forceNeg($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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" "seeUnit">> - <<set $mercUnits[$targetIndex].commissars += 1>> - <<run cashX(forceNeg($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops + 1000), "securityExpansion")>> - <</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.// - <<elseif $mercUnits[$targetIndex].commissars == 1>> - <br>The unit has a commissar detachment, keeping under control the ambitions of the unit's officers. - <<else>> - <br>The unit has a perfectly trained and loyal commissar detachment, keeping under control the ambitions of the unit's officers. - <</if>> - <<if $prostheticsUpgrade >= 2 || $researchLab.advCombatPLimb == 1>> - <<if $mercUnits[$targetIndex].cyber == 0>> - <br> - <<link "Provide enhanced cybernetic enhancements" "seeUnit">> - <<set $mercUnits[$targetIndex].cyber += 1>> - <<run cashX(forceNeg($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops + 2000), "securityExpansion")>> - <</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>> - <br>The unit is equipped with advanced cybernetic enhancements. - <</if>> - <</if>> - <<if $mercUnits[$targetIndex].medics == 0>> - <br> - <<link "Attach trained medics to the unit" "seeUnit">> - <<set $mercUnits[$targetIndex].medics = 1>> - <<run cashX(forceNeg(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 5000), "securityExpansion")>> - <</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 $SF.Toggle && $SF.Active >= 1>> - <<if $mercUnits[$targetIndex].SF == 0>> - <br> - <<link "Attach Special Force advisors" "seeUnit">> - <<set $mercUnits[$targetIndex].SF = 1>> - <<run cashX(forceNeg(($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 5000), "securityExpansion")>> - <</link>> - 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 $SF.Lower that will help the squad remain tactically aware and active. - <</if>> - <</if>> - <<if $SecExp.settings.showStats == 1>> - <br><<= _unit.printStats()>> - <</if>> -<</if>> \ No newline at end of file diff --git a/src/Mods/SecExp/widgets/miscSecExpWidgets.tw b/src/Mods/SecExp/widgets/miscSecExpWidgets.tw index 868c0d95573227608e32957f8c686ff7a994426d..8f7fee5c2bab3354ba3718486844719d1710bb25 100644 --- a/src/Mods/SecExp/widgets/miscSecExpWidgets.tw +++ b/src/Mods/SecExp/widgets/miscSecExpWidgets.tw @@ -159,7 +159,7 @@ <</for>> <<if _hasLossesBots == 1 || _hasLossesM == 1 || _hasLossesS == 1 || _hasLossesMe == 1>> - <br><br><<link "Replenish all units">> + <<link "Replenish all units">> <<if _hasLossesBots == 1>> <<run cashX(-(($secBots.maxTroops - $secBots.troops) * 500), "securityExpansion")>> <<set $secBots.troops = $secBots.maxTroops>> diff --git a/src/events/intro/initNationalities.js b/src/events/intro/initNationalities.js index b34f9d8f003f924eaddb302bcae69b86d8dddcfe..ecb9fbe0686d0235dd9f121954946eb463fce6ea 100644 --- a/src/events/intro/initNationalities.js +++ b/src/events/intro/initNationalities.js @@ -96,9 +96,7 @@ App.Intro.initNationalities = function() { V.arcologyUpgrade.drones = 1; V.arcologyUpgrade.hydro = 1; if (V.secExpEnabled > 0) { - V.secBots.active = 1; - V.secBots.troops = 30; - V.secBots.maxTroops = 30; + V.secBots = App.SecExp.generateUnit("bots"); } } else if (V.PC.career === "medicine") { V.trinkets.push("a framed postsurgical x-ray"); diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index be921e5753767cd93b71fca18f57ce4b420626b7..748d8d845e215e8175a3da6668053112582177a1 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -352,11 +352,17 @@ You may review your settings before clicking "Continue" to begin.<br> <h2>Mods</h2> <<set _options = new App.UI.OptionsGroup()>> - <<run _options.addOption("The Special Force Mod is", "Toggle", $SF).addComment("This mod is initially from anon1888 but expanded by SFanon offers a lategame special (started out as security but changed to special in order to try and reduce confusion with CrimeAnon's separate Security Expansion (SecExp) mod) force, that is triggered after week 80. It is non-canon where it conflicts with canonical updates to the base game.") - .addValue("Enabled", 1).on().addValue("Disabled", 0).off()>> + <<run _options.addOption("The Special Force Mod is", "Toggle", $SF) + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("<div>This mod is initially from anon1888 but expanded by SFanon offers a lategame special (started out as security but changed to special in order to try and reduce confusion with CrimeAnon's separate Security Expansion (SecExp) mod) force, that is triggered after week 72.</div> + <div>It is non-canon where it conflicts with canonical updates to the base game.</div>") + >> - <<run _options.addOption("The Security Expansion Mod is", "secExpEnabled").addComment("This mod introduces security and crime in the arcology, as well as attacks and battles.") - .addValue("Enabled", 1).on().addValue("Disabled", 0).off()>> + <<run _options.addOption("The Security Expansion Mod is", "secExpEnabled") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("<div>This mod introduces security and crime in the arcology, as well as attacks and battles.</div> + <div>The mod can be activated in any moment, but it may result in unbalanced gameplay if activated very late in the game.<div>") + >> <<includeDOM _options.render()>> </div> diff --git a/src/gui/options/options.tw b/src/gui/options/options.tw index ffbeac3eb3930d080d1ed43fd5bb528b8e055cb0..928a523ac5de7fe46c20d28898ba559c78bcc9a2 100644 --- a/src/gui/options/options.tw +++ b/src/gui/options/options.tw @@ -389,7 +389,8 @@ <<set _options = new App.UI.OptionsGroup()>> <<run _options.addOption("The Special Force Mod is currently", "Toggle", $SF) - .addValue("Enabled", 1).on().addValue("Disabled", 0).off()>> + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("<div>This mod is triggered after week 72. It is non-canon where it conflicts with canonical updates to the base game.</div>")>> <<run _options.addOption("The Security Expansion mod is", "secExpEnabled") .addValue("Enabled", 1).on().addValue("Disabled", 0).off() diff --git a/src/gui/storyCaption.tw b/src/gui/storyCaption.tw index c73a92b0d4a98ec45195ad8eca0f36e41d353ef3..d4562a07d4b16235cf7f46c4c076745d5c430a6c 100644 --- a/src/gui/storyCaption.tw +++ b/src/gui/storyCaption.tw @@ -182,52 +182,53 @@ </div> <</if>> - <<if $secExpEnabled > 0 && ($sideBarOptions.Authority + $sideBarOptions.Security + $sideBarOptions.Crime > 0)>> + <<if $secExpEnabled == 1 && ($sideBarOptions.Authority + $sideBarOptions.Security + $sideBarOptions.Crime > 0)>> <<if $sideBarOptions.Authority > 0>> <div> - @@.darkviolet;Auth@@ | + @@.darkviolet;Auth@@ | @@.darkviolet; <<set $SecExp.core.authority = Math.clamp(Math.trunc($SecExp.core.authority), 0, 20000)>> <<if $SecExp.core.authority > 19500>> - @@color:rgb(148, 0, 211);divine will@@ + divine will <<elseif $SecExp.core.authority > 19000>> - @@color:rgb(148, 0, 211);sovereign@@ + sovereign <<elseif $SecExp.core.authority > 18000>> - @@color:rgb(148, 0, 211);monarch@@ + monarch <<elseif $SecExp.core.authority > 17000>> - @@color:rgb(148, 0, 211);tyrant@@ + tyrant <<elseif $SecExp.core.authority > 15000>> - @@color:rgb(148, 0, 211);dictator@@ + dictator <<elseif $SecExp.core.authority > 14000>> - @@color:rgb(148, 0, 211);prince@@ + prince <<elseif $SecExp.core.authority > 13000>> - @@color:rgb(183, 0, 211);master@@ + master <<elseif $SecExp.core.authority > 12000>> - @@color:rgb(183, 0, 211);leader@@ + leader <<elseif $SecExp.core.authority > 11000>> - @@color:rgb(183, 0, 211);director@@ + director <<elseif $SecExp.core.authority > 10000>> - @@color:rgb(183, 0, 211);overseer@@ + overseer <<elseif $SecExp.core.authority > 9000>> - @@color:rgb(183, 0, 211);chief@@ + chief <<elseif $SecExp.core.authority > 8000>> - @@color:rgb(183, 0, 211);manager@@ + manager <<elseif $SecExp.core.authority > 7000>> - @@color:rgb(211,0,204);principal@@ + principal <<elseif $SecExp.core.authority > 6000>> - @@color:rgb(211,0,204);auxiliary@@ + auxiliary <<elseif $SecExp.core.authority > 5000>> - @@color:rgb(211,0,204);subordinate@@ + subordinate <<elseif $SecExp.core.authority > 4000>> - @@color:rgb(211,0,204);follower@@ + follower <<elseif $SecExp.core.authority > 3000>> - @@color:rgb(211,0,204);powerless@@ + powerless <<elseif $SecExp.core.authority > 2000>> - @@color:rgb(211,0,204);toothless@@ + toothless <<elseif $SecExp.core.authority > 1000>> - @@color:rgb(211,0,204);mostly harmless@@ + mostly harmless <<else>> - @@color:rgb(211,0,204);harmless@@ + harmless <</if>> + @@ (<<= num($SecExp.core.authority)>>) <<if _Pass == "Main" && $cheatMode && $cheatModeM>> <<set _TAuth = $SecExp.core.authority>> diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index c27d239ff46364b1dc9bcdc4a2ae909ac9e108c4..9a50bee0d2bd6655f69d86b29f1a1f02a937fde5 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -52,9 +52,8 @@ <<link "Install drone security system" "Manage Arcology">> <<run cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx")>> <<set $arcologyUpgrade.drones = 1, $PC.skill.engineering += 1>> - <<if $secExpEnabled == 1>> - <<run App.SecExp.Check.general()>> - <<set $secBots.active = 1, $secBots.troops = $secBots.maxTroops = 30>> + <<if $secExpEnabled > 0>> + <<set $secBots = App.SecExp.generateUnit("bots")>> <</if>> <</link>> <<elseif $arcologyUpgrade.hydro != 1>>