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

Add warning for the Gen 1 Fight Button #2327

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions play.pokemonshowdown.com/js/client-battle.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@

this.finalDecisionMove = curActive.maybeDisabled || false;
this.finalDecisionSwitch = curActive.maybeTrapped || false;
this.finalDecisionPartiallyTrapped = curActive.maybePartiallyTrapped || false;
this.finalDecisionPartiallyTrapping = curActive.maybePartiallyTrapping || false;
for (var i = pos + 1; i < this.battle.nearSide.active.length; ++i) {
var p = this.battle.nearSide.active[i];
if (p && !p.fainted) {
Expand Down Expand Up @@ -677,8 +679,8 @@
var name = move.name;
var pp = moveData.pp + '/' + moveData.maxpp;
if (!moveData.maxpp) pp = '&ndash;';
if (move.id === 'Struggle' || move.id === 'Recharge') pp = '&ndash;';
if (move.id === 'Recharge') move.type = '&ndash;';
if (move.id === 'Struggle' || move.id === 'Recharge' || move.id === 'Fight') pp = '&ndash;';
if (move.id === 'Recharge' || move.id === 'Fight') move.type = '&ndash;';
if (name.substr(0, 12) === 'Hidden Power') name = 'Hidden Power';
var moveType = this.tooltips.getMoveType(move, typeValueTracker)[0];
var tooltipArgs = 'move|' + moveData.move + '|' + pos;
Expand Down Expand Up @@ -751,6 +753,12 @@
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 (this.finalDecisionPartiallyTrapped) {
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/>';
}
if (this.finalDecisionPartiallyTrapping) {
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/>';
}
moveMenu += '<div style="clear:left"></div>';

var moveControls = (
Expand Down Expand Up @@ -1108,7 +1116,7 @@
}

this.choice = choiceText ? { waiting: true } : null;
this.finalDecision = this.finalDecisionMove = this.finalDecisionSwitch = false;
this.finalDecision = this.finalDecisionMove = this.finalDecisionSwitch = this.finalDecisionPartiallyTrapped = this.finalDecisionPartiallyTrapping = false;
this.request = request;
if (request.side) {
this.updateSideLocation(request.side);
Expand Down