public GameDataSource(GameStrings s) { Source = s; BallDataSource = Util.GetVariedCBListBall(s.itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.GetCBList(s.specieslist); NatureDataSource = Util.GetCBList(s.natures); AbilityDataSource = Util.GetCBList(s.abilitylist); EncounterTypeDataSource = Util.GetCBList(s.encountertypelist, new[] { 0 }, Legal.Gen4EncounterTypes); HaXMoveDataSource = Util.GetCBList(s.movelist); LegalMoveDataSource = HaXMoveDataSource.Where(m => !Legal.Z_Moves.Contains(m.Value)).ToList(); VersionDataSource = GetVersionList(s); MetGen2 = CreateGen2(s); MetGen3 = CreateGen3(s); MetGen3CXD = CreateGen3CXD(s); MetGen4 = CreateGen4(s); MetGen5 = CreateGen5(s); MetGen6 = CreateGen6(s); MetGen7 = CreateGen7(s); MetGen7GG = CreateGen7GG(s); MetGen8 = CreateGen8(s); Memories = new MemoryStrings(s); Empty = new ComboItem(s.Species[0], 0); }
private void InitializeDataSources() { BallDataSource = Util.GetVariedCBListBall(itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.GetCBList(specieslist); NatureDataSource = Util.GetCBList(natures); AbilityDataSource = Util.GetCBList(abilitylist); VersionDataSource = GetVersionList(); EncounterTypeDataSource = Util.GetCBList(encountertypelist, new[] { 0 }, Legal.Gen4EncounterTypes); HaXMoveDataSource = Util.GetCBList(movelist); MoveDataSource = LegalMoveDataSource = HaXMoveDataSource.Where(m => !Legal.Z_Moves.Contains(m.Value)).ToList(); InitializeMetSources(); Memories = new MemoryStrings(this); }
private void InitializeDataSources() { int[] ball_nums = { 007, 576, 013, 492, 497, 014, 495, 493, 496, 494, 011, 498, 008, 006, 012, 015, 009, 005, 499, 010, 001, 016, 851 }; int[] ball_vals = { 007, 025, 013, 017, 022, 014, 020, 018, 021, 019, 011, 023, 008, 006, 012, 015, 009, 005, 024, 010, 001, 016, 026 }; BallDataSource = Util.GetVariedCBListBall(itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.GetCBList(specieslist, null); NatureDataSource = Util.GetCBList(natures, null); AbilityDataSource = Util.GetCBList(abilitylist, null); VersionDataSource = GetVersionList(); HaXMoveDataSource = Util.GetCBList(movelist, null); MoveDataSource = LegalMoveDataSource = HaXMoveDataSource.Where(m => !Legal.Z_Moves.Contains(m.Value)).ToList(); InitializeMetSources(); Memories = new MemoryStrings(this); }
public GameDataSource(GameStrings s) { Source = s; BallDataSource = Util.GetVariedCBListBall(s.itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.GetCBList(s.specieslist); NatureDataSource = Util.GetCBList(s.natures); AbilityDataSource = Util.GetCBList(s.abilitylist); EncounterTypeDataSource = Util.GetCBList(s.encountertypelist, new[] { 0 }, Legal.Gen4EncounterTypes); HaXMoveDataSource = Util.GetCBList(s.movelist); LegalMoveDataSource = HaXMoveDataSource.Where(m => !Legal.Z_Moves.Contains(m.Value)).ToList(); VersionDataSource = GetVersionList(s); InitializeMetSources(); Memories = new MemoryStrings(s); }
private void InitializeDataSources() { int[] ball_nums = { 007, 576, 013, 492, 497, 014, 495, 493, 496, 494, 011, 498, 008, 006, 012, 015, 009, 005, 499, 010, 001, 016, 851 }; int[] ball_vals = { 007, 025, 013, 017, 022, 014, 020, 018, 021, 019, 011, 023, 008, 006, 012, 015, 009, 005, 024, 010, 001, 016, 026 }; BallDataSource = Util.GetVariedCBListBall(itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.GetCBList(specieslist, null); NatureDataSource = Util.GetCBList(natures, null); AbilityDataSource = Util.GetCBList(abilitylist, null); VersionDataSource = Util.GetCBList(gamelist, Legal.Games_7usum, Legal.Games_7sm, Legal.Games_6oras, Legal.Games_6xy, Legal.Games_5, Legal.Games_4, Legal.Games_4e, Legal.Games_4r, Legal.Games_3, Legal.Games_3e, Legal.Games_3r, Legal.Games_3s); VersionDataSource.AddRange(Util.GetCBList(gamelist, Legal.Games_7vc1).OrderBy(g => g.Value)); // stuff to end unsorted VersionDataSource.AddRange(Util.GetCBList(gamelist, Legal.Games_7vc2).OrderBy(g => g.Value)); // stuff to end unsorted VersionDataSource.AddRange(Util.GetCBList(gamelist, Legal.Games_7go).OrderBy(g => g.Value)); // stuff to end unsorted HaXMoveDataSource = Util.GetCBList(movelist, null); MoveDataSource = LegalMoveDataSource = HaXMoveDataSource.Where(m => !Legal.Z_Moves.Contains(m.Value)).ToList(); InitializeMetSources(); Memories = new MemoryStrings(this); }
public static void InitializeDataSources(GameStrings s) { int[] ball_nums = { 007, 576, 013, 492, 497, 014, 495, 493, 496, 494, 011, 498, 008, 006, 012, 015, 009, 005, 499, 010, 001, 016, 851 }; int[] ball_vals = { 007, 025, 013, 017, 022, 014, 020, 018, 021, 019, 011, 023, 008, 006, 012, 015, 009, 005, 024, 010, 001, 016, 026 }; BallDataSource = Util.GetVariedCBList(s.itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.GetCBList(s.specieslist, null); NatureDataSource = Util.GetCBList(s.natures, null); AbilityDataSource = Util.GetCBList(s.abilitylist, null); VersionDataSource = Util.GetCBList(s.gamelist, Legal.Games_7sm, Legal.Games_6oras, Legal.Games_6xy, Legal.Games_5, Legal.Games_4, Legal.Games_4e, Legal.Games_4r, Legal.Games_3, Legal.Games_3e, Legal.Games_3r, Legal.Games_3s); VersionDataSource.AddRange(Util.GetCBList(s.gamelist, Legal.Games_7vc1).OrderBy(g => g.Value)); // stuff to end unsorted VersionDataSource.AddRange(Util.GetCBList(s.gamelist, Legal.Games_7go).OrderBy(g => g.Value)); // stuff to end unsorted HaXMoveDataSource = Util.GetCBList(s.movelist, null); MoveDataSource = LegalMoveDataSource = HaXMoveDataSource.Where(m => !Legal.Z_Moves.Contains(m.Value)).ToList(); #region Met Locations // Gen 2 { var met_list = Util.GetCBList(s.metGSC_00000, Enumerable.Range(0, 0x5F).ToArray()); met_list = Util.GetOffsetCBList(met_list, s.metGSC_00000, 00000, new[] { 0x7E, 0x7F }); MetGen2 = met_list; } // Gen 3 { var met_list = Util.GetCBList(s.metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray()); met_list = Util.GetOffsetCBList(met_list, s.metRSEFRLG_00000, 00000, new[] { 253, 254, 255 }); MetGen3 = met_list; var cxd_list = Util.GetCBList(s.metCXD_00000, Enumerable.Range(0, s.metCXD_00000.Length).ToArray()).Where(c => c.Text.Length > 0).ToList(); MetGen3CXD = cxd_list; } // Gen 4 { var met_list = Util.GetCBList(s.metHGSS_00000, new[] { 0 }); met_list = Util.GetOffsetCBList(met_list, s.metHGSS_02000, 2000, new[] { 2000 }); met_list = Util.GetOffsetCBList(met_list, s.metHGSS_02000, 2000, new[] { 2002 }); met_list = Util.GetOffsetCBList(met_list, s.metHGSS_03000, 3000, new[] { 3001 }); met_list = Util.GetOffsetCBList(met_list, s.metHGSS_00000, 0000, Legal.Met_HGSS_0); met_list = Util.GetOffsetCBList(met_list, s.metHGSS_02000, 2000, Legal.Met_HGSS_2); met_list = Util.GetOffsetCBList(met_list, s.metHGSS_03000, 3000, Legal.Met_HGSS_3); MetGen4 = met_list; } // Gen 5 { var met_list = Util.GetCBList(s.metBW2_00000, new[] { 0 }); met_list = Util.GetOffsetCBList(met_list, s.metBW2_60000, 60001, new[] { 60002 }); met_list = Util.GetOffsetCBList(met_list, s.metBW2_30000, 30001, new[] { 30003 }); met_list = Util.GetOffsetCBList(met_list, s.metBW2_00000, 00000, Legal.Met_BW2_0); met_list = Util.GetOffsetCBList(met_list, s.metBW2_30000, 30001, Legal.Met_BW2_3); met_list = Util.GetOffsetCBList(met_list, s.metBW2_40000, 40001, Legal.Met_BW2_4); met_list = Util.GetOffsetCBList(met_list, s.metBW2_60000, 60001, Legal.Met_BW2_6); MetGen5 = met_list; } // Gen 6 { var met_list = Util.GetCBList(s.metXY_00000, new[] { 0 }); met_list = Util.GetOffsetCBList(met_list, s.metXY_60000, 60001, new[] { 60002 }); met_list = Util.GetOffsetCBList(met_list, s.metXY_30000, 30001, new[] { 30002 }); met_list = Util.GetOffsetCBList(met_list, s.metXY_00000, 00000, Legal.Met_XY_0); met_list = Util.GetOffsetCBList(met_list, s.metXY_30000, 30001, Legal.Met_XY_3); met_list = Util.GetOffsetCBList(met_list, s.metXY_40000, 40001, Legal.Met_XY_4); met_list = Util.GetOffsetCBList(met_list, s.metXY_60000, 60001, Legal.Met_XY_6); MetGen6 = met_list; } // Gen 7 { var met_list = Util.GetCBList(s.metSM_00000, new[] { 0 }); met_list = Util.GetOffsetCBList(met_list, s.metSM_60000, 60001, new[] { 60002 }); met_list = Util.GetOffsetCBList(met_list, s.metSM_30000, 30001, new[] { 30002 }); met_list = Util.GetOffsetCBList(met_list, s.metSM_00000, 00000, Legal.Met_SM_0); met_list = Util.GetOffsetCBList(met_list, s.metSM_30000, 30001, Legal.Met_SM_3); met_list = Util.GetOffsetCBList(met_list, s.metSM_40000, 40001, Legal.Met_SM_4); met_list = Util.GetOffsetCBList(met_list, s.metSM_60000, 60001, Legal.Met_SM_6); MetGen7 = met_list; } #endregion }