From 4fcb9856f0b30077eaa451556adae96794815ba3 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 28 Apr 2024 01:22:00 +0200 Subject: [PATCH] slight logic changes to fix party UI controls when battlerCount = 2 (double battle), starting in party slot 1 and pressing DOWN -> UP -> RIGHT would move the cursor back down when it should be moving it to the right: these changes fix that --- src/ui/party-ui-handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 30558b5bda0..14be7a17fad 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -392,13 +392,13 @@ export default class PartyUiHandler extends MessageUiHandler { success = this.setCursor(this.cursor < 6 ? this.cursor < slotCount - 1 ? this.cursor + 1 : 6 : 0); break; case Button.LEFT: - if (this.cursor >= this.scene.currentBattle.getBattlerCount() && this.cursor < 6) + if (this.cursor >= this.scene.currentBattle.getBattlerCount() && this.cursor <= 6) success = this.setCursor(0); break; case Button.RIGHT: const battlerCount = this.scene.currentBattle.getBattlerCount(); if (slotCount > battlerCount && this.cursor < battlerCount) - success = this.setCursor(this.lastCursor < 6 ? this.lastCursor || battlerCount : battlerCount); + success = this.setCursor(this.lastCursor < 6 || this.lastCursor ? battlerCount : battlerCount); break; } }