mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 16:27:21 +00:00
Adjust forme export edge cases
Showdown handles these formes their own way. Match their format when exporting formes. Closes #666
This commit is contained in:
parent
2da2af5ac7
commit
a6e84f5aa9
1 changed files with 32 additions and 2 deletions
|
@ -137,16 +137,46 @@ namespace PKHeX
|
||||||
|
|
||||||
IVs = IVsSpeedFirst;
|
IVs = IVsSpeedFirst;
|
||||||
EVs = EVsSpeedFirst;
|
EVs = EVsSpeedFirst;
|
||||||
|
|
||||||
|
// Showdown Quirks
|
||||||
|
switch (Species)
|
||||||
|
{
|
||||||
|
case 718: // Zygarde
|
||||||
|
if (string.IsNullOrEmpty(Form)) Form = "50%";
|
||||||
|
else if (Form == "Complete") Form = "100%";
|
||||||
|
if (Ability == 211) Form += "-C"; // Power Construct
|
||||||
|
break;
|
||||||
|
case 774: // Minior
|
||||||
|
if (!string.IsNullOrWhiteSpace(Form) && Form != "Meteor")
|
||||||
|
Form = "C-" + Form;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public string getText()
|
public string getText()
|
||||||
{
|
{
|
||||||
if (Species == 0 || Species > MAX_SPECIES)
|
if (Species == 0 || Species > MAX_SPECIES)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
// Showdown Quirks
|
||||||
|
string form = Form;
|
||||||
|
switch (Species)
|
||||||
|
{
|
||||||
|
case 718: // Zygarde
|
||||||
|
form = form.Replace("-C", "");
|
||||||
|
form = form.Replace("50%", "");
|
||||||
|
form = form.Replace("100%", "Complete");
|
||||||
|
break;
|
||||||
|
case 774: // Minior
|
||||||
|
if (string.IsNullOrWhiteSpace(form) || form.StartsWith("M-"))
|
||||||
|
form = "Meteor";
|
||||||
|
form = form.Replace("C-", "");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// First Line: Name, Nickname, Gender, Item
|
// First Line: Name, Nickname, Gender, Item
|
||||||
string specForm = species[Species];
|
string specForm = species[Species];
|
||||||
if (!string.IsNullOrWhiteSpace(Form))
|
if (!string.IsNullOrWhiteSpace(form))
|
||||||
specForm += "-" + Form.Replace("Mega ", "Mega-");
|
specForm += "-" + form.Replace("Mega ", "Mega-");
|
||||||
|
|
||||||
string result = Nickname != null && species[Species] != Nickname ? $"{Nickname} ({specForm})" : $"{specForm}";
|
string result = Nickname != null && species[Species] != Nickname ? $"{Nickname} ({specForm})" : $"{specForm}";
|
||||||
if (!string.IsNullOrEmpty(Gender))
|
if (!string.IsNullOrEmpty(Gender))
|
||||||
|
|
Loading…
Reference in a new issue