From 37ebbd28d5ede3cf1a5ae90c7165d6153adeccc7 Mon Sep 17 00:00:00 2001 From: Franck TROUILLEZ <57403591+francktrouillez@users.noreply.github.com> Date: Sat, 25 May 2024 11:45:47 +0200 Subject: [PATCH] Apply offset to baseY as well during Pokemon#setMini (#1357) This fixes an issue where this.baseY and this.y were not sync anymore, leading to unexpected behavior while using both values, especially during the selectTargetPhase, where the UI was not working for the first player pokemon. --- src/ui/battle-info.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 01f183c49c8..7c981ab8c27 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -380,6 +380,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { if (this.player) { this.y -= 12 * (mini ? 1 : -1); + this.baseY = this.y; } const offsetElements = [ this.nameText, this.genderText, this.teraIcon, this.splicedIcon, this.shinyIcon, this.statusIndicator, this.levelContainer ];