mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
Merge pull request #2487 from TheMas3212/fix-2127
update hp on gaining defense experience
This commit is contained in:
commit
eb57149a3f
@ -415,6 +415,9 @@ export function gainDefenseExp(this: IPlayer, exp: number): void {
|
||||
}
|
||||
|
||||
this.defense = calculateSkillF(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier);
|
||||
const ratio = this.hp / this.max_hp;
|
||||
this.max_hp = Math.floor(10 + this.defense / 10);
|
||||
this.hp = Math.round(this.max_hp * ratio);
|
||||
}
|
||||
|
||||
export function gainDexterityExp(this: IPlayer, exp: number): void {
|
||||
|
Loading…
Reference in New Issue
Block a user