update showdownset parsing for new gmax impl (#2957)

Gigantamax: Yes is now in a new line instead of -Gmax. Have maintained legacy support since showdown is supporting legacy as well. Set the export to the newer format.
This commit is contained in:
Archit Date 2020-07-31 11:16:57 +08:00 committed by GitHub
parent 05ac8acb5f
commit fa3bdfe5f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,6 +172,7 @@ namespace PKHeX.Core
{
case "Trait": case "Ability": return (Ability = StringUtil.FindIndexIgnoreCase(Strings.abilitylist, value)) >= 0;
case "Shiny": return Shiny = value.Trim() == "Yes";
case "Gigantamax": return CanGigantamax = value.Trim() == "Yes";
case "Nature": return (Nature = StringUtil.FindIndexIgnoreCase(Strings.natures, value)) >= 0;
case "EV": case "EVs": ParseLineEVs(value); return true;
case "IV": case "IVs": ParseLineIVs(value); return true;
@ -250,6 +251,8 @@ namespace PKHeX.Core
result.Add($"Ability: {Strings.Ability[Ability]}");
if (Level != 100)
result.Add($"Level: {Level}");
if (CanGigantamax)
result.Add("Gigantamax: Yes");
if (Shiny)
result.Add("Shiny: Yes");
@ -271,9 +274,6 @@ namespace PKHeX.Core
else if (Species == (int)Core.Species.NidoranF)
specForm = specForm.Replace("♀", "-F");
if (CanGigantamax)
specForm += Gmax;
string result = GetSpeciesNickname(specForm);
if (Gender.Length != 0)
result += $" ({Gender})";