mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-25 00:10:11 -05:00
Defer BDSP->PK8 marsh ball mismatches
This commit is contained in:
parent
267521cfdf
commit
39a09fbbbe
|
|
@ -159,6 +159,7 @@ public static class Locations
|
|||
private const int MarshLocation_DPPt = 52;
|
||||
public static bool IsSafariZoneLocation3(int loc) => loc is SafariLocation_RSE or SafariLocation_FRLG;
|
||||
public static bool IsSafariZoneLocation4(int loc) => loc is MarshLocation_DPPt or SafariLocation_HGSS;
|
||||
public static bool IsSafariZoneLocation8b(int loc) => loc is (>= 219 and <= 224);
|
||||
|
||||
public static bool IsEggLocationBred4(int loc, GameVersion ver)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -149,9 +149,14 @@ public static IEnumerable<IEncounterable> GetEncountersFuzzy(PKM pkm, EvoCriteri
|
|||
}
|
||||
}
|
||||
|
||||
// Only yield if Safari and Marsh encounters match.
|
||||
bool safari = pkm is PK8 { Ball: (int)Ball.Safari };
|
||||
foreach (var z in GetValidWildEncounters(pkm, chain, game))
|
||||
{
|
||||
var marsh = Locations.IsSafariZoneLocation8b(z.Location);
|
||||
var match = z.GetMatchRating(pkm);
|
||||
if (safari != marsh)
|
||||
match = DeferredErrors;
|
||||
if (match == Match)
|
||||
{
|
||||
yield return z;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user