Pokemon R/B/Y - Bide damage glitches
Glitch 1 (battle 1):
When Bide accumulates damage, it checks the memory addresses responsible from storing the last move's damage to check how much damage to add to the already accumulated by Bide. However, certain non-damaging moves (as well as switching out) do not clear the damage addresses, meaning that when they are used, Bide will accumulate damage from a previous attack, and will eventually deal more damage than it should have. The moves that do not clear the damage are:
- Conversion
- Haze
- Teleport
- Mist
- Focus Energy
- Confusion effect (e.g. Supersonic)
- Heal effect (e.g. Recover)
- Transform
- Light Screen
- Reflect
- Poison effect (e.g. Poisonpowder)
- Paralyze effect (e.g. Thunder Wave)
- Substitute
- Mimic
- Leech Seed
- Splash
In addition, because the damage isn't cleared after finishing or starting a battle either, it would be possible to have Bide unleash damage from a previous battle by accumulating it with one of these moves. This could also be used to lead a link battle to a desync.
Glitch 2 (battles 2 and 3):
If the enemy is using Bide and the player faints before the enemy unleashes energy, the two 8-bit addresses that store the accumulated Bide damage are cleared. On the other hand, if the player is using Bide and the enemy faints before the player unleases energy, only the most significant byte of the Bide damage is set to 0, meaning that the Bide damage stored may still remain any value up to 255.
When in a link battle, this oversight may cause the damage dealt by Bide to differ in the two games, even though no desync is triggered due to no additional random numbers being required. Still, if for example one Pokemon faints in one game but not in the other due to the difference in the damage dealt by Bide, desyncs and other weird stuff will begin to happen.