mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 13:58:33 +00:00
Fix Showdown Mega-X/Y Form parsing
Thanks Odaxis!
This commit is contained in:
parent
f83efd5142
commit
600159362e
1 changed files with 5 additions and 1 deletions
|
@ -1328,6 +1328,8 @@ namespace PKHeX
|
||||||
if (tmp.Length < 2) return;
|
if (tmp.Length < 2) return;
|
||||||
Species = Array.IndexOf(species, tmp[0].Replace(" ", ""));
|
Species = Array.IndexOf(species, tmp[0].Replace(" ", ""));
|
||||||
Form = tmp[1].Replace(" ", "");
|
Form = tmp[1].Replace(" ", "");
|
||||||
|
if (tmp.Length > 2)
|
||||||
|
Form += " " + tmp[2];
|
||||||
}
|
}
|
||||||
if (Species < -1)
|
if (Species < -1)
|
||||||
return;
|
return;
|
||||||
|
@ -1416,6 +1418,8 @@ namespace PKHeX
|
||||||
string[] tmp = spec.Split(new[] { "-" }, StringSplitOptions.None);
|
string[] tmp = spec.Split(new[] { "-" }, StringSplitOptions.None);
|
||||||
Species = Array.IndexOf(species, tmp[0].Replace(" ", ""));
|
Species = Array.IndexOf(species, tmp[0].Replace(" ", ""));
|
||||||
Form = tmp[1].Replace(" ", "");
|
Form = tmp[1].Replace(" ", "");
|
||||||
|
if (tmp.Length > 2)
|
||||||
|
Form += " " + tmp[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (brokenline[0].Contains("Nature"))
|
else if (brokenline[0].Contains("Nature"))
|
||||||
|
@ -1433,7 +1437,7 @@ namespace PKHeX
|
||||||
|
|
||||||
// First Line: Name, Nickname, Gender, Item
|
// First Line: Name, Nickname, Gender, Item
|
||||||
string result = string.Format(species[Species] != Nickname ? "{0} ({1})" : "{1}", Nickname,
|
string result = string.Format(species[Species] != Nickname ? "{0} ({1})" : "{1}", Nickname,
|
||||||
species[Species] + ((Form ?? "") != "" ? "-" + Form : "")) // Species (& Form if necessary)
|
species[Species] + ((Form ?? "") != "" ? "-" + Form.Replace("Mega ", "Mega-") : "")) // Species (& Form if necessary)
|
||||||
+ Gender + (Item != 0 ? " @ " + items[Item] : "") + Environment.NewLine;
|
+ Gender + (Item != 0 ? " @ " + items[Item] : "") + Environment.NewLine;
|
||||||
|
|
||||||
// IVs
|
// IVs
|
||||||
|
|
Loading…
Add table
Reference in a new issue