Pokemon R/B/Y - Level 1 / 171 Psywave infinite loop

Channel:
Subscribers:
12,800
Published on ● Video Link: https://www.youtube.com/watch?v=VyIFL_-l2o4



Duration: 1:15
5,170 views
92


In the first generation, Psywave deals damage equal to a number randomly generated between 1 and aproximately 1'5 * attacker's level.

When Psywave is used, the game generates a random 1-byte number (between 0 and 255) and loops until the number generated follows these two conditions:
- It's not 0, if it's the player turn
- It's lower than [attacker's level + attacker's level/2], rounded down.

If the level is 1, the 0 number is ignored as a result of the first condition and all the remaining numbers are ignored as a result of the second condition, causing the game to loop indefinitely hopelessly searching for a number it can't find.

If the level is 171, the sum 171 + 171/2 gives out a result of exactly 256; since it has to fit in one byte, 256 rolls over to 0... meaning that the non-0 condition alone causes the infinite loop.







Tags:
pokemon corruptions
missingno
glitch pokemon
pannenkoek
pokemon pyrite
pokemon red glitch
glitch city
Crystal_
pokemon yellow glitch
pokemon glitches
chickasaurusgl
pokemon speedrun
thezzazzglitch
pokemon mechanics
pokemon beta
gameboy
arbitrary code execution
mew glitch
arbitrary code
credits warp
8f glitch
pokemon glitch
pokemon assembly
coin case glitch
pokemon gameboy
celebi glitch
pokemon hacks
pokemon secrets
pokemon hack
pokemon crystal