using System; namespace PKHeX.Core; /// /// table (array). /// /// /// Serves as the main object that is accessed for stat data in a particular generation/game format. /// public static class PersonalTable { /// /// Personal Table used in . /// public static readonly PersonalTable9SV SV = new(GetTable("sv")); /// /// Personal Table used in . /// public static readonly PersonalTable8LA LA = new(GetTable("la")); /// /// Personal Table used in . /// public static readonly PersonalTable8BDSP BDSP = new(GetTable("bdsp")); /// /// Personal Table used in . /// public static readonly PersonalTable8SWSH SWSH = new(GetTable("swsh")); /// /// Personal Table used in . /// public static readonly PersonalTable7GG GG = new(GetTable("gg")); /// /// Personal Table used in . /// public static readonly PersonalTable7 USUM = new(GetTable("uu"), Legal.MaxSpeciesID_7_USUM); /// /// Personal Table used in . /// public static readonly PersonalTable7 SM = new(GetTable("sm"), Legal.MaxSpeciesID_7); /// /// Personal Table used in . /// public static readonly PersonalTable6AO AO = new(GetTable("ao")); /// /// Personal Table used in . /// public static readonly PersonalTable6XY XY = new(GetTable("xy")); /// /// Personal Table used in . /// public static readonly PersonalTable5B2W2 B2W2 = new(GetTable("b2w2")); /// /// Personal Table used in . /// public static readonly PersonalTable5BW BW = new(GetTable("bw")); /// /// Personal Table used in . /// public static readonly PersonalTable4 HGSS = new(GetTable("hgss")); /// /// Personal Table used in . /// public static readonly PersonalTable4 Pt = new(GetTable("pt")); /// /// Personal Table used in . /// public static readonly PersonalTable4 DP = new(GetTable("dp")); /// /// Personal Table used in . /// public static readonly PersonalTable3 LG = new(GetTable("lg")); /// /// Personal Table used in . /// public static readonly PersonalTable3 FR = new(GetTable("fr")); /// /// Personal Table used in . /// public static readonly PersonalTable3 E = new(GetTable("e")); /// /// Personal Table used in . /// public static readonly PersonalTable3 RS = new(GetTable("rs")); /// /// Personal Table used in . /// public static readonly PersonalTable2 C = new(GetTable("c")); /// /// Personal Table used in . /// public static readonly PersonalTable2 GS = new(GetTable("gs")); /// /// Personal Table used in . /// public static readonly PersonalTable1 RB = new(GetTable("rb")); /// /// Personal Table used in . /// public static readonly PersonalTable1 Y = new(GetTable("y")); private static ReadOnlySpan GetTable(string game) => Util.GetBinaryResource($"personal_{game}"); static PersonalTable() // Finish Setup { PopulateGen3Tutors(); PopulateGen4Tutors(); } private static void PopulateGen3Tutors() { // Update Gen3 data with Emerald's data, FR/LG is a subset of Emerald's compatibility. var machine = BinLinkerAccessor.Get(Util.GetBinaryResource("hmtm_g3.pkl"), "g3"); var tutors = BinLinkerAccessor.Get(Util.GetBinaryResource("tutors_g3.pkl"), "g3"); E.LoadTables(machine, tutors); FR.CopyTables(E); LG.CopyTables(E); RS.CopyTables(E); } private static void PopulateGen4Tutors() { var tutors = BinLinkerAccessor.Get(Util.GetBinaryResource("tutors_g4.pkl"), "g4"); HGSS.LoadTables(tutors); } }