From a0606a53ae2079289237ce700ceec0601ded3119 Mon Sep 17 00:00:00 2001 From: xangelo Date: Fri, 18 Aug 2023 14:38:28 -0400 Subject: [PATCH] fix: missing % from player bar --- src/server/views/player-bar.ts | 2 +- src/shared/player.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/views/player-bar.ts b/src/server/views/player-bar.ts index 3b57789..d02ea68 100644 --- a/src/server/views/player-bar.ts +++ b/src/server/views/player-bar.ts @@ -75,7 +75,7 @@ function progressBar(current: number, max: number, id: string, opts: ProgressBar } return `
${current}/${max} - ${percent}
`; +title="${percent}% - ${current}/${max}">${current}/${max} - ${percent}%`; } export function renderPlayerBar(player: Player, inventory: EquippedItemDetails[]): string { diff --git a/src/shared/player.ts b/src/shared/player.ts index e3af5f7..ca94496 100644 --- a/src/shared/player.ts +++ b/src/shared/player.ts @@ -26,7 +26,7 @@ export type PlayerWithSkills = Player & { } export function maxHp(constitution: number, playerLevel: number): number { - return Math.ceil((constitution + (playerLevel * 1.3)) * 1.7); + return Math.ceil((constitution * 1.7) + (playerLevel * 1.3)); } export function expToLevel(level: number): number { -- 2.25.1