mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
Fix HP gaining logic from defense skill levels (#205)
This commit is contained in:
parent
b275f88053
commit
3ec4f0c98c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user