|
683 | 683 | var moveType = this.tooltips.getMoveType(move, typeValueTracker)[0];
|
684 | 684 | var tooltipArgs = 'move|' + moveData.move + '|' + pos;
|
685 | 685 | if (moveData.disabled) {
|
686 |
| - movebuttons += '<button disabled class="has-tooltip" data-tooltip="' + BattleLog.escapeHTML(tooltipArgs) + '">'; |
| 686 | + movebuttons += '<button disabled class="movebutton has-tooltip" data-tooltip="' + BattleLog.escapeHTML(tooltipArgs) + '">'; |
687 | 687 | } else {
|
688 |
| - movebuttons += '<button class="type-' + moveType + ' has-tooltip" name="chooseMove" value="' + (i + 1) + '" data-move="' + BattleLog.escapeHTML(moveData.move) + '" data-target="' + BattleLog.escapeHTML(moveData.target) + '" data-tooltip="' + BattleLog.escapeHTML(tooltipArgs) + '">'; |
| 688 | + movebuttons += '<button class="movebutton type-' + moveType + ' has-tooltip" name="chooseMove" value="' + (i + 1) + '" data-move="' + BattleLog.escapeHTML(moveData.move) + '" data-target="' + BattleLog.escapeHTML(moveData.target) + '" data-tooltip="' + BattleLog.escapeHTML(tooltipArgs) + '">'; |
689 | 689 | hasMoves = true;
|
690 | 690 | }
|
691 | 691 | movebuttons += name + '<br /><small class="type">' + (moveType ? Dex.types.get(moveType).name : "Unknown") + '</small> <small class="pp">' + pp + '</small> </button> ';
|
|
714 | 714 | var tooltipArgs = classType + 'move|' + baseMove.id + '|' + pos;
|
715 | 715 | if (specialMove.id.startsWith('gmax')) tooltipArgs += '|' + specialMove.id;
|
716 | 716 | var isDisabled = specialMoves[i].disabled ? 'disabled="disabled"' : '';
|
717 |
| - movebuttons += '<button ' + isDisabled + ' class="type-' + moveType + ' has-tooltip" name="chooseMove" value="' + (i + 1) + '" data-move="' + BattleLog.escapeHTML(specialMoves[i].move) + '" data-target="' + BattleLog.escapeHTML(specialMoves[i].target) + '" data-tooltip="' + BattleLog.escapeHTML(tooltipArgs) + '">'; |
| 717 | + movebuttons += '<button ' + isDisabled + ' class="movebutton type-' + moveType + ' has-tooltip" name="chooseMove" value="' + (i + 1) + '" data-move="' + BattleLog.escapeHTML(specialMoves[i].move) + '" data-target="' + BattleLog.escapeHTML(specialMoves[i].target) + '" data-tooltip="' + BattleLog.escapeHTML(tooltipArgs) + '">'; |
718 | 718 | var pp = curActive.moves[i].pp + '/' + curActive.moves[i].maxpp;
|
719 | 719 | if (canZMove) {
|
720 | 720 | pp = '1/1';
|
|
749 | 749 | moveMenu += '<br /><label class="megaevo"><input type="checkbox" name="terastallize" /> Terastallize<br />' + Dex.getTypeIcon(canTerastallize) + '</label>';
|
750 | 750 | }
|
751 | 751 | if (this.finalDecisionMove) {
|
752 |
| - 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/>'; |
| 752 | + moveMenu += '<em class="movewarning">You <strong>might</strong> have some moves disabled, so you won\'t be able to cancel an attack!</em>'; |
| 753 | + } |
| 754 | + if (curActive.maybeLocked) { |
| 755 | + moveMenu += '<em class="movewarning">You <strong>might</strong> be locked into a move. <button class="button" name="chooseFight">Try Fight button</button> (prevents switching if you\'re locked)</em>'; |
753 | 756 | }
|
754 | 757 | moveMenu += '<div style="clear:left"></div>';
|
755 | 758 |
|
|
777 | 780 | } else {
|
778 | 781 | switchMenu += this.displayParty(switchables, trapped);
|
779 | 782 | if (this.finalDecisionSwitch && this.battle.gen > 2) {
|
780 |
| - switchMenu += '<em style="display:block;clear:both">You <strong>might</strong> be trapped, so you won\'t be able to cancel a switch!</em><br/>'; |
| 783 | + switchMenu += '<em class="movewarning">You <strong>might</strong> be trapped, so you won\'t be able to cancel a switch!</em>'; |
781 | 784 | }
|
782 | 785 | }
|
783 | 786 | var switchControls = (
|
|
1060 | 1063 | case 'shift':
|
1061 | 1064 | buf += myPokemon[i].speciesForme + ' will shift position.<br />';
|
1062 | 1065 | break;
|
| 1066 | + case 'testfight': |
| 1067 | + buf += myPokemon[i].speciesForme + ' is locked into a move.<br />'; |
| 1068 | + break; |
1063 | 1069 | }
|
1064 | 1070 | }
|
1065 | 1071 | }
|
|
1296 | 1302 | this.choice.choices[this.choice.choices.length - 1] += ' ' + posString;
|
1297 | 1303 | this.chooseMove();
|
1298 | 1304 | },
|
| 1305 | + chooseFight: function () { |
| 1306 | + if (!this.choice) return; |
| 1307 | + this.tooltips.hideTooltip(); |
| 1308 | + |
| 1309 | + // TODO?: change this action |
| 1310 | + this.choice.choices.push('testfight'); |
| 1311 | + this.endChoice(); |
| 1312 | + }, |
1299 | 1313 | chooseShift: function () {
|
1300 | 1314 | if (!this.choice) return;
|
1301 | 1315 | this.tooltips.hideTooltip();
|
|
0 commit comments