diff --git a/src/Corporation/corporate.js b/src/Corporation/corporate.js index 6dd9bac81255b60e1b2a5d8484776202cb1dc4eb..97d077d76c3ead4588be4fc426c7f5d6ac6e96a5 100644 --- a/src/Corporation/corporate.js +++ b/src/Corporation/corporate.js @@ -333,10 +333,7 @@ App.Corporate.Init = function() { const divisionOverhead = Object.values(this.maintenanceCategories).reduce((r, categoryLedger) => r + categoryLedger.cost, 0); const corpMaintInfo = App.Corporate.maintenance.corporate; let corpOverhead = Math.pow(Math.max(divCount - corpMaintInfo.freeDivisions, 0), 2) * corpMaintInfo.divisionCost; - let retval = divisionOverhead + corpOverhead; - if(App.Corporate.easyMode) { - retval /= 2; - } + let retval = (divisionOverhead + corpOverhead) * 1 - (5 - State.variables.difficulty) / 8; return Math.trunc(retval); } get canExpandNow() { return this._var.canExpandNow; } @@ -505,7 +502,6 @@ App.Corporate.Init = function() { founded: "Incorporated", hasMarket: "Market", payoutCash: "CashDividend", - easyMode: "Easy", canExpand: 'ExpandToken', } for(const property in propertyToStoryBool) { diff --git a/src/cheats/mod_EditArcologyCheat.tw b/src/cheats/mod_EditArcologyCheat.tw index be898de5ba80c00c7385b038ad5893ffa7dca16b..f234fe7979bfa6c4406a73855611ae9f314b7230 100644 --- a/src/cheats/mod_EditArcologyCheat.tw +++ b/src/cheats/mod_EditArcologyCheat.tw @@ -9,21 +9,21 @@ <</if>> <br><br>The economic situation is -<<if $economy > 125>> +<<if $difficulty == 1>> ''not truly dire. Not yet.'' //Very Easy// - <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 125]] -<<elseif $economy > 100>> + <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 125, $difficulty = 2]] +<<elseif $difficulty == 2>> ''getting a touch dire.'' //Easy// - <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 100]] | [[Easier|MOD_Edit Arcology Cheat][$economy = 200]] -<<elseif $economy > 80>> + <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 100, $difficulty = 3]] | [[Easier|MOD_Edit Arcology Cheat][$economy = 200, $difficulty = 1]] +<<elseif $difficulty == 3>> ''serious risks.'' //Default Difficulty// - <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 80]] | [[Easier|MOD_Edit Arcology Cheat][$economy = 125]] -<<elseif $economy > 67>> + <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 80, $difficulty = 4]] | [[Easier|MOD_Edit Arcology Cheat][$economy = 125, $difficulty = 2]] +<<elseif $difficulty == 4>> ''ugly.'' //Hard// - <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 67]] | [[Easier|MOD_Edit Arcology Cheat][$economy = 100]] + <br>[[Harder|MOD_Edit Arcology Cheat][$economy = 67, $difficulty = 5]] | [[Easier|MOD_Edit Arcology Cheat][$economy = 100, $difficulty = 3]] <<else>> ''this is the last dance.'' //Very Hard// - <br>[[Easier|MOD_Edit Arcology Cheat][$economy = 80]] + <br>[[Easier|MOD_Edit Arcology Cheat][$economy = 80, $difficulty = 4]] <</if>> <br>The economy is forecasted to <<if $difficultySwitch == 0>> diff --git a/src/events/intro/economyIntro.tw b/src/events/intro/economyIntro.tw index 6bce3ce2d2f011b84fd8f93931955d4473259614..406fc2d831bce8c08fd2b08f45a1c7b3bf8e1311 100644 --- a/src/events/intro/economyIntro.tw +++ b/src/events/intro/economyIntro.tw @@ -5,21 +5,21 @@ <<else>> It is the year 2037, and the past 21 years have not been kind. The world is starting to fall apart. The climate is deteriorating, resources are being exhausted, and there are more people to feed every year. Technology is advancing, but not fast enough to save everyone. @@.orange;Exactly how bad is the situation?@@ <br> - <<if $economy > 125>> + <<if $difficulty == 1>> <br>''Not truly dire. Not yet.'' //Very Easy// - <br>[[Harder|Economy Intro][$economy = 125]] - <<elseif $economy > 100>> + <br>[[Harder|Economy Intro][$economy = 125, $difficulty = 2]] + <<elseif $difficulty == 2>> <br>''Getting a touch dire.'' //Easy// - <br>[[Harder|Economy Intro][$economy = 100]] | [[Easier|Economy Intro][$economy = 200]] - <<elseif $economy > 80>> + <br>[[Harder|Economy Intro][$economy = 100, $difficulty = 3]] | [[Easier|Economy Intro][$economy = 200, $difficulty = 1]] + <<elseif $difficulty == 3>> <br>''Very serious.'' //Default Difficulty// - <br>[[Harder|Economy Intro][$economy = 80]] | [[Easier|Economy Intro][$economy = 125]] - <<elseif $economy > 67>> + <br>[[Harder|Economy Intro][$economy = 80, $difficulty = 4]] | [[Easier|Economy Intro][$economy = 125, $difficulty = 2]] + <<elseif $difficulty == 4>> <br>''It won't be pretty.'' //Hard// - <br>[[Harder|Economy Intro][$economy = 67]] | [[Easier|Economy Intro][$economy = 100]] + <br>[[Harder|Economy Intro][$economy = 67, $difficulty = 5]] | [[Easier|Economy Intro][$economy = 100, $difficulty = 3]] <<else>> <br>''This is the last dance.'' //Very Hard// - <br>[[Easier|Economy Intro][$economy = 80]] + <br>[[Easier|Economy Intro][$economy = 80, $difficulty = 4]] <</if>> /*Economy settings*/ diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index 8b787f4af70db3253243d44977be2a7b492739d6..7336c27581316f7212e579f78cdae25c8c7d53e2 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -24,17 +24,17 @@ You may review your settings before clicking "Continue" to begin. __''World Settings''__ <br> <<set $localEcon = $economy>> -<<options $economy>> +<<options $difficulty>> Economic climate: - <<option 200 "Very Easy">> + <<option 1 "Very Easy" "$economy = 200">> ''not truly dire. Not yet.'' //Very Easy// - <<option 125 "Easy">> + <<option 2 "Easy" "$economy = 125">> ''getting a touch dire.'' //Easy// - <<option 100 "Default Difficulty">> + <<option 3 "Default Difficulty" "$economy = 100">> ''serious risks.'' //Default Difficulty// - <<option 80 "Hard">> + <<option 4 "Hard" "$economy = 80">> ''ugly.'' //Hard// - <<option 67 "Very Hard">> + <<option 5 "Very Hard" "$economy = 67">> ''this is the last dance.'' //Very Hard// <</options>> <<if $difficultySwitch == 1>><<set $econAdvantage = -2>><</if>> @@ -71,11 +71,6 @@ Economic forecast: <<set $rulesCost = Math.trunc(10000/$economy)>> <<set $modCost = Math.trunc(5000/$economy)>> <<set $surgeryCost = Math.trunc(30000/$economy)>> -<<if $economy > 100>> - <<set $corpEasy = 1>> -<<else>> - <<set $corpEasy = 0>> -<</if>> <br> diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index e481f7ad4ef16df52155cd50c7a7ed7473da6589..8b61911ee52d52cf8d61b7a653bfb1dd02cce865 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -355,6 +355,7 @@ You should have received a copy of the GNU General Public License along with thi /* Pregmod specific */ <<set $economy = 100>> + <<set $difficulty = 3>> <<set $difficultySwitch = 0>> <<set $neighboringArcologies = 3>> <<set $newDescriptions = 0>> @@ -792,7 +793,6 @@ You should have received a copy of the GNU General Public License along with thi /*new corporation variables*/ <<set $newCorp = 1>> -<<set $corpEasy = 0>> <<set $vanillaShareSplit = 1>> <<set $corpEcon = 0>> <<set $corpCashDividend = 0>> diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 5a0079a59db2eece210eba507a3d917e754d1c55..f23f8e7c59b2c838bfc813090da2cb5b7912dd05 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -1628,6 +1628,19 @@ window.EconomyDatatypeCleanup = function EconomyDatatypeCleanup() { V.economy = Math.max(+V.economy, 20) || 100; V.difficultySwitch = Math.clamp(+V.difficultySwitch, 0, 1) || 0; + if (V.difficulty) { + V.difficulty = Math.clamp(+V.difficulty, 0, 5) || 3; + } else if ($economy > 125) { + V.difficulty = 1; + } else if ($economy > 100) { + V.difficulty = 2; + } else if ($economy > 80) { + V.difficulty = 3; + } else if ($economy > 67) { + V.difficulty = 4; + } else { + V.difficulty = 5; + } V.localEcon = Math.max(+V.localEcon, 20) || V.economy; V.econRate = Math.clamp(+V.econRate, 1, 4) || 2; V.slaveCostFactor = Math.max(+V.slaveCostFactor, 0) || 1; diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 5752692576adf7a5dd764dc15460a93b48818a2e..aebfe7beaa74d132febd9e9696de0de194893e17 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -1358,7 +1358,7 @@ window.repX = function(rep, what, who) { /* we don't want to curve startup or cheating.*/ V.lastWeeksRepIncome[what] += rep; } else if (typeof V.lastWeeksRepIncome[what] !== 'undefined') { - rep = Math.round(Math.pow(1000 * rep + Math.pow(V.rep, 2), 0.5) - V.rep) * (V.corpEasy + 1); + rep = Math.round(Math.pow(1000 * rep + Math.pow(V.rep, 2), 0.5) - V.rep); V.lastWeeksRepIncome[what] += rep; } else { V.lastWeeksRepErrors += `Unknown place "${what}" gained you ${rep}<br>`; diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 5b845129fc52ecdb09d8e467482e2cc5416a18b8..177f4644d74ccc0fe4017fab4a523a07d936d1d9 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -2778,12 +2778,8 @@ Setting missing global variables: <<if ndef $corpSpecRaces>> <<set $corpSpecRaces = []>> <</if>> -<<if ndef $corpEasy>> - <<if $economy > 100>> - <<set $corpEasy = 1>> - <<else>> - <<set $corpEasy = 0>> - <</if>> +<<if def $corpEasy>> + <<unset $corpEasy>> <</if>> <<set $dividendTimer = $dividendTimer || 13>> <<if ndef $corpEcon>> diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index 321d415a805a5e22b403bcf5b5ece924a234d885..5ff4f5dd30f62a05888f9e3da09bab17fa0f94ed 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -1244,6 +1244,7 @@ _percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>> <<set _rentMultiplier *= 1.05>> 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. <</if>> +<<set _rentMultiplier *= 1 + (5 - $difficulty) / 20>> <<set _rents = Math.trunc(($lowerClass * $LCRent + $middleClass * $MCRent + $upperClass * $UCRent + $topClass * $TCRent) * _rentMultiplier / 25)>> <<if !Number.isInteger(_rents)>> <br>@@.red;Error: rents is outside accepted range, please report this issue@@ diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index b6e2c24f28a5724ecf6df8573349deb3be942190..8d9cd8f44b82644d3584d210f4b4566896037f10 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -208,7 +208,7 @@ _percLowerClass = Math.trunc(($lowerClass / ($ACitizens + $ASlaves)) * 1000) / 1 _percMiddleClass = Math.trunc(($middleClass / ($ACitizens + $ASlaves)) * 1000) / 10, _percUpperClass = Math.trunc(($upperClass / ($ACitizens + $ASlaves)) * 1000) / 10, _percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>> -<br>Lower Class Citizens | $lowerClass | <<print _percLowerClass>>% | Rent @@.yellowgreen;<<print cashFormat($LCRent / 25)>>@@ +<br>Lower Class Citizens | $lowerClass | <<print _percLowerClass>>% | Rent @@.yellowgreen;<<print cashFormat($LCRent * (1 + (5 - $difficulty) / 20) / 25)>>@@ <<if $LCRent > 30>> //Very High// | [[Decrease|Manage Arcology][$LCRent = 30, $rentEffectL = 0.94]] <<elseif $LCRent > 20>> @@ -220,7 +220,7 @@ _percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>> <<else>> //Free// | [[Increase|Manage Arcology][$LCRent = 10, $rentEffectL = 1.04]] <</if>> -<br>Middle Class Citizens | $middleClass | <<print _percMiddleClass>>% | Rent @@.yellowgreen;<<print cashFormat($MCRent / 25)>>@@ +<br>Middle Class Citizens | $middleClass | <<print _percMiddleClass>>% | Rent @@.yellowgreen;<<print cashFormat($MCRent * (1 + (5 - $difficulty) / 20) / 25)>>@@ <<if $MCRent > 75>> //Very High// | [[Decrease|Manage Arcology][$MCRent = 75, $rentEffectM = 0.94]] <<elseif $MCRent > 50>> @@ -232,7 +232,7 @@ _percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>> <<else>> //Free// | [[Increase|Manage Arcology][$MCRent = 25, $rentEffectM = 1.04]] <</if>> -<br>Upper Class Citizens | $upperClass | <<print _percUpperClass>>% | Rent @@.yellowgreen;<<print cashFormat($UCRent / 25)>>@@ +<br>Upper Class Citizens | $upperClass | <<print _percUpperClass>>% | Rent @@.yellowgreen;<<print cashFormat($UCRent * (1 + (5 - $difficulty) / 20) / 25)>>@@ <<if $UCRent > 270>> //Very High// | [[Decrease|Manage Arcology][$UCRent = 270, $rentEffectU = 0.94]] <<elseif $UCRent > 180>> @@ -244,7 +244,7 @@ _percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>> <<else>> //Free// | [[Increase|Manage Arcology][$UCRent = 90, $rentEffectU = 1.04]] <</if>> -<br>Millionaires | $topClass | <<print _percTopClass>>% | Rent @@.yellowgreen;<<print cashFormat($TCRent / 25)>>@@ +<br>Millionaires | $topClass | <<print _percTopClass>>% | Rent @@.yellowgreen;<<print cashFormat($TCRent * (1 + (5 - $difficulty) / 10) / 25)>>@@ <<if $TCRent > 975>> //Very High// | [[Decrease|Manage Arcology][$TCRent = 975, $rentEffectT = 0.94]] <<elseif $TCRent > 650>> diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index e4a082b4f67ebcdea140f0cff381682b8cd010be..8a28f01321acec80ca09d638894a27e9d14bcbb5 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -386,6 +386,15 @@ This save was created using FC version $ver build $releaseID. <div class="subHeading"> ''Content'' </div> + <<options $difficulty>> + The difficulty setting is currently set to + <<option 1 "Very Easy">> + <<option 2 "Easy">> + <<option 3 "Default">> + <<option 4 "Hard">> + <<option 5 "Very Hard">> + <</options>> + <<options $seeExtreme>> Extreme content like amputation is currently <<option 1 "Enabled">> diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw index 95ea974133346388d320047646a07551398c1591..005f8e0e69637a6ea26cb7277fc9a90558cd4db4 100644 --- a/src/uncategorized/reputation.tw +++ b/src/uncategorized/reputation.tw @@ -103,8 +103,8 @@ On formal occasions, you are announced as $PCTitle. <<elseif $enduringRep > 2000>> However, you have been a figure of regard for long enough that some of your reputation has become permanent. <</if>> - <<if _repLoss > 500>> - <<set _repLoss = 500>> + <<if _repLoss > 500 * (1 - (5 - $difficulty) / 10)>> + <<set _repLoss = 500 * (1 - (5 - $difficulty) / 10)>> <<elseif _repLoss < 0>> <<set _repLoss = 0>> <</if>>