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

Fix resetting nature in PK3 -> PK4, breaking gender, alt form, nature, shininess in PK4 -> PK3 #9

Merged
merged 3 commits into from Sep 12, 2022

Conversation

Epicpkmn11
Copy link
Contributor

@Epicpkmn11 Epicpkmn11 commented Jul 2, 2022

It seems I(?) forgot to set the nature in the PK3<->PK4 transfer functions, so it was being reset to default.

Tested with pkmn-chest.nds.zip

Whoops only tested PK3 -> PK4 in my first commit, PK4 -> PK3 had more issues
These were all being set incorrectly I think because the ability hadn't been set yet and that's used in PID generation, I changed it to set all of PID based stats at once to save time instead of generating three random PIDs for no reason
@Epicpkmn11 Epicpkmn11 changed the title Fix nature being reset on transfer to/from PK3 Fix resetting nature in PK3 -> PK4, breaking gender, alt form, and nature in PK4 -> PK3 Jul 2, 2022
@Epicpkmn11
Copy link
Contributor Author

On further testing there were more issues in PK4 -> PK3, so I've fixed those as well and renamed the PR to match

And some other PID changes, also simplifies anything PID-based in general
Note: This breaks compatibilty with existing code, but it's a very simple fix, just pass the shiny and TSV values to getRandomPID
@Epicpkmn11 Epicpkmn11 changed the title Fix resetting nature in PK3 -> PK4, breaking gender, alt form, and nature in PK4 -> PK3 Fix resetting nature in PK3 -> PK4, breaking gender, alt form, nature, shininess in PK4 -> PK3 Jul 6, 2022
@Epicpkmn11
Copy link
Contributor Author

Shininess was being lost on PK4 -> PK3 too, and certain other PID altering functions, because getRandomPID didn't preserve shininess. I've added shiny and tsv arguments to that function which will break existing code that uses it, but to update is very simple and it greatly reduces overall complexity and potential for error. Before to correctly call that you really had to wrap it in a while loop checking the shininess.

@piepie62 piepie62 merged commit 25c05cd into FlagBrew:master Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants