mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-03-21 17:48:28 -05:00
* Update to .NET 10 * Property fields * API signature updates * Extension method blocks * Completed dark mode support Outside of my control: - vertical tab control (pkm editor) - datetimepicker controls - lgpe event flags (no idea) - some control types having white-borders when they should really be gray Box background is 50% transparency to effectively darken the image. * Custom legality report popup * Event diff dialog, version select dialog * Add quick overwrite popup for export sav * Extension methods * Dark Mode: glow currently editing sprite * Add invalid encounter hint for trade evolutions * Extension properties * Append legality hint on hover card * Slot image loading: clear the screen-reader description if a slot is empty/invalid, rather than retain the previous description. Changing boxes would easily confuse users on this.
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using FluentAssertions;
|
|
using Xunit;
|
|
|
|
namespace PKHeX.Core.Tests.Legality;
|
|
|
|
public class LegalityData
|
|
{
|
|
[Theory]
|
|
[InlineData(Species.Feebas, 0)] // feebas, see issue #2394
|
|
[InlineData(Species.Crabrawler, 0)] // SV Crabrawler added a second, UseItem evolution method. Need to be sure it's before the more restrictive level-up method.
|
|
public void EvolutionsOrdered(Species species, byte form)
|
|
{
|
|
int count = 0;
|
|
for (var context = EntityContext.None + 1; context < EntityContext.MaxInvalid; context++)
|
|
{
|
|
if (!context.IsValid)
|
|
continue;
|
|
|
|
var tree = EvolutionTree.GetEvolutionTree(context);
|
|
var possible = tree.Forward.GetForward((ushort)species, form).Span;
|
|
if (possible.Length <= 1)
|
|
continue;
|
|
|
|
var t1 = possible[0].Method;
|
|
var t2 = possible[1].Method;
|
|
|
|
t1.IsLevelUpRequired.Should().BeFalse();
|
|
t2.IsLevelUpRequired.Should().BeTrue();
|
|
|
|
count++;
|
|
}
|
|
|
|
count.Should().BeGreaterThan(0);
|
|
}
|
|
}
|