mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-06 05:32:36 -05:00
Sanity check suggested current moves
invalid formes can trip up gen1/2 origin encounter moves, just double check when suggesting. Closes #2018
This commit is contained in:
parent
173c9f7904
commit
40d2f71e10
|
|
@ -606,6 +606,10 @@ public static int[] GetMoveSet(this PKM pkm, bool random = false, LegalityAnalys
|
|||
int[] m = la.GetSuggestedMoves(tm: random, tutor: random, reminder: random);
|
||||
if (m == null)
|
||||
return pkm.Moves;
|
||||
|
||||
if (!m.All(z => la.AllSuggestedMovesAndRelearn.Contains(z)))
|
||||
m = m.Intersect(la.AllSuggestedMovesAndRelearn).ToArray();
|
||||
|
||||
if (random)
|
||||
Util.Shuffle(m);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user