mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Remove old showdown set aliases
Don't need to support sets that don't follow the current standard.
This commit is contained in:
parent
d6e83362b3
commit
20dcb8d407
1 changed files with 11 additions and 20 deletions
|
@ -202,15 +202,15 @@ public sealed class ShowdownSet : IBattleTemplate
|
||||||
|
|
||||||
private bool ParseEntry(string identifier, string value) => identifier switch
|
private bool ParseEntry(string identifier, string value) => identifier switch
|
||||||
{
|
{
|
||||||
"Ability" or "Trait" => (Ability = StringUtil.FindIndexIgnoreCase(Strings.abilitylist, value)) >= 0,
|
"Ability" => (Ability = StringUtil.FindIndexIgnoreCase(Strings.abilitylist, value)) >= 0,
|
||||||
"Nature" => (Nature = StringUtil.FindIndexIgnoreCase(Strings.natures , value)) >= 0,
|
"Nature" => (Nature = StringUtil.FindIndexIgnoreCase(Strings.natures , value)) >= 0,
|
||||||
"Shiny" => Shiny = StringUtil.IsMatchIgnoreCase("Yes", value),
|
"Shiny" => Shiny = StringUtil.IsMatchIgnoreCase("Yes", value),
|
||||||
"Gigantamax" => CanGigantamax = StringUtil.IsMatchIgnoreCase("Yes", value),
|
"Gigantamax" => CanGigantamax = StringUtil.IsMatchIgnoreCase("Yes", value),
|
||||||
"Friendship" or "Happiness" => ParseFriendship(value),
|
"Friendship" => ParseFriendship(value),
|
||||||
"EV" or "EVs" => ParseLineEVs(value),
|
"EVs" => ParseLineEVs(value),
|
||||||
"IV" or "IVs" => ParseLineIVs(value),
|
"IVs" => ParseLineIVs(value),
|
||||||
"Level" => ParseLevel(value),
|
"Level" => ParseLevel(value),
|
||||||
"Dynamax Level" => ParseDynamax(value),
|
"Dynamax Level" => ParseDynamax(value),
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ public sealed class ShowdownSet : IBattleTemplate
|
||||||
|
|
||||||
private bool ParseLineEVs(string line)
|
private bool ParseLineEVs(string line)
|
||||||
{
|
{
|
||||||
var list = SplitLineStats(line);
|
var list = line.Split(StatSplitters, StringSplitOptions.None);
|
||||||
if ((list.Length & 1) == 1)
|
if ((list.Length & 1) == 1)
|
||||||
InvalidLines.Add("Unknown EV input.");
|
InvalidLines.Add("Unknown EV input.");
|
||||||
for (int i = 0; i < list.Length / 2; i++)
|
for (int i = 0; i < list.Length / 2; i++)
|
||||||
|
@ -656,7 +656,7 @@ public sealed class ShowdownSet : IBattleTemplate
|
||||||
|
|
||||||
private bool ParseLineIVs(string line)
|
private bool ParseLineIVs(string line)
|
||||||
{
|
{
|
||||||
var list = SplitLineStats(line);
|
var list = line.Split(StatSplitters, StringSplitOptions.None);
|
||||||
if ((list.Length & 1) == 1)
|
if ((list.Length & 1) == 1)
|
||||||
InvalidLines.Add("Unknown IV input.");
|
InvalidLines.Add("Unknown IV input.");
|
||||||
for (int i = 0; i < list.Length / 2; i++)
|
for (int i = 0; i < list.Length / 2; i++)
|
||||||
|
@ -687,13 +687,4 @@ public sealed class ShowdownSet : IBattleTemplate
|
||||||
return original;
|
return original;
|
||||||
return new string(result[..ctr].ToArray());
|
return new string(result[..ctr].ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string[] SplitLineStats(string line)
|
|
||||||
{
|
|
||||||
// Because people think they can type sets out...
|
|
||||||
return line
|
|
||||||
.Replace("SAtk", "SpA").Replace("Sp Atk", "SpA")
|
|
||||||
.Replace("SDef", "SpD").Replace("Sp Def", "SpD")
|
|
||||||
.Replace("Spd", "Spe").Replace("Speed", "Spe").Split(StatSplitters, StringSplitOptions.None);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue