Skip to content

Commit

Permalink
Modify Moon Ball patch to actually fix the issue
Browse files Browse the repository at this point in the history
The Moon Ball both uses the wrong item ID and checks the wrong memory
address. Modify the proposed patch to also correct the memory address
that the Moon Ball checks.
  • Loading branch information
SnorlaxMonster committed Aug 22, 2024
1 parent 746a06f commit e396b4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/bugs_and_glitches.md
Original file line number Diff line number Diff line change
Expand Up @@ -1100,10 +1100,16 @@ This can occur if your party and current PC box are both full when you start the

### Moon Ball does not boost catch rate

The Moon Ball checks the wrong memory address for the wrong item ID, so no Pokémon can receive the boost.

**Fix:** Edit `MoonBallMultiplier` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm):

```diff
-; BUG: Moon Ball does not boost catch rate (see docs/bugs_and_glitches.md)
inc hl
- inc hl
- inc hl

push bc
ld a, BANK("Evolutions and Attacks")
call GetFarByte
Expand All @@ -1113,6 +1119,7 @@ This can occur if your party and current PC box are both full when you start the
ret nz
```

Note that this fix only accounts for Pokémon that evolve via Moon Stone as their first evolution method. However, that is sufficient to cover all Pokémon in the game that can evolve by Moon Stone.

### Love Ball boosts catch rate for the wrong gender

Expand Down
2 changes: 1 addition & 1 deletion engine/items/item_effects.asm
Original file line number Diff line number Diff line change
Expand Up @@ -913,11 +913,11 @@ MoonBallMultiplier:
pop bc
ret nz

; BUG: Moon Ball does not boost catch rate (see docs/bugs_and_glitches.md)
inc hl
inc hl
inc hl

; BUG: Moon Ball does not boost catch rate (see docs/bugs_and_glitches.md)
push bc
ld a, BANK("Evolutions and Attacks")
call GetFarByte
Expand Down

0 comments on commit e396b4c

Please sign in to comment.