/// <summary> /// Gets the resource name of the Pokémon sprite. /// </summary> public static string GetResourceStringSprite(int species, int form, int gender, int generation = 8, bool shiny = false) { if (SpeciesDefaultFormSprite.Contains(species)) // Species who show their default sprite regardless of Form { form = 0; } switch (form) { case 30 when species >= (int)Species.Scatterbug && species <= (int)Species.Vivillon: // save file specific form = 0; break; case 31 when species == (int)Species.Unown || species == (int)Species.Deerling || species == (int)Species.Sawsbuck: // Random form = 0; break; } var sb = new StringBuilder(); { sb.Append(Separator); sb.Append(species); } if (form != 0) { sb.Append(Separator); sb.Append(form); if (species == (int)Species.Pikachu) { if (generation == 6) { sb.Append(Cosplay); } else if (form == 8) { sb.Append(GGStarter); } } else if (species == (int)Species.Eevee) { if (form == 1) { sb.Append(GGStarter); } } } else if (gender == 2 && SpeciesGenderedSprite.Contains(species)) { sb.Append('f'); } if (shiny && AllowShinySprite) { sb.Append(Shiny); } return(sb.ToString()); }
/// <summary> /// Gets the resource name of the Pokémon sprite. /// </summary> public static string GetResourceStringSprite(int species, int form, int gender, uint formarg, int generation = PKX.Generation, bool shiny = false) { if (SpeciesDefaultFormSprite.Contains(species)) // Species who show their default sprite regardless of Form { form = 0; } var sb = new StringBuilder(12); // longest expected string result sb.Append(Separator).Append(species); if (form != 0) { sb.Append(Separator).Append(form); if (species == (int)Species.Pikachu) { if (generation == 6) { sb.Append(Cosplay); gender = 1; // Cosplay Pikachu gift can only be Female, but personal entries are set to be either Gender } else if (form == 8) { sb.Append(GGStarter); } } else if (species == (int)Species.Eevee) { if (form == 1) { sb.Append(GGStarter); } } } if (gender == 1 && SpeciesGenderedSprite.Contains(species)) { sb.Append('f'); } if (species == (int)Species.Alcremie) { if (form == 0) { sb.Append(Separator).Append(form); } sb.Append(Separator).Append(formarg); } if (shiny && AllowShinySprite) { sb.Append(Shiny); } return(sb.ToString()); }
/// <summary> /// Gets the resource name of the Pokémon sprite. /// </summary> public static string GetResourceStringSprite(int species, int form, int gender, uint formarg, int generation = PKX.Generation, bool shiny = false) { if (SpeciesDefaultFormSprite.Contains(species)) // Species who show their default sprite regardless of Form { form = 0; } var sb = new StringBuilder(); sb.Append(Separator).Append(species); if (form != 0) { sb.Append(FormSeparator).Append(form); if (species == (int)Species.Pikachu) { if (generation == 6) { sb.Append(Cosplay); } else if (form == 8) { sb.Append(GGStarter); } } else if (species == (int)Species.Eevee) { if (form == 1) { sb.Append(GGStarter); } } } if (gender == 1 && SpeciesGenderedSprite.Contains(species)) { sb.Append('f'); } if (species == (int)Species.Alcremie) { if (form == 0) { sb.Append(FormSeparator).Append(form); } sb.Append(FormSeparator).Append(formarg); } if (shiny && AllowShinySprite) { sb.Append(Shiny); } return(sb.ToString()); }
/// <summary> /// Gets the resource name of the Pokémon sprite. /// </summary> public static string GetResourceStringSprite(int species, int form, int gender, int generation = 8, bool shiny = false, bool gmax = false) { if (SpeciesDefaultFormSprite.Contains(species) && !gmax) // Species who show their default sprite regardless of Form { form = 0; } if (gmax && species is (int)Species.Toxtricity or(int) Species.Alcremie) // same sprites for all altform gmaxes { form = 0; } switch (form) { case 30 when species is >= (int)Species.Scatterbug and <= (int)Species.Vivillon: // save file specific form = 0; break; case 31 when species is (int)Species.Unown or(int) Species.Deerling or(int) Species.Sawsbuck: // Random form = 0; break; } var sb = new StringBuilder(); sb.Append(Separator).Append(species); if (form != 0) { sb.Append(Separator) .Append(form); if (species == (int)Species.Pikachu) { if (generation == 6) { sb.Append(Cosplay); gender = 2; // Cosplay Pikachu gift can only be Female, but personal entries are set to be either Gender } else if (form == 8) { sb.Append(GGStarter); } } else if (species == (int)Species.Eevee) { if (form == 1) { sb.Append(GGStarter); } } } if (gender == 2 && SpeciesGenderedSprite.Contains(species) && !gmax) { sb.Append('f'); } if (gmax && AllowGigantamaxSprite) { sb.Append(Separator); sb.Append(Gigantamax); } if (shiny && AllowShinySprite) { sb.Append(Shiny); } return(sb.ToString()); }