mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
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
This commit is contained in:
parent
fefc6341f6
commit
8cf7577ec7
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user