BUGFIX: Fix hidden debt of exp at level 1 (#1292)

This commit is contained in:
catloversg 2024-05-28 04:20:41 +07:00 committed by GitHub
parent efd4152eed
commit 70521c9156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -26,12 +26,25 @@ import { CONSTANTS } from "./Constants";
import { LogBoxClearEvents } from "./ui/React/LogBoxManager"; import { LogBoxClearEvents } from "./ui/React/LogBoxManager";
import { initCircadianModulator } from "./Augmentation/Augmentations"; import { initCircadianModulator } from "./Augmentation/Augmentations";
import { Go } from "./Go/Go"; import { Go } from "./Go/Go";
import { calculateExp } from "./PersonObjects/formulas/skill";
import { currentNodeMults } from "./BitNode/BitNodeMultipliers";
const BitNode8StartingMoney = 250e6; const BitNode8StartingMoney = 250e6;
function delayedDialog(message: string) { function delayedDialog(message: string) {
setTimeout(() => dialogBoxCreate(message), 200); 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 // Prestige by purchasing augmentation
export function prestigeAugmentation(): void { export function prestigeAugmentation(): void {
initBitNodeMultipliers(); initBitNodeMultipliers();
@ -96,7 +109,6 @@ export function prestigeAugmentation(): void {
} }
Player.reapplyAllAugmentations(); Player.reapplyAllAugmentations();
Player.reapplyAllSourceFiles(); Player.reapplyAllSourceFiles();
Player.hp.current = Player.hp.max;
staneksGift.prestigeAugmentation(); staneksGift.prestigeAugmentation();
@ -169,6 +181,8 @@ export function prestigeAugmentation(): void {
resetPidCounter(); resetPidCounter();
ProgramsSeen.clear(); ProgramsSeen.clear();
InvitationsSeen.clear(); InvitationsSeen.clear();
setInitialExpForPlayer();
} }
// Prestige by destroying Bit Node and gaining a Source File // Prestige by destroying Bit Node and gaining a Source File
@ -310,4 +324,6 @@ export function prestigeSourceFile(isFlume: boolean): void {
// Clear recent scripts // Clear recent scripts
recentScripts.splice(0, recentScripts.length); recentScripts.splice(0, recentScripts.length);
resetPidCounter(); resetPidCounter();
setInitialExpForPlayer();
} }