From c32b38a53c8ff51f67a4c8ffef13fde577af1c2d Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 12 Jan 2021 22:26:08 -0800 Subject: [PATCH] Minor annotation tweaks no functional change --- .../Encounters/Generator/EncounterMovesetGenerator.cs | 4 ++-- .../Legality/Encounters/Verifiers/VerifyCurrentMoves.cs | 4 ++-- .../Legality/Encounters/Verifiers/VerifyRelearnMoves.cs | 6 +++--- PKHeX.Core/Legality/Moves/EggInfoSource.cs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/Generator/EncounterMovesetGenerator.cs b/PKHeX.Core/Legality/Encounters/Generator/EncounterMovesetGenerator.cs index 7a606f654..a302a095d 100644 --- a/PKHeX.Core/Legality/Encounters/Generator/EncounterMovesetGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/Generator/EncounterMovesetGenerator.cs @@ -229,8 +229,8 @@ private static IEnumerable GetEggs(PKM pk, IReadOnlyCollection em = MoveEgg.GetEggMoves(pk.PersonalInfo, egg.Species, egg.Form, egg.Version, egg.Generation); - if (Legal.LightBall.Contains(egg.Species) && needs.Contains(344)) - em = em.Concat(new[] {344}); // Volt Tackle + if (Legal.LightBall.Contains(egg.Species) && needs.Contains((int)Move.VoltTackle)) + em = em.Concat(new[] { (int)Move.VoltTackle }); if (!needs.Except(em).Any()) yield return egg; } diff --git a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs index c35dcb867..bd7c43b6a 100644 --- a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs +++ b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs @@ -121,12 +121,12 @@ private static CheckMoveResult[] ParseMovesWasEggPreRelearn(PKM pkm, IReadOnlyLi Egg = Egg.Where(m => m <= Legal.MaxMoveID_1).ToArray(); bool volt = (info.Generation > 3 || e.Version == GameVersion.E) && Legal.LightBall.Contains(pkm.Species); - var Special = volt && notEvent ? new[] { 344 } : Array.Empty(); // Volt Tackle for bred Pichu line + var specialMoves = volt && notEvent ? new[] { (int)Move.VoltTackle } : Array.Empty(); // Volt Tackle for bred Pichu line var source = new MoveParseSource { CurrentMoves = currentMoves, - SpecialSource = Special, + SpecialSource = specialMoves, NonTradeBackLevelUpMoves = NonTradebackLvlMoves, EggLevelUpSource = LevelUp, diff --git a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyRelearnMoves.cs b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyRelearnMoves.cs index 9bfbddede..8b0ca83bc 100644 --- a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyRelearnMoves.cs +++ b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyRelearnMoves.cs @@ -113,12 +113,12 @@ private static CheckResult[] VerifyRelearnEggBase(PKM pkm, EncounterEgg e) // Non-Base moves that can magically appear in the regular movepool if (Legal.LightBall.Contains(pkm.Species)) - inheritMoves.Add(344); // Volt Tackle + inheritMoves.Add((int)Move.VoltTackle); // If any splitbreed moves are invalid, flag accordingly - var splitMoves = e is EncounterEggSplit s + IReadOnlyList splitMoves = e is EncounterEggSplit s ? MoveList.GetValidRelearn(pkm, s.OtherSpecies, s.Form, inheritLvlMoves, e.Version).ToList() - : (IReadOnlyList)Array.Empty(); + : Array.Empty(); // Inherited moves appear after the required base moves. // If the pkm is capable of split-species breeding and any inherited move is from the other split scenario, flag accordingly. diff --git a/PKHeX.Core/Legality/Moves/EggInfoSource.cs b/PKHeX.Core/Legality/Moves/EggInfoSource.cs index 9c4765992..6bb353a27 100644 --- a/PKHeX.Core/Legality/Moves/EggInfoSource.cs +++ b/PKHeX.Core/Legality/Moves/EggInfoSource.cs @@ -31,7 +31,7 @@ public EggInfoSource(PKM pkm, EncounterEgg e) if (volt) { Egg = Egg.ToList(); // array->list - Egg.Add(344); // Volt Tackle + Egg.Add((int)Move.VoltTackle); // Volt Tackle } }