Fixed logic for Type Themed Trainers. (#477)

The logic failed to properly detect "GYM6" as a GYM trainer that needed to have Type themed Pokemon. Same for ELITE trainers.

Type themed trainers still sometimes have non-typed Pokemon. Looking into that now. 

Also want to reduce duplicate Pokemon.
This commit is contained in:
Jacob Erly 2021-01-14 23:37:57 -06:00 committed by GitHub
parent 927830bf11
commit 3cff2cc06d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -547,7 +547,9 @@ private void Randomize()
// Trainer Type/Mega Evo
int type = GetRandomType(i);
bool mevo = rEnsureMEvo.Contains(i);
bool typerand = (rTypeTheme && !rGymE4Only) || (rTypeTheme && rImportant[i] != null && ImportantClasses.Contains(rImportant[i]));
bool isImportantClass = rImportant[i] != null && (rImportant[i].Contains("GYM") || rImportant[i].Contains("ELITE") || rImportant[i].Contains("CHAMPION"));
bool typerand = (rTypeTheme && !rGymE4Only) || (rTypeTheme && isImportantClass);
rSpeciesRand.rType = typerand;
byte[] trd = trdata[i];