From 70521c91567d3624991ce32b843cc409042f3676 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Tue, 28 May 2024 04:20:41 +0700 Subject: [PATCH] BUGFIX: Fix hidden debt of exp at level 1 (#1292) --- src/Prestige.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Prestige.ts b/src/Prestige.ts index 4aacc3c67..fa88ac974 100644 --- a/src/Prestige.ts +++ b/src/Prestige.ts @@ -26,12 +26,25 @@ import { CONSTANTS } from "./Constants"; import { LogBoxClearEvents } from "./ui/React/LogBoxManager"; import { initCircadianModulator } from "./Augmentation/Augmentations"; import { Go } from "./Go/Go"; +import { calculateExp } from "./PersonObjects/formulas/skill"; +import { currentNodeMults } from "./BitNode/BitNodeMultipliers"; const BitNode8StartingMoney = 250e6; function delayedDialog(message: string) { setTimeout(() => dialogBoxCreate(message), 200); } +function setInitialExpForPlayer() { + Player.exp.hacking = calculateExp(1, Player.mults.hacking * currentNodeMults.HackingLevelMultiplier); + Player.exp.strength = calculateExp(1, Player.mults.strength * currentNodeMults.StrengthLevelMultiplier); + Player.exp.defense = calculateExp(1, Player.mults.defense * currentNodeMults.DefenseLevelMultiplier); + Player.exp.dexterity = calculateExp(1, Player.mults.dexterity * currentNodeMults.DexterityLevelMultiplier); + Player.exp.agility = calculateExp(1, Player.mults.agility * currentNodeMults.AgilityLevelMultiplier); + Player.exp.charisma = calculateExp(1, Player.mults.charisma * currentNodeMults.CharismaLevelMultiplier); + Player.updateSkillLevels(); + Player.hp.current = Player.hp.max; +} + // Prestige by purchasing augmentation export function prestigeAugmentation(): void { initBitNodeMultipliers(); @@ -96,7 +109,6 @@ export function prestigeAugmentation(): void { } Player.reapplyAllAugmentations(); Player.reapplyAllSourceFiles(); - Player.hp.current = Player.hp.max; staneksGift.prestigeAugmentation(); @@ -169,6 +181,8 @@ export function prestigeAugmentation(): void { resetPidCounter(); ProgramsSeen.clear(); InvitationsSeen.clear(); + + setInitialExpForPlayer(); } // Prestige by destroying Bit Node and gaining a Source File @@ -310,4 +324,6 @@ export function prestigeSourceFile(isFlume: boolean): void { // Clear recent scripts recentScripts.splice(0, recentScripts.length); resetPidCounter(); + + setInitialExpForPlayer(); }