Credit to Crystal_ @ forums.glitchcity.info
Quoted from the source:
- When FIGHT is selected, the game parses all four PP slots, and if they are all zero, uses Struggle.
Normally, an empty move's PP slot is zero, but we will see that there can be an edge case...
- The active Pokémon is copied to a region of memory (so the game can use this instead having to constantly modify party data). For things such as HP, status, and PP, the game needs to also update the party data.
- There is one exception to this : when a Pokémon is under Transform, the party data must not be updated. For example, PP is not subtracted from the party data.
- When Mirror Move (or Metronome) is used, the game will decrement the PP of Mirror Move twice (once when it's actually used, and once when the move it represents is used). Thus, the game increments the PP of Mirror Move once, to compensate.
All of these make sense -- it's how the game works. But here's the catch : the "PP increment" function doesn't check for the Transformed status !
Here's how to trigger the glitch :
- Have any Pokémon with Transform (typically Ditto, but also Mew, or a Pokémon with Metronome) face against a Pokémon knowing Mirror Move or Metronome
- Transform into the Pokémon with Mirror Move;
- Use the move;
- The game will decrement Mirror Move's PP (but it won't because Transform);
- (If the move fails, nothing else happens);
- The game will increment Mirror Move's PP (thus, it will increment the PP in the corresponding slot);
- The game will decrement Mirror Move's PP (but it won't because Transform)
Thus, the game increments a move's PP in the Pokémon's data. If the move is present, then it will just have incremented it, no biggie.
If it's not, this creates a slot that is empty, but with non-zero PP ! Thus, the game fails to use Struggle.
Disable first checks if there is a slot with non-zero PP, and if this fails, misses. With a Struggle-less Pokémon, this will always succeed, because of the glitched slot.
Then, Disable will attempt to pick a slot which must have a move AND non-zero PP. Assuming Transform has 0 PP, the game will never find such a slot (since the only slot with non-zero PP has no move).
Bam, infinite loop, and softlock.