minor clean

This commit is contained in:
Kurt 2021-04-18 18:18:09 -07:00
parent c6d6a52e0b
commit 0e4848ad82
2 changed files with 15 additions and 12 deletions

View file

@ -1,6 +1,4 @@
using static PKHeX.Core.GameVersion;
namespace PKHeX.Core
namespace PKHeX.Core
{
// Distribution Nest Encounters (BCAT)
internal static partial class Encounters8Nest

View file

@ -495,17 +495,22 @@ namespace PKHeX.Core
if (RegularEggMovesLearned.Count != 0 && learnInfo.EventEggMoves.Count != 0)
{
// Moves that are egg moves or event egg moves but not both
var IncompatibleEggMoves = RegularEggMovesLearned.Except(learnInfo.EventEggMoves).Union(learnInfo.EventEggMoves.Except(RegularEggMovesLearned)).ToList();
if (IncompatibleEggMoves.Count == 0)
return;
var IncompatibleEggMoves = RegularEggMovesLearned.Except(learnInfo.EventEggMoves).Union(learnInfo.EventEggMoves.Except(RegularEggMovesLearned));
foreach (int m in IncompatibleEggMoves)
{
if (learnInfo.EventEggMoves.Contains(m) && !learnInfo.EggMovesLearned.Contains(m))
res[m] = new CheckMoveResult(res[m], Invalid, LMoveEggIncompatibleEvent, CurrentMove);
else if (!learnInfo.EventEggMoves.Contains(m) && learnInfo.EggMovesLearned.Contains(m))
res[m] = new CheckMoveResult(res[m], Invalid, LMoveEggIncompatible, CurrentMove);
else if (!learnInfo.EventEggMoves.Contains(m) && learnInfo.LevelUpEggMoves.Contains(m))
res[m] = new CheckMoveResult(res[m], Invalid, LMoveEventEggLevelUp, CurrentMove);
bool isEvent = learnInfo.EventEggMoves.Contains(m);
if (isEvent)
{
if (!learnInfo.EggMovesLearned.Contains(m))
res[m] = new CheckMoveResult(res[m], Invalid, LMoveEggIncompatibleEvent, CurrentMove);
}
else
{
if (learnInfo.EggMovesLearned.Contains(m))
res[m] = new CheckMoveResult(res[m], Invalid, LMoveEggIncompatible, CurrentMove);
else if (learnInfo.LevelUpEggMoves.Contains(m))
res[m] = new CheckMoveResult(res[m], Invalid, LMoveEventEggLevelUp, CurrentMove);
}
}
}
else if (enc is not EncounterEgg)