Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulate Gen 1 Fight Button for Wrap #2327

Merged
merged 9 commits into from
Mar 12, 2025
15 changes: 15 additions & 0 deletions play.pokemonshowdown.com/js/client-battle.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,10 @@
if (this.finalDecisionMove) {
moveMenu += '<em style="display:block;clear:both">You <strong>might</strong> have some moves disabled, so you won\'t be able to cancel an attack!</em><br/>';
}
if (curActive.maybeLocked) {
moveMenu += '<em style="display:block;clear:both">You <strong>might</strong> be locked into a move.</em><br/>';
moveMenu += '<button class="button" name="chooseFight">Check for Lock</button> (You won\'t be able to switch if locked.)<br/>';
}
moveMenu += '<div style="clear:left"></div>';

var moveControls = (
Expand Down Expand Up @@ -1060,6 +1064,9 @@
case 'shift':
buf += myPokemon[i].speciesForme + ' will shift position.<br />';
break;
case 'fight':
buf += myPokemon[i].speciesForme + ' is locked into a move.<br />';
break;
}
}
}
Expand Down Expand Up @@ -1296,6 +1303,14 @@
this.choice.choices[this.choice.choices.length - 1] += ' ' + posString;
this.chooseMove();
},
chooseFight: function () {
if (!this.choice) return;
this.tooltips.hideTooltip();

// TODO?: change this action
this.choice.choices.push('fight');
this.endChoice();
},
chooseShift: function () {
if (!this.choice) return;
this.tooltips.hideTooltip();
Expand Down