Fix HP gaining logic from defense skill levels (#205)

This commit is contained in:
Matt Garretson 2022-11-09 22:06:27 -05:00 committed by GitHub
parent b275f88053
commit 3ec4f0c98c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,10 +51,8 @@ export function gainDefenseExp(this: Person, exp: number): void {
this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier, this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier,
); );
const ratio = this.hp.current / this.hp.max; const ratio = this.hp.current / this.hp.max;
this.hp = { this.hp.max = Math.floor(10 + this.skills.defense / 10);
max: Math.floor(10 + this.skills.defense / 10), this.hp.current = Math.round(this.hp.max * ratio);
current: Math.round(this.hp.max * ratio),
};
} }
export function gainDexterityExp(this: Person, exp: number): void { export function gainDexterityExp(this: Person, exp: number): void {