예제 #1
0
        private void buttonGenerate_Click(object sender, EventArgs e)
        {
            uint hp  = 0;
            uint atk = 0;
            uint def = 0;
            uint spa = 0;
            uint spd = 0;
            uint spe = 0;

            if (maskedTextBoxHP.Text != "")
            {
                hp = uint.Parse(maskedTextBoxHP.Text);
            }
            if (maskedTextBoxAtk.Text != "")
            {
                atk = uint.Parse(maskedTextBoxAtk.Text);
            }
            if (maskedTextBoxDef.Text != "")
            {
                def = uint.Parse(maskedTextBoxDef.Text);
            }
            if (maskedTextBoxSpA.Text != "")
            {
                spa = uint.Parse(maskedTextBoxSpA.Text);
            }
            if (maskedTextBoxSpD.Text != "")
            {
                spd = uint.Parse(maskedTextBoxSpD.Text);
            }
            if (maskedTextBoxSpe.Text != "")
            {
                spe = uint.Parse(maskedTextBoxSpe.Text);
            }

            int test   = ((Nature)comboBoxNature.SelectedItem).Number;
            var nature = (uint)test;

            if (maskedTextBoxID.Text != "")
            {
                tid = uint.Parse(maskedTextBoxID.Text);
            }

            List <Seed> seeds =
                IVtoSeed.GetSeeds(
                    hp,
                    atk,
                    def,
                    spa,
                    spd,
                    spe,
                    nature,
                    tid);

            dataGridViewValues.DataSource = seeds;
        }
예제 #2
0
        public static string[] Generate(uint hp, uint atk, uint def, uint spa, uint spd, uint spe, uint nature, uint tid, FrameType type)
        {
            var seeds = IVtoSeed.GetSeeds(hp, atk, def, spa, spd, spe, nature, tid, type);

            if (seeds.Count == 0)
            {
                return new[] { "0", "0" }
            }
            ;

            return(new[]
            {
                seeds[0].Pid.ToString("X"),
                seeds[0].Sid.ToString(),
            });
        }
예제 #3
0
        public static uint[] Generate(uint hp, uint atk, uint def, uint spa, uint spd, uint spe, uint nature, uint tid, FrameType type)
        {
            var seeds = IVtoSeed.GetSeeds(hp, atk, def, spa, spd, spe, nature, tid, type);

            if (seeds.Count == 0)
            {
                return new[] { 0u, 0u }
            }
            ;

            return(new[]
            {
                seeds[0].Pid,
                seeds[0].Sid,
            });
        }