Add Frame mismatch illegal message handling

encounter will no longer be ignored as valid, will instead show the RNG
frame mismatch message.
This commit is contained in:
Kurt 2017-11-28 21:30:53 -08:00
parent c7a59453b1
commit dd7684735a
3 changed files with 13 additions and 1 deletions

View file

@ -46,6 +46,8 @@ namespace PKHeX.Core
break; // passes
}
if (!info.FrameMatches && info.EncounterMatch is EncounterSlot) // if false, all valid RNG frame matches have already been consumed
info.Parse.Add(new CheckResult(Severity.Invalid, V400, CheckIdentifier.PID));
if (!info.PIDIVMatches) // if false, all valid PIDIV matches have already been consumed
info.Parse.Add(new CheckResult(Severity.Invalid, V411, CheckIdentifier.PID));

View file

@ -297,7 +297,10 @@ namespace PKHeX.Core
{
if (slots.Any(s => s.EncounterSlot(z.Type, z) == z.SlotNumber))
yield return z;
else
deferred.Add(z);
}
info.FrameMatches = false;
// do static encounters if they were deferred to end, spit out any possible encounters for invalid pkm
if (safariSport)
@ -328,7 +331,10 @@ namespace PKHeX.Core
{
if (slots.Any(s => s.EncounterSlot(z.Type, z) == z.SlotNumber))
yield return z;
else
deferred.Add(z);
}
info.FrameMatches = false;
if (pkm.Version != 15) // no eggs in C/XD
foreach (var z in GenerateEggs(pkm))

View file

@ -51,9 +51,13 @@ namespace PKHeX.Core
public PIDIV PIDIV { get; set; }
/// <summary>Indicates whether or not the <see cref="PIDIV"/> can originate from the <see cref="EncounterMatch"/>.</summary>
/// <remarks>This boolean is true until all valid <see cref="PIDIV"/> encounters are tested, at which time it is false.</remarks>
/// <remarks>This boolean is true until all valid <see cref="PIDIV"/> encounters are tested, after which it is false.</remarks>
public bool PIDIVMatches { get; set; } = true;
/// <summary>Indicates whether or not the <see cref="PIDIV"/> can originate from the <see cref="EncounterMatch"/> with explicit <see cref="RNG"/> <see cref="Frame"/> matching.</summary>
/// <remarks>This boolean is true until all valid <see cref="Frame"/> entries are tested for all possible <see cref="EncounterSlot"/> matches, after which it is false.</remarks>
public bool FrameMatches { get; set; } = true;
public readonly bool Korean;
public LegalInfo(PKM pk)