Clean check for overworld IVs

Closes #3150

Still need to remove some symbol encounter tables that are unused
This commit is contained in:
Kurt 2021-02-15 09:04:47 -08:00
parent b82b0da7d9
commit 74a5c03cd2
2 changed files with 5 additions and 4 deletions

View file

@ -52,7 +52,9 @@ namespace PKHeX.Core
public bool IsOverworldCorrelationCorrect(PKM pk)
{
return Overworld8RNG.ValidateOverworldEncounter(pk);
var area = (EncounterArea8) Area;
var flawless = area.PermitCrossover ? -1 : 0;
return Overworld8RNG.ValidateOverworldEncounter(pk, flawless: flawless);
}
public override EncounterMatchRating GetMatchRating(PKM pkm)

View file

@ -175,9 +175,8 @@
{
for (int i = 0; i < 6; i++)
{
if (template[i] != UNSET)
continue;
var expect = (int) rng.NextInt(32);
var temp = template[i];
var expect = temp == UNSET ? (int)rng.NextInt(32) : temp;
var actual = i switch
{
0 => pk.IV_HP,