[UI] Avoid prematurely updating HP bar when applying damage (#6582)

Avoid prematurely updating HP bar when applying damage
This commit is contained in:
Dean 2025-09-20 20:24:50 -07:00 committed by GitHub
parent 87e6095a00
commit 25416ebf47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3942,11 +3942,6 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
damage = 0;
}
damage = this.damage(damage, ignoreSegments, 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);
/**