Note that if the Special stat of the Pokémon last battled happened to be in between 200 and 255, the player will instead encounter an enemy trainer, as trainer IDs are stored on the same table as Pokémon IDs.
After closing the menu, the game will immediately start a battle due to the game being in a state where it is constantly attempting to display enemy trainer text and start a battle, and ends up generating a battle with a wild Pokémon based on the Special stat of the Pokémon last battled and at a level based on the attack stage modifier of the Pokémon last battled. This pre-battle text is text using the textbox ID of the most recently seen textbox, which if doing a textbook Mew glitch is the start menu seen when the player goes to Fly to Lavender Town to go back to Route 8, resulting the Start menu popping up on its own this is good, as the Start menu is always safe to have pop up this way. Should the player return to the same location or floor as the Long-Range Trainer, the game will go to display the pre-battle text and start the battle.
If there is no space for the sprite to walk up to, then the game gets stuck in a loop that prevents the battle from occurring and the player from regaining control.Īfterwards, the player will regain full control and be able to access the menu at will. This is because the game is in a state where it is waiting for the trainer that is currently being engaged to finish moving so it can display their text and start the battle. Additionally, this Trainer must walk up to the player (have at least 1 tile in between the player and trainer) they cannot be talked to directly or walked immediately in front of to initiate the battle, or the game will soft lock. This is because the game requires the value that contains the ID of the enemy trainer in the overworld or the unmodified special stat of the enemy Pokémon to not be 0 if it is to start a battle, and at this point the game is in a state where the start menu is disabled and the A and B buttons only work for using the PC, making it impossible to talk to anyone or use moves outside of battle.
The player must then battle a Trainer (not just a wild Pokémon, as this does not properly reset the values set upon flying away from the trainer to ones that do not cause issues) in between the escape and the final encounter, otherwise no encounter will appear. Specifically, the map script of the route the player left is set to a value where the game is constantly trying to display pre-battle text and start a battle. This causes the game to believe that the player is starting a battle when they are actually not, causing various values to be read improperly and creating the core of the glitch. If the player uses Fly or a similar move or item, then the player will be spotted by the Long-Range Trainer before the player flies away from them. For that first frame, the player can still bring up the start menu and use any Field move or items from their bag. For Long-Range Trainers, this causes their line of sight to point south for the first frame, before correcting to their intended direction. When the game draws any NPC on the screen, that NPC is first placed in their default direction (south) for one frame, before being updated to face their correct direction. These Trainers are nicknamed "Long-Range Trainers" due to the long distance that they can spot the player being defined as the maximum allowed by the game and will spot the player the moment that they appear on screen in the Trainer's line of sight. The Trainer-Fly glitch is caused by encountering a Trainer that can battle the player at any point in the Trainer's line of sight and escaping from them. The Mew glitch works by exploiting a separate glitch called the Trainer-Fly glitch. 3.4.4.2 No Trainers to escape from at all.3.4.4.1 One long-range Trainer remaining.3.4.2 Mew glitch without a long-range Trainer.