mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
update hp on gaining defense experience
This commit is contained in:
parent
0de588ee17
commit
ee181e1509
@ -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