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.
This commit is contained in:
Franck TROUILLEZ 2024-05-25 11:45:47 +02:00 committed by GitHub
parent d71451fc23
commit 37ebbd28d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -380,6 +380,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
if (this.player) { if (this.player) {
this.y -= 12 * (mini ? 1 : -1); 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 ]; const offsetElements = [ this.nameText, this.genderText, this.teraIcon, this.splicedIcon, this.shinyIcon, this.statusIndicator, this.levelContainer ];