diff --git a/PKHeX.Core/PKM/ShowdownSet.cs b/PKHeX.Core/PKM/ShowdownSet.cs index 2d368138f..ca7fdec60 100644 --- a/PKHeX.Core/PKM/ShowdownSet.cs +++ b/PKHeX.Core/PKM/ShowdownSet.cs @@ -188,7 +188,8 @@ private string GetText() // Secondary Stats if (Ability > -1 && Ability < abilities.Length) result.Add($"Ability: {abilities[Ability]}"); - result.Add($"Level: {Level}"); + if (Level != 100) + result.Add($"Level: {Level}"); if (Shiny) result.Add("Shiny: Yes"); diff --git a/Tests/PKHeX.Tests/Simulator/ShowdownSetTests.cs b/Tests/PKHeX.Tests/Simulator/ShowdownSetTests.cs index 96630a762..173477ed0 100644 --- a/Tests/PKHeX.Tests/Simulator/ShowdownSetTests.cs +++ b/Tests/PKHeX.Tests/Simulator/ShowdownSetTests.cs @@ -14,9 +14,12 @@ public class ShowdownSetTests [TestCategory(SimulatorParse)] public void SimulatorGetParse() { - var set = new ShowdownSet(SetGlaceonUSUMTutor); - string Sanitize(string str) => str.Replace("\r\n", "").Replace("\n", ""); - Assert.IsTrue(Sanitize(SetGlaceonUSUMTutor) == Sanitize(set.Text)); + foreach (var setstr in Sets) + { + var set = new ShowdownSet(setstr).Text; + var lines = set.Split('\n').Select(z => z.Trim()); + Assert.IsTrue(lines.All(z => setstr.Contains(z)), setstr); + } } [TestMethod] @@ -84,5 +87,18 @@ Modest Nature - Shadow Ball - Hyper Voice"; + private static readonly string[] Sets = + { + SetGlaceonUSUMTutor, + +@"Greninja @ Choice Specs +Ability: Battle Bond +EVs: 252 SpA / 4 SpD / 252 Spe +Timid Nature +- Hydro Pump +- Spikes +- Water Shuriken +- Dark Pulse", + }; } }