diff --git a/src/Corporation/Corporation.ts b/src/Corporation/Corporation.ts index 8241f0fef..20b043c29 100644 --- a/src/Corporation/Corporation.ts +++ b/src/Corporation/Corporation.ts @@ -199,6 +199,11 @@ export class Corporation { assetDelta = (this.totalAssets - this.previousTotalAssets) / corpConstants.secondsPerMarketCycle; // Handle pre-totalAssets saves assetDelta ??= this.revenue - this.expenses; + const numberOfOfficesAndWarehouses = [...this.divisions.values()] + .map( + (division: Division) => getRecordValues(division.offices).length + getRecordValues(division.warehouses).length, + ) + .reduce((sum: number, currentValue: number) => sum + currentValue, 0); if (this.public) { // Account for dividends if (this.dividendRate > 0) { @@ -206,14 +211,14 @@ export class Corporation { } val = this.funds + assetDelta * 85e3; - val *= Math.pow(1.1, this.divisions.size); + val *= Math.pow(Math.pow(1.1, 1 / 12), numberOfOfficesAndWarehouses); val = Math.max(val, 0); } else { val = 10e9 + this.funds / 3; if (assetDelta > 0) { val += assetDelta * 315e3; } - val *= Math.pow(1.1, this.divisions.size); + val *= Math.pow(Math.pow(1.1, 1 / 12), numberOfOfficesAndWarehouses); val -= val % 1e6; //Round down to nearest million } if (val < 10e9) val = 10e9; // Base valuation