Gen2 egg gift bypass fix

Gen4+ static encounter eggs could slide through the VC case
prevent empty moves from appearing before suggested moves (relearnbase
being empty)
This commit is contained in:
Kurt
2017-09-26 20:09:18 -07:00
parent 8d0af0bd5b
commit 9699cdefae
2 changed files with 2 additions and 2 deletions

View File

@@ -367,7 +367,7 @@ public int[] GetSuggestedRelearn()
if (!pkm.WasEgg)
return Info.RelearnBase;
List<int> window = new List<int>(Info.RelearnBase);
List<int> window = new List<int>(Info.RelearnBase.Where(z => z != 0));
window.AddRange(pkm.Moves.Where((v, i) => !Info.Moves[i].Valid || Info.Moves[i].Flag));
window = window.Distinct().ToList();
int[] moves = new int[4];

View File

@@ -420,7 +420,7 @@ private static IEnumerable<EncounterStatic> GetMatchingStaticEncounters(PKM pkm,
if (pkm.Format == 3 && pkm.IsEgg && e.EggLocation != pkm.Met_Location)
continue;
}
else if (pkm.VC || e.EggLocation != 0) // Gen2 Egg
else if (pkm.VC || pkm.GenNumber <= 2 && e.EggLocation != 0) // Gen2 Egg
{
if (pkm.Format <= 2)
{