mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-11 19:16:59 -05:00
Fix suggested moveset
This commit is contained in:
@@ -22,7 +22,8 @@ public static int[] GetMoveSet(this PKM pk, bool random = false)
|
||||
|
||||
var clone = pk.Clone();
|
||||
clone.SetMoves(moves);
|
||||
var newLa = new LegalityAnalysis(pk);
|
||||
clone.SetMaximumPPCurrent(moves);
|
||||
var newLa = new LegalityAnalysis(clone);
|
||||
|
||||
// ReSharper disable once TailRecursiveCall
|
||||
return newLa.Valid ? moves : GetMoveSet(pk, true);
|
||||
@@ -36,7 +37,7 @@ public static int[] GetMoveSet(this PKM pk, bool random = false)
|
||||
/// <returns>4 moves</returns>
|
||||
public static int[] GetMoveSet(this LegalityAnalysis la, bool random = false)
|
||||
{
|
||||
int[] m = la.GetSuggestedCurrentMoves(random ? MoveSourceType.All : MoveSourceType.None);
|
||||
int[] m = la.GetSuggestedCurrentMoves(random ? MoveSourceType.All : MoveSourceType.Encounter);
|
||||
|
||||
var learn = la.GetSuggestedMovesAndRelearn();
|
||||
if (!m.All(z => learn.Contains(z)))
|
||||
|
||||
Reference in New Issue
Block a user