diff --git a/PKHeX.Core/Editing/Applicators/MoveSetApplicator.cs b/PKHeX.Core/Editing/Applicators/MoveSetApplicator.cs index d38ab0afc..c923e7a0f 100644 --- a/PKHeX.Core/Editing/Applicators/MoveSetApplicator.cs +++ b/PKHeX.Core/Editing/Applicators/MoveSetApplicator.cs @@ -57,21 +57,23 @@ public static int[] GetMoveSet(this LegalityAnalysis la, bool random = false) /// Fetches based on the provided . /// /// Pokémon to modify. + /// Encounter the relearn moves should be suggested for. If not provided, will try to detect it via legality analysis. /// best suited for the current data. - public static IReadOnlyList GetSuggestedRelearnMoves(this PKM pk) => GetSuggestedRelearnMoves(new LegalityAnalysis(pk)); + public static IReadOnlyList GetSuggestedRelearnMoves(this PKM pk, IEncounterable? enc = null) => GetSuggestedRelearnMoves(new LegalityAnalysis(pk), enc); /// /// Fetches based on the provided . /// /// which contains parsed information pertaining to legality. + /// Encounter the relearn moves should be suggested for. If not provided, will try to detect it via legality analysis. /// best suited for the current data. - public static IReadOnlyList GetSuggestedRelearnMoves(this LegalityAnalysis legal) + public static IReadOnlyList GetSuggestedRelearnMoves(this LegalityAnalysis legal, IEncounterable? enc = null) { var m = legal.GetSuggestedRelearnMovesFromEncounter(); if (m.Any(z => z != 0)) return m; - var enc = legal.EncounterMatch; + enc ??= legal.EncounterMatch; if (enc is MysteryGift || enc is EncounterEgg) return m;