Use fixed count indexes

This commit is contained in:
sora10pls
2018-11-29 13:07:17 -05:00
parent 8084603cc4
commit 5f2f0a70ee
2 changed files with 25 additions and 3 deletions

View File

@@ -213,12 +213,19 @@ private static int[] GetRandomMega(Dictionary<int, int[]> megas, out int species
}
private static readonly int[] royal = { 081, 082, 083, 084, 185 };
private static readonly Dictionary<int, int> FixedSM = royal.ToDictionary(z => z, _ => 1);
private static Dictionary<int, int> GetFixedCountIndexes(GameVersion game)
{
if (GameVersion.SM.Contains(game) || GameVersion.USUM.Contains(game))
return FixedSM;
if (GameVersion.XY.Contains(game))
return Legal.ImportantTrainers_XY.ToDictionary(z => z, _ => 6);
if (GameVersion.ORAS.Contains(game))
return Legal.ImportantTrainers_ORAS.ToDictionary(z => z, _ => 6);
if (GameVersion.SM.Contains(game))
return Legal.ImportantTrainers_SM.Concat(royal).ToDictionary(z => z, index => royal.Contains(index) ? 1 : 6);
if (GameVersion.USUM.Contains(game))
return Legal.ImportantTrainers_USUM.Concat(royal).ToDictionary(z => z, index => royal.Contains(index) ? 1 : 6);
if (GameVersion.GG.Contains(game))
return Legal.ImportantTrainers_GG.ToDictionary(z => z, _ => 6);
return new Dictionary<int, int>();
}

View File

@@ -387,6 +387,21 @@ public static partial class Legal
695, 696, 697, 698, 699, 700, 701, 702, 703, 719, 723, 724, 725, 726, 727, 728
};
public static readonly int[] ImportantTrainers_XY =
{
006, 021, 022, 023, 024, 025, 026, 076, 130, 131, 132, 175, 184, 185, 186, 187, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 279, 303, 321, 322, 323, 324, 325, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 237, 348, 349, 350, 351, 435, 436,
437, 438, 439, 503, 504, 505, 507, 511, 512, 513, 514, 515, 519, 520, 521, 525, 526, 559, 560, 561, 562, 573, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 604, 605, 606, 613
};
public static readonly int[] ImportantTrainers_ORAS =
{
178, 231, 235, 236, 266, 271, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 518, 527, 528, 529, 530, 531, 532, 553, 554, 555, 556, 557, 561, 563, 567, 569, 570, 571, 572,
583, 674, 675, 676, 677, 678, 679, 680, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 713, 856, 857, 898, 906, 907, 908, 909, 910, 911,
912, 913, 942, 943, 944, 945, 946, 947
};
public static readonly int[] ImportantTrainers_SM =
{
012, 013, 014, 023, 052, 074, 075, 076, 077, 078, 079, 089, 090, 129, 131, 132, 138, 144, 146, 149, 152, 153, 154, 155, 156, 158, 159, 160, 164, 167, 215, 216, 217, 218, 219, 220, 221,