diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000000000000000000000000000000000000..593158bc9e258371636f59c5cf359654c75b7a02 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,16 @@ +-add fortifications? +-finish PC wound code +-finish mercenary recruits in report +-add random crimes as events +-min rep for upgrades +-renaming of units depending on FSs +-gender fundamentalism does not allow women in army/gerder radicalism does? +-encyclopedia entries +-transport hub +-weapons manufactoring +-first battle +-make the mod toggleable + +and big ones: +-rebellions +-big battles \ No newline at end of file diff --git a/src/SecExp/SecExpBackwardCompatibility.tw b/src/SecExp/SecExpBackwardCompatibility.tw new file mode 100644 index 0000000000000000000000000000000000000000..61f2514a8237e50c055cb9b6e00ed98bceba084f --- /dev/null +++ b/src/SecExp/SecExpBackwardCompatibility.tw @@ -0,0 +1,528 @@ +:: SecExpBackwardCompatibility [nobr] + +/* base stats */ +<<if ndef $authority>> +<<set $authority = 0>> +<</if>> +<<if ndef $security>> +<<set $security = 50>> +<</if>> +<<if ndef $secRestPoint>> +<<set $secRestPoint = 40>> +<</if>> +<<if ndef $crime>> +<<set $crime = 20>> +<</if>> +<<if ndef $crimeCap>> +<<set $crimeCap = 100>> +<</if>> +<<if ndef $readiness>> +<<set $readiness = 1>> +<</if>> +<<if ndef $maxUnits>> +<<set $maxUnits = 6>> +<</if>> +<<if ndef $activeUnits>> +<<set $activeUnits = 0>> +<</if>> +<<if ndef $attackType>> +<<set $attackType = "none">> +<</if>> +<<if ndef $attackThisWeek>> +<<set $attackThisWeek = 0>> +<</if>> +<<if ndef $lastAttackWeeks>> +<<set $lastAttackWeeks = 0>> +<</if>> +<<if ndef $hasFoughtOnce>> +<<set $hasFoughtOnce = 0>> +<</if>> +<<if ndef $PCvictoryStreak>> +<<set $PCvictoryStreak = 0>> +<</if>> +<<if ndef $PClossStreak>> +<<set $PClossStreak = 0>> +<</if>> +<<if ndef $oldFlux>> +<<set $oldFlux = 0>> +<</if>> + +/* edicts */ +<<if ndef $edictsUpkeep>> +<<set $edictsUpkeep = 0>> +<</if>> +<<if ndef $edictsAuthUpkeep>> +<<set $edictsAuthUpkeep = 0>> +<</if>> +<<if ndef $alternativeRents>> +<<set $alternativeRents = 0>> +<</if>> +<<if ndef $enslavementRights>> +<<set $enslavementRights = 0>> +<</if>> +<<if ndef $securityExemption>> +<<set $securityExemption = 0>> +<</if>> +<<if ndef $sellData>> +<<set $sellData = 0>> +<</if>> +<<if ndef $propCampaignBoost>> +<<set $propCampaignBoost = 0>> +<</if>> +<<if ndef $slaveWatch>> +<<set $slaveWatch = 0>> +<</if>> +<<if ndef $subsidyChurch>> +<<set $subsidyChurch = 0>> +<</if>> +<<if ndef $limitImmigration>> +<<set $limitImmigration = 0>> +<</if>> +<<if ndef $openBorders>> +<<set $openBorders = 0>> +<</if>> +<<if ndef $limitSubhumans>> +<<set $limitSubhumans = 0>> +<</if>> +<<if ndef $slavesOfficers>> +<<set $slavesOfficers = 0>> +<</if>> +<<if ndef $martialSchool>> +<<set $martialSchool = 0>> +<</if>> +<<if ndef $discountMercenaries>> +<<set $discountMercenaries = 0>> +<</if>> +<<if ndef $militiaFounded>> +<<set $militiaFounded = 0>> +<</if>> +<<if ndef $recruitVolunteers>> +<<set $recruitVolunteers = 0>> +<</if>> +<<if ndef $militaryService>> +<<set $militaryService = 0>> +<</if>> +<<if ndef $militarizedSociety>> +<<set $militarizedSociety = 0>> +<</if>> +<<if ndef $militaryExemption>> +<<set $militaryExemption = 0>> +<</if>> +<<if ndef $lowerRquirements>> +<<set $lowerRquirements = 0>> +<</if>> +<<if ndef $noSubhumansInArmy>> +<<set $noSubhumansInArmy = 0>> +<</if>> +<<if ndef $pregExemption>> +<<set $pregExemption = 0>> +<</if>> +<<if ndef $eliteOfficers>> +<<set $eliteOfficers = 0>> +<</if>> +<<if ndef $liveTargets>> +<<set $liveTargets = 0>> +<</if>> +<<if ndef $legionTradition>> +<<set $legionTradition = 0>> +<</if>> +<<if ndef $eagleWarriors>> +<<set $eagleWarriors = 0>> +<</if>> +<<if ndef $ronin>> +<<set $ronin = 0>> +<</if>> +<<if ndef $sunTzu>> +<<set $sunTzu = 0>> +<</if>> + +/* buildings */ +<<if ndef $secHQ>> +<<set $secHQ = 0>> +<</if>> +<<if ndef $secBarracks>> +<<set $secBarracks = 0>> +<</if>> +<<if ndef $secBarracksUpgrades>> +<<set $secBarracksUpgrades ={ + size: 0, + luxury: 0, + training: 0}>> +<</if>> +<<if ndef $secHelots>> +<<set $secHelots = 0>> +<</if>> +<<if ndef $reqHelots>> +<<set $reqHelots = 20>> +<</if>> +<<if ndef $secUpgrades >> +<<set $secUpgrades = { + nanoCams: 0, + cyberBots: 0, + eyeScan: 0, + cryptoAnalyzer: 0}>> +<</if>> +<<if ndef $crimeUpgrades>> +<<set $crimeUpgrades = { + autoTrial: 0, + autoArchive: 0, + worldProfiler: 0, + advForensic: 0}>> +<</if>> +<<if ndef $intelUpgrades>> + <<set $intelUpgrades = { + sensors: 0, + radar: 0, + signalIntercept: 0}>> +<</if>> +<<if ndef $readinessUpgrades>> +<<set $readinessUpgrades = { + earlyWarn: 0, + rapidPlatforms: 0, + pathways: 0, + rapidVehicles: 0}>> +<</if>> +<<if ndef $propHub>> + <<set $propHub = 0>> +<</if>> +<<if ndef $propCampaign>> +<<set $propCampaign = 0>> +<</if>> +<<if ndef $propFocus>> +<<set $propFocus = "none">> +<</if>> +<<if ndef $miniTruth>> +<<set $miniTruth = 0>> +<</if>> +<<if ndef $fakeNews>> +<<set $fakeNews = 0>> +<</if>> +<<if ndef $controlLeaks>> +<<set $controlLeaks = 0>> +<</if>> +<<if ndef $secretService>> +<<set $secretService = 0>> +<</if>> +<<if ndef $blackOps>> +<<set $blackOps = 0>> +<</if>> +<<if ndef $marketInfiltration>> +<<set $marketInfiltration = 0>> +<</if>> +<<if ndef $propHubUpkeep>> +<<set $propHubUpkeep = $facilityCost>> +<</if>> +<<if ndef $secHQUpkeep>> +<<set $secHQUpkeep = $facilityCost>> +<</if>> +<<if ndef $secBarracksUpkeep>> +<<set $secBarracksUpkeep = $facilityCost>> +<</if>> +<<if ndef $upgradeUpkeep>> +<<set $upgradeUpkeep = 40>> +<</if>> + +/* armed forces stats */ +<<if ndef $targetUnit>> +<<set $targetUnit = 0>> +<</if>> +<<if ndef $targetIndex>> +<<set $targetIndex = 0>> +<</if>> +<<if ndef $secBotsCost>> +<<set $secBotsCost = 500>> +<</if>> +<<if ndef $secBotsUpgradeCost>> +<<set $secBotsUpgradeCost = 250>> +<</if>> +<<if ndef $equipUpgradeCost>> +<<set $equipUpgradeCost = 250>> +<</if>> +<<if ndef $maxTroops>> +<<set $maxTroops = 30>> +<</if>> +<<if ndef $militiaFounded>> +<<set $militiaFounded = 0>> +<</if>> +<<if ndef $militiaRecruitment>> +<<set $militiaRecruitment = 0>> +<</if>> +<<if ndef $militiaTotalManpower>> +<<set $militiaTotalManpower = 0>> +<</if>> +<<if ndef $militiaFreeManpower>> +<<set $militiaFreeManpower = 0>> +<</if>> +<<if ndef $militiaEmployedManpower>> +<<set $militiaEmployedManpower = 0>> +<</if>> +<<if ndef $militiaTotalCasualties>> +<<set $militiaTotalCasualties = 0>> +<</if>> +<<if ndef $slavesOfficers>> +<<set $slavesOfficers = 0>> +<</if>> +<<if ndef $slavesEmployedManpower>> +<<set $slavesEmployedManpower = 0>> +<</if>> +<<if ndef $slavesTotalCasualties>> +<<set $slavesTotalCasualties = 0>> +<</if>> +<<if ndef $slavesMaxTroops>> +<<set $slavesMaxTroops = 30>> +<</if>> +<<if ndef $mercTotalManpower>> +<<set $mercTotalManpower = 0>> +<</if>> +<<if ndef $mercFreeManpower>> +<<set $mercFreeManpower = 0>> +<</if>> +<<if ndef mercEmployedManpower>> +<<set $mercEmployedManpower = 0>> +<</if>> +<<if ndef $mercTotalCasualties>> +<<set $mercTotalCasualties = 0>> +<</if>> +<<if ndef $militiaLoyalty>> +<<set $militiaLoyalty = 0>> +<</if>> +<<if ndef $slaveArmyLoyalty>> +<<set $slaveArmyLoyalty = 0>> +<</if>> +<<if ndef $mercLoyalty>> +<<set $mercLoyalty = 0>> +<</if>> +<<if ndef $soldierUpkeep>> +<<set $soldierUpkeep = 10>> +<</if>> + +/* upgrades */ +<<if ndef $riskSim>> +<<set $riskSim = 0>> +<</if>> +<<if ndef $riskSimExpectedAttack>> +<<set $riskSimExpectedAttack = "none">> +<</if>> +<<if ndef $perimeterDrones>> +<<set $perimeterDrones = 0>> +<</if>> + +/* battle relevant vars */ +<<if ndef $chosenTactic>> + <<set $chosenTactic = "none">> +<</if>> +<<if ndef $leadingTroops>> + <<set $leadingTroops = "none">> +<</if>> +<<if ndef $attackTroops>> + <<set $attackTroops = 0>> +<</if>> +<<if ndef $attackEquip>> + <<set $attackEquip = 0>> +<</if>> +<<if ndef $deployableUnits>> + <<set $deployableUnits = 0>> +<</if>> +<<if ndef $deployedUnits>> + <<set $deployedUnits = 0>> +<</if>> +<<if ndef $deployingBots>> + <<set $deployingBots = 0>> +<</if>> +<<if ndef $deployingMilitia>> + <<set $deployingMilitia = 0>> +<</if>> +<<if ndef $deployingSlaves>> + <<set $deployingSlaves = 0>> +<</if>> +<<if ndef $deployingMercs>> + <<set $deployingMercs = 0>> +<</if>> +<<if ndef $battleTerrain>> + <<set $battleTerrain = "none">> +<</if>> +<<if ndef $maxTurns>> + <<set $maxTurns = 10>> +<</if>> +<<if ndef $battleResult>> + <<set $battleResult = 4>> /* sets $battleResult value outside accepted range (-3,3) to avoid evaluation problems */ +<</if>> +<<if ndef $losses>> + <<set $losses = 0>> +<</if>> +<<if ndef $enemyLosses>> + <<set $enemyLosses = 0>> +<</if>> +<<if ndef $battleTurns>> + <<set $battleTurns = 0>> +<</if>> +<<if ndef $bribeCost>> + <<set $bribeCost = 0>> +<</if>> +<<if ndef $tacticsSuccessful>> + <<set $tacticsSuccessful = 0>> +<</if>> +<<if ndef $leaderWounded>> + <<set $leaderWounded = 0>> /* 0=no wound, 1=mute, 2=blind, 3=amputee, 4=health */ +<</if>> +<<if ndef $gainedCombat>> + <<set $gainedCombat == 0>> +<</if>> +<<if ndef $gainedWarfare>> +<<set $gainedWarfare = 0>> +<</if>> +<<if ndef $PCWounded>> +<<set $PCWounded = 0>> +<</if>> +<<if ndef $PCWoundCooldown>> +<<set $PCWoundCooldown = 0>> +<</if>> + +/* statistics */ +<<if ndef $baseBribePerAttacker>> +<<set $baseBribePerAttacker = 5>> +<</if>> +<<if ndef $equipMod>> +<<set $equipMod = 0.15>> +<</if>> +<<if ndef $secBotsBaseAttack>> +<<set $secBotsBaseAttack = 9>> +<</if>> +<<if ndef $secBotsBaseDefense>> +<<set $secBotsBaseDefense = 5>> +<</if>> +<<if ndef $secBotsMorale>> +<<set $secBotsMorale = 200>> +<</if>> +<<if ndef $secBotsBaseHp>> +<<set $secBotsBaseHp = 4>> +<</if>> +<<if ndef $militiaBaseAttack>> +<<set $militiaBaseAttack = 7>> +<</if>> +<<if ndef $militiaBaseDefense>> +<<set $militiaBaseDefense = 5>> +<</if>> +<<if ndef $militiaBaseMorale>> +<<set $militiaBaseMorale = 140>> +<</if>> +<<if ndef $militiaBaseHp>> +<<set $militiaBaseHp = 3>> +<</if>> +<<if ndef $slaveBaseAttack>> +<<set $slaveBaseAttack = 9>> +<</if>> +<<if ndef $slaveBaseDefense>> +<<set $slaveBaseDefense = 3>> +<</if>> +<<if ndef $slaveBaseMorale>> +<<set $slaveBaseMorale = 110>> +<</if>> +<<if ndef $slaveBaseHp>> +<<set $slaveBaseHp = 3>> +<</if>> +<<if ndef $mercBaseAttack>> +<<set $mercBaseAttack = 8>> +<</if>> +<<if ndef $mercBaseDefense>> +<<set $mercBaseDefense = 4>> +<</if>> +<<if ndef $mercBaseMorale>> +<<set $mercBaseMorale = 125>> +<</if>> +<<if ndef $mercBaseHp>> +<<set $mercBaseHp = 4>> +<</if>> +<<if ndef $raBaseAttack>> +<<set $raBaseAttack = 7>> +<</if>> +<<if ndef $raBaseDefense>> +<<set $raBaseDefense = 2>> +<</if>> +<<if ndef $raBaseMorale>> +<<set $raBaseMorale = 100>> +<</if>> +<<if ndef $raBaseHp>> +<<set $raBaseHp = 2>> +<</if>> +<<if ndef $fcBaseAttack>> +<<set $fcBaseAttack = 6>> +<</if>> +<<if ndef $fcBaseDefense>> +<<set $fcBaseDefense = 4>> +<</if>> +<<if ndef $fcBaseMorale>> +<<set $fcBaseMorale = 130>> +<</if>> +<<if ndef $fcBaseHp>> +<<set $fcBaseHp = 3>> +<</if>> +<<if ndef $owBaseAttack>> +<<set $owBaseAttack = 8>> +<</if>> +<<if ndef $owBaseDefense>> +<<set $owBaseDefense = 4>> +<</if>> +<<if ndef $owBaseMorale>> +<<set $owBaseMorale = 110>> +<</if>> +<<if ndef $owBaseHp>> +<<set $owBaseHp = 2>> +<</if>> +<<if ndef $ffBaseAttack>> +<<set $ffBaseAttack = 9>> +<</if>> +<<if ndef $ffBaseDefense>> +<<set $ffBaseDefense = 2>> +<</if>> +<<if ndef $ffBaseMorale>> +<<set $ffBaseMorale = 160>> +<</if>> +<<if ndef $ffBaseHp>> +<<set $ffBaseHp = 2>> +<</if>> + +/* units */ +<<if ndef $secBots>> + <<if $arcologyUpgrade.drones == 0>> + <<set $secBots = { + active: 0, + isDeployed: 0, + troops: 0, + maxTroops: 0, + equip: 0} >> + <<elseif $arcologyUpgrade.drones == 1>> + <<set $secBots = { + active: 1, + isDeployed: 0, + troops: 50, + maxTroops: 50, + equip: 0} >> + <</if>> +<<elseif def $secBots>> + <<if $arcologyUpgrade.drones == 0>> + <<set $secBots = { + active: 0, + isDeployed: 0, + troops: 0, + maxTroops: 0, + equip: 0} >> + <<elseif $arcologyUpgrade.drones == 1>> + <<set $secBots = { + active: 1, + isDeployed: 0, + troops: 50, + maxTroops: 50, + equip: 0} >> + <</if>> +<</if>> + +<<if ndef $militiaUnits>> + <<set $militiaUnits = []>> +<</if>> +<<if ndef $slaveUnits>> + <<set $slaveUnits = []>> +<</if>> +<<if ndef $mercUnits>> + <<set $mercUnits = []>> +<</if>> \ No newline at end of file diff --git a/src/SecExp/attackGenerator.tw b/src/SecExp/attackGenerator.tw new file mode 100644 index 0000000000000000000000000000000000000000..d4a0fb39829d7438a03cfe5a8b62b4403b78701d --- /dev/null +++ b/src/SecExp/attackGenerator.tw @@ -0,0 +1,259 @@ +:: attackGenerator [nobr] + +/* _attackChance value is the chance out of 100 of an attack happening this week */ +/* attacks are deactivated if the arcology is in the middle of the ocean, security drones are not around yet or the last attack happened within 3 weeks */ +<<if $terrain == "oceanic" || $arcologyUpgrade.drones != 1 || $lastAttackWeeks < 3>> + <<set _attackChance = 0>> +<<else>> + <<if $week < 30>> + <<set _attackChance = 5>> + <<elseif $week < 60>> + <<set _attackChance = 8>> + <<elseif $week < 90>> + <<set _attackChance = 12>> + <<elseif $week < 120>> + <<set _attackChance =16>> + <<else>> + <<set _attackChance =20>> + <</if>> + <<if $lastAttackWeeks >= 15>> + <<set _attackChance += 5>> + <</if>> +<</if>> +/* testing <<set _attackChance = 100>> */ + +/* Rolls to see if attack happens this week */ +/* raiders are attracted by low security */ +/* the old world by "degenerate" future societies */ +/* free Cities by high prosperity */ +/* freedom fighters by high slave/citizen ratio */ +<<if random(1,100) <= _attackChance>> + <<set $attackThisWeek = 1>> + <<set $lastAttackWeeks = 0>> + <<set $leadingTroops = "assistant">> + <<set $deployableUnits = 1 + $readiness>> /* +1 is for testing */ + <<set $chosenTactic = either("Bait and Bleed", "Guerrilla", "Choke Points", "Interior Lines", "Pincer Manouver", "Defense In Depth", "Blitzkrieg", "Human Wave")>> + + /* _type is the chance out of 100 of an attack of that type happening */ + <<set _raider = 25>> + <<set _oldWorld = 25>> + <<set _freeCity = 25>> + <<set _free = 25>> + /* old world */ + <<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSArabianRevivalist != "unset" || + $arcologies[0].FSChineseRevivalist != "unset" || $arcologies[0].FSEgyptianRevivalist != "unset" || $arcologies[0].FSAztecRevivalist != "unset" || + $arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderRadicalist != "unset" || $arcologies[0].FSPastoralist != "unset" || + $arcologies[0].FSChattelReligionist != "unset">> + <<set _oldWorld += 15>> + <<set _raider -= 5>> + <<set _freeCity -= 5>> + <<set _free -= 5>> + <<elseif ($arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSArabianRevivalist != "unset" || + $arcologies[0].FSChineseRevivalist != "unset" || $arcologies[0].FSEgyptianRevivalist != "unset" || $arcologies[0].FSAztecRevivalist != "unset") && + ($arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderRadicalist != "unset" || $arcologies[0].FSPastoralist != "unset" || + $arcologies[0].FSChattelReligionist != "unset")>> + <<set _oldWorld += 24>> + <<set _raider -= 8>> + <<set _freeCity -= 8>> + <<set _free -= 8>> + <</if>> + /* freedom fighter */ + <<if $ASlaves > $ACitizens * 2>> + <<set _oldWorld -= 8>> + <<set _raider -= 8>> + <<set _freeCity -= 8>> + <<set _free += 24>> + <<elseif $ASlaves > $ACitizens * 1.2 || $arcologies[0].FSDegradationist != "unset">> + <<set _oldWorld -= 5>> + <<set _raider -= 5>> + <<set _freeCity -= 5>> + <<set _free += 15>> + <</if>> + /* free cities */ + <<if $arcologies[0].prosperity >= 10 && $arcologies[0].prosperity < 20>> + <<set _oldWorld -= 5>> + <<set _raider -= 5>> + <<set _freeCity += 15>> + <<set _free -= 5>> + <<elseif $arcologies[0].prosperity >= 20>> + <<set _oldWorld -= 8>> + <<set _raider -= 8>> + <<set _freeCity += 24>> + <<set _free -= 8>> + <</if>> + /* raiders */ + <<if $security <= 50>> + <<set _oldWorld -= 5>> + <<set _raider += 15>> + <<set _freeCity -= 5>> + <<set _free -= 5>> + <<elseif $security <= 25>> + <<set _oldWorld -= 8>> + <<set _raider += 24>> + <<set _freeCity -= 8>> + <<set _free -= 8>> + <</if>> + + /* makes the actual roll */ + <<set _roll = random(1,100)>> + <<if _roll <= _raider>> + <<set $attackType = "raiders">> + <<elseif _roll <= _raider + _oldWorld>> + <<set $attackType = "old world">> + <<elseif _roll <= _raider + _oldWorld + _freeCity>> + <<set $attackType = "free city">> + <<elseif _roll <= _raider + _oldWorld + _freeCity + _free>> + <<set $attackType = "freedom fighters">> + <</if>> +<<else>> + <<set $lastAttackWeeks++>> +<</if>> + +/* To be implemented */ +/* rebellionChance value is the chance out of 100 of an attack happening this week */ +<<set _rebellionChance = 0>> + +/* Rolls to see if rebellion happens this week */ +<<if random(1,100) < _rebellionChance>> + <<set _slaveReb = 0>> + <<set _citReb = 0>> + <<set _mercReb = 0>> +<</if>> + + +/* if an attack happens */ +<<if $attackType != "none">> + <<if $attackType == "raiders">> + <<if $terrain == "urban">> + <<set $battleTerrain = either("outskirts","urban","wasteland")>> + <<elseif $terrain == "rural">> + <<set $battleTerrain = either("hills","outskirts","rural","wasteland")>> + <<elseif $terrain == "ravine">> + <<set $battleTerrain = either("mountains","outskirts","hills","wasteland")>> + <<elseif $terrain == "marine">> + <<set $battleTerrain = either("coast","outskirts","hills","wasteland")>> + <<else>> + <<set $battleTerrain = "err">> + <</if>> + <<set $attackTroops = random(40,80)>> + <<if $week < 30>> + <<set $attackTroops *= random(1,2)>> + <<elseif $week < 60>> + <<set $attackTroops *= random(1,3)>> + <<elseif $week < 90>> + <<set $attackTroops *= random(2,3)>> + <<elseif $week < 120>> + <<set $attackTroops *= random(2,4)>> + <<else>> + <<set $attackTroops *= random(3,5)>> + <</if>> + <<if $week < 60>> + <<set $attackEquip = random(0,1)>> + <<elseif $week < 90>> + <<set $attackEquip = random(0,2)>> + <<elseif $week < 120>> + <<set $attackEquip = random(0,3)>> + <<else>> + <<set $attackEquip = random(1,3)>> + <</if>> + <<elseif $attackType == "free city">> + <<if $terrain == "urban">> + <<set $battleTerrain = either("outskirts","urban","wasteland")>> + <<elseif $terrain == "rural">> + <<set $battleTerrain = either("hills","outskirts","rural","wasteland")>> + <<elseif $terrain == "ravine">> + <<set $battleTerrain = either("mountains","outskirts","hills","wasteland")>> + <<elseif $terrain == "marine">> + <<set $battleTerrain = either("coast","outskirts","hills","wasteland")>> + <<else>> + <<set $battleTerrain = "err">> + <</if>> + <<set $attackTroops = random(20,40)>> + <<if $week < 30>> + <<set $attackTroops *= random(1,2)>> + <<elseif $week < 60>> + <<set $attackTroops *= random(1,3)>> + <<elseif $week < 90>> + <<set $attackTroops *= random(2,3)>> + <<elseif $week < 120>> + <<set $attackTroops *= random(2,4)>> + <<else>> + <<set $attackTroops *= random(3,5)>> + <</if>> + <<if $week < 60>> + <<set $attackEquip = random(0,1)>> + <<elseif $week < 90>> + <<set $attackEquip = random(0,3)>> + <<elseif $week < 120>> + <<set $attackEquip = random(1,3)>> + <<else>> + <<set $attackEquip = random(2,4)>> + <</if>> + <<elseif $attackType == "old world">> + <<if $terrain == "urban">> + <<set $battleTerrain = either("outskirts","urban","wasteland")>> + <<elseif $terrain == "rural">> + <<set $battleTerrain = either("hills","outskirts","rural","wasteland")>> + <<elseif $terrain == "ravine">> + <<set $battleTerrain = either("mountains","outskirts","hills","wasteland")>> + <<elseif $terrain == "marine">> + <<set $battleTerrain = either("coast","outskirts","hills","wasteland")>> + <<else>> + <<set $battleTerrain = "err">> + <</if>> + <<set $attackTroops = random(25,50)>> + <<if $week < 30>> + <<set $attackTroops *= random(1,2)>> + <<elseif $week < 60>> + <<set $attackTroops *= random(1,3)>> + <<elseif $week < 90>> + <<set $attackTroops *= random(2,3)>> + <<elseif $week < 120>> + <<set $attackTroops *= random(2,4)>> + <<else>> + <<set $attackTroops *= random(3,5)>> + <</if>> + <<if $week < 60>> + <<set $attackEquip = random(0,1)>> + <<elseif $week < 90>> + <<set $attackEquip = random(0,3)>> + <<elseif $week < 120>> + <<set $attackEquip = random(1,3)>> + <<else>> + <<set $attackEquip = random(2,4)>> + <</if>> + <<elseif $attackType == "freedom fighters">> + <<if $terrain == "urban">> + <<set $battleTerrain = either("outskirts","urban","wasteland")>> + <<elseif $terrain == "rural">> + <<set $battleTerrain = either("hills","outskirts","rural","wasteland")>> + <<elseif $terrain == "ravine">> + <<set $battleTerrain = either("mountains","outskirts","hills","wasteland")>> + <<elseif $terrain == "marine">> + <<set $battleTerrain = either("coast","outskirts","hills","wasteland")>> + <<else>> + <<set $battleTerrain = "err">> + <</if>> + <<set $attackTroops = random(30,60)>> + <<if $week < 30>> + <<set $attackTroops *= random(1,2)>> + <<elseif $week < 60>> + <<set $attackTroops *= random(1,3)>> + <<elseif $week < 90>> + <<set $attackTroops *= random(2,3)>> + <<elseif $week < 120>> + <<set $attackTroops *= random(2,4)>> + <<else>> + <<set $attackTroops *= random(3,5)>> + <</if>> + <<if $week < 60>> + <<set $attackEquip = random(0,1)>> + <<elseif $week < 90>> + <<set $attackEquip = random(0,3)>> + <<elseif $week < 120>> + <<set $attackEquip = random(1,3)>> + <<else>> + <<set $attackEquip = random(2,4)>> + <</if>> + <</if>> +<</if>> \ No newline at end of file diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw new file mode 100644 index 0000000000000000000000000000000000000000..b583fe7696efb2d2e3da97c23f52108b871b5f5d --- /dev/null +++ b/src/SecExp/attackHandler.tw @@ -0,0 +1,923 @@ +:: attackHandler [nobr] + +<<if $battleResult != 1 && $battleResult != -1>> /* if the player did not select bribe or surrender */ +/*Init*/ +<<set _turn = 0>> +<<set _attack = 0>> +<<set _defense = 0>> +<<set _morale = 0>> +<<set _hp = 0>> +<<set _baseHp = 0>> +<<set _losses = 0>> +<<set _enemyAttack = 0>> +<<set _enemyDefense = 0>> +<<set _enemyMorale = 0>> +<<set _enemyHp = 0>> +<<set _enemyBaseHp = 0>> +<<set _woundChance = 5>> /* leader has a base chance of 5% to get wounded */ +<<set _tacChance = 0.5>> /* by default tactics have a 50% chance of succeeding */ +<<set _atkMod = 1>> +<<set _defMod = 1>> +<<set _militiaMod = 1>> +<<set _slaveMod = 1>> +<<set _mercMod = 1>> +<<set _enemyMod = 1>> +<<set _expBonus = 0>> + +/* Leaders */ +<<if $leadingTroops == "PC">> + <<if $authority <= 2500 && $authority > 1000>> + <<set _slaveMod -= 0.10>> + <<elseif $authority <= 1000>> + <<set _slaveMod -= 0.25>> + <<elseif $authority >= 5000 && $authority < 15000>> + <<set _slaveMod += 0.10>> + <<elseif $authority >= 15000>> + <<set _slaveMod += 0.25>> + <</if>> + <<if $PC.career == "escort" || $PC.career == "servant">> + <<set _slaveMod += 0.10>> + <<elseif $PC.career == "slaver">> + <<set _slaveMod -= 0.10>> + <</if>> + <<if $rep <= 2500 && $rep > 1000>> + <<set _militiaMod -= 0.10>> + <<elseif $rep <= 1000>> + <<set _militiaMod -= 0.25>> + <<elseif $rep >= 5000 && $rep < 15000>> + <<set _militiaMod += 0.10>> + <<elseif $rep >= 15000>> + <<set _militiaMod += 0.25>> + <</if>> + <<if $PC.career == "celebrity" || $PC.career == "capitalist">> + <<set _militiaMod += 0.10>> + <<elseif $PC.career == "gang" || $PC.career == "escort">> + <<set _militiaMod -= 0.10>> + <</if>> + <<if $mercLoyalty <= 25>> + <<set _mercMod -= 0.10>> + <<elseif $mercLoyalty <= 10>> + <<set _mercMod -= 0.25>> + <<elseif $mercLoyalty >= 50 && $mercLoyalty < 75>> + <<set _mercMod += 0.10>> + <<elseif $mercLoyalty >= 75>> + <<set _mercMod += 0.25>> + <</if>> + <<if $PC.career == "mercenary">> + <<set _mercMod += 0.10>> + <<elseif $PC.career == "wealth" || $PC.career == "servant">> + <<set _mercMod -= 0.10>> + <</if>> + <<if $rep >= 15000>> + <<set _enemyMod -= 0.10>> + <</if>> + <<if $PC.warfare <= 25 && $PC.warfare > 10>> + <<set _atkMod -= 0.15>> + <<set _tacChance -= 0.15>> + <<elseif $PC.warfare <= 10>> + <<set _atkMod -= 0.20>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.30>> + <<elseif $PC.warfare >= 50 && $PC.warfare >= 50>> + <<set _atkMod += 0.15>> + <<set _tacChance += 0.15>> + <<elseif $PC.warfare >= 75>> + <<set _atkMod += 0.20>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.30>> + <</if>> + /* 80% chance of increasing warfare */ + <<if $PC.warfare < 100 && random(1,100) <= 80>> + <<set $gainedWarfare = 1>> + <<set $PC.warfare += 10>> + <<set $PC.warfare = Math.clamp($PC.warfare,-100,100)>> + <</if>> + /* does the PC get wounded? */ + <<if $PC.career == "mercenary" || $PC.career == "gang">> + <<set _woundChance -= 3>> + <</if>> + <<if $PC.physicalAge >= 60>> + <<set _woundChance += 1>> + <</if>> + <<if $PC.belly > 5000>> + <<set _woundChance += 1>> + <</if>> + <<if $PC.boobsBonus >= 2>> + <<set _woundChance += 1>> + <</if>> + <<if $PC.butt >= 2>> + <<set _woundChance += 1>> + <</if>> + <<if $PC.preg >= 30>> + <<set _woundChance += 1>> + <</if>> + <<if $PC.balls == 2>> + <<set _woundChance += 1>> + <</if>> + <<if $PC.ballsImplant >= 2>> + <<set _woundChance += 1>> + <</if>> + <<if random(1,100) <= _woundChance>> + <<set $leaderWounded = 1>> + <<set _militiaMod -= 0.2>> + <<set _slaveMod -= 0.2>> + <<set _mercMod -= 0.2>> + <<set _enemyMod += 0.2>> + <<set $PCWounded = 1>> + <</if>> +<<elseif $leadingTroops == "assistant">> + <<if $rep < 10000 && $authority < 10000>> + <<set _militiaMod -= 0.15>> + <<set _slaveMod -= 0.15>> + <<set _mercMod -= 0.15>> + <</if>> + <<if $assistantPower == 0>> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.20>> + <<elseif $assistantPower == 2>> + <<set _atkMod += 0.15>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.30>> + <</if>> +<<elseif $leadingTroops == "bodyguard">> + <<if $Bodyguard.devotion < -20>> + <<set _slaveMod -= 0.15>> + <<elseif $Bodyguard.devotion >= 50>> + <<set _slaveMod += 0.15>> + <</if>> + <<if ($rep < 10000 && $authority < 10000) || $Bodyguard.prestige < 1>> + <<set _militiaMod -= 0.15>> + <<set _mercMod -= 0.15>> + <<elseif $Bodyguard.prestige >= 2>> + <<set _militiaMod += 0.10>> + <<set _mercMod += 0.10>> + <</if>> + <<if (setup.bodyguardCareers.includes($Bodyguard.career) || setup.HGCareers.includes($Bodyguard.career)) && $Bodyguard.intelligence == 3>> + <<set _atkMod += 0.25>> + <<set _defMod += 0.25>> + <<set _tacChance += 0.50>> + <<elseif $Bodyguard.intelligence == 3>> + <<set _atkMod += 0.20>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.35>> + <<elseif (setup.bodyguardCareers.includes($Bodyguard.career) || setup.HGCareers.includes($Bodyguard.career)) && $Bodyguard.intelligence == 2>> + <<set _atkMod += 0.15>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.25>> + <<elseif $Bodyguard.intelligence == 2>> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.20>> + <<elseif setup.bodyguardCareers.includes($Bodyguard.career) || setup.HGCareers.includes($Bodyguard.career) && $Bodyguard.intelligence >= 1>> + <<set _atkMod += 0.10>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.15>> + <<elseif !(setup.bodyguardCareers.includes($Bodyguard.career) && setup.HGCareers.includes($Bodyguard.career)) || $Bodyguard.intelligence <= -2>> + <<set _atkMod -= 0.15>> + <<set _defMod -= 0.15>> + <<set _tacChance -= 0.30>> + <<elseif $Bodyguard.intelligence <= -2>> + <<set _atkMod -= 0.15>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.25>> + <<elseif !(setup.bodyguardCareers.includes($Bodyguard.career) && setup.HGCareers.includes($Bodyguard.career)) || $Bodyguard.intelligence <= -1>> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.20>> + <<elseif $Bodyguard.intelligence <= -1>> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.15>> + <</if>> + /* does she get wounded? */ + <<if $Bodyguard.combatSkill == 1>> + <<set _woundChance -= 3>> + <</if>> + <<if $Bodyguard.health >= 50>> + <<set _woundChance -= 2>> + <</if>> + <<if $Bodyguard.weight > 130>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.muscles < -30>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.eyes <= -2>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.heels == 1>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.boobs >= 1400>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.butt >= 6>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.preg >= 30>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.dick >= 8>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.balls >= 8>> + <<set _woundChance += 1>> + <</if>> + <<if $Bodyguard.intelligence <= -3>> + <<set _woundChance += 1>> + <</if>> + <<if random(1,100) <= _woundChance>> + <<set $leaderWounded = 1>> + <<set _militiaMod -= 0.2>> + <<set _slaveMod -= 0.2>> + <<set _mercMod -= 0.2>> + <<set _enemyMod += 0.2>> + <<set $woundType = random(1,10)>> + <<if $woundType == 1>> + <<set $Bodyguard.voice = 0>> + <<elseif $woundType == 2>> + <<set $Bodyguard.eyes = -2>> + <<elseif $woundType == 3>> + <<set $Bodyguard.amp = 1>> + <<elseif $woundType >= 4>> + <<if $Bodyguard.health >= -60>> + <<set $Bodyguard.health -= 30>> + <<else>> + <<set $Bodyguard.health -= Math.abs(90 - $Bodyguard.health)>> + <</if>> + <</if>> + <</if>> + /* 60% chance of getting combat skill if not already have it */ + <<if $Bodyguard.combatSkill == 0 && random(1,100) <= 60>> + <<set $gainedCombat == 1>> + <<set $Bodyguard.combatSkill = 1>> + <</if>> +<<elseif $leadingTroops == "headGirl">> + <<if $HeadGirl.devotion < -20>> + <<set _slaveMod -= 0.15>> + <<elseif $HeadGirl.devotion > 51>> + <<set _slaveMod += 0.15>> + <</if>> + <<if ($rep < 10000 && $authority < 10000) || $HeadGirl.prestige < 1>> + <<set _militiaMod -= 0.15>> + <<set _mercMod -= 0.15>> + <<elseif $HeadGirl.prestige >= 2>> + <<set _militiaMod += 0.10>> + <<set _mercMod += 0.10>> + <</if>> + <<<<if (setup.bodyguardCareers.includes($HeadGirl.career) || setup.HGCareers.includes($HeadGirl.career)) && $HeadGirl.intelligence == 3>> + <<set _atkMod += 0.25>> + <<set _defMod += 0.25>> + <<set _tacChance += 0.50>> + <<elseif $HeadGirl.intelligence == 3>> + <<set _atkMod += 0.20>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.35>> + <<elseif (setup.bodyguardCareers.includes($HeadGirl.career) || setup.HGCareers.includes($HeadGirl.career)) && $HeadGirl.intelligence == 2>> + <<set _atkMod += 0.15>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.25>> + <<elseif $HeadGirl.intelligence == 2>> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.20>> + <<elseif setup.bodyguardCareers.includes($HeadGirl.career) || setup.HGCareers.includes($HeadGirl.career) && $HeadGirl.intelligence >= 1>> + <<set _atkMod += 0.10>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.15>> + <<elseif !(setup.bodyguardCareers.includes($HeadGirl.career) && setup.HGCareers.includes($HeadGirl.career)) || $HeadGirl.intelligence <= -2>> + <<set _atkMod -= 0.15>> + <<set _defMod -= 0.15>> + <<set _tacChance -= 0.30>> + <<elseif $HeadGirl.intelligence <= -2>> + <<set _atkMod -= 0.15>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.25>> + <<elseif !(setup.bodyguardCareers.includes($HeadGirl.career) && setup.HGCareers.includes($HeadGirl.career)) || $HeadGirl.intelligence <= -1>> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.20>> + <<elseif $HeadGirl.intelligence <= -1>> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.15>> + <</if>> + /* does she get wounded? */ + <<if $HeadGirl.combatSkill == 1>> + <<set _woundChance -= 3>> + <</if>> + <<if $HeadGirl.health >= 50>> + <<set _woundChance -= 2>> + <</if>> + <<if $HeadGirl.weight > 130>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.muscles < -30>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.eyes <= -2>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.heels == 1>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.boobs >= 1400>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.butt >= 6>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.preg >= 30>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.dick >= 8>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.balls >= 8>> + <<set _woundChance += 1>> + <</if>> + <<if $HeadGirl.intelligence <= -3>> + <<set _woundChance += 1>> + <</if>> + <<if random(1,100) <= _woundChance>> + <<set $leaderWounded = 1>> + <<set _militiaMod -= 0.2>> + <<set _slaveMod -= 0.2>> + <<set _mercMod -= 0.2>> + <<set _enemyMod += 0.2>> + <<set $woundType = random(1,10)>> + <<if $woundType == 1>> + <<set $HeadGirl.voice = 0>> + <<elseif $woundType == 2>> + <<set $HeadGirl.eyes = -2>> + <<elseif $woundType == 3>> + <<set $HeadGirl.amp = 1>> + <<elseif $woundType >= 4>> + <<set $HeadGirl.health -= 40>> + <</if>> + <</if>> + /* 60% chance of getting combat skill if nto already have it */ + <<if $HeadGirl.combatSkill == 0 && random(1,100) <= 60>> + <<set $gainedCombat == 1>> + <<set $HeadGirl.combatSkill = 1>> + <</if>> +<<elseif $leadingTroops == "citizen">> + <<if $arcologies[0].FSDegradationist == "unset" && $arcologies[0].FSPaternalist == "unset">> + <<set _militiaMod += 0.15>> + <<set _slaveMod -= 0.15>> + <<elseif $arcologies[0].FSPaternalist != "unset">> + <<set _militiaMod += 0.15>> + <<set _slaveMod += 0.10>> + <<elseif $arcologies[0].FSDegradationist != "unset">> + <<set _militiaMod += 0.15>> + <<set _slaveMod -= 0.35>> + <</if>> + <<if $arcologies[0].FSRomanRevivalist != "unset">> + <<set _mercMod += 0.10>> + <<else>> + <<set _mercMod -= 0.10>> + <</if>> + <<set _atkMod += either(-1,1) * random(10) * 0.1>> + <<set _defMod += either(-1,1) * random(10) * 0.1>> + <<set _tacChance += either(-1,1) * random(20) * 0.1>> +<<elseif $leadingTroops == "mercenary">> + <<set _mercMod += 0.10>> + <<if $arcologies[0].FSRomanRevivalist != "unset">> + <<set _militiaMod += 0.10>> + <<else>> + <<set _militiaMod -= 0.10>> + <</if>> + <<if $arcologies[0].FSDegradationist != "unset">> + <<set _slaveMod -= 0.35>> + <</if>> + <<set _atkMod += random(15) * 0.1>> + <<set _defMod += random(15) * 0.1>> + <<set _tacChance += random(30) * 0.1>> +<</if>> +/* Terrain and Tactics */ +<<if $battleTerrain == "urban">> + <<if $chosenTactic == "Bait and Bleed">> + <<set _atkMod += 0.15>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Guerrilla">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Choke Points">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Interior Lines">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.15>> + <<elseif $chosenTactic == "Pincer Manouver">> + <<set _atkMod -= 0.05>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.15>> + <<elseif $chosenTactic == "Defense In Depth">> + <<set _atkMod -= 0.05>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.10>> + <<elseif $chosenTactic == "Blitzkrieg">> + <<set _atkMod -= 0.15>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.25>> + <<elseif $chosenTactic == "Human Wave">> + <<set _atkMod -= 0.15>> + <<set _defMod -= 0.15>> + <<set _tacChance -= 0.30>> + <</if>> +<<elseif $battleTerrain == "rural">> + <<if $chosenTactic == "Bait and Bleed">> + <<set _atkMod -= 0.05>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.15>> + <<elseif $chosenTactic == "Guerrilla">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.20>> + <<elseif $chosenTactic == "Choke Points">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.15>> + <<set _tacChance -= 0.25>> + <<elseif $chosenTactic == "Interior Lines">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Pincer Manouver">> + <<set _atkMod += 0.15>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Defense In Depth">> + <<set _atkMod += 0.15>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.30>> + <<elseif $chosenTactic == "Blitzkrieg">> + <<set _atkMod += 0.15>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Human Wave">> + <<set _atkMod += 0.20>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.25>> + <</if>> +<<elseif $battleTerrain == "hills">> + <<if $chosenTactic == "Bait and Bleed">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.10>> + <<elseif $chosenTactic == "Guerrilla">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.15>> + <<elseif $chosenTactic == "Choke Points">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.20>> + <<elseif $chosenTactic == "Interior Lines">> + <<set _atkMod -= 0.05>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.10>> + <<elseif $chosenTactic == "Pincer Manouver">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.15>> + <<elseif $chosenTactic == "Defense In Depth">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.15>> + <<elseif $chosenTactic == "Blitzkrieg">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Human Wave">> + <<set _atkMod -= 0.15>> + <<set _defMod -= 0.15>> + <<set _tacChance -= 0.30>> + <</if>> +<<elseif $battleTerrain == "coast">> + <<if $chosenTactic == "Bait and Bleed">> + <<set _atkMod -= 0.05>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.10>> + <<elseif $chosenTactic == "Guerrilla">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.10>> + <<elseif $chosenTactic == "Choke Points">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.15>> + <<elseif $chosenTactic == "Interior Lines">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.20>> + <<elseif $chosenTactic == "Pincer Manouver">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.20>> + <<elseif $chosenTactic == "Defense In Depth">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.20>> + <<elseif $chosenTactic == "Blitzkrieg">> + <<set _atkMod -= 0.05>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.10>> + <<elseif $chosenTactic == "Human Wave">> + <<set _atkMod += 0.05>> + <<set _defMod -= 0.05>> + <</if>> +<<elseif $battleTerrain == "outskirts">> + <<if $chosenTactic == "Bait and Bleed">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.15>> + <<set _tacChance -= 0.25>> + <<elseif $chosenTactic == "Guerrilla">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.05>> + <<set _tacChance -= 0.15>> + <<elseif $chosenTactic == "Choke Points">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Interior Lines">> + <<set _atkMod += 0.15>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Pincer Manouver">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.15>> + <<elseif $chosenTactic == "Defense In Depth">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Blitzkrieg">> + <<set _atkMod += 0.10>> + <<set _defMod -= 0.05>> + <<set _tacChance += 0.05>> + <<elseif $chosenTactic == "Human Wave">> + <<set _atkMod += 0.10>> + <<set _defMod -= 0.10>> + <</if>> +<<elseif $battleTerrain == "mountains">> + <<if $chosenTactic == "Bait and Bleed">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Guerrilla">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Choke Points">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.20>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Interior Lines">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.20>> + <<elseif $chosenTactic == "Pincer Manouver">> + <<set _atkMod += 0.10>> + <<set _defMod -= 0.05>> + <<set _tacChance += 0.05>> + <<elseif $chosenTactic == "Defense In Depth">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.20>> + <<elseif $chosenTactic == "Blitzkrieg">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.20>> + <<elseif $chosenTactic == "Human Wave">> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set _tacChance -= 0.20>> + <</if>> +<<elseif $battleTerrain == "wasteland">> + <<if $chosenTactic == "Bait and Bleed">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.10>> + <<elseif $chosenTactic == "Guerrilla">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.15>> + <<elseif $chosenTactic == "Choke Points">> + <<set _atkMod -= 0.10>> + <<set _defMod += 0.05>> + <<set _tacChance -= 0.05>> + <<elseif $chosenTactic == "Interior Lines">> + <<set _atkMod += 0.10>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Pincer Manouver">> + <<set _atkMod += 0.15>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.25>> + <<elseif $chosenTactic == "Defense In Depth">> + <<set _atkMod += 0.05>> + <<set _defMod += 0.10>> + <<set _tacChance += 0.15>> + <<elseif $chosenTactic == "Blitzkrieg">> + <<set _atkMod += 0.15>> + <<set _defMod += 0.15>> + <<set _tacChance += 0.30>> + <<elseif $chosenTactic == "Human Wave">> + <<set _atkMod += 0.20>> + <<set _defMod += 0.05>> + <<set _tacChance += 0.25>> + <</if>> +<</if>> + +<<if $chosenTactic == "Bait and Bleed">> + <<if $attackType == "raiders">> + <<set _tacChance -= 0.10>> + <<elseif $attackType == "free city">> + <<set _tacChance += 0.10>> + <<elseif $attackType == "old world">> + <<set _tacChance += 0.25>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance -= 0.15>> + <</if>> +<<elseif $chosenTactic == "Guerrilla">> + <<if $attackType == "raiders">> + <<set _tacChance -= 0.20>> + <<elseif $attackType == "free city">> + <<set _tacChance += 0.15>> + <<elseif $attackType == "old world">> + <<set _tacChance += 0.25>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance -= 0.25>> + <</if>> +<<elseif $chosenTactic == "Choke Points">> + <<if $attackType == "raiders">> + <<set _tacChance += 0.25>> + <<elseif $attackType == "free city">> + <<set _tacChance -= 0.05>> + <<elseif $attackType == "old world">> + <<set _tacChance -= 0.10>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance += 0.05>> + <</if>> +<<elseif $chosenTactic == "Interior Lines">> + <<if $attackType == "raiders">> + <<set _tacChance -= 0.15>> + <<elseif $attackType == "free city">> + <<set _tacChance += 0.15>> + <<elseif $attackType == "old world">> + <<set _tacChance += 0.20>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance -= 0.10>> + <</if>> +<<elseif $chosenTactic == "Pincer Manouver">> + <<if $attackType == "raiders">> + <<set _tacChance += 0.15>> + <<elseif $attackType == "free city">> + <<set _tacChance += 0.10>> + <<elseif $attackType == "old world">> + <<set _tacChance -= 0.10>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance += 0.15>> + <</if>> +<<elseif $chosenTactic == "Defense In Depth">> + <<if $attackType == "raiders">> + <<set _tacChance -= 0.20>> + <<elseif $attackType == "free city">> + <<set _tacChance += 0.10>> + <<elseif $attackType == "old world">> + <<set _tacChance += 0.20>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance -= 0.05>> + <</if>> +<<elseif $chosenTactic == "Blitzkrieg">> + <<if $attackType == "raiders">> + <<set _tacChance += 0.10>> + <<elseif $attackType == "free city">> + <<set _tacChance -= 0.20>> + <<elseif $attackType == "old world">> + <<set _tacChance += 0.25>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance -= 0.10>> + <</if>> +<<elseif $chosenTactic == "Human Wave">> + <<if $attackType == "raiders">> + <<set _tacChance -= 0.10>> + <<elseif $attackType == "free city">> + <<set _tacChance += 0.10>> + <<elseif $attackType == "old world">> + <<set _tacChance -= 0.15>> + <<elseif $attackType == "freedom fighters">> + <<set _tacChance += 0.10>> + <</if>> +<</if>> + +/* Calculates if tactics are successful */ +<<if random(1,100) <= _tacChance * 100>> + <<set _enemyMod -= 0.30>> + <<set _militiaMod += 0.20>> + <<set _slaveMod += 0.20>> + <<set _mercMod += 0.20>> + <<set _atkMod += 0.10>> + <<set _defMod += 0.10>> + <<set $tacticsSuccessful == 1>> +<<else>> + <<set _enemyMod += 0.20>> + <<set _militiaMod -= 0.20>> + <<set _slaveMod -= 0.20>> + <<set _mercMod -= 0.20>> + <<set _atkMod -= 0.10>> + <<set _defMod -= 0.10>> + <<set $tacticsSuccessful == 0>> +<</if>> + +/* enemy morale mods */ +<<if $week < 30>> + <<set _enemyMod += 0.15>> +<<elseif $week < 60>> + <<set _enemyMod += 0.30>> +<<elseif $week < 90>> + <<set _enemyMod += 0.45>> +<<elseif $week < 120>> + <<set _enemyMod += 0.60>> +<<else>> + <<set _enemyMod += 0.75>> +<</if>> + +<<set _secBotsMorale = 0>> +<<set _militiaMorale = 0>> +<<set _slaveMorale = 0>> +<<set _mercMorale = 0>> + +/* calculates PC army stats */ +<<if $secBots.isDeployed == 1>> + <<set _attack += ($secBotsBaseAttack + $secBotsBaseAttack * $secBots.equip * $equipMod) * _atkMod>> + <<set _defense += ($secBotsBaseDefense + $secBotsBaseDefense * $secBots.equip * $equipMod) * _defMod>> + <<set _hp += $secBotsBaseHp * $secBots.troops>> +<</if>> +<<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].isDeployed == 1>> + <<if $militiaUnits[_i].training <= 33>> + <<set _expBonus = 0>> + <<elseif $militiaUnits[_i].training <= 66>> + <<set _expBonus = 0.25>> + <<else>> + <<set _expBonus = 0.50>> + <</if>> + <<set _attack += ($militiaBaseAttack + $militiaBaseAttack * $militiaUnits[_i].equip * $equipMod + $militiaBaseAttack * _expBonus) * _atkMod>> + <<set _defense += ($militiaBaseDefense + $militiaBaseDefense * $militiaUnits[_i].equip * $equipMod + $militiaBaseDefense * _expBonus) * _defMod>> + <<set _hp += ($militiaBaseHp + $militiaBaseHp * $militiaUnits[_i].medics * $equipMod) * $militiaUnits[_i].troops>> + <</if>> +<</for>> +<<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].isDeployed == 1>> + <<if $slaveUnits[_i].training <= 33>> + <<set _expBonus = 0>> + <<elseif $slaveUnits[_i].training <= 66>> + <<set _expBonus = 0.25>> + <<else>> + <<set _expBonus = 0.50>> + <</if>> + <<set _attack += ($slaveBaseAttack + $slaveBaseAttack * $slaveUnits[_i].equip * $equipMod + $slaveBaseAttack * _expBonus) * _atkMod>> + <<set _defense += ($slaveBaseDefense + $slaveBaseDefense * $slaveUnits[_i].equip * $equipMod + $slaveBaseDefense * _expBonus) * _defMod>> + <<set _hp += ($slaveBaseHp + $slaveBaseHp * $slaveUnits[_i].medics * 0.25) * $slaveUnits[_i].troops>> + <</if>> +<</for>> +<<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].isDeployed == 1>> + <<if $mercUnits[_i].training <= 33>> + <<set _expBonus = 0>> + <<elseif $mercUnits[_i].training <= 66>> + <<set _expBonus = 0.25>> + <<else>> + <<set _expBonus = 0.50>> + <</if>> + <<set _attack += ($mercBaseAttack + $mercBaseAttack * $mercUnits[_i].equip * $equipMod + $mercBaseAttack * _expBonus) * _atkMod>> + <<set _defense += ($mercBaseDefense + $mercBaseDefense * $mercUnits[_i].equip * $equipMod + $mercBaseDefense * _expBonus) * _defMod>> + <<set _hp += ($mercBaseHp + $mercBaseHp * $mercUnits[_i].medics * 0.25) * $mercUnits[_i].troops>> + <</if>> +<</for>> + +/* morale and baseHp calculation */ +<<set _morale = ($secBotsMorale * $deployingBots + _militiaMorale * _militiaMod * $deployingMilitia + $slaveBaseMorale * _slaveMod * $deployingSlaves + $mercBaseMorale * _mercMod * $deployingMercs) / ($deployingBots + $deployingMilitia +$deployingSlaves + $deployingMercs)>> +<<set _morale = _morale + _morale * $secBarracksUpgrades.luxury * 0.05>> /* barracks bonus */ +<<set _baseHp = ($secBotsBaseHp * $deployingBots + $militiaBaseHp * $deployingMilitia + $slaveBaseHp * $deployingSlaves + $mercBaseHp * $deployingMercs) / ($deployingBots + $deployingMilitia +$deployingSlaves + $deployingMercs)>> + +/* calculates enemy army stats */ +<<if $attackType == "raiders">> + <<set _enemyAttack = $raBaseAttack + $raBaseAttack * $attackEquip * $equipMod>> + <<set _enemyDefense = $raBaseDefense + $raBaseDefense * $attackEquip * $equipMod>> + <<set _enemyMorale = $raBaseMorale* _enemyMod>> + <<set _enemyHp = $raBaseHp * $attackTroops>> + <<set _enemyBaseHp = $raBaseHp>> +<<elseif $attackType == "free city">> + <<set _enemyAttack = $fcBaseAttack + $fcBaseAttack * $attackEquip * $equipMod>> + <<set _enemyDefense = $fcBaseDefense + $fcBaseDefense * $attackEquip * $equipMod>> + <<set _enemyMorale = $fcBaseMorale * _enemyMod>> + <<set _enemyHp = $fcBaseHp * $attackTroops>> + <<set _enemyBaseHp = $fcBaseHp>> +<<elseif $attackType == "old world">> + <<set _enemyAttack = $owBaseAttack + $owBaseAttack * $attackEquip * $equipMod>> + <<set _enemyDefense = $owBaseDefense + $owBaseDefense * $attackEquip * $equipMod>> + <<set _enemyMorale = $owBaseMorale * _enemyMod>> + <<set _enemyHp = $owBaseHp * $attackTroops>> + <<set _enemyBaseHp = $owBaseHp>> +<<elseif $attackType == "freedom fighters">> + <<set _enemyAttack = $ffBaseAttack + $ffBaseAttack * $attackEquip * $equipMod>> + <<set _enemyDefense = $ffBaseDefense + $ffBaseDefense * $attackEquip * $equipMod>> + <<set _enemyMorale = $ffBaseMorale * _enemyMod>> + <<set _enemyHp = $ffBaseHp * $attackTroops>> + <<set _enemyBaseHp = $ffBaseHp>> +<</if>> + +Debug: +<br>attack: _attack +<br>defense: _defense +<br>Hp: _hp +<br>Morale: _morale +<br>atkMod: _atkMod +<br>defMod: _defMod +<br>baseHp: _baseHp +<br>militiaMod: _militiaMod +<br>slaveMod: _slaveMod +<br>mercMod: _mercMod +<br>tacChance: _tacChance +<br>tactic Successful?: <<if $tacticsSuccessful == 1>> yes <<else>> no<</if>> +<br>enemyAttack: _enemyAttack +<br>enemyDefense: _enemyDefense +<br>enemyMorale: _enemyMorale +<br>enemyHp: _enemyHp +<br>enemyBaseHp: _enemyBaseHp +<br>enemyMod: _enemyMod + + +/* simulates the combat by pitting attk against def */ +<<for _i = 0; _i < $maxTurns; _i++>> + <br><br> + Debug: turn: _i + /* player army attacks */ + <<set _damage = _attack - _enemyDefense>> + <br> + Debug: player damage: _damage + <<set _enemyHp -= _damage>> + <br> + Debug: remaining enemyHp: _enemyHp + <<set $enemyLosses += _damage / _enemyBaseHp>> + <<set _enemyMorale -= (_damage + _damage / _enemyBaseHp)>> + <br> + Debug: remaining enemyMorale: _enemyMorale + <<if _enemyHp <= 0 || _enemyMorale <= 0>> + <<set $battleResult = 3>> + <<set $battleTurns = _i>> + <<break>> + <</if>> + + /* attacker army attacks */ + <<set _damage = _enemyAttack - _defense>> + <br> + Debug: enemy damage: _damage + <<set _hp -= _damage>> + <br> + Debug: remaining hp: _hp + <<set $losses += _damage / _baseHp>> + <<set _morale -= (_damage + _losses)>> + <br> + Debug: remaining morale: _morale + <<if _hp <= 0 || _morale <= 0>> + <<set $battleResult = -3>> + <<set $battleTurns = _i>> + <<break>> + <</if>> +<</for>> +<<if $battleResult != 3 && $battleResult != -3>> + <<if _morale > _enemyMorale>> + <<set $battleResult = 2>> + <<elseif _morale < _enemyMorale>> + <<set $battleResult = -2>> + <</if>> +<</if>> +<<else>> + Debug: bribery/surrender chosen + <<if $cash >= $bribeCost>> /* if there's enough cash there's a 10% chance bribery fails. If there isn't there's instead a 50% chance it fails */ + <<if random(1,100) <= 10>> + <<set $battleResult = 0>> + <</if>> + <<else>> + <<if random(1,100) <= 50>> + <<set $battleResult = 0>> + <</if>> + <</if>> +<</if>> /* closes bribe/surrender check */ + +<<if $battleResult > 3 || $battleResult < -3>> + Error: failed to determine battle result +<</if>> + +<br><br> +<<link "proceed">> +<<goto "attackReport">> +<</link>> \ No newline at end of file diff --git a/src/SecExp/attackOptions.tw b/src/SecExp/attackOptions.tw new file mode 100644 index 0000000000000000000000000000000000000000..74ae6bf53f86066d8ab9e246370afea7f4d9d0a2 --- /dev/null +++ b/src/SecExp/attackOptions.tw @@ -0,0 +1,357 @@ +:: attackOptions [nobr] + +<strong>Attack Imminent</strong> +<hr> +The ominous message dominates the screens of your office, <<print $assistantName>> quickly gathers all information available to prepare for battle. +<<if $attackType == "raiders">> + <<if $recon >= 1>> + A disorganized horde of raiders is coming to your city. To such jackals your arcology surely looks like an appetizing morsel. + Fortunately you knew of their coming, thanks to your recon systems. + <<else>> + Some of your citizens saw the disorganized horde of raiders coming towards the city and quickly reported it. To such jackals your arcology surely looks like an appetizing morsel. + <</if>> + <br> + Raiders are roaming gangs of bandits, preying on the vulnerable supply lines of free cities and old world nations. They are rarely equipped with decent armaments and even more rarely have any formal military training, but they make up for that with high mobility and numbers. +<<elseif $attackType == "free city">> + <<if $recon >= 1>> + A menacing column of consumed mercenaries and slavers is coming to your city. Another free city is ready to use their best tools to hit a dangerous competitor where it hurts. + Fortunately you knew of their coming, thanks to your recon systems. + <<else>> + Some of your citizens saw the menacing column of consumed mercenaries and slavers and rushed to your office to bring the grim news. Another free city is ready to use their best tools to bring down a dangerous competitor. + <</if>> + <br> + Free City expeditions are usually composed of mercenaries hired to take down sensible supplies or infrastructure in order to damage the enemies of their contractor. They have on average good equipment and training, together with decent mobility, making them a formidable force. Their biggest weakness however is their low numbers. +<<elseif $attackType == "freedom fighters">> + <<if $recon >= 1>> + A dangerous looking army of guerrillas is gathering just outside the arcology. Fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire. + Fortunately you knew of their coming, thanks to your recon systems. + <<else>> + Some of your citizens saw the dangerous looking army of guerrillas is gathering just outside the arcology. Fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire. + <</if>> + <br> + Freedom Fighters are groups of individuals fighting to rid the planet of "evils" such as the free cities and their way of life. Lacking the strenght to assault one directly they fight guerrilla style slowly starving to death their enemies. They are rarely well equipped, but with good training and mobility they are not a threat that can be taken lightly. +<<elseif $attackType == "old world">> + <<if $recon >= 1>> + A diciplined yet dusty, scruffy old world army is approaching the confines of your arcology. There's nothing better than a good war to unite the electorate and your arcology is just the perfect target. + Fortunately you knew of their coming, thanks to your recon systems. + <<else>> + Some of your citizens saw the diciplined yet dusty, scruffy old world army is approaching the confines of your arcology. There's nothing better than a good war to unite the electorate and your arcology is just the perfect target. + <</if>> + <br> + Old world expeditions are usually sent to secure resources and trade routs for their nation or, more often, to provide their citizens with a boogey man to be scared of. They are usually decently equipped and trained, which together with their generous numbers make them a tough nut to crack. They however often lack in mobility. +<</if>> + +<br><br> + +It seems your troops and your adversary will fight +<<if $battleTerrain == "rural">> + in <strong>the rural land</strong> surrounding the free city. +<<elseif $battleTerrain == "hills">> + on <strong>the hills</strong> around the free city. +<<elseif $battleTerrain == "coast">> + along <strong>the coast</strong> just outside the free city. +<<elseif $battleTerrain == "outskirts">> + right against <strong>the walls of the arcology.</strong> +<<elseif $battleTerrain == "mountains">> + in <strong>the mountains</strong> overlooking the arcology. +<<elseif $battleTerrain == "wasteland">> + in <strong>the wastelands</strong> outside the free city territory. +<</if>> +<<set _expectedEquip = 0>> +<<if $recon == 3>> + Your recon capabilities are top notch. The information collected will be most likely correct or very close to be so:<<set _expectedEquip = $attackEquip + random(-1,1)>> +<<elseif $recon == 2>> + Your recon capabilities are decent. The information collected will be mostly close to the truth:<<set _expectedEquip = $attackEquip + random(-1,2)>> +<<elseif $recon == 1>> + Your recon capabilities are fairly low. The information collected will be quite inaccurate:<<set _expectedEquip = $attackEquip + random(-2,2)>> +<<else>> + Your recon capabilities are almost non-existent. The information collected will be wild guesses at best:<<set _expectedEquip = $attackEquip + random(-2,3)>> +<</if>> +approximately <strong><<print Math.round($attackTroops * (1 + either(-1,1) * (random(3,4) - $recon) * 0.1))>> men</strong> are coming, they seems to be +<<if _expectedEquip <= 0>> + <strong>poorly armed</strong>. old rusty small arms are the norm with just a few barely working civilian vehicles. +<<elseif _expectedEquip == 1>> + <strong>lightly armed</strong>. mostly small arms with some repurposed civilian vehicles and a scattered few machine guns. There's no sign of heavy vehicles, artillery or aircrafts. +<<elseif _expectedEquip == 2>> + <strong>decently armed</strong>. good quality small arms, machine guns a few mortars. There seems to be some heavy military vehicles coming as well. +<<elseif _expectedEquip == 3>> + <strong>well armed</strong>. high quality small arms, snipers, demolitions teams, heavy duty machine guns and mortars. Heavy military vehicles are numerous and a few artillery piecies are accompaning the detachment. +<<elseif _expectedEquip == 4>> + <strong>extremely well armed</strong>. excellent small arms and specialized teams with heavy duty infantry support weapons. Heavy presence of armored military vehicles, artillery pieces and even some attack helicopters. +<</if>> + +<hr> + +You quickly lay down a plan of action: +<br><br> + +/* leader assignment */ +<span id="leader"><strong><<print $assistantName>></strong></span> will lead your troops. + <br> + <<link "Personally join the battle">> + <<set $leadingTroops = "PC">> + <<replace "#leader">><strong><<print $PC.name>></strong><</replace>> + <</link>> + | + <<link "Let $assistantName lead the troops">> + <<set $leadingTroops = "assistant">> + <<replace "#leader">><strong><<print $assistantName>></strong><</replace>> + <</link>> + <<if $Bodyguard != 0 && $slavesOfficers == 1>> + | + <<link "Let your bodyguard lead your troops">> + <<set $leadingTroops = "bodyguard">> + <<replace "#leader">><strong><<print $Bodyguard.slaveName>></strong><</replace>> + <</link>> + <</if>> + <<if $HeadGirl != 0 && $slavesOfficers == 1>> + | + <<link "Let your head girl lead your troops">> + <<set $leadingTroops = "headGirl">> + <<replace "#leader">><strong><<print $HeadGirl.slaveName>></strong><</replace>> + <</link>> + <</if>> + <<if $militiaCreated == 1>> + | + <<link "Let the citizens' militia officers lead the troops">> + <<set $leadingTroops = "citizen">> + <<replace "#leader">><strong>The citizens' militia commander</strong><</replace>> + <</link>> + <</if>> + <<if $mercenaries > 0>> + | + <<link "Let the mercenary officers lead the troops">> + <<set $leadingTroops = "mercenary">> + <<replace "#leader">><strong>The mercenary commander</strong><</replace>> + <</link>> + <</if>> + +/* troop deployment */ +<br><br> +With your current readiness level you can <<if $deployedUnits > 0>>still<</if>> send <strong><<print $deployableUnits>></strong> units. +<br>Deployable units: +<<set _mL = $militiaUnits.length>> +<<set _sL = $slaveUnits.length>> +<<set _meL = $mercUnits.length>> +<<if $deployableUnits > 0>> + <<if $secBots.active == 1 && $secBots.isDeployed == 0 && $secBots.troops > 0>> + <br> + <<secBotsDescription>> + <br> + <<link "Deploy the unit">> + <<set $secBots.isDeployed = 1>> + <<set $deployableUnits-->> + <<set $deployedUnits++>> + <<set $deployingBots = 1>> + <<goto "attackOptions">> + <</link>> + <</if>> + <<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].active == 1 && $militiaUnits[_i].isDeployed == 0 && $militiaUnits[_i].troops > 0>> + <br> + <<militiaUnitsDescription $militiaUnits[_i]>> + <br> + <<link "Deploy the unit">> + <<set $militiaUnits[_i].isDeployed = 1>> + <<set $deployableUnits-->> + <<set $deployedUnits++>> + <<goto "attackOptions">> + <</link>> + <</if>> + <</for>> + <<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].active == 1 && $slaveUnits[_i].isDeployed == 0 && $slaveUnits[_i].troops > 0>> + <br> + <<slaveUnitsDescription $slaveUnits[_i]>> + <br> + <<link "Deploy the unit">> + <<set $slaveUnits[_i].isDeployed = 1>> + <<set $deployableUnits-->> + <<set $deployedUnits++>> + <<goto "attackOptions">> + <</link>> + <</if>> + <</for>> + <<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].active == 1 && $mercUnits[_i].isDeployed == 0 && $mercUnits[_i].troops > 0>> + <br> + <<mercUnitsDescription $mercUnits[_i]>> + <br> + <<link "Deploy the unit">> + <<set $mercUnits[_i].isDeployed = 1>> + <<set $deployableUnits-->> + <<set $deployedUnits++>> + <<goto "attackOptions">> + <</link>> + <</if>> + <</for>> +<<else>> + <br> + Unit roster full. +<</if>> + +<br><br> + +Units about to be deployed: +<<if $deployedUnits > 0>> + <<if $secBots.isDeployed == 1>> + <br> + <<secBotsDescription>> + <br> + <<link "Remove the unit">> + <<set $secBots.isDeployed = 0>> + <<set $deployableUnits++>> + <<set $deployedUnits-->> + <<set $deployingBots = 0>> + <<goto "attackOptions">> + <</link>> + <</if>> + <<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].isDeployed == 1>> + <br> + <<militiaUnitsDescription $militiaUnits[_i]>> + <br> + <<link "Remove the unit">> + <<set $militiaUnits[_i].isDeployed = 0>> + <<set $deployableUnits++>> + <<set $deployedUnits-->> + <<goto "attackOptions">> + <</link>> + <</if>> + <</for>> + <<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].isDeployed == 1>> + <br> + <<slaveUnitsDescription $slaveUnits[_i]>> + <br> + <<link "Remove the unit">> + <<set $slaveUnits[_i].isDeployed = 0>> + <<set $deployableUnits++>> + <<set $deployedUnits-->> + <<goto "attackOptions">> + <</link>> + <</if>> + <</for>> + <<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].isDeployed == 1>> + <br> + <<mercUnitsDescription $mercUnits[_i]>> + <br> + <<link "Remove the unit">> + <<set $mercUnits[_i].isDeployed = 0>> + <<set $deployableUnits++>> + <<set $deployedUnits-->> + <<goto "attackOptions">> + <</link>> + <</if>> + <</for>> +<</if>> +<<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].isDeployed == 1>> + <<set $deployingMilitia = 1>> + <<break>> + <</if>> +<</for>> +<<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].isDeployed == 1>> + <<set $deployingSlaves = 1>> + <<break>> + <</if>> +<</for>> +<<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].isDeployed == 1>> + <<set $deployingMercs = 1>> + <<break>> + <</if>> +<</for>> + +<br><br> + +/* tactics */ +For this battle you choose to follow <span id="tactic"><strong><<print $chosenTactic>></strong></span> tactics. +<br><br> +Defensive tactics +<br> +<<link "Bait and Bleed">> + <<set $chosenTactic = "Bait and Bleed">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Combines bait and switch tactics with guerriglia style assaults, with the objective of slowly bleed the enemy.// +<br> +<<link "Guerrilla">> + <<set $chosenTactic = "Guerrilla">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Involves using terrain knowledge and small fast attacks to hinder and weaken the enemy.// +<br> +<<link "Choke Points">> + <<set $chosenTactic = "Choke Points">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Involves using terrain knowledge and strong fortifications in order to stop the enemy on its track.// +<br> +<<link "Interior Lines">> + <<set $chosenTactic = "Interior Lines">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Involves exploiting a defender's shorter logistics lines and redeployment times in order to keep the enemy pressured.// +<br> +<<link "Pincer Manouver">> + <<set $chosenTactic = "Pincer Manouver">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Involves letting the enemy push back the centre in order to envelop their formation.// +<br> +<<link "Defense In Depth">> + <<set $chosenTactic = "Defense In Depth">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Involves letting the enemy gain terrain to gain tactical superiority by alternating between delaying actions and small counterattacks.// +<br> +Offensive Tactics +<br> +<<link "Blitzkrieg">> + <<set $chosenTactic = "Blitzkrieg">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Involves breaking the front of the enemy with a fast armored force concentrated into a small area.// +<br> +<<link "Human Wave">> + <<set $chosenTactic = "Human Wave">> + <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> +<</link>> +<br> //Involves assaulting the enemy with large numbers of infantry to overwhelm their lines.// +<br> +<br> +<<if $deployedUnits > 0>> + <<link "Send your orders">> + <<set $battleResult = 4>> /* sets $battleResult value outside accepted range to avoid evaluation problems */ + <<goto "attackHandler">> + <</link>> +<<else>> + You need at least a unit in your roster to proceed to battle. +<</if>> +<br> +<<link "Surrender">> + <<set $battleResult = -1>> + <<goto "attackHandler">> +<</link>> +<br> +/* calculates bribe cost */ +<<if $week <= 30>> + <<set $bribeCost = 5000 + $baseBribePerAttacker * $attackTroops>> +<<elseif $week <= 30>> + <<set $bribeCost = 10000 + $baseBribePerAttacker * $attackTroops>> +<<elseif $week <= 30>> + <<set $bribeCost = 15000 + $baseBribePerAttacker * $attackTroops>> +<<elseif $week <= 30>> + <<set $bribeCost = 20000 + $baseBribePerAttacker * $attackTroops>> +<<elseif $week <= 30>> + <<set $bribeCost = 25000 + $baseBribePerAttacker * $attackTroops>> +<</if>> + +<<link "Attempt to bribe">> + <<set $battleResult = 1>> + <<goto "attackHandler">> +<</link>> +<br> //Will cost around ¤<<print Math.round($bribeCost * (1 + either(-1,1) * random(2) * 0.1))>>.// \ No newline at end of file diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw new file mode 100644 index 0000000000000000000000000000000000000000..437a4909334d5bd892b01cbdcfe673c7d39ced96 --- /dev/null +++ b/src/SecExp/attackReport.tw @@ -0,0 +1,1296 @@ +:: attackReport [nobr] + +/*init*/ +<<set _oldRep = $rep>> +<<set _oldAuth = $authority>> +<<set $enemyLosses = Math.round($enemyLosses)>> +<<set $losses = Math.round($losses)>> + +/* result */ +<<if $battleResult == 3>> + <strong>Victory!</strong> + <<set $PClossStreak = 0>> + <<set $PCvictoryStreak += 1>> + <<set $PCvictories++>> +<<elseif $battleResult == -3>> + <strong>Defeat!</strong> + <<set $PClossStreak += 1>> + <<set $PCvictoryStreak = 0>> + <<set $PClosses++>> +<<elseif $battleResult == 2>> + <strong>Partial victory!</strong> + <<set $PCvictories++>> +<<elseif $battleResult == -2>> + <strong>Partial defeat!</strong> + <<set $PClosses++>> +<<elseif $battleResult == -1>> + <strong>We surrendered</strong> +<<elseif $battleResult == 0>> + <strong>Failed bribery!</strong> +<<elseif $battleResult == 1>> + <strong>Successful bribery!</strong> +<</if>> +<hr> + + +<<if $attackType == "raiders">> + Today, the <<print $day + random(0,7)>> of $month, $year, our arcology was attacked by a band of wild raiders, $attackTroops men strong. Our defense forces 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">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<if $battleResult == 3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men easily stopped the disorganized horde futile attempt at raiding your arcology + <<elseif $battleTurns <= 7>> + The fight was hard, but in the end our men stopped the disorganized horde attempt at raiding your arcology + <<else>> + The fight was long and hard, but our men managed to stop the horde raiding party + <</if>> + <<if $PCvictoryStreak >= 2>> + , adding another victory to the growing list of our military's successes. + <<elseif $PClossStreak >= 2>> + , finally putting an end to a series of unfortunate defeats. + <<else>> + . + <</if>> + <<elseif $battleResult == -3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men were easily crushed by the barbaric horde of raiders + <<elseif $battleTurns <= 7>> + The fight was hard and in the end the bandits proved too much to handle for our men + <<else>> + The fight was long and hard, but despite their bravery the horde proved too much for our men + <</if>> + <<if $PCvictoryStreak >= 2>> + , so interrupting a long series of military successes. + <<elseif $PClossStreak >= 2>> + , confirming the long list of recent failures our armed forces collected. + <<else>> + . + <</if>> + <<elseif $battleResult == 2>> + The fight was long and hard, but in the end our men managed to repel the raiders, though not without difficulty. + <<elseif $battleResult == -2>> + The fight was long and hard. Our men in the end had to yield to the horde raiders, which was fortunately unable to capitalized on their victory. + <<elseif $battleResult == -1>> + You gave your troops the order to surrender, obediently they stand down. + <<elseif $battleResult == 0>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <<elseif 4battleResult == 1>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <</if>> +<<elseif $attackType == "free city">> + Today, the <<print $day + random(0,7)>> of $month, $year, our arcology was attacked by a contingent of mercenaries hired by a competing free city, $attackTroops men strong. Our defense forces 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">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<if $battleResult == 3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men easily stopped the mercenaries dead in their tracks + <<elseif $battleTurns <= 7>> + The fight was hard, but in the end our men stopped the slavers attempt at weakening your arcology + <<else>> + The fight was long and hard, but our men managed to stop the free city mercenaries + <</if>> + <<if $PCvictoryStreak >= 2>> + , adding another victory to the growing list of our military's successes. + <<elseif $PClossStreak >= 2>> + , finally putting an end to a series of unfortunate defeats. + <<else>> + . + <</if>> + <<elseif $battleResult == -3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men were easily crushed by the consumed mercenary veterans sent against us + <<elseif $battleTurns <= 7>> + The fight was hard and in the end the slavers proved too much to handle for our men + <<else>> + The fight was long and hard, but despite their bravery the mercenary slavers proved too much for our men + <</if>> + <<if $PCvictoryStreak >= 2>> + , so interrupting a long series of military successes. + <<elseif $PClossStreak >= 2>> + , confirming the long list of recent failures our armed forces collected. + <<else>> + . + <</if>> + <<elseif $battleResult == 2>> + The fight was long and hard, but in the end our men managed to repel the mercenaries, though not without difficulty. + <<elseif $battleResult == -2>> + The fight was long and hard. Our men in the end had to yield to the slavers, which were fortunately unable to capitalized on their victory. + <<elseif $battleResult == -1>> + You gave your troops the order to surrender, obediently they stand down. + <<elseif $battleResult == 0>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <<elseif 4battleResult == 1>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <</if>> +<<elseif $attackType == "freedom fighters">> + Today, the <<print $day + random(0,7)>> of $month, $year, our arcology was attacked by a group of freedom fighters bent on the destruction of the institution of slavery, $attackTroops men strong. Our defense forces 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">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<if $battleResult == 3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men easily stopped the freedom fighters dead in their tracks + <<elseif $battleTurns <= 7>> + The fight was hard, but in the end our men stopped the fighters attack + <<else>> + The fight was long and hard, but our men managed to stop the freedom figthers + <</if>> + <<if $PCvictoryStreak >= 2>> + , adding another victory to the growing list of our military's successes. + <<elseif $PClossStreak >= 2>> + , finally putting an end to a series of unfortunate defeats. + <<else>> + . + <</if>> + <<elseif $battleResult == -3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men were easily crushed by the fanatical fury of the freedom figthers + <<elseif $battleTurns <= 7>> + The fight was hard and in the end the freedom figthers proved too much to handle for our men + <<else>> + The fight was long and hard, but despite their bravery the freedom figthers fury proved too much for our men + <</if>> + <<if $PCvictoryStreak >= 2>> + , so interrupting a long series of military successes. + <<elseif $PClossStreak >= 2>> + , confirming the long list of recent failures our armed forces collected. + <<else>> + . + <</if>> + <<elseif $battleResult == 2>> + The fight was long and hard, but in the end our men managed to repel the freedom fighters, though not without difficulty. + <<elseif $battleResult == -2>> + The fight was long and hard. Our men in the end had to yield to the freedom figthers, which were fortunately unable to capitalized on their victory. + <<elseif $battleResult == -1>> + You gave your troops the order to surrender, obediently they stand down. + <<elseif $battleResult == 0>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <<elseif 4battleResult == 1>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <</if>> +<<elseif $attackType == "old world">> + Today, the <<print $day + random(0,7)>> of $month, $year, our arcology was attacked by an old world nation boasting a misplaced sense of superiority, $attackTroops men strong. Our defense forces 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">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<if $battleResult == 3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men easily stopped the old world soldiers dead in their tracks + <<elseif $battleTurns <= 7>> + The fight was hard, but in the end our men stopped the soldiers of the old world + <<else>> + The fight was long and hard, but our men managed to stop the old world soldiers + <</if>> + <<if $PCvictoryStreak >= 2>> + , adding another victory to the growing list of our military's successes. + <<elseif $PClossStreak >= 2>> + , finally putting an end to a series of unfortunate defeats. + <<else>> + . + <</if>> + <<elseif $battleResult == -3>> + <<if $battleTurns <= 5>> + The fight was quick and one sided, our men were easily crushed by the discipline of the old world armies + <<elseif $battleTurns <= 7>> + The fight was hard and in the end the old world proved too much to handle for our men + <<else>> + The fight was long and hard, but despite their bravery the determination of the old world troops proved too much for our men + <</if>> + <<if $PCvictoryStreak >= 2>> + , so interrupting a long series of military successes. + <<elseif $PClossStreak >= 2>> + , confirming the long list of recent failures our armed forces collected. + <<else>> + . + <</if>> + <<elseif $battleResult == 2>> + The fight was long and hard, but in the end our men managed to repel the old world soldiers, though not without difficulty. + <<elseif $battleResult == -2>> + The fight was long and hard. Our men in the end had to yield to the old world soldiers, which were fortunately unable to capitalized on their victory. + <<elseif $battleResult == -1>> + You gave your troops the order to surrender, obediently they stand down. + <<elseif $battleResult == 0>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <<elseif 4battleResult == 1>> + You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. + <</if>> +<</if>> +<br><br> +/* calculates effects on the city */ +<<if $battleResult == 3>> + Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. You were also able to capture + <<if $attackType == "raiders">> + <<set $rep += 800>> + <<set $authority += 800>> + <<elseif $attackType == "free city">> + <<set $rep += 1200>> + <<set $authority += 1200>> + <<elseif $attackType == "freedom fighters">> + <<set $rep += 1500>> + <<set $authority += 1500>> + <<elseif $attackType == "old world">> + <<set $rep += 1200>> + <<set $authority += 1200>> + <</if>> + <<if $attackTroops - $enemyLosses <= 50>> + a small amount of attackers, + <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> + <<elseif $attackTroops - $enemyLosses <= 100>> + an healthy group of attackers, + <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> + <<elseif $attackTroops - $enemyLosses <= 150>> + a big group of attackers, + <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> + <<elseif $attackTroops - $enemyLosses <= 200>> + a huge group of attackers, + <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> + <<elseif $attackTroops - $enemyLosses > 200>> + a great amount of attackers, + <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> + <</if>> + and some of their equipment, which once sold produced + <<if $attackEquip == 0>> + @@.yellowgreen;a small amount of cash.@@ + <<set $cash += 1000>> + <<elseif $attackEquip == 1>> + @@.yellowgreen;a moderate amount of cash.@@ + <<set $cash += 5000>> + <<elseif $attackEquip == 2>> + @@.yellowgreen;a good amount of cash.@@ + <<set $cash += 10000>> + <<elseif $attackEquip == 3>> + @@.yellowgreen;a great amount of cash.@@ + <<set $cash += 15000>> + <<elseif $attackEquip == 4>> + @@.yellowgreen;wealth worthy of the mightiest warlord.@@ + <<set $cash += 20000>> + <</if>> + <br> + Damage to the infrastructure was @@.yellow;virtually non-existent@@, costing only pocket cash to bring the structure back to normal. The inhabitants as well reported little to no injuries, because of this the prosperity of the arcology did not suffer. + <<set $cash -= 1000>> + <<if $PCvictoryStreak >= 3>> + It seems your victories over the constant threats directed your way is having @@.green;a positive effect on the prosperity of the arcology@@, due to the security your leadership affords. + <<set $arcologies[0].prosperity += 5>> + <</if>> +<<elseif $battleResult == -3>> + Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. Obviously your troops were not able to capture anyone or anything. + <<if $attackType == "raiders">> + <<set $rep -= 400>> + <<set $authority -= 400>> + <<elseif $attackType == "free city">> + <<set $rep -= 600>> + <<set $authority -= 600>> + <<elseif $attackType == "freedom fighters">> + <<set $rep -= 750>> + <<set $authority -= 750>> + <<elseif $attackType == "old world">> + <<set $rep -= 600>> + <<set $authority -= 600>> + <</if>> + <br> + In the raiding following the battle @@.red;the arcology sustained heavy damage@@, which will cost quite the amount of cash to fix. Reports of @@.red;citizens or slaves killed or missing@@ flood your office for a few days following the defeat. + <<set $cash -= 5000>> + <<if $week <= 30>> + <<set $ACitizens -= random(100)>> + <<set $ASlaves -= random(150)>> + <<set $arcologies[0].prosperity -= random(5)>> + <<elseif $week <= 60>> + <<set $ACitizens -= random(120)>> + <<set $ASlaves -= random(170)>> + <<set $arcologies[0].prosperity -= random(10)>> + <<elseif $week <= 90>> + <<set $ACitizens -= random(140)>> + <<set $ASlaves -= random(190)>> + <<set $arcologies[0].prosperity -= random(15)>> + <<elseif $week <= 120>> + <<set $ACitizens -= random(160)>> + <<set $ASlaves -= random(210)>> + <<set $arcologies[0].prosperity -= random(20)>> + <<else>> + <<set $ACitizens -= random(180)>> + <<set $ASlaves -= random(230)>> + <<set $arcologies[0].prosperity -= random(25)>> + <</if>> + <<if $PClossStreak >= 3>> + This only confirms the fears of many, @@.red;your arcology is not safe@@ and it is clear their business will be better somewhere else. + <<set $arcologies[0].prosperity -= 5>> + <</if>> +<<elseif $battleResult == 2>> + Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ slightly increased. Our men were not able to capture any attacker, however some equipment was seized during the enemy hasty retreat, + <<if $attackType == "raiders">> + <<set $rep += 200>> + <<set $authority += 200>> + <<elseif $attackType == "free city">> + <<set $rep += 300>> + <<set $authority += 300>> + <<elseif $attackType == "freedom fighters">> + <<set $rep += 450>> + <<set $authority += 450>> + <<elseif $attackType == "old world">> + <<set $rep += 300>> + <<set $authority += 300>> + <</if>> + which once sold produced + <<if $attackEquip == 0>> + @@.yellowgreen;a bit of cash.@@ + <<set $cash += 500>> + <<elseif $attackEquip == 1>> + @@.yellowgreen;a small amount of cash.@@ + <<set $cash += 2500>> + <<elseif $attackEquip == 2>> + @@.yellowgreen;a moderate amount of cash.@@ + <<set $cash += 5000>> + <<elseif $attackEquip == 3>> + @@.yellowgreen;a good amount of cash.@@ + <<set $cash += 7500>> + <<elseif $attackEquip == 4>> + @@.yellowgreen;a great amount of cash.@@ + <<set $cash += 10000>> + <</if>> + <br> + Damage to the city was @@.red;limited@@, it won't take much to rebuild. Very few citizens or slaves were involved in the fight and even fewer met their end, safeguarding the prosperity of the arcology. + <<set $cash -= 2000>> + <<set $ACitizens -= random(10)>> + <<set $ASlaves -= random(20)>> +<<elseif $battleResult == -2>> + It was a close defeat, but nonetheless your @@.red;reputation@@ and @@.red;authority@@ slightly decreased. Your troops were not able to capture anyone or anything. + <<if $attackType == "raiders">> + <<set $rep -= 40>> + <<set $authority -= 40>> + <<elseif $attackType == "free city">> + <<set $rep -= 60>> + <<set $authority -= 60>> + <<elseif $attackType == "freedom fighters">> + <<set $rep -= 75>> + <<set $authority -= 75>> + <<elseif $attackType == "old world">> + <<set $rep -= 60>> + <<set $authority -= 60>> + <</if>> + <br> + The enemy did not have the strenght to raid the arcology for long, still @@.red;the arcology sustained some damage damage@@, which will cost a moderate amount of cash to fix. Some citizens and slaves found themselves on the wrong end of a gun and met their demise. + Some business sustained heavy damage, slightly impacting the arcology's prosperity. + <<set $cash -= 3000>> + <<if $week <= 30>> + <<set $ACitizens -= random(50)>> + <<set $ASlaves -= random(75)>> + <<set $arcologies[0].prosperity -= random(2)>> + <<elseif $week <= 60>> + <<set $ACitizens -= random(60)>> + <<set $ASlaves -= random(65)>> + <<set $arcologies[0].prosperity -= random(5)>> + <<elseif $week <= 90>> + <<set $ACitizens -= random(70)>> + <<set $ASlaves -= random(95)>> + <<set $arcologies[0].prosperity -= random(7)>> + <<elseif $week <= 120>> + <<set $ACitizens -= random(80)>> + <<set $ASlaves -= random(105)>> + <<set $arcologies[0].prosperity -= random(10)>> + <<else>> + <<set $ACitizens -= random(90)>> + <<set $ASlaves -= random(115)>> + <<set $arcologies[0].prosperity -= random(12)>> + <</if>> +<<elseif $battleResult == -1>> + Rather than waste the lives of your men you decided to surrender, hoping your enemy will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted. + <<if $attackType == "raiders">> + <<set $rep -= 600>> + <<set $authority -= 600>> + <<elseif $attackType == "free city">> + <<set $rep -= 800>> + <<set $authority -= 800>> + <<elseif $attackType == "freedom fighters">> + <<set $rep -= 1000>> + <<set $authority -= 1000>> + <<elseif $attackType == "old world">> + <<set $rep -= 800>> + <<set $authority -= 800>> + <</if>> + <br> + The surrender allows the arcology to survive @@.red;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. + <<set $cash -= 1000>> + <<if $week <= 30>> + <<set $ACitizens -= random(80)>> + <<set $ASlaves -= random(120)>> + <<set $arcologies[0].prosperity -= random(5)>> + <<elseif $week <= 60>> + <<set $ACitizens -= random(100)>> + <<set $ASlaves -= random(140)>> + <<set $arcologies[0].prosperity -= random(10)>> + <<elseif $week <= 90>> + <<set $ACitizens -= random(120)>> + <<set $ASlaves -= random(160)>> + <<set $arcologies[0].prosperity -= random(15)>> + <<elseif $week <= 120>> + <<set $ACitizens -= random(140)>> + <<set $ASlaves -= random(180)>> + <<set $arcologies[0].prosperity -= random(20)>> + <<else>> + <<set $ACitizens -= random(160)>> + <<set $ASlaves -= random(190)>> + <<set $arcologies[0].prosperity -= random(25)>> + <</if>> +<<elseif $battleResult == 0>> + Unfortunately your adversary did not accept your money. <<if $attackType == "freedom fighters">> Their ideological crusade would not allow such thing<<else>>They saw your attempt as nothing more than admission of weakness<</if>>. There was no time to organize a defense and so the enemy walked into the arcology as it was his. + Your reputation and authority suffer a hit. + <<if $attackType == "raiders">> + <<set $rep -= 400>> + <<set $authority -= 400>> + <<elseif $attackType == "free city">> + <<set $rep -= 600>> + <<set $authority -= 600>> + <<elseif $attackType == "freedom fighters">> + <<set $rep -= 750>> + <<set $authority -= 750>> + <<elseif $attackType == "old world">> + <<set $rep -= 600>> + <<set $authority -= 600>> + <</if>> + <br> + Fortunately the arcology survives @@.yellow;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. + <<set $cash -= 1000>> + <<if $week <= 30>> + <<set $ACitizens -= random(80)>> + <<set $ASlaves -= random(120)>> + <<set $arcologies[0].prosperity -= random(5)>> + <<elseif $week <= 60>> + <<set $ACitizens -= random(100)>> + <<set $ASlaves -= random(140)>> + <<set $arcologies[0].prosperity -= random(10)>> + <<elseif $week <= 90>> + <<set $ACitizens -= random(120)>> + <<set $ASlaves -= random(160)>> + <<set $arcologies[0].prosperity -= random(15)>> + <<elseif $week <= 120>> + <<set $ACitizens -= random(140)>> + <<set $ASlaves -= random(180)>> + <<set $arcologies[0].prosperity -= random(20)>> + <<else>> + <<set $ACitizens -= random(160)>> + <<set $ASlaves -= random(190)>> + <<set $arcologies[0].prosperity -= random(25)>> + <</if>> + <br> +<<elseif $battleResult == 1>> + The attackers wisely take the money offered them to leave your territory without further issues. The strenght of the free cities was never in their guns but in their dollars and today events are the perfect demonstration of such strenght. + Your @@.green;reputation slightly increases@@. + <<if $attackType == "raiders">> + <<set $rep += 100>> + <<elseif $attackType == "free city">> + <<set $rep += 150>> + <<elseif $attackType == "freedom fighters">> + <<set $rep += 200>> + <<elseif $attackType == "old world">> + <<set $rep += 150>> + <</if>> + <<set $cash -= $bribeCost>> +<</if>> + +<br><br> + +/* leaders */ +<<if $leadingTroops == "PC">> + You decided to personally lead the defense of your arcology. + <<if $deployingMilitia == 1>> + <<if _oldRep <= 2500 && _oldRep > 1000>> + You're not particularly popular between the inhabitants of your arcology, so your presence does little to reassure the volunteers + <<elseif _oldRep <= 1000>> + As your low reputation proves, your volunteers do not particularly enjoy your company. As far as they are concerned your presence is more of an hindrance than an advantage + <</if>> + <<if $PC.career == "celebrity">> + , still your past celebrity does carry some weight, many do look forward to fight alongside a famous name. + <<elseif $PC.career == "capitalist">> + , still your past life as a famous venture capitalist does carry some weight, many trust in your cunning to save them in the incoming battle. + <<elseif $PC.career == "gang">> + , the situation is not made easier by your past. Many still remember you as the gang leader who used to be on the other side of their guns. + <<elseif $PC.career == "escort">> + , the situation is not made easier by your past. Many still remember your past career as an escort and doubt you'll be of any use during the fighting. + <</if>> + <<if _oldRep >= 5000 && _oldRep < 15000>> + Your citizens are honored that their arcology owner is willing to put <<if $PC.title == 0>>her<<else>>his<</if>> life in danger + <<elseif _oldRep >= 15000>> + Many among the volunteers are awed by your presence, never would they have thought they would fight shoulder to shoulder with their famous arcology owner + <</if>> + <<if $PC.career == "celebrity">> + , not to mention the priceless opportunity of fighting together with someone with such a renowned past as yours. Your celebrity still does carry its weight. + <<elseif $PC.career == "capitalist">> + , not to mention the priceless opportunity of fighting together with one of the great capitalist sharks of their time. Such fine mind on their side can only bring victory! + <<elseif $PC.career == "gang">> + , your past however does not help you: many still remember you as the gang leader who used to be on the other side of their guns. + <<elseif $PC.career == "escort">> + your past however does not help you: many still remember your past career as an escort and doubt you'll be of any use during the fighting. + <</if>> + <</if>> + <<if $deployingSlaves == 1>> + <<if _oldAuth <= 2500 &&_oldAuth > 1000>> + Your slave soldiers do not feel bound to you as much as they should, as your authority is far from absolute + <<elseif _oldAuth <= 1000>> + Your slave soldiers are often openly rebellious. Only the threat of execution hold them in line + <</if>> + <<if $PC.career == "escort">> + , fortunately many feel some level of kinship with you, thanks to your past as an escort. + <<elseif $PC.career == "servant">> + , fortunately many feel some level of kinship with you, thanks to your past as a servant. + <<elseif $PC.career == "slaver">> + , things are made worse by your past as a notorious slaver. + <</if>> + <<if _oldAuth >= 5000 && _oldAuth < 15000>> + Your slave soldiers show a surprising amount of discipline, thanks to your high authority + <<elseif _oldAuth >= 15000>> + Your slave soldiers show almost a fanatical level of martial discipline. Your absolute authority has a great effect on them + <</if>> + <<if $PC.career == "escort">> + and the feeling of kinship they instictively feel towards you, because of your past as an escort. + <<elseif $PC.career == "servant">> + and the feeling of kinship they instictively feel towards you, because of your past as a servant. + <<elseif $PC.career == "slaver">> + . Still some rebellious looks can be spotted once in a while, in their eyes your slaver past will always paint you in a dark light. + <</if>> + <</if>> + <<if $deployingMercs == 1>> + <<if $mercLoyalty <= 25>> + Your presence does little to spur your mercenaries into action, their loyalty is straining and their performance suffers + <<elseif $mercLoyalty <= 10>> + Your mercenaries barely bother to pretend being loyal, their battle performance is obviously barely passable + <</if>> + <<if $PC.career == "mercenary">> + , thankfully they hold in high regard someone who made their fortune as a mercenary themselves. + <<elseif $PC.career == "wealth">> + and they do little to hide the contempt they have for someone who was born into wealth, rather than gaining it from their sweat. + <<elseif $PC.career == "servant">> + and they do little to hide their disgust at being ordered around by an ex-servant. + <</if>> + <<if $mercLoyalty >= 50 && $mercLoyalty < 75>> + Your mercenaries are ready to fight their hardest for you, their loyalty a testament to your capability as a leader + <<elseif $mercLoyalty >= 75>> + Your mercenaries fight with a martial fury worthy of religious fanatics. Their loyalty to you is absolute + <</if>> + <<if $PC.career == "mercenary">> + , not to mention they're more than willing to follow someone who walked their same steps once as a gun for hire. + <<elseif $PC.career == "wealth">> + , unfortunately many do still resent you being born into your wealth and power, rather than having earned it with sweat and tears. + <<elseif $PC.career == "servant">> + , unfortunately some still resent the fact they are ordered around by an ex-servant. + <</if>> + <<if _oldRep >= 15000>> + 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 $PC.warfare <= 25 && $PC.warfare > 10>> + Your inexperience in military matters has a negative impact on your troops performance and the effectiveness of your battleplan. + <<elseif $PC.warfare <= 10>> + Your ignorance in military matters has a severe negative impact on your troops performance and the effectiveness of your battleplan. + <<elseif $PC.warfare >= 50 && $PC.warfare >= 50>> + Your experience in military matters has a positive impact on your troops performance and the effectiveness of your battleplan. + <<elseif $PC.warfare >= 75>> + Your great experience in military matters has a major positive impact on your troops performance and the effectiveness of your battleplan. + <</if>> + <<if $gainedWarfare == 1>> + Battlefield experience increased your understanding of warfare, making you a better commander. + <</if>> + <<if $PCWounded == 1>> + During the fighting @@.red;you were wounded@@. Your medics assure you it's nothing life threatening, but you'll be weakened for a few weeks. + <<set $PCWoundCooldown = 6>> + <</if>> +<<elseif $leadingTroops == "assistant">> + <<if $auto == 1>>$assistantName<<else>>You<</if>> let your personal assistant lead the troops. + <<if $deployingMercs == 1 || $deployingMilitia == 1 || $deployingSlaves == 1>> + <<if _oldRep < 10000 && _oldAuth < 10000>> + No soldier trusts a computer to be their commander, no algorithm can substitute experience <<if $assistantPower == 0>>and as expected<<else>>, however <</if>> + <<else>> + No soldier trusts a computer to be their commander, but they trust you enough to not question your decision<<if $assistantPower == 0>>, however<<else>>, <</if>> + <</if>> + <</if>> + <<if $assistantPower == 0>> + your assistant gives a rather poor field performance, due to the limited computing power available to her. + <<elseif $assistantPower == 1>> + your assistant performs decently. While nothing to write home about your men are pleasantly surprised. + <<elseif $assistantPower == 2>> + your assistant performs admirably. Her vast computing power allows her to be everywhere on the battlefield, greatly enhancing the efficacy of your troops and the effectiveness of your battleplan. + <</if>> +<<elseif $leadingTroops == "bodyguard">> + <<if $auto == 1>>$assistantName<<else>>You<</if>> decided it will be your bodyguard to lead the troops. + <<if $deployingSlaves == 1>> + <<if $Bodyguard.devotion < -20>> + Her low devotion has a negative impact on the morale of your slave soldiers. + <<elseif $Bodyguard.devotion > 51>> + Her devotion to you has a positive impact on the morale of your slave soldiers, proud to be lead by one of their own. + <</if>> + <</if>> + <<if _oldRep < 10000 && _oldAuth < 10000 || $Bodyguard.prestige < 1>> + <<if $deployingMilitia == 1>> + Your volunteers <<if $deployingMilitia == 1>>however<</if>> are not enthusiastic to have a slave as a commander + <<if $deployingMercs == 1>> + and neither are your mercenaries. + <<else>> + . + <</if>> + <<elseif $deployingMercs == 1>> + Your mercenaries <<if $deployingMilitia == 1>>however<</if>> are not enthusiastic to have a slave as a commander. + <</if>> + <<elseif $Bodyguard.prestige >= 2>> + <<if $deployingMilitia == 1>> + Your volunteers + <<if $deployingMercs == 1>> + and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. + <<else>> + are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. + <</if>> + <<elseif $deployingMercs == 1>> + Your mercenaries 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 $deployingMilitia == 1>>however<</if>> are not enthusiastic to have a slave as a commander + <<if $deployingMercs == 1>> + and neither are your mercenaries, but they trust you enough not to question your decision. + <<else>> + , but they trust you enough not to question your decision. + <</if>> + <<elseif $deployingMercs == 1>> + Your mercenaries <<if $deployingMilitia == 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>> + <<if (setup.bodyguardCareers.includes($Bodyguard.career) || setup.HGCareers.includes($Bodyguard.career)) && $Bodyguard.intelligence == 3>> + With her experience and her great intellect, she is able to exploits the smallest of tactical advantages, making your troops very effective. + <<elseif $Bodyguard.intelligence == 3>> + While she lacks experience, her great intellect allows her to seize and exploit any tactical advantage the battlefied offers her. + <<elseif (setup.bodyguardCareers.includes($Bodyguard.career) || setup.HGCareers.includes($Bodyguard.career)) && $Bodyguard.intelligence == 2>> + Having both the experience and the intelligence, she performs admirably as your commander. Her competence greatly increases the efficacy of your troops. + <<elseif $Bodyguard.intelligence == 2>> + Despite not having a lot of experience as a leader, her intelligence makes her a good commander, increasing the efficacy of your troops. + <<elseif setup.bodyguardCareers.includes($Bodyguard.career) || setup.HGCareers.includes($Bodyguard.career) && $Bodyguard.intelligence >= 1>> + Thanks to her experience, she is a decent commander, competently guiding your troops through the battle. + <<elseif $Bodyguard.intelligence >= 1>> + Lacking experience her performance as a commander is rather forgettable. + <<elseif !(setup.bodyguardCareers.includes($Bodyguard.career) && setup.HGCareers.includes($Bodyguard.career)) || $Bodyguard.intelligence <= -2>> + Despite the experience she accumulated during her past career, her very low intelligence is a great disadvantage for your troops. + <<elseif $Bodyguard.intelligence <= -2>> + Without experience and low intelligence, she performs horribly as a commander, greatly affecting your troops. + <<elseif !(setup.bodyguardCareers.includes($Bodyguard.career) && setup.HGCareers.includes($Bodyguard.career)) || $Bodyguard.intelligence <= -1>> + Despite the experience she accumulated during her past career, she lacks the intelligence to apply it quickly and effectively, making for a rather poor performance in the field. + <<elseif $Bodyguard.intelligence <= -1>> + She lacks the experience and the intelligence to be an effective commander, the performance of your troops suffers because of her poor leadership. + <</if>> + <<if $gainedCombat == 1>> + During the battle, she had to fight for her life, giving her experience in modern combat. She is now proficient with modern firearms and hand to hand combat. + <</if>> + <<if $woundType != 0>> + Unfortunately @@.red;she reported injuries@@. + <<if $woundType == 1>> + A stray bullet hit her neck. While she fortunately avoided fatal hemorrhages, her vocal cords were irreparably damaged. + <<elseif $woundType == 2>> + A few sharpnels found her eyes as final target, blinding her permanently. + <<elseif $woundType == 3>> + A granade landed close to her, rendering her a quadruple amputee. + <<elseif $woundType >= 4>> + While grave wounds, it seems she will be able to fully recover, given enough time. + <</if>> + <</if>> +<<elseif $leadingTroops == "headGirl">> + <<if $auto == 1>>$assistantName<<else>>You<</if>> decided it will be your head girl to lead the troops. + <<if $deployingSlaves == 1>> + <<if $HeadGirl.devotion < -20>> + Her low devotion has a negative impact on the morale of your slave soldiers. + <<elseif $HeadGirl.devotion > 51>> + Her devotion to you has a positive impact on the morale of your slave soldiers, proud to be lead by one of their own. + <</if>> + <</if>> + <<if _oldRep < 10000 && _oldAuth < 10000 || $HeadGirl.prestige < 1>> + <<if $deployingMilitia == 1>> + Your volunteers <<if $deployingMilitia == 1>>however<</if>> are not enthusiastic to have a slave as a commander + <<if $deployingMercs == 1>> + and neither are your mercenaries. + <<else>> + . + <</if>> + <<elseif $deployingMercs == 1>> + Your mercenaries <<if $deployingMilitia == 1>>however<</if>> are not enthusiastic to have a slave as a commander. + <</if>> + <<elseif $HeadGirl.prestige >= 2>> + <<if $deployingMilitia == 1>> + Your volunteers + <<if $deployingMercs == 1>> + and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. + <<else>> + are delighted to have such a prestigious individual as their commander, almost forgetting she is a slave. + <</if>> + <<elseif $deployingMercs == 1>> + Your mercenaries 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 $deployingMilitia == 1>>however<</if>> are not enthusiastic to have a slave as a commander + <<if $deployingMercs == 1>> + and neither are your mercenaries, but they trust you enough not to question your decision. + <<else>> + , but they trust you enough not to question your decision. + <</if>> + <<elseif $deployingMercs == 1>> + Your mercenaries <<if $deployingMilitia == 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>> + <<if (setup.bodyguardCareers.includes($HeadGirl.career) || setup.HGCareers.includes($HeadGirl.career)) && $HeadGirl.intelligence == 3>> + With her experience and her great intellect, she is able to exploits the smallest of tactical advantages, making your troops greatly effective. + <<elseif $HeadGirl.intelligence == 3>> + While she lacks experience, her great intellect allows her to seize and exploit any tactical advantage the battlefied offers her. + <<elseif (setup.bodyguardCareers.includes($HeadGirl.career) || setup.HGCareers.includes($HeadGirl.career)) && $HeadGirl.intelligence == 2>> + Having both the experience and the intelligence, she performs admirably as your commander. Her competence greatly increases the efficacy of your troops. + <<elseif $HeadGirl.intelligence == 2>> + Despite not having a lot of experience as a leader, her intelligence makes her a good commander, increasing the efficacy of your troops. + <<elseif setup.bodyguardCareers.includes($HeadGirl.career) || setup.HGCareers.includes($HeadGirl.career) && $HeadGirl.intelligence >= 1>> + Thanks to her experience, she is a decent commander, competently guiding your troops through the battle. + <<elseif $HeadGirl.intelligence >= 1>> + Lacking experience her performance as a commander is rather forgettable. + <<elseif !(setup.bodyguardCareers.includes($HeadGirl.career) && setup.HGCareers.includes($HeadGirl.career)) || $HeadGirl.intelligence <= -2>> + Despite the experience she accumulated during her past career, her very low intelligence is a great disadvantage for your troops. + <<elseif $HeadGirl.intelligence <= -2>> + Without experience and low intelligence, she performs horribly as a commander, greatly affecting your troops. + <<elseif !(setup.bodyguardCareers.includes($HeadGirl.career) && setup.HGCareers.includes($HeadGirl.career)) || $HeadGirl.intelligence <= -1>> + Despite the experience she accumulated during her past career, she lacks the intelligence to apply it quickly and effectively, making for a rather poor performance in the field. + <<elseif $HeadGirl.intelligence <= -1>> + She lacks the experience and the intelligence to be an effective commander, the performance of your troops suffers because of her poor leadership. + <</if>> + <<if $gainedCombat == 1>> + During the battle, she had to fight for her life, giving her experience in modern combat. She is now proficient with modern firearms and hand to hand combat. + <</if>> + <<if $woundType != 0>> + Unfortunately @@.red;she reported injuries@@. + <<if $woundType == 1>> + A stray bullet hit her neck. While she fortunately avoided fatal hemorrhages, her vocal cords were irreparably damaged. + <<elseif $woundType == 2>> + A few sharpnels found her eyes as final target, blinding her permanently. + <<elseif $woundType == 3>> + A granade landed close to her, rendering her a quadruple amputee. + <<elseif $woundType >= 4>> + While grave wounds, it seems she will be able to fully recover, given enough time. + <</if>> + <</if>> +<<elseif $leadingTroops == "citizen">> + <<if $auto == 1>>$assistantName<<else>>You<</if>> decided to appoint one of your volunteers as the commander. + <<if $arcologies[0].FSDegradationist == "unset" && $arcologies[0].FSPaternalist == "unset">> + <<if $deployingMilitia == 1>> + Your volunteers are honored and pleased that one of their own is leading the defense force of the city. + <</if>> + <<if $deployingSlaves == 1>> + Your slaves<<if $deployingMilitia == 1>>, however,<</if>> are not thrilled byt the news. + <</if>> + <<elseif $arcologies[0].FSPaternalist != "unset">> + <<if $deployingMilitia == 1>> + Your volunteers are honored and pleased that one of their own is leading the defense force of the city. + <</if>> + <<if $deployingSlaves == 1>> + Thanks to your paternalistic society, your slave soldiers trust your chosen citizen to treat them as more than cannon fodder. + <</if>> + <<elseif $arcologies[0].FSDegradationist != "unset">> + <<if $deployingMilitia == 1>> + Your volunteers are honored and pleased that one of their own is leading the defense force of the city. + <</if>> + <<if $deployingSlaves == 1>> + Because of your degradationist society,<<if $deployingMilitia == 1>> however,<</if>> your slave soldiers are deeply distrustful of the new leader. + <</if>> + <</if>> + <<if $arcologies[0].FSRomanRevivalist != "unset">> + Since you decided to revive old Rome, many of your citizens took on themselves to educate themselves in amrtial matters, because of this your mercenaries feel safe enough in the hands of one of your volunteers. + <<else>> + You mercenaries are not thrilled to be lead by a civilian without any formal martial training or education. + <</if>> +<<elseif $leadingTroops == "mercenary">> + <<if $deployingMercs == 1>> + Your mercenaries of course approve 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 mercenaries as their leader. + <<elseif $deployingMilitia == 1>> + Your volunteers are not enthusiastic at the prospect of being commanded around by agun for hire. + <</if>> + <<if $arcologies[0].FSDegradationist != "unset" && $deployingSlaves == 1>> + Because of your degradationist society, your slave soldiers are highly distrustful of the gun for hire you forced them to accept as leader. + <</if>> +<</if>> + +<br><br> + +/* tactics */ +<<if $auto == 1>>$assistantName<<else>>You<</if>> +<<if $chosenTactic == "Bait and Bleed">> + chose to employ "bait and bleed" tactics or relying on quick attacks and harrassment to tire and wound the enemy until their surrender. +<<elseif $chosenTactic == "Guerrilla">> + chose to employ "guerrilla" tactics or relying on stealth, terrain knowledge and subterfuge to undermine and ultimately destroy the enemy. +<<elseif $chosenTactic == "Choke Points">> + chose to employ "choke points" tactics or the extensive use of fortified or highly defensive positions to slow down and eventually stop the enemy. +<<elseif $chosenTactic == "Interior Lines">> + chose to employ "interior lines" tactics or exploiting the defender's shorter front to quickly disengage and concentrate troops when and where needed. +<<elseif $chosenTactic == "Pincer Manouver">> + chose to employ "pincer manouver" tactics or attempting to encircle the enemy by faking a collapsing centre front. +<<elseif $chosenTactic == "Defense In Depth">> + chose to employ "defense in depth" tactics or relying on mobility to disengage and exploit overextended enemy troops by attacking their freshly exposed flanks. +<<elseif $chosenTactic == "Blitzkrieg">> + chose to employ "blitzkrieg" tactics or shattering the enemy's frontline with a violent, concentrated armored assault. +<<elseif $chosenTactic == "Human Wave">> + chose to employ "human wave" tactics or overwhelming the enemy's army with a massive infantry assault. +<</if>> +<<if $battleTerrain == "urban">> + <<if $chosenTactic == "Bait and Bleed">> + The urban terrain synergized well with bait and bleed tactics, slowly chipping away at the enemy's forces from the safety of the narrow streets and empty buildings. + <<elseif $chosenTactic == "Guerrilla">> + The urban terrain synergized well with guerrilla tactics, eroding your enemy's determination from the safety of the narrow streets and empty buildings. + <<elseif $chosenTactic == "Choke Points">> + The urban environment offers many opportunities to hunker down and stop the momentum of the enemy's assault while keeping your soldiers in relative safety. + <<elseif $chosenTactic == "Interior Lines">> + While the urban environment offers many highly defensive position, it does restrict movement and with it the advantages of exploiting interior lines. + <<elseif $chosenTactic == "Pincer Manouver">> + The urban terrain does not allow for wide manouvers, the attempts of your forces to encircle the assaulters are mostly unsuccessful. + <<elseif $chosenTactic == "Defense In Depth">> + While the urban enviromnet offers many defensive positions, it limits mobility, limiting the advantages of using a defense in depth tactic. + <<elseif $chosenTactic == "Blitzkrieg">> + The urban terrain is difficult to traverse, making your troops attempt at a lightining strike unsuccessful. + <<elseif $chosenTactic == "Human Wave">> + The urban terrain offers great advantages to the defender, your men find themselves in great disadvantage while mass assaulting the enemy's position. + <</if>> +<<elseif $battleTerrain == "rural">> + <<if $chosenTactic == "Bait and Bleed">> + The open terrain of rural lands does not lend itself well to bait and bleed tactics, making it harder for your men to achieve tactical superiority. + <<elseif $chosenTactic == "Guerrilla">> + The open terrain of rural lands does not offer many hiding spots, making it harder for your men to perform guerrilla actions effectively. + <<elseif $chosenTactic == "Choke Points">> + The open terrain of rural lands does not offer many natural choke points, making it hard for your troops to funnel the enemy towards highly defended positions. + <<elseif $chosenTactic == "Interior Lines">> + The open terrain allows your men to easily exploit the superior mobility of the defender, making excellent use of interior lines to strike where it hurts. + <<elseif $chosenTactic == "Pincer Manouver">> + The open terrain affords your men great mobility, allowing them to easily position themselves for envelopment. + <<elseif $chosenTactic == "Defense In Depth">> + The open terrain affords your men great mobility, allowing them to exploit overextended assaults and concentrate where and when it matters. + <<elseif $chosenTactic == "Blitzkrieg">> + The open terrain affords your men great mobility, making it easier to accomplish concentrated ligthning strikes. + <<elseif $chosenTactic == "Human Wave">> + The open terrain affords your men great mobility, making it easier to overwhelm the enemy with mass assaults. + <</if>> +<<elseif $battleTerrain == "hills">> + <<if $chosenTactic == "Bait and Bleed">> + While the hills offer some protection, they also make it harder to manouver, bait and bleed tactics will not be 100% effective here. + <<elseif $chosenTactic == "Guerrilla">> + The hills offer protection to both your troops and your enemy's, making it harder for your men to accomplish guerrilla attacks effectively. + <<elseif $chosenTactic == "Choke Points">> + While not as defensible as mountains, hills offer numerous opportunities to funnel the enemy towards highly defensible choke points. + <<elseif $chosenTactic == "Interior Lines">> + The limited mobility on hills hampers the capability of your troops to exploit the defender's greater mobility afforded by interior lines. + <<elseif $chosenTactic == "Pincer Manouver">> + Limited mobility due to the hills is a double edged sword, affording your men a decent shot at incirclement. + <<elseif $chosenTactic == "Defense In Depth">> + The limited mobility on hills hampers the capability of your troops to use elastic defense tactics. + <<elseif $chosenTactic == "Blitzkrieg">> + The limited mobility on hills hampers the capability of your troops to organize lightning strikes. + <<elseif $chosenTactic == "Human Wave">> + The defensibility of hills makes it harder to accomplish victory through mass assaults. + <</if>> +<<elseif $battleTerrain == "coast">> + <<if $chosenTactic == "Bait and Bleed">> + On the coast there's little space and protection to effectively employ bait and bleed tactics. + <<elseif $chosenTactic == "Guerrilla">> + On the coast there's little space and protection to effectively employ guerrilla tactics. + <<elseif $chosenTactic == "Choke Points">> + Amphibious attacks are difficult in the best of situations, the defender has a very easy time funneling the enemy towards their key defensive positions. + <<elseif $chosenTactic == "Interior Lines">> + While in an amphibious landing mobility is not the defender best weapon, exploiting interior lines still affords your troops some advantages. + <<elseif $chosenTactic == "Pincer Manouver">> + Attempting to encircle a landing party is not the best course of action, but not the worst either. + <<elseif $chosenTactic == "Defense In Depth">> + In an amphibious assault it's very easy for the enemy to overextend, making defense in depth tactics quite effective. + <<elseif $chosenTactic == "Blitzkrieg">> + The rough, restricted terrain does not lend itself well to lightining strikes, but the precarious position of the enemy still gives your mobile troops tactical superiority + <<elseif $chosenTactic == "Human Wave">> + The rough, restricted terrain does not lend itself well to mass assaults, but the precarious position of the enemy still gives your troops tactical superiority. + <</if>> +<<elseif $battleTerrain == "outskirts">> + <<if $chosenTactic == "Bait and Bleed">> + Fighting just beneath the walls of the arcology does not allow for the dynamic redeployment of troops bait and bleed tactics would require. + <<elseif $chosenTactic == "Guerrilla">> + Fighting just beneath the walls of the arcology does not allow for the dynamic redeployment of troops guerrilla tactics would require. + <<elseif $chosenTactic == "Choke Points">> + The imposing structure of the arcology itself provides plenty of opportunities to create fortified choke points where to shatter the enemy assault. + <<elseif $chosenTactic == "Interior Lines">> + While the presence of the arcology near the battlefield is an advantage, it does limit manouverability, lowering overall effectiveness of interior lines tactics. + <<elseif $chosenTactic == "Pincer Manouver">> + While the presence of the arcology near the battlefield is an advantage, it does limit manouverability, lowering the chances of making an effective encirclement. + <<elseif $chosenTactic == "Defense In Depth">> + Having the arcology near the battlefield means there are limited available manouvers to your troops, who still needs to defend the structure, making defense in depth tactics not as effective. + <<elseif $chosenTactic == "Blitzkrieg">> + While an assault may save the arcology from getting involved at all, having the imposing structure so near does limit manouverability and so the impetus of the lightning strike. + <<elseif $chosenTactic == "Human Wave">> + While an attack may save the arcology from getting involved at all, having the imposing structure so near does limit manouverability and so the impetus of the mass assault. + <</if>> +<<elseif $battleTerrain == "mountains">> + <<if $chosenTactic == "Bait and Bleed">> + While the mountains offer great protection, they also limit manouverability, bait and bleed tactics will not be quite as effective here. + <<elseif $chosenTactic == "Guerrilla">> + The mountains offer many excellent hiding spots and defensive positions, making guerrilla tatics very effective. + <<elseif $chosenTactic == "Choke Points">> + The mountains offer plenty of opportunity to build strong defensive positions where to shatter the enemy's assault. + <<elseif $chosenTactic == "Interior Lines">> + While the rough terrain complicates manouvers, the defensive advantages offered by the mountains offsets its negative impact. + <<elseif $chosenTactic == "Pincer Manouver">> + The rough terrain complicates manouvers, your men have a really hard time pulling off an effective encirclement in this environment. + <<elseif $chosenTactic == "Defense In Depth">> + While mobility is limited, defensive positions are plentiful, your men are not able to fully exploit overextended assaults, but are able to better resist them. + <<elseif $chosenTactic == "Blitzkrieg">> + The rough terrain complicates manouvers, your men have a really hard time pulling off an effective lightning strike in this environment. + <<elseif $chosenTactic == "Human Wave">> + The rough terrain complicates manouvers, your men have a really hard time pulling off an effective mass assault in this environment. + <</if>> +<<elseif $battleTerrain == "wasteland">> + <<if $chosenTactic == "Bait and Bleed">> + While the wastelands are mostly open terrain, ther are enough hiding spots to make bait and bleed tactics work well enough. + <<elseif $chosenTactic == "Guerrilla">> + While the wastelands are mostly open terrain, ther are enough hiding spots to make guerrilla tactics work well enough. + <<elseif $chosenTactic == "Choke Points">> + The wastelands are mostly open terrain, your men have a difficult time setting up effective fortified positions. + <<elseif $chosenTactic == "Interior Lines">> + The wastelands, while rough, are mostly open terrain, where your men can exploit to the maximum the superior mobility of the defender. + <<elseif $chosenTactic == "Pincer Manouver">> + The wastelands, while rough, are mostly open terrain, your men can set up an effective encirclement here. + <<elseif $chosenTactic == "Defense In Depth">> + The wastelands, while rough, are mostly open terrain, allowing your men to liberally manouver to exploit overextended enemies. + <<elseif $chosenTactic == "Blitzkrieg">> + The wastelands, while rough, are mostly open terrain, where your men are able to mount an effective lightning strikes. + <<elseif $chosenTactic == "Human Wave">> + The wastelands, while rough, are mostly open terrain, where your men are able to mount an effective mass assault. + <</if>> +<</if>> + +<<if $chosenTactic == "Bait and Bleed">> + <<if $attackType == "raiders">> + Since the bands of raiders are used to be on high alert and on the move constantly, bait and bleed tactics are not effective against them. + <<elseif $attackType == "free city">> + The modern armies hired by free cities are decently mobile, which means quick hit and run attacks will be less successful, but their discipline and confidence still make them quite susceptible to this type of attack. + <<elseif $attackType == "old world">> + While old world armies are tough nuts to crack, their predictability makes them the perfect target for hit and run and harrassment tactics. + <<elseif $attackType == "freedom fighters">> + Freedom figthers live every day as chasing and being chased by far superior forces, they are far more experienced than your troops in this type of warfare and much less susceptible to it. + <</if>> +<<elseif $chosenTactic == "Guerrilla">> + <<if $attackType == "raiders">> + Since the bands of raiders are used to be on high alert and on the move constantly, guerrilla tactics are not effective against them. + <<elseif $attackType == "free city">> + The modern armies hired by free cities are highly mobile, which means quick hit and run attacks will be less successful, but their discipline and confidence still make them quite susceptible to this type of attack. + <<elseif $attackType == "old world">> + While old world armies are tough nuts to crack, their predictability makes them the perfect target for hit and run and harrassment tactics. + <<elseif $attackType == "freedom fighters">> + Freedom figthers live every day as chasing and being chased by far superior forces, they are far more experienced than your troops in this type of warfare and much less susceptible to it. + <</if>> +<<elseif $chosenTactic == "Choke Points">> + <<if $attackType == "raiders">> + Raiders lack heavy weaponry or armour, so making use of fortified positions is an excellent way to dissipate the otherwise powerful momentum of their assault. + <<elseif $attackType == "free city">> + The high tech equipment free cities can afford to give their guns for hire means there's no defensive position strong enough to stop them, still the relatively low numbers means they will have to take a careful approach, slowing them down. + <<elseif $attackType == "old world">> + Old world armies have both the manpower and the equipment to conquer any defensive position, making use of strong fortifications will onyl bring you this far against them. + <<elseif $attackType == "freedom fighters">> + The lack of specialized weaponry means freedom figthers have a rather hard time overcoming tough defensive positions, unfortunately they have also a lot of experience in avoiding them. + <</if>> +<<elseif $chosenTactic == "Interior Lines">> + <<if $attackType == "raiders">> + The highly mobile horde of raiders will not give much room for your troops to manouver, lowering their tactical superiority. + <<elseif $attackType == "free city">> + While decently mobile, free cities forces are not in high enough numbers to risk maintaining proloungued contact, allowing your tropps to quickly disengage and redeploy where it hurts. + <<elseif $attackType == "old world">> + Old world armies are not famous for the mobility, which makes them highly susceptible to any tactic that exploits manouverability and speed. + <<elseif $attackType == "freedom fighters">> + While not the best equipped army, the experience and mobility typical of freedom fighters groups make them tough targets for an army that relies itself on mobility. + <</if>> +<<elseif $chosenTactic == "Pincer Manouver">> + <<if $attackType == "raiders">> + While numerous, the undisciplined masses of raiders are easy prey for encirclements. + <<elseif $attackType == "free city">> + While decently mobile, the low number of free cities expedition forces make them good candidates for encirclements. + <<elseif $attackType == "old world">> + The discipline and numbers of old world armies make them quite difficult to encircle. + <<elseif $attackType == "freedom fighters">> + While not particularly mobile, freedom figthers are used to fight against overwhelming odds, diminishing the effectiveness of the encirclement. + <</if>> +<<elseif $chosenTactic == "Defense In Depth">> + <<if $attackType == "raiders">> + While their low discipline makes them prime candidates for an elastic defense type of strategy, their high numbers limit your troops manouverability. + <<elseif $attackType == "free city">> + With their low numbers free cities mercenaries are quite susceptible to this type of tactic, despite their mobility. + <<elseif $attackType == "old world">> + With their low mobility old world armies are very susceptible to this type of strategy. + <<elseif $attackType == "freedom fighters">> + Low mobility and not particularly high numbers mean freedom figthers can be defeated by employing elastic defense tactics. + <</if>> +<<elseif $chosenTactic == "Blitzkrieg">> + <<if $attackType == "raiders">> + With their low discipline and lack fo heavy equipment, lightning strikes are very effective against their lines. + <<elseif $attackType == "free city">> + Having good equipment and discipline on their side, free cities expeditions are capable of responding to even strong lightning strikes. + <<elseif $attackType == "old world">> + While disciplined, old world armies low mobility makes them highly susceptible to lightning strikes. + <<elseif $attackType == "freedom fighters">> + While not well equipped, freedom figthers have plenty of experience figthing small, mobile attacks, making them difficult to defeat with lightning strikes. + <</if>> +<<elseif $chosenTactic == "Human Wave">> + <<if $attackType == "raiders">> + The hordes of raiders are much more experienced than your soldiers in executing mass assaults and they also have a lot more bodies to throw in the grinder. + <<elseif $attackType == "free city">> + The good equipment and mobility of free cities mercenaries cannot save them from an organized mass assault. + <<elseif $attackType == "old world">> + Unfortunately the discipline and good equipment of old world armies allow them to respond well against a mass assault. + <<elseif $attackType == "freedom fighters">> + The relative low numbers and not great equipment typical of freedom figthers make them susceptible to being overwhelmed by an organized mass assault. + <</if>> +<</if>> +<<if $tacticsSuccessful == 1>> + In the end <<if $leadingTroops == "PC">>you were<<else>>your commander was<</if>> @@.green;able to successfully employ <<print $chosenTactic>> tactics@@, greatly enhancing the efficacy of your army. +<<else>> + In the end <<if $leadingTroops == "PC">>you were<<else>>your commander was<</if>> @@.red;not able to effectively employ <<print $chosenTactic>> tactics@@, greatly affecting the efficacy of your army. +<</if>> + +<br> + +/* effects on the units */ +<<if $losses > 0>> + <<set _loss = Math.trunc($losses / $deployedUnits)>> + <<if $deployingBots == 1>> + <br> + Your squadron of security drones participated in the battle, dominating the airspace and providing vital intelligence to the rest of the army. + <<set $secBots.troops -= _loss>> + During the battle they suffered + <<if _loss <= 10>> + light casualties. + <<elseif _loss <= 30>> + moderate casualties. + <<elseif _loss <= 60>> + heavy casualties. + <<else>> + catastrofic casualties. + <</if>> + <<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. + <<elseif $secBots.troops <= 10>> + The unit has very few operatives left, it risks compelte annihilation if deployed again. + <</if>> + <</if>> + <<if $deployingMilitia == 1>> + <<set _mL = $militiaUnits.length>> + <<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].isDeployed == 1>> + <br> + $militiaUnits[_i].platoonName participated in the battle, your proud citizens defending with their lives their arcology. + During the battle they suffered + <<if _loss <= 10>> + light casualties + <<elseif _loss <= 30>> + moderate casualties + <<elseif _loss <= 60>> + heavy casualties + <<else>> + catastrofic casualties + <</if>> + <<if $militiaUnits[_i].medics == 1>> + , however + <<print math.trunc(_loss * $militiaUnits[_i].medics * 0.25)>> men were saved by the medics attached to this unit. + <<set $militiaUnits[_i].troops -= Math.trunc(_loss - _loss * $militiaUnits[_i].medics * 0.25)>> + <<set $militiaTotalCasualties += Math.trunc(_loss - _loss * $militiaUnits[_i].medics * 0.25)>> + <<else>> + . + <</if>> + <<if $militiaUnits[_i].troops <= 0>> + <<set $militiaUnits[_i].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. The remnants will be sent home honored as veterans or reorganized in a new unit. + <<elseif $militiaUnits[_i].troops <= 10>> + The unit has very few operatives left, it risks complete annihilation if deployed again. + <</if>> + <</if>> + <</for>> + <</if>> + <<if $deployingSlaves == 1>> + <<set _sL = $slaveUnits.length>> + <<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].isDeployed == 1>> + <br> + $slaveUnits[_i].platoonName participated in the battle. While a rare sight, your slave soldiers show no less willingness to fight for their arcology than their free counterparts, be it because of fear or devotion to their owner. + During the battle they suffered + <<if _loss <= 10>> + light casualties + <<elseif _loss <= 30>> + moderate casualties + <<elseif _loss <= 60>> + heavy casualties + <<else>> + catastrofic casualties + <</if>> + <<if $slaveUnits[_i].medics == 1>> + , however + <<print math.trunc(_loss * $slaveUnits[_i].medics * 0.25)>> men were saved by the medics attached to this unit. + <<set $slaveUnits[_i].troops -= Math.trunc(_loss - _loss * $slaveUnits[_i].medics * 0.25)>> + <<set $slavesTotalCasualties += Math.trunc(_loss - _loss * $slaveUnits[_i].medics * 0.25)>> + <<else>> + . + <</if>> + <<if $slaveUnits.troops <= 0>> + <<set $slaveUnits[_i].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. The remnants will be sent home honored as veterans or reorganized in a new unit. + <</if>> + <</if>> + <</for>> + <</if>> + <<if $deployingMercs == 1>> + <<set _meL = $mercUnits.length>> + <<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].isDeployed == 1>> + <br> + $mercUnits[_i].platoonName participated in the battle. Mercenaries are a common sight on the modern battlefield and yours are proud to serve their generous contractor. + During the battle they suffered + <<if _loss <= 10>> + light casualties + <<elseif _loss <= 30>> + moderate casualties + <<elseif _loss <= 60>> + heavy casualties + <<else>> + catastrofic casualties + <</if>> + <<if $mercUnits[_i].medics == 1>> + , however + <<print math.trunc(_loss * $mercUnits[_i].medics * 0.25)>> men were saved by the medics attached to this unit. + <<set $mercUnits[_i].troops -= Math.trunc(_loss - _loss * $mercUnits[_i].medics * 0.25)>> + <<set $mercTotalCasualties += Math.trunc(_loss - _loss * $mercUnits[_i].medics * 0.25)>> + <<else>> + . + <</if>> + <<if $mercUnits.troops <= 0>> + <<set $mercUnits[_i].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. The remnants will be sent home honored as veterans or reorganized in a new unit. + <</if>> + <</if>> + <</for>> + <</if>> +<</if>> + +<br><br> + +<<set _menialPrice = Math.trunc(($slaveCostFactor*1000)/100)*100>> +<<set _menialPrice = Math.clamp(_menialPrice, 500, 1500)>> + +<<if _captives > 0>> + <<set _captives = Math.trunc(_captives)>> + During the battle <<print _captives>> attackers were captured. + <<if random(1,100) <= 25>> + <<set _roll = random(1,100)>> + <<if _roll <= 33>> + Three of them have the potential to be sex slaves. + <<set _candidates = 3>> + + <<elseif _roll <= 66>> + Two of them have the potential to be sex slaves. + <<set _candidates = 2>> + <<else>> + One of them have the potential to be sex slaves. + <<set _candidates = 1>> + <</if>> + <</if>> + <br> + <span id="captOptions"> + <<link "sell them all immediately">> + <<set $cash += _menialPrice * _captives>> + <<replace "#captOptions">>Captives sold<</replace>> + <</link>> + | + <<link "Keep them as menial slaves">> + <<set $helots += _captives>> + <<replace "#captOptions">>Captives added as menial slaves<</replace>> + <</link>> + </span> +<</if>> + +/* resets variables */ +<<set $leaderWounded = 0>> +<<set $PCWounded = 0>> +<<set $gainedWarfare = 0>> +<<set $woundType = 0>> +<<set $tacticsSuccessful == 0>> +<<set $attackType = "none">> +<<set $chosenTactic = "none">> +<<set $leadingTroops = "none">> +<<set $attackTroops = 0>> +<<set $attackEquip = 0>> +<<set $deployableUnits = 0>> +<<set $deployedUnits = 0>> +<<set $deployingBots = 0>> +<<set $deployingMilitia = 0>> +<<set $deployingSlaves = 0>> +<<set $deployingMercs = 0>> +<<set $battleTerrain = "none">> +<<set $attackThisWeek = 0>> +<<set $deployableUnits = 0>> +<<set $deployedUnits = 0>> +<<set $enemyLosses = 0>> +<<set $losses = 0>> +<<set $battleTurns = 0>> +<<set $secBots.isDeployed = 0>> +<<for _i = 0; _i < _mL; _i++>> + <<set $militiaUnits[_i].isDeployed = 0>> +<</for>> +<<for _i = 0; _i < _sL; _i++>> + <<set $slaveUnits[_i].isDeployed = 0>> +<</for>> +<<for _i = 0; _i < _meL; _i++>> + <<set $mercUnits[_i].isDeployed = 0>> +<</for>> \ No newline at end of file diff --git a/src/SecExp/authorityReport.tw b/src/SecExp/authorityReport.tw new file mode 100644 index 0000000000000000000000000000000000000000..f37349b25663713d2348167b3d7220a2deedc459 --- /dev/null +++ b/src/SecExp/authorityReport.tw @@ -0,0 +1,152 @@ +:: authorityReport [nobr] + +<<if $authority > 19500>> + Your authority is nearly absolute. The arcology is yours to command as it pleases you. +<<elseif $authority > 15000>> + Your authority is extremely high. There's little you cannot do within the walls of your arcology. +<<elseif $authority > 10000>> + Your authority is high. You command respect and fear in equal measure. +<<elseif $authority > 5000>> + Your authority is moderate. You command some respect from your citizens. +<<else>> + Your authority is low. You command no respect or fear from your citizens. +<</if>> + +<<if $PC.career == "wealth">> + As part of the idle wealth, you were used to have obedience coming naturally to you. Now you find it harder to maintain authority over the arcology. + <<set _authGrowth -= 10 * random(5,15)>> +<<elseif $PC.career == "slaver">> + Your past as a slaver helps you assert your authority over the arcology. + <<set _authGrowth += 10 * random(5,15)>> +<<elseif $PC.career == "escort">> + Given your past career as an escort, you find it hard to assert your authority over the arcology and its inhabitants. + <<set _authGrowth -= 10 * random(5,15)>> +<<elseif $PC.career == "servant">> + Given your past career as a servant, you find it hard to assert your authority over the arcology and its inhabitants. + <<set _authGrowth -= 10 * random(5,15)>> +<<elseif $PC.career == "gang">> + Given your past life as a gang leader, you find it easier to assert your authority over the arcology and its inhabitants. + <<set _authGrowth += 10 * random(5,15)>> +<</if>> +<<set _authGrowth = 0>> +<<if $rep >= 19500>> + Your legend is so well known that your mere presence command respect and obedience, increasing your authority. + <<set _authGrowth += 10 * random(10,20)>> +<<elseif $rep >= 15000>> + Your reputation is so high that your mere presence command respect, increasing your authority. + <<set _authGrowth += 10 * random(5,15)>> +<<elseif $rep >= 10000>> + Your reputation is high enough that your presence command some respect, increasing your authority. + <<set _authGrowth += 10 * random(2,8)>> +<</if>> + +<<if $security >= 90>> + Your arcology is incredibly secure and your citizens know quite well who to thank, greatly increasing your authority. + <<set _authGrowth += 10 * random(10,20)>> +<<elseif $security >= 70>> + Your arcology is really secure and your citizens know quite well who to thank, increasing your authority. + <<set _authGrowth += 10 * random(5,15)>> +<<elseif $security >= 50>> + Your arcology is quite secure and your citizens know who to thank, increasing your authority. + <<set _authGrowth += 10 * random(2,8)>> +<</if>> + +<<if $crime >= 90>> + The all powerful criminal organizations controlling the arcology has a easy time undermining your authority. + <<set _authGrowth -= 10 * random(10,20)>> +<<elseif $crime >= 70>> + Crime is king in the arcology, powerful criminals have a easy time undermining your authority. + <<set _authGrowth -= 10 * random(5,15)>> +<<elseif $crime >= 50>> + Criminal organizations have a strong foothold in the arcology, their activities undermine your authority. + <<set _authGrowth -= 10 * random(2,8)>> +<</if>> + +<<if $averageDevotion >= 50 && $averageTrust >= 50>> + The high devotion and trust of your slaves speak eloquently of your leadership capabilities, helping your authority grow. + <<set _authGrowth += 5 * (($averageDevotion + $averageTrust) / 10)>> +<<elseif $averageDevotion >= 50>> + The high devotion of your slaves speak eloquently of your leadership capabilities, helping your authority grow. + <<set _authGrowth += 5 * ($averageDevotion / 10)>> +<<elseif $averageTrust >= 50>> + The high trust of your slaves speak eloquently of your leadership capabilities, helping your authority grow. + <<set _authGrowth += 5 * ($averageTrust / 10)>> +<</if>> + +<<if $arcologies[0].ownership >= 90>> + You own so much of the arcology that your authority quickly increases. + <<set _authGrowth += 5 * Math.trunc($arcologies[0].ownership / 10)>> +<<elseif $arcologies[0].ownership >= 70>> + You own a big part of the arcology, causing your authority to increase. + <<set _authGrowth += 5 * Math.trunc($arcologies[0].ownership / 10)>> +<<elseif $arcologies[0].ownership >= 50>> + You own the majority of the arcology, causing your authority to slowly increase. + <<set _authGrowth += 5 * Math.trunc($arcologies[0].ownership / 10)>> +<<else>> + Your low ownership of the arcology causes your authority to decrease. + <<set _authGrowth -= 5 * Math.trunc($arcologies[0].ownership / 10)>> +<</if>> + +<<if $activeUnits >= 9>> + Your military is massive, commanding so many troops greatly increases your authority. + <<set _authGrowth += 12 * $activeUnits)>> +<<elseif $activeUnits >= 7>> + Your military is huge, commanding such a number of soldiers increases your authority. + <<set _authGrowth += 12 * $activeUnits)>> +<<elseif $activeUnits >= 4>> + Your military is at a decent size, commanding a small army increases your authority. + <<set _authGrowth += 12 * $activeUnits)>> +<</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>> +<<elseif $arcologies[0].FSChattelReligionist >= 90>> + Religious organizations have a tight grip on the minds of your residents and their dogma helps your authority grow. + <<set _authGrowth += $arcologies[0].FSChattelReligionist>> +<</if>> + +<<if $arcologies[0].FSRestart >= 90>> + The arcology's society is extremely stratified. The reliance on the societal elite by the lower classes greatly increases your reputation. + <<set _authGrowth += $arcologies[0].FSRestart>> +<<elseif $arcologies[0].FSRestart >= 50>> + The arcology's society is very stratified. The reliance on the societal elite by the lower classes increases your reputation. + <<set _authGrowth += $arcologies[0].FSRestart>> +<</if>> + +<<if $arcologies[0].FSPaternalist >= 90>> + Your extremely paternalistic society has the unfortunate side effects of spreading dangerous ideals in the arcology, damaging your authority. + <<set _authGrowth -= $arcologies[0].FSPaternalist>> +<<elseif $arcologies[0].FSPaternalist >= 50>> + Your paternalistic society has the unfortunate side effects of spreading dangerous ideals in the arcology, damaging your authority. + <<set _authGrowth -= $arcologies[0].FSPaternalist>> +<</if>> + +<<if $arcologies[0].FSNull >= 90>> + Cultural openess allows dangerous ideas to spread in your arcology, damaging your reputation. + <<set _authGrowth -= $arcologies[0].FSNull>> +<<elseif $arcologies[0].FSNull >= 50>> + Cultural openess allows dangerous ideas to spread in your arcology, damaging your reputation. + <<set _authGrowth -= $arcologies[0].FSNull>> +<</if>> + +<<if $miniTruth >= 1>> + Your authenticity department works tirelessly to impose your authority in all the arcology. + <<set _authGrowth += 15 * $miniTruth>> +<</if>> + +<<if $secretService >= 1>> + Your secret services constantly keep under surveillance any potential threat, intervenening when necessary. Rumors of the secretive security service and mysterious disappereances make increase your authority. + <<set _authGrowth += 15 * $secretService>> +<</if>> +This week +<<if _authGrowth > 0>> + @@.green;authority has increased@@. +<<elseif _authGrowth == 0>> + @@.yellow;authority did not change@@. +<<else>> + @@.red;authority has decreased@@. +<</if>> + +<<set $authority += _authGrowth>> +<<set $authority = Math.trunc(Math.clamp($authority, 0, 20000))>> diff --git a/src/SecExp/edicts.tw b/src/SecExp/edicts.tw new file mode 100644 index 0000000000000000000000000000000000000000..780f80782a8a1f82ddbdb5ae53bdd394f1115e16 --- /dev/null +++ b/src/SecExp/edicts.tw @@ -0,0 +1,363 @@ +:: edicts [nobr] + +<<set $nextButton = "Back">> +<<set $nextLink = "Main">> + +''__Active Edicts__'' + +<<if $alternativeRents == 1>> + <br>''Alternative rent payment:'' you are allowing citizens to pay for their rents in menial slaves rather than cash. + [[Repeal|edicts][$alternativeRents = 0]] +<</if>> + +<<if $enslavementRights == 1>> + <br>''Enslavement rights:'' you are the only authority able to declare a person enslaved or not. + [[Repeal|edicts][$enslavementRights = 0]] +<</if>> + +<<if $sellData == 1>> + <br>''Private Data marketization:'' you are selling private citizens' data to the best bidder. + [[Repeal|edicts][$sellData = 0, $edictsAuthUpkeep -= 100]] +<</if>> + +<<if $propCampaignBoost == 1>> + <br>''Obligatory educational material:'' you are forcing residents to read curated educational material about the arcology. + [[Repeal|edicts][$propCampaignBoost = 0]] +<</if>> + +<<if $slaveWatch == 1>> + <br>''@@.lime;Slave mistreatment watch:@@'' slaves are able access a special security service in case of mistreatment. + [[Repeal|edicts][$slaveWatch = 0, $edictsUpkeep -= 1000]] +<</if>> + +<<if $subsidyChurch == 1>> + <br>''@@.lime;Religious activities subsidy:@@'' you are providing economic support to religious activities following the official dogma. + [[Repeal|edicts][$subsidyChurch = 0, $edictsUpkeep -= 1000]] +<</if>> + +<<if $limitImmigration == 1 || $openBorders == 1>> +<br><br>__Immigration:__ + +<<if $limitImmigration == 1>> + <br>''Immigration limits:'' you put strict limits to the amount of people the arcology can accept each week. + [[Repeal|edicts][$limitImmigration = 0]] +<</if>> + +<<if $openBorders == 1>> + <br>''Open borders:'' you have lowered considerably the requirements to become citizens. + [[Repeal|edicts][$openBorders = 0]] +<</if>> +<</if>> + +<<if $hasFoughtOnce == 1>> +<br><br>Defense Force:__ + <<if $slavesOfficers == 1>> + <br>''Slave Officers:'' your trusted slaves are allowed to lead the defense forces of the arcology. + [[Repeal|edicts][$slavesOfficers = 0, $edictsAuthUpkeep -= 100]] + <</if>> + + <<if $mercenaries > 0>> + <<if $discountMercenaries == 1>> + <br>''Mercenary subsidy:'' mercenaries willing to immigrate in your arcology will be offered a discount on rent. + [[Repeal|edicts][$discountMercenaries = 0]] + <</if>> + <</if>> + + <<if $militiaFounded == 1>> + <<if $conscription == 1>> + <br>''Conscription:'' every citizen is required to train in the militia and serve the arcology for a limited amount of time. + [[Repeal|edicts][$conscription = 0, $recruitVolunteers = 1]] + <</if>> + <<if $militaryService == 1>> + <br>''Obligatory military service:'' every citizen is required to register and serve under the militia. + [[Repeal|edicts][$militaryService = 0, $recruitVolunteers = 1]] + <</if>> + <<if $militarizedSociety == 1>> + <br>''Militarized Society:'' every adult citizen is required to train and actively participate in the military of the arcology. + [[Repeal|edicts][$militarizedSociety = 0, $recruitVolunteers = 1]] + <</if>> + + <<if militaryExemption == 1>> + <br>''Military exemption:'' you allow citizens to avoid military duty by paying a weekly fee. + [[Repeal|edicts][$militaryExemption = 0]] + <</if>> + + <<if $lowerRquirements == 1>> + <br>''@@.lime;Revised minimum requirements:@@'' you allow citizens outside the normally accepted range to join the militia. + [[Repeal|edicts][$lowerRquirements = 0]] + <</if>> + + <<if $noSubhumansInArmy == 1>> + <br>''@@.lime;No subhumans in the militia:@@'' it is forbidden for subhumans to join the militia. + [[Repeal|edicts][$noSubhumansInArmy = 0]] + <</if>> + + <<if $pregExemption == 1>> + <br>''@@.lime;Military exemption for pregnancys:@@'' pregnant citizens are allowed, and encouraged, to avoid military service. + [[Repeal|edicts][$pregExemption = 0]] + <</if>> + <</if>> + + <<if $martialSchool == 1>> + <br>''@@.lime;Slave martial schools:@@'' specialized schools are training slaves in martial arts and bodyguarding. + [[Repeal|edicts][$martialSchool = 0, $edictsUpkeep -= 1000, $slaveBaseMorale -= 5]] + <</if>> + + <<if $eliteOfficers == 1>> + <br>''@@.lime;Elite officers:@@'' officers are exclusively recruited from the elite of society. + [[Repeal|edicts][$eliteOfficers = 0, $militiaBaseMorale += 5, $slaveBaseMorale -= 5]] + <</if>> + + <<if $liveTargets == 1>> + <br>''@@.lime;Live targets drills:@@'' disobedient slaves are used as live targets at shooting ranges. + [[Repeal|edicts][$eliteOfficers = 0]] + <</if>> +<</if>> + +<<if $FSAnnounced>> + <br><br>__Future Societies:__ + <<if $legionTradition == 1>> + <br>''@@.lime;Legionaries traditions:@@'' you are funding specialized training for your recruits following the Roman tradition of professional armies. + [[Repeal|edicts][$legionTradition = 0, $edictsUpkeep -= 1000, $militiaBaseDefense -= 2, $militiaBaseMorale -= 5, $militiaBaseHp--]] + <</if>> + + <<if $pharaonTradition == 1>> + <br>''@@.lime;Legionaries traditions:@@'' you are funding specialized training for your recruits to turn them into an army worthy of a pharaon. + [[Implement|edicts][$pharaonTradition = 0, $edictsUpkeep -= 1000, $militiaBaseAttack -= 2, $militiaBaseDefense -= 2, $militiaBaseMorale -= 10]] + <br> //Will increase attack, defense and morale of militia units, but will incur in upkeep costs.// + <</if>> + + <<if $eagleWarriors == 1>> + <br>''@@.lime;Eagle warriors traditions:@@'' you are funding specialized training for your mercenaries following the Aztec tradition of elite warriors. + [[Repeal|edicts][$eagleWarriors = 0, $edictsUpkeep -= 1000, $mercBaseAttack -= 4, $mercBaseDefense += 2, $mercBaseMorale -= 10]] + <</if>> + + <<if $ronin == 1>> + <br>''@@.lime;Ronin traditions:@@'' you are funding specialized training for your mercenaries following the Japanese tradition of elite errant samurai. + [[Repeal|edicts][$ronin = 0, $edictsUpkeep -= 1000, $mercBaseAttack -= 2, $mercBaseDefense -= 2, $mercBaseMorale -= 10]] + <</if>> + + <<if $mamluks == 1>> + <br>''@@.lime;Mamluks traditions:@@'' you are funding specialized training for your slaves following the Arabian tradition of mamluks slave soldiers. + [[Repeal|edicts][$ronin = 0, $edictsUpkeep -= 1000, $slaveBaseAttack -= 2, $slaveBaseHp--, $slaveBaseMorale -= 10]] + <</if>> + + <<if $sunTzu == 1>> + <br>''@@.lime;Sun Tzu Teachings:@@'' you are funding specialized training for your units and officers to follow the teachings of the "Art of War". + [[Repeal|edicts][$sunTzu = 0, $edictsUpkeep -= 1000, $militiaBaseAttack--, $militiaBaseDefense--, $mercBaseAttack--, $mercBaseDefense--, $slaveBaseAttack--, $slaveBaseDefense--, $militiaBaseMorale -= 5, $mercBaseMorale -= 5, $slaveBaseMorale -= 5]] + <</if>> +<</if>> + +<hr> + +<<if $authority >= 1000>> +''__Available Edicts__'' +<br>//Passing any edict will cost ¤5000 and some authority. More edicts will become available as the arcology develops.// + +<<if $alternativeRents == 0>> + <br>''Alternative rent payment:'' allow citizens to pay for their rents in menial slaves rather than cash, if so they wish. + [[Implement|edicts][$alternativeRents = 1, $cash -=5000, $authority -= 1000]] + <br> //Will decrease rents, but will supply a small amount of menial slaves each week.// +<</if>> + +<<if $enslavementRights == 0>> + <br>''Enslavement rights:'' the arcology owner will be the the only authority able to declare a person enslaved or not. + [[Implement|edicts][$enslavementRights = 1, $cash -=5000, $authority -= 1000]] + <br> //Will provide cash each week. The higher the flux of citizens to slaves the higher the income. Will cost authority each week.// +<</if>> + +<<if $sellData == 0 && ($secUpgrades.nanoCams == 1 || $secUpgrades.cyberBots == 1 || $secUpgrades.eyeScan == 1 || $secUpgrades.cryptoAnalyzer == 1 || $crimeUpgrades.autoTrial == 1 || $crimeUpgrades.autoArchive == 1 || $crimeUpgrades.worldProfiler == 1 || $crimeUpgrades.advForensic == 1)>> + <br>''Private Data marketization:'' allow the selling of private citizens' data. + [[Implement|edicts][$sellData = 1, $cash -=5000, $authority -= 1000, $edictsAuthUpkeep += 100]] + <br> //Will generate income dependent on the amount of upgrades installed in the security HQ, but will cost a small amount of authority each week.// +<</if>> + +<<if $propHub == 1>> + <<if $propCampaignBoost == 0>> + <br>''Obligatory educational material:'' force residents to read curated educational material about the arcology. + [[Implement|edicts][$alternativeRents = 1, $cash -=5000, $authority -= 1000]] + <br> //Will increase the effectiveness of propaganda campaigns, but will incur in upkeep costs.// + <</if>> +<</if>> + +<<if $arcologies[0].FSPaternalist != "unset">> + <<if $slaveWatch == 0>> + <br>''@@.lime;Slave mistreatment watch:@@'' slaves will be able access a special security service in case of mistreatment. + [[Implement|edicts][$slaveWatch = 1, $cash -=5000, $authority -= 1000]] + <br> //Will help advance paternalism, but will incur in upkeep costs.// + <</if>> +<</if>> + +<<if $arcologies[0].FSChattelReligionist >= 40>> + <<if $subsidyChurch == 0>> + <br>''@@.lime;Religious activities subsidy:@@'' will provide ecnomic support to religious activities following the official dogma. + [[Implement|edicts][$subsidyChurch = 1, $cash -=5000, $authority -= 1000]] + <br> //Will provide authority each week, but will incur in upkeep costs.// + <</if>> +<</if>> + +<br><br>__Immigration:__ + +<<if $limitImmigration == 0>> + <br>''Immigration limits:'' institute limits to the amount of people the arcology will accept each week. + [[Implement|edicts][$openBorders = 0, $limitImmigration = 1, $cash -=5000, $authority -= 1000]] + <br> //Will lower the amount of people immigrating into the arcology and enhance security.// +<</if>> + +<<if $openBorders == 0>> + <br>''Open borders:'' considerably lower requirements to become citizens. + [[Implement|edicts][$openBorders = 1, $limitImmigration = 0, $cash -=5000, $authority -= 1000]] + <br> //Will increase immigration to the arcology, but will increase crime.// +<</if>> + +<<if $hasFoughtOnce == 1>> +<br><br>Defense Force:__ + <<if $slavesOfficers == 0>> + <br>''Slave Officers:'' allow your trusted slaves to lead the defense forces of the arcology. + [[Implement|edicts][$slavesOfficers = 1, $cash -=5000, $authority -= 1000, $edictsAuthUpkeep += 100]] + <br> //Will allow your bodyguard and head girl to lead troops into battle, but will cost a small amount of authority each week.// + <</if>> + + <<if $mercenaries > 0>> + <<if $discountMercenaries == 0>> + <br>''Mercenary subsidy:'' mercenaries willing to immigrate in your arcology will be offered a discount on rent. + [[Implement|edicts][$discountMercenaries = 1, $cash -=5000, $authority -= 1000]] + <br> //Will slightly lower rent, but will increase the amount of available mercenaries.// + <</if>> + <</if>> + + <<if $militiaFounded == 0>> + <br>''Found the militia:'' lay the groundwork for the formation of the arcology's citizens' army. + [[Implement|edicts][$militiaFounded = 1, $recruitVolunteers = 1, $cash -=5000, $authority -= 1000]] + <br> //Will allow for the recruitment and training of citizens.// + <</if>> + + <<if $militiaFounded == 1>> + <<if $recruitVolunteers == 0>> + <br>''Volunteers' militia:'' only volunteers will be accepted in the militia. + [[Implement|edicts][$militarizedSociety = 0, $militaryService = 0, $conscription = 0, $recruitVolunteers = 1, $cash -=5000, $authority -= 1000]] + <br> //Will replenish militia manpower slowly and will cap at 2% of the total citizens population.// + <</if>> + <<if $conscription == 0>> + <br>''Conscription:'' every citizen is required to train in the militia and serve the arcology if the need arises. + [[Implement|edicts][$militarizedSociety = 0, $militaryService = 0, $conscription = 1, $recruitVolunteers = 0, $cash -=5000, $authority -= 4000]] + <br> //Will replenish militia manpower moderatly fast and will cap at 5% of the total citizens population, but has a high authority cost// + <</if>> + <<if $militaryService == 0>> + <br>''Obligatory military service:'' every citizen is required to register and serve under the militia. + [[Implement|edicts][$militarizedSociety = 0, $militaryService = 1, $conscription = 0, $recruitVolunteers = 0, $cash -=5000, $authority -= 6000]] + <br> //Will quickly replenish militia manpower and will cap at 10% of the total citizens population, but has a very high authority cost// + <</if>> + <<if $militarizedSociety == 0>> + <br>''Militarized Society:'' every adult citizen is required to train and participate in the defense of the arcology. + [[Implement|edicts][$militarizedSociety = 1, $militaryService = 0, $conscription = 0, $recruitVolunteers = 0, $cash -=5000, $authority -= 8000]] + <br> //Will very quickly replenish militia manpower and will cap at 20% of the total citizens population, but has an extremely high authority cost// + <</if>> + + <<if militaryExemption == 0 && ($conscription == 1 || $militaryService == 1 || $militarizedSociety == 1)>> + <br>''Military exemption:'' allow citizens to avoid military duty by paying a weekly fee. + [[Implement|edicts][$militaryExemption = 1, $cash -=5000, $authority -= 1000]] + <br> //Will slow down the replenishment of manpower, but will supply cash each week. More profitable with stricter recruitment laws.// + <</if>> + + <<if $arcologies[0].FSHedonisticDecadence >= 40>> + <<if $lowerRquirements == 0>> + <br>''@@.lime;Revised minimum requirements:@@'' will allow citizens outside the normally accepted range to join the militia. + [[Implement|edicts][$lowerRquirements = 1, $cash -=5000, $authority -= 1000, $militiaBaseDefense--, $militiaBaseHp--]] + <br> //Will slightly lower defense and hp of militia units, but will increase the manpower replenishment rate.// + <</if>> + <</if>> + + <<if $arcologies[0].FSSubjugationist >= 40>> + <<if $noSubhumansInArmy == 0>> + <br>''@@.lime;No subhumans in the militia:@@'' prevent subhumans from joining the militia. + [[Implement|edicts][$noSubhumansInArmy = 1, $cash -=5000, $authority -= 1000]] + <br> //Will help advance racial Subjugation, but will slow down slightly manpower replenishment.// + <</if>> + <</if>> + + <<if $arcologies[0].FSRepopulationFocus >= 40 && ($conscription == 1 || $militaryService == 1 || $militarizedSociety == 1)>> + <<if $pregExemption == 0>> + <br>''@@.lime;Military exemption for pregnancys:@@'' pregnant citizens will be allowed, and encouraged, to avoid military service. + [[Implement|edicts][$pregExemption = 1, $cash -=5000, $authority -= 1000]] + <br> //Will help advance repopulation focus, but will slow down slightly manpower replenishment.// + <</if>> + <</if>> + <</if>> + + <<if $arcologies[0].FSPhysicalIdealist >= 40>> + <<if $martialSchool == 0>> + <br>''@@.lime;Slave martial schools:@@'' specialized schools will be set up to train slaves in martial arts and bodyguarding. + [[Implement|edicts][$martialSchool = 1, $cash -=5000, $authority -= 1000, $edictsUpkeep += 1000, $slaveBaseMorale += 5]] + <br> //Will slightly increase morale of slave units, but will incur in upkeep costs.// + <</if>> + <</if>> + + <<if $arcologies[0].FSRestart >= 40>> + <<if $eliteOfficers == 0>> + <br>''@@.lime;Elite officers:@@'' officers will be exclusively recruited from the elite of society. + [[Implement|edicts][$eliteOfficers = 1, $cash -=5000, $authority -= 1000, $militiaBaseMorale += 5, $slaveBaseMorale -= 5]] + <br> //Will help advance eugenics and provide a small morale boost to militia units, but will give a small morale malus to slave units.// + <</if>> + <</if>> + + <<if $arcologies[0].FSDegradationist >= 40>> + <<if $liveTargets == 0>> + <br>''@@.lime;Live targets drills:@@'' disobedient slaves will be used as live targets at shooting ranges. + [[Implement|edicts][$liveTargets = 1, $cash -=5000, $authority -= 1000]] + <br> //Will help advance degredationism and provide a small amount of exp to units, but will make the slave population slowly decline.// + <</if>> + <</if>> +<</if>> + +<<if $FSAnnounced>> + <br><br>__Future Societies:__ + <<if $arcologies[0].FSRomanRevivalist >= 40 && $militiaFounded == 1>> + <<if $legionTradition == 0>> + <br>''@@.lime;Legionaries traditions:@@'' Fund specialized training for your recruits to turn them into the professional of Roman tradition. + [[Implement|edicts][$legionTradition = 1, $cash -=5000, $authority -= 1000, $edictsUpkeep += 1000, $militiaBaseDefense += 2, $militiaBaseMorale += 5, $militiaBaseHp++]] + <br> //Will increase defense, morale and hp of militia units, but will incur in upkeep costs.// + <</if>> + <</if>> + + <<if $arcologies[0].FSEgyptianRevivalist >= 40 && $militiaFounded == 1>> + <<if $pharaonTradition == 0>> + <br>''@@.lime;Legionaries traditions:@@'' Fund specialized training for your recruits to turn them into an army worthy of a pharaon. + [[Implement|edicts][$pharaonTradition = 1, $cash -=5000, $authority -= 1000, $edictsUpkeep += 1000, $militiaBaseAttack += 2, $militiaBaseDefense += 2, $militiaBaseMorale += 10]] + <br> //Will increase attack, defense and morale of militia units, but will incur in upkeep costs.// + <</if>> + <</if>> + + <<if $arcologies[0].FSAztecRevivalist >= 40 && $mercenaries > 0>> + <<if $eagleWarriors == 0>> + <br>''@@.lime;Eagle warriors traditions:@@'' Fund specialized training for your mercenaries to turn them into the elite units of Aztec tradition. + [[Implement|edicts][$eagleWarriors = 1, $cash -=5000, $authority -= 1000, $edictsUpkeep += 1000, $mercBaseAttack += 4, $mercBaseDefense -= 2, $mercBaseMorale += 10]] + <br> //Will give a high increase in attack and morale, but will lower defense of mercenary units and will incur in upkeep costs.// + <</if>> + <</if>> + + <<if $arcologies[0].FSEdoRevivalist >= 40 && $mercenaries > 0>> + <<if $ronin == 0>> + <br>''@@.lime;Ronin traditions:@@'' Fund specialized training for your mercenaries to turn them into the errant samurai of Japanese tradition. + [[Implement|edicts][$ronin = 1, $cash -=5000, $authority -= 1000, $edictsUpkeep += 1000, $mercBaseAttack += 2, $mercBaseDefense += 2, $mercBaseMorale += 10]] + <br> //Will increase attack, defense and morale of mercenary units, but will incur in upkeep costs.// + <</if>> + <</if>> + + <<if $arcologies[0].FSArabianRevivalist >= 40>> + <<if $mamluks == 0>> + <br>''@@.lime;Mamluks traditions:@@'' Fund specialized training for your slaves to turn them into the mamluks slave soldiers of Arabian tradition. + [[Implement|edicts][$ronin = 1, $cash -=5000, $authority -= 1000, $edictsUpkeep += 1000, $slaveBaseAttack += 2, $slaveBaseHp++, $slaveBaseMorale += 10]] + <br> //Will increase attack, morale and hp of mercenary units, but will incur in upkeep costs.// + <</if>> + <</if>> + + <<if $arcologies[0].FSChineseRevivalist >= 40>> + <<if $sunTzu == 0>> + <br>''@@.lime;Sun Tzu Teachings:@@'' Fund specialized training for your units and officers to comform your army to the teachings of the "Art of War". + [[Implement|edicts][$sunTzu = 1, $cash -=5000, $authority -= 1000, $militiaBaseAttack++, $militiaBaseDefense++, $mercBaseAttack++, $mercBaseDefense++, $slaveBaseAttack++, $slaveBaseDefense++, $militiaBaseMorale += 5, $mercBaseMorale += 5, $slaveBaseMorale += 5, $edictsUpkeep += 1000]] + <br> //Will slightly increase attack, defense and morale of all units, but will incur in upkeep costs.// + <</if>> + <</if>> +<</if>> +<</if>> /* closes the check for at least 1000 authority */ \ No newline at end of file diff --git a/src/SecExp/propagandaHub.tw b/src/SecExp/propagandaHub.tw new file mode 100644 index 0000000000000000000000000000000000000000..5a6ad2f42932863924ca22b59c2c9e2efdd1ba47 --- /dev/null +++ b/src/SecExp/propagandaHub.tw @@ -0,0 +1,191 @@ +:: propagandaHub [nobr] + +Propaganda Hub +<hr> + +The propaganda hub is a surprisingly inconspicuous building, dimly lit from the outside. You are well aware however of its role and its importance. You confidently enter its unassuming doorway and calmly review the work being done here. + +<br> +<br> + +/* classic propaganda */ +<<if $propCampaign == 0>> + <<link "Set up a propaganda campaign">> + <<set $propCampaign += 1>> + <<set $cash -= 5000*$upgradeMultiplierArcology>> + <<set $propFocus == "social engineering">> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Set up a propaganda campaign to align your citizens with your goals. + <br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will provide the focused resource each week, but will cost reputation in upkeep.// +<<else>> + You have set up a team of trained slaves and expert propagandists, ready to spread the message of your choosing to the population. + <br> + <<if $propFocus == "social engineering">> + Focus on social engineering + <<else>> + <<link "Focus on social engineering">> + <<set $propFocus = "social engineering">> + <<goto "propagandaHub">> + <</link>> + <</if>> + | + <<if $propFocus == "immigration">> + Focus on immigration + <<else>> + <<link "Focus on immigration">> + <<set $propFocus = "immigration">> + <<goto "propagandaHub">> + <</link>> + <</if>> + | + <<if $propFocus == "enslavement">> + Focus on enslavement + <<else>> + <<link "Focus on enslavement">> + <<set $propFocus = "enslavement">> + <<goto "propagandaHub">> + <</link>> + <</if>> + | + <<if $propFocus == "recruitment">> + Focus on recruitment + <<else>> + <<link "Focus on recruitment">> + <<set $propFocus = "recruitment">> + <<goto "propagandaHub">> + <</link>> + <</if>> + <br> + <<if $propFocus == "social engineering">> + You are concentrating your propaganda efforts towards increasing the acceptance of your chosen future societies. + <<elseif $propFocus == "immigration">> + You are concentrating your propaganda efforts towards convincing more people to immigrate to your arcology. + <<elseif $propFocus == "enslavement">> + You are concentrating your propaganda efforts towards convincing more people to voluntarily enslave themselves. + <<elseif $propFocus == "recruitment">> + You are concentrating your propaganda efforts towards convincing more citizens to enter the militia. + <</if>> + <br> + <<if $propCampaign < 5>> + <<link "Invest more resources in the propaganda machine">> + <<set $propCampaign += 1>> + <<set $cash -= 5000 * $upgradeMultiplierArcology * ($propCampaign + 1)>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Invest more resources into the project to increase its effectiveness. + <br>//Costs ¤<<print Math.trunc(5000 * $upgradeMultiplierArcology * ($propCampaign + 1))>>. Will provide more of the focused resource each week, but increase reputation upkeep.// + <<else>> + You upgraded your propaganda machine to its limits. + <</if>> +<</if>> + +<br> +<br> + +/* ministry of truth */ +<<if $miniTruth == 0>> + <<link "Set up the authenticity department">> + <<set $miniTruth += 1>> + <<set $cash -= 5000*$upgradeMultiplierArcology>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Set up a department tasked with guaranteeing the authenticity of all information available in the arcology. Of course if reality is against what is best for the arcology, then it should be redacted as well. + <br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will provide authority and unlock special upgrades, but will increase upkeep.// +<<else>> + <<if $miniTruth < 5>> + <<link "Enlarge the authenticity department">> + <<set $miniTruth += 1>> + <<set $cash -= 5000*$upgradeMultiplierArcology * ($miniTruth + 1)>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Invest more resources into the project to increase its effectiveness. + <br>//Costs ¤<<print Math.trunc(5000 * $upgradeMultiplierArcology * ($miniTruth + 1))>>. Will provide more authority each week, but increases upkeep.// + <<else>> + You have upgraded the authenticity department to its maximum. + <</if>> + <br> + <<if $fakeNews == 0>> + <<link "Install a news generator">> + <<set $fakeNews = 1>> + <<set $cash -= 10000*$upgradeMultiplierArcology>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Install an automatic news generator, able to fabricate thousands of plausible sounding news every day. + <br>//Costs ¤<<print Math.trunc(10000 * $upgradeMultiplierArcology)>>. The authenticity dept. now provides a small amount of reputation as well as authority, but increases upkeep.// + <<else>> + You have installed an automatic news generator. + <</if>> + <br> + <<if $controlLeaks == 0>> + <<link "Institute controlled leaks protocols">> + <<set $controlLeaks = 1>> + <<set $cash -= 10000*$upgradeMultiplierArcology>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Institute a system able to release erroneous, but plausible, information about your business, leading your competitors to prepared financial traps. + <br>//Costs ¤<<print Math.trunc(10000 * $upgradeMultiplierArcology)>>. The authenticity dept. now slightly increases prosperity each week as well as authority, but increases upkeep.// + <<else>> + You have instituted controlled leaks protocols, able to create fabricated leaks of sensible information. + <</if>> +<</if>> + +<br> +<br> + +/* secret police */ +<<if $secretService == 0>> + <<link "Set up personal secret service">> + <<set $secretService += 1>> + <<set $cash -= 10000*$upgradeMultiplierArcology>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Set up a department tasked with the protection of your person, as well as operations requiring a delicate approach. + <br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will provide authority and unlock special upgrades, but will increase upkeep.// +<<else>> + <<if $secretService < 5>> + <<link "Expand the secret service">> + <<set $secretService += 1>> + <<set $cash -= 5000*$upgradeMultiplierArcology * ($secretService + 1)>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Invest more resources into the project to increase its effectiveness. + <br>//Costs ¤<<print Math.trunc(5000 * $upgradeMultiplierArcology * ($secretService + 1))>>. Will provide more authority each week, but increases upkeep.// + <<else>> + You have upgraded the secret service to its maximum. + <</if>> + <br> + <<if $blackOps == 0>> + <<link "Create a black ops team">> + <<set $blackOps = 1>> + <<set $cash -= 10000*$upgradeMultiplierArcology>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Create a black ops team, ready to carry out corporate sabotage and sensible operations to furhter your goals. + <br>//Costs ¤<<print Math.trunc(10000 * $upgradeMultiplierArcology)>>. The secret services now provides security as well a authority, but increases upkeep.// + <<else>> + You have created a black ops team. + <</if>> + <br> + <<if $marketInfiltration == 0>> + <<link "Infiltrate the black market">> + <<set $marketInfiltration = 1>> + <<set $cash -= 10000*$upgradeMultiplierArcology>> + <<set $propHubUpkeep += $upgradeUpkeep>> + <<goto "propagandaHub">> + <</link>> + <br>Establish a presence on the black market in order to manipulate it. + <br>//Costs ¤<<print Math.trunc(10000 * $upgradeMultiplierArcology)>>. The secret services now provides cash as well as authority each week, but will increase crime.// + <<else>> + You have infiltrated the black market and are now in partial control of it. + <</if>> +<</if>> \ No newline at end of file diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw new file mode 100644 index 0000000000000000000000000000000000000000..0c0e0dd5a888516af5dd0032e7c74fd24e132ecd --- /dev/null +++ b/src/SecExp/secBarracks.tw @@ -0,0 +1,581 @@ +:: secBarracks [nobr] + +The Barracks +<hr> +__Upgrades__ +<br> +While for many a sore sight in a free city, the barracks stand proud before you. +<<if $secBarracksUpgrades.size == 0>> + The building is relatively small and able to house a limited number of units. +<<elseif $secBarracksUpgrades.size == 1>> + The building has been expanded and can now house more units comfortably. +<<elseif $secBarracksUpgrades.size == 2>> + The building has been greatly expanded and can now house a small army. +<</if>> +<<if $secBarracksUpgrades.luxury == 0>> + The barracks are a spartan building, with little to make the day to day lives of your soldiers pleasant. +<<elseif $secBarracksUpgrades.luxury == 1>> + The barracks have been made more comfortable by installing high tech furniture. +<<elseif $secBarracksUpgrades.luxury == 2>> + The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. +<<elseif $secBarracksUpgrades.luxury == 3>> + The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. It also provides free access to any digital media. +<<else>> + The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. It also provides free access to any digital media. A small limited access brothel has been added to the structure. +<</if>> +<<if $secBarracksUpgrades.training == 0>> + The building lacks the space and the equipment to train your units. +<<elseif $secBarracksUpgrades.training == 1>> + A training facility has been set up, allowing your units to better their skills with time. +<<else>> + The training facility has been filled with specialized equipment and skilled trainers. +<</if>> +<br> +<br> +<<if $secBarracksUpgrades.size < 2>> + <<link "Increase the size of the barracks">> + <<set $secBarracksUpgrades.size += 1>> + <<set $maxUnits += 2>> + <<set $cash -= 10000>> + <<set $secBarracksUpkeep += $upgradeUpkeep>> + <<goto "secBarracks">> + <</link>> + <br>//Costs ¤10000 and will increase the maximum number of units by 2.// +<<else>> + You've expanded the barracks to their maximum. +<</if>> +<br> +<<if $secBarracksUpgrades.luxury == 0>> + <<link "Increase the quality of life of your soldiers by installing high tech furniture and appliances.">> + <<set $secBarracksUpgrades.luxury += 1>> + <<set $cash -= 5000>> + <<set $secBarracksUpkeep += $upgradeUpkeep>> + <<goto "secBarracks">> + <</link>> + <br>//Costs ¤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.">> + <<set $secBarracksUpgrades.luxury += 1>> + <<set $cash -= 10000>> + <<set $secBarracksUpkeep += $upgradeUpkeep>> + <<goto "secBarracks">> + <</link>> + <br>//Costs ¤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">> + <<set $secBarracksUpgrades.luxury += 1>> + <<set $cash -= 10000>> + <<set $secBarracksUpkeep += $upgradeUpkeep>> + <<goto "secBarracks">> + <</link>> + <br>//Costs ¤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">> + <<set $secBarracksUpgrades.luxury += 1>> + <<set $cash -= 15000>> + <<set $secBarracksUpkeep += $upgradeUpkeep>> + <<goto "secBarracks">> + <</link>> + <br>//Costs ¤15000 and will provide a 5% bonus to morale, for a total of +20%.// +<<else>> + You've made life in your barracks as good as it can get. +<</if>> +<br> +<<if $secBarracksUpgrades.training == 0>> + <<link "Add a training facility to the barracks">> + <<set $secBarracksUpgrades.training += 1>> + <<set $cash -= 10000>> + <<set $secBarracksUpkeep += $upgradeUpkeep>> + <<goto "secBarracks">> + <</link>> + <br>//Costs ¤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">> + <<set $secBarracksUpgrades.training += 1>> + <<set $cash -= 20000>> + <<set $secBarracksUpkeep += $upgradeUpkeep>> + <<goto "secBarracks">> + <</link>> + <br>//Costs ¤20000 and will allow units to accumulate experience each week.// +<<else>> + You have improved the training facility to the limit. +<</if>> + +<br> +<br> + +__Units__ +<br> +Your maximum number of units is <<print $maxUnits>>, currently you have <<print $activeUnits>>. <<if $secBarracksUpgrades.luxury > 0>>The barracks provide <<print $secBarracksUpgrades.luxury * 5>>% bonus morale in case of a battle.<</if>><<if $secBarracksUpgrades.training > 0>> The training facility will increase the effectiveness of your units with time.<</if>> +<<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSChineseRevivalist != "unset" || $arcologies[0].FSArabianRevivalist != "unset" || $arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSEgyptianRevivalist != "unset" || $arcologies[0].FSAztecRevivalist != "unset">> + <br> + <<link "Rename units to comform with future societies choices">> + /* TODO */ + <</link>> +<</if>> + +<br> +<br> + +/* drones */ +<<if $secBots.active == 1>> + <hr> + <<secBotsDescription>> + <br> + <<link "Review Equipment and upgrades">> + <<set $targetUnit = "secBots">> + <<goto "seeUnit">> + <</link>> + <<if $secBots.troops < $secBots.maxTroops>> + | + <<link "Replenish the unit">> + <<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 - $secBots.troops) * $secBotsCost>> + <<set $secBots.troops = $secBots.maxTroops>> + <<set $secBots.active == 1>> + <<goto "secBarracks">> + <<goto "secBarracks">> + <</link>> +<</if>> + +<br> +<br> + +/* slaves */ +You are free to organize your menial slaves into fighting units. Currently you have <<print $helots>> slaves available, while <<print $slavesEmployedManpower>> are already employed as soldiers. During all your battles you lost a total of <<print $slavesTotalCasualties>>. +<br> +<<set _sL = $slaveUnits.length>> +<<if $helots > 0 && $activeUnits < $maxUnits>> + <<link "Form a new unit">> + <<if $slaveUnits.length == 0>> + <<set _name = (1+$slaveUnits.length) + "st slave platoon">> + <<elseif $slaveUnits.length == 1>> + <<set _name = (1+$slaveUnits.length) + "nd slave platoon">> + <<elseif $slaveUnits.length == 2>> + <<set _name = (1+$slaveUnits.length) + "rd slave platoon">> + <<else>> + <<set _name = (1+$slaveUnits.length) + "th slave platoon">> + <</if>> + <<if $helots >= $maxTroops>> + <<set _newUnit = { + platoonName: _name, + active: 1, + isDeployed: 0, + troops: $maxTroops, + maxTroops: $maxTroops, + equip: 0, + training: 0, + loyalty: 0, + medics: 0, + battlesFought: 0}>> + <<set $slaveUnits.push(_newUnit)>> + <<set $helots -= 30>> + <<set $slavesEmployedManpower += 30>> + <<else>> + <<set _newUnit = { + platoonName: _name, + active: 1, + isDeployed: 0, + troops: $helots, + maxTroops: $maxTroops, + equip: 0, + training: 0, + loyalty: 0, + medics: 0, + battlesFought: 0}>> + <<set $slaveUnits.push(_newUnit)>> + <<set $slavesEmployedManpower += _newUnit.troops>> + <<set $helots = 0>> + <</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>> + <<if $slaveUnits[_i].active == 1>> + <hr> + <<slaveUnitsDescription $slaveUnits[_i]>> + <br> + <<link "Disband the unit">> + <<set $helots += $slaveUnits[_i].troops>> + <<set $slavesEmployedManpower -= $slaveUnits[_i].troops>> + <<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>> + <<set $activeUnits-->> + <<goto "secBarracks">> + <</link>> + | + <<link "Review Equipment and upgrades">> + <<set $targetUnit = "slaveUnits">> + <<set $targetIndex = _i>> + <<goto "seeUnit">> + <</link>> + | + <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $helots > 0>> + <<link "Replenish unit">> + <<if $helots >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> + <<set $helots -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> + <<set $slavesEmployedManpower += $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 $slavesEmployedManpower += $helots>> + <<set _expLoss = $helots / $slaveUnits[_i].troops>> + <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> + <<set $slaveUnits[_i].troops += $helots>> + <<set $helots = 0>> + <</if>> + <<goto "secBarracks">> + <</link>> + <</if>> + + <<else>> + $slaveUnits[_i].platoonName lost too many operatives to be considered active. + <br> + <<link "Disband the unit">> + <<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>> + <<set $activeUnits-->> + <<goto "secBarracks">> + <</link>> + | + <<if $helots > 0>> + <<link "Reform the unit">> + <<if $helots >= $slaveUnits[_i].maxTroops>> + <<set $slavesEmployedManpower += $slaveUnits[_i].maxTroops>> + <<set $helots -= $slaveUnits[_i].maxTroops>> + <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> + <<set $slaveUnits[_i].training = 0>> + <<else>> + <<set $slavesEmployedManpower += $helots>> + <<set $slaveUnits[_i].troops += $helots>> + <<set $helots = 0>> + <<set $slaveUnits[_i].training = 0>> + <</if>> + <<set $slaveUnits[_i].active == 1>> + <<goto "secBarracks">> + <</link>> + <</if>> + <</if>> + <</capture>> +<</for>> + +<br> +<br> + +/* militia */ +<<if $militiaFounded == 1>> + You founded the $arcologies[0].name free militia. You are now able to organize your citizens in fighting units. + <<if $militiaRecruitment == 0>> + The militia is composed entirely of volunteers, your manpower is approximately 1.5% of the citizens population of your arcology. + <<elseif $militiaRecruitment == 1>> + 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 $militiaTotalManpower>>, of which <<print $militiaEmployedManpower>> is in active duty. You lost in total <<print $militiaTotalCasualties>> citizens, leaving you with <<print $militiaFreeManpower>> available citizens. + <br> + <<set _mL = $militiaUnits.length>> + <<if $militiaFreeManpower > 0 && $activeUnits < $maxUnits>> + <<link "Form a new unit">> + <<if $militiaUnits.length == 0>> + <<set _name = (1+$militiaUnits.length) + "st citizens' platoon">> + <<elseif $militiaUnits.length == 1>> + <<set _name = (1+$militiaUnits.length) + "nd citizens' platoon">> + <<elseif $militiaUnits.length == 2>> + <<set _name = (1+$militiaUnits.length) + "rd citizens' platoon">> + <<else>> + <<set _name = (1+$militiaUnits.length) + "th citizens' platoon">> + <</if>> + <<if $militiaFreeManpower >= $maxTroops>> + <<set _newUnit = { + platoonName: _name, + active: 1, + isDeployed: 0, + troops: $maxTroops, + maxTroops: $maxTroops, + equip: 0, + training: 0, + loyalty: 0, + medics: 0, + battlesFought: 0}>> + <<set $militiaUnits.push(_newUnit)>> + <<set $militiaFreeManpower -= 30>> + <<set $militiaEmployedManpower += 30>> + <<else>> + <<set _newUnit = { + platoonName: _name, + active: 1, + isDeployed: 0, + troops: $militiaFreeManpower, + maxTroops: $maxTroops, + equip: 0, + training: 0, + loyalty: 0, + medics: 0, + battlesFought: 0}>> + <<set $militiaUnits.push(_newUnit)>> + <<set $militiaEmployedManpower += _newUnit.troops>> + <<set $militiaFreeManpower = 0>> + <</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>> + <br> + <<for _i = 0; _i < _mL; _i++>> + <<capture _i>> + <<if $militiaUnits[_i].active == 1>> + <hr> + <<militiaUnitsDescription $militiaUnits[_i]>> + <br> + <<link "Disband the unit">> + <<set $militiaFreeManpower += $militiaUnits[_i].troops>> + <<set $militiaEmployedManpower -= $militiaUnits[_i].troops>> + <<set _elimUnit = $militiaUnits[_i]>> + <<set _newMilitiaUnits = []>> + <<for _y = 0; _y < _sL; _y++>> + <<if $slaveUnits[_y] != _elimUnit>> + <<set _newMilitiaUnits.push($militiaUnits[_y])>> + <</if>> + <</for>> + <<set $militiaUnits = _newMilitiaUnits>> + <<set $activeUnits-->> + <<goto "secBarracks">> + <</link>> + | + <<link "Review Equipment and upgrades">> + <<set $targetUnit = "militiaUnits">> + <<set $targetIndex = _i>> + <<goto "seeUnit">> + <</link>> + | + <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> + <<link "Replenish unit">> + <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> + <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> + <<set $militiaEmployedManpower += $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 $militiaEmployedManpower += $militiaFreeManpower>> + <<set _expLoss = $militiaFreeManpower / $militiaUnits[_i].troops>> + <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> + <<set $militiaUnits[_i].troops += $militiaFreeManpower>> + <<set $militiaFreeManpower = 0>> + <</if>> + <<goto "secBarracks">> + <</link>> + <</if>> + <<else>> + $militiaUnits[_i].platoonName lost too many operatives to be considered active. + <br> + <<link "Disband the unit">> + <<set $militiaFreeManpower += $militiaUnits[_i].troops>> + <<set $militiaEmployedManpower -= $militiaUnits[_i].troops>> + <<set _elimUnit = $militiaUnits[_i]>> + <<set _newMilitiaUnits = []>> + <<for _y = 0; _y < _sL; _y++>> + <<if $slaveUnits[_y] != _elimUnit>> + <<set _newMilitiaUnits.push($militiaUnits[_y])>> + <</if>> + <</for>> + <<set $militiaUnits = _newMilitiaUnits>> + <<set $activeUnits-->> + <<goto "secBarracks">> + <</link>> + | + <<if $militiaFreeManpower > 0>> + <<link "Reform the unit">> + <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops>> + <<set $militiaEmployedManpower += $militiaUnits[_i].maxTroops>> + <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops>> + <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> + <<set $militiaUnits[_i].training = 0>> + <<else>> + <<set $militiaEmployedManpower += $militiaFreeManpower>> + <<set $militiaUnits[_i].troops += $militiaFreeManpower>> + <<set $militiaFreeManpower = 0>> + <<set $militiaUnits[_i].training = 0>> + <</if>> + <<set $militiaUnits[_i].active == 1>> + <<goto "secBarracks">> + <</link>> + <</if>> + <</if>> + <</capture>> + <</for>> + <br> +<<else>> + You have not yet founded the militia, you will not be able to form citizens units. +<</if>> + +/* mercenaries */ +<<if $mercenaries >= 1>> + 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 $mercTotalManpower>> mercenaries in your arcology, of which <<print $mercEmployedManpower>> actively employed and <<print $mercFreeManpower>> not yet under contract. In total <<print $mercTotalCasualties>> mercenaries have died defending your arcology. + <br> + <<set _meL = $mercUnits.length>> + <<if $mercFreeManpower > 0 && $activeUnits < $maxUnits>> + <<link "Form a new unit">> + <<if $mercUnits.length == 0>> + <<set _name = (1+$mercUnits.length) + "st mercenary platoon">> + <<elseif $mercUnits.length == 1>> + <<set _name = (1+$mercUnits.length) + "nd mercenary platoon">> + <<elseif $mercUnits.length == 2>> + <<set _name = (1+$mercUnits.length) + "rd mercenary platoon">> + <<else>> + <<set _name = (1+$mercUnits.length) + "th mercenary platoon">> + <</if>> + <<if $mercManpower >= $maxTroops>> + <<set _newUnit = { + platoonName: _name, + active: 1, + isDeployed: 0, + troops: $maxTroops, + maxTroops: $maxTroops, + equip: 0, + training: 0, + loyalty: 0, + medics: 0, + battlesFought: 0}>> + <<set $mercUnits.push(_newUnit)>> + <<set $mercFreeManpower -= 30>> + <<set $mercEmployedManpower += 30>> + <<else>> + <<set _newUnit = { + platoonName: _name, + active: 1, + isDeployed: 0, + troops: $mercFreeManpower, + maxTroops: $maxTroops, + equip: 0, + training: 0, + loyalty: 0, + medics: 0, + battlesFought: 0}>> + <<set $mercUnits.push(_newUnit)>> + <<set $mercEmployedManpower += _newUnit.troops>> + <<set $mercFreeManpower = 0>> + <</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>> + <<if $mercUnits[_i].active == 1>> + <hr> + <<mercUnitsDescription $mercUnits[_i]>> + <br> + <<link "Disband the unit">> + <<set $mercFreeManpower += $mercUnits[_i].troops>> + <<set $mercEmployedManpower -= $mercUnits[_i].troops>> + <<set _elimUnit = $mercUnits[_i]>> + <<set _newMercUnits = []>> + <<for _y = 0; _y < _meL; _y++>> + <<if $mercUnits[_y] != _elimUnit>> + <<set _newMercUnits.push($mercUnits[_y])>> + <</if>> + <</for>> + <<set $mercUnits = _newMercUnits>> + <<set $activeUnits-->> + <<goto "secBarracks">> + <</link>> + | + <<link "Review Equipment and upgrades">> + <<set $targetUnit = "mercUnits">> + <<set $targetIndex = _i>> + <<goto "seeUnit">> + <</link>> + | + <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> + <<link "Replenish unit">> + <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> + <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> + <<set $mercEmployedManpower += $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 $mercEmployedManpower += $mercFreeManpower>> + <<set _expLoss = $mercFreeManpower / $mercUnits[_i].troops>> + <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> + <<set $mercUnits[_i].troops += $mercFreeManpower>> + <<set $mercFreeManpower = 0>> + <</if>> + <<goto "secBarracks">> + <</link>> + <</if>> + + <<else>> + $mercUnits[_i].platoonName lost too many operatives to be considered active. + <br> + <<link "Disband the unit">> + <<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>> + <<set $activeUnits-->> + <<goto "secBarracks">> + <</link>> + | + <<if $mercFreeManpower > 0>> + <<link "Reform the unit">> + <<if $mercFreeManpower >= $mercUnits[_i].maxTroops>> + <<set $mercEmployedManpower += $mercUnits[_i].maxTroops>> + <<set $mercFreeManpower -= $mercUnits[_i].maxTroops>> + <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> + <<set $mercUnits[_i].training = 0>> + <<else>> + <<set $mercEmployedManpower += $mercFreeManpower>> + <<set $mercUnits[_i].troops += $mercFreeManpower>> + <<set $mercFreeManpower = 0>> + <<set $mercUnits[_i].training = 0>> + <</if>> + <<set $mercUnits[_i].active == 1>> + <<goto "secBarracks">> + <</link>> + <</if>> + <</if>> + <</capture>> + <</for>> +<</if>> \ No newline at end of file diff --git a/src/SecExp/secInit.tw b/src/SecExp/secInit.tw new file mode 100644 index 0000000000000000000000000000000000000000..cafe26bb08496acaf0937ae7012a3111bd681f8d --- /dev/null +++ b/src/SecExp/secInit.tw @@ -0,0 +1,207 @@ +:: secInit [nobr] + +/* base vars */ +<<set $authority = 0>> +<<set $security = 50>> +<<set $secRestPoint = 40>> +<<set $crime = 20>> +<<set $crimeCap = 100>> +<<set $readiness = 1>> +<<set $maxUnits = 6>> +<<set $activeUnits = 0>> +<<set $attackType = "none">> +<<set $attackThisWeek = 0>> +<<set $lastAttackWeeks = 0>> +<<set $hasFoughtOnce = 0>> +<<set $PCvictoryStreak = 0>> +<<set $PCvictories = 0>> +<<set $PClossStreak = 0>> +<<set $PClosses = 0>> +<<set $oldFlux = 0>> + +/* edicts */ +<<set $edictsUpkeep = 0>> +<<set $edictsAuthUpkeep = 0>> +<<set $alternativeRents = 0>> +<<set $enslavementRights = 0>> +<<set $securityExemption = 0>> +<<set $sellData = 0>> +<<set $propCampaignBoost = 0>> +<<set $slaveWatch = 0>> +<<set $subsidyChurch = 0>> +<<set $limitImmigration = 0>> +<<set $openBorders = 0>> +<<set $limitSubhumans = 0>> +<<set $slavesOfficers = 0>> +<<set $martialSchool = 0>> +<<set $discountMercenaries = 0>> +<<set $militiaFounded = 0>> +<<set $recruitVolunteers = 0>> +<<set $militaryService = 0>> +<<set $militarizedSociety = 0>> +<<set $militaryExemption = 0>> +<<set $lowerRquirements = 0>> +<<set $noSubhumansInArmy = 0>> +<<set $pregExemption = 0>> +<<set $eliteOfficers = 0>> +<<set $liveTargets = 0>> +<<set $legionTradition = 0>> +<<set $eagleWarriors = 0>> +<<set $ronin = 0>> +<<set $sunTzu = 0>> + +/* buildings */ +<<set $upgradeUpkeep = 40>> +<<set $secHQ = 0>> +<<set $secHQUpkeep = $facilityCost>> +<<set $secBarracks = 0>> +<<set $secBarracksUpkeep = $facilityCost>> +<<set $secBbarracksUpgrades ={ + size: 0, + luxury: 0, + training: 0}>> +<<set $secHelots = 0>> +<<set $reqHelots = 20>> +<<set $secUpgrades = { + nanoCams: 0, + cyberBots: 0, + eyeScan: 0, + cryptoAnalyzer: 0}>> +<<set $crimeUpgrades = { + autoTrial: 0, + autoArchive: 0, + worldProfiler: 0, + advForensic: 0}>> +<<set $intelUpgrades = { + sensors: 0, + radar: 0, + signalIntercept: 0}>> +<<set $readinessUpgrades = { + earlyWarn: 0, + rapidPlatforms: 0, + pathways: 0, + rapidVehicles: 0}>> +<<set $propHub = 0>> +<<set $propHubUpkeep = $facilityCost>> +<<set $propCampaign = 0>> +<<set $propFocus = "none">> +<<set $miniTruth = 0>> +<<set $fakeNews = 0>> +<<set $controlLeaks = 0>> +<<set $secretService = 0>> +<<set $blackOps = 0>> +<<set $marketInfiltration = 0>> + +/* armed forces stats */ +<<set $targetUnit = 0>> +<<set $targetIndex = 0>> +<<set $secBotsCost = 500>> +<<set $secBotsUpgradeCost = 250>> +<<set $equipUpgradeCost = 250>> +<<set $maxTroops = 30>> +<<set $militiaTotalManpower = 0>> +<<set $militiaFreeManpower = 0>> +<<set $militiaEmployedManpower = 0>> +<<set $militiaTotalCasualties = 0>> +<<set $slavesOfficers = 0>> +<<set $slavesEmployedManpower = 0>> +<<set $slavesTotalCasualties = 0>> +<<set $mercTotalManpower = 0>> +<<set $mercFreeManpower = 0>> +<<set $mercEmployedManpower = 0>> +<<set $mercTotalCasualties = 0>> +<<set $militiaLoyalty = 0>> +<<set $slaveArmyLoyalty = 0>> +<<set $mercLoyalty = 0>> +<<set $soldierUpkeep = 10>> + +/* enhancements and improvements */ +<<set $riskSim = 0>> +<<set $riskSimExpectedAttack = "none">> +<<set $perimeterDrones = 0>> + +/* battle relevant variables */ +<<set $chosenTactic = "none">> +<<set $leadingTroops = "none">> +<<set $attackTroops = 0>> +<<set $attackEquip = 0>> +<<set $deployableUnits = 0>> +<<set $deployedUnits = 0>> +<<set $deployingBots = 0>> +<<set $deployingMilitia = 0>> +<<set $deployingSlaves = 0>> +<<set $deployingMercs = 0>> +<<set $battleTerrain = "none">> +<<set $maxTurns = 10>> +<<set $battleResult = 4>> /* sets $battleResult value outside accepted range (-3,3) to avoid evaluation problems */ +<<set $losses = 0>> +<<set $enemyLosses = 0>> +<<set $battleTurns = 0>> +<<set $bribeCost = 0>> +<<set $tacticsSuccessful = 0>> +<<set $leaderWounded = 0>> +<<set $woundType = 0>> /* 0=no wound, 1=mute, 2=blind, 3=amputee, 4<=health */ +<<set $gainedCombat = 0>> +<<set $gainedWarfare = 0>> +<<set $PCWounded = 0>> +<<set $PCWoundCooldown = 0>> + +/* statistics */ +<<set $baseBribePerAttacker = 5>> + +<<set $equipMod = 0.15>> +<<set $secBotsBaseAttack = 9>> +<<set $secBotsBaseDefense = 5>> +<<set $secBotsMorale = 200>> +<<set $secBotsBaseHp = 4>> +<<set $militiaBaseAttack = 7>> +<<set $militiaBaseDefense = 5>> +<<set $militiaBaseMorale = 140>> +<<set $militiaBaseHp = 3>> +<<set $slaveBaseAttack = 9>> +<<set $slaveBaseDefense = 3>> +<<set $slaveBaseMorale = 110>> +<<set $slaveBaseHp = 3>> +<<set $mercBaseAttack = 8>> +<<set $mercBaseDefense = 4>> +<<set $mercBaseMorale = 125>> +<<set $mercBaseHp = 4>> + +<<set $raBaseAttack = 7>> +<<set $raBaseDefense = 2>> +<<set $raBaseMorale = 100>> +<<set $raBaseHp = 2>> +<<set $fcBaseAttack = 6>> +<<set $fcBaseDefense = 4>> +<<set $fcBaseMorale = 130>> +<<set $fcBaseHp = 3>> +<<set $owBaseAttack = 8>> +<<set $owBaseDefense = 4>> +<<set $owBaseMorale = 110>> +<<set $owBaseHp = 2>> +<<set $ffBaseAttack = 9>> +<<set $ffBaseDefense = 2>> +<<set $ffBaseMorale = 160>> +<<set $ffBaseHp = 2>> + + +/* Units */ +<<if def $secBots>> + <<set $secBots.active = 0>> + <<set $secBots.isDeployed = 0>> + <<set $secBots.troops = 0>> + <<set $secBots.maxTroops = 0>> + <<set $secBots.equip = 0>> +<<else>> + <<set $secBots = { + platoonName: "security drones", + active: 0, + isDeployed: 0, + troops: 0, + maxTroops: 0, + equip: 0} >> +<</if>> + +<<set $militiaUnits = []>> +<<set $slaveUnits = []>> +<<set $mercUnits = []>> \ No newline at end of file diff --git a/src/SecExp/secTutorial.tw b/src/SecExp/secTutorial.tw new file mode 100644 index 0000000000000000000000000000000000000000..3de375bcd8f1b702a02dad2ebc48fe56bf669373 --- /dev/null +++ b/src/SecExp/secTutorial.tw @@ -0,0 +1 @@ +:: secTutorial [nobr] \ No newline at end of file diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw new file mode 100644 index 0000000000000000000000000000000000000000..7926241c6faacb50cdd532e12e906955ff5b9f7d --- /dev/null +++ b/src/SecExp/securityHQ.tw @@ -0,0 +1,246 @@ +:: securityHQ [nobr] + + +Security headquarters +<hr> + +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 $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>> + You have enough slaves to man all security systems. +<</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 || $secHelots == $maxHelotsInSecHQ>> + <<goto "securityHQ">> + <</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>> + <<if $secHelots < $reqHelots>> + <<goto "securityHQ">> + <</if>> + <</link>> +<<else>> + Transfer out 5 slaves +<</if>> +| +<<if $secHelots != $reqHelots>> + <<link "Match the requirement">> + <<if $helots >= $reqHelots - $secHelots>> + <<set $helots -= $reqHelots - $secHelots>> + <<set $secHelots = $reqHelots>> + <<else>> + <<set $secHelots += $helots>> + <<set $helots = 0>> + <</if>> + <<replace "#secHel">><<print $secHelots>><</replace>> + <<replace "#hel">><<print $helots>><</replace>> + <<if $secHelots == $reqHelots>> + <<goto "securityHQ">> + <</if>> + <</link>> +<<else>> + Match the requirement +<</if>> + +<br> +<br> + +/* security level and upgrades */ +<<if $security <= 20>> + Your security level (@@.deepskyblue;<<print $security>>@@) is dangerously low. +<<elseif $security <= 40>> + Your security level (@@.deepskyblue;<<print $security>>@@) is low. +<<elseif $security <= 60>> + Your security level (@@.deepskyblue;<<print $security>>@@) is decent. +<<elseif $security <= 80>> + Your security level (@@.deepskyblue;<<print $security>>@@) is good. +<<else>> + Your security level (@@.deepskyblue;<<print $security>>@@) is great. +<</if>> +Considering the current upgrades the resting level for security is <<print $secRestPoint>>, while the effective maximum level is <<print Math.trunc($secRestPoint * ($secHelots / $reqHelots))>>. + +<br> +<br> + +<<if $secUpgrades.nanoCams == 0>> + [[Install a nano-camera system |securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $secUpgrades.cctvCams = 1, $secRestPoint += 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will raise rest point of security by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed all across the arcology closed circuit nano-cameras to keep the arcology under your watchful eye. +<</if>> +<br> +<<if $secUpgrades.cyberBots == 0>> + [[Buy cybersecurity algorithms|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $secUpgrades.cyberBots = 1, $secRestPoint += 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(7500*$upgradeMultiplierArcology)>>. Will raise rest point of security by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have bought advanced cybersecurity algorithms that will defend your arcology against hack attempts or cyber frauds. +<</if>> +<br> +<<if $secUpgrades.eyeScan == 0>> + [[Install invisible eye scanners|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $secUpgrades.eyeScan = 1, $secRestPoint += 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will raise rest point of security by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed numerous hidden eye scanners that accurately register the movements of everyone inside the arcology. +<</if>> +<br> +<<if $secUpgrades.cryptoAnalyzer == 0>> + [[Buy and install crypto analyzers|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $secUpgrades.cryptoAnalyzer = 1, $secRestPoint += 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will raise rest point of security by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have bought and employed sophisticated crypto analyzing software to accurately track and archive every financial movement or transaction made inside the walls of your arcology. +<</if>> + +<br> +<br> + +/* crime level and upgrades */ +<<if $crime <= 20>> + Your crime level (@@.orangered;<<print $crime>>@@) is very low. +<<elseif $crime <= $upgradeUpkeep>> + Your crime level (@@.orangered;<<print $crime>>@@) is low. +<<elseif $crime <= 60>> + Your crime level (@@.orangered;<<print $crime>>@@) is average. +<<elseif $crime <= $upgradeUpkeep>> + Your crime level (@@.orangered;<<print $crime>>@@) is high. +<<else>> + Your crime level (@@.orangered;<<print $crime>>@@) is extremely high. +<</if>> +Considering the current upgrades the maximum level of crime is <<print $crimeCap>>, while the effective maximum level is <<print Math.trunc($crimeCap * ($secHelots / $reqHelots))>>. + +<br> +<br> + +<<if $crimeUpgrades.advForensic == 0>> + [[Install advanced forensic equipment|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $crimeUpgrades.advForensic = 1, $crimeCap -= 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed advanced forensic equipment, able to extract every bit of precious information from any clue. +<</if>> +<br> +<<if $crimeUpgrades.autoArchive == 0>> + [[Install auto-curating archiver|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $crimeUpgrades.autoArchive = 1, $crimeCap -= 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(7500*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed auto-curating archiver software, which will update in real time your data archives with any new relevant information on criminals residing in your arcology. +<</if>> +<br> +<<if $crimeUpgrades.autoTrial == 0>> + [[Install automated trials software|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $crimeUpgrades.autoTrial = 1, $crimeCap -= 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed advanced legal algorithms that allows the handling of legal matters much quicker and much more accurately. +<</if>> +<br> +<<if $crimeUpgrades.worldProfiler == 0>> + [[Install worldwide profilers|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $crimeUpgrades.worldProfiler = 1, $crimeCap -= 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed advanced profiler software, which will constantly scour every known data archive on the globe (legally or not) to gather as much information as possible on dangerous criminals. +<</if>> + +<br> +<br> + +/* intelligence */ + +<<if $recon == 0>> + Your reconnaissance capabilities are very limited. Very little information will be available if the arcology is attacked. +<<elseif $recon == 1>> + You have limited reconnaissance capabilities. You'll have limited intel available in case of an attack. +<<elseif $recon == 2>> + You have good reconnaissance capabilities. Good, reliable intel will be available if the arcology is attacked. +<<else>> + You have great reconnaissance capabilities. You'll have very accurate information on the enemy if the arcology is attacked. +<</if>> + +<br> +<br> + +<<if $intelUpgrades.sensors == 0>> + [[Install perimeter sensors|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $intelUpgrades.sensors = 1, $recon += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will increase recon capabilites, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed perimeter seismic sensors able to detect movement with high accuracy. +<</if>> +<br> +<<if $intelUpgrades.signalIntercept == 0>> + [[Create signal interception hub|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $intelUpgrades.signalIntercept = 1, $recon += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep] + <br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will increase recon capabilites, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed advanced signal interception equipment. +<</if>> +<br> +<<if $intelUpgrades.radar == 0>> + [[Install advanced radar equipment|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $intelUpgrades.radar = 1, $recon += 1, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will increase recon capabilites, but will require 10 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have installed sophisticated radar equipment. +<</if>> + +<br> +<br> + +/* readiness */ + +<<if $readiness == 1>> + You have low readiness. You won't be able to mobilize many troops in time in case of an attack. +<<elseif $readiness == 2>> + You have decent readiness. You will be able to muster up sufficient forces to handle an average attack. +<<elseif $readiness == 3>> + You have good readiness. You will be able to mobilize a lot of troops in case of an attack. +<<else>> + You have great readiness. You can mobilize an small army in very little time. +<</if>> + +<br> +<br> + +<<if $readinessUpgrades.pathways == 0>> + [[Build specialized pathways in the arcology|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $readinessUpgrades.pathways = 1, $readiness += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have built specialized pathways inside the arcology to quickly move troops around the structure. +<</if>> +<br> +<<if $readinessUpgrades.rapidVehicles == 0>> + [[Buy rapid armored transport vehicles|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $readinessUpgrades.rapidVehicles = 1, $readiness += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(75000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have bought rapid armored transport vehicles able to bring your troops to battle much quicker than before. +<</if>> +<br> +<<if $readinessUpgrades.rapidPlatforms == 0>> + [[Build rapid deployment platforms|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $readinessUpgrades.rapidPlatforms = 1, $readiness += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 5 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have built rapid deployment platforms able to equip and deploy units within very limited time windows. +<</if>> +<br> +<<if $readinessUpgrades.earlyWarn == 0>> + [[Institute early warning systems|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $readinessUpgrades.earlyWarn = 1, $readiness += 1, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]] + <br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 10 extra slaves in the headquarters and increases upkeep.// +<<else>> + You have created early warning systems that constantly analyze in real time data to determine the likeness of an attack. +<</if>> \ No newline at end of file diff --git a/src/SecExp/securityReport.tw b/src/SecExp/securityReport.tw new file mode 100644 index 0000000000000000000000000000000000000000..06dbf5ae1cac8fba740543d2f3b199b3c1d45ace --- /dev/null +++ b/src/SecExp/securityReport.tw @@ -0,0 +1,380 @@ +:: securityReport [nobr] + +/* init */ +<<set _immigration = $ACitizens - $oldACitizens>> +<<set _secGrowth = 0>> +<<set _secRest = 0>> +<<set _restGrowth = 0>> +<<set _newSec = 0>> +<<set _crimeGrowth = 0>> +<<set _crimeCap = 0>> +<<set _newCrime = 0>> + +<<if $useTabs == 0>>__Security__<</if>> +<br> + +<strong>Security</strong>: +<<if $secHelots > 0>> + <<print $secHelots>> work tirelessly to improve the security of your arcology + <<if $mercenaries >= 1 && $arcologyUpgrade.drones == 1>> + , while your mercenaries and security drones tirelessly patrol the arcology to keep it safe. + <<elseif $arcologyUpgrade.drones == 1>> + , while your security drones tirelessly patrol the arcology to keep it safe. + <<else>> + , while your loyal subordinates try to keep the arcology safe to the best of their abilites. + <</if>> +<<else>> + <<if $mercenaries >= 1 && $arcologyUpgrade.drones == 1>> + Your mercenaries and security drones tirelessly patrol the arcology to keep it safe. + <<elseif $arcologyUpgrade.drones == 1>> + Your security drones tirelessly patrol the arcology to keep it safe. + <<else>> + Your loyal subordinates try to keep the arcology safe to the best of their abilites. + <</if>> +<</if>> + +/* security modifiers */ +<<if $PC.career == "mercenary">> + Your past life as a mercenary makes it easier to manage the security of the arcology. + <<set _secGrowth += 1>> +<</if>> +<<if $ACitizens + $ASlaves <= 2000>> + The small number of residents makes their job easier.<<set _secGrowth += 2>> +<<elseif $ACitizens + $ASlaves <= 4000>> + The fairly low number of residents makes their job a little easier.<<set _secGrowth += 1>> +<<elseif $ACitizens + $ASlaves <= 6000>> + The fairly high number of residents makes their job a little harder.<<set _secGrowth -= -0.5>> +<<elseif $ACitizens + $ASlaves <= 8000>> + The high number of residents makes their job harder.<<set _secGrowth -= 1>> +<<else>> + The extremely high number of residents makes their job a lot harder.<<set _secGrowth -= 2>> +<</if>> +<<if _immigration < 10>> + The limited number of immigrants that reached the arcology this week does not have any serious impact on the efficacy of current security measures.<<set _secGrowth += 0.5>> +<<elseif _immigration < 30>> + The number of immigrants that reached the arcology this week is high enough to complicate security protocols.<<set _secGrowth -= 0.2>> +<<elseif _immigration < 60>> + The high number of immigrants that reached the arcology this week complicates security protocols.<<set _secGrowth -= 0.5>> +<<elseif _immigration < 80>> + The high number of immigrants that reached the arcology this week severely complicates security protocols.<<set _secGrowth -= 1>> +<<else>> + The extremely high number of immigrants that reached the arcology this week severely complicates security protocols.<<set _secGrowth -= 2>> +<</if>> +<<if $crime < 20>> + Crime is a distant problem in the arcology, which makes improving security easier.<<set _secGrowth += 1>> +<<elseif $crime < 40>> + Crime is a minor problem in the arcology, not serious enough to disrupt security efforts. +<<elseif $crime < 60>> + Crime is an issue in the arcology, which makes improving security harder.<<set _secGrowth -= 0.5>> +<<elseif $crime < 80>> + Crime is a overbearing problem in the arcology, which makes improving security a lot harder.<<set _secGrowth -= 1>> +<<else>> + Crime is sovereign in the arcology, which makes improving security extremely difficult.<<set _secGrowth -= 2>> +<</if>> +<<if $authority < 5000>> + The low authority you hold on the arcology hampers the efforts of your security department.<<set _secGrowth -= 1>> +<<elseif $authority < 7500>> + The limited authority you hold on the arcology hampers the efforts of your security department.<<set _secGrowth -= 0.5>> +<<elseif $authority < 10000>> + The authority you hold on the arcology does not significantly impact the efforts of your security department. +<<elseif $authority < 15000>> + The high authority you hold on the arcology facilitates the security department's work.<<set _secGrowth += 0.5>> +<<else>> + The absolute authority you hold on the arcology makes the security department's work a lot easier.<<set _secGrowth += 1>> +<</if>> +<<if $activeUnits >= 6>> + Your military is the size of a small army. Security is easier to maintain with such forces at your disposal. <<set _secGrowth += 0.5>> +<</if>> +<<if $lastAttackWeeks < 3 && $week > 3>> + The recent attack has a negative effect on the security of the arcology.<<set _secGrowth -= 1>> +<<elseif $lastAttackWeeks < 5 && $week > 5>> + While some time has passed, the last attack still has a negative effect on the security of the arcology.<<set _secGrowth -= 0.5>> +<<else>> + The arcology has not been attacked in a while, which has a positive effect on security.<<set _secGrowth += 0.5>> +<</if>> +<<if $blackOps == 1>> + Yoru black ops team proves to be a formidable tool against anyone threatening the security of your arcology. + <<set _secGrowth += 0.5 * random(1,2)>> +<</if>> + +/* resting point */ +<<set _secRest = $secRestPoint * ($secHelots / $reqHelots)>> +<<if _secRest < 0>> + <<set _secRest = 20>> +<</if>> +<<if _secRest < $secRestPoint && $secHQ == 1>> + The limited staff assigned to the HQ hampers the improvements to security achieved this week. +<</if>> +<<set _restGrowth = (_secRest - $security) * 0.2>> +<<set _newSec = Math.trunc($security + _secGrowth + _secRest)>> +<<if _newSec < $security>> + This week @@.red;security decreased@@. +<<elseif _newSec == $security>> + This week @@.yellow;security did not change@@. +<<else>> + This week @@.green;security improved@@. +<</if>> +<<set $security = Math.clamp(_newSec, 0, 100)>> + +<br> +<br> + +<strong>Crime</strong>: +/* crime modifiers */ +<<if $week < 30>> + Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a small impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 0.5>> +<<elseif $week < 60>> + Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a noticeable impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 1>> +<<elseif $week < 90>> + Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a moderate impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 1.5>> +<<elseif $week < 120>> + Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a big impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 2>> +<<else>> + Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a huge impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 2.5>> +<</if>> +<<if $arcologies[0].prosperity < 50>> + The low prosperity of the arcology facilitates criminal recruitment and organization.<<set _crimeGrowth += 2>> +<<elseif $arcologies[0].prosperity < 80>> + The fairly low prosperity of the arcology facilitates criminal recruitment and organization.<<set _crimeGrowth += 1>> +<<elseif $arcologies[0].prosperity < 12>> + The prosperity of the arcology is not high or low enough to have significant effects on criminal recruitment and organization. +<<elseif $arcologies[0].prosperity < 16>> + The prosperity of the arcology is high enough to provide its citizens a decent life, hampering criminal recruitment and organization.<<set _crimeGrowth -= 0.5>> +<<elseif $arcologies[0].prosperity < 18>> + The prosperity of the arcology is high enough to provide its citizens a decent life, significantly hampering criminal recruitment and organization.<<set _crimeGrowth -= 1>> +<<else>> + The prosperity of the arcology is high enough to provide its citizens a very good life, significantly hampering criminal recruitment and organization.<<set _crimeGrowth -= 2>> +<</if>> +<<if $ASlaves < 1000>> + The low number of slaves in the arcology does not hinder the activity of law enforcement, limiting crime growth.<<set _crimeGrowth -= 1>> +<<elseif $ASlaves < 2000>> + The fairly low number of slaves in the arcology does not hinder significantly the activity of law enforcement, limiting crime growth.<<set _crimeGrowth -= 0.5>> +<<elseif $ASlaves < 3000>> + The number of slaves in the arcology is becoming an impediment for law enforcement, facilitating crime growth.<<set _crimeGrowth += 1>> +<<else>> + The number of slaves in the arcology is becoming a a big issue for law enforcement, facilitating crime growth.<<set _crimeGrowth += 1.5>> +<</if>> +<<if $security <= 20>> + The security measures in place are severely limited, allowing crime to grow uncontested. +<<elseif $security <= 50>> + The security measures in place are of limited effect and use, giving only mixed results in their fight against crime.<<set _crimeGrowth -= 1>> +<<elseif $security <= 75>> + The security measures in place are well developed and effective, making a serious dent in the profitability of criminal activity in your arcology.<<set _crimeGrowth -= 2.5>> +<<else>> + The security measures in place are extremely well developed and very effective, posing a serious threat even to the most powerful criminal organizations in existence.<<set _crimeGrowth -= 5>> +<</if>> +<<if $authority < 5000>> + Your low authority allows crime to grow undisturbed.<<set _crimeGrowth += 1>> +<<elseif $authority < 7500>> + Your relatively low authority facilitates criminal activities.<<set _crimeGrowth += 0.5>> +<<elseif $authority < 10000>> + Your authority is not high enough to discourage criminal activity. +<<elseif $authority < 15000>> + Your high authority is an effective tool against crime.<<set _crimeGrowth -= 1>> +<<else>> + Your absolute authority is an extremely effective tool against crime.<<set _crimeGrowth -= 2>> +<</if>> +<<if $cash >= 100000>> + Your great wealth acts as a beacon for the greediest criminals, calling them to your arcology as moths to a flame.<<set _crimeGrowth += 0.5>> +<</if>> +<<if $marketInfiltration == 1>> + <<set _crimeGrowth += 0.5 * random(1,2)>> +<</if>> + +/* crime cap */ +<<set _crimeCap = Math.clamp($crimeCap + $crimeCap * (($reqHelots - $secHelots) / $reqHelots),0,100)>> +<<if _crimeCap < $crimeCap && $secHQ == 1>> + The limited staff assigned to the HQ allows more space for criminals to act. +<</if>> +<<set _newCrime = Math.trunc($crime + _crimeGrowth)>> +<<if _newCrime > _crimeCap>> + <<set _newCrime = _crimeCap>> +<</if>> +<<if _newCrime > $crime>> + This week @@.red;crime increased@@. +<<elseif _newCrime == $crime>> + This week @@.yellow;crime did not change@@. +<<else>> + This week @@.green;crime decreased@@. +<</if>> +<<set $crime = Math.clamp(_newCrime,0,100)>> + +<br> +<br> + +<<if $militiaFounded == 1 || $activeUnits >= 1>> + <strong>Military</strong>: + <<if $recruitVolunteers == 1>> + Your militia accepts only volunteering citizens, ready to defend their arcology. + <<set _recruits = random(1,2)>> + <<if $rep >= 10000>> + Many citizens volunteer just to fight for someone of your renown. + <<set _recruits += 1>> + <</if>> + <<if $authority >= 10000>> + Many citizens feel it is their duty to fight for you, boosting volunteer enrollment. + <<set _recruits += 1>> + <</if>> + <<if $lowerRquirements == 1>> + Your lax phisical requirements to enter the militia allows for a greater number of citizens to join. + <<set _recruits += 1>> + <</if>> + <<if $militiaTotalManpower - $militiaTotalCasualties + _recruits <= 0.02 * $ACitizens>> + <<set $militiaTotalManpower += _recruits>> + <<set $militiaFreeManpower += _recruits>> + This week <<print _recruits>> citizens joined the militia. + <<else>> + There are not many more citizens willing to join the arcology armed forces. You'll need to enact higher recruitment edicts if you need more manpower. + <</if>> + <<elseif $conscription == 1>> + Adult citizens are required to join the militia for a period of time. + <<set _recruits = random(3,5)>> + <<if $militaryExemption == 1>> + Some citizens prefer to contribute to the arcology's defense through financial support rather than military service, making you @@.yellowgreen;a small sum@@. + <<set _recruits -= random(1,2) + <<set $cash += 250>> + <</if>> + <<if $lowerRquirements == 1>> + Your lax phisical requirements to enter the militia allows for a greater number of citizens to join. + <<set _recruits += 1>> + <</if>> + <<if $noSubhumansInArmy == 1>> + Guaranteeing the purity of your armed forces comes with a small loss of potential recruits. + <<set _recruits -= random(0,1)>> + <</if>> + <<if $pregExemption == 1>> + Many pregnant citizens prefer to avoid military service not to endager themselves and their children. + <<set _recruits -= 1>> + <</if>> + <<if $militiaTotalManpower - $militiaTotalCasualties + _recruits <= 0.05 * $ACitizens>> + <<set $militiaTotalManpower += _recruits>> + <<set $militiaFreeManpower += _recruits>> + This week <<print _recruits>> citizens joined the militia. + <<else>> + There are not many more citizens able to join the arcology armed forces. You'll need to enact higher recruitment edicts if you need more manpower. + <</if>> + <<elseif $militaryService == 1>> + Adult citizens are required to register and serve in the militia whenever necessary. + <<set _recruits = random(5,7)>> + <<if $militaryExemption == 1>> + Some citizens prefer to contribute to the arcology's defense through financial support rather than military service, making you @@.yellowgreen;a small sum@@. + <<set _recruits -= random(1,2) + <<set $cash += 250>> + <</if>> + <<if $lowerRquirements == 1>> + Your lax phisical requirements to enter the militia allows for a greater number of citizens to join. + <<set _recruits += 1>> + <</if>> + <<if $noSubhumansInArmy == 1>> + Guaranteeing the purity of your armed forces comes with a small loss of potential recruits. + <<set _recruits -= random(0,1)>> + <</if>> + <<if $pregExemption == 1>> + Many pregnant citizens prefer to avoid military service not to endager themselves and their children. + <<set _recruits -= 1>> + <</if>> + <<if $militiaTotalManpower - $militiaTotalCasualties + _recruits <= 0.10 * $ACitizens>> + <<set $militiaTotalManpower += _recruits>> + <<set $militiaFreeManpower += _recruits>> + This week <<print _recruits>> citizens joined the militia. + <<else>> + There are not many more citizens able to join the arcology armed forces. You'll need to enact higher recruitment edicts if you need more manpower. + <</if>> + <<elseif $militarizedSociety == 1>> + Every citizen is required to train and participate in the military activities of the arcology. + <<set _recruits = random(7,9)>> + <<if $militaryExemption == 1>> + Some citizens prefer to contribute to the arcology's defense through financial support rather than military service, making you @@.yellowgreen;a small sum@@. + <<set _recruits -= random(1,2) + <<set $cash += 250>> + <</if>> + <<if $lowerRquirements == 1>> + Your lax phisical requirements to enter the militia allows for a greater number of citizens to join. + <<set _recruits += 1>> + <</if>> + <<if $noSubhumansInArmy == 1>> + Guaranteeing the purity of your armed forces comes with a small loss of potential recruits. + <<set _recruits -= random(0,1)>> + <</if>> + <<if $pregExemption == 1>> + Many pregnant citizens prefer to avoid military service not to endager themselves and their children. + <<set _recruits -= 1>> + <</if>> + <<if $militiaTotalManpower - $militiaTotalCasualties + _recruits <= 0.20 * $ACitizens>> + <<set $militiaTotalManpower += _recruits>> + <<set $militiaFreeManpower += _recruits>> + This week <<print _recruits>> citizens joined the militia. + <<else>> + There are not many more citizens able to join the arcology armed forces. You'll need to enact higher recruitment edicts if you need more manpower. + <</if>> + <</if>> + <<if $secBarracksUpgrades.training >= 1>> + <<if $secBarracksUpgrades.training == 1>> + <<set _sL = $slaveUnits.length>> + <<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].training < 100>> + <br>$slaveUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, slowing increasing their experience level. + <<set $slaveUnits[_i].training += random(2,4)>> + <</if>> + <</for>> + <<set _mL = $militiaUnits.length>> + <<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].training < 100>> + <br>$militiaUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, slowing increasing their experience level. + <<set $militiaUnits[_i].training += random(2,4)>> + <</if>> + <</for>> + <<set _meL = $mercUnits.length>> + <<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].training < 100>> + <br>$mercUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, slowing increasing their experience level. + <<set $mercUnits[_i].training += random(2,4)>> + <</if>> + <</for>> + <<elseif $secBarracksUpgrades.training == 2>> + <<set _sL = $slaveUnits.length>> + <<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].training < 100>> + <br>$slaveUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, increasing their experience level. + <<set $slaveUnits[_i].training += random(3,5)>> + <</if>> + <</for>> + <<set _mL = $militiaUnits.length>> + <<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].training < 100>> + <br>$militiaUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, increasing their experience level. + <<set $militiaUnits[_i].training += random(3,5)>> + <</if>> + <</for>> + <<set _meL = $mercUnits.length>> + <<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].training < 100>> + <br>$mercUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, increasing their experience level. + <<set $mercUnits[_i].training += random(4,6)>> + <</if>> + <</for>> + <<elseif $secBarracksUpgrades.training == 3>> + <<set _sL = $slaveUnits.length>> + <<for _i = 0; _i < _sL; _i++>> + <<if $slaveUnits[_i].training < 100>> + <br>$slaveUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, quickly increasing their experience level. + <<set $slaveUnits[_i].training += random(4,6)>> + <</if>> + <</for>> + <<set _mL = $militiaUnits.length>> + <<for _i = 0; _i < _mL; _i++>> + <<if $militiaUnits[_i].training < 100>> + <br>$militiaUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, quickly increasing their experience level. + <<set $militiaUnits[_i].training += random(4,6)>> + <</if>> + <</for>> + <<set _meL = $mercUnits.length>> + <<for _i = 0; _i < _meL; _i++>> + <<if $mercUnits[_i].training < 100>> + <br>$mercUnits[_i].platoonName is able to make use of the training facilities to better prepare its soldiers, quickly increasing their experience level. + <<set $mercUnits[_i].training += random(4,6)>> + <</if>> + <</for>> + <</if>> + <</if>> +<</if>> \ No newline at end of file diff --git a/src/SecExp/seeUnit.tw b/src/SecExp/seeUnit.tw new file mode 100644 index 0000000000000000000000000000000000000000..a331b75eeb48bb0cf1605c0fe21e82fe31fd6282 --- /dev/null +++ b/src/SecExp/seeUnit.tw @@ -0,0 +1,150 @@ +:: seeUnit [nobr] + +<<if $attackThisWeek == 1>> + <<set $nextButton = "Back", $nextLink = "attackOption">> +<<else>> + <<set $nextButton = "Back", $nextLink = "secBarracks">> +<</if>> + +<<if $targetUnit == "secBots">> + <<secBotsDescription>> + <br><br> + <<if $secBots.maxTroops < 80>> + <<link "Improve the digital control matrix">>| + <<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 5000 per upgrade and each will increase the max by 10// + <<else>> + There's little left to improve in the matrix. Your control systems are at top capacity and won't be able to handle bigger drone units. + <</if>> + <br> + <<if $secBots.equip < 3>> + <<link "Improve drone weaponry and armor">>| + <<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 (($secBotsUpgradeCost * $secBots.maxTroops) + 1000)>> and will increase attack and defense value of the unit by 15% for every upgrade.// + <<else>> + Your drones are equipped with top tier weaponry and armor. + <</if>> + +<<elseif $targetUnit == "militiaUnits">> + <<militiaUnitsDescription $militiaUnits[$targetIndex]>> + <br><br> + <<if $militiaUnits[$targetIndex].maxTroops < 50>> + <<link "Intensive officers training">>| + <<set $militiaUnits[$targetIndex].maxTroops += 10>> + <<set $cash -= 5000>> + <<goto "seeUnit">> + <</link>> + Invest in the training of your officers to increase the maximum number of soldiers in the unit. + <br>//Costs 5000 per upgrade and each will increase the max by 10// + <<else>> + Your officers rached their peak. Further training will have little impact on the number of troops they can effectively lead. + <</if>> + <br> + <<if $militiaUnits[$targetIndex].equip < 3>> + <<link "Improve weaponry and equipment">>| + <<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 ($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000>> and will increase attack and defense value of the unit by 15% for every upgrade.// + <<else>> + The unit is equipped with state of the art weaponry and equipment. + <</if>> + <br> + <<if $militiaUnits[$targetIndex].medics == 0>> + <<link "Attach trained medics to the unit">>| + <<set $militiaUnits[$targetIndex].medics == 1>> + <<set $cash -= 10000>> + <<goto "seeUnit">> + <</link>> + Attach a small squad of trained medics to the unit. + <br>//Costs <<print ($equipUpgradeCost * $militiaUnits[$targetIndex].maxTroops) + 1000>> and will will decrease the number of casualties suffered during battle.// + <<else>> + The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers. + <</if>> +<<elseif $targetUnit == "slaveUnits">> + <<slaveUnitsDescription $slaveUnits[$targetIndex]>> + <br><br> + <<if $slaveUnits[$targetIndex].maxTroops < 50>> + <<link "Intensive officers training">>| + <<set $slaveUnits[$targetIndex].maxTroops += 10>> + <<set $cash -= 5000>> + <<goto "seeUnit">> + <</link>> + Invest in the training of your officers to increase the maximum number of soldiers in the unit. + <br>//Costs 5000 per upgrade and each will increase the max by 10// + <<else>> + Your officers rached their peak. Further training will have little impact on the number of troops they can effectively lead. + <</if>> + <br> + <<if $slaveUnits[$targetIndex].equip < 3>> + <<link "Improve weaponry and equipment">>| + <<set $slaveUnits[$targetIndex].equip += 1>> + <<set $cash -= ($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 1000>> + <<goto "seeUnit">> + <</link>> + Invest in better equipment for your soldiers to increase their battle effectiveness. + <br>//Costs <<print ($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 1000>> and will increase attack and defense value of the unit by 15% for every upgrade.// + <<else>> + The unit is equipped with state of the art weaponry and equipment. + <</if>> + <br> + <<if $slaveUnits[$targetIndex].medics == 0>>| + <<link "Attach trained medics to the unit">> + <<set $slaveUnits[$targetIndex].medics == 1>> + <<set $cash -= 10000>> + <<goto "seeUnit">> + <</link>> + Attach a small squad of trained medics to the unit. + <br>//Costs <<print ($equipUpgradeCost * $slaveUnits[$targetIndex].maxTroops) + 1000>> and will decrease the number of casualties suffered during battle.// + <<else>> + The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers. + <</if>> +<<elseif $targetUnit == "mercUnits">> + <<mercUnitsDescription $mercUnits[$targetIndex]>> + <br><br> + <<if $mercUnits[$targetIndex].maxTroops < 50>> + <<link "Intensive officers training">>| + <<set $mercUnits[$targetIndex].maxTroops += 10>> + <<set $cash -= 5000>> + <<goto "seeUnit">> + <</link>> + Invest in the training of your officers to increase the maximum number of soldiers in the unit. + <br>//Costs 5000 per upgrade and each will increase the max by 10// + <<else>> + Your officers rached their peak. Further training will have little impact on the number of troops they can effectively lead. + <</if>> + <br> + <<if $mercUnits[$targetIndex].equip < 3>>| + <<link "Improve weaponry and equipment">> + <<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 ($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 1000>> and will increase attack and defense value of the unit by 15% for every upgrade.// + <<else>> + The unit is equipped with state of the art weaponry and equipment. + <</if>> + <br> + <<if $mercUnits[$targetIndex].medics == 0>> + <<link "Attach trained medics to the unit">>| + <<set $mercUnits[$targetIndex].medics == 1>> + <<set $cash -= 10000>> + <<goto "seeUnit">> + <</link>> + Attach a small squad of trained medics to the unit. + <br>//Costs <<print ($equipUpgradeCost * $mercUnits[$targetIndex].maxTroops) + 1000>> and will decrease the number of casualties suffered during battle.// + <<else>> + The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers. + <</if>> +<</if>> \ No newline at end of file diff --git a/src/SecExp/transportHub.tw b/src/SecExp/transportHub.tw new file mode 100644 index 0000000000000000000000000000000000000000..316f56cb2d9b1515c7c5fc86241cb206e6c39c53 --- /dev/null +++ b/src/SecExp/transportHub.tw @@ -0,0 +1 @@ +:: transportHub [nobr] \ No newline at end of file diff --git a/src/SecExp/weaponsManufactoring.tw b/src/SecExp/weaponsManufactoring.tw new file mode 100644 index 0000000000000000000000000000000000000000..ff62090a573810c6ed1fc8f383779014681c5131 --- /dev/null +++ b/src/SecExp/weaponsManufactoring.tw @@ -0,0 +1 @@ +:: weaponsManufactoring [nobr] \ No newline at end of file diff --git a/src/SecExp/widgets/unitsDescriptionWidgets.tw b/src/SecExp/widgets/unitsDescriptionWidgets.tw new file mode 100644 index 0000000000000000000000000000000000000000..1c9eef79c2792a5dc908ab7b15bfcd381e27878b --- /dev/null +++ b/src/SecExp/widgets/unitsDescriptionWidgets.tw @@ -0,0 +1,106 @@ +:: unitsDescriptionWidgets [widget nobr] + +<<widget "militiaUnitsDescription">> + <<if $args[0].active == 1>> + <strong>$args[0].platoonName</strong> <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>> + Its $args[0].troops men and women are all proud citizens of your arcology, willing to put their lives on the line to protect their home. + <<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>> + <<if $args[0].equip == 0>> + They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more. + <<elseif $args[0].equip == 1>> + They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor. + <<elseif $args[0].equip == 2>> + They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like might visions and portable radars. + <<else>> + They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment. + <</if>> + <<if $args[0].training <= 33>> + They lack the experience to be considered consumed professionals, but their eagerness to defend the arcology makes up for it. + <<elseif $args[0].training <= 66>> + They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield. + <<else>> + They are consumed veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything. + <</if>> + <<if $args[0].medics == 1>> + The unit has a dedicated squad of medics that will follow them in battle. + <</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 "slaveUnitsDescription">> + <<if $args[0].active == 1>> + <strong>$args[0].platoonName</strong> <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>> + Its $args[0].troops men and women are slaves in your possession, tasked with the protection of their owner and their arcology. + <<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>> + <<if $args[0].equip == 0>> + They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more. + <<elseif $args[0].equip == 1>> + They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor. + <<elseif $args[0].equip == 2>> + They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like might visions and portable radars. + <<else>> + They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment. + <</if>> + <<if $args[0].training <= 33>> + They lack the experience to be considered professionals, but their eagerness to prove themselves makes up for it. + <<elseif $args[0].training <= 66>> + They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield. + <<else>> + They are consumed veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything. + <</if>> + <<if $args[0].medics == 1>> + The unit has a dedicated squad of medics that will follow them in battle. + <</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 "mercUnitsDescription">> + <<if $args[0].active == 1>> + <strong>$args[0].platoonName</strong> <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>> + Its $args[0].troops men and women are mercenaries contracted to defend the arcology against external threats. + <<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>> + <<if $args[0].equip == 0>> + They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more. + <<elseif $args[0].equip == 1>> + They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor. + <<elseif $args[0].equip == 2>> + They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like might visions and portable radars. + <<else>> + They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment. + <</if>> + <<if $args[0].training <= 33>> + They lack the experience to be considered professionals, but they're trained more than enough to still be an effective unit. + <<elseif $args[0].training <= 66>> + They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield. + <<else>> + They are consumed veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything. + <</if>> + <<if $args[0].medics == 1>> + The unit has a dedicated squad of medics that will follow them in battle. + <</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 security drones</strong> assemble in an ordered line in front of you, ready to receive their orders. + <<if $secBots.troops < $secBots.maxTroops>> The unit is not at its full strength of $secBots.maxTroops drones.<</if>> + <<if $secBots.equip == 0>> + They are equipped with light weaponry, mainly anti-riot non lethal weapons. Not particularly effective in battle. + <<elseif $secBots.equip == 1>> + They are equipped with light firearms, not an overwhelming amount of firepower, but with their mobility good enough to be effective. + <<elseif $secBots.equip == 2>> + They are equipped with powerful, modern firearms and simple armor mounted around their frames. They do not make for a pretty sight, but on the battlefield they are a dangerous weapon. + <<else>> + They are equipped with high energy railguns and adaptive armor. They are a formidable force on the battlefield, even for experienced soldiers. + <</if>> + <<else>> + There are too few security drones left to be able to deploy them on the battlefield. + <</if>> +<</widget>> \ No newline at end of file diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index c3cbeeabfb1328f3de02496c1cee012294848742..ef28c5b69f7bba10af836fe9de945907b0f585af 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -867,6 +867,19 @@ Image display <br> // This mod alters how prosthetics system works and adds some content.// +<br><br> + +<<if $secExp == 1>> + The Security Expansion Mod is ''enabled.'' +[[Disable|Intro Summary][$secExp = 0]] +<<else>> + The Security Expansion Mod is ''disabled.'' +[[Enable|Intro Summary][$secExp = 1]] +<</if>> +<br> +// This mod introduces security and crime in the arcology, as well as attacks and battles.// + + <br><br> <<link "Continue">> <<if $freshPC == 1 || $saveImported == 0>> diff --git a/src/events/intro/pcExperienceIntro.tw b/src/events/intro/pcExperienceIntro.tw index cbad7a3f91369af775fe172cf3d86e0f4ad6739f..33e2006fef9dfc5dd4b2cf57a4616c96b299001a 100644 --- a/src/events/intro/pcExperienceIntro.tw +++ b/src/events/intro/pcExperienceIntro.tw @@ -8,13 +8,13 @@ You're a relative unknown in the Free Cities, but it's clear you're already acco <br> <br>[[Idle wealth|PC Rumor Intro][$PC.career = "wealth"]] -<br> //Start with extra money. Your starting slaves will have two free levels of sex skills available.// +<br> //Start with extra money<<if $showSecExp == 1>>, but you will find harder to maintain authority<</if>>. Your starting slaves will have two free levels of sex skills available.// <br>[[Venture capitalism|PC Rumor Intro][$PC.career = "capitalist"]] <br> //You will be more effective at business pursuits. Your starting slaves will have a free level of prostitution skill available.// <br>[[Private military work|PC Rumor Intro][$PC.career = "mercenary"]] -<br> //You retain mercenary contacts and security skills. Your starting slaves will have free trust available.// +<br> //You retain mercenary contacts<<if $showSecExp == 1>> and your security skills will make it easier to keep the arcology safe<<else>> and security skills<</if>>. Your starting slaves will have free trust available.// <br>[[Slaving|PC Rumor Intro][$PC.career = "slaver"]] -<br> //Your slave breaking experience will be useful. Your starting slaves will have free devotion available.// +<br> //Your slave breaking experience will be useful<<if $showSecExp == 1>> and authority will be easier to maintain<</if>>. Your starting slaves will have free devotion available.// <br>[[Arcology engineering|PC Rumor Intro][$PC.career = "engineer"]] <br> //Upgrading the arcology will be cheaper. Also, the arcology will start with basic economic upgrades already installed.// <br>[[Slave surgery|PC Rumor Intro][$PC.career = "medicine"]] @@ -22,10 +22,24 @@ You're a relative unknown in the Free Cities, but it's clear you're already acco <br>[[Minor celebrity|PC Rumor Intro][$PC.career = "celebrity"]] <br> //Start with extra reputation. Your starting slaves will have a free level of entertainment skill available.// <br>[[High class escort|PC Rumor Intro][$PC.career = "escort"]] -<br> //As an ex-whore, you will find it hard to maintain reputation. Your starting slaves will have a free level of sex skills available, along with a free level of entertainment and prostitution.// +<br> //As an ex-whore, you will find it hard to maintain reputation<<if $showSecExp == 1>> and authority<</if>>. Your starting slaves will have a free level of sex skills available, along with a free level of entertainment and prostitution.// <br>[[Servant|PC Rumor Intro][$PC.career = "servant"]] -<br> //As an ex-servant, you will find it hard to maintain reputation. You know how to lower your upkeep, but not conduct business. Your starting slaves will have free trust and devotion.// +<br> //As an ex-servant, you will find it hard to maintain reputation<<if $showSecExp == 1>> and authority<</if>>. You know how to lower your upkeep, but not conduct business. Your starting slaves will have free trust and devotion.// <br>[[Gang Leader|PC Rumor Intro][$PC.career = "gang"]] -<br> //As a gang leader, you know how to haggle slaves, but you will find reputation quite hard to maintain. Your starting slaves will be fitter and posses a free level of combat skill.// +<br> //As a gang leader, you know how to haggle slaves<<if $showSecExp == 1>> and assert your authority<</if>>, but you will find reputation quite hard to maintain. Your starting slaves will be fitter and posses a free level of combat skill.// <</if>> + +<br><br> + +<<if $showSecExp == 0>> + <<link "Show Security Expansion changes">> + <<set $showSecExp = 1>> + <<goto "PC Experience Intro">> + <</link>> +<<else>> + <<link "Hide Security Expansion changes">> + <<set $showSecExp = 0>> + <<goto "PC Experience Intro">> + <</link>> +<</if>> \ No newline at end of file diff --git a/src/events/intro/terrainIntro.tw b/src/events/intro/terrainIntro.tw index ec172d767576c29b833f27e8d95a169b57c6b84f..932217461ab5f3cf53ba1c1e05cfd649798a05fe 100644 --- a/src/events/intro/terrainIntro.tw +++ b/src/events/intro/terrainIntro.tw @@ -60,5 +60,22 @@ Finally, a few Free Cities have been carved out from old world cities. Urban dec <br> @@.red;Very low@@ access to refugees and other desperate people. <br> @@.green;Very high@@ cultural independence. <br> Ensures access to slaves from all over the world and will not associate the arcology with a continent. +<<if $showSecExp == 1>> +<br>Oceanic arcologies will not be subjects of attacks. +<</if>> <</if>> + +<br><br> + +<<if $showSecExp == 0>> + <<link "Show Security Expansion changes">> + <<set $showSecExp = 1>> + <<goto "Terrain Intro">> + <</link>> +<<else>> + <<link "Hide Security Expansion changes">> + <<set $showSecExp = 0>> + <<goto "Terrain Intro">> + <</link>> +<</if>> \ No newline at end of file diff --git a/src/gui/mainMenu/AlphaDisclaimer.tw b/src/gui/mainMenu/AlphaDisclaimer.tw index 42df6073ea9d380b99241aca1c7a28205ad085ad..fce0ace87ce8e3ac6214343d795f218383c7aea4 100644 --- a/src/gui/mainMenu/AlphaDisclaimer.tw +++ b/src/gui/mainMenu/AlphaDisclaimer.tw @@ -4,6 +4,7 @@ //version $ver build $releaseID// @@.green;//Mod: expanded age ranges and other tweaks 2016-08-30//@@ @@.darkred;+SV@@ @@.green;//Mod: extra preg content and other crap//@@ +@@.green;//Mod: Security Expansion//@@ ''This is an alpha.'' That means the game is missing content, is full of bugs, is imbalanced, and is generally in an incomplete state. The game will keep a start of turn autosave. If you encounter a bug, I strongly recommend you reload your start of turn autosave immediately. Bugs will occasionally cause a bugged slave named $activeSlave.slaveName (or similar) to appear. If this happens, use the "Discard her" option on the slave menu to get rid of her. Then, please report the circumstances (especially what random event you just saw) to the dev. Please submit your feedback and bug reports at https://www.reddit.com/r/freecitiesgame/ or at https://freecitiesblog.blogspot.com/. diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index bb9af175f1342ea85e4cda834269fd424ba22335..55b14648de194499fe859cbd310d4edb2425bd2f 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -1071,6 +1071,8 @@ FertilityAge($fertilityAge) <<set $pubertyLength = 5>> <<set $maxGrowthAge = 24>> + + /% Begin mod section: toggle whether slaves lisp. %/ <<set $disableLisping = 0>> /% End mod section: toggle whether slaves lisp. %/ @@ -1218,4 +1220,9 @@ ocularImplant: 0, erectileImplant: 0 } >> +/* Security Expansion */ +<<set $secExp = 0>> +<<set $showSecExp = 0>> +<<include "secInit">> + <<goto "Alpha disclaimer">> diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw index b2049889d2ea7679947c2332325b8a4bd2870278..05c28390404e528b50933e4f70a04d4e4e2d330b 100644 --- a/src/js/economyJS.tw +++ b/src/js/economyJS.tw @@ -19,6 +19,9 @@ window.getCost = function(array) { var dairy = State.variables.dairy; var servantsQuarters = State.variables.servantsQuarters; var incubator = State.variables.incubator; + var propHQ = State.variables.propHub; + var secHQ = State.variables.secHQ; + var secBarracks = State.variables.secBarracks; var mercCosts = State.variables.mercenaries * 2000; var policyCost = State.variables.policyCost; var costs = (State.variables.brothel * facilityCost) @@ -61,6 +64,32 @@ window.getCost = function(array) { costs += 1000; } + //security expansion + if(propHQ > 0) { + costs += State.variables.propHubUpkeep; + } + if(secHQ > 0) { + costs += State.variables.secHQUpkeep + 20 * state.variables.secHelots; + } + if(secBarracks > 0) { + costs += State.variables.secBarracksUpkeep; + } + for (var i = 0; i < State.variables.militiaUnits.length; i++) { + if( !(State.variables.militiaUnits[i] === null) ){ + costs += State.variables.militiaUnits[i].troops * State.variables.soldierUpkeep; + } + } + for (var i = 0; i < State.variables.slaveUnits.length; i++) { + if( !( State.variables.slaveUnits[i] === null) ){ + costs += State.variables.slaveUnits[i].troops * State.variables.soldierUpkeep * 0.5; + } + } + for (var i = 0; i < State.variables.mercUnits.length; i++) { + if( !(State.variables.mercUnits[i] === null) ){ + costs += State.variables.mercUnits[i].troops * State.variables.soldierUpkeep * 1.5; + } + } + //general arcology costs costs += (State.variables.girls * (250 + (economy * 500))); diff --git a/src/js/utilJS.tw b/src/js/utilJS.tw index 24fb8d8d1a9c95b6f9b4631479828198148e9df1..9a3a10284825f73b9344d1dc524172e0505c9d30 100644 --- a/src/js/utilJS.tw +++ b/src/js/utilJS.tw @@ -95,8 +95,25 @@ window.Height = (function(){ "Bosnian": 171.1, "Kosovan": undefined, "Macedonian": undefined, "Honduran": 152.0, "Maltese": 159.9, "Nauruan": undefined, "Micronesian": undefined, "Costa Rican": undefined, "Salvadoran": 160.3, "Nicaraguan": 153.7, "Panamanian": 152.0, "Nigerien": 157.8, "Andorran": undefined, "Bulgarian": 163.2, "Luxembourgian": 164.8, - "Moldovan": 161.2, + "Moldovan": 161.2, "Antiguan": 156.8, "Aruban": 158, "Azerbaijani": 162.4, "Bahamian": 157.1, "Bahraini": 165.2, + "Barbadian": 158.5, "Bhutanese": 153.4, "Burundian": 157, "a Cook Islander": 162.3, "Cypriot": 163.4, + "Dominiquais": 157.2, "East Timorese": 149.1, "Ecuadorian": 153.4, "Fijian": 161.8, "French Guianan": 157, + "Georgian": 160.5, "Guyanese": 157.9, "Kuwaiti": 156.1, "Kyrgyz": 158.6, "Latvian": 165.7, "a Liechtensteiner": 164.3, + "Niuean": 160.4, "Palauan": 161.4, "Palestinian": 158.2, "Papua New Guinean": 150.7, "Paraguayan": 158.3, "Qatari": 155, + "Kittitian": 156.9, "Saint Lucian": 157.1, "Vincentian": 156.2, "Samoan": 161, "Seychellois": 155.8, + "Slovene": 167.4, "a Solomon Islander": 151.8, "Sri Lankan": 151.4, "Surinamese": 155.7, "Tajik": 161.2, "Tongan": 159.5, + "Trinidadian": 157.4, "Turkmen": 158.2, "Ni-Vanuatu": 149.8, "Vatican": 162.5, "": 162.5 // default + + /* undefined version + "Antiguan": undefined, "Aruban": undefined, "Azerbaijani": 162.4, "Bahamian":undefined, "Bahraini": 154.2, + "Barbadian": undefined, "Bhutanese": undefined, "Burundian": undefined, "a Cook Islander": undefined, "Cypriot": undefined, + "Dominiquais": undefined, "East Timorese": undefined, "Ecuadorian": undefined, "Fijian": 161.8, "French Guianan": undefined, + "Georgian": undefined, "Guyanese": undefined, "Kuwaiti": undefined, "Kyrgyz": undefined, "Latvian": 165.7, "a Liechtensteiner": undefined, + "Niuean": undefined, "Palauan": undefined, "Palestinian": undefined, "Papua New Guinean": undefined, "Paraguayan": undefined, "Qatari": undefined, + "Kittitian": undefined, "Saint Lucian": undefined, "Vincentian": undefined, "Samoan": undefined, "Seychellois": undefined, + "Slovene": 167.4, "a Solomon Islander": undefined, "Sri Lankan": 151.4, "Surinamese": undefined, "Tajik": undefined, "Tongan": undefined, + "Trinidadian": undefined, "Turkmen": undefined, "Ni-Vanuatu": undefined, "Vatican": undefined, */ }; const xyMeanHeight = { "American.white": 178.2, "American.black": 177.4, "American.latina": 172.5, "American.asian": 172.5, "American": 176.4, @@ -123,8 +140,25 @@ window.Height = (function(){ "Malagasy": 161.5, "Maldivian": undefined, "Bosnian": 183.9, "Kosovan": undefined, "Macedonian": undefined, "Honduran": undefined, "Maltese": 169.9, "Nauruan": undefined, "Micronesian": undefined, "Costa Rican": undefined, "Salvadoran": undefined, "Nicaraguan": undefined, "Panamanian": 165.0, "Nigerien": 163.8, "Luxembourgian": 179.9, - "Moldovan": undefined, ".white": 177.6, + "Moldovan": undefined, ".white": 177.6, "Antiguan": 164.8, "Aruban": 165.1, "Azerbaijani": 171.8, "Bahamian": 167.2, "Bahraini": 165.1, + "Barbadian": 169.3, "Bhutanese": 167.2, "Burundian": 164.1, "a Cook Islander": 173.4, "Cypriot": 177.2, + "Dominiquais": 168.1, "East Timorese": 161.2, "Ecuadorian": 167.5, "Fijian": 170.4, "French Guianan": 168, + "Georgian": 172.7, "Guyanese": 168.6, "Kuwaiti": 169.2, "Kyrgyz": 170.4, "Latvian": 174.2, "a Liechtensteiner": 175.4, + "Niuean": 169.7, "Palauan": 174.6, "Palestinian": 169.7, "Papua New Guinean": 163.5, "Paraguayan": 168.8, "Qatari": 166.2, + "Kittitian": 164.4, "Saint Lucian": 168.3, "Vincentian": 165.4, "Samoan": 173, "Seychellois": 168.5, + "Slovene": 180.3, "a Solomon Islander": 163.1, "Sri Lankan": 163.6, "Surinamese": 165.2, "Tajik": 175.2, "Tongan": 168.2, + "Trinidadian": 170.8, "Turkmen": 171.4, "Ni-Vanuatu": 160.5, "Vatican": 176.5, "": 172.5 // defaults + + /* undefined version + "Antiguan": undefined, "Aruban": undefined, "Azerbaijani": 171.8, "Bahamian":undefined, "Bahraini": 165.1, + "Barbadian": undefined, "Bhutanese": undefined, "Burundian": undefined, "a Cook Islander": undefined, "Cypriot": undefined, + "Dominiquais": undefined, "East Timorese": undefined, "Ecuadorian": undefined, "Fijian": 170.4, "French Guianan": undefined, + "Georgian": undefined, "Guyanese": undefined, "Kuwaiti": undefined, "Kyrgyz": undefined, "Latvian": 174.2, "a Liechtensteiner": undefined, + "Niuean": undefined, "Palauan": undefined, "Palestinian": undefined, "Papua New Guinean": undefined, "Paraguayan": undefined, "Qatari": undefined, + "Kittitian": undefined, "Saint Lucian": undefined, "Vincentian": undefined, "Samoan": undefined, "Seychellois": undefined, + "Slovene": 180.3, "a Solomon Islander": undefined, "Sri Lankan": 163.6, "Surinamese": undefined, "Tajik": undefined, "Tongan": undefined, + "Trinidadian": undefined, "Turkmen": undefined, "Ni-Vanuatu": undefined, "Vatican": undefined, */ }; // Helper method - table lookup for nationality/race combinations diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 20360c197bd29182d7751e3bc7e07553bd7c9bc1..1ecb2dbd0256c65bb7be78d0a7a5319e9e1915a8 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -610,6 +610,11 @@ <<set $securityForceColonelSexed = 0>> <</if>> +/* Sec Exp */ +<<if $secExp == 1>> +<<include "SecExpBackwardCompatibility">> +<</if>> + <<if ndef $arcologies[0].FSAztecRevivalist>> <<for _bci = 0; _bci < $arcologies.length; _bci++>> <<set $arcologies[_bci].FSAztecRevivalist = "unset", $arcologies[_bci].FSAztecRevivalistDecoration = 0>> diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index 4c3c787482e86062e86b3c1ca9a55b9738da484f..528251733919eaa356a46877e31fad3b70a48338 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -44,6 +44,12 @@ You @@.green;make friends@@ by tacitly supporting enslavement of upstart citizens. <<set _flux += 10, $rep += 100>> <</if>> +<<if $enslavementRights == 1>> + As the only legal entity in the arcology able to declare the status of a person as enslaved, you are able to @@.yellowgreen;collect fees@@ over enslavement of your citizens. Many, however, cosndier this move an intromission in private affairs, @@.red;damaging your authority.@@ + <<set $authority -= 100>> + <<set $cash += _flux * 100>> +<</if>> +<<set $oldFlux = _flux>> <<set $ACitizens -= _flux, $ASlaves += _flux>> This week, <<if _flux > 0>>few to none<<else>>many<</if>> of $arcologies[0].name's citizens fell into slavery. @@ -62,31 +68,63 @@ This week, <<if _flux > 0>>few to none<<else>>many<</if>> of $arcologies[0].name <</if>> <</if>> +<<set $oldACitizens = $ACitizens>> + <<set _immigrants = 0>> <<if $ACitizens >= $ACitizenLimit>> <<set $ACitizens = $ACitizenLimit>> Your arcology is currently home to as many citizens as it can house; unless the living areas are reconfigured, the citizen population will not increase. <<else>> - <<set $ACitizens += random(-10,10)>> + <<set _immigrants += random(-10,10)>> + <<if $crime > 80>> + Crime is a widespread phenomenon in your arcology, many potential immigrants are scared away. + <<set _immigrants -= random(5,10)>> + <<elseif $crime < 20>> + Crime is a distant issue within the walls of your arcology, many immigrants are attracted to such safe shores. + <<set _immigrants += random(5,10)>> + <</if>> <<if $ProImmigrationRep == 1>> Your welcome program for new citizens helps encourage wealthy people from the old world to immigrate, but @@.red;annoys some longstanding citizens.@@ - <<set $ACitizens += random(10,20), $rep -= 100>> + <<set _immigrants += random(10,20), $rep -= 100>> <</if>> <<if $ProImmigrationCash == 1>> The rent promotion for new immigrants brings new citizens to the arcology. - <<set $ACitizens += random(10,20)>> + <<set _immigrants += random(10,20)>> <</if>> <<if $arcologies[0].FSRepopulationFocusLaw == 1>> The rent promotion for pregnant women attracts several gravid ladies and a few girls eager to become mothers to enroll as citizens in your arcology. - <<set $ACitizens += random(5,10)>> + <<set _immigrants += random(5,10)>> <</if>> <<if $ACitizens < $ACitizenLimit*0.6>> The availability of a large number of apartments encourages many new citizens to immigrate. - <<set $ACitizens += random(10,20)>> + <<set _immigrants += random(10,20)>> + <</if>> + <<if $limitSubhumans == 1>> + Subhumans are stopped and turned away as soon as they dare petition for citizenship in your arcology, slightly lowering immigrants numbers. + <<set _immigrants -= random(5,10)>> + <</if>> + <<if $openBorders == 1>> + The very liberal attituted towards immigration calls many hopeful immigrants to your arcology. + <<set _immigrants += random(10,20)>> <</if>> - <<if $ACitizens <= 100>> + <<if $propCampaign >= 1 && $propFocus == "immigration">> + Your advertisement campaign outside the free city brings more people to the gates of your arcology. + <<if $propCampaignBoost == 0>> + <<set _immigrants += random(1,2) * $propCampaign>> + <<else>> + <<set _immigrants += random(1,4) * $propCampaign>> + <</if>> + <</if>> + <<if $limitImmigration == 1>> + The strict limits on immigration keep the number of people coming in the arcology limited. + <<if _immigrants > 40>> + <<set _immigrants = 40>> + <</if>> + <</if>> +<</if>> +<<set $ACitizens += _immigrants>> +<<if $ACitizens <= 100>> Your arcology is home to an extremely small number of very wealthy citizens; wealth is as concentrated as possible and the citizen population will not decrease further. <<set $ACitizens = 100>> - <</if>> <</if>> <<if $ASlaves >= $ASlaveLimit>> @@ -113,6 +151,10 @@ This week, <<if _flux > 0>>few to none<<else>>many<</if>> of $arcologies[0].name $arcologies[0].name is quite prosperous, and they can afford to buy many pretty slaves. <</if>> <</if>> + <<if $liveTargets == 1>> + Disobedient slaves are used as live targets in the shooting ranges of the arcology<<if $secBarracks != 0>> and the barracks.<<else>>.<</if>> + <<set $ASlaves -= random(20,40)>> + <</if>> <<if $ASlaves <= 1000>><<set $ASlaves = 1000>><</if>> <</if>> @@ -196,6 +238,15 @@ $ACitizens citizens and <<print $ASlaves+$helots+$slaves.length>> slaves now liv <<set $rentalMultiplier -= 0.1>> Food vendors are offered subsidized rent and operating expenses to set up shop in your arcology. <</if>> +<<if $alternativeRents == 1>> + Your citizens are allowed to pay their rents in slaves rather than cash and a few financially challenged individuals make use of this. + <<set $rentalMultiplier -= 0.1>> + <<set $helots += random(0,5)>> +<</if>> +<<if $discountMercenaries == 1>> + Mercenaries willing to come to your arcology are given a discount on rent. + <<set $rentalMultiplier -= 0.1>> +<</if>> <<if $arcologies[0].FSArabianRevivalistLaw == 1>> <<set $rentalMultiplier += 0.1>> Those of your citizens who have not yet subscribed to the society you are building are permitted to live and do business here, but must pay a moderate jizya tax for the privilege as part of their rent. @@ -268,7 +319,16 @@ earning you @@.yellowgreen;¤_earnings.@@ <</if>> <</for>> <<if _refugees > 0>> - Some desperate people filtered into the arcology during the week: as owner, you were able to enslave _refugees of them. + Some desperate people filtered into the arcology during the week + <<if $propCampaign >= 1 && $propFocus == "enslavement">> + , many attracted by your advertisement campaigns + <<if $propCampaignBoost == 0>> + <<set _refugees += random(0,2)>> + <<else>> + <<set _refugees += random(0,4)>> + <</if>> + <</if>>. + As owner, you were able to enslave _refugees of them. <<set $helots += _refugees>> <</if>> @@ -446,6 +506,23 @@ earning you @@.yellowgreen;¤_earnings.@@ Growth was subsidized as planned. <<set _AWeekGrowth++>> <</if>> + <<if $secExp == 1>> + <<if $authority > 18000>> + Your authority is so high it discourages new business, slowing down the economic growth of the arcology. + <<set _AWeekGrowth-->> + <</if>> + <<if $security > 80>> + Your arcology is extremely safe and stable. Many businesses are attracted to it because of this. + <<set _AWeekGrowth++>> + <<elseif $security < 20>> + Your arcology low security is an instability factor simply too dangerous to be ignored. Many businesses avoid your arcology because of this. + <<set _AWeekGrowth-->> + <</if>> + <</if>> + <<if $controlLeaks == 1>> + The authenticity department prepares extremely accurate, but false financial reports, misleading many of your competitors, allowing your arcology more space to grow undisturbed. + <<set _AWeekGrowth++>> + <</if>> <<set _AWeekGrowth = Math.trunc(0.5*_AWeekGrowth)>> <<if _AWeekGrowth > 0>> Since $arcologies[0].name can support more citizens and more activity, @@.green;its prosperity improved this week.@@ diff --git a/src/uncategorized/barracks.tw b/src/uncategorized/barracks.tw index 2262b56d5706f025fef6be7cb6edb33d3c990e06..8e5d39529612dc60b835223ca3cafccb359fa98c 100644 --- a/src/uncategorized/barracks.tw +++ b/src/uncategorized/barracks.tw @@ -2,13 +2,13 @@ <<set $nextButton = "Back", $nextLink = "Main">> -The mercenaries you retain to protect $arcologies[0].name are housed in this sector of the arcology, which is fitted out as a modern barracks. It's much less expensive to house them here than to let them live at free quarters in the living areas of the arcology. They live somewhat apart from the society they protect, down here, but +The mercenaries you retain to protect $arcologies[0].name are housed in this sector of the arcology, which is fitted out as a modern military facility. It's much less expensive to house them here than to let them live at free quarters in the living areas of the arcology. They live somewhat apart from the society they protect, down here, but <<if $personalArms > 0 && $invasionVictory > 0>> you're always welcome here. You're their employer, but what's more important to them is that you also fought alongside them in victorious battle. <<else>> they don't resent an unannounced visit from their employer. <</if>> -As you enter the main bay of the barracks, lined with modern arms and armor and a few muscular, scarred men and women looking after their gear or suiting up to stand post, you're greeted respectfully, with<<if $personalArms > 0 && $invasionVictory > 0>> jaunty salutes and<</if>> formal <<if $PC.title == 1>>"Sir"s.<<else>>"Ma'am"s<</if>><<if $personalArms > 0 && $invasionVictory > 0>>, but also with smiles and nods<</if>>. +As you enter the main bay of the armoury, lined with modern arms and armor and a few muscular, scarred men and women looking after their gear or suiting up to stand post, you're greeted respectfully, with<<if $personalArms > 0 && $invasionVictory > 0>> jaunty salutes and<</if>> formal <<if $PC.title == 1>>"Sir"s.<<else>>"Ma'am"s<</if>><<if $personalArms > 0 && $invasionVictory > 0>>, but also with smiles and nods<</if>>. <<if $mercenaries >= 3>> Though few of the mercenaries are visible, <<if $mercenaries >= 5>> @@ -139,7 +139,7 @@ You head up a deck, to the staff area, and up one more, to look into the living <br><br> -<<link "Decommission the barracks and return this sector to manufacturing">> +<<link "Decommission the armoury and return this sector to manufacturing">> <<set $barracks = 0>> <<for _i = 0; _i < $sectors.length; _i++>> <<if $sectors[_i].type == "Barracks">><<set $sectors[_i].type = "Manufacturing">><<break>><</if>> diff --git a/src/uncategorized/buildingWidgets.tw b/src/uncategorized/buildingWidgets.tw index 75c11cadd022a84c32f6ba2ed0451735c60774ee..64f3ade07fe5b541debdc30c9012bb9380722a2e 100644 --- a/src/uncategorized/buildingWidgets.tw +++ b/src/uncategorized/buildingWidgets.tw @@ -76,7 +76,7 @@ if(!Macro.has('sectorblock')) { Arcade: { extra: ' ($arcadeSlaves/<<print $arcade>>)'}, Dairy: { extra: '<<set _SCapT9 = $bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren>> ($dairySlaves<<if _SCapT9>>+_SCapT9<</if>>/<<print $dairy>><<if $Milkmaid>>,L<</if>>)' }, Sweatshops: { base: 'Manufacturing' }, - Barracks: { base: 'Barracks' }, + Barracks: { base: 'Barracks', name: 'Armoury' }, /* speciality shop types */ 'Subjugationist': { base: 'Shops', name: 'Subjugationist Shops', cls: 'FSShops' }, 'Supremacist': { base: 'Shops', name: 'Supremacist Shops', cls: 'FSShops' }, diff --git a/src/uncategorized/costs.tw b/src/uncategorized/costs.tw index 129146db73d129a981defee0344e1f15c6ed95e9..64c60fec69cd064c77378f1c589a098056105c00 100644 --- a/src/uncategorized/costs.tw +++ b/src/uncategorized/costs.tw @@ -32,6 +32,30 @@ <<set $costs -= 500>> <</if>> +/* security expansion */ +<<if $propHub != 0>> + <<set $costs += $propHubUpkeep>> +<</if>> +<<if $secHQ != 0>> + <<set $costs += ($secHQUpkeep)+(20*$secHelots)>> +<</if>> +<<if $secBarracks != 0>> + <<set $costs += $secBarracksUpkeep>> +<</if>> + +<<set _mL = $militiaUnits.length>> +<<for _i = 0; _i < _mL; _i++>> + <<set $costs += $militiaUnits[_i].troops*$soldierUpkeep>> +<</for>> +<<set _sL = $slaveUnits.length>> +<<for _i = 0; _i < _sL; _i++>> + <<set $costs += $militiaUnits[_i].troops*$soldierUpkeep*0.5>> +<</for>> +<<set _meL = $mercUnits.length>> +<<for _i = 0; _i < _meL; _i++>> + <<set $costs += $militiaUnits[_i].troops*$soldierUpkeep*1.5>> +<</for>> + <<set $costs += $citizenOrphanageTotal*100>> <<set $costs += $privateOrphanageTotal*500>> <<if $breederOrphanageTotal > 0>> diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw index 6b931f3aa5475b2b09088beaafefcdb0ad745226..aba839b9c692937101beb64f16274957f7751b9d 100644 --- a/src/uncategorized/costsReport.tw +++ b/src/uncategorized/costsReport.tw @@ -94,6 +94,31 @@ <<if $researchLab.menials != 0>> __Menial slaves__: ¤<<print (100*$researchLab.menials)>><</if>> <</if>> <</if>> + +/* security expansion */ +<<if $propHub != 0>> + <br>__Propaganda Hub__ maintenance: ¤<<print $propHubUpkeep>> +<</if>> +<<if $secHQ != 0>> + <br>__Security Headquarters__ maintenance: ¤<<print ($secHQUpkeep)+(20*$secHelots)>> +<</if>> +<<if $secBarracks != 0>> + <br>__Barracks__ maintenance: ¤<<print $secBarracksUpkeep>> +<</if>> + +<<set _mL = $militiaUnits.length>> +<<for _i = 0; _i < _mL; _i++>> + <br>__<<print $militiaUnits[_i].platoonName>>__ upkeep: ¤<<print $militiaUnits[_i].troops*$soldierUpkeep>> +<</for>> +<<set _sL = $slaveUnits.length>> +<<for _i = 0; _i < _sL; _i++>> + <br>__<<print $militiaUnits[_i].platoonName>>__ upkeep: ¤<<print $militiaUnits[_i].troops*$soldierUpkeep*0.5>> +<</for>> +<<set _meL = $mercUnits.length>> +<<for _i = 0; _i < _meL; _i++>> + <br>__<<print $militiaUnits[_i].platoonName>>__ upkeep: ¤<<print $militiaUnits[_i].troops*$soldierUpkeep*1.5>> +<</for>> + <<if $FSSpending != 0>> <br>__Society Shaping__ expenses: ¤$FSSpending <</if>> diff --git a/src/uncategorized/dispensary.tw b/src/uncategorized/dispensary.tw index 8872302d99d5373638cb388514e0f4ab25ba1ad0..83ef65a2153e96705b5105125686dd3392bac578 100644 --- a/src/uncategorized/dispensary.tw +++ b/src/uncategorized/dispensary.tw @@ -2,73 +2,96 @@ <<set $nextButton = "Back", $nextLink = "Manage Penthouse", $showEncyclopedia = 1, $encyclopedia = "The Pharmaceutical Fab.">> +<br> +The Dispensary +<hr> <<if $dispensaryUpgrade == 0>> -//The pharmaceutical fabricator is running smoothly. It can cheaply replicate complex medications, and has already cut the cost of drugs for your slaves by a fourth. It can easily produce advanced drugs should you obtain the data necessary to create them.// + //The pharmaceutical fabricator is running smoothly. It can cheaply replicate complex medications, and has already cut the cost of drugs for your slaves by a fourth. It can easily produce advanced drugs should you obtain the data necessary to create them.// + <br> <<else>> -//The pharmaceutical fabricator is running smoothly. It can cheaply and quickly replicate complex medications, and has already cut the cost of drugs for your slaves in half. It can easily produce advanced drugs should you obtain the data necessary to create them.// + //The pharmaceutical fabricator is running smoothly. It can cheaply and quickly replicate complex medications, and has already cut the cost of drugs for your slaves in half. It can easily produce advanced drugs should you obtain the data necessary to create them.// + <br> <</if>> <<if ($dispensaryUpgrade == 0)>> -<br><br> -<<if ($rep > 5000)>> - [[Upgrade the pharmaceutical fabricator|Dispensary][$cash -= Math.trunc(30000*$upgradeMultiplierArcology), $dispensaryUpgrade = 1, $drugsCost = $drugsCost/2]] - //Costs ¤<<print Math.trunc(30000*$upgradeMultiplierArcology)>>// - <br> //Will improve production efficiency further decreasing costs.// -<<else>> - //You lack the reputation to obtain cutting-edge pharmaceutical fabricator upgrades// -<</if>> + <<if ($rep > 5000)>> + [[Upgrade the pharmaceutical fabricator|Dispensary][$cash -= Math.trunc(30000*$upgradeMultiplierArcology), $dispensaryUpgrade = 1, $drugsCost = $drugsCost/2]] + //Costs ¤<<print Math.trunc(30000*$upgradeMultiplierArcology)>>// + <br> //Will improve production efficiency further decreasing costs.// + <br> + <<else>> + //You lack the reputation to obtain cutting-edge pharmaceutical fabricator upgrades// + <br> + <</if>> <</if>> -<br><br> - +<br> +The Organ Farm +<hr> <<if ($organFarmUpgrade < 3) && ($rep <= 10000*$upgradeMultiplierMedicine)>> //You lack the reputation to access experimental organ farm parts// + <br> <<elseif $dispensaryUpgrade == 0 && $organFarmUpgrade == 2>> //The fabricator must updgraded before it can be fitted with perfected organ farm parts// + <br> <<elseif $organs.length > 0>> //The organ farm can not be upgraded while it is use// + <br> <<elseif ($organFarmUpgrade == 2) && ($rep > 10000*$upgradeMultiplierMedicine)>> [[Upgrade to the organ farm to the cutting edge model|Dispensary][$cash -= 150000*$upgradeMultiplierMedicine, $organFarmUpgrade = 3]] //Costs ¤<<print 150000*$upgradeMultiplierMedicine>>// <br> //Will allow the organ farm to rapidly grow organs without risk to the implantee's health.// + <br> <<elseif ($organFarmUpgrade == 1) && ($rep > 10000*$upgradeMultiplierMedicine)>> [[Upgrade the organ farm with an experimental growth accelerator|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine, $organFarmUpgrade = 2]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>// <br> //Will allow the organ farm to quickly grow organs. Implanted organs may cause health issues.// + <br> <<elseif ($organFarmUpgrade == 0) && ($rep > 10000*$upgradeMultiplierMedicine)>> [[Upgrade the fabricator with an experimental organ farm|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine, $organFarmUpgrade = 1]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>// <br> //Will allow the fabrication of tailored organs using the autosurgery.// + <br> <</if>> -<br> <<if $organFarmUpgrade > 2>> The fabricator is capable of rapidly growing organs. + <br> <<elseif $organFarmUpgrade > 1>> The fabricator is capable of quickly growing organs, though not without side effects. + <br> <<elseif ($organFarmUpgrade > 0)>> The fabricator is capable of growing organs. + <br> <</if>> <<if $organs.length > 0>> It is currently working on the following organs: <<for $i = 0; $i < $organs.length; $i++>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$j].ID == $organs[$i].ID>> - <br> - $slaves[$j].slaveName's $organs[$i].type, - <<if $organs[$i].weeksToCompletion <= 0>> - ready for implantation. - <<else>> - <<if $organFarmUpgrade == 1>><<print $organs[$i].weeksToCompletion>><<elseif $organFarmUpgrade == 2>><<print Math.ceil($organs[$i].weeksToCompletion/2)>><<elseif $organFarmUpgrade == 3>><<print Math.ceil($organs[$i].weeksToCompletion/4)>><</if>> weeks from completion. - <</if>> - <<break>> - <</if>> - <</for>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$j].ID == $organs[$i].ID>> + <br> + $slaves[$j].slaveName's $organs[$i].type, + <<if $organs[$i].weeksToCompletion <= 0>> + ready for implantation. + <<else>> + <<if $organFarmUpgrade == 1>> + <<print $organs[$i].weeksToCompletion>> + <<elseif $organFarmUpgrade == 2>> + <<print Math.ceil($organs[$i].weeksToCompletion/2)>> + <<elseif $organFarmUpgrade == 3>> + <<print Math.ceil($organs[$i].weeksToCompletion/4)>> + <</if>> weeks from completion. + <</if>> + <<break>> + <</if>> + <</for>> <</for>> + <br> <</if>> -<br><br> - +<br> +Hormones Upgrades +<hr> The fabricator is producing <<if $injectionUpgrade == 0>> standard growth hormones. @@ -76,8 +99,10 @@ The fabricator is producing [[Purchase data on prototype growth hormone tests|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $injectionUpgrade = 1]] //Costs ¤<<print 25000*$upgradeMultiplierMedicine>>// <br> //Should improve the reliability of growth injections of all kinds.// + <br> <<else>> //You lack the reputation to obtain prototype medicines// + <br> <</if>> <<elseif $injectionUpgrade == 1>> prototype growth hormones. @@ -94,15 +119,16 @@ The fabricator is producing [[Upgrade the fabricator with prototype biomechanical microfactories|Dispensary][$cash -= 100000*$upgradeMultiplierMedicine, $injectionUpgrade = 3]] //Costs ¤<<print 100000*$upgradeMultiplierMedicine>>// <br> //Should improve the reliability of growth injections of all kinds.// + <br> <<else>> //You lack the reputation to obtain prototype biomechanical microfactories// + <br> <</if>> <<else>> the world's most effective growth hormones. + <br> <</if>> -<br><br> - The fabricator is producing <<if $hormoneUpgradeMood == 0>> standardized hormone replacement therapies. @@ -110,15 +136,16 @@ The fabricator is producing [[Upgrade for individualized therapy|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $hormoneUpgradeMood = 1]] //Costs ¤<<print 10000*$upgradeMultiplierMedicine>>// <br> //Should eliminate the occasional moodiness caused by generalized therapy.// + <br> <<else>> //You lack the reputation to obtain advanced drug manufacturing components// + <br> <</if>> <<else>> individualized hormone replacement therapies. + <br> <</if>> -<br> - The hormone replacement therapies <<if $hormoneUpgradePower == 0>> are traditional: they're formulated to mimic natural hormones. @@ -126,15 +153,16 @@ The hormone replacement therapies [[Purchase data on advanced HRT|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $hormoneUpgradePower = 1]] //Costs ¤<<print 25000*$upgradeMultiplierMedicine>>// <br> //Should increase the power of hormone therapies.// + <br> <<else>> //You lack the reputation to obtain prototype medicines// + <br> <</if>> <<else>> are advanced: they're formulated to improve on natural hormones. + <br> <</if>> -<br> - The hormone replacement therapies <<if $hormoneUpgradeShrinkage == 0>> are broad-spectrum. @@ -142,346 +170,397 @@ The hormone replacement therapies [[Purchase data on targeted HRT|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $hormoneUpgradeShrinkage = 1]] //Costs ¤<<print 25000*$upgradeMultiplierMedicine>>// <br> //Should reduce atrophy of organs corresponding to original sex.// + <br> <<else>> //You lack the reputation to obtain prototype medicines// + <br> <</if>> <<else>> are targeted, reducing atrophy of organs corresponding to original sex. + <br> <</if>> <<if $precociousPuberty == 1>> -<br><br> - -<<if ($pubertyHormones == 0) && ($rep <= 4500*$upgradeMultiplierMedicine)>> - //You lack the reputation to fund forced puberty drugs// -<<elseif ($pubertyHormones == 0) && ($rep > 4500*$upgradeMultiplierMedicine)>> - [[Fund research into powerful hormonal injections to jumpstart puberty|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $pubertyHormones = 1]] - //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>// - <br> //Will allow the production of powerful hormonal drugs designed to force a slave through puberty without regard for side effects. // -<<elseif ($pubertyHormones == 1)>> - The fabricator is producing extra strong hormonal drugs designed to force a slave through puberty. -<</if>> + <<if ($pubertyHormones == 0) && ($rep <= 4500*$upgradeMultiplierMedicine)>> + //You lack the reputation to fund forced puberty drugs// + <br> + <<elseif ($pubertyHormones == 0) && ($rep > 4500*$upgradeMultiplierMedicine)>> + [[Fund research into powerful hormonal injections to jumpstart puberty|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $pubertyHormones = 1]] + //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>// + <br> //Will allow the production of powerful hormonal drugs designed to force a slave through puberty without regard for side effects. // + <br> + <<elseif ($pubertyHormones == 1)>> + The fabricator is producing extra strong hormonal drugs designed to force a slave through puberty. + <br> + <</if>> <</if>> -<br><br> - +<br> +Dietary Upgrades +<hr> <<if $feeder == 1>> -<<if ($dietXXY == 0) && ($rep <= 3500*$upgradeMultiplierMedicine)>> - //You lack the reputation to fund research into hermaphrodite hormones// -<<elseif ($dietXXY == 0) && ($rep > 3500*$upgradeMultiplierMedicine)>> - [[Fund research into developing hermaphrodite hormone therapies|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $dietXXY = 1]] - //Costs ¤<<print 10000*$upgradeMultiplierMedicine>>// - <br> //Will allow for specially balanced meals to be served in the cafeteria designed to promote both halves of a herm's sexuality. // -<<elseif ($dietXXY == 1)>> - The fabricator is producing meals to be served in the cafeteria designed to promote both halves of a herm's sexuality. -<</if>> + <<if ($dietXXY == 0) && ($rep <= 3500*$upgradeMultiplierMedicine)>> + //You lack the reputation to fund research into hermaphrodite hormones// + <br> + <<elseif ($dietXXY == 0) && ($rep > 3500*$upgradeMultiplierMedicine)>> + [[Fund research into developing hermaphrodite hormone therapies|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $dietXXY = 1]] + //Costs ¤<<print 10000*$upgradeMultiplierMedicine>>// + <br> //Will allow for specially balanced meals to be served in the cafeteria designed to promote both halves of a herm's sexuality. // + <br> + <<elseif ($dietXXY == 1)>> + The fabricator is producing meals to be served in the cafeteria designed to promote both halves of a herm's sexuality. + <br> + <</if>> <<else>> The feeders are incapable of modifying slave diets well enough to adjust hormones for hermaphrodite meals. + <br> <</if>> -<br><br> - <<if $cumProDiet == 0>> [[Purchase recipes to encourage cum production|Dispensary][$cash -= 5000*$upgradeMultiplierMedicine, $cumProDiet = 1]] //Costs ¤<<print 5000*$upgradeMultiplierMedicine>>// <br> //Will allow for specially designed meals to be served in the cafeteria to promote cum production.// + <br> <<elseif $cumProDiet == 1>> The fabricator is producing meals to be served in the cafeteria designed to promote cum production. + <br> <</if>> -<br><br> - <<if $dietCleanse == 0>> [[Purchase cleansing recipes to lessen genome damage|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $dietCleanse = 1]] //Costs ¤<<print 10000*$upgradeMultiplierMedicine>>// <br> //Will allow for specially designed meals to be served in the cafeteria to counteract excessive drug use.// + <br> <<elseif $dietCleanse == 1>> The fabricator is producing meals to be served in the cafeteria designed to counteract excessive drug use and good health. They smell awful and taste worse than they look, but they're healthy. + <br> <</if>> -<br><br> - +<br> +Pharmacological Upgrades +<hr> <<if ($curativeUpgrade == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>> [[Purchase data on advanced curatives|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $curativeUpgrade = 1]] //Costs ¤<<print 25000*$upgradeMultiplierMedicine>>// <br> //Should improve the effectiveness of curative treatment.// + <br> <<elseif ($curativeUpgrade == 1)>> The fabricator is producing highly effective curative cocktails. + <br> <</if>> -<br><br> - <<if ($growthStim == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>> [[Purchase data on growth stimulants|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $growthStim = 1]] //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// <br> //Will allow the manufacturing of drugs to encourage growth in slave height.// + <br> <<elseif ($growthStim == 1)>> The fabricator is able to produce growth stimulants. + <br> <</if>> -<br><br> - <<if ($aphrodisiacUpgradeRefine == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>> [[Purchase data on refined aphrodisiacs|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $aphrodisiacUpgradeRefine = 1]] //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// <br> //Will prevent most physical side effects of aphrodisiacs. Once the formulas are changed they can not be changed back.// + <br> <<elseif ($aphrodisiacUpgradeRefine == 1)>> The fabricator is producing refined aphrodisiacs with limited hormonal effects. + <br> <</if>> -<br><br> - <<if ($aphrodisiacUpgrade == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>> [[Purchase data on aphrodisiac withdrawal treatment|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $aphrodisiacUpgrade = 1]] //Costs ¤<<print 10000*$upgradeMultiplierMedicine>>// <br> //Should prevent most negative effects of withdrawal.// + <br> <<elseif ($aphrodisiacUpgrade == 1)>> The fabricator is producing a substitute that will protect slaves from aphrodisiac withdrawal. + <br> <</if>> -<br><br> - -<<if ($superFertilityDrugs == 0) && ($rep > 2500*$upgradeMultiplierMedicine) && $seeHyperPreg == 1>> - [[Purchase data on powerful fertility drugs|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $superFertilityDrugs = 1]] - //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// - <br> //Should improve the likelihood of conception and multiples. // -<<elseif ($superFertilityDrugs == 1)>> - The fabricator is producing highly effective fertility agents. There is a warning present involving overdosing and instances of ten or more children. -<</if>> - -<br><br> - <<if ($healthyDrugsUpgrade == 0)>> <<if (($organFarmUpgrade >= 1) && ($injectionUpgrade != 0) && ($curativeUpgrade == 1) && ($aphrodisiacUpgrade == 1))>> - <<if ($rep >= 15000*$upgradeMultiplierMedicine)>> - [[Fund research into drug formulations without negative physical side effects|Dispensary][$cash -= 500000*$upgradeMultiplierMedicine,$healthyDrugsUpgrade = 1]] //Costs ¤<<print 500000*$upgradeMultiplierMedicine>>. Will prevent the negative side effects of excessive drug usage on your slaves.// - <br><br> - <<else>> - // You lack the reputation to access the technology necessary to develop advanced drug formulations. // - <</if>> + <<if ($rep >= 15000*$upgradeMultiplierMedicine)>> + [[Fund research into drug formulations without negative physical side effects|Dispensary][$cash -= 500000*$upgradeMultiplierMedicine,$healthyDrugsUpgrade = 1]] + //Costs ¤<<print 500000*$upgradeMultiplierMedicine>>// + <br> //Will prevent the negative side effects of excessive drug usage on your slaves.// + <br> + <<else>> + // You lack the reputation to access the technology necessary to develop advanced drug formulations. // + <br> + <</if>> <<else>> - // You must purchase all other upgrades before developing advanced drug formulations. // - <br><br> + // You must purchase all other upgrades before developing advanced drug formulations. // + <br> <</if>> <<else>> The fabricator has been upgraded to optimize the structures of your other drugs, eliminating their negative side effects. - <br><br> + <br> <</if>> /* Code [draft] contributed by Anon1888 */ - <<if ($arcologies[0].FSBodyPuristLaw == 1)>> //The pharmaceutical fabricator is working with your body purist arcology to reduce long term drug side effects.// - <br><br> + <br> <</if>> +<br> +Fertility Focused Pharmacology +<hr> +<<if $seeHyperPreg == 1>> + <<if $superFertilityDrugs == 1 && ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> + [[Fund research pregnancy speed control methods|Dispensary][$cash -= 200000*$upgradeMultiplierMedicine, $pregSpeedControl = 1, $clinicSpeedGestation = 0]] + //Costs ¤<<print 200000*$upgradeMultiplierMedicine>>// + <br> // Fund underground research labs to develop methods for controlling pregnancy progress. // + <br> + <<elseif ($rep <= 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> + //You lack the reputation required to contact underground research labs to develop methods for controlling pregnancy progress.// + <br> + <<elseif ($pregSpeedControl == 1)>> + The fabricator is producing extremely complex gestation control agents. They can be used to control gestation speed, and even suppress labor for some time. // + <br> + <</if>> +<<elseif $birthsTotal > 10>> + <<if ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> + [[Fund research pregnancy speed control methods|Dispensary][$cash -= 200000*$upgradeMultiplierMedicine, $pregSpeedControl = 1, $clinicSpeedGestation = 0]] + //Costs ¤<<print 200000*$upgradeMultiplierMedicine>>// + <br> // Fund underground research labs to develop methods for controlling pregnancy progress. // + <br> + <<elseif ($rep <= 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> + //You lack the reputation required to contact underground research labs to develop methods for controlling pregnancy progress.// + <br> + <<elseif ($pregSpeedControl == 1)>> + The fabricator is producing extremely complex gestation control agents. They can be used to control gestation speed, and even suppress labor for some time. // + <br> + <</if>> +<<else>> + //You lack the experience required to contact underground research labs to develop methods for controlling pregnancy progress.// + <br> +<</if>> + +<<if ($superFertilityDrugs == 0) && ($rep > 2500*$upgradeMultiplierMedicine) && $seeHyperPreg == 1>> + [[Purchase data on powerful fertility drugs|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $superFertilityDrugs = 1]] + //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// + <br> //Should improve the likelihood of conception and multiples. // + <br> +<<elseif ($superFertilityDrugs == 1)>> + The fabricator is producing highly effective fertility agents. There is a warning present involving overdosing and instances of ten or more children. + <br> +<</if>> +<br> +Implant Production +<hr> <<if ($ImplantProductionUpgrade == 0) && ($rep <= 2000*$upgradeMultiplierMedicine)>> //You lack the reputation to access experimental implant manufacturer parts// - <br><br> + <br> <</if>> <<if ($ImplantProductionUpgrade == 0) && ($rep > 2000*$upgradeMultiplierMedicine)>> [[Upgrade the fabricator with an experimental implant manufacturer|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $ImplantProductionUpgrade = 1]] //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// <br> //Will allow the fabrication of special implants using the autosurgery.// + <br> <<elseif ($ImplantProductionUpgrade > 0)>> The fabricator is capable of crafting special implants. + <br> <</if>> -<br><br> - <<if $ImplantProductionUpgrade == 1 && $seeHyperPreg == 1 && $seeExtreme == 1>> -<<if ($permaPregImplant == 0) and ($rep <= 4000*$upgradeMultiplierMedicine)>> - //You lack the reputation to access experimental pregnancy generator schematics// -<</if>> - -<<if ($permaPregImplant == 0) && ($rep > 4000*$upgradeMultiplierMedicine)>> - [[Purchase schematics for an experimental implantable pregnancy generator|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $permaPregImplant = 1]] - //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>// - <br> //Will allow the fabrication of implants that force perpetual pregnancy.// -<<elseif ($permaPregImplant > 0)>> - The fabricator is capable of crafting pregnancy generators. -<</if>> -<br><br> -<</if>> - -<<if $seeHyperPreg == 1>> -<<if $superFertilityDrugs == 1 && ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> - [[Fund research pregnancy speed control methods|Dispensary][$cash -= 200000*$upgradeMultiplierMedicine, $pregSpeedControl = 1, $clinicSpeedGestation = 0]] - //Costs ¤<<print 200000*$upgradeMultiplierMedicine>>// - <br> // Fund underground research labs to develop methods for controlling pregnancy progress. // -<<elseif ($rep <= 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> - //You lack the reputation required to contact underground research labs to develop methods for controlling pregnancy progress.// -<<elseif ($pregSpeedControl == 1)>> - The fabricator is producing extremely complex gestation control agents. They can be used to control gestation speed, and even suppress labor for some time. // -<</if>> -<br><br> -<<elseif $birthsTotal > 10>> -<<if ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> - [[Fund research pregnancy speed control methods|Dispensary][$cash -= 200000*$upgradeMultiplierMedicine, $pregSpeedControl = 1, $clinicSpeedGestation = 0]] - //Costs ¤<<print 200000*$upgradeMultiplierMedicine>>// - <br> // Fund underground research labs to develop methods for controlling pregnancy progress. // -<<elseif ($rep <= 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>> - //You lack the reputation required to contact underground research labs to develop methods for controlling pregnancy progress.// -<<elseif ($pregSpeedControl == 1)>> - The fabricator is producing extremely complex gestation control agents. They can be used to control gestation speed, and even suppress labor for some time. // -<</if>> -<br><br> + <<if ($permaPregImplant == 0) and ($rep <= 4000*$upgradeMultiplierMedicine)>> + //You lack the reputation to access experimental pregnancy generator schematics// + <br> + <</if>> + <<if ($permaPregImplant == 0) && ($rep > 4000*$upgradeMultiplierMedicine)>> + [[Purchase schematics for an experimental implantable pregnancy generator|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $permaPregImplant = 1]] + //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>// + <br> //Will allow the fabrication of implants that force perpetual pregnancy.// + <br> + <<elseif ($permaPregImplant > 0)>> + The fabricator is capable of crafting pregnancy generators. + <br> + <</if>> <</if>> <<if $ImplantProductionUpgrade == 1>> -<<if ($bellyImplants == 0) && ($rep <= 2000*$upgradeMultiplierMedicine)>> - //You lack the reputation to access experimental fillable abdominal implants// -<</if>> - -<<if ($bellyImplants == 0) && ($rep > 2000*$upgradeMultiplierMedicine)>> - [[Purchase schematics for fillable abdominal implants|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $bellyImplants = 1]] - //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// - <br> //Will allow the fabrication of fillable abdominal implants using the autosurgery.// -<<elseif ($bellyImplants > 0)>> - The fabricator is capable of crafting fillable abdominal implants. -<</if>> - -<br><br> - -<<if ($bellyImplants == 1) && ($cervixImplants != 1) && ($rep <= 6000*$upgradeMultiplierMedicine)>> /* show only after belly implants already researched */ - //You lack the reputation to access schematics far experimental cervix filter micropumps for abdominal implants// -<</if>> - -<<if ($bellyImplants == 1) && ($cervixImplants != 1) && ($rep >6000*$upgradeMultiplierMedicine)>> /* nanotech like technology much more impressive and costly than simple implant */ - [[Purchase schematics for cervix filter micropumps|Dispensary][$cash -= 70000*$upgradeMultiplierMedicine, $cervixImplants = 1]] - //Costs ¤<<print 70000*$upgradeMultiplierMedicine>>// - <br> //Will allow the fabrication of cervix filter micropumps for fillable abdominal implants using the autosurgery.// -<<elseif ($cervixImplants > 0)>> - The fabricator is capable of crafting cervix filter micropumps for fillable abdominal implants. -<</if>> - -<br><br> - -<<if ($prostateImplants != 1) && ($rep <= 3000*$upgradeMultiplierMedicine)>> - //You lack the reputation to access plans for prostate implants// -<</if>> + <<if ($bellyImplants == 0) && ($rep <= 2000*$upgradeMultiplierMedicine)>> + //You lack the reputation to access experimental fillable abdominal implants// + <br> + <</if>> -<<if ($prostateImplants != 1) && ($rep > 3000*$upgradeMultiplierMedicine)>> - [[Purchase plans for ejaculation enhancing prostate implants|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $prostateImplants = 1]] - //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>// - <br> //Will allow the fabrication of a prostate implant designed to stimulate fluid production for massive ejaculations. Beware of leaking and dehydration.// -<<elseif ($prostateImplants > 0)>> - The fabricator is capable of producing ejaculation enhancing prostate implants. -<</if>> + <<if ($bellyImplants == 0) && ($rep > 2000*$upgradeMultiplierMedicine)>> + [[Purchase schematics for fillable abdominal implants|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $bellyImplants = 1]] + //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// + <br> //Will allow the fabrication of fillable abdominal implants using the autosurgery.// + <br> + <<elseif ($bellyImplants > 0)>> + The fabricator is capable of crafting fillable abdominal implants. + <br> + <</if>> + + <<if ($bellyImplants == 1) && ($cervixImplants != 1) && ($rep <= 6000*$upgradeMultiplierMedicine)>> /* show only after belly implants already researched */ + //You lack the reputation to access schematics far experimental cervix filter micropumps for abdominal implants// + <br> + <</if>> -<br><br> + <<if ($bellyImplants == 1) && ($cervixImplants != 1) && ($rep >6000*$upgradeMultiplierMedicine)>> /* nanotech like technology much more impressive and costly than simple implant */ + [[Purchase schematics for cervix filter micropumps|Dispensary][$cash -= 70000*$upgradeMultiplierMedicine, $cervixImplants = 1]] + //Costs ¤<<print 70000*$upgradeMultiplierMedicine>>// + <br> //Will allow the fabrication of cervix filter micropumps for fillable abdominal implants using the autosurgery.// + <br> + <<elseif ($cervixImplants > 0)>> + The fabricator is capable of crafting cervix filter micropumps for fillable abdominal implants. + <br> + <</if>> -<<if ($meshImplants != 1) && ($rep <= 10000*$upgradeMultiplierMedicine)>> - //You lack the reputation to access plans for supportive breast implants// -<</if>> + <<if ($prostateImplants != 1) && ($rep <= 3000*$upgradeMultiplierMedicine)>> + //You lack the reputation to access plans for prostate implants// + <br> + <</if>> + <<if ($prostateImplants != 1) && ($rep > 3000*$upgradeMultiplierMedicine)>> + [[Purchase plans for ejaculation enhancing prostate implants|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $prostateImplants = 1]] + //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>// + <br> //Will allow the fabrication of a prostate implant designed to stimulate fluid production for massive ejaculations. Beware of leaking and dehydration.// + <br> + <<elseif ($prostateImplants > 0)>> + The fabricator is capable of producing ejaculation enhancing prostate implants. + <br> + <</if>> -<<if ($meshImplants != 1) && ($rep > 10000*$upgradeMultiplierMedicine)>> - [[Purchase plans for supportive mesh breast implants|Dispensary][$cash -= 40000*$upgradeMultiplierMedicine, $meshImplants = 1]] - //Costs ¤<<print 40000*$upgradeMultiplierMedicine>>// - <br> //Will allow the fabrication of an organic, supportive mesh breast implants.// -<<elseif ($meshImplants > 0)>> - The fabricator is capable of producing supportive mesh breast implants. -<</if>> + <<if ($meshImplants != 1) && ($rep <= 10000*$upgradeMultiplierMedicine)>> + //You lack the reputation to access plans for supportive breast implants// + + <</if>> + <<if ($meshImplants != 1) && ($rep > 10000*$upgradeMultiplierMedicine)>> + [[Purchase plans for supportive mesh breast implants|Dispensary][$cash -= 40000*$upgradeMultiplierMedicine, $meshImplants = 1]] + //Costs ¤<<print 40000*$upgradeMultiplierMedicine>>// + <br> //Will allow the fabrication of an organic, supportive mesh breast implants.// + <br> + <<elseif ($meshImplants > 0)>> + The fabricator is capable of producing supportive mesh breast implants. + <br> + <</if>> <</if>> - -<br><br> -__Societal Focused Research__ -<br><br> + +<br> +Future Societies Research +<hr> <<if $arcologies[0].FSGenderRadicalistDecoration == 100 && $organFarmUpgrade > 0>> <<if ($arcologies[0].FSGenderRadicalistResearch == 0)>> <<if ($rep >= 10000*$upgradeMultiplierMedicine)>> - [[Fund research into developing male pregnancy methods|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine,$arcologies[0].FSGenderRadicalistResearch = 1]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>. Will allow cloning and production of anal uteri and ovaries.// + [[Fund research into developing male pregnancy methods|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine,$arcologies[0].FSGenderRadicalistResearch = 1]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>. Will allow cloning and production of anal uteri and ovaries.// + <br> <<else>> - // You lack the reputation to access the research necessary to develop anal uteri and ovaries. // + // You lack the reputation to access the research necessary to develop anal uteri and ovaries. // + <br> <</if>> <<else>> - The organ farm has been upgraded with schematics for modified uteri and ovaries. + The organ farm has been upgraded with schematics for modified uteri and ovaries. + <br> <</if>> <<else>> // Gender Radicalist focused research unavailable. // + <br> <</if>> <<if ($ImplantProductionUpgrade == 1) and ($arcologies[0].FSTransformationFetishistDecoration >= 100)>> - <br> <<if ($arcologies[0].FSTransformationFetishistResearch == 0) and ($rep <= 5000*$upgradeMultiplierMedicine)>> //You lack the reputation to access experimental gigantic implants and elasticizing filler.// + <br> <<elseif ($arcologies[0].FSTransformationFetishistResearch == 0)>> [[Purchase data on gigantic implants and elasticizing filler|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $arcologies[0].FSTransformationFetishistResearch = 1]] //Costs ¤<<print 20000*$upgradeMultiplierMedicine>>// <br> //Will allow the fabrication of gigantic implants using the autosurgery and filler capable of overfilling existing fillable implants.// + <br> <<elseif ($arcologies[0].FSTransformationFetishistResearch > 0)>> The fabricator is capable of crafting gigantic implants and elasticizing filler designed to overfill existing implants. + <br> <</if>> <<else>> - <br>// Transformation Fetishist focused research unavailable. // + // Transformation Fetishist focused research unavailable. // + <br> <</if>> <<if $arcologies[0].FSAssetExpansionistDecoration == 100>> - <br> <<if ($arcologies[0].FSAssetExpansionistResearch == 0)>> <<if ($rep >= 5000*$upgradeMultiplierMedicine)>> - [[Fund research into drug formulations for growth without limit|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSAssetExpansionistResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of drugs to push assets to unthinkable sizes.// + [[Fund research into drug formulations for growth without limit|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSAssetExpansionistResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of drugs to push assets to unthinkable sizes.// + <br> <<else>> - // You lack the reputation to access the research necessary to develop advanced growth drug formulations. // + // You lack the reputation to access the research necessary to develop advanced growth drug formulations. // + <br> <</if>> <<else>> - The fabricator has been upgraded to manufacture extremely powerful growth drugs. + The fabricator has been upgraded to manufacture extremely powerful growth drugs. + <br> <</if>> <<else>> - <br>// Asset Expansionist focused research unavailable. // + // Asset Expansionist focused research unavailable. // + <br> <</if>> <<if $arcologies[0].FSSlimnessEnthusiastDecoration == 100>> - <br> <<if ($arcologies[0].FSSlimnessEnthusiastResearch == 0)>> <<if ($rep >= 5000*$upgradeMultiplierMedicine)>> - [[Fund research into drug formulations for slimming slaves|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSSlimnessEnthusiastResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of drugs to shrink assets.// + [[Fund research into drug formulations for slimming slaves|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSSlimnessEnthusiastResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of drugs to shrink assets.// + <br> <<else>> - // You lack the reputation to access the research necessary to develop asset reducing drug formulations. // + // You lack the reputation to access the research necessary to develop asset reducing drug formulations. // + <br> <</if>> <<else>> - The fabricator has been upgraded to manufacture growth reversing drugs. + The fabricator has been upgraded to manufacture growth reversing drugs. + <br> <</if>> <<else>> - <br>// Slimness Enthusiast focused research unavailable. // + // Slimness Enthusiast focused research unavailable. // + <br> <</if>> <<if $arcologies[0].FSYouthPreferentialistDecoration == 100>> - <br> <<if ($arcologies[0].FSYouthPreferentialistResearch == 0)>> <<if ($rep >= 5000*$upgradeMultiplierMedicine)>> - [[Fund research into skin care designed to reverse the effects of aging|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSYouthPreferentialistResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of beauty creams designed to make slaves look young again.// + [[Fund research into skin care designed to reverse the effects of aging|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSYouthPreferentialistResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of beauty creams designed to make slaves look young again.// + <br> <<else>> - // You lack the reputation to access the research necessary to develop beauty creams designed to make slaves look young again. // + // You lack the reputation to access the research necessary to develop beauty creams designed to make slaves look young again. // + <br> <</if>> <<else>> - The fabricator has been upgraded to manufacture extremely effective beauty creams designed to combat aging. + The fabricator has been upgraded to manufacture extremely effective beauty creams designed to combat aging. + <br> <</if>> <<else>> - <br>// Youth Preferentialist focused research unavailable. // + // Youth Preferentialist focused research unavailable. // + <br> <</if>> <<if $arcologies[0].FSHedonisticDecadenceDecoration == 100>> - <br> <<if ($arcologies[0].FSHedonisticDecadenceResearch == 0)>> <<if ($rep >= 5000*$upgradeMultiplierMedicine)>> - [[Purchase recipes for concentrated, shaped slave food|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine,$arcologies[0].FSHedonisticDecadenceResearch = 1]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>. Will allow production of solid slave food in various familiar shapes and flavors. Addictive and a little fatty.<<if $arcologies[0].FSDegradationist != "unset">> Since your slaves don't deserve luxuries, a modified recipe formulated to cause severe stomach cramps minutes after ingestion will be developed.<</if>> // + [[Purchase recipes for concentrated, shaped slave food|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine,$arcologies[0].FSHedonisticDecadenceResearch = 1]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>. Will allow production of solid slave food in various familiar shapes and flavors. Addictive and a little fatty.<<if $arcologies[0].FSDegradationist != "unset">> Since your slaves don't deserve luxuries, a modified recipe formulated to cause severe stomach cramps minutes after ingestion will be developed.<</if>> // + <br> <<else>> - // You lack the reputation to access the research necessary to purchage concentrated, shaped slave food recipes. // + // You lack the reputation to access the research necessary to purchage concentrated, shaped slave food recipes. // + <br> <</if>> <<else>> The fabricator has been upgraded to manufacture tasty, extremely addictive, solid slave food in various familiar shapes and flavors. While they look and taste like real food, their consistancy is all wrong. Slaves gorging on them are likely to experience steady weight gain.<<if $arcologies[0].FSDegradationist != "unset">> Since your slaves don't deserve luxuries, all food crafted will cause severe stomach cramps minutes after ingestion. Coupled with their addictive nature, it ought to be quite torturous.<</if>> <<if $arcologies[0].FSSlimnessEnthusiast > 50 && $arcologies[0].FSHedonisticDecadenceDietResearch == 0>> - <br> [[Purchase diet recipes|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine,$arcologies[0].FSHedonisticDecadenceDietResearch = 1]] //Costs ¤<<print 10000*$upgradeMultiplierMedicine>> Will prevent rampant weight gain from ruining your slim slaves. + [[Purchase diet recipes|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine,$arcologies[0].FSHedonisticDecadenceDietResearch = 1]] + //Costs ¤<<print 10000*$upgradeMultiplierMedicine>>// + <br> Will prevent rampant weight gain from ruining your slim slaves. + <br> <<elseif $arcologies[0].FSHedonisticDecadenceDietResearch == 1>> A diet recipe is being utilized to prevent unwanted weight gain. + <br> <</if>> <</if>> <<else>> - <br>// Hedonistic Decadence focused research unavailable. // + // Hedonistic Decadence focused research unavailable. // + <br> <</if>> diff --git a/src/uncategorized/economics.tw b/src/uncategorized/economics.tw index c8ff36cd68e4d0188c872c1b934f15c35bdbe0a5..81c80254dd61e69202fd94d3d866a54baa1e5899 100644 --- a/src/uncategorized/economics.tw +++ b/src/uncategorized/economics.tw @@ -37,6 +37,8 @@ <</if>> <<include "Reputation">> + + <br><br> <<include "Arcology Management">> @@ -50,6 +52,12 @@ <br><br> <<include "FS Developments">> <</if>> + +<br><br> +<<if $secExp == 1>> +<<include "securityReport">> +<</if>> + <<else>> <<CreateSimpleTabs>> <body> @@ -60,7 +68,11 @@ <<if $corpAnnounced == 1>> <button class="tablinks" onclick="opentab(event, 'Corporation')">Corporation</button> <</if>> + <<if $secExp == 1>> + <button class="tablinks" onclick="opentab(event, 'Reputation')">Reputation and Authority</button> + <<else>> <button class="tablinks" onclick="opentab(event, 'Reputation')">Reputation</button> + <</if>> <button class="tablinks" onclick="opentab(event, 'Management')">Arcology Management</button> <<if ($PC.boobs == 1 && $PC.boobsBonus > 0) || $PC.pregKnown == 1 || $playerAging != 0>> <button class="tablinks" onclick="opentab(event, 'Personal')">Personal Notes</button> @@ -68,6 +80,9 @@ <<if $FSAnnounced > 0>> <button class="tablinks" onclick="opentab(event, 'Societies')">Society Development</button> <</if>> + <<if $secExp == 1>> + <button class="tablinks" onclick="opentab(event, 'securityReport')">Security</button> + <</if>> </div> <div id="Arcologies" class="tabcontent"> @@ -124,6 +139,12 @@ You have not yet committed funds to create a publicly traded slave trading corpo </div> <</if>> +<div id="securityReport" class="tabcontent"> +<div class="content"> +<<include "securityReport">> +</div> +</div> + <script> function opentab(evt, tabName) { var i, tabcontent, tablinks; diff --git a/src/uncategorized/fsDevelopments.tw b/src/uncategorized/fsDevelopments.tw index 06dbdfc822e896d83826772fdae90721f9697c51..035bbf2832e1b190d247e1f7b7d43ad6f078163b 100644 --- a/src/uncategorized/fsDevelopments.tw +++ b/src/uncategorized/fsDevelopments.tw @@ -234,6 +234,14 @@ <<set _broadProgress += 1>> <</if>> <</if>> +<<if $propCampaign == 0 && $propFocus == "social engineering">> + Your propaganda campaign helps further your societal engineering efforts. + <<if $propCampaignBoost == 1>> + <<set _broadProgress += 2>> + <<else>> + <<set _broadProgress += 1>> + <</if>> +<</if>> <<if $terrain == "urban">> The @@.yellow;urban location@@ of the arcology naturally promotes cultural interchange, holding back $arcologies[0].name's cultural independence. <<set _broadProgress -= 3>> @@ -368,6 +376,31 @@ <</if>> <</if>> +<<if $slaveWatch == 1>> + The Slave Mistreatment Watch helps many slaves, easing your citizens into the paternalist ideals it represents. + <<set $arcologies[0].FSPaternalist += 2>> +<</if>> + +<<if $noSubhumansInArmy == 1>> + Your army is free of subhumans, further cementing their lower status in the eyes of your citizens. + <<set $arcologies[0].FSSubjugationist += 2>> +<</if>> + +<<if $pregExemption == 1>> + Pregnant citizens are allowed and encouraged to avoid military service, making their value evident to all citizens. + <<set $arcologies[0].FSRepopulationFocus += 2>> +<</if>> + +<<if $eliteOfficers == 1>> + Purity in leadership is fundamental in your army, helping eugenics ideals spread in the populace. + <<set $arcologies[0].FSRestart += 2>> +<</if>> + +<<if $liveTargets == 1>> + Disobedient slaves are used in shooting ranges and military drills as live targets, furthering degradationist ideals. + <<set $arcologies[0].FSDegradationist += 2>> +<</if>> + /* Promenade effects */ <<for _i = 5; _i <= 7; _i++>> <<if $sectors[_i].type != "Shops">> diff --git a/src/uncategorized/generateXYSlave.tw b/src/uncategorized/generateXYSlave.tw index ad009a68f4beb1f1892b1e919e696e1b2394fb96..e89196ea3fffb6c4589f4fbea3326cfc31bea808 100644 --- a/src/uncategorized/generateXYSlave.tw +++ b/src/uncategorized/generateXYSlave.tw @@ -451,16 +451,16 @@ <<switch $activeSlave.nationality>> <<case "Iranian" "Moroccan" "Afghan" "Tunisian">> <<set $activeSlave.foreskin = 100>> - <<case "Turkish" "Nigerian" "Iraqi" "Yemeni" "Jordanian" "Gabonese">> + <<case "Turkish" "Nigerian" "Iraqi" "Yemeni" "Jordanian" "Gabonese" "Tajik">> <<set $activeSlave.foreskin = 99>> - <<case "Algerian" "Maldivian">> + <<case "Algerian" "Maldivian" "Azerbaijani">> <<set $activeSlave.foreskin = 98>> <<case "Saudi" "Uzbek" "Libyan" "Djiboutian">> <<set $activeSlave.foreskin = 97>> - <<case "Congolese" "Pakistani" "Nigerien">> + <<case "Congolese" "Pakistani" "Nigerien" "Turkmen">> /% Population-weighted average of Democratic Republic of Congo and Republic of Congo %/ <<set $activeSlave.foreskin = 96>> - <<case "Egyptian" "Tuvaluan" "Malagasy" "Nauruan">> + <<case "Egyptian" "Tuvaluan" "Malagasy" "Nauruan" "a Cook Islander" "Niuean" "Palauan" "Samoan" "a Solomon Islander" "Tongan" "Ni-Vanuatu">> <<set $activeSlave.foreskin = 95>> <<case "Cameroonian">> <<set $activeSlave.foreskin = 94>> @@ -468,23 +468,25 @@ <<set $activeSlave.foreskin = 93>> <<case "Israeli" "Ghanan" "Ethiopian" "Filipina" "Kosovan">> <<set $activeSlave.foreskin = 92>> - <<case "Kenyan">> + <<case "Kenyan" "Kyrgyz" "Palestinian">> <<set $activeSlave.foreskin = 91>> <<case "Omani">> <<set $activeSlave.foreskin = 88>> - <<case "Malian">> + <<case "Malian" "Kuwaiti">> <<set $activeSlave.foreskin = 86>> - <<case "American")>> + <<case "Bahraini">> + <<set $activeSlave.foreskin = 81>> + <<case "American" "Qatari">> <<set $activeSlave.foreskin = 77>> <<case "Emirati">> <<set $activeSlave.foreskin = 76>> <<case "Tanzanian">> <<set $activeSlave.foreskin = 72>> - <<case "Malaysian">> + <<case "Malaysian" "Burundian">> <<set $activeSlave.foreskin = 61>> <<case "Lebanese">> <<set $activeSlave.foreskin = 60>> - <<case "Kazakh">> + <<case "Kazakh" "Fijian">> <<set $activeSlave.foreskin = 56>> <<case "Korean" "Bruneian">> /% Population-weighted average of South Korea and North Korea. %/ @@ -510,7 +512,7 @@ <<set $activeSlave.foreskin = 28>> <<case "Ugandan" "Australian">> <<set $activeSlave.foreskin = 27>> - <<case "Belgian" "Thai">> + <<case "Belgian" "Thai" "Cypriot">> <<set $activeSlave.foreskin = 23>> <<case "British">> <<set $activeSlave.foreskin = 21>> @@ -518,37 +520,40 @@ <<set $activeSlave.foreskin = 20>> <<case "Montenegrin">> <<set $activeSlave.foreskin = 19>> - <<case "Singaporean">> + <<case "Singaporean" "Surinamese">> <<set $activeSlave.foreskin = 15>> <<case "Jamaican" "French" "Chinese" "Indian">> <<set $activeSlave.foreskin = 14>> <<case "Zambian" "Bulgarian">> <<set $activeSlave.foreskin = 13>> - <<case "Russian">> + <<case "Russian" "French Guianan" "Guyanese">> <<set $activeSlave.foreskin = 12>> <<case "German">> <<set $activeSlave.foreskin = 11>> - <<case "Belarusian">> + <<case "Belarusian" "Georgian" "Papua New Guinean">> <<set $activeSlave.foreskin = 10>> <<case "Zimbabwean" "Japanese">> <<set $activeSlave.foreskin = 9>> - <<case "Taiwanese">> + <<case "Taiwanese" "Slovene" "Sri Lankan">> <<set $activeSlave.foreskin = 8>> <<case "Haitian" "Spanish">> <<set $activeSlave.foreskin = 7>> - <<case "Dutch" "Austrian" "Swiss">> + <<case "Dutch" "Austrian" "Swiss" "East Timorese" "Trinidadian">> <<set $activeSlave.foreskin = 6>> - <<case "Danish" "Swedish" "Greek">> + <<case "Danish" "Swedish" "Greek" "a Liechtensteiner">> <<set $activeSlave.foreskin = 5>> <<case "Peruvian" "Serbian" "Nepalese" "Burmese" "Cambodian" "Mongolian">> <<set $activeSlave.foreskin = 4>> <<case "Italian" "Norwegian" "Argentinian">> <<set $activeSlave.foreskin = 3>> - <<case "Ukrainian" "Luxembourgian">> + <<case "Ukrainian" "Luxembourgian" "Vincentian">> <<set $activeSlave.foreskin = 2>> - <<case "Portuguese" "Hungarian" "Irish" "Finnish" "Brazilian" "Bermudian" "Uruguayan" "Monégasque" "Andorran" "Croatian" "Moldovan" "Panamanian">> + <<case "Portuguese" "Hungarian" "Irish" "Finnish" "Brazilian" "Bermudian" "Uruguayan" "Monégasque" "Andorran" "Croatian" "Moldovan" "Panamanian" "Barbadian" "Bhutanese" "Seychellois">> <<set $activeSlave.foreskin = 1>> - <<case "Cuban" "Guatemalan" "Chilean" "Bolivian" "Venezuelan" "Lithuanian" "Slovak" "Czech" "Romanian" "Estonian" "Icelandic" "Polish" "Colombian" "Armenian" "Vietnamese" "Sammarinese" "Marshallese" "Greenlandic" "Belizean" "Costa Rican" "Salvadoran" "Micronesian" "Grenadian" "Honduran" "I-Kiribati" "Laotian" "Maltese" "Nicaraguan">> + <<case "Cuban" "Guatemalan" "Chilean" "Bolivian" "Venezuelan" "Lithuanian" "Slovak" "Czech" "Romanian" "Estonian" "Icelandic" "Polish" "Colombian" + "Armenian" "Vietnamese" "Sammarinese" "Marshallese" "Greenlandic" "Belizean" "Costa Rican" "Salvadoran" "Micronesian" "Grenadian" "Honduran" + "I-Kiribati" "Laotian" "Maltese" "Nicaraguan" "Antiguan" "Bahamian" "Dominiquais" "Ecuadorian" "Latvian" "Paraguayan" "Kittitian" "Vatican" + "Saint Lucian">> <<set $activeSlave.foreskin = 0>> <<default>> /% Some overlooked country, or possibly stateless. Use global average. %/ diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index f9b5c69b31b2e1a14e3ac79929839247f65e5385..97d9629487a56ea0b7a8a9e76d99afaaa61e344a 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -35,7 +35,15 @@ __Construction__ <br> <<if $arcologyUpgrade.drones != 1>> - //The first major upgrade needed is the installation of a drone security system so higher-class citizens will feel safe and protected should they choose to immigrate. This upgrade will cost ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>.// [[Install drone security system|Manage Arcology][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $arcologyUpgrade.drones = 1]] + //The first major upgrade needed is the installation of a drone security system so higher-class citizens will feel safe and protected should they choose to immigrate. This upgrade will cost ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>.// + <<link "Install drone security system">> + <<set $cash -= Math.trunc(5000*$upgradeMultiplierArcology)>> + <<set $arcologyUpgrade.drones = 1>> + <<set $secBots.active = 1>> + <<set $secBots.troops = 30>> + <<set $secBots.maxTroops = 30>> + <<goto "Manage Arcology">> + <</link>> <<elseif $arcologyUpgrade.hydro != 1>> //The next major upgrade needed is the installation of a better water reclamation system so your residents will have access to cheaper water and hydroponically grown food. This upgrade will cost ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>.// [[Upgrade water reclamation system|Manage Arcology][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $arcologyUpgrade.hydro = 1]] <<elseif $arcologyUpgrade.apron != 1>> @@ -79,6 +87,36 @@ __Construction__ You have installed the FCTV receiver and have access to the full range of FCTV's programs. Low viewership rates amongst your citizens limits the impact of FCTV on your societal goals. <</if>> + +/* security */ +<<if $propHub == 0>> + <br> + [[Set up the propaganda Hub|Manage Arcology][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $propHub = 1]] + //Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>.// + <br>//Building specialized in the management of authority.// +<<else>> + <br> + The [[Propaganda Hub|propagandaHub]] is ready to manipulate reality on your command. +<</if>> +<<if $secHQ == 0>> + <br> + [[Set up the security headquarters|Manage Arcology][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $secHQ = 1]] + //Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>.// + <br>//Building specialized in the management of security and crime.// +<<else>> + <br> + The [[security HQ|securityHQ]] is constantly working to protect your arcology. +<</if>> +<<if $arcologyUpgrade.drones == 1 && $secBarracks == 0>> + <br> + [[Set up the barracks|Manage Arcology][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $secBarracks = 1]] + //Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>// + <br>//Building specialized in the management of armed forces.// +<<else>> + <br> + The [[barracks|secBarracks]] patiently await your orders. +<</if>> + <br><br> __Language__ diff --git a/src/uncategorized/managePenthouse.tw b/src/uncategorized/managePenthouse.tw index 8e6ca20b7d48ac40c7fc91d9154ddac4a5f4c652..083b7677d86f1aa5a0463f08d9e4255fb8770b2d 100644 --- a/src/uncategorized/managePenthouse.tw +++ b/src/uncategorized/managePenthouse.tw @@ -242,7 +242,7 @@ __Penthouse Upgrades__ <<elseif $dairyPiping == 1>> Various taps around the penthouse supply product from $dairyName for use in enema play and force-feeding. With no dairy to draw from, they are currently unused. <</if>> - + <br> <<if $studio == 0>> @@ -292,6 +292,8 @@ __Penthouse Upgrades__ <br> + + <<if $cyberMod == 0>> <<switch $prostheticsUpgrade>> <<case 1>> diff --git a/src/uncategorized/manufacturing.tw b/src/uncategorized/manufacturing.tw index 3a546da3e9757a96a0f6c80a67105c355203e1df..9872bdc9a2dee4c237600c262da341da9565b810 100644 --- a/src/uncategorized/manufacturing.tw +++ b/src/uncategorized/manufacturing.tw @@ -36,7 +36,7 @@ This is a space in the arcology's service areas, <<if $mercenaries>> <<if $barracks != 1>> <br> - [[Build a barracks to properly house your mercenaries|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $barracks = 1, $sectors[$AS].type = "Barracks"]] + [[Build an armoury to properly house your mercenaries|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $barracks = 1, $sectors[$AS].type = "Barracks"]] //Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>> but will reduce mercenary upkeep// <</if>> <</if>> diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index 2d1b5c9f599092a54f5b94601a42cec8aa1b1bc0..aab2870f4d757187a7b85ef6280031d32ea16717 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -5,8 +5,10 @@ ''SAVES'' <br> This save was created using FC version $ver build $releaseID. -<br> - [[Apply Backwards Compatibility Update|Backwards Compatibility]] +<br> [[Apply Backwards Compatibility Update|Backwards Compatibility]] +<<if $secExp == 1>> +<br> [[Apply Security Expansion mod backwards compatibility |SecExpBackwardCompatibility]] +<</if>> <br> <<if ($autosave == 0)>> @@ -346,6 +348,20 @@ Curative side effects are @@.red;DISABLED@@. [[Enable|Options][$curativeSideEffe Cybernetics Mod is currently @@.cyan;ENABLED@@. [[Disable|Options][$cyberMod = 0]] <</if>> +<br> + +<<if $secExp == 0>> + The Security Expansion mod is @@.red;DISABLED@@. + <<link "Enable">> + <<set $secExp = 1>> + <<include "SecExpBackwardCompatibility">> + <<goto "Options">> + <</link>> +<<else>> + The Security Expansion Mod is currently @@.cyan;ENABLED@@. [[Disable|Options][$secExp = 0]] +<</if>> +//The mod can be activated in any moment, but it may result in unbalanced gameplay if activated very late in the game. If this is the first time activating the mod or you are updating an old save, please run backward compatibility.// + <br><br> ''CHEATING/DEV OPTIONS'' <br> diff --git a/src/uncategorized/pMercenaries.tw b/src/uncategorized/pMercenaries.tw index 222b683c8dab5f4fad236e44c9d26af82f70f71e..3d63cfdf5f6635c49c24a712a4aea358e1a92418 100644 --- a/src/uncategorized/pMercenaries.tw +++ b/src/uncategorized/pMercenaries.tw @@ -29,6 +29,8 @@ The budgetary difficulty many old world countries are in has resulted in unemplo <<set $rep -= 500>> <<set $cash -= _price>> <<set $mercenaries = 1>> + <<set $mercTotalManpower = 15>> + <<set $mercFreeManpower = 15>> <</replace>> <</link>> <<if ($PC.warfare >= 50) || ($PC.career == "arcology owner")>>//This will cost ¤<<print _price>> and some upkeep, @@.springgreen;reduced by your mercenary contacts@@//<<else>>//This will cost ¤5000 and incur significant upkeep costs//<</if>> <br><<link "Install a full platoon">> @@ -37,6 +39,8 @@ The budgetary difficulty many old world countries are in has resulted in unemplo <<set $rep -= 1000>> <<set $cash -= (_price*2)>> <<set $mercenaries = 3>> + <<set $mercTotalManpower = 30>> + <<set $mercFreeManpower = 30>> <</replace>> <</link>> <<if ($PC.warfare >= 50) || ($PC.career == "arcology owner")>>//This will cost ¤<<print (_price*2)>> and some upkeep, @@.springgreen;reduced by your mercenary contacts@@//<<else>>//This will cost ¤10000 and incur significant upkeep costs//<</if>> <br><<link "Do not quarter troops in your arcology">> diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw index 0c4d9c960965ac4803188dbb6da71f1129723ae4..64ddb494c168306a6f2105c14c0ef480a3237d64 100644 --- a/src/uncategorized/persBusiness.tw +++ b/src/uncategorized/persBusiness.tw @@ -531,6 +531,54 @@ <</if>> <</if>> +<<if $sellData == 1>> + <<set _upgradeCount = 0>> + <<if $secUpgrades.nanoCams == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $secUpgrades.cyberBots == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $secUpgrades.eyeScan == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $secUpgrades.cryptoAnalyzer == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $crimeUpgrades.autoTrial == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $crimeUpgrades.autoArchive == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $crimeUpgrades.worldProfiler == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $crimeUpgrades.advForensic == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $intelUpgrades.sensors == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $intelUpgrades.radar == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<if $intelUpgrades.signalIntercept == 1>> + <<set _upgradeCount += 1>> + <</if>> + <<set _dataGain = _upgradeCount * 200>> + You are selling the data collected by your security department, making @@.yellowgreen;¤a discreet sum@@. + <<set $cash += _dataGain>> + Many of your citizens are not enthusiastic of this however, @@.red;damaging your authority@@. + <<set $authority -= 50>> +<</if>> + +<<if $marketInfiltration == 1>> + Your secret service makes use of black markets and illegal streams of goods to make a profit, making you @@.yellowgreen;¤a discreet sum@@. This however allows @@.red;crime to flourish@@ in the underbelly of the arcology. + <<set $cash += 1000>> + <<set $crime += random(0,1)>> +<</if>> + Routine upkeep of your demesne costs @@.yellow;¤$costs.@@ <<if $plot == 1>> <<if $week > 10>> diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw index dfb0ee53624aaf621bccc72675c955adeffbb7da..480aa8567be1958ab59dbc9802fb1b4030e89e79 100644 --- a/src/uncategorized/reputation.tw +++ b/src/uncategorized/reputation.tw @@ -579,6 +579,11 @@ On formal occasions, you are announced as $PCTitle. <</if>> <</if>> +<<if $fakeNews == 1>> + The authenticity department produces and distributes copious amounts of plausible enough news and reports, @@.green;increasing your reputation@@ + <<set $repGain += 10 * $miniTruth>> +<</if>> + <<set $rep -= $repLoss>> <<set $rep += $repGain>> @@ -663,3 +668,9 @@ On formal occasions, you are announced as $PCTitle. The Societal Elite @@.red;mutter about you@@. <</if>> <</if>> + +<br><br> + +<<if $secExp == 1>> +<<include "authorityReport">> +<</if>> \ No newline at end of file diff --git a/src/uncategorized/rieEligibilityCheck.tw b/src/uncategorized/rieEligibilityCheck.tw index 696deb559aa6f9cfee077f7ecd592f2dff719038..a9ab2ad44b295079351ce0e6c1023f7088b5889c 100644 --- a/src/uncategorized/rieEligibilityCheck.tw +++ b/src/uncategorized/rieEligibilityCheck.tw @@ -16,7 +16,7 @@ <<if $hostageRescued == 1>> <<goto "P hostage acquisition">> <<elseif $eligibleSlaves.length == 0>> - <<goto "Next Week">> + <<goto "next week">> <<else>> <<goto "Random Individual Event">> <</if>> diff --git a/src/uncategorized/scheduledEvent.tw b/src/uncategorized/scheduledEvent.tw index fc8544edd9deacfdc071571e940e4f4250ec8362..938152fc3a7bae3c8c60e7c9aa90b4096beeb9c4 100644 --- a/src/uncategorized/scheduledEvent.tw +++ b/src/uncategorized/scheduledEvent.tw @@ -89,9 +89,13 @@ <<elseif $week == 90>> <<set $fcnn = ["FCNN service has been temporarily suspended. Please stand by."]>> <</if>> - +<<if $secExp == 1>> +<<include "attackGenerator">> +<</if>> <<if $rivalOwner == -1>> <<goto "P rival initiation">> +<<elseif $attackThisWeek == 1>> + <<goto attackOptions>> <<elseif $PC.labor == 1>> <<goto "SE Player Birth">> <<elseif ($independenceDay == 1) && (Math.trunc(($week-23)/52) == ($week-23)/52)>> diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw index e60b765e68412fe251eb5a9989a00930983fdb1c..81157b435a3e0f9669ede27addb2b1ddd692edde 100644 --- a/src/uncategorized/storyCaption.tw +++ b/src/uncategorized/storyCaption.tw @@ -196,6 +196,56 @@ <</if>> ($rep) </span> +<<if $secExp == 1>> +<br>@@.darkviolet;Auth@@ | +<<set $authority = Math.clamp(Math.trunc($authority), 0, 20000)>> +<span id="auth"> +<<if $authority > 19500>> + @@color:rgb(148, 0, 211);divine will@@ +<<elseif $authority > 19000>> + @@color:rgb(148, 0, 211);sovereign@@ +<<elseif $authority > 18000>> + @@color:rgb(148, 0, 211);monarch@@ +<<elseif $authority > 17000>> + @@color:rgb(148, 0, 211);tyrant@@ +<<elseif $authority > 15000>> + @@color:rgb(148, 0, 211);dictator@@ +<<elseif $authority > 14000>> + @@color:rgb(148, 0, 211);prince@@ +<<elseif $authority > 13000>> + @@color:rgb(183, 0, 211);master@@ +<<elseif $authority > 12000>> + @@color:rgb(183, 0, 211);leader@@ +<<elseif $authority > 11000>> + @@color:rgb(183, 0, 211);director@@ +<<elseif $authority > 10000>> + @@color:rgb(183, 0, 211);overseer@@ +<<elseif $authority > 9000>> + @@color:rgb(183, 0, 211);chief@@ +<<elseif $authority > 8000>> + @@color:rgb(183, 0, 211);manager@@ +<<elseif $authority > 7000>> + @@color:rgb(211,0,204);principal@@ +<<elseif $authority > 6000>> + @@color:rgb(211,0,204);auxiliary@@ +<<elseif $authority > 5000>> + @@color:rgb(211,0,204);subordinate@@ +<<elseif $authority > 4000>> + @@color:rgb(211,0,204);follower@@ +<<elseif $authority > 3000>> + @@color:rgb(211,0,204);powerless@@ +<<elseif $authority > 2000>> + @@color:rgb(211,0,204);toothless@@ +<<elseif $authority > 1000>> + @@color:rgb(211,0,204);mostly harmless@@ +<<else>> + @@color:rgb(211,0,204);harmless@@ +<</if>> +(<<print $authority>>) +</span> +<br>@@.deepskyblue;Security@@ | @@.deepskyblue;<<print Math.trunc($security)>>%@@ +<br>@@.orangered;Crime@@ | @@.orangered;<<print Math.trunc($crime)>>%@@ +<</if>> <<if (_Pass == "Main")>> <<if ($cheatMode) && ($cheatModeM)>> <<set _TRep = $rep>> @@ -380,6 +430,9 @@ <</if>> <br><span id="PAOButton"><<link [[Personal Assistant|Personal assistant options]]>><</link>></span> @@.cyan;[T]@@ <br><span id="policyButton"><<link [[Policies]]>><</link>></span> @@.cyan;[Y]@@ + <<if $secExp == 1>> + <br><<link [[Edicts|edicts]]>><</link>> + <</if>> <<if $FSAnnounced>> <br><span id="FSButton"><<link [[Future Societies|Future Society]]>><</link>></span> @@.cyan;[F]@@ <</if>> @@ -392,6 +445,17 @@ <br><br> <br><span id="managePenthouse"><<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>></span> @@.cyan;[P]@@ <br><span id="managePerson"><<link "Manage Personal Affairs">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Personal Affairs">><</link>></span> @@.cyan;[X]@@ + <<if $secExp == 1>> + <<if $propHub == 1>> + <br><<link "Manage Propaganda">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "propagandaHub">><</link>> + <</if>> + <<if $secHQ == 1>> + <br><<link "Manage Security">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "securityHQ">><</link>> + <</if>> + <<if $secBarracks == 1>> + <br><<link "Manage Military">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "secBarracks">><</link>> + <</if>> + <</if>> <<if $cyberMod != 0 && $researchLab.built == "true">> <br>[[Manage Research Lab|Research Lab][$temp = 0]] <</if>> @@ -399,8 +463,10 @@ <br><span id="SFMButton"><<link [[SF Barracks|SFM Barracks]]>><</link>></span> @@.cyan;[Z]@@ <</if>> <br><span id="PAOButton"><<link [[Personal Assistant|Personal assistant options]]>><</link>></span> @@.cyan;[T]@@ - <br> <br><span id="policyButton"><<link [[Policies]]>><</link>></span> @@.cyan;[Y]@@ + <<if $secEx == 1>> + <br><<link [[Edicts|edicts]]>><</link>> + <</if>> <<if $FSAnnounced>> <br><span id="FSButton"><<link [[Future Societies|Future Society]]>><</link>></span> @@.cyan;[F]@@ <</if>>