From 3ec4f0c98c7d5dc6e928197e61adb8eee631407d Mon Sep 17 00:00:00 2001 From: Matt Garretson Date: Wed, 9 Nov 2022 22:06:27 -0500 Subject: [PATCH] Fix HP gaining logic from defense skill levels (#205) --- src/PersonObjects/PersonMethods.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/PersonObjects/PersonMethods.ts b/src/PersonObjects/PersonMethods.ts index 9f2388075..94bd5e8d3 100644 --- a/src/PersonObjects/PersonMethods.ts +++ b/src/PersonObjects/PersonMethods.ts @@ -51,10 +51,8 @@ export function gainDefenseExp(this: Person, exp: number): void { this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier, ); const ratio = this.hp.current / this.hp.max; - this.hp = { - max: Math.floor(10 + this.skills.defense / 10), - current: Math.round(this.hp.max * ratio), - }; + this.hp.max = Math.floor(10 + this.skills.defense / 10); + this.hp.current = Math.round(this.hp.max * ratio); } export function gainDexterityExp(this: Person, exp: number): void {