Catch rate glitches (Generation II): Difference between revisions
>Sherkel m (That sure is simpler!) |
>Bbbbbbbbba (→Attribution: I can't take the credit. The fix comes from the pret/pokecrystal repo, and I traced it back to this commit: https://github.com/pret/pokecrystal/commit/93e12d200300c7320640922fe6bcebe64f942eda#diff-14655d490f1f310e87e54b8d5e05ef10) |
||
Line 23: | Line 23: | ||
* [https://bulbapedia.bulbagarden.net/wiki/Catch_rate#Capture_method_.28Generation_II.29 Bulbapedia's article on catch rate] |
* [https://bulbapedia.bulbagarden.net/wiki/Catch_rate#Capture_method_.28Generation_II.29 Bulbapedia's article on catch rate] |
||
== |
==Attribution== |
||
* IIMarckus for discovery and |
* IIMarckus for discovery and PikalaxALT for the corrected code, in addition to everyone who helped with [https://github.com/pret/pokegold pokegold] and [https://github.com/pret/pokecrystal pokecrystal]. |
||
[[Category:Generation II glitches]] |
[[Category:Generation II glitches]] |
Revision as of 02:02, 1 March 2019
In Pokémon Gold, Silver and Crystal, a wild Pokémon's catch rate is not affected if it is burned, poisoned, or paralyzed, despite those conditions increasing catch rate in other generations and the code seeming to attempt to factor them in. Sleep and freeze still affect the catch rate as intended.
Explanation
The code for factoring status conditions into catch rate reads as follows:
ld b, a ld a, [WildPokemonStatus] and SLP|FRZ ld c, 10 jr nz, .done ; ld a, [wEnemyMonStatus] ; bugfix and a ld c, 5 jr nz, .done ld c, 0 .done
What the code does is set a value increasing catch rate (referred to as "a" in Bulbapedia's explanation, linked below) to 10 if the opponent is asleep or frozen, and do nothing otherwise. The next few lines are presumably intended to set the value to 5 if there is a different status condition present; however, since the value of register a
is already WildPokemonStatus & (SLP|FRZ)
, the second jr nz, .done
is never taken, and the value is set to 0 anyway.
Inserting the commented line would fix this glitch.
See also
Attribution
- IIMarckus for discovery and PikalaxALT for the corrected code, in addition to everyone who helped with pokegold and pokecrystal.