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.
This commit is contained in:
vulcandth 2022-08-31 00:43:12 -05:00
parent b764a3a84d
commit 9801b93906
2 changed files with 20 additions and 18 deletions

View File

@ -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): **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 ```diff
SurfFunction: SurfFunction:
... ...
.TrySurf: .TrySurf:
-; BUG: You can Surf and fish on top of NPCs (see docs/bugs_and_glitches.md)
ld de, ENGINE_FOGBADGE ld de, ENGINE_FOGBADGE
call CheckBadge call CheckBadge
jr c, .nofogbadge jr c, .nofogbadge
@ -1710,6 +1693,24 @@ This bug is why the Lapras in [maps/UnionCaveB2F.asm](https://github.com/pret/po
ret 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 ### Pokémon deposited in the Day-Care might lose experience

View File

@ -344,6 +344,7 @@ SurfFunction:
dw .AlreadySurfing dw .AlreadySurfing
.TrySurf: .TrySurf:
; BUG: You can Surf and fish on top of NPCs (see docs/bugs_and_glitches.md)
ld de, ENGINE_FOGBADGE ld de, ENGINE_FOGBADGE
call CheckBadge call CheckBadge
jr c, .nofogbadge jr c, .nofogbadge