Catch screen: remove ball count from throw button, map A=throw and B=run away
This commit is contained in:
1 parent
f7abc712d9
commit
fa331cb267
1 file changed
+3
-2
@@ -377,7 +377,7 @@ class Game {
|
|||||||
if (s === 'intro') { this.advanceIntro(); return; }
|
if (s === 'intro') { this.advanceIntro(); return; }
|
||||||
if (s === 'starter') { this.pickStarter(this._starterCursor||0); return; }
|
if (s === 'starter') { this.pickStarter(this._starterCursor||0); return; }
|
||||||
if (s === 'starter-confirm') { document.getElementById('btn-starter-continue')?.click(); return; }
|
if (s === 'starter-confirm') { document.getElementById('btn-starter-continue')?.click(); return; }
|
||||||
if (s === 'catch') { const btns = document.querySelectorAll('.catch-action-btn'); if (btns[this._catchCursor||0]) btns[this._catchCursor||0].click(); return; }
|
if (s === 'catch') { const btns = document.querySelectorAll('.catch-action-btn'); if (btns[0]) btns[0].click(); return; }
|
||||||
if (s === 'catch-result') { document.getElementById('btn-catch-continue')?.click(); return; }
|
if (s === 'catch-result') { document.getElementById('btn-catch-continue')?.click(); return; }
|
||||||
if (s === 'result') { document.getElementById('btn-result-cont')?.click(); return; }
|
if (s === 'result') { document.getElementById('btn-result-cont')?.click(); return; }
|
||||||
if (s === 'levelup') { document.getElementById('btn-lu-cont')?.click(); return; }
|
if (s === 'levelup') { document.getElementById('btn-lu-cont')?.click(); return; }
|
||||||
@@ -389,6 +389,7 @@ class Game {
|
|||||||
if (s === 'battle' && this.state.answering) { return; }
|
if (s === 'battle' && this.state.answering) { return; }
|
||||||
if (s === 'battle' && !this.state.answering) { this._confirmCursor(); return; }
|
if (s === 'battle' && !this.state.answering) { this._confirmCursor(); return; }
|
||||||
if (s === 'intro') { this.advanceIntro(); return; }
|
if (s === 'intro') { this.advanceIntro(); return; }
|
||||||
|
if (s === 'catch') { const btns = document.querySelectorAll('.catch-action-btn'); if (btns[1]) btns[1].click(); return; }
|
||||||
if (s === 'result') { document.getElementById('btn-result-cont')?.click(); return; }
|
if (s === 'result') { document.getElementById('btn-result-cont')?.click(); return; }
|
||||||
if (s === 'starter-confirm') { document.getElementById('btn-starter-continue')?.click(); return; }
|
if (s === 'starter-confirm') { document.getElementById('btn-starter-continue')?.click(); return; }
|
||||||
if (s === 'catch-result') { document.getElementById('btn-catch-continue')?.click(); return; }
|
if (s === 'catch-result') { document.getElementById('btn-catch-continue')?.click(); return; }
|
||||||
@@ -1303,7 +1304,7 @@ class Game {
|
|||||||
|
|
||||||
const throwBtn = document.createElement('button');
|
const throwBtn = document.createElement('button');
|
||||||
throwBtn.className = 'catch-action-btn btn-pixel btn-red';
|
throwBtn.className = 'catch-action-btn btn-pixel btn-red';
|
||||||
throwBtn.textContent = `⚪ THROW BALL (${this.state.pokeballs})`;
|
throwBtn.textContent = '⚪ THROW BALL';
|
||||||
throwBtn.disabled = this.state.pokeballs <= 0;
|
throwBtn.disabled = this.state.pokeballs <= 0;
|
||||||
if (this.state.pokeballs <= 0) throwBtn.style.opacity = '0.4';
|
if (this.state.pokeballs <= 0) throwBtn.style.opacity = '0.4';
|
||||||
throwBtn.addEventListener('click', () => this.throwPokeball(wild, canCatch));
|
throwBtn.addEventListener('click', () => this.throwPokeball(wild, canCatch));
|
||||||
|
|||||||
Reference in new issue
Block a user