mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-01 05:16:35 -05:00
Add XY trainer class blacklist for ORAS
This commit is contained in:
@@ -193,9 +193,9 @@ public static partial class Legal
|
||||
055, // Pokémon Trainer (Shauna)
|
||||
056, // Pokémon Trainer (Tierno)
|
||||
057, // Pokémon Trainer (Trevor)
|
||||
077, // Team Flare (Admin)*
|
||||
077, // Team Flare (Admin)
|
||||
078, // Team Flare (Admin)
|
||||
079, // Team Flare (Grunt)*
|
||||
079, // Team Flare (Grunt)
|
||||
080, // Team Flare (Grunt)
|
||||
081, // Team Flare (Lysandre)
|
||||
102, // Pokémon Trainer (AZ)
|
||||
@@ -203,7 +203,6 @@ public static partial class Legal
|
||||
104, // Pokémon Trainer (Serena)
|
||||
105, // Pokémon Profoessor (Sycamore)
|
||||
175, // Team Flare Boss (Lysandre)
|
||||
// * = Female
|
||||
};
|
||||
public static readonly int[] Model_AO =
|
||||
{
|
||||
@@ -215,10 +214,14 @@ public static partial class Legal
|
||||
219, // Pokémon Trainer (Steven)
|
||||
221, // Lorekeeper (Zinnia)
|
||||
267, // Pokémon Trainer (Zinnia)
|
||||
272, // Pokémon Trainer (Wally)*
|
||||
278, // Pokémon Trainer (Brendan)*
|
||||
279, // Pokémon Trainer (May)*
|
||||
// * = has Mega Pendant/Bracelet
|
||||
272, // Pokémon Trainer (Wally)
|
||||
};
|
||||
public static readonly int[] Ignore_AO =
|
||||
{
|
||||
001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012, 013, 014, 015, 016, 017, 018, 019, 020, 021, 022, 023, 024, 025, 026, 027, 028, 029, 030, 031, 032, 033, 034, 035, 036, 037,
|
||||
038, 039, 040, 041, 042, 043, 044, 045, 046, 047, 048, 049, 050, 051, 052, 053, 054, 055, 056, 057, 058, 059, 060, 061, 062, 063, 064, 065, 066, 067, 068, 069, 070, 071, 072, 073, 074,
|
||||
075, 076, 077, 078, 079, 080, 081, 082, 083, 084, 085, 086, 087, 088, 089, 090, 091, 092, 093, 094, 095, 096, 097, 098, 099, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126
|
||||
};
|
||||
public static readonly int[] Z_Moves =
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ public RSTE(byte[][] trc, byte[][] trd, byte[][] trp)
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
MegaDictionary = GiftEditor6.GetMegaDictionary(Main.Config);
|
||||
rModelRestricted = Main.Config.ORAS ? Legal.Model_AO : Legal.Model_XY;
|
||||
rXYBlacklist = Legal.Ignore_AO;
|
||||
|
||||
InitializeComponent();
|
||||
// String Fetching
|
||||
@@ -533,6 +534,7 @@ private void Setup()
|
||||
public static int rDMGCount, rSTABCount;
|
||||
private int[] mEvoTypes;
|
||||
private static int[] rModelRestricted;
|
||||
private static int[] rXYBlacklist;
|
||||
private string[] rImportant;
|
||||
private readonly List<string> Tags = new List<string>();
|
||||
private readonly Dictionary<string, int> TagTypes = new Dictionary<string, int>();
|
||||
@@ -726,7 +728,7 @@ private static void RandomizeTrainerAIClass(trdata6 t, string[] trClass)
|
||||
int randClass() => (int) (rnd32() % rModelRestricted.Length);
|
||||
t.Class = rModelRestricted[randClass()];
|
||||
}
|
||||
else
|
||||
else
|
||||
if (
|
||||
rClass // Classes selected to be randomized
|
||||
&& (!rOnlySingles || t.BattleType == 0) // Nonsingles only get changed if rOnlySingles
|
||||
@@ -738,6 +740,12 @@ private static void RandomizeTrainerAIClass(trdata6 t, string[] trClass)
|
||||
// Ensure the Random Class isn't an exclusive class
|
||||
while (rIgnoreClass.Contains(rv) || trClass[rv].StartsWith("[~")); // don't allow disallowed classes
|
||||
t.Class = rv;
|
||||
|
||||
if (Main.Config.ORAS && rXYBlacklist.Contains(t.Class)) // Classes 0-126 are leftover from XY and some can crash the game; skip all of them
|
||||
{
|
||||
for (int i = 127; i <= 279; i++)
|
||||
t.Class = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void RandomizeTrainerPrizeItem(trdata6 t)
|
||||
|
||||
Reference in New Issue
Block a user