diff --git a/play.pokemonshowdown.com/js/client-battle.js b/play.pokemonshowdown.com/js/client-battle.js index 144da9e043..2f6a3b0991 100644 --- a/play.pokemonshowdown.com/js/client-battle.js +++ b/play.pokemonshowdown.com/js/client-battle.js @@ -683,9 +683,9 @@ var moveType = this.tooltips.getMoveType(move, typeValueTracker)[0]; var tooltipArgs = 'move|' + moveData.move + '|' + pos; if (moveData.disabled) { - movebuttons += ' '; @@ -714,7 +714,7 @@ var tooltipArgs = classType + 'move|' + baseMove.id + '|' + pos; if (specialMove.id.startsWith('gmax')) tooltipArgs += '|' + specialMove.id; var isDisabled = specialMoves[i].disabled ? 'disabled="disabled"' : ''; - movebuttons += ' (prevents switching if you\'re locked)'; } moveMenu += '
'; @@ -777,7 +780,7 @@ } else { switchMenu += this.displayParty(switchables, trapped); if (this.finalDecisionSwitch && this.battle.gen > 2) { - switchMenu += 'You might be trapped, so you won\'t be able to cancel a switch!
'; + switchMenu += 'You might be trapped, so you won\'t be able to cancel a switch!'; } } var switchControls = ( @@ -1060,6 +1063,9 @@ case 'shift': buf += myPokemon[i].speciesForme + ' will shift position.
'; break; + case 'testfight': + buf += myPokemon[i].speciesForme + ' is locked into a move.
'; + break; } } } @@ -1296,6 +1302,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('testfight'); + this.endChoice(); + }, chooseShift: function () { if (!this.choice) return; this.tooltips.hideTooltip(); diff --git a/play.pokemonshowdown.com/src/panel-battle.tsx b/play.pokemonshowdown.com/src/panel-battle.tsx index aa10abc546..1a11fc0aba 100644 --- a/play.pokemonshowdown.com/src/panel-battle.tsx +++ b/play.pokemonshowdown.com/src/panel-battle.tsx @@ -199,7 +199,9 @@ class BattleDiv extends preact.Component { function MoveButton(props: { children: string, cmd: string, moveData: { pp: number, maxpp: number }, type: Dex.TypeName, tooltip: string, }) { - return ; diff --git a/play.pokemonshowdown.com/style/client.css b/play.pokemonshowdown.com/style/client.css index a74db06434..72a8e14448 100644 --- a/play.pokemonshowdown.com/style/client.css +++ b/play.pokemonshowdown.com/style/client.css @@ -1802,7 +1802,7 @@ a.ilink.yours { background: #009AA4; } -.movemenu button { +.movebutton { float: left; display: block; width: 155px; @@ -1812,15 +1812,15 @@ a.ilink.yours { position: relative; padding: 6px 4px 0 4px; } -.movemenu button small { +.movebutton small { color: #777777; } -.movemenu button small.type { +.movebutton small.type { padding-top: 3px; float: left; font-size: 8pt; } -.movemenu button small.pp { +.movebutton small.pp { padding-top: 2px; float: right; font-size: 8pt; @@ -1849,6 +1849,12 @@ a.ilink.yours { background: #E5E5E5; color: black; } +.movewarning { + clear: both; + display: block; + font-size: 10pt; + padding: 8px 0 5px; +} .allyparty, .switchmenu, .movemenu { @@ -1858,7 +1864,7 @@ a.ilink.yours { } .allyparty button, .switchmenu button, -.movemenu button { +.movebutton { position: relative; outline: none; text-align: center; @@ -1876,16 +1882,16 @@ a.ilink.yours { } .allyparty button:hover, .switchmenu button:hover, -.movemenu button:hover { +.movebutton:hover { background: #cfcfcf; background: linear-gradient(to bottom, #f2f2f2, #cfcfcf); border-color: #606060; } .allyparty button:active, .switchmenu button:active, -.movemenu button:active, +.movebutton:active, .switchmenu button.pressed, -.movemenu button.pressed { +.movebutton.pressed { background: linear-gradient(to bottom, #cfcfcf, #f2f2f2); } @@ -1893,7 +1899,7 @@ a.ilink.yours { .allyparty button:disabled, .switchmenu button.disabled, .switchmenu button:disabled, -.movemenu button:disabled { +.movebutton:disabled { cursor: default; background: #F3F3F3 !important; border-color: #CCCCCC !important; diff --git a/play.pokemonshowdown.com/style/client2.css b/play.pokemonshowdown.com/style/client2.css index 9f1654f6f1..c4af2abde1 100644 --- a/play.pokemonshowdown.com/style/client2.css +++ b/play.pokemonshowdown.com/style/client2.css @@ -1696,7 +1696,7 @@ a.ilink.yours { background: #009AA4; } -.movemenu button { +.movebutton { float: left; display: block; width: 155px; @@ -1706,15 +1706,15 @@ a.ilink.yours { position: relative; padding: 6px 4px 0 4px; } -.movemenu button small { +.movebutton small { color: #777777; } -.movemenu button small.type { +.movebutton small.type { padding-top: 3px; float: left; font-size: 8pt; } -.movemenu button small.pp { +.movebutton small.pp { padding-top: 2px; float: right; font-size: 8pt; @@ -1757,7 +1757,7 @@ a.ilink.yours { padding-left: 4px; } .switchmenu button, -.movemenu button { +.movebutton { position: relative; outline: none; text-align: center; @@ -1774,21 +1774,21 @@ a.ilink.yours { background: linear-gradient(to bottom, #f6f6f6, #e3e3e3); } .switchmenu button:hover, -.movemenu button:hover { +.movebutton:hover { background: #cfcfcf; background: linear-gradient(to bottom, #f2f2f2, #cfcfcf); border-color: #606060; } .switchmenu button:active, -.movemenu button:active, +.movebutton:active, .switchmenu button.pressed, -.movemenu button.pressed { +.movebutton.pressed { background: linear-gradient(to bottom, #cfcfcf, #f2f2f2); } .switchmenu button.disabled, .switchmenu button:disabled, -.movemenu button:disabled { +.movebutton:disabled { cursor: default; background: #F3F3F3 !important; border-color: #CCCCCC !important;