Update battle-info inside pokemon#damageAndUpdate

This commit is contained in:
Sirz Benjie 2025-05-05 12:17:58 -05:00
parent 7547b37e85
commit 43353e27f3
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -4764,6 +4764,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
isIndirectDamage,
ignoreFaintPhase,
);
// Ensure the battle-info bar's HP is updated, though only if the battle info is visible
// TODO: When battle-info UI is refactored, make this only update the HP bar
if (this.battleInfo.visible) {
this.updateInfo();
}
// Damage amount may have changed, but needed to be queued before calling damage function
damagePhase.updateAmount(damage);
/**