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

Egg cycle length fix #5828

Merged
merged 5 commits into from
Dec 20, 2024
Merged

Egg cycle length fix #5828

merged 5 commits into from
Dec 20, 2024

Conversation

hedara90
Copy link
Collaborator

Description

The only thing resetting the steps counter for egg cycles was the u8 limit, so with the P_EGG_CYCLE_LENGTH >= GEN_8 setting, it was still 256 steps between consecutive cycle increments, it was just offset to happen at a different steps in the 256 step long cycle.
This makes it so that the step count is always reset when the target number of steps is reached.
Also adds all other generational changes to the egg cycle length.

This changes the variable storing the step count to a u32 to handle all the cases, this shouldn't change the saveblock, since the struct was padded by 3 bytes either way. The in-game counter doesn't change, and existing step counts are still valid.
Strict equals is also replaced with "greater than or equal" to account for circumstances where the setting is changed in such a way that the cycle count would never reset for existing saves.

People who collaborated with me in this PR

@/BolaDeQueijo on discord discovered the issue.

Discord contact info

hedara

@hedara90 hedara90 added the bugfix Bugfixes label Dec 18, 2024
Copy link
Collaborator

@Bassoonian Bassoonian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capital consistency

include/config/pokemon.h Outdated Show resolved Hide resolved
@hedara90
Copy link
Collaborator Author

Review comment addressed.

@Bassoonian Bassoonian merged commit e579333 into rh-hideout:master Dec 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bugfixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants