diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt index f0e1e92a9e73e1da7cba0f26865d7308bb427605..8f1186b094e7df8479a806c141d379f88b14df9d 100644 --- a/devNotes/Useful JS Function Documentation.txt +++ b/devNotes/Useful JS Function Documentation.txt @@ -346,4 +346,6 @@ UtilJS [script] removeDuplicates() - Takes an array and returns a new array without duplicate entries - HackingSkillMultiplier() - outputs a value based off of the PC's hacking skill. \ No newline at end of file + HackingSkillMultiplier() - outputs a value based off of the PC's hacking skill. + + upgradeMultiplierArcology() - outputs a value based off of the PC's engineering skill. diff --git a/src/events/intro/initNationalities.tw b/src/events/intro/initNationalities.tw index e4c1f257698a4d5a2336fbaac72fbb311d6b78c5..ed54a9c4fe997cd7e13325d014bff9c5682ba29e 100644 --- a/src/events/intro/initNationalities.tw +++ b/src/events/intro/initNationalities.tw @@ -26,7 +26,6 @@ <<set $trinkets.push("an artist's impression of an early arcology design")>> <<set $arcologyUpgrade.drones = 1, $arcologyUpgrade.hydro = 1>> <<set $secBots.active = 1, $secBots.troops = 30, $secBots.maxTroops = 30>> - <<set $upgradeMultiplierArcology = 0.6>> <<elseif $PC.career == "medicine">> <<set $trinkets.push("a framed postsurgical x-ray")>> <<set $surgeryCost = Math.trunc($surgeryCost/2)>> @@ -36,7 +35,6 @@ <<run repX(4000, "event")>> <<elseif $PC.career == "arcology owner">> <<set $trinkets.push("a miniature model of your first arcology")>> - <<set $upgradeMultiplierArcology = 0.8>> <<run repX(2000, "event")>> <<elseif $PC.career == "escort">> <<set $trinkets.push("a copy of the first porno you starred in")>> diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 752971d503bb5094c9839831dcd348fd34cbda57..17431b10bdaa9c0f91cba21be764550f6a9695a8 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -1732,3 +1732,34 @@ window.SkillIncrease = (function() { Entertain: EntertainSkillIncrease }; })(); + +window.upgradeMultiplierArcology = function() { + const V = State.variables; + if (V.PC.career === "engineer" || (V.arcologies[0].FSRestartDecoration >= 100 && V.eugenicsFullControl === 0) ) { + return 0.6; + } else if (V.PC.engineering <= -100) { + return 1.5; + } else if (V.PC.engineering <= -75) { + return 1.35; + } else if (V.PC.engineering <= -50) { + return 1.25; + } else if (V.PC.engineering <= -25) { + return 1.15; + } else if (V.PC.engineering < 0) { + return 1.10; + } else if (V.PC.engineering === 0) { + return 1; + } else if (V.PC.engineering <= 10) { + return 0.97; + } else if (V.PC.engineering <= 25) { + return 0.95; + } else if (V.PC.engineering <= 50) { + return 0.90; + } else if (V.PC.engineering <= 75) { + return 0.85; + } else if (V.PC.engineering < 100) { + return 0.83; + } else if (V.PC.engineering >= 100 || V.PC.career === "arcology owner") { + return 0.80; + } +}; \ No newline at end of file diff --git a/src/pregmod/eliteTakeOverResult.tw b/src/pregmod/eliteTakeOverResult.tw index dccc19a952106e372614f6ffa3b125d4573c667a..217375157a756110bad97acd413bc07e60455148 100644 --- a/src/pregmod/eliteTakeOverResult.tw +++ b/src/pregmod/eliteTakeOverResult.tw @@ -210,4 +210,4 @@ <</if>> /* clean up */ -<<set $failedElite = 0, $eugenicsFullControl = 1, $upgradeMultiplierArcology = 1>> +<<set $failedElite = 0, $eugenicsFullControl = 1>> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index df7d1e9163e1d5ecd2bc26e8e8944caf2838b5ac..d2603d3a4f614b47653513c3b0fc3cae9010bf00 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -2092,7 +2092,6 @@ Setting missing global variables: <<if ndef $trinkets>> <<set $trinkets = []>> - <<set $upgradeMultiplierArcology = 1>> <<set $upgradeMultiplierMedicine = 1>> <<if $PC.career == "wealth">> <<set $trinkets.push("a collection of diplomas from expensive schools")>> @@ -2104,7 +2103,6 @@ Setting missing global variables: <<set $trinkets.push("a framed picture of a slave with her sale price scrawled across the bottom")>> <<elseif $PC.career == "engineer">> <<set $trinkets.push("an artist's impression of an early arcology design")>> - <<set $upgradeMultiplierArcology = 0.6>> <<elseif $PC.career == "medicine">> <<set $trinkets.push("a framed postsurgical x-ray")>> <<set $upgradeMultiplierMedicine = 0.8>> @@ -3563,6 +3561,7 @@ Done! <</if>> <<set $HackingSkillMultiplier = HackingSkillMultiplier()>> +<<set $upgradeMultiplierArcology = upgradeMultiplierArcology()>> /* reset NaNArray after BC is run */ -<<set $NaNArray = findNaN()>> +<<set $NaNArray = findNaN()>> \ No newline at end of file diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index 755f3ae730b60212efec12788c39065972d0665b..64b03fe8c148bf095b275a50d8cd198ef5184e78 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -1,6 +1,7 @@ :: Next Week [nobr] <<set $HackingSkillMultiplier = HackingSkillMultiplier()>> +<<set $upgradeMultiplierArcology = upgradeMultiplierArcology()>> <<if $rivalOwner != 0>> <<set _rival = $arcologies.find(function(s) { return s.rival == 1; })>>