Skip to content

Commit 8123977

Browse files
Karthik99999shrianshChari
authored andcommitted
Fix tooltips getting cleared when using switch moves (smogon#2251)
1 parent 279253c commit 8123977

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

play.pokemonshowdown.com/src/battle.ts

+4
Original file line numberDiff line numberDiff line change
@@ -3362,6 +3362,10 @@ export class Battle {
33623362
case 'upkeep': {
33633363
this.usesUpkeep = true;
33643364
this.updateTurnCounters();
3365+
// Prevents getSwitchedPokemon from skipping over a Pokemon that switched out mid turn (e.g. U-turn)
3366+
for (const side of this.sides) {
3367+
side.lastPokemon = null;
3368+
}
33653369
break;
33663370
}
33673371
case 'turn': {

0 commit comments

Comments
 (0)