Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The only thing resetting the steps counter for egg cycles was the
u8
limit, so with theP_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