-
Notifications
You must be signed in to change notification settings - Fork 28
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
Improve wild encounter handling #86
Conversation
There are some scenarios (Eterna Forest with Cheryl) where wild encounters may contain more than one wild pokemon. This solution needs some polish as I'm unfamilair with the codebase.
The wild encounter list is now only populated with pokemon in the battle. Empty pokemon entries are not added to the list.
The party list is iterated through to cull any empty slots that would otherwise be present as well as providing the species of the pokemon before requiring the user to drill down.
The wild objects used in bdsp are shared by both random encounters as well as trainer battles. In order to highlight this, the use of wild in several places was replaced with encounter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
The improvement to show shiny status in the list is great.
The changes I'm requesting will make the view more generic. Once this PR is merged, I'll use it for the other games and remove the party list view.
This change is to facilitate generalized pokemon parsing in order to improve standardization and reusability of code.
Just to be clear, I don't expect you to replace the party view for all games; that's outside the scope of this PR. I can do that later. |
Unified pokemon list implemented and applied to both encounter lsits as well as the party.
The filtering was implemented to solve the problem of empty stots being hown in the list view, this has been resolved with the addition of the count parameter.
Player party count added to support pokemon list view changes
Issues should be resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
After reading the issue mentioned in the original post (#36), I'm going to keep it opened since it isn't fully resolved:
I should probably open a new issue to address the second point and separate the two. However this PR did help get it closer to being closed! |
This PR is intended to resolve the issue of only the first Pokemon being shown when in a wild encounter.
The code used by the wild encounter system is shared by the trainer battle system and as such this PR changes the naming to highlight that fact.
As this is the case, this PR should also resolve the outstanding requests raised in #36.