aboutsummaryrefslogtreecommitdiffstats
path: root/home/pokemon.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2025-01-28 23:31:15 -0500
committerGitHub <noreply@github.com>2025-01-28 23:31:15 -0500
commitafb899016938d03911eaafb85c7caa1c67680210 (patch)
tree26e5d73301ab16e060c4a16171e0a5aa3c47d732 /home/pokemon.asm
parentComment on size of union (diff)
downloadpokeyellow-afb899016938d03911eaafb85c7caa1c67680210.tar.gz
pokeyellow-afb899016938d03911eaafb85c7caa1c67680210.tar.xz
pokeyellow-afb899016938d03911eaafb85c7caa1c67680210.zip
Miscellaneous cleanup (#488)
Co-authored-by: SatoMew <SatoMew@users.noreply.github.com>
Diffstat (limited to 'home/pokemon.asm')
-rw-r--r--home/pokemon.asm6
1 files changed, 5 insertions, 1 deletions
diff --git a/home/pokemon.asm b/home/pokemon.asm
index 7cc5f2d1..afa0d129 100644
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -114,7 +114,11 @@ LoadFrontSpriteByMonIndex::
cp NUM_POKEMON + 1
jr c, .validDexNumber ; dex >#151 invalid
.invalidDexNumber
- ld a, RHYDON ; $1
+ ; This is the so-called "Rhydon trap" or "Rhydon glitch"
+ ; to fail-safe invalid dex numbers
+ ; (see https://glitchcity.wiki/wiki/Rhydon_trap
+ ; or https://bulbapedia.bulbagarden.net/wiki/Rhydon_glitch)
+ ld a, RHYDON
ld [wCurPartySpecies], a
ret
.validDexNumber