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

[ROMAER] Potential HP and Status issue #5805

Open
AlexOn1ine opened this issue Dec 13, 2024 · 8 comments · May be fixed by #6366
Open

[ROMAER] Potential HP and Status issue #5805

AlexOn1ine opened this issue Dec 13, 2024 · 8 comments · May be fixed by #6366
Labels
bug Bug category: battle-mechanic Pertains to battle mechanics status: unconfirmed This bug has not been reproduced yet

Comments

@AlexOn1ine
Copy link
Collaborator

Description

According to Mr. Leaky from Team Aqua's Hideout discord channel the roamer HP becomes 0 after you encounter it the first time.

I haven't verified it. Just putting it here so it doesn't get lost. They said it is on 1.9.4

Version

1.9.4

Upcoming/master Version

No response

Discord contact info

No response

@AlexOn1ine AlexOn1ine added bug Bug category: battle-mechanic Pertains to battle mechanics status: unconfirmed This bug has not been reproduced yet labels Dec 13, 2024
@AlexOn1ine
Copy link
Collaborator Author

Potential culprit could be the order when gEnemyParty is zeroed out. I remember there was a recent PR for that. I can't find the PR though but I know it wasn't from a recurring contributor.

@AsparagusEduardo
Copy link

Was it #5281?

@AlexOn1ine
Copy link
Collaborator Author

Was it #5281?

I believe so, yes

@MRLEAKY666
Copy link

anohter user on TAH who was seemingly having the smae issue was posting about ti on 8/12/24, so this prdates the #5281 ?

@MRLEAKY666
Copy link

issue sems fixed by remvoing 5664-5667 in battle_main.c, however im not a genius enough to knwo if that breaks other stuff

@MRLEAKY666
Copy link

inncase its helpful, i've also palyed a roudn of battle factory ad a roudn of battle tent slateport wiht my fix an encoutnered no issues

@danaYatsuta
Copy link

danaYatsuta commented Feb 28, 2025

I can confirm this is reproducible on 1.10 if you encounter a roamer, it flees, and then you encounter that same roamer again.

Emulator: mGBA 10.4

mgba.webm

@danaYatsuta
Copy link

Some observations that I cannot make anything out of, but might be useful.

If I put DebugPrintfs before ZeroEnemyPartyMons call in FreeResetData_ReturnToOvOrDoEvolutions function and before UpdateRoamerHPStatus call in ReturnFromBattleToOverworld function, this is the debug log after a roamer flees:

Image

UpdateRoamerHPStatus being called after ZeroEnemyPartyMons might be an issue. If in FreeResetData_ReturnToOvOrDoEvolutions I replace this:

if (!(gBattleTypeFlags & BATTLE_TYPE_FRONTIER))
{
    ZeroEnemyPartyMons();
}

with this:

if (!(gBattleTypeFlags & BATTLE_TYPE_FRONTIER) && !(gBattleTypeFlags & BATTLE_TYPE_ROAMER))
{
    ZeroEnemyPartyMons();
}

the issue goes away, but I don't understand the code fully and assume there is a reason ZeroEnemyPartyMons is being called, so this is unlikely to be the solution.

@danaYatsuta danaYatsuta linked a pull request Mar 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug category: battle-mechanic Pertains to battle mechanics status: unconfirmed This bug has not been reproduced yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants