[Misc] Removed instance of find(() => true) from BattleInfo code

https://github.com/pagefaultgames/pokerogue/pull/6673
This commit is contained in:
Bertie690 2025-10-21 00:20:39 -04:00 committed by GitHub
parent bcc79a6118
commit 85fcb20271
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3150,8 +3150,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
const otherBattleInfo = globalScene.fieldUI
.getAll()
.slice(0, 4)
.filter(ui => ui instanceof BattleInfo && (ui as BattleInfo) instanceof PlayerBattleInfo === this.isPlayer())
.find(() => true);
.find(ui => ui instanceof BattleInfo && (ui as BattleInfo) instanceof PlayerBattleInfo === this.isPlayer());
if (!otherBattleInfo || !this.getFieldIndex()) {
globalScene.fieldUI.sendToBack(this.battleInfo);
globalScene.sendTextToBack(); // Push the top right text objects behind everything else