[UI][QoL] Cursor defaults to Fight at the start of each new wave (#4666)

* cursors are dumb

* update

* fixed?

* maybe solution

* fix in!

* Possible cursor fixes

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
This commit is contained in:
Mumble 2024-10-22 13:05:37 -07:00 committed by GitHub
parent 181f59882a
commit 5e7f2042fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,6 +30,15 @@ export class CommandPhase extends FieldPhase {
start() { start() {
super.start(); super.start();
const commandUiHandler = this.scene.ui.handlers[Mode.COMMAND];
if (commandUiHandler) {
if (this.scene.currentBattle.turn === 1 || commandUiHandler.getCursor() === Command.POKEMON) {
commandUiHandler.setCursor(Command.FIGHT);
} else {
commandUiHandler.setCursor(commandUiHandler.getCursor());
}
}
if (this.fieldIndex) { if (this.fieldIndex) {
// If we somehow are attempting to check the right pokemon but there's only one pokemon out // If we somehow are attempting to check the right pokemon but there's only one pokemon out
// Switch back to the center pokemon. This can happen rarely in double battles with mid turn switching // Switch back to the center pokemon. This can happen rarely in double battles with mid turn switching