From 4e07900c5a919be9e83d95c94cbc3bf0cd97186a Mon Sep 17 00:00:00 2001 From: omuretsu <84951833+Snarling@users.noreply.github.com> Date: Fri, 5 May 2023 23:22:54 -0400 Subject: [PATCH] Fix hacknet level base cost constant --- src/Hacknet/data/Constants.ts | 2 +- src/Hacknet/formulas/HacknetNodes.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hacknet/data/Constants.ts b/src/Hacknet/data/Constants.ts index db7b2f24f..140e72edc 100644 --- a/src/Hacknet/data/Constants.ts +++ b/src/Hacknet/data/Constants.ts @@ -2,7 +2,7 @@ export const HacknetNodeConstants = { MoneyGainPerLevel: 1.5, BaseCost: 1000, - LevelBaseCost: 1, + LevelBaseCost: 500, RamBaseCost: 30e3, CoreBaseCost: 500e3, diff --git a/src/Hacknet/formulas/HacknetNodes.ts b/src/Hacknet/formulas/HacknetNodes.ts index c4ac78a9a..b0dfb8440 100644 --- a/src/Hacknet/formulas/HacknetNodes.ts +++ b/src/Hacknet/formulas/HacknetNodes.ts @@ -24,11 +24,11 @@ export function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1 let totalMultiplier = 0; let currLevel = startingLevel; for (let i = 0; i < sanitizedLevels; ++i) { - totalMultiplier += HacknetNodeConstants.LevelBaseCost * Math.pow(mult, currLevel); + totalMultiplier += Math.pow(mult, currLevel); ++currLevel; } - return (HacknetNodeConstants.BaseCost / 2) * totalMultiplier * costMult; + return HacknetNodeConstants.LevelBaseCost * totalMultiplier * costMult; } export function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {