Conversation
After seeing fifty different ways we use `getLearnset`, most of which are just "haphazardly assemble a movepool", I decided to write `getFullLearnset` and `getMovePool`, which centralizes the implementations and prevents weird bugs like 9713dc6 which we spent two years trying to figure out.
|
It looks like there’s a quirk with Mirror Herb egg moves that’s missing from this: Ursaluna-Bloodmoon and Greninja-Bond can inherit egg moves for Teddiursa and Froakie, respectively, despite not actually evolving from them. |
This is already handled by putting the egg moves on Ursaluna and Greninja's forme respective movesets (see #9888). |
|
Oh yeah I forgot it got done that way, my bad. |
| // Since we assume we have no target mons at first | ||
| // then the valid moveset we can search is the set of all moves. | ||
| const validMoves = new Set(Object.keys(mod.data.Moves)); | ||
| const validMoves = new Set(Object.keys(mod.data.Moves)) as Set<ID>; |
There was a problem hiding this comment.
| const validMoves = new Set(Object.keys(mod.data.Moves)) as Set<ID>; | |
| const validMoves = new Set<ID>(Object.keys(mod.data.Moves)); |
wouldn't this work? or would it cause an error since the keys for mod.data.Moves are technically strings?
There was a problem hiding this comment.
Yeah, it would cause an error because they're technically strings.
|
I was gonna leave this up for review a while longer, but we just caught another crash that makes sense to be fixed here, so I suppose it's time to rush this out. |
After seeing fifty different ways we use `getLearnset`, most of which are just "haphazardly assemble a movepool", I decided to write `getFullLearnset` and `getMovePool`, which centralizes the implementations and prevents weird bugs like 9713dc6 which we spent two years trying to figure out.
After seeing fifty different ways we use
getLearnset, most of which are just "haphazardly assemble a movepool", I decided to writegetFullLearnsetandgetMovePool, which centralizes the implementations and prevents weird bugs like 9713dc6 which we spent two years trying to figure out.