mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-08 11:28:04 -05:00
Add location to gen 3 gift egg, legal analysis adapted to ignore gen 3 gift eggs encounters if the pokemon is hatched
Is impossible to differentiated gen 3 normal eggs to gift eggs after hatched, assume normal egg. In the case of pokemon box eggs with special moves those moves should be analyzed separately and check the pokemon legal moves with both possible origins: normal egg and box egg
This commit is contained in:
@@ -579,7 +579,15 @@ internal static EncounterStatic getValidStaticEncounter(PKM pkm, GameVersion gam
|
||||
{
|
||||
if (e.Nature != Nature.Random && pkm.Nature != (int)e.Nature)
|
||||
continue;
|
||||
if (e.EggLocation != pkm.Egg_Location)
|
||||
if(pkm.Gen3 && e.EggLocation != 0)
|
||||
{
|
||||
//Hartched gen 3 gift egg can not be differentiated form normal eggs
|
||||
if (!pkm.IsEgg || pkm.Format > 3)
|
||||
continue;
|
||||
if (e.EggLocation != pkm.Met_Location)
|
||||
continue;
|
||||
}
|
||||
else if (e.EggLocation != pkm.Egg_Location)
|
||||
continue;
|
||||
if (pkm.HasOriginalMetLocation)
|
||||
{
|
||||
|
||||
@@ -160,7 +160,7 @@ public static partial class Legal
|
||||
//Gift
|
||||
new EncounterStatic { Gift = true, Species = 351, Level = 25, Location = 034, }, // Castform @ Weather Institute
|
||||
new EncounterStatic { Gift = true, Species = 374, Level = 5, Location = 013, }, // Beldum @ Mossdeep City
|
||||
new EncounterStatic { Gift = true, Species = 360, Level = 5, }, // Wynaut Egg
|
||||
new EncounterStatic { Gift = true, Species = 360, Level = 5, EggLocation = 253}, // Wynaut Egg
|
||||
|
||||
//Stationary
|
||||
new EncounterStatic { Species = 352, Level = 30, Location = 034, }, //Kecleon @ Route 119
|
||||
@@ -213,7 +213,7 @@ public static partial class Legal
|
||||
new EncounterStatic { Gift = true, Species = 129, Level = 5, Location = 099, }, // Magikarp @ Route 4
|
||||
new EncounterStatic { Gift = true, Species = 131, Level = 25, Location = 134, }, // Lapras @ Silph Co.
|
||||
new EncounterStatic { Gift = true, Species = 133, Level = 25, Location = 094, }, // Eevee @ Celadon City
|
||||
new EncounterStatic { Gift = true, Species = 175, Level = 5, }, // Togepi Egg
|
||||
new EncounterStatic { Gift = true, Species = 175, Level = 5, EggLocation = 253 }, // Togepi Egg
|
||||
|
||||
//Stationary
|
||||
new EncounterStatic { Species = 143, Level = 30, Location = 112, }, //Snorlax @ Route 12
|
||||
|
||||
Reference in New Issue
Block a user