Fix fusion move learning bug and inaccurate HP in battle info

This commit is contained in:
Flashfyre committed 2024-04-11 20:40:16 -04:00
1 parent 3e9fdc2d0a
commit 3961550f62
5 files changed
+30 -17

No files matched your search

+2 -2
View File
@@ -193,7 +193,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
this.updateBossSegmentDividers(pokemon as EnemyPokemon);
}
this.hpBar.setScale(pokemon.getHpRatio(), 1);
this.hpBar.setScale(pokemon.getHpRatio(true), 1);
this.lastHpFrame = this.hpBar.scaleX > 0.5 ? 'high' : this.hpBar.scaleX > 0.25 ? 'medium' : 'low';
this.hpBar.setFrame(this.lastHpFrame);
if (this.player)
@@ -356,7 +356,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
this.scene.tweens.add({
targets: this.hpBar,
ease: 'Sine.easeOut',
scaleX: pokemon.getHpRatio(),
scaleX: pokemon.getHpRatio(true),
duration: duration,
onUpdate: () => {
if (this.player && this.lastHp !== pokemon.hp) {