Skip to content

Commit

Permalink
small fix on set_char_hp_pp
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed Jan 21, 2024
1 parent 52a34d9 commit ac6cb4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/game_events/SetCharHPPPEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ export class SetCharHPPPEvent extends GameEvent {
if (this.value === "full") {
char.current_hp = char.max_hp;
} else if (_.isNumber(this.value) && (this.value as number) >= 0) {
char.current_hp = _.clamp(this.value as number, 0, char.max_hp);
char.current_hp = _.clamp(this.value as number, 0, char.max_hp) | 0;
}
} else if (this.points_type === points_types.PP) {
if (this.value === "full") {
char.current_pp = char.max_pp;
} else if (_.isNumber(this.value) && (this.value as number) >= 0) {
char.current_pp = _.clamp(this.value as number, 0, char.max_pp);
char.current_pp = _.clamp(this.value as number, 0, char.max_pp) | 0;
}
}
});
Expand Down

0 comments on commit ac6cb4d

Please sign in to comment.