Kurt 2021-12-12 13:16:27 -08:00
parent 3e92d5a85d
commit 6b2ea0894e
2 changed files with 11 additions and 2 deletions

View file

@ -16,6 +16,7 @@ namespace PKHeX.Core
public SlotType Type => Area.Type;
public int SlotNumber { get; }
public bool CanUseRadar => !GameVersion.HGSS.Contains(Version) && GroundTile.HasFlag(GroundTilePermission.Grass);
public EncounterSlot4(EncounterArea4 area, int species, int form, int min, int max, int slot, int mpi, int mpc, int sti, int stc) : base(area, species, form, min, max)
{

View file

@ -74,8 +74,9 @@ namespace PKHeX.Core
}
var slots = FrameFinder.GetFrames(info.PIDIV, pkm).ToList();
foreach (var z in GetValidWildEncounters34(pkm, chain))
foreach (var slot in GetValidWildEncounters34(pkm, chain))
{
var z = (EncounterSlot4)slot;
var match = z.GetMatchRating(pkm);
if (match == PartialMatch)
{
@ -83,7 +84,14 @@ namespace PKHeX.Core
continue;
}
var frame = slots.Find(s => s.IsSlotCompatibile((EncounterSlot4)z, pkm));
// Can use Radar to force the encounter slot to stay consistent across encounters.
if (z.CanUseRadar)
{
yield return slot;
continue;
}
var frame = slots.Find(s => s.IsSlotCompatibile(z, pkm));
if (frame == null)
{
deferred ??= z;