Exemplo n.º 1
0
        private static List <ComboItem> CreateGen3(GameStrings s)
        {
            var locations = Util.GetCBList(s.metRSEFRLG_00000.AsSpan(0, 213));

            Util.AddCBWithOffset(locations, s.metRSEFRLG_00000.AsSpan(253, 3), 253);
            return(locations);
        }
Exemplo n.º 2
0
        private List <ComboItem> CreateGen2(GameStrings s)
        {
            var met_list = Util.GetCBList(s.metGSC_00000, Enumerable.Range(0, 0x5F).ToArray());

            Util.AddCBWithOffset(met_list, s.metGSC_00000, 00000, 0x7E, 0x7F);
            return(met_list);
        }
Exemplo n.º 3
0
        private List <ComboItem> CreateGen3(GameStrings s)
        {
            var met_list = Util.GetCBList(s.metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray());

            Util.AddCBWithOffset(met_list, s.metRSEFRLG_00000, 00000, 253, 254, 255);
            return(met_list);
        }
Exemplo n.º 4
0
        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);

            Empty = new ComboItem(s.Species[0], 0);
        }
Exemplo n.º 5
0
        private List <ComboItem> GetItems(int memoryGen)
        {
            var permit = Memories.GetMemoryItemParams(memoryGen);
            var asInt  = permit.Select(z => (int)z).ToArray();

            return(Util.GetCBList(s.itemlist, asInt));
        }
Exemplo n.º 6
0
        private static List <ComboItem> CreateGen2(GameStrings s)
        {
            var locations = Util.GetCBList(s.metGSC_00000.AsSpan(0, 0x5F));

            Util.AddCBWithOffset(locations, s.metGSC_00000.AsSpan(0x7E, 2), 0x7E);
            return(locations);
        }
Exemplo n.º 7
0
        private static List <ComboItem> CreateGen3CXD(GameStrings s)
        {
            var list = Util.GetCBList(s.metCXD_00000);

            list.RemoveAll(z => z.Text.Length == 0);
            return(list);
        }
Exemplo n.º 8
0
        private List <ComboItem> GetItems(int format)
        {
            var permit = format < 8 ? Legal.HeldItem_AO : Legal.HeldItem_AO.Concat(Legal.HeldItems_SWSH).Distinct();
            var asInt  = permit.Select(z => (int)z).ToArray();

            return(Util.GetCBList(s.itemlist, asInt));
        }
Exemplo n.º 9
0
 public MemoryStrings(GameStrings strings)
 {
     s        = strings;
     memories = new Lazy <List <ComboItem> >(GetMemories);
     none     = new Lazy <List <ComboItem> >(() => Util.GetCBList(new[] { "" }, null));
     species  = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.specieslist.Take(Legal.MaxSpeciesID_6 + 1).ToArray(), null));
     item     = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.itemlist, Memories.MemoryItems));
     genloc   = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.genloc, null));
     moves    = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.movelist.Take(622).ToArray(), null)); // Hyperspace Fury
     specific = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.metXY_00000, Legal.Met_XY_0));
 }
Exemplo n.º 10
0
        private static List <ComboItem> CreateGen8a(GameStrings s)
        {
            var locations = Util.GetCBList(s.metLA_00000, 0);

            Util.AddCBWithOffset(locations, s.metLA_30000, 30000, Locations.LinkTrade6);
            Util.AddCBWithOffset(locations, s.metLA_00000, 00000, Legal.Met_LA_0);
            Util.AddCBWithOffset(locations, s.metLA_30000, 30000, Legal.Met_LA_3);
            Util.AddCBWithOffset(locations, s.metLA_40000, 40000, Legal.Met_LA_4);
            Util.AddCBWithOffset(locations, s.metLA_60000, 60000, Legal.Met_LA_6);
            return(locations);
        }
Exemplo n.º 11
0
 public MemoryStrings(GameStrings strings, int format)
 {
     s        = strings;
     memories = new Lazy <List <ComboItem> >(GetMemories);
     none     = new Lazy <List <ComboItem> >(() => Util.GetCBList(new[] { string.Empty }));
     species  = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.specieslist));
     item     = new Lazy <List <ComboItem> >(() => GetItems(format));
     genloc   = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.genloc));
     moves    = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.movelist)); // Hyperspace Fury
     specific = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.metXY_00000, Legal.Met_XY_0));
 }
Exemplo n.º 12
0
 public MemoryStrings(GameStrings strings)
 {
     s        = strings;
     memories = new Lazy <List <ComboItem> >(GetMemories);
     none     = new Lazy <List <ComboItem> >(() => Util.GetCBList(new[] { string.Empty }));
     species  = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.specieslist));
     item6    = new Lazy <List <ComboItem> >(() => GetItems(6));
     item8    = new Lazy <List <ComboItem> >(() => GetItems(8));
     genloc   = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.genloc));
     moves    = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.movelist));
     specific = new Lazy <List <ComboItem> >(() => Util.GetCBList(s.metXY_00000, Locations6.Met0));
 }
Exemplo n.º 13
0
        private static List <ComboItem> CreateGen5(GameStrings s)
        {
            var locations = Util.GetCBList(s.metBW2_00000, 0);

            Util.AddCBWithOffset(locations, s.metBW2_60000, 60000, Locations.Daycare5);
            Util.AddCBWithOffset(locations, s.metBW2_30000, 30000, Locations.LinkTrade5);
            Util.AddCBWithOffset(locations, s.metBW2_00000, 00000, Locations5.Met0);
            Util.AddCBWithOffset(locations, s.metBW2_30000, 30000, Locations5.Met3);
            Util.AddCBWithOffset(locations, s.metBW2_40000, 40000, Locations5.Met4);
            Util.AddCBWithOffset(locations, s.metBW2_60000, 60000, Locations5.Met6);
            return(locations);
        }
Exemplo n.º 14
0
        private static List <ComboItem> CreateGen8(GameStrings s)
        {
            var met_list = Util.GetCBList(s.metSWSH_00000, 0);

            Util.AddCBWithOffset(met_list, s.metSWSH_60000, 60001, 60002);
            Util.AddCBWithOffset(met_list, s.metSWSH_30000, 30001, Locations.LinkTrade6);
            Util.AddCBWithOffset(met_list, s.metSWSH_00000, 00000, Legal.Met_SWSH_0);
            Util.AddCBWithOffset(met_list, s.metSWSH_30000, 30001, Legal.Met_SWSH_3);
            Util.AddCBWithOffset(met_list, s.metSWSH_40000, 40001, Legal.Met_SWSH_4);
            Util.AddCBWithOffset(met_list, s.metSWSH_60000, 60001, Legal.Met_SWSH_6);
            return(met_list);
        }
Exemplo n.º 15
0
        private static List <ComboItem> CreateGen5(GameStrings s)
        {
            var met_list = Util.GetCBList(s.metBW2_00000, 0);

            Util.AddCBWithOffset(met_list, s.metBW2_60000, 60001, Locations.Daycare5);
            Util.AddCBWithOffset(met_list, s.metBW2_30000, 30001, Locations.LinkTrade5);
            Util.AddCBWithOffset(met_list, s.metBW2_00000, 00000, Legal.Met_BW2_0);
            Util.AddCBWithOffset(met_list, s.metBW2_30000, 30001, Legal.Met_BW2_3);
            Util.AddCBWithOffset(met_list, s.metBW2_40000, 40001, Legal.Met_BW2_4);
            Util.AddCBWithOffset(met_list, s.metBW2_60000, 60001, Legal.Met_BW2_6);
            return(met_list);
        }
Exemplo n.º 16
0
        private static List <ComboItem> CreateGen4(GameStrings s)
        {
            var met_list = Util.GetCBList(s.metHGSS_00000, 0);

            Util.AddCBWithOffset(met_list, s.metHGSS_02000, 2000, Locations.Daycare4);
            Util.AddCBWithOffset(met_list, s.metHGSS_02000, 2000, Locations.LinkTrade4);
            Util.AddCBWithOffset(met_list, s.metHGSS_03000, 3000, Locations.Ranger4);
            Util.AddCBWithOffset(met_list, s.metHGSS_00000, 0000, Legal.Met_HGSS_0);
            Util.AddCBWithOffset(met_list, s.metHGSS_02000, 2000, Legal.Met_HGSS_2);
            Util.AddCBWithOffset(met_list, s.metHGSS_03000, 3000, Legal.Met_HGSS_3);
            return(met_list);
        }
Exemplo n.º 17
0
        private static List <ComboItem> CreateGen4(GameStrings s)
        {
            var locations = Util.GetCBList(s.metHGSS_00000, 0);

            Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Locations.Daycare4);
            Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Locations.LinkTrade4);
            Util.AddCBWithOffset(locations, s.metHGSS_03000, 3000, Locations.Ranger4);
            Util.AddCBWithOffset(locations, s.metHGSS_00000, 0000, Locations4.Met0);
            Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Locations4.Met2);
            Util.AddCBWithOffset(locations, s.metHGSS_03000, 3000, Locations4.Met3);
            return(locations);
        }
Exemplo n.º 18
0
        private IReadOnlyList <ComboItem> GetVersionList()
        {
            var ver = 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);

            ver.AddRange(Util.GetCBList(gamelist, Legal.Games_7vc1).OrderBy(g => g.Value)); // stuff to end unsorted
            ver.AddRange(Util.GetCBList(gamelist, Legal.Games_7vc2).OrderBy(g => g.Value)); // stuff to end unsorted
            ver.AddRange(Util.GetCBList(gamelist, Legal.Games_7go).OrderBy(g => g.Value));  // stuff to end unsorted
            return(ver);
        }
Exemplo n.º 19
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);
        }
Exemplo n.º 20
0
        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);
        }
Exemplo n.º 21
0
        private static IReadOnlyList <ComboItem> GetVersionList(GameStrings s)
        {
            var list = s.gamelist;
            var ver  = Util.GetCBList(list,
                                      Games_8swsh,
                                      Games_7gg,
                                      Games_7usum, Games_7sm,
                                      Games_6oras, Games_6xy,
                                      Games_5, Games_4, Games_4e, Games_4r,
                                      Games_3, Games_3e, Games_3r, Games_3s);

            ver.AddRange(Util.GetCBList(list, Games_7vc2).OrderBy(g => g.Value)); // stuff to end unsorted
            ver.AddRange(Util.GetCBList(list, Games_7vc1).OrderBy(g => g.Value)); // stuff to end unsorted
            ver.AddRange(Util.GetCBList(list, Games_7go).OrderBy(g => g.Value));  // stuff to end unsorted
            return(ver);
        }
Exemplo n.º 22
0
        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);
        }
Exemplo n.º 23
0
        private List <ComboItem> GetMemories()
        {
            // Memory Chooser
            int memorycount = s.memories.Length - 38;

            string[] mems    = new string[memorycount];
            int[]    allowed = new int[memorycount];
            for (int i = 0; i < memorycount; i++)
            {
                mems[i]    = s.memories[38 + i];
                allowed[i] = i + 1;
            }
            Array.Resize(ref allowed, allowed.Length - 1);
            var memory_list1 = Util.GetCBList(new[] { mems[0] }, null);

            return(Util.GetOffsetCBList(memory_list1, mems, 0, allowed));
        }
Exemplo n.º 24
0
        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);
        }
Exemplo n.º 25
0
        public GameDataSource(GameStrings s)
        {
            Strings                 = 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.GetUnsortedCBList(s.encountertypelist, Gen4EncounterTypes);

            var moves = Util.GetCBList(s.movelist);

            HaXMoveDataSource = moves;
            var legal = new List <ComboItem>(moves);

            legal.RemoveAll(m => Legal.Z_Moves.Contains(m.Value));
            LegalMoveDataSource = legal;

            VersionDataSource = GetVersionList(s);

            Met = new MetDataSource(s);

            Empty = new ComboItem(s.Species[0], 0);
        }
Exemplo n.º 26
0
 public static void SetItemDataSource(bool HaX, int MaxItemID, IEnumerable <ushort> allowed, int generation, GameVersion game, GameStrings s)
 {
     string[] items = s.GetItemStrings(generation, game);
     ItemDataSource = Util.GetCBList(items, (allowed == null || HaX ? Enumerable.Range(0, MaxItemID) : allowed.Select(i => (int)i)).ToArray());
 }
Exemplo n.º 27
0
        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
        }
Exemplo n.º 28
0
        private void InitializeMetSources()
        {
            // Gen 2
            {
                var met_list = Util.GetCBList(metGSC_00000, Enumerable.Range(0, 0x5F).ToArray());
                Util.AddCBWithOffset(met_list, metGSC_00000, 00000, 0x7E, 0x7F);
                MetGen2 = met_list;
            }
            // Gen 3
            {
                var met_list = Util.GetCBList(metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray());
                Util.AddCBWithOffset(met_list, metRSEFRLG_00000, 00000, 253, 254, 255);
                MetGen3 = met_list;

                MetGen3CXD = Util.GetCBList(metCXD_00000, Enumerable.Range(0, metCXD_00000.Length).ToArray()).Where(c => c.Text.Length > 0).ToList();
            }
            // Gen 4
            {
                var met_list = Util.GetCBList(metHGSS_00000, 0);
                Util.AddCBWithOffset(met_list, metHGSS_02000, 2000, Locations.Daycare4);
                Util.AddCBWithOffset(met_list, metHGSS_02000, 2000, Locations.LinkTrade4);
                Util.AddCBWithOffset(met_list, metHGSS_03000, 3000, Locations.Ranger4);
                Util.AddCBWithOffset(met_list, metHGSS_00000, 0000, Legal.Met_HGSS_0);
                Util.AddCBWithOffset(met_list, metHGSS_02000, 2000, Legal.Met_HGSS_2);
                Util.AddCBWithOffset(met_list, metHGSS_03000, 3000, Legal.Met_HGSS_3);
                MetGen4 = met_list;
            }
            // Gen 5
            {
                var met_list = Util.GetCBList(metBW2_00000, 0);
                Util.AddCBWithOffset(met_list, metBW2_60000, 60001, Locations.Daycare5);
                Util.AddCBWithOffset(met_list, metBW2_30000, 30001, Locations.LinkTrade5);
                Util.AddCBWithOffset(met_list, metBW2_00000, 00000, Legal.Met_BW2_0);
                Util.AddCBWithOffset(met_list, metBW2_30000, 30001, Legal.Met_BW2_3);
                Util.AddCBWithOffset(met_list, metBW2_40000, 40001, Legal.Met_BW2_4);
                Util.AddCBWithOffset(met_list, metBW2_60000, 60001, Legal.Met_BW2_6);
                MetGen5 = met_list;
            }
            // Gen 6
            {
                var met_list = Util.GetCBList(metXY_00000, 0);
                Util.AddCBWithOffset(met_list, metXY_60000, 60001, Locations.Daycare5);
                Util.AddCBWithOffset(met_list, metXY_30000, 30001, Locations.LinkTrade6);
                Util.AddCBWithOffset(met_list, metXY_00000, 00000, Legal.Met_XY_0);
                Util.AddCBWithOffset(met_list, metXY_30000, 30001, Legal.Met_XY_3);
                Util.AddCBWithOffset(met_list, metXY_40000, 40001, Legal.Met_XY_4);
                Util.AddCBWithOffset(met_list, metXY_60000, 60001, Legal.Met_XY_6);
                MetGen6 = met_list;
            }
            // Gen 7
            {
                var met_list = Util.GetCBList(metSM_00000, 0);
                Util.AddCBWithOffset(met_list, metSM_60000, 60001, Locations.Daycare5);
                Util.AddCBWithOffset(met_list, metSM_30000, 30001, Locations.LinkTrade6);
                Util.AddCBWithOffset(met_list, metSM_00000, 00000, Legal.Met_SM_0);
                Util.AddCBWithOffset(met_list, metSM_30000, 30001, Legal.Met_SM_3);
                Util.AddCBWithOffset(met_list, metSM_40000, 40001, Legal.Met_SM_4);
                Util.AddCBWithOffset(met_list, metSM_60000, 60001, Legal.Met_SM_6);
                MetGen7 = met_list;
            }
            // Gen 7 GG
            {
                var met_list = Util.GetCBList(metGG_00000, 0);
                Util.AddCBWithOffset(met_list, metGG_60000, 60001, 60002);
                Util.AddCBWithOffset(met_list, metGG_30000, 30001, Locations.LinkTrade6);
                Util.AddCBWithOffset(met_list, metGG_00000, 00000, Legal.Met_GG_0);
                Util.AddCBWithOffset(met_list, metGG_30000, 30001, Legal.Met_GG_3);
                Util.AddCBWithOffset(met_list, metGG_40000, 40001, Legal.Met_GG_4);
                Util.AddCBWithOffset(met_list, metGG_60000, 60001, Legal.Met_GG_6);
                MetGen7GG = met_list;
            }
        }
Exemplo n.º 29
0
        public void SetItemDataSource(GameVersion game, int generation, int MaxItemID, IEnumerable <ushort> allowed = null, bool HaX = false)
        {
            var items = GetItemStrings(generation, game);

            ItemDataSource = Util.GetCBList(items, (allowed == null || HaX ? Enumerable.Range(0, MaxItemID) : allowed.Select(i => (int)i)).ToArray());
        }
Exemplo n.º 30
0
        private void InitializeMetSources()
        {
            // Gen 2
            {
                var met_list = Util.GetCBList(metGSC_00000, Enumerable.Range(0, 0x5F).ToArray());
                met_list = Util.GetOffsetCBList(met_list, metGSC_00000, 00000, new[] { 0x7E, 0x7F });
                MetGen2  = met_list;
            }
            // Gen 3
            {
                var met_list = Util.GetCBList(metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray());
                met_list = Util.GetOffsetCBList(met_list, metRSEFRLG_00000, 00000, new[] { 253, 254, 255 });
                MetGen3  = met_list;

                MetGen3CXD = Util.GetCBList(metCXD_00000, Enumerable.Range(0, metCXD_00000.Length).ToArray()).Where(c => c.Text.Length > 0).ToList();
            }
            // Gen 4
            {
                var met_list = Util.GetCBList(metHGSS_00000, new[] { 0 });
                met_list = Util.GetOffsetCBList(met_list, metHGSS_02000, 2000, new[] { 2000 });
                met_list = Util.GetOffsetCBList(met_list, metHGSS_02000, 2000, new[] { 2002 });
                met_list = Util.GetOffsetCBList(met_list, metHGSS_03000, 3000, new[] { 3001 });
                met_list = Util.GetOffsetCBList(met_list, metHGSS_00000, 0000, Legal.Met_HGSS_0);
                met_list = Util.GetOffsetCBList(met_list, metHGSS_02000, 2000, Legal.Met_HGSS_2);
                met_list = Util.GetOffsetCBList(met_list, metHGSS_03000, 3000, Legal.Met_HGSS_3);
                MetGen4  = met_list;
            }
            // Gen 5
            {
                var met_list = Util.GetCBList(metBW2_00000, new[] { 0 });
                met_list = Util.GetOffsetCBList(met_list, metBW2_60000, 60001, new[] { 60002 });
                met_list = Util.GetOffsetCBList(met_list, metBW2_30000, 30001, new[] { 30003 });
                met_list = Util.GetOffsetCBList(met_list, metBW2_00000, 00000, Legal.Met_BW2_0);
                met_list = Util.GetOffsetCBList(met_list, metBW2_30000, 30001, Legal.Met_BW2_3);
                met_list = Util.GetOffsetCBList(met_list, metBW2_40000, 40001, Legal.Met_BW2_4);
                met_list = Util.GetOffsetCBList(met_list, metBW2_60000, 60001, Legal.Met_BW2_6);
                MetGen5  = met_list;
            }
            // Gen 6
            {
                var met_list = Util.GetCBList(metXY_00000, new[] { 0 });
                met_list = Util.GetOffsetCBList(met_list, metXY_60000, 60001, new[] { 60002 });
                met_list = Util.GetOffsetCBList(met_list, metXY_30000, 30001, new[] { 30002 });
                met_list = Util.GetOffsetCBList(met_list, metXY_00000, 00000, Legal.Met_XY_0);
                met_list = Util.GetOffsetCBList(met_list, metXY_30000, 30001, Legal.Met_XY_3);
                met_list = Util.GetOffsetCBList(met_list, metXY_40000, 40001, Legal.Met_XY_4);
                met_list = Util.GetOffsetCBList(met_list, metXY_60000, 60001, Legal.Met_XY_6);
                MetGen6  = met_list;
            }
            // Gen 7
            {
                var met_list = Util.GetCBList(metSM_00000, new[] { 0 });
                met_list = Util.GetOffsetCBList(met_list, metSM_60000, 60001, new[] { 60002 });
                met_list = Util.GetOffsetCBList(met_list, metSM_30000, 30001, new[] { 30002 });
                met_list = Util.GetOffsetCBList(met_list, metSM_00000, 00000, Legal.Met_SM_0);
                met_list = Util.GetOffsetCBList(met_list, metSM_30000, 30001, Legal.Met_SM_3);
                met_list = Util.GetOffsetCBList(met_list, metSM_40000, 40001, Legal.Met_SM_4);
                met_list = Util.GetOffsetCBList(met_list, metSM_60000, 60001, Legal.Met_SM_6);
                MetGen7  = met_list;
            }
        }