From 9801b93906befbd84cbf7dd333d59a95dd60ce0e Mon Sep 17 00:00:00 2001 From: vulcandth Date: Wed, 31 Aug 2022 00:43:12 -0500 Subject: [PATCH] Add Bug comment for fishing/surfing on NPCs Also this re-orders `FishFunction:` and `SurfFunction:` in the bug doc, since `SurfFunction:` is encountered in the file first. --- docs/bugs_and_glitches.md | 37 +++++++++++++++++++------------------ engine/events/overworld.asm | 1 + 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index e0e76147c..cf93dfd22 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1662,29 +1662,12 @@ This bug is why the Lapras in [maps/UnionCaveB2F.asm](https://github.com/pret/po **Fix**: Edit [engine/events/overworld.asm](https://github.com/pret/pokecrystal/blob/master/engine/events/overworld.asm): -```diff - FishFunction: - ... - - .TryFish: - ld a, [wPlayerState] - cp PLAYER_SURF - jr z, .fail - cp PLAYER_SURF_PIKA - jr z, .fail -+ call GetFacingObject -+ jr nc, .fail - call GetFacingTileCoord - call GetTileCollision - cp WATER_TILE - jr z, .facingwater -``` - ```diff SurfFunction: ... .TrySurf: +-; BUG: You can Surf and fish on top of NPCs (see docs/bugs_and_glitches.md) ld de, ENGINE_FOGBADGE call CheckBadge jr c, .nofogbadge @@ -1710,6 +1693,24 @@ This bug is why the Lapras in [maps/UnionCaveB2F.asm](https://github.com/pret/po ret ``` +```diff + FishFunction: + ... + + .TryFish: + ld a, [wPlayerState] + cp PLAYER_SURF + jr z, .fail + cp PLAYER_SURF_PIKA + jr z, .fail ++ call GetFacingObject ++ jr nc, .fail + call GetFacingTileCoord + call GetTileCollision + cp WATER_TILE + jr z, .facingwater +``` + ### Pokémon deposited in the Day-Care might lose experience diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 3b043ae86..9378766cf 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -344,6 +344,7 @@ SurfFunction: dw .AlreadySurfing .TrySurf: +; BUG: You can Surf and fish on top of NPCs (see docs/bugs_and_glitches.md) ld de, ENGINE_FOGBADGE call CheckBadge jr c, .nofogbadge