Skip to content

Commit

Permalink
Update ChannelJirachi.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
kwsch committed Mar 25, 2024
1 parent c95d56b commit bf476f4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions PKHeX.Core/Legality/RNG/ClassicEra/Gen3/ChannelJirachi.cs
Expand Up @@ -68,7 +68,7 @@ public static bool IsValidAccept(ref uint seed, uint acceptPivot)
if (acceptPivot == 0) // 8 advances total
{
// 2: 25% fails, 33% fails. 2 advances. ~50.25% chance of success.
seed = XDRNG.Prev2(seed); // 2
seed = XDRNG.Prev(seed); // 2
if (XDRNG.Prev16(ref seed) <= 0x547A) // 33% should fail
return false;
if (XDRNG.Prev16(ref seed) <= 0x4000) // 25% should fail
Expand All @@ -77,20 +77,18 @@ public static bool IsValidAccept(ref uint seed, uint acceptPivot)
else if (acceptPivot == 1) // 6 advances total
{
// 0: 25% passes, 33% unchecked. 1 advance. 25% chance of success.
seed = XDRNG.Prev(seed); // 1
if (XDRNG.Prev16(ref seed) > 0x4000) // 25% should pass
return false;
}
else // 7 advances total
{
// 25% fails, 33% passes. 1 advance. 24.75% chance of success.
seed = XDRNG.Prev(seed); // 1
if (XDRNG.Prev16(ref seed) > 0x547A) // 33% should pass
return false;
if (XDRNG.Prev16(ref seed) <= 0x4000) // 25% should fail
return false;
}
seed = XDRNG.Prev4(seed);
seed = XDRNG.Prev5(seed);
return true;
}

Expand Down

0 comments on commit bf476f4

Please sign in to comment.