ref: b17db9b8b5939d41dbe7d35d2f5c54cf82e0c59d
parent: 7350c3708fc2463e1eb6024c03de5c85b50aa38f
author: Remy Oukaour <[email protected]>
date: Thu Dec 14 09:18:33 EST 2017
Friend Ball happiness for boxed Pokémon is not a bug
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -20,7 +20,6 @@
- [Moon Ball does not boost catch rate](#moon-ball-does-not-boost-catch-rate)
- [Love Ball boosts catch rate for the wrong gender](#love-ball-boosts-catch-rate-for-the-wrong-gender)
- [Fast Ball only boosts catch rate for three Pokémon](#fast-ball-only-boosts-catch-rate-for-three-pokémon)
-- [Friend Ball catches sent to the PC overwrite the wrong Pokémon's happiness](#friend-ball-catches-sent-to-the-pc-overwrite-the-wrong-pokémons-happiness)
- [Dragon Scale, not Dragon Fang, boosts Dragon-type moves](#dragon-scale-not-dragon-fang-boosts-dragon-type-moves)
- [Daisy's massages don't always increase happiness](#daisys-massages-dont-always-increase-happiness)
- [Magikarp in Lake of Rage are shorter, not longer](#magikarp-in-lake-of-rage-are-shorter-not-longer)
@@ -531,23 +530,6 @@
```
**Fix:** Change `jr nz, .next` to `jr nz, .loop`.
-
-
-## Friend Ball catches sent to the PC overwrite the wrong Pokémon's happiness
-
-This is a bug with `PokeBall` in [items/item_effects.asm](items/item_effects.asm):
-
-```asm
- ld a, [CurItem]
- cp FRIEND_BALL
- jr nz, .SkipBoxMonFriendBall
- ; Bug: overwrites the happiness of the first mon in the box!
- ld a, FRIEND_BALL_HAPPINESS
- ld [sBoxMon1Happiness], a
-.SkipBoxMonFriendBall:
-```
-
-`sBoxMon1Happiness` is written *before* the Friend Ball Pokémon is deposited.
## Dragon Scale, not Dragon Fang, boosts Dragon-type moves
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -634,7 +634,7 @@
ld a, [CurItem]
cp FRIEND_BALL
jr nz, .SkipBoxMonFriendBall
- ; Bug: overwrites the happiness of the first mon in the box!
+ ; The captured mon is now first in the box
ld a, FRIEND_BALL_HAPPINESS
ld [sBoxMon1Happiness], a
.SkipBoxMonFriendBall: