mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Fix eevee dist check (missing rand100)
Reorder calls so the runtime can overwrite the xoroshiro registers if needed
This commit is contained in:
parent
ccac23bb6d
commit
c550d41630
1 changed files with 5 additions and 3 deletions
|
@ -109,7 +109,7 @@ public sealed record EncounterDist9 : EncounterStatic, IGemType, ITeraRaid9
|
|||
if (GetIsPossibleSlot(seed, i))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
return StageNone;
|
||||
}
|
||||
|
||||
private bool GetIsPossibleSlot(uint seed, int stage)
|
||||
|
@ -117,9 +117,10 @@ public sealed record EncounterDist9 : EncounterStatic, IGemType, ITeraRaid9
|
|||
var totalScarlet = GetRandRateTotalScarlet(stage);
|
||||
if (totalScarlet != 0)
|
||||
{
|
||||
var min = GetRandRateMinScarlet(stage);
|
||||
var rand = new Xoroshiro128Plus(seed);
|
||||
_ = rand.NextInt(100);
|
||||
var val = rand.NextInt(totalScarlet);
|
||||
var min = GetRandRateMinScarlet(stage);
|
||||
if ((uint)((int)val - min) < RandRate)
|
||||
return true;
|
||||
}
|
||||
|
@ -127,9 +128,10 @@ public sealed record EncounterDist9 : EncounterStatic, IGemType, ITeraRaid9
|
|||
var totalViolet = GetRandRateTotalViolet(stage);
|
||||
if (totalViolet != 0)
|
||||
{
|
||||
var min = GetRandRateMinViolet(stage);
|
||||
var rand = new Xoroshiro128Plus(seed);
|
||||
_ = rand.NextInt(100);
|
||||
var val = rand.NextInt(totalViolet);
|
||||
var min = GetRandRateMinViolet(stage);
|
||||
if ((uint)((int)val - min) < RandRate)
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue