Update index.html
This commit is contained in:
parent
a246ee0ca6
commit
d78a11bce2
@ -351,8 +351,10 @@ body {
|
||||
characterProgress.style.strokeDashoffset = 251 - (251 * user.characterLevel / 100);
|
||||
|
||||
// Установка прогресса HP и Стамины
|
||||
const hpProgress = user.maxHp ? (user.hp / user.maxHp) * 100 : 0;
|
||||
const staminaProgress = user.maxStamina ? (user.stamina / user.maxStamina) * 100 : 0;
|
||||
let hpProgress = user.maxHp ? (user.hp / user.maxHp) * 100 : 0;
|
||||
let staminaProgress = user.maxStamina ? (user.stamina / user.maxStamina) * 100 : 0;
|
||||
if (hpProgress <= 0) hpProgress = 0;
|
||||
if (staminaProgress <= 0) staminaProgress = 0;
|
||||
|
||||
|
||||
document.getElementById("hp-bar").style.width = `${hpProgress}%`;
|
||||
|
Loading…
Reference in New Issue
Block a user