mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
88830e0d00
Updates from net46->net7, dropping support for mono in favor of using the latest runtime (along with the performance/API improvements). Releases will be posted as 64bit only for now. Refactors a good amount of internal API methods to be more performant and more customizable for future updates & fixes. Adds functionality for Batch Editor commands to `>`, `<` and <=/>= TID/SID properties renamed to TID16/SID16 for clarity; other properties exposed for Gen7 / display variants. Main window has a new layout to account for DPI scaling (8 point grid) Fixed: Tatsugiri and Paldean Tauros now output Showdown form names as Showdown expects Changed: Gen9 species now interact based on the confirmed National Dex IDs (closes #3724) Fixed: Pokedex set all no longer clears species with unavailable non-base forms (closes #3720) Changed: Hyper Training suggestions now apply for level 50 in SV. (closes #3714) Fixed: B2/W2 hatched egg met locations exclusive to specific versions are now explicitly checked (closes #3691) Added: Properties for ribbon/mark count (closes #3659) Fixed: Traded SV eggs are now checked correctly (closes #3692)
67 lines
1.9 KiB
C#
67 lines
1.9 KiB
C#
using FluentAssertions;
|
|
using Xunit;
|
|
|
|
namespace PKHeX.Core.Tests.Legality;
|
|
|
|
public static class Wild8aRNGTests
|
|
{
|
|
[Fact]
|
|
public static void TryGenerateShinyOutbreakZorua()
|
|
{
|
|
PA8 test = new() { Species = (int)Species.Zorua, Form = 1 };
|
|
const ulong s0 = 0xDF440DA44EEC4FFB;
|
|
|
|
var param = new OverworldParam8a
|
|
{
|
|
FlawlessIVs = 0, IsAlpha = false,
|
|
Shiny = Shiny.Random, RollCount = 30,
|
|
GenderRatio = 0x7F,
|
|
};
|
|
|
|
var result = Overworld8aRNG.TryApplyFromSeed(test, EncounterCriteria.Unrestricted, param, s0);
|
|
result.Should().BeTrue();
|
|
|
|
test.IV_HP.Should().Be(10);
|
|
test.IV_ATK.Should().Be(13);
|
|
test.IV_DEF.Should().Be(8);
|
|
test.IV_SPA.Should().Be(0);
|
|
test.IV_SPD.Should().Be(17);
|
|
test.IV_SPE.Should().Be(25);
|
|
test.HeightScalar.Should().Be(99);
|
|
test.WeightScalar.Should().Be(153);
|
|
|
|
var verify = Overworld8aRNG.Verify(test, s0, param);
|
|
verify.Should().BeTrue();
|
|
}
|
|
|
|
[Fact]
|
|
public static void TestMagby()
|
|
{
|
|
const ulong s0 = 0xE12DDECBDFC64AA1ul;
|
|
PA8 test = new() { Species = (int)Species.Magby };
|
|
|
|
var param = new OverworldParam8a
|
|
{
|
|
FlawlessIVs = 3,
|
|
IsAlpha = true,
|
|
Shiny = Shiny.Random,
|
|
RollCount = 17,
|
|
GenderRatio = 0x7F,
|
|
};
|
|
|
|
var xoro = new Xoroshiro128Plus(s0);
|
|
var (EntitySeed, _) = Overworld8aRNG.ApplyDetails(test, param, true, ref xoro);
|
|
|
|
test.IV_HP.Should().Be(31);
|
|
test.IV_ATK.Should().Be(31);
|
|
test.IV_DEF.Should().Be(7);
|
|
test.IV_SPA.Should().Be(31);
|
|
test.IV_SPD.Should().Be(20);
|
|
test.IV_SPE.Should().Be(10);
|
|
|
|
test.AlphaMove.Should().Be((ushort)Move.Flamethrower);
|
|
|
|
var verify = Overworld8aRNG.Verify(test, EntitySeed, param);
|
|
verify.Should().BeTrue();
|
|
}
|
|
}
|