Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Berries don't work anymore (but they do work fine with Bug Bite!) #2448

Closed
eatthepear opened this issue Nov 10, 2022 · 12 comments
Closed

Berries don't work anymore (but they do work fine with Bug Bite!) #2448

eatthepear opened this issue Nov 10, 2022 · 12 comments
Labels
bug Bug status: confirmed This bug has been confirmed to exist in the codebase

Comments

@eatthepear
Copy link

I believe with the new fix to Bug Bite, berries in general are broken. I tried a battle with an enemy mon holding a Sitrus Berry, got it to less than half health. The message said "Foe Qwilfish's ???????? restored health!" then didn't restore any health. If someone else can confirm on a clean copy of the battle engine, that'd be great!

@BuffelSaft
Copy link
Collaborator

Unable to replicate this in a clean copy of upcoming:
sitrus
sitrus2

@AsparagusEduardo
Copy link
Collaborator

@eatthepear please describe the full situation in case you've encountered an edge case.

@eatthepear
Copy link
Author

I'm taking a look right now. So far it seems to be working sometimes and not others (it seems the item ID is copied from a different pokemon's itemID). It might be an issue on my end (like a faulty merge conflict or smthn) but will keep y'all updated.

@eatthepear
Copy link
Author

It might be a double battle / multi battle issue. In a standard double battle, I had both opponent's mons copying my left mon's item ID (it held a muscle band so the msg printed muscle band).

@eatthepear
Copy link
Author

seems to be an issue on my end (just tested in single battle, works incorrectly). I'll close this issue and open a new one if I'm unable to find a difference between rhh and my code.

@eatthepear
Copy link
Author

I tested on a clean copy of upcoming. Set lass Tiana to Roxanne's first gym party and gave her first Geodude a Sitrus Berry. My party was the CHEAT START party (lv 20 treecko leading with no item). When the Geodude fell below half HP, it said "Foe Geodude's ?????? restored health" and then didn't restore any health. The use item animation played. Very similar thing happened for her Nosepass holding an Oran Berry in the back.

@eatthepear
Copy link
Author

cleancopy

@eatthepear
Copy link
Author

playeritem
Player berries seem to work fine (need to still test for double battles).

@eatthepear
Copy link
Author

FOUND THE ISSUE
Ghoulslash most likely accidentally deleted a line while copy pasting functions. In ItemBattleEffects, in the ITEMEFFECT_MOVE_END case, there should be a gLastUsedItem = gBattleMons[battlerId].item; line that's missing! It shoudl just go right below the for loop, as so:
Capture

@eatthepear
Copy link
Author

If someone can test to make sure this works (i.e. both regular berry activations and bug bite activations work), that'd be great! (This would explain why the message is both playing the wrong thing, as well as the wrong item is set.)

@BuffelSaft
Copy link
Collaborator

Turns out the reason I couldn't replicate this was because I forgot to build the ROM after pulling upstream. Can confirm the bug.

@BuffelSaft BuffelSaft added bug Bug status: confirmed This bug has been confirmed to exist in the codebase labels Nov 11, 2022
@AsparagusEduardo
Copy link
Collaborator

#2451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug status: confirmed This bug has been confirmed to exist in the codebase
Projects
None yet
Development

No branches or pull requests

3 participants