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.
This commit is contained in:
Kurt 2021-05-19 13:12:18 -07:00
parent fc8f9ebd56
commit fac7555c50

View file

@ -104,6 +104,21 @@ namespace PKHeX.Core
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 @@ namespace PKHeX.Core
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(')'))