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

Exclude unobtainable HM moves from movesearch #10598

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dot-Comfey
Copy link
Contributor

Comment on lines 583 to 588
if (gen4HMMoves.includes(moveid) && this.dex.gen >= 5) {
if (!learnset[moveid].some(source => source.startsWith('5'))) continue;
} else if (gen3HMMoves.includes(moveid) && this.dex.gen >= 4 &&
!learnset[moveid].some(source => source.startsWith('4'))) {
continue;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This fails for Hoothoot and Noctowl who learn Flash by HM in Gen 3 and by also by Virtual Console transfer from Gen 2 to Gen 7. (Although currently /ms8 is still buggy, because it should show Flash being learnable in Gen 8.) Maybe it would be better to filter out sources that start 4 and 3 from the learnset?

Copy link
Contributor

Choose a reason for hiding this comment

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

(Oh and there are also some CAP mons with weird learnsets where they learn HMs in Gen 4 and then again in Gen 7.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Flash is excluded from /ms8 because it's a past gen only move. The code you highlighted would have failed to return Flash in /ms7 but I added another commit that fixed this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the CAP mons, I'm not familiar with them but it seems like they're supposed to be exempted from HM transfer limitations? Krilowatt learns Surf in Gen 4 but not Gen 5, which in addition to causing this code to not return Surf in /ms5 Krilowatt, makes it show up as an illegal move in the Gen 5 CAP teambuilder, but passes validation.

I also noticed that Darkrai can have Rock Climb in Gen 8 Natdex (which also shows up as illegal in the teambuilder), which doesn't seem to be right either.

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.

2 participants