Add static encounter egg edge case handling

Closes #1219
reject the eevee case if any relearn moves are present

allow traded eggs to be matched
This commit is contained in:
Kurt 2017-06-11 18:39:19 -07:00
parent cf8f6573f2
commit bb6c5e3dbb

View File

@ -310,7 +310,19 @@ private static IEnumerable<EncounterStatic> getMatchingStaticEncounters(PKM pkm,
continue;
}
else if (e.EggLocation != pkm.Egg_Location)
continue;
{
switch (pkm.GenNumber)
{
case 4:
if (pkm.Egg_Location != 2002) // Link Trade
continue;
break;
default:
if (pkm.Egg_Location != 30002) // Link Trade
continue;
break;
}
}
if (pkm.HasOriginalMetLocation)
{
if (e.Location != 0 && e.Location != pkm.Met_Location)
@ -324,6 +336,8 @@ private static IEnumerable<EncounterStatic> getMatchingStaticEncounters(PKM pkm,
continue;
if (e.Form != pkm.AltForm && !e.SkipFormCheck && !getCanFormChange(pkm, e.Species))
continue;
if (e.EggLocation == 60002 && e.Relearn[0] == 0 && pkm.RelearnMoves.Any(z => z != 0)) // gen7 eevee edge case
continue;
if (pkm is PK1 pk1 && pkm.Gen1_NotTradeback)
{