mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-18 14:28:33 +00:00
Remove unobtainable static encounters from gen4 tables
We don't do it for inaccessible static encounters in gen7/8, so anyone glitching/cheating will get an unrecognized encounter instead of "hey this exists, but you can't access it" error.
This commit is contained in:
parent
a57e12db59
commit
34f750d519
2 changed files with 3 additions and 20 deletions
|
@ -256,11 +256,11 @@ namespace PKHeX.Core
|
||||||
new(Pt) { Species = 487, Level = 47, Location = 117, GroundTile = Distortion,Form = 1, HeldItem = 112 }, // Giratina @ Distortion World
|
new(Pt) { Species = 487, Level = 47, Location = 117, GroundTile = Distortion,Form = 1, HeldItem = 112 }, // Giratina @ Distortion World
|
||||||
|
|
||||||
// Event
|
// Event
|
||||||
new(DP) { Species = 491, Level = 40, Location = 079, GroundTile = Grass }, // Darkrai @ Newmoon Island (Unreleased in Diamond and Pearl)
|
//new(DP) { Species = 491, Level = 40, Location = 079, GroundTile = Grass }, // Darkrai @ Newmoon Island (Unreleased in Diamond and Pearl)
|
||||||
new(Pt) { Species = 491, Level = 50, Location = 079, GroundTile = Grass }, // Darkrai @ Newmoon Island
|
new(Pt) { Species = 491, Level = 50, Location = 079, GroundTile = Grass }, // Darkrai @ Newmoon Island
|
||||||
new(Pt) { Species = 492, Form = 0, Level = 30, Location = 063, Fateful = true }, // Shaymin @ Flower Paradise
|
new(Pt) { Species = 492, Form = 0, Level = 30, Location = 063, Fateful = true }, // Shaymin @ Flower Paradise
|
||||||
new(DP) { Species = 492, Form = 0, Level = 30, Location = 063, Fateful = false }, // Shaymin @ Flower Paradise (Unreleased in Diamond and Pearl)
|
//new(DP) { Species = 492, Form = 0, Level = 30, Location = 063, Fateful = false }, // Shaymin @ Flower Paradise (Unreleased in Diamond and Pearl)
|
||||||
new(DPPt) { Species = 493, Form = 0, Level = 80, Location = 086, GroundTile = Cave }, // Arceus @ Hall of Origin (Unreleased)
|
//new(DPPt) { Species = 493, Form = 0, Level = 80, Location = 086, GroundTile = Cave }, // Arceus @ Hall of Origin (Unreleased)
|
||||||
|
|
||||||
// Roamers
|
// Roamers
|
||||||
new(DPPt) { Roaming = true, Species = 481, Level = 50, GroundTile = Grass | Water }, // Mesprit
|
new(DPPt) { Roaming = true, Species = 481, Level = 50, GroundTile = Grass | Water }, // Mesprit
|
||||||
|
|
|
@ -292,8 +292,6 @@ namespace PKHeX.Core
|
||||||
{
|
{
|
||||||
if (!IsSane(chain, enc))
|
if (!IsSane(chain, enc))
|
||||||
continue;
|
continue;
|
||||||
if (enc.IsUnobtainable())
|
|
||||||
continue;
|
|
||||||
if (needs.Count == 0)
|
if (needs.Count == 0)
|
||||||
{
|
{
|
||||||
yield return enc;
|
yield return enc;
|
||||||
|
@ -404,20 +402,5 @@ namespace PKHeX.Core
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
private static bool IsUnobtainable(this EncounterStatic enc)
|
|
||||||
{
|
|
||||||
if (enc is not EncounterStatic4 s)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return s.Species switch
|
|
||||||
{
|
|
||||||
(int)Species.Darkrai when s.Version != GameVersion.Pt => true, // DP Darkrai
|
|
||||||
(int)Species.Shaymin when s.Version != GameVersion.Pt => true, // DP Shaymin
|
|
||||||
(int)Species.Arceus => true, // Azure Flute Arceus
|
|
||||||
_ => false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue