mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 14:20:15 -05: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:
@@ -104,6 +104,21 @@ private void LoadLines(IEnumerable<string> 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(')'))
|
||||
|
||||
Reference in New Issue
Block a user