From e946701689b39ba14002a62962afd8212a325dd4 Mon Sep 17 00:00:00 2001 From: zaccie Date: Mon, 21 Apr 2025 01:21:07 +1200 Subject: [PATCH] Revert "[Bug] order of operations in creating bosses battleInfo levelContainer" This reverts commit d0d85a0b0cc52637c0d09ac17e7c43a59765ea4f. --- src/ui/battle-info.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index c591ff90ecf..4f9e59c8c89 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -193,7 +193,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { this.hpNumbersContainer.setName("container_hp"); this.add(this.hpNumbersContainer); - const expBar = globalScene.add.image(-96, 17, "overlay_exp"); + const expBar = globalScene.add.image(-98, 18, "overlay_exp"); expBar.setName("overlay_exp"); expBar.setOrigin(0); this.add(expBar); @@ -202,7 +202,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { expMaskRect.setScale(6); expMaskRect.fillStyle(0xffffff); expMaskRect.beginPath(); - expMaskRect.fillRect(126, 125, 85, 1); + expMaskRect.fillRect(127, 126, 85, 2); const expMask = expMaskRect.createGeometryMask(); @@ -557,16 +557,14 @@ export default class BattleInfo extends Phaser.GameObjects.Container { this.ownedIcon, this.championRibbon, this.statusIndicator, + this.levelContainer, this.statValuesContainer, ].map(e => (e.x += 48 * (boss ? -1 : 1))); - this.hpBar.x += 51 * (boss ? -1 : 1); + this.hpBar.x += 38 * (boss ? -1 : 1); this.hpBar.y += 2 * (this.boss ? -1 : 1); this.hpBar.setTexture(`overlay_hp${boss ? "_boss" : ""}`); this.box.setTexture(this.getTextureName()); this.statsBox.setTexture(`${this.getTextureName()}_stats`); - //level container padding - this.levelContainer.x += -16; - this.levelContainer.y += 0; } this.bossSegments = boss ? pokemon.bossSegments : 0;