mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
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:
parent
fc8f9ebd56
commit
fac7555c50
1 changed files with 15 additions and 6 deletions
|
@ -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(')'))
|
||||
|
|
Loading…
Reference in a new issue