gen3 ingame event item fateful flags

Special handling for gen3 detection due to multiple static encounters
for lati@s having mixed fateful flags.
This commit is contained in:
Kurt 2017-04-09 22:20:07 -07:00
parent 35352b0259
commit ea65d39f69
2 changed files with 17 additions and 12 deletions

View file

@ -846,11 +846,16 @@ namespace PKHeX.Core
G3Encounter = EncounterMatch;
}
else if (null != (EncounterStaticMatch = Legal.getValidStaticEncounter(pkm)))
{
if (new[] {380, 381}.Contains(pkm.Species))
EncounterStaticMatch = EncounterStaticMatch.Where(z => z.Fateful == pkm.FatefulEncounter).ToList();
if (null != EncounterStaticMatch && EncounterStaticMatch.Any())
{
EncounterMatch = EncounterStaticMatch.First();
if ((G3Result = verifyEncounterStatic())?.Valid ?? false)
G3Encounter = EncounterMatch;
}
}
// Check events after static, to match Mew/Deoxys static encounters
if (wasEvent && G3Result == null && pkm.Species != 151 && pkm.Species != 386)

View file

@ -279,10 +279,10 @@ namespace PKHeX.Core
new EncounterStatic { Species = 377, Level = 40, Location = 082, }, // Regirock @ Desert Ruins
new EncounterStatic { Species = 378, Level = 40, Location = 081, }, // Regice @ Island Cave
new EncounterStatic { Species = 379, Level = 40, Location = 083, }, // Registeel @ Ancient Tomb
new EncounterStatic { Species = 380, Level = 50, Location = 073, Version = GameVersion.R, }, // Latias @ Southern Island
new EncounterStatic { Species = 380, Level = 50, Location = 073, Version = GameVersion.E, }, // Latias @ Southern Island
new EncounterStatic { Species = 381, Level = 50, Location = 073, Version = GameVersion.S, }, // Latios @ Southern Island
new EncounterStatic { Species = 381, Level = 50, Location = 073, Version = GameVersion.E, }, // Latios @ Southern Island
new EncounterStatic { Species = 380, Level = 50, Location = 073, Version = GameVersion.R, Fateful = true }, // Latias @ Southern Island
new EncounterStatic { Species = 380, Level = 50, Location = 073, Version = GameVersion.E, Fateful = true }, // Latias @ Southern Island
new EncounterStatic { Species = 381, Level = 50, Location = 073, Version = GameVersion.S, Fateful = true }, // Latios @ Southern Island
new EncounterStatic { Species = 381, Level = 50, Location = 073, Version = GameVersion.E, Fateful = true }, // Latios @ Southern Island
new EncounterStatic { Species = 382, Level = 45, Location = 072, Version = GameVersion.S, }, // Kyogre @ Cave of Origin
new EncounterStatic { Species = 382, Level = 70, Location = 203, Version = GameVersion.E, }, // Kyogre @ Marine Cave
new EncounterStatic { Species = 383, Level = 45, Location = 072, Version = GameVersion.R, }, // Groudon @ Cave of Origin
@ -291,9 +291,9 @@ namespace PKHeX.Core
// Event
new EncounterStatic { Species = 151, Level = 30, Location = 201, Version = GameVersion.E, Fateful = true }, // Mew @ Faraway Island (Unreleased outside of Japan)
new EncounterStatic { Species = 249, Level = 70, Location = 211, Version = GameVersion.E, }, // Lugia @ Navel Rock
new EncounterStatic { Species = 250, Level = 70, Location = 211, Version = GameVersion.E, }, // Ho-Oh @ Navel Rock
new EncounterStatic { Species = 386, Level = 30, Location = 200, Version = GameVersion.E, Form = 3, Fateful = true }, // Deoxys @ Birth Island
new EncounterStatic { Species = 249, Level = 70, Location = 211, Version = GameVersion.E, Fateful = true }, // Lugia @ Navel Rock
new EncounterStatic { Species = 250, Level = 70, Location = 211, Version = GameVersion.E, Fateful = true }, // Ho-Oh @ Navel Rock
new EncounterStatic { Species = 386, Level = 30, Location = 200, Version = GameVersion.E, Fateful = true, Form = 3 }, // Deoxys @ Birth Island
};
@ -349,8 +349,8 @@ namespace PKHeX.Core
new EncounterStatic { Species = 150, Level = 70, Location = 141, }, // Mewtwo @ Cerulean Cave
// Event
new EncounterStatic { Species = 249, Level = 70, Location = 174, }, // Lugia @ Navel Rock
new EncounterStatic { Species = 250, Level = 70, Location = 174, }, // Ho-Oh @ Navel Rock
new EncounterStatic { Species = 249, Level = 70, Location = 174, Fateful = true }, // Lugia @ Navel Rock
new EncounterStatic { Species = 250, Level = 70, Location = 174, Fateful = true }, // Ho-Oh @ Navel Rock
new EncounterStatic { Species = 386, Level = 30, Location = 187, Version = GameVersion.FR, Form = 1, Fateful = true }, // Deoxys @ Birth Island
new EncounterStatic { Species = 386, Level = 30, Location = 187, Version = GameVersion.LG, Form = 2, Fateful = true }, // Deoxys @ Birth Island
};