From e396b4c198a862b247974c334ed86b8040aa5563 Mon Sep 17 00:00:00 2001 From: SnorlaxMonster Date: Thu, 22 Aug 2024 22:31:50 +0930 Subject: [PATCH 1/2] Modify Moon Ball patch to actually fix the issue 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. --- docs/bugs_and_glitches.md | 7 +++++++ engine/items/item_effects.asm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 10ae14a7d61..a14fa0a88df 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -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 @@ -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 diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index f48395675aa..817b1c6806e 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -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 From efa2e5d55da0754a7feb2d2a57502de5a14d5287 Mon Sep 17 00:00:00 2001 From: Sylvie <35663410+Rangi42@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:59:31 -0400 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/bugs_and_glitches.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index a14fa0a88df..3ff088b30b1 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1106,7 +1106,7 @@ The Moon Ball checks the wrong memory address for the wrong item ID, so no Poké ```diff -; BUG: Moon Ball does not boost catch rate (see docs/bugs_and_glitches.md) - inc hl + inc hl - inc hl - inc hl @@ -1121,6 +1121,7 @@ The Moon Ball checks the wrong memory address for the wrong item ID, so no Poké 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 **Fix:** Edit `LoveBallMultiplier` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm):