From fac7555c50fd9ce2d92f15367dc5a1f43bcb861c Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 19 May 2021 13:12:18 -0700 Subject: [PATCH] postfix gender form handle all permutations of Indeedee-M/F (M/F) if it detects (F), it uses female, otherwise it uses whatever the detected form was (0/1) and sets the values accordingly. --- PKHeX.Core/Editing/Showdown/ShowdownSet.cs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/PKHeX.Core/Editing/Showdown/ShowdownSet.cs b/PKHeX.Core/Editing/Showdown/ShowdownSet.cs index 952ddf78e..1b1ef6277 100644 --- a/PKHeX.Core/Editing/Showdown/ShowdownSet.cs +++ b/PKHeX.Core/Editing/Showdown/ShowdownSet.cs @@ -104,6 +104,21 @@ private void LoadLines(IEnumerable lines) FormName = ShowdownParsing.SetShowdownFormName(Species, FormName, Ability); Form = ShowdownParsing.GetFormFromString(FormName, Strings, Species, Format); + + // Handle edge case with fixed-gender forms. + if (Species is (int) Meowstic or (int) Indeedee) + { + if (Gender == 1) // Recognized with (F) + { + FormName = "F"; + Form = 1; + } + else + { + FormName = Form == 1 ? "F" : "M"; + Gender = Form; + } + } } private const int MaxMoveCount = 4; @@ -411,12 +426,6 @@ private void ParseFirstLineNoItem(string line) line = line[..^3]; Gender = 1; } - else // Meowstic Edge Case with no gender provided - { - var s = Strings.Species; - if (line.Contains(s[(int)Meowstic]) || line.Contains(s[(int)Indeedee])) - Gender = 0; - } // Nickname Detection if (line.Contains('(') && line.Contains(')'))