mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
EncounterCriteria: ignore genderless gender values
Shedinja (genderless) was filtering when trying to generate gendered nincada Also fix method2 reattempt & comments while we're here (comments were copypasted from Unown's method)
This commit is contained in:
parent
a71d74b1ea
commit
a2f36760e6
2 changed files with 5 additions and 5 deletions
|
@ -101,7 +101,7 @@ public sealed record EncounterCriteria : IFixedNature, IFixedAbilityNumber, IShi
|
|||
/// <returns>Initialized criteria data to be passed to generators.</returns>
|
||||
public static EncounterCriteria GetCriteria(IBattleTemplate s, IPersonalInfo pi) => new()
|
||||
{
|
||||
Gender = s.Gender,
|
||||
Gender = s.Gender < 2 ? s.Gender : default,
|
||||
IV_HP = s.IVs[0],
|
||||
IV_ATK = s.IVs[1],
|
||||
IV_DEF = s.IVs[2],
|
||||
|
|
|
@ -109,8 +109,8 @@ public static class GenerateMethodH
|
|||
var pid = GetPIDRegular(a, b);
|
||||
if (criteria.IsSpecifiedNature() && (Nature)(pid % 25) != criteria.Nature)
|
||||
{
|
||||
// Try again as Method 2 (BA-DE)
|
||||
var o = s >> 16;
|
||||
// Try again as Method 2 (AB-DE)
|
||||
var o = seed >> 16;
|
||||
pid = GetPIDRegular(o, a);
|
||||
if (criteria.IsSpecifiedNature() && (Nature)(pid % 25) != criteria.Nature)
|
||||
continue;
|
||||
|
@ -130,7 +130,7 @@ public static class GenerateMethodH
|
|||
return true;
|
||||
}
|
||||
|
||||
// Try again as Method 4 (BAC-E)
|
||||
// Try again as Method 4 (ABC-E)
|
||||
count = LCRNGReversalSkip.GetSeedsIVs(all, iv1 << 16, iv2 << 16);
|
||||
seeds = all[..count];
|
||||
foreach (ref var seed in seeds)
|
||||
|
@ -178,7 +178,7 @@ public static class GenerateMethodH
|
|||
if ((criteria.IsSpecifiedNature() && (Nature)(pid % 25) != criteria.Nature) || EntityPID.GetUnownForm3(pid) != enc.Form)
|
||||
{
|
||||
// Try again as Method 2 (BA-DE)
|
||||
var o = s >> 16;
|
||||
var o = seed >> 16;
|
||||
pid = GetPIDUnown(o, a);
|
||||
if (criteria.IsSpecifiedNature() && (Nature)(pid % 25) != criteria.Nature)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue