mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
[UI] Avoid prematurely updating HP bar when applying damage (#6582)
Avoid prematurely updating HP bar when applying damage
This commit is contained in:
parent
87e6095a00
commit
25416ebf47
@ -3942,11 +3942,6 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
damage = 0;
|
damage = 0;
|
||||||
}
|
}
|
||||||
damage = this.damage(damage, ignoreSegments, isIndirectDamage, ignoreFaintPhase);
|
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
|
// Damage amount may have changed, but needed to be queued before calling damage function
|
||||||
damagePhase.updateAmount(damage);
|
damagePhase.updateAmount(damage);
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user