mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Handle suggestions
This commit is contained in:
parent
51090d0be8
commit
38809f67dd
2 changed files with 7 additions and 11 deletions
|
@ -78,7 +78,7 @@ namespace PKHeX.Core
|
|||
for (var i = 0; i < ivs.Length; i++)
|
||||
{
|
||||
if (ivs[i] == UNSET)
|
||||
ivs[i] = (int)xors.NextInt(0, MAX + 1);
|
||||
ivs[i] = xors.NextInt(0, MAX + 1);
|
||||
}
|
||||
|
||||
if (!criteria.IsIVsCompatible(ivs, 8))
|
||||
|
@ -116,11 +116,10 @@ namespace PKHeX.Core
|
|||
pk.Gender = next;
|
||||
}
|
||||
|
||||
// Skip nature, assuming Synchronize
|
||||
if (criteria.Nature >= 0 && (int)criteria.Nature < 25)
|
||||
pk.Nature = (int)criteria.Nature;
|
||||
else
|
||||
if (criteria.Nature is Nature.Random)
|
||||
pk.Nature = (int)xors.NextUInt(25);
|
||||
else // Skip nature, assuming Synchronize
|
||||
pk.Nature = (int)criteria.Nature;
|
||||
pk.StatNature = pk.Nature;
|
||||
|
||||
// Remainder
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
using PKHeX.Core;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
|
||||
namespace PKHeX.Core.Tests.Legality
|
||||
|
@ -12,8 +9,8 @@ namespace PKHeX.Core.Tests.Legality
|
|||
public static void TryGenerateLatias()
|
||||
{
|
||||
PB8 test = new() { Species = (int)Species.Latias};
|
||||
ulong s0 = 0xdf9cf5c73e4a160b;
|
||||
ulong s1 = 0xd0b8383103a7f201;
|
||||
const ulong s0 = 0xdf9cf5c73e4a160b;
|
||||
const ulong s1 = 0xd0b8383103a7f201;
|
||||
Wild8bRNG.TryApplyFromSeed(test, EncounterCriteria.Unrestricted, Shiny.Random, 3, new XorShift128(s0, s1));
|
||||
test.IV_HP.Should().Be(31);
|
||||
test.IV_ATK.Should().Be(4);
|
||||
|
|
Loading…
Reference in a new issue