Fix avatar hp not being set properly after a battle

This commit is contained in:
Melledy
2023-10-02 23:28:57 -07:00
parent 1e165ddde7
commit 94456d200e

View File

@@ -222,7 +222,7 @@ public class BattleService extends BaseGameService {
if (avatar == null) continue;
AvatarProperty prop = battleAvatar.getAvatarStatus();
int currentHp = (int) Math.round((prop.getLeftHp() / prop.getMaxHp()) * 100);
int currentHp = (int) Math.round((prop.getLeftHp() / prop.getMaxHp()) * 10000);
int currentSp = (int) prop.getLeftSp() * 100;
avatar.setCurrentHp(Math.max(currentHp, minimumHp));