diff --git a/pkNX.Randomization/Randomizers/EvolutionRandomizer.cs b/pkNX.Randomization/Randomizers/EvolutionRandomizer.cs index 8a13dfae..6c302f91 100644 --- a/pkNX.Randomization/Randomizers/EvolutionRandomizer.cs +++ b/pkNX.Randomization/Randomizers/EvolutionRandomizer.cs @@ -73,10 +73,10 @@ private void ReplaceTradeMethod(EvolutionMethod evo, int species, int evoIndex) return; case EvolutionType.TradeSpecies: evo.Method = EvolutionType.LevelUpWithTeammate; - if (species == 588) - evo.Argument = 616; // Karrablast with Shelmet - if (species == 616) - evo.Argument = 588; // Shelmet with Karrablast + if (species == (int)Species.Karrablast) + evo.Argument = (int)Species.Shelmet; // Karrablast with Shelmet + if (species == (int)Species.Shelmet) + evo.Argument = (int)Species.Karrablast; // Shelmet with Karrablast return; case EvolutionType.LevelUpVersion: diff --git a/pkNX.Randomization/Randomizers/FormRandomizer.cs b/pkNX.Randomization/Randomizers/FormRandomizer.cs index 9be73821..7a52f066 100644 --- a/pkNX.Randomization/Randomizers/FormRandomizer.cs +++ b/pkNX.Randomization/Randomizers/FormRandomizer.cs @@ -1,5 +1,6 @@ using pkNX.Structures; using System.Linq; +using static pkNX.Structures.Species; namespace pkNX.Randomization { @@ -23,33 +24,33 @@ public int GetRandomForme(int species, PersonalInfo[] stats = null) if (stats[species].FormeCount <= 1) return 0; - switch (species) + switch ((Species)species) { - case 201: // Unown - case 586: // Sawsbuck + case Unown: + case Sawsbuck: return 31; // Random - case 658 when !AllowMega: + case Greninja when !AllowMega: return 0; - case 664: - case 665: - case 666: // Vivillon evo chain + case Scatterbug: + case Spewpa: + case Vivillon: return 30; // save file specific - case 774: // Minior + case Minior: return Util.Random.Next(7); - case 890: // Eternatus + case Eternatus: return 0; // Galarian Forms - case 052 when AllowGalarianForm: // Galarian Meowth is altform 2 + case Meowth when AllowGalarianForm: // Galarian Meowth is altform 2 return Util.Random.Next(3); - case 555 when AllowGalarianForm: // Galarian Darmanitan is altform 2, Galarian Zen is altform 3 + case Darmanitan when AllowGalarianForm: // Galarian Darmanitan is altform 2, Galarian Zen is altform 3 return Util.Random.Next(4); } if (AllowAlolanForm && Legal.EvolveToAlolanForms.Contains(species)) return Util.Random.Next(2); if (AllowGalarianForm && Legal.EvolveToGalarForms.Contains(species)) - return species == 079 ? 1 : Util.Random.Next(2); + return species == (int)Slowpoke ? 1 : Util.Random.Next(2); if (!Legal.BattleExclusiveForms.Contains(species) || AllowMega) return Util.Random.Next(stats[species].FormeCount); // Slot-Random return 0; diff --git a/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs b/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs index b6d94523..9475e92d 100644 --- a/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs +++ b/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs @@ -322,7 +322,7 @@ private void RandomizeTypeTutors(PersonalInfo z, int species) t[i] = Rand.Next(100) < Settings.LearnTypeTutorPercent; // Make sure Rayquaza can learn Dragon Ascent. - if (!Game.XY && species == 384) + if (!Game.XY && species == (int)Species.Rayquaza) t[7] = true; z.TypeTutors = t; diff --git a/pkNX.Randomization/Randomizers/TrainerRandomizer.cs b/pkNX.Randomization/Randomizers/TrainerRandomizer.cs index 9af960c3..ced60aa3 100644 --- a/pkNX.Randomization/Randomizers/TrainerRandomizer.cs +++ b/pkNX.Randomization/Randomizers/TrainerRandomizer.cs @@ -206,15 +206,15 @@ private int TryForceEvolve(IReadOnlyList evos, ref int species, re var index = Personal.GetFormeIndex(species, form); var eSet = evos[index].PossibleEvolutions; int evoCount = eSet.Count(z => z.HasData); - if (evoCount == 0 && species != 808) + if (evoCount == 0 && species != (int)Species.Meltan) break; ++timesEvolved; var next = Util.Random.Next(evoCount); var nextEvo = eSet[next]; // Meltan only evolves in GO, so force evolve if no custom evo method has been added - if (evoCount == 0 && species == 808) - species = 809; + if (evoCount == 0 && species == (int)Species.Meltan) + species = (int)Species.Melmetal; else species = nextEvo.Species; @@ -244,8 +244,15 @@ private void UpdatePKMFromSettings(TrainerPoke pk) { if (Settings.GigantamaxSwap && c.CanGigantamax) { + // we only want to add gmax legendaries/mythicals if the user's settings allow so + var SpeciesSettings = new SpeciesSettings(); + // if (SpeciesSettings.Legends) + // GigantamaxForms.Concat(new[] {(int)Species.Urshifu}); + if (SpeciesSettings.Events) + GigantamaxForms.Concat(new[] {(int)Species.Melmetal}); + c.Species = GigantamaxForms[Util.Random.Next(GigantamaxForms.Length)]; - c.Form = c.Species == 025 || c.Species == 052 ? 0 : Legal.GetRandomForme(c.Species, false, false, false, Personal); // Pikachu & Meowth altforms can't gmax + c.Form = c.Species == (int)Species.Pikachu || c.Species == (int)Species.Meowth ? 0 : Legal.GetRandomForme(c.Species, false, false, false, Personal); // Pikachu & Meowth altforms can't gmax } if (Settings.MaxDynamaxLevel && c.CanDynamax) c.DynamaxLevel = 10; diff --git a/pkNX.Sprites/FormConverter.cs b/pkNX.Sprites/FormConverter.cs index d04a39d2..0d4eef5f 100644 --- a/pkNX.Sprites/FormConverter.cs +++ b/pkNX.Sprites/FormConverter.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using pkNX.Structures; +using static pkNX.Structures.Species; namespace pkNX.Sprites { @@ -13,7 +14,7 @@ public static bool IsTotemForm(int species, int form, int generation = 7) return false; if (!Legal.Totem_USUM.Contains(species)) return false; - if (species == 778) // Mimikyu + if (species == (int)Mimikyu) return form == 2 || form == 3; if (Legal.Totem_Alolan.Contains(species)) return form == 2; @@ -22,21 +23,21 @@ public static bool IsTotemForm(int species, int form, int generation = 7) public static int GetTotemBaseForm(int species, int form) { - if (species == 778) // Mimikyu + if (species == (int)Mimikyu) return form - 2; return form - 1; } public static bool IsValidOutOfBoundsForme(int species, int form, int generation) { - switch (species) + switch ((Species)species) { - case 201: // Unown + case Unown: return form < (generation == 2 ? 26 : 28); // A-Z : A-Z?! - case 414: // Wormadam base form is kept + case Mothim: // Wormadam base form is kept return form < 3; - case 664: - case 665: // Vivillon Pre-evolutions + case Scatterbug: + case Spewpa: // Vivillon Pre-evolutions return form < 18; default: return false; @@ -59,9 +60,10 @@ public static bool HasFormSelection(PersonalInfo pi, int species) private static readonly HashSet HasFormeValuesNotIndicatedByPersonal = new HashSet { - 201, // Unown - 414, // Mothim (Burmy forme carried over, not cleared) - 664, 665, // Vivillon pre-evos + (int)Unown, + (int)Mothim, // Burmy forme carried over, not cleared + (int)Scatterbug, + (int)Spewpa, // Vivillon pre-evos }; } } diff --git a/pkNX.Sprites/SpriteBuilder.cs b/pkNX.Sprites/SpriteBuilder.cs index 1a137028..d5f6c33c 100644 --- a/pkNX.Sprites/SpriteBuilder.cs +++ b/pkNX.Sprites/SpriteBuilder.cs @@ -1,4 +1,5 @@ using System.Drawing; +using pkNX.Structures; using pkNX.Sprites.Properties; namespace pkNX.Sprites @@ -32,7 +33,7 @@ public abstract class SpriteBuilder protected virtual string GetSpriteAll(int species, int form, int gender, bool shiny, int generation) => SpriteName.GetResourceStringSprite(species, form, gender, generation, shiny); protected virtual string GetItemResourceName(int item) => $"item_{item}"; protected virtual Image Unknown => Resources.unknown; - protected virtual Image GetEggSprite(int species) => species == 490 ? Resources._490_e : Resources.egg; + protected virtual Image GetEggSprite(int species) => species == (int)Species.Manaphy ? Resources._490_e : Resources.egg; public Image GetSprite(int species, int form, int gender, int heldItem, bool isEgg, bool isShiny, int generation = -1) { @@ -171,7 +172,7 @@ public class SpriteBuilder5668 : SpriteBuilder public override int Width => 68; protected override int ItemShiftX => 52; - protected override int ItemShiftY => 28; + protected override int ItemShiftY => 24; protected override int ItemMaxSize => 32; protected override int EggItemShiftX => 9; protected override int EggItemShiftY => 2; diff --git a/pkNX.Sprites/SpriteName.cs b/pkNX.Sprites/SpriteName.cs index af29faae..8294d344 100644 --- a/pkNX.Sprites/SpriteName.cs +++ b/pkNX.Sprites/SpriteName.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Text; +using pkNX.Structures; namespace pkNX.Sprites { @@ -29,14 +30,14 @@ public static string GetResourceStringSprite(int species, int form, int gender, { sb.Append(Separator); sb.Append(form); - if (species == 25) + if (species == (int)Species.Pikachu) { if (generation == 6) sb.Append(Cosplay); else if (form == 8) sb.Append(GGStarter); } - else if (species == 133) + else if (species == (int)Species.Eevee) { if (form == 1) sb.Append(GGStarter); @@ -57,12 +58,13 @@ public static string GetResourceStringSprite(int species, int form, int gender, /// public static readonly HashSet SpeciesDefaultFormSprite = new HashSet { - 414, // Mothim - 664, // Scatterbug - 665, // Spewpa - 778, // Mimikyu - 854, // Sinistea - 855, // Polteageist + (int)Species.Mothim, + (int)Species.Scatterbug, + (int)Species.Spewpa, + (int)Species.Rockruff, + (int)Species.Mimikyu, + (int)Species.Sinistea, + (int)Species.Polteageist, }; /// @@ -70,12 +72,12 @@ public static string GetResourceStringSprite(int species, int form, int gender, /// public static readonly HashSet SpeciesGenderedSprite = new HashSet { - 449, // Hippopotas - 450, // Hippowdon - 521, // Unfezant - 592, // Frillish - 593, // Jellicent - 668, // Pyroar + (int)Species.Hippopotas, + (int)Species.Hippowdon, + (int)Species.Unfezant, + (int)Species.Frillish, + (int)Species.Jellicent, + (int)Species.Pyroar, }; } } diff --git a/pkNX.Structures/Evolution/Extensions.cs b/pkNX.Structures/Evolution/Extensions.cs index beb6d770..183241ff 100644 --- a/pkNX.Structures/Evolution/Extensions.cs +++ b/pkNX.Structures/Evolution/Extensions.cs @@ -16,7 +16,7 @@ public static partial class Extensions [LevelUp] = Level, [Trade] = NoArg, [TradeHeldItem] = Items, - [TradeSpecies] = Species, + [TradeSpecies] = EvolutionTypeArgumentType.Species, [UseItem] = Items, [LevelUpATK] = Level, @@ -33,7 +33,7 @@ public static partial class Extensions [LevelUpHeldItemDay] = Items, [LevelUpHeldItemNight] = Items, [LevelUpKnowMove] = Moves, - [LevelUpWithTeammate] = Species, + [LevelUpWithTeammate] = EvolutionTypeArgumentType.Species, [LevelUpMale] = Level, [LevelUpFemale] = Level, [LevelUpElectric] = NoArg, diff --git a/pkNX.Structures/Legality/Legal.cs b/pkNX.Structures/Legality/Legal.cs index 7a88268c..7eb6beab 100644 --- a/pkNX.Structures/Legality/Legal.cs +++ b/pkNX.Structures/Legality/Legal.cs @@ -13,24 +13,24 @@ public static int GetRandomForme(int species, bool mega, bool alola, bool galar, if (stats[species].FormeCount <= 1) return 0; - if (species == 658 && !mega) // Greninja + if (species == (int)Species.Greninja && !mega) return 0; - if (species == 664 || species == 665 || species == 666) // vivillon + if (species == (int)Species.Scatterbug || species == (int)Species.Spewpa || species == (int)Species.Vivillon) return 30; // save file specific - if (species == 774) // minior + if (species == (int)Species.Minior) return Util.Rand.Next(7); - if (species == 890) // Eternatus + if (species == (int)Species.Eternatus) return 0; - if (galar && species == 052) // Galarian Meowth is altform 2 + if (galar && species == (int)Species.Meowth) // Galarian Meowth is altform 2 return Util.Rand.Next(3); - if (galar && species == 079) // todo: remove when Kanto Slowpoke is made usable in SWSH + if (galar && species == (int)Species.Slowpoke) // todo: remove when Kanto Slowpoke is made usable in SWSH return 1; - if (galar && species == 555) // Galarian Darmanitan is altform 2, Galarian Zen is altform 3 + if (galar && species == (int)Species.Darmanitan) // Galarian Darmanitan is altform 2, Galarian Zen is altform 3 return Util.Rand.Next(4); - if (stats.TableLength == 980 && (species == 25 || species == 133)) // gg tableB -- no starters, they crash trainer battles. - return 0; // Pikachu + if (stats.TableLength == 980 && (species == (int)Species.Pikachu || species == (int)Species.Eevee)) // gg tableB -- no starters, they crash trainer battles. + return 0; if (EvolveToAlolanForms.Contains(species)) return alola ? Util.Rand.Next(2) : 0; if (EvolveToGalarForms.Contains(species)) diff --git a/pkNX.Structures/Legality/Tables7.cs b/pkNX.Structures/Legality/Tables7.cs index 283f2c62..ebe44808 100644 --- a/pkNX.Structures/Legality/Tables7.cs +++ b/pkNX.Structures/Legality/Tables7.cs @@ -100,28 +100,28 @@ public static partial class Legal public static readonly int[] AlolanOriginForms = { - 019, // Rattata - 020, // Raticate - 027, // Sandshrew - 028, // Sandslash - 037, // Vulpix - 038, // Ninetales - 050, // Diglett - 051, // Dugtrio - 052, // Meowth - 053, // Persian - 074, // Geodude - 075, // Graveler - 076, // Golem - 088, // Grimer - 089, // Muk + (int)Species.Rattata, + (int)Species.Raticate, + (int)Species.Sandshrew, + (int)Species.Sandslash, + (int)Species.Vulpix, + (int)Species.Ninetales, + (int)Species.Diglett, + (int)Species.Dugtrio, + (int)Species.Meowth, + (int)Species.Persian, + (int)Species.Geodude, + (int)Species.Graveler, + (int)Species.Golem, + (int)Species.Grimer, + (int)Species.Muk, }; public static readonly int[] EvolveToAlolanForms = new[] { - 026, // Raichu - 103, // Exeggutor - 105, // Marowak + (int)Species.Raichu, + (int)Species.Exeggutor, + (int)Species.Marowak, }.Concat(AlolanOriginForms).ToArray(); #region Unreleased Items @@ -199,72 +199,72 @@ public static partial class Legal public static readonly HashSet Totem_Alolan = new HashSet { - 020, // Raticate (Normal, Alolan, Totem) - 105, // Marowak (Normal, Alolan, Totem) - 778, // Mimikyu (Normal, Busted, Totem, Totem_Busted) + (int)Species.Raticate, // Normal, Alolan, Totem + (int)Species.Marowak, // Normal, Alolan, Totem + (int)Species.Mimikyu, // Normal, Busted, Totem, Totem_Busted }; public static readonly HashSet Totem_SM = new HashSet { - 020, // Raticate - 735, // Gumshoos - //746, // Wishiwashi - 758, // Salazzle - 754, // Lurantis - 738, // Vikavolt - 778, // Mimikyu - 784, // Kommo-o + (int)Species.Raticate, + (int)Species.Gumshoos, + // (int)Species.Wishiwashi, + (int)Species.Salazzle, + (int)Species.Lurantis, + (int)Species.Vikavolt, + (int)Species.Mimikyu, + (int)Species.Kommoo, }; public static readonly HashSet Totem_USUM = new HashSet { - 020, // Raticate - 735, // Gumshoos - //746, // Wishiwashi - 758, // Salazzle - 754, // Lurantis - 738, // Vikavolt - 778, // Mimikyu - 784, // Kommo-o - 105, // Marowak - 752, // Araquanid - 777, // Togedemaru - 743, // Ribombee + (int)Species.Raticate, + (int)Species.Gumshoos, + // (int)Species.Wishiwashi, + (int)Species.Salazzle, + (int)Species.Lurantis, + (int)Species.Vikavolt, + (int)Species.Mimikyu, + (int)Species.Kommoo, + (int)Species.Marowak, + (int)Species.Araquanid, + (int)Species.Togedemaru, + (int)Species.Ribombee, }; public static readonly ushort[] HeldItemsBuy_SM = new ushort[1].Concat(Pouch_Items_SM).Concat(Pouch_Medicine_SM).ToArray(); public static readonly HashSet BattleForms = new HashSet { - 351, // Castform - 421, // Cherrim - 555, // Darmanitan - 648, // Meloetta - 681, // Aegislash - 716, // Xerneas - 746, // Wishiwashi - 778, // Mimikyu + (int)Species.Castform, + (int)Species.Cherrim, + (int)Species.Darmanitan, + (int)Species.Meloetta, + (int)Species.Aegislash, + (int)Species.Xerneas, + (int)Species.Wishiwashi, + (int)Species.Mimikyu, }; public static readonly HashSet BattleMegas = new HashSet { // XY - 3,6,9,65,80, - 115,127,130,142,150,181, - 212,214,229,248,282, - 303,306,308,310,354,359,380,381, - 445,448,460, + (int)Species.Venusaur, (int)Species.Charizard, (int)Species.Blastoise, (int)Species.Alakazam, (int)Species.Gengar, + (int)Species.Kangaskhan, (int)Species.Pinsir, (int)Species.Gyarados, (int)Species.Aerodactyl, (int)Species.Mewtwo, + (int)Species.Ampharos, (int)Species.Scizor, (int)Species.Heracross, (int)Species.Houndoom, (int)Species.Tyranitar, + (int)Species.Blaziken, (int)Species.Gardevoir, (int)Species.Mawile, (int)Species.Aggron, (int)Species.Medicham, + (int)Species.Manectric, (int)Species.Banette, (int)Species.Absol, (int)Species.Latias, (int)Species.Latios, + (int)Species.Garchomp, (int)Species.Lucario, (int)Species.Abomasnow, // AO - 15,18,94, - 208,254,257,260, - 302,319,323,334,362,373,376,384, - 428,475, - 531, - 719, + (int)Species.Beedrill, (int)Species.Pidgeot, (int)Species.Slowbro, (int)Species.Steelix, + (int)Species.Sceptile, (int)Species.Swampert, (int)Species.Sableye, (int)Species.Sharpedo, (int)Species.Camerupt, + (int)Species.Altaria, (int)Species.Glalie, (int)Species.Salamence, (int)Species.Metagross, (int)Species.Rayquaza, + (int)Species.Lopunny, (int)Species.Gallade, + (int)Species.Audino, (int)Species.Diancie, // USUM - 800, // Ultra Necrozma + (int)Species.Necrozma, // Ultra }; public static readonly HashSet BattlePrimals = new HashSet { 382, 383 }; diff --git a/pkNX.Structures/Legality/Tables8.cs b/pkNX.Structures/Legality/Tables8.cs index e01cb4ef..c444764c 100644 --- a/pkNX.Structures/Legality/Tables8.cs +++ b/pkNX.Structures/Legality/Tables8.cs @@ -167,69 +167,70 @@ public static partial class Legal internal static readonly HashSet GalarOriginForms = new HashSet { - 052, // Meowth - 077, // Ponyta - 078, // Rapidash - 083, // Farfetch’d - 122, // Mr. Mime - 222, // Corsola - 263, // Zigzagoon - 264, // Linoone - 554, // Darumaka - 555, // Darmanitan - 562, // Yamask - 618, // Stunfisk + (int)Species.Meowth, + (int)Species.Ponyta, + (int)Species.Rapidash, + (int)Species.Farfetchd, + (int)Species.MrMime, + (int)Species.Corsola, + (int)Species.Zigzagoon, + (int)Species.Linoone, + (int)Species.Yamask, + (int)Species.Darumaka, + (int)Species.Darmanitan, + (int)Species.Stunfisk, // DLC (todo: slowbro, maybe others?) - 079, // Slowpoke + (int)Species.Slowpoke, }; internal static readonly HashSet GalarVariantFormEvolutions = new HashSet { - 110, // Weezing + (int)Species.MrMime, + (int)Species.Weezing, }; internal static readonly HashSet GalarForm0Evolutions = new HashSet { - 862, // Obstagoon - 863, // Perrserker - 864, // Cursola - 865, // Sirfetch’d - 866, // Mr. Rime - 867, // Runerigus + (int)Species.Perrserker, + (int)Species.Obstagoon, + (int)Species.MrRime, + (int)Species.Sirfetchd, + (int)Species.Runerigus, + (int)Species.Cursola, }; public static readonly HashSet EvolveToGalarForms = new HashSet(GalarVariantFormEvolutions.Concat(GalarOriginForms)); public static readonly int[] GigantamaxForms = { - 006, // Charizard - 012, // Butterfree - 025, // Pikachu - 052, // Meowth - 068, // Machamp - 094, // Gengar - 099, // Kingler - 131, // Lapras - 133, // Eevee - 143, // Snorlax - 569, // Garbodor - 809, // Melmetal - 823, // Corviknight - 826, // Orbeetle - 834, // Drednaw - 839, // Coalossal - 841, // Flapple - 842, // Appletun - 844, // Sandaconda - 849, // Toxtricity - 851, // Centiskorch - 858, // Hatterene - 861, // Grimmsnarl - 869, // Alcremie - 879, // Copperajah - 884, // Duraludon - + (int)Species.Charizard, + (int)Species.Butterfree, + (int)Species.Pikachu, + (int)Species.Meowth, + (int)Species.Machamp, + (int)Species.Gengar, + (int)Species.Kingler, + (int)Species.Lapras, + (int)Species.Eevee, + (int)Species.Snorlax, + (int)Species.Garbodor, + // (int)Species.Melmetal, + (int)Species.Corviknight, + (int)Species.Orbeetle, + (int)Species.Drednaw, + (int)Species.Coalossal, + (int)Species.Flapple, + (int)Species.Appletun, + (int)Species.Sandaconda, + (int)Species.Toxtricity, + (int)Species.Centiskorch, + (int)Species.Hatterene, + (int)Species.Grimmsnarl, + (int)Species.Alcremie, + (int)Species.Copperajah, + (int)Species.Duraludon, + // todo: DLC (venusaur, blastoise, galar starters, urshifu, maybe others?) }; diff --git a/pkNX.Structures/Misc/Species.cs b/pkNX.Structures/Misc/Species.cs new file mode 100644 index 00000000..9a3339dc --- /dev/null +++ b/pkNX.Structures/Misc/Species.cs @@ -0,0 +1,901 @@ +namespace pkNX.Structures +{ + /// + /// Species IDs for the corresponding English species name. + /// + public enum Species : ushort + { + None, + Bulbasaur, + Ivysaur, + Venusaur, + Charmander, + Charmeleon, + Charizard, + Squirtle, + Wartortle, + Blastoise, + Caterpie, + Metapod, + Butterfree, + Weedle, + Kakuna, + Beedrill, + Pidgey, + Pidgeotto, + Pidgeot, + Rattata, + Raticate, + Spearow, + Fearow, + Ekans, + Arbok, + Pikachu, + Raichu, + Sandshrew, + Sandslash, + NidoranF, + Nidorina, + Nidoqueen, + NidoranM, + Nidorino, + Nidoking, + Clefairy, + Clefable, + Vulpix, + Ninetales, + Jigglypuff, + Wigglytuff, + Zubat, + Golbat, + Oddish, + Gloom, + Vileplume, + Paras, + Parasect, + Venonat, + Venomoth, + Diglett, + Dugtrio, + Meowth, + Persian, + Psyduck, + Golduck, + Mankey, + Primeape, + Growlithe, + Arcanine, + Poliwag, + Poliwhirl, + Poliwrath, + Abra, + Kadabra, + Alakazam, + Machop, + Machoke, + Machamp, + Bellsprout, + Weepinbell, + Victreebel, + Tentacool, + Tentacruel, + Geodude, + Graveler, + Golem, + Ponyta, + Rapidash, + Slowpoke, + Slowbro, + Magnemite, + Magneton, + Farfetchd, + Doduo, + Dodrio, + Seel, + Dewgong, + Grimer, + Muk, + Shellder, + Cloyster, + Gastly, + Haunter, + Gengar, + Onix, + Drowzee, + Hypno, + Krabby, + Kingler, + Voltorb, + Electrode, + Exeggcute, + Exeggutor, + Cubone, + Marowak, + Hitmonlee, + Hitmonchan, + Lickitung, + Koffing, + Weezing, + Rhyhorn, + Rhydon, + Chansey, + Tangela, + Kangaskhan, + Horsea, + Seadra, + Goldeen, + Seaking, + Staryu, + Starmie, + MrMime, + Scyther, + Jynx, + Electabuzz, + Magmar, + Pinsir, + Tauros, + Magikarp, + Gyarados, + Lapras, + Ditto, + Eevee, + Vaporeon, + Jolteon, + Flareon, + Porygon, + Omanyte, + Omastar, + Kabuto, + Kabutops, + Aerodactyl, + Snorlax, + Articuno, + Zapdos, + Moltres, + Dratini, + Dragonair, + Dragonite, + Mewtwo, + Mew, + Chikorita, + Bayleef, + Meganium, + Cyndaquil, + Quilava, + Typhlosion, + Totodile, + Croconaw, + Feraligatr, + Sentret, + Furret, + Hoothoot, + Noctowl, + Ledyba, + Ledian, + Spinarak, + Ariados, + Crobat, + Chinchou, + Lanturn, + Pichu, + Cleffa, + Igglybuff, + Togepi, + Togetic, + Natu, + Xatu, + Mareep, + Flaaffy, + Ampharos, + Bellossom, + Marill, + Azumarill, + Sudowoodo, + Politoed, + Hoppip, + Skiploom, + Jumpluff, + Aipom, + Sunkern, + Sunflora, + Yanma, + Wooper, + Quagsire, + Espeon, + Umbreon, + Murkrow, + Slowking, + Misdreavus, + Unown, + Wobbuffet, + Girafarig, + Pineco, + Forretress, + Dunsparce, + Gligar, + Steelix, + Snubbull, + Granbull, + Qwilfish, + Scizor, + Shuckle, + Heracross, + Sneasel, + Teddiursa, + Ursaring, + Slugma, + Magcargo, + Swinub, + Piloswine, + Corsola, + Remoraid, + Octillery, + Delibird, + Mantine, + Skarmory, + Houndour, + Houndoom, + Kingdra, + Phanpy, + Donphan, + Porygon2, + Stantler, + Smeargle, + Tyrogue, + Hitmontop, + Smoochum, + Elekid, + Magby, + Miltank, + Blissey, + Raikou, + Entei, + Suicune, + Larvitar, + Pupitar, + Tyranitar, + Lugia, + HoOh, + Celebi, + Treecko, + Grovyle, + Sceptile, + Torchic, + Combusken, + Blaziken, + Mudkip, + Marshtomp, + Swampert, + Poochyena, + Mightyena, + Zigzagoon, + Linoone, + Wurmple, + Silcoon, + Beautifly, + Cascoon, + Dustox, + Lotad, + Lombre, + Ludicolo, + Seedot, + Nuzleaf, + Shiftry, + Taillow, + Swellow, + Wingull, + Pelipper, + Ralts, + Kirlia, + Gardevoir, + Surskit, + Masquerain, + Shroomish, + Breloom, + Slakoth, + Vigoroth, + Slaking, + Nincada, + Ninjask, + Shedinja, + Whismur, + Loudred, + Exploud, + Makuhita, + Hariyama, + Azurill, + Nosepass, + Skitty, + Delcatty, + Sableye, + Mawile, + Aron, + Lairon, + Aggron, + Meditite, + Medicham, + Electrike, + Manectric, + Plusle, + Minun, + Volbeat, + Illumise, + Roselia, + Gulpin, + Swalot, + Carvanha, + Sharpedo, + Wailmer, + Wailord, + Numel, + Camerupt, + Torkoal, + Spoink, + Grumpig, + Spinda, + Trapinch, + Vibrava, + Flygon, + Cacnea, + Cacturne, + Swablu, + Altaria, + Zangoose, + Seviper, + Lunatone, + Solrock, + Barboach, + Whiscash, + Corphish, + Crawdaunt, + Baltoy, + Claydol, + Lileep, + Cradily, + Anorith, + Armaldo, + Feebas, + Milotic, + Castform, + Kecleon, + Shuppet, + Banette, + Duskull, + Dusclops, + Tropius, + Chimecho, + Absol, + Wynaut, + Snorunt, + Glalie, + Spheal, + Sealeo, + Walrein, + Clamperl, + Huntail, + Gorebyss, + Relicanth, + Luvdisc, + Bagon, + Shelgon, + Salamence, + Beldum, + Metang, + Metagross, + Regirock, + Regice, + Registeel, + Latias, + Latios, + Kyogre, + Groudon, + Rayquaza, + Jirachi, + Deoxys, + Turtwig, + Grotle, + Torterra, + Chimchar, + Monferno, + Infernape, + Piplup, + Prinplup, + Empoleon, + Starly, + Staravia, + Staraptor, + Bidoof, + Bibarel, + Kricketot, + Kricketune, + Shinx, + Luxio, + Luxray, + Budew, + Roserade, + Cranidos, + Rampardos, + Shieldon, + Bastiodon, + Burmy, + Wormadam, + Mothim, + Combee, + Vespiquen, + Pachirisu, + Buizel, + Floatzel, + Cherubi, + Cherrim, + Shellos, + Gastrodon, + Ambipom, + Drifloon, + Drifblim, + Buneary, + Lopunny, + Mismagius, + Honchkrow, + Glameow, + Purugly, + Chingling, + Stunky, + Skuntank, + Bronzor, + Bronzong, + Bonsly, + MimeJr, + Happiny, + Chatot, + Spiritomb, + Gible, + Gabite, + Garchomp, + Munchlax, + Riolu, + Lucario, + Hippopotas, + Hippowdon, + Skorupi, + Drapion, + Croagunk, + Toxicroak, + Carnivine, + Finneon, + Lumineon, + Mantyke, + Snover, + Abomasnow, + Weavile, + Magnezone, + Lickilicky, + Rhyperior, + Tangrowth, + Electivire, + Magmortar, + Togekiss, + Yanmega, + Leafeon, + Glaceon, + Gliscor, + Mamoswine, + PorygonZ, + Gallade, + Probopass, + Dusknoir, + Froslass, + Rotom, + Uxie, + Mesprit, + Azelf, + Dialga, + Palkia, + Heatran, + Regigigas, + Giratina, + Cresselia, + Phione, + Manaphy, + Darkrai, + Shaymin, + Arceus, + Victini, + Snivy, + Servine, + Serperior, + Tepig, + Pignite, + Emboar, + Oshawott, + Dewott, + Samurott, + Patrat, + Watchog, + Lillipup, + Herdier, + Stoutland, + Purrloin, + Liepard, + Pansage, + Simisage, + Pansear, + Simisear, + Panpour, + Simipour, + Munna, + Musharna, + Pidove, + Tranquill, + Unfezant, + Blitzle, + Zebstrika, + Roggenrola, + Boldore, + Gigalith, + Woobat, + Swoobat, + Drilbur, + Excadrill, + Audino, + Timburr, + Gurdurr, + Conkeldurr, + Tympole, + Palpitoad, + Seismitoad, + Throh, + Sawk, + Sewaddle, + Swadloon, + Leavanny, + Venipede, + Whirlipede, + Scolipede, + Cottonee, + Whimsicott, + Petilil, + Lilligant, + Basculin, + Sandile, + Krokorok, + Krookodile, + Darumaka, + Darmanitan, + Maractus, + Dwebble, + Crustle, + Scraggy, + Scrafty, + Sigilyph, + Yamask, + Cofagrigus, + Tirtouga, + Carracosta, + Archen, + Archeops, + Trubbish, + Garbodor, + Zorua, + Zoroark, + Minccino, + Cinccino, + Gothita, + Gothorita, + Gothitelle, + Solosis, + Duosion, + Reuniclus, + Ducklett, + Swanna, + Vanillite, + Vanillish, + Vanilluxe, + Deerling, + Sawsbuck, + Emolga, + Karrablast, + Escavalier, + Foongus, + Amoonguss, + Frillish, + Jellicent, + Alomomola, + Joltik, + Galvantula, + Ferroseed, + Ferrothorn, + Klink, + Klang, + Klinklang, + Tynamo, + Eelektrik, + Eelektross, + Elgyem, + Beheeyem, + Litwick, + Lampent, + Chandelure, + Axew, + Fraxure, + Haxorus, + Cubchoo, + Beartic, + Cryogonal, + Shelmet, + Accelgor, + Stunfisk, + Mienfoo, + Mienshao, + Druddigon, + Golett, + Golurk, + Pawniard, + Bisharp, + Bouffalant, + Rufflet, + Braviary, + Vullaby, + Mandibuzz, + Heatmor, + Durant, + Deino, + Zweilous, + Hydreigon, + Larvesta, + Volcarona, + Cobalion, + Terrakion, + Virizion, + Tornadus, + Thundurus, + Reshiram, + Zekrom, + Landorus, + Kyurem, + Keldeo, + Meloetta, + Genesect, + Chespin, + Quilladin, + Chesnaught, + Fennekin, + Braixen, + Delphox, + Froakie, + Frogadier, + Greninja, + Bunnelby, + Diggersby, + Fletchling, + Fletchinder, + Talonflame, + Scatterbug, + Spewpa, + Vivillon, + Litleo, + Pyroar, + Flabébé, + Floette, + Florges, + Skiddo, + Gogoat, + Pancham, + Pangoro, + Furfrou, + Espurr, + Meowstic, + Honedge, + Doublade, + Aegislash, + Spritzee, + Aromatisse, + Swirlix, + Slurpuff, + Inkay, + Malamar, + Binacle, + Barbaracle, + Skrelp, + Dragalge, + Clauncher, + Clawitzer, + Helioptile, + Heliolisk, + Tyrunt, + Tyrantrum, + Amaura, + Aurorus, + Sylveon, + Hawlucha, + Dedenne, + Carbink, + Goomy, + Sliggoo, + Goodra, + Klefki, + Phantump, + Trevenant, + Pumpkaboo, + Gourgeist, + Bergmite, + Avalugg, + Noibat, + Noivern, + Xerneas, + Yveltal, + Zygarde, + Diancie, + Hoopa, + Volcanion, + Rowlet, + Dartrix, + Decidueye, + Litten, + Torracat, + Incineroar, + Popplio, + Brionne, + Primarina, + Pikipek, + Trumbeak, + Toucannon, + Yungoos, + Gumshoos, + Grubbin, + Charjabug, + Vikavolt, + Crabrawler, + Crabominable, + Oricorio, + Cutiefly, + Ribombee, + Rockruff, + Lycanroc, + Wishiwashi, + Mareanie, + Toxapex, + Mudbray, + Mudsdale, + Dewpider, + Araquanid, + Fomantis, + Lurantis, + Morelull, + Shiinotic, + Salandit, + Salazzle, + Stufful, + Bewear, + Bounsweet, + Steenee, + Tsareena, + Comfey, + Oranguru, + Passimian, + Wimpod, + Golisopod, + Sandygast, + Palossand, + Pyukumuku, + TypeNull, + Silvally, + Minior, + Komala, + Turtonator, + Togedemaru, + Mimikyu, + Bruxish, + Drampa, + Dhelmise, + Jangmoo, + Hakamoo, + Kommoo, + TapuKoko, + TapuLele, + TapuBulu, + TapuFini, + Cosmog, + Cosmoem, + Solgaleo, + Lunala, + Nihilego, + Buzzwole, + Pheromosa, + Xurkitree, + Celesteela, + Kartana, + Guzzlord, + Necrozma, + Magearna, + Marshadow, + Poipole, + Naganadel, + Stakataka, + Blacephalon, + Zeraora, + Meltan, + Melmetal, + Grookey, + Thwackey, + Rillaboom, + Scorbunny, + Raboot, + Cinderace, + Sobble, + Drizzile, + Inteleon, + Skwovet, + Greedent, + Rookidee, + Corvisquire, + Corviknight, + Blipbug, + Dottler, + Orbeetle, + Nickit, + Thievul, + Gossifleur, + Eldegoss, + Wooloo, + Dubwool, + Chewtle, + Drednaw, + Yamper, + Boltund, + Rolycoly, + Carkol, + Coalossal, + Applin, + Flapple, + Appletun, + Silicobra, + Sandaconda, + Cramorant, + Arrokuda, + Barraskewda, + Toxel, + Toxtricity, + Sizzlipede, + Centiskorch, + Clobbopus, + Grapploct, + Sinistea, + Polteageist, + Hatenna, + Hattrem, + Hatterene, + Impidimp, + Morgrem, + Grimmsnarl, + Obstagoon, + Perrserker, + Cursola, + Sirfetchd, + MrRime, + Runerigus, + Milcery, + Alcremie, + Falinks, + Pincurchin, + Snom, + Frosmoth, + Stonjourner, + Eiscue, + Indeedee, + Morpeko, + Cufant, + Copperajah, + Dracozolt, + Arctozolt, + Dracovish, + Arctovish, + Duraludon, + Dreepy, + Drakloak, + Dragapult, + Zacian, + Zamazenta, + Eternatus, + MAX_COUNT, + } +} diff --git a/pkNX.WinForms/MainEditor/EditorSWSH.cs b/pkNX.WinForms/MainEditor/EditorSWSH.cs index e4f0457c..1c2f8766 100644 --- a/pkNX.WinForms/MainEditor/EditorSWSH.cs +++ b/pkNX.WinForms/MainEditor/EditorSWSH.cs @@ -348,7 +348,7 @@ void Randomize() srand.Initialize(spec, ban); foreach (var t in encounters) { - if (t.Species >= 888 && t.Species <= 890) // Eternatus crashes when changed, keep Zacian and Zamazenta to make final boss battle fair + if (t.Species >= (int)Species.Zacian && t.Species <= (int)Species.Eternatus && t.AltForm == 1) // Eternatus crashes when changed, keep Zacian and Zamazenta to make final boss battle fair continue; t.Species = srand.GetRandomSpecies(t.Species); t.AltForm = Legal.GetRandomForme(t.Species, false, true, true, ROM.Data.PersonalData);