Fix hacknet level base cost constant

This commit is contained in:
omuretsu 2023-05-05 23:22:54 -04:00
parent ebae35b1fb
commit 4e07900c5a
2 changed files with 3 additions and 3 deletions

@ -2,7 +2,7 @@ export const HacknetNodeConstants = {
MoneyGainPerLevel: 1.5,
BaseCost: 1000,
LevelBaseCost: 1,
LevelBaseCost: 500,
RamBaseCost: 30e3,
CoreBaseCost: 500e3,

@ -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 {