Add explanatory comment

This commit is contained in:
Sirz Benjie 2025-05-05 13:23:40 -05:00
parent 54162151fa
commit da51b1848f
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -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;