mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 16:27:21 +00:00
Fix suggested moveset
This commit is contained in:
parent
06e6242944
commit
8546ecaf46
1 changed files with 3 additions and 2 deletions
|
@ -22,7 +22,8 @@ namespace PKHeX.Core
|
|||
|
||||
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 @@ namespace PKHeX.Core
|
|||
/// <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)))
|
||||
|
|
Loading…
Reference in a new issue