From 101ea673b81099f6772887bdae6c06f84253711b Mon Sep 17 00:00:00 2001 From: hexall90 <hexall90@gmail.com> Date: Tue, 7 Nov 2017 17:40:24 +0100 Subject: [PATCH] working on weapon manufactoring --- TODO.txt | 5 -- src/SecExp/SecExpBackwardCompatibility.tw | 15 +++++ src/SecExp/attackReport.tw | 1 + src/SecExp/secInit.tw | 5 ++ src/SecExp/weaponsManufactoring.tw | 70 ++++++++++++++++++++++- src/uncategorized/manageArcology.tw | 8 ++- 6 files changed, 96 insertions(+), 8 deletions(-) diff --git a/TODO.txt b/TODO.txt index 1d5e18f4035..670cbd81d46 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,11 +4,6 @@ Main: Rebellions: -citizens mini events -add security maluses to losses --soldiers wages edict --privileges for soldiers edicts - -slave slodiers can hold property - -militia can avoid rent - -mercs can get battle loot further development: -specialized slave schools diff --git a/src/SecExp/SecExpBackwardCompatibility.tw b/src/SecExp/SecExpBackwardCompatibility.tw index 3fdac1289d0..75d6c0642e8 100644 --- a/src/SecExp/SecExpBackwardCompatibility.tw +++ b/src/SecExp/SecExpBackwardCompatibility.tw @@ -312,6 +312,21 @@ <<if ndef $brainImplantProject>> <<set $brainImplantProject = 0>> <</if>> +<<if ndef $weapHelots>> +<<set $weapHelots = 0>> +<</if>> +<<if ndef $weapProductivity>> +<<set $weapProductivity = 1>> +<</if>> +<<if ndef $weapLab>> +<<set $weapLab = 1>> +<</if>> +<<if ndef $baseUpgradeTime>> +<<set $baseUpgradeTime = 10>> +<</if>> +<<if ndef $weapUpgrades>> +<<set $weapUpgrades = []>> +<</if>. /* events */ <<if ndef $smilingManProgress>> diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw index a4860db8cf5..be604a80396 100644 --- a/src/SecExp/attackReport.tw +++ b/src/SecExp/attackReport.tw @@ -11,6 +11,7 @@ <</if>> <<set $totalKills += $enemyLosses>> <<set $losses = Math.trunc($losses)>> +<<set _loot = 0>> /* result */ <<if $majorBattle == 0>> diff --git a/src/SecExp/secInit.tw b/src/SecExp/secInit.tw index eb86b4110f5..96174c8afaa 100644 --- a/src/SecExp/secInit.tw +++ b/src/SecExp/secInit.tw @@ -125,6 +125,11 @@ <<set $advancedRiotEquip = 0>> <<set $brainImplant = -1>> <<set $brainImplantProject = 0>> +<<set $weapHelots = 0>> +<<set $weapProductivity = 1>> +<<set $weapLab = 1>> +<<set $baseUpgradeTime = 10>> +<<set $weapUpgrades = []>> /* events */ <<set $smilingManProgress = 0>> diff --git a/src/SecExp/weaponsManufactoring.tw b/src/SecExp/weaponsManufactoring.tw index ff62090a573..91e31cddd69 100644 --- a/src/SecExp/weaponsManufactoring.tw +++ b/src/SecExp/weaponsManufactoring.tw @@ -1 +1,69 @@ -:: weaponsManufactoring [nobr] \ No newline at end of file +:: weaponsManufactoring [nobr] + +This sector of the arcology has been dedicated to weapons manufactoring. These factories supply +<<if $militiaUnits.length > 0>> your militia and<</if>> +<<if $slaveUnits.length > 0>> your slave soldiers and<</if>> +<<if $mercenaries >0>> your mercenaries and<</if>> +many small old world nations as the advanced technology that free cities have available is hard to come by otherwise. +<br> +automation description +lab description +<br> +<<if $weapHelots> 0>>Assigned here are $weapHelots, working to produce as much equipment as possible<<else>>There are no assigned menial slaves here. The spaces is manned exclusively by low rank citizens.<</if>> +You own $helots free menial slaves. This manufactoring complex can house 500 at most, with <<print 500 - $weapHelots>> free slots. +<br> +<br> +<<if $weapProductivity < 5>> + <<link "Invest in automating the complex">> + <<set $weapProductivity++>> + <<set $cash -= 10000 * $weapProductivity>> + <<goto "weaponsManufactoring">> + <</link>> + //Will cost <<print 10000 * $weapProductivity>> and will increase the facility income as well as speed up upgrades// +<<else>> + You've automated the complex to the limit. +<</if>> +<br> +<<if $weapLab < 5>> + <<link "Invest in research and development">> + <<set $weapLab++>> + <<set $cash -= 10000 * $weapLab>> + <<goto "weaponsManufactoring">> + <</link>> + //Will cost <<print 10000 * $weapLab>> and will increase the facility income as well as unlock upgrades for our troops// +<<else>> + You have upgraded the research facilities of the complex to the limit. +<</if>> +<br> +<<set _time = $baseUpgradeTime / $weapProductivity>> +__Upgrades__: +<br> +/* Drones upgrades */ +<<if $secBotsBaseAttack == 7>> + <<link "Develop dynamic battle aware AI">> + <<set _ newUpgrade = { + unit: secBot, + type: attack, + time: _time, + value: 1}>> + <<set $weapUpgrades.push(_newUpgrade)>> + <</link>> + //Will take _time weeks to implement and will increase the base attack value of the security drones.// +<<elseif $weapLab >= 3 && $secBotsBaseDefense == 3>> + <<link "Develop adaptive armored frames">> + <<set _time = $baseUpgradeTime / $weapProductivity>> + <<set _ newUpgrade = { + unit: secBot, + type: defense, + time: _time, + value: 1}>> + <<set $weapUpgrades.push(_newUpgrade)>> + <</link>> + //Will take _time weeks to implement and will increase the base defense value of the security drones.// +<<elseif $secBotsBaseDefense == 3>> + Upgrade the research facility further to unlock more upgrades for the security drones. +<<else>> + You fully upgraded the security drones. +<</if>> +<br> +/* human troops upgrades upgrades */ \ No newline at end of file diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index 2eb231cf717..2b13dd38340 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -184,10 +184,14 @@ Your slaves have participated in approximately <<print $oralTotal+$vaginalTotal+ Your army counts <<print $militiaEmployedManpower + $slavesEmployedManpower + $mercEmployedManpower + $securityForcePersonnel>> total soldiers of which $securityForcePersonnel under the security force command and the rest under your direct control. <</if>> <<if $hasFoughtOnce == 1>> - Your troops were involved in <<print $battlesCount>> battles of which <<print $majorBattlesCount>> major engagements. You won <<print $PCvictories>> of them, while the enemy managed to gain the upper hand in the other <<print $PClosses>> kills. - During all battles you lost a total of <<print $militiaTotalCasualties + $slavesTotalCasualties + $mercTotalCasualties>> men, while scoring a total of <<print $totalKills>>. + Your troops were involved in <<print $battlesCount>> battles of which <<print $majorBattlesCount>> major engagements. You won <<print $PCvictories>> of them, while the enemy managed to gain the upper hand in the other <<print $PClosses>>. <</if>> +<<if $rebellionsCount >= 1>> + Your arcology was involved in <<print $rebellionsCount>> rebellions. You won <<print $PCrebWon>> of them, while the rebels defeated your forces in <<print $PCrebLoss>>. +<</if>> + +During all battles you lost a total of <<print $militiaTotalCasualties + $slavesTotalCasualties + $mercTotalCasualties>> men, while scoring a total of <<print $totalKills>>. <</if>> <br><br> -- GitLab