Pokemon R/B/Y/G/S - Reflect/Light Screen defensive stat overflow

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



Duration: 1:48
8,610 views
100


This glitch is present in both Generation I and Generation II, although it was fixed in Pokemon Crystal. You may already know the glitch in R/B/Y from this old video (https://www.youtube.com/watch?v=fVtO_DKxIsI).

During damage calculation, if either the attacker's offensive stat or the defender's defensive stat is 256 or higher, both stats are temporarily scaled (divided by 4) so that they can fit into a single byte and the highest byte can be ignored for simplicity.

However, Reflect and Light Screen do not cap the stat at 999 as they are only temporal boosts taken into account during damage calculation. If a Pokemon with 513 or higher defensive stat uses Reflect or Light Screen, the affected stat will become higher than 1024, which, divided by 4, is still over 8 bits long. The ninth bit will be ignored during damage calculation so the stat effectively becomes 256 points lower after scaling (or 1024 points lower before scaling).

If the stat is exactly 256 after scaling (1024 to 1027), it would become 0. In Pokemon Gold and Silver it's incremented to 1, but in R/B/Y it will lead to the game freezing while attempting to divide by 0 (See https://www.youtube.com/watch?v=fVtO_DKxIsI)







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