update hp on gaining defense experience

This commit is contained in:
TheMas3212 2022-01-09 12:57:46 +11:00
parent 0de588ee17
commit ee181e1509
No known key found for this signature in database
GPG Key ID: 62A173A4FDA683CA

@ -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 {