mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Handle gmax tox with latest showdown logic
This commit is contained in:
parent
8a1e73e5b3
commit
0a39e0a834
1 changed files with 10 additions and 8 deletions
|
@ -149,12 +149,6 @@ namespace PKHeX.Core
|
|||
|
||||
ParseLines(lines);
|
||||
|
||||
// Showdown Quirks
|
||||
if (Form == Gmax)
|
||||
{
|
||||
CanGigantamax = true;
|
||||
Form = string.Empty;
|
||||
}
|
||||
Form = ConvertFormFromShowdown(Form, Species, Ability);
|
||||
// Set Form
|
||||
if (Form.Length == 0)
|
||||
|
@ -285,7 +279,7 @@ namespace PKHeX.Core
|
|||
var result = new List<string>();
|
||||
|
||||
// First Line: Name, Nickname, Gender, Item
|
||||
var form = CanGigantamax ? Gmax : ConvertFormToShowdown(Form, Species);
|
||||
var form = ConvertFormToShowdown(Form, Species);
|
||||
result.Add(GetStringFirstLine(form));
|
||||
|
||||
// IVs
|
||||
|
@ -324,6 +318,9 @@ 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})";
|
||||
|
@ -502,6 +499,11 @@ namespace PKHeX.Core
|
|||
if ((Species = StringUtil.FindIndexIgnoreCase(Strings.specieslist, spec)) >= 0) // success, nothing else!
|
||||
return true;
|
||||
|
||||
if (spec.EndsWith(Gmax))
|
||||
{
|
||||
CanGigantamax = true;
|
||||
spec = spec.Substring(0, spec.Length - Gmax.Length);
|
||||
}
|
||||
// Forme string present.
|
||||
int end = spec.LastIndexOf('-');
|
||||
if (end < 0)
|
||||
|
@ -628,7 +630,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
|
||||
private const string Minior = "Meteor";
|
||||
private const string Gmax = "Gmax";
|
||||
private const string Gmax = "-Gmax";
|
||||
|
||||
private static string ConvertFormToShowdown(string form, int spec)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue