mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Next seed if activation fails
ty santacrab for pointing this out
This commit is contained in:
parent
1faef958a7
commit
84363eb8eb
3 changed files with 9 additions and 0 deletions
|
@ -22,8 +22,11 @@ public static class GenerateMethodH
|
||||||
{
|
{
|
||||||
var check = new LeadSeed(seed, LeadRequired.None);
|
var check = new LeadSeed(seed, LeadRequired.None);
|
||||||
if (!MethodH.CheckEncounterActivation(enc, ref check))
|
if (!MethodH.CheckEncounterActivation(enc, ref check))
|
||||||
|
{
|
||||||
|
seed = LCRNG.Next(seed);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var esv = LCRNG.Next16(ref seed) % 100;
|
var esv = LCRNG.Next16(ref seed) % 100;
|
||||||
if (esv < min || esv > max)
|
if (esv < min || esv > max)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -32,8 +32,11 @@ public static class GenerateMethodJ
|
||||||
{
|
{
|
||||||
var check = new LeadSeed(seed, LeadRequired.None);
|
var check = new LeadSeed(seed, LeadRequired.None);
|
||||||
if (!MethodJ.CheckEncounterActivation(enc, ref check))
|
if (!MethodJ.CheckEncounterActivation(enc, ref check))
|
||||||
|
{
|
||||||
|
seed = LCRNG.Next(seed);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var esv = LCRNG.Next16(ref seed) / 656;
|
var esv = LCRNG.Next16(ref seed) / 656;
|
||||||
if (esv < min || esv > max)
|
if (esv < min || esv > max)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -33,8 +33,11 @@ public static class GenerateMethodK
|
||||||
{
|
{
|
||||||
var check = new LeadSeed(seed, LeadRequired.None);
|
var check = new LeadSeed(seed, LeadRequired.None);
|
||||||
if (!MethodK.CheckEncounterActivation(enc, ref check))
|
if (!MethodK.CheckEncounterActivation(enc, ref check))
|
||||||
|
{
|
||||||
|
seed = LCRNG.Next(seed);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var esv = LCRNG.Next16(ref seed) % modulo;
|
var esv = LCRNG.Next16(ref seed) % modulo;
|
||||||
if (esv < min || esv > max)
|
if (esv < min || esv > max)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue