Fix fusion move learning bug and inaccurate HP in battle info
This commit is contained in:
1 parent
3e9fdc2d0a
commit
3961550f62
5 files changed
+30
-17
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user