mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
minor clean
This commit is contained in:
parent
c6d6a52e0b
commit
0e4848ad82
2 changed files with 15 additions and 12 deletions
|
@ -1,6 +1,4 @@
|
|||
using static PKHeX.Core.GameVersion;
|
||||
|
||||
namespace PKHeX.Core
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
// Distribution Nest Encounters (BCAT)
|
||||
internal static partial class Encounters8Nest
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue