Exemple #1
0
        private void Setup()
        {
            ushort[] TMs = new ushort[0];
            TMEditor7.getTMHMList(ref TMs);
            CLB_TM.Items.Clear();

            if (TMs.Length == 0) // No ExeFS to grab TMs from.
            {
                for (int i = 1; i <= 100; i++)
                    CLB_TM.Items.Add($"TM{i:00}");
            }
            else // Use TM moves.
            {
                for (int i = 1; i <= 100; i++)
                    CLB_TM.Items.Add($"TM{i:00} {moves[TMs[i - 1]]}");
            }
            foreach (ushort m in tutormoves)
                CLB_MoveTutors.Items.Add(moves[m]);

            for (int i = 0; i < entryNames.Length; i++)
                CB_Species.Items.Add($"{entryNames[i]} - {i:000}");

            foreach (ComboBox cb in helditem_boxes)
                foreach (string it in items)
                    cb.Items.Add(it);

            foreach (string it in items)
                CB_ZItem.Items.Add(it);
            foreach (string m in moves)
                CB_ZBaseMove.Items.Add(m);
            foreach (string m in moves)
                CB_ZMove.Items.Add(m);

            foreach (ComboBox cb in ability_boxes)
                foreach (string ab in abilities)
                    cb.Items.Add(ab);

            foreach (ComboBox cb in typing_boxes)
                foreach (string ty in types)
                    cb.Items.Add(ty);

            foreach (ComboBox cb in eggGroup_boxes)
                foreach (string eg in eggGroups)
                    cb.Items.Add(eg);

            foreach (string co in colors)
                CB_Color.Items.Add(co);

            foreach (string eg in EXPGroups)
                CB_EXPGroup.Items.Add(eg);
        }
        public PersonalEditor7(byte[][] infiles)
        {
            InitializeComponent();
            helditem_boxes = new[] { CB_HeldItem1, CB_HeldItem2, CB_HeldItem3 };
            ability_boxes  = new[] { CB_Ability1, CB_Ability2, CB_Ability3 };
            typing_boxes   = new[] { CB_Type1, CB_Type2 };
            eggGroup_boxes = new[] { CB_EggGroup1, CB_EggGroup2 };
            byte_boxes     = new[] { TB_BaseHP, TB_BaseATK, TB_BaseDEF, TB_BaseSPA, TB_BaseSPD, TB_BaseSPE, TB_Gender, TB_HatchCycles, TB_Friendship, TB_CatchRate, TB_CallRate };
            ev_boxes       = new[] { TB_HPEVs, TB_ATKEVs, TB_DEFEVs, TB_SPEEVs, TB_SPAEVs, TB_SPDEVs };
            rstat_boxes    = new[] { CHK_rHP, CHK_rATK, CHK_rDEF, CHK_rSPA, CHK_rSPD, CHK_rSPE };
            files          = infiles;

            species[0]   = "---";
            abilities[0] = items[0] = moves[0] = "";
            var altForms = Main.Config.Personal.getFormList(species, Main.Config.MaxSpeciesID);

            entryNames = Main.Config.Personal.getPersonalEntryList(altForms, species, Main.Config.MaxSpeciesID, out baseForms, out formVal);
            TMs        = TMEditor7.getTMHMList();

            Setup();
            CB_Species.SelectedIndex = 1;
            RandSettings.GetFormSettings(this, TP_Randomizer.Controls);
        }
Exemple #3
0
        private void Setup()
        {
            ushort[] TMs = new ushort[0];
            TMEditor7.getTMHMList(ref TMs);
            CLB_TM.Items.Clear();

            if (TMs.Length == 0) // No ExeFS to grab TMs from.
            {
                for (int i = 1; i <= 100; i++)
                {
                    CLB_TM.Items.Add($"TM{i:00}");
                }
            }
            else // Use TM moves.
            {
                for (int i = 1; i <= 100; i++)
                {
                    CLB_TM.Items.Add($"TM{i:00} {moves[TMs[i - 1]]}");
                }
            }
            foreach (ushort m in tutormoves)
            {
                CLB_MoveTutors.Items.Add(moves[m]);
            }

            for (int i = 0; i < entryNames.Length; i++)
            {
                CB_Species.Items.Add($"{entryNames[i]} - {i:000}");
            }

            foreach (ComboBox cb in helditem_boxes)
            {
                foreach (string it in items)
                {
                    cb.Items.Add(it);
                }
            }

            foreach (string it in items)
            {
                CB_ZItem.Items.Add(it);
            }
            foreach (string m in moves)
            {
                CB_ZBaseMove.Items.Add(m);
            }
            foreach (string m in moves)
            {
                CB_ZMove.Items.Add(m);
            }

            foreach (ComboBox cb in ability_boxes)
            {
                foreach (string ab in abilities)
                {
                    cb.Items.Add(ab);
                }
            }

            foreach (ComboBox cb in typing_boxes)
            {
                foreach (string ty in types)
                {
                    cb.Items.Add(ty);
                }
            }

            foreach (ComboBox cb in eggGroup_boxes)
            {
                foreach (string eg in eggGroups)
                {
                    cb.Items.Add(eg);
                }
            }

            foreach (string co in colors)
            {
                CB_Color.Items.Add(co);
            }

            foreach (string eg in EXPGroups)
            {
                CB_EXPGroup.Items.Add(eg);
            }

            if (Main.Config.USUM)
            {
                foreach (var tutor in Tutors_USUM)
                {
                    CLB_BeachTutors.Items.Add(moves[tutor]);
                }
            }

            // toggle usum content
            CHK_BeachTutors.Checked     = CHK_BeachTutors.Visible =
                CLB_BeachTutors.Visible = CLB_BeachTutors.Enabled = L_BeachTutors.Visible = Main.Config.USUM;
        }