mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Bypass encounter slot check for radar slots
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=271406 https://discord.com/channels/401014193211441153/679178558597496872/908489378043686944
This commit is contained in:
parent
3e92d5a85d
commit
6b2ea0894e
2 changed files with 11 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue