diff --git a/src/endWeek/economics/arcmgmt.js b/src/endWeek/economics/arcmgmt.js index 7e2699489718956930848620ded2f0cff3060c4d..d375d958b333d3b7d6003751f8f72c4c60647939 100644 --- a/src/endWeek/economics/arcmgmt.js +++ b/src/endWeek/economics/arcmgmt.js @@ -20,6 +20,7 @@ globalThis.arcmgmt = function() { let _percASlaves; let _rentMultiplier; let _AWeekGrowth; + let _econMult; if (V.useTabs === 0) { App.UI.DOM.appendNewElement("h2", el, "Arcology Management"); @@ -83,6 +84,13 @@ globalThis.arcmgmt = function() { V.GDP = Math.trunc(((V.NPCSlaves + V.menials) * 0.35 * _slaveProductivity) + (V.lowerClass * 0.35) + (V.middleClass * 0.75) + (V.upperClass * 2) + (V.topClass * 10)) / 10; + /* formula to calculate localEcon effect */ + if (V.localEcon >= 100) { + _econMult = (1 + 1.15 * (Math.trunc(1000-100000/200)/8.5)/100); + } else { + _econMult = (1/(1 + 5 * Math.sqrt(Math.trunc(100000/50-1000)/8.5)/100)); + } + if (!isFrozen()) { transport(); } else { @@ -1486,7 +1494,7 @@ globalThis.arcmgmt = function() { _honeymoon = 10 * V.arcologies[0].honeymoon; } const _oldVisitors = V.visitors; - V.visitors = Math.trunc(((V.arcologies[0].prosperity + _FSScore * 5 + _honeymoon) * _transportHub * _terrain * _crime) * (V.localEcon / 100)); + V.visitors = Math.trunc(((V.arcologies[0].prosperity + _FSScore * 5 + _honeymoon) * _transportHub * _terrain * _crime) * _econMult); if (V.visitors < 50) { V.visitors = normalRandInt(50, 2); } @@ -1539,7 +1547,7 @@ globalThis.arcmgmt = function() { V.lowerClass += _weeklyRetiredMenials + _weeklyRetiredNPCMenials; } /* Demand for simple labor*/ - _LSCD = Math.trunc((V.LSCBase * (V.localEcon / 100)) + (V.arcologies[0].prosperity * 4) + ((V.middleClass + V.visitors * 0.6) * 1.5) + ((V.upperClass + V.visitors * 0.2) * 3.5) + (V.topClass * 18)); + _LSCD = Math.trunc((V.LSCBase * _econMult) + (V.arcologies[0].prosperity * 4) + ((V.middleClass + V.visitors * 0.6) * 1.5) + ((V.upperClass + V.visitors * 0.2) * 3.5) + (V.topClass * 18)); /* Demand for owning slaves*/ _SCD = Math.trunc((V.upperClass * (2 + _slaveDemandU)) + (V.topClass * (12 + _slaveDemandT))); if (isNaN(_LSCD)) { @@ -1607,7 +1615,7 @@ globalThis.arcmgmt = function() { /* Lower Class Citizens*/ /* Work left for lower class citizens*/ - _LCD = Math.trunc(((V.LSCBase * (V.localEcon / 100)) + (V.arcologies[0].prosperity * 4) + _lowerClass + ((V.middleClass + V.visitors * 0.6) * 1.5) + ((V.upperClass + V.visitors * 0.2) * 3.5) + (V.topClass * 18) - (V.NPCSlaves + V.menials) * _slaveProductivity) * V.rentEffectL * _lowerClassP); + _LCD = Math.trunc(((V.LSCBase * _econMult) + (V.arcologies[0].prosperity * 4) + _lowerClass + ((V.middleClass + V.visitors * 0.6) * 1.5) + ((V.upperClass + V.visitors * 0.2) * 3.5) + (V.topClass * 18) - (V.NPCSlaves + V.menials) * _slaveProductivity) * V.rentEffectL * _lowerClassP); if (V.classSatisfied.lowerClass !== 0) { _LCD *= 1 + V.classSatisfied.lowerClass * 0.06; } @@ -1671,7 +1679,7 @@ globalThis.arcmgmt = function() { /* Middle Class Citizens*/ /* Demand for Middle Class*/ - _MCD = Math.trunc(((V.MCBase * (V.localEcon / 100)) + V.arcologies[0].prosperity + _middleClass + (V.NPCSlaves * 0.15) + (V.lowerClass * 0.1) + ((V.upperClass + V.visitors * 0.2) * 0.5) + (V.topClass * 2.5)) * V.rentEffectM * _middleClassP); + _MCD = Math.trunc(((V.MCBase * _econMult) + V.arcologies[0].prosperity + _middleClass + (V.NPCSlaves * 0.15) + (V.lowerClass * 0.1) + ((V.upperClass + V.visitors * 0.2) * 0.5) + (V.topClass * 2.5)) * V.rentEffectM * _middleClassP); if (V.classSatisfied.middleClass !== 0) { _MCD *= 1 + V.classSatisfied.middleClass * 0.06; } @@ -1709,7 +1717,7 @@ globalThis.arcmgmt = function() { /* Upper Class Citizens*/ /* Demand for Upper Class*/ - _UCD = Math.trunc(((V.UCBase * (V.localEcon / 100)) + (V.arcologies[0].prosperity * 0.2) + _upperClass + (V.NPCSlaves * 0.02) + (V.lowerClass * 0.025) + ((V.middleClass + V.visitors * 0.6) * 0.05) + (V.topClass * 0.3)) * V.rentEffectU * _upperClassP); + _UCD = Math.trunc(((V.UCBase * _econMult) + (V.arcologies[0].prosperity * 0.2) + _upperClass + (V.NPCSlaves * 0.02) + (V.lowerClass * 0.025) + ((V.middleClass + V.visitors * 0.6) * 0.05) + (V.topClass * 0.3)) * V.rentEffectU * _upperClassP); if (V.classSatisfied.upperClass !== 0) { _UCD *= 1 + V.classSatisfied.upperClass * 0.06; }