Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1ef152f

Browse files
committedMar 7, 2025·
do it less stupid
1 parent 163d402 commit 1ef152f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed
 

‎play.pokemonshowdown.com/js/client-battle.js

+14-10
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,6 @@
585585

586586
this.finalDecisionMove = curActive.maybeDisabled || false;
587587
this.finalDecisionSwitch = curActive.maybeTrapped || false;
588-
this.finalDecisionPartiallyTrapped = curActive.maybePartiallyTrapped || false;
589-
this.finalDecisionPartiallyTrapping = curActive.maybePartiallyTrapping || false;
590588
for (var i = pos + 1; i < this.battle.nearSide.active.length; ++i) {
591589
var p = this.battle.nearSide.active[i];
592590
if (p && !p.fainted) {
@@ -679,8 +677,8 @@
679677
var name = move.name;
680678
var pp = moveData.pp + '/' + moveData.maxpp;
681679
if (!moveData.maxpp) pp = '&ndash;';
682-
if (move.id === 'Struggle' || move.id === 'Recharge' || move.id === 'Fight') pp = '&ndash;';
683-
if (move.id === 'Recharge' || move.id === 'Fight') move.type = '&ndash;';
680+
if (move.id === 'Struggle' || move.id === 'Recharge') pp = '&ndash;';
681+
if (move.id === 'Recharge') move.type = '&ndash;';
684682
if (name.substr(0, 12) === 'Hidden Power') name = 'Hidden Power';
685683
var moveType = this.tooltips.getMoveType(move, typeValueTracker)[0];
686684
var tooltipArgs = 'move|' + moveData.move + '|' + pos;
@@ -753,11 +751,9 @@
753751
if (this.finalDecisionMove) {
754752
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/>';
755753
}
756-
if (this.finalDecisionPartiallyTrapped) {
757-
moveMenu += '<em style="display:block;clear:both">You <strong>might</strong> be partially trapped, if you are still partially trapped then you might be unable to cancel attempting to attack!</em><br/>';
758-
}
759-
if (this.finalDecisionPartiallyTrapping) {
760-
moveMenu += '<em style="display:block;clear:both">You <strong>might</strong> be partially trapping, if you are still partially trapping then you might be unable to cancel attempting to attack!</em><br/>';
754+
if (curActive.maybeLocked) {
755+
moveMenu += '<em style="display:block;clear:both">You <strong>might</strong> be locked into a move.</em><br/>';
756+
moveMenu += '<button class="button" name="chooseFight">Check for Lock</button> (You won\'t be able to switch if locked.)<br/>';
761757
}
762758
moveMenu += '<div style="clear:left"></div>';
763759

@@ -1116,7 +1112,7 @@
11161112
}
11171113

11181114
this.choice = choiceText ? { waiting: true } : null;
1119-
this.finalDecision = this.finalDecisionMove = this.finalDecisionSwitch = this.finalDecisionPartiallyTrapped = this.finalDecisionPartiallyTrapping = false;
1115+
this.finalDecision = this.finalDecisionMove = this.finalDecisionSwitch = false;
11201116
this.request = request;
11211117
if (request.side) {
11221118
this.updateSideLocation(request.side);
@@ -1304,6 +1300,14 @@
13041300
this.choice.choices[this.choice.choices.length - 1] += ' ' + posString;
13051301
this.chooseMove();
13061302
},
1303+
chooseFight: function () {
1304+
if (!this.choice) return;
1305+
this.tooltips.hideTooltip();
1306+
1307+
// TODO?: change this action
1308+
this.choice.choices.push('move fight');
1309+
this.endChoice();
1310+
},
13071311
chooseShift: function () {
13081312
if (!this.choice) return;
13091313
this.tooltips.hideTooltip();

0 commit comments

Comments
 (0)
Please sign in to comment.