From 264988d7b67e7a437aa3d1c0dedaad11b35223bf Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Thu, 14 May 2026 15:25:24 -0700 Subject: [PATCH] Fix gamepad A and B buttons to confirm highlighted answer on battle screen --- game.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game.js b/game.js index fabd23b..3818571 100644 --- a/game.js +++ b/game.js @@ -717,15 +717,17 @@ class Game { else if (s === 'title') { document.getElementById('screen-title')?.click(); } else if (s === 'continue') { document.getElementById('btn-continue-save')?.click(); } else if (s === 'intro') { this.advanceIntro(); } + else if (s === 'battle' && !this.state.answering) { this._confirmCursor(); } else if (s === 'result') { document.getElementById('btn-result-cont')?.click(); } else if (s === 'levelup') { document.getElementById('btn-lu-cont')?.click(); } else if (s === 'complete') { document.getElementById('btn-play-again')?.click(); } else { this._pressA(); } } - /* B */ + /* B — also confirms answer in battle */ if (justPressed(1)) { - if (s === 'intro') { this.advanceIntro(); } + if (s === 'battle' && !this.state.answering) { this._confirmCursor(); } + else if (s === 'intro') { this.advanceIntro(); } else if (s === 'result') { document.getElementById('btn-result-cont')?.click(); } else { this._pressB(); } }