From da51b1848fb965f9d0c70ed1a8a0ce6c62400c49 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Mon, 5 May 2025 13:23:40 -0500 Subject: [PATCH] Add explanatory comment --- src/ui/battle-info.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 3cb751ce68b..839f0d62819 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -727,6 +727,8 @@ export default class BattleInfo extends Phaser.GameObjects.Container { }, onComplete: () => { updateHpFrame(); + // If, after tweening, the hp is different from the original (due to rounding), force the hp number display + // to update to the correct value. if (this.player && this.lastHp !== pokemon.hp) { this.setHpNumbers(pokemon.hp, pokemon.getMaxHp()); this.lastHp = pokemon.hp;