Generation Evolutions Pull Request #3775
javierhimura
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Two years ago, I tried to make a pull request to change pokemon evolution chains.
#3359
I have been thinking, and I believe I could try this again, but now I am aware of how to minimize the impact of the change. My previous attempt was so ambitious, trying to fix all edge cases, with occasionated many mistakes and false positives.
My thought to make it simple is to only change in the PR the verifications in EncounterFinder, in which the analysis is iterating through every encounter, calculating the possible moves the Pokemon could have learned. The problem with this analyst is that it assumes a Pokemon could have evolved in multiple generations, which isn't possible, causing illegal move combinations that won't be detected.
An example of this could be gen 4 Butterfree originated in gen 3 with Nightmare and Iron Defense. Butterfree can only learn Nightmare in gen 3 without being able to learn that as Metapot, and at the same time, Butterfree can only learn Iron Defense as Metapod in DPPt, so those two moves combination are illegal.
The problem is that the program create this evolution chain allowing moves from Butterfree and Metapod from both generations as if the same pokemon can have the same evolution on different generations.
But a real evolution chain, with the pokemon having an evolution in one generation. In this example, one of those three. So the analysis should iterate in those 3 possible chains.
The problem with my previous PR was that I tried to detect all edge cases, which was too much. So, instead, I am thinking of first making the generation evolution iteration inside the encounter iteration, to simplify the evolution chain to use only for learnable moves available while keep using the original chain on the rest of the code to avoid false positives.
This also means the change won't detect many edge cases mentioned on the original PR, but most of those edge cases are not currently detected by PkHex, so we can leave those as they are right now and improve the analysis on future PRs dedicated to those individual cases one by one, to minimize the impact of the change.
Other analysis will use the current chain to avoid unwanted effects. In future PR, some of them probably will need to be moved to generation iteration, like the Evolution Verifier and also Ability Vertifier for gen 3 pokemon. But it is better don't include those changes on the first PR.
Beta Was this translation helpful? Give feedback.
All reactions