示例#1
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);
        }
示例#2
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);
        }
示例#3
0
        private static List <ComboItem> CreateGen3(GameStrings s)
        {
            var locations = Util.GetCBList(s.metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray());

            Util.AddCBWithOffset(locations, s.metRSEFRLG_00000, 00000, 253, 254, 255);
            return(locations);
        }
示例#4
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);
        }
示例#5
0
        private static List <ComboItem> CreateGen2(GameStrings s)
        {
            var locations = Util.GetCBList(s.metGSC_00000, Enumerable.Range(0, 0x5F).ToArray());

            Util.AddCBWithOffset(locations, s.metGSC_00000, 00000, 0x7E, 0x7F);
            return(locations);
        }
示例#6
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);
        }
示例#7
0
        private List <ComboItem> GetMemories()
        {
            var mems = s.memories.AsSpan(0);
            var list = new List <ComboItem> {
                new(mems[0], 0)
            };                                        // none at top

            Util.AddCBWithOffset(list, mems[1..], 1); // sorted the rest
示例#8
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);
        }
示例#9
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);
        }
示例#10
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);
        }
示例#11
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);
        }
示例#12
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);
        }
示例#13
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);
        }
示例#14
0
        private static List <ComboItem> CreateGen8b(GameStrings s)
        {
            // Manually add invalid (-1) location from SWSH as ID 65535
            var locations = new List <ComboItem> {
                new(s.metSWSH_00000[0], unchecked ((ushort)Locations.Default8bNone))
            };

            Util.AddCBWithOffset(locations, s.metBDSP_60000, 60000, Locations.Daycare5);
            Util.AddCBWithOffset(locations, s.metBDSP_30000, 30000, Locations.LinkTrade6);
            Util.AddCBWithOffset(locations, s.metBDSP_00000, 00000, Legal.Met_BS_0);
            Util.AddCBWithOffset(locations, s.metBDSP_30000, 30000, Legal.Met_BS_3);
            Util.AddCBWithOffset(locations, s.metBDSP_40000, 40000, Legal.Met_BS_4);
            Util.AddCBWithOffset(locations, s.metBDSP_60000, 60000, Legal.Met_BS_6);
            return(locations);
        }
示例#15
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] });

            Util.AddCBWithOffset(memory_list1, mems, 0, allowed);
            return(memory_list1);
        }
示例#16
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;
            }
        }