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

AI switching can cause a Player mon to turn into a bad egg #2672

Closed
Land0fChocolate opened this issue Feb 9, 2023 · 12 comments
Closed

AI switching can cause a Player mon to turn into a bad egg #2672

Land0fChocolate opened this issue Feb 9, 2023 · 12 comments
Labels
status: needs information Further information is requested status: unconfirmed This bug has not been reproduced yet

Comments

@Land0fChocolate
Copy link

Land0fChocolate commented Feb 9, 2023

A Pokemon in the Player's party may turn into a bad egg and it probably has to do with the AI switching.

I've managed to reproduce the bug with these steps:
1.Fight Cooltrainer Wendy
2.Use Marshtomp to faint her first Pokemon
3.Switch out Marshtomp for Crobat right after she sends out her second Pokemon (turn 2).
4.Look at party menu again. Pokemon in slot 4 is now a bad egg. Pokemon in slot 3 also has bugged HP.

pokeemerald.-.VisualBoyAdvance-M.2.1.4.2023-02-09.20-57-34.mp4

This are the details for Trainer Wendy in src/data/trainers.h:

[TRAINER_WENDY] =
    {
        .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET,
        .trainerClass = TRAINER_CLASS_COOLTRAINER,
        .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_COOL,
        .trainerPic = TRAINER_PIC_COOLTRAINER_F,
        .trainerName = _("Wendy"),
        .items = {ITEM_NONE, ITEM_NONE, ITEM_NONE, ITEM_NONE},
        .doubleBattle = FALSE,
        .aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_SETUP_FIRST_TURN,
        .partySize = ARRAY_COUNT(sParty_Wendy),
        .party = {.NoItemCustomMoves = sParty_Wendy},
    },

-If Crobat is moved to other slots except 3, and you switch with Crobat then slot 4 Pokemon turns into a bad egg. If Crobat is moved to slot 3, no bad eggs are made.
-If switch with Crobat on first turn, no issues.
-If switch to any other Pokemon instead of Crobat, no issues.
-Adding 3 more Pokemon to Wendy’s party changes nothing.
-Changing up Wendy’s party (so that Roselia is in slot 5) changes nothing.
-Changing the Pokemon in front from Marshtomp to something else doesn’t result in a bad egg. The HP bug still happens though.

Reverting this PR #2226 seemed to fix the bad egg bug.

@SBird1337 SBird1337 added status: needs information Further information is requested status: unconfirmed This bug has not been reproduced yet labels Feb 9, 2023
@DizzyEggg
Copy link
Collaborator

@Land0fChocolate Couldn't reproduce on master. Could you try to reproduce the issue on a clean upcoming or master branch?

@Land0fChocolate
Copy link
Author

Land0fChocolate commented Mar 2, 2023

I can't reproduce this on master either. I cannot be sure that there isn't something incompatible on my end that is causing the bug.

If nobody else is getting bad eggs or ? HP bars then may as well close this.

@AaghatIsLive
Copy link

got a similar bug from the battle tent,

Screenshot 2023-04-16 170318

@AsparagusEduardo
Copy link
Collaborator

got a similar bug from the battle tent,

What version are you using?

@AaghatIsLive
Copy link

What version are you using?

I am on upcoming, my last pull had #2898 as the latest commit.

@Jaizu
Copy link

Jaizu commented Apr 16, 2023

MGBA has an option to rewind, I'm pretty sure some emulators might have this too. Having that enabled might help to record this issue if it happens again in the future.
Also, afaik, this couldn't be reproduced on vanilla RHH, so taking this issue with a grant of salt.

@AsparagusEduardo
Copy link
Collaborator

Hmm, we need more info, like what Pokémon/Moves the opponent had. This is reminding me of the Beat Up issue we had a bit back.

@AaghatIsLive
Copy link

In the battle tent it happens even if you forfeit the match and it doesn't always happen. Now that you mention it could be a specific mon, I'll do some testing...

@Bassoonian
Copy link
Collaborator

Is this still reproduceable in 1.7?

@AlexOn1ine
Copy link
Collaborator

Is this still reproduceable in 1.7?

Nobody knows xD

It's a very hard issue to reproduce.

@DizzyEggg
Copy link
Collaborator

I would close this issue once #3277 is fixed. And then re-open or submit a new if it still happens.

@Bassoonian
Copy link
Collaborator

(Presumably) fixed by #3784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs information Further information is requested status: unconfirmed This bug has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

8 participants