Ejemplo n.º 1
0
        private static int[] getHighAttacks(trpoke7 pk)
        {
            int i        = Main.Config.Personal.getFormeIndex(pk.Species, pk.Form);
            var learnset = Main.Config.Learnsets[i];
            var moves    = learnset.Moves.OrderByDescending(move => Main.Config.Moves[move].Power).Distinct().Take(4).ToArray();

            Array.Resize(ref moves, 4);
            return(moves);
        }
Ejemplo n.º 2
0
        private static int[] getCurrentAttacks(trpoke7 pk)
        {
            int i        = Main.Config.Personal.getFormeIndex(pk.Species, pk.Form);
            var learnset = Main.Config.Learnsets[i];
            var moves    = learnset.getMoves(pk.Level).Distinct().Take(4).ToArray();

            Array.Resize(ref moves, 4);
            return(moves);
        }
Ejemplo n.º 3
0
        private void PopulateFieldsTP7(trpoke7 pk)
        {
            pkm = pk.Clone();

            int spec = pkm.Species, form = pkm.Form;

            CB_Species.SelectedIndex = spec;
            CB_Forme.SelectedIndex   = form;
            CB_Ability.SelectedIndex = pkm.Ability;
            CB_Item.SelectedIndex    = pkm.Item;
            CHK_Shiny.Checked        = pkm.Shiny;
            CB_Gender.SelectedIndex  = pkm.Gender;

            CB_Move1.SelectedIndex = pkm.Move1;
            CB_Move2.SelectedIndex = pkm.Move2;
            CB_Move3.SelectedIndex = pkm.Move3;
            CB_Move4.SelectedIndex = pkm.Move4;

            updatingStats           = true;
            CB_Nature.SelectedIndex = pkm.Nature;
            NUD_Level.Value         = Math.Min(NUD_Level.Maximum, pkm.Level);

            TB_HPIV.Text  = pkm.IV_HP.ToString();
            TB_ATKIV.Text = pkm.IV_ATK.ToString();
            TB_DEFIV.Text = pkm.IV_DEF.ToString();
            TB_SPAIV.Text = pkm.IV_SPA.ToString();
            TB_SPEIV.Text = pkm.IV_SPE.ToString();
            TB_SPDIV.Text = pkm.IV_SPD.ToString();

            TB_HPEV.Text  = pkm.EV_HP.ToString();
            TB_ATKEV.Text = pkm.EV_ATK.ToString();
            TB_DEFEV.Text = pkm.EV_DEF.ToString();
            TB_SPAEV.Text = pkm.EV_SPA.ToString();
            TB_SPEEV.Text = pkm.EV_SPE.ToString();
            TB_SPDEV.Text = pkm.EV_SPD.ToString();
            updatingStats = false;
            UpdateStats(null, null);
        }
Ejemplo n.º 4
0
        private void Setup()
        {
            AltForms = forms.Select(_ => Enumerable.Range(0, 100).Select(i => i.ToString()).ToArray()).ToArray();
            CB_TrainerID.Items.Clear();
            for (int i = 0; i < trdata.Length; i++)
            {
                CB_TrainerID.Items.Add(GetEntryTitle(trName[i] ?? "UNKNOWN", i));
            }

            CB_Trainer_Class.Items.Clear();
            for (int i = 0; i < trClass.Length; i++)
            {
                CB_Trainer_Class.Items.Add(GetEntryTitle(trClass[i], i));
            }

            Trainers[0] = new trdata7();

            for (int i = 1; i < trdata.Length; i++)
            {
                Trainers[i] = new trdata7(trdata[i], trpoke[i])
                {
                    Name = trName[i],
                    ID   = i
                };
            }

            specieslist[0] = "---";
            abilitylist[0] = itemlist[0] = movelist[0] = "(None)";
            pba            = new[] { PB_Team1, PB_Team2, PB_Team3, PB_Team4, PB_Team5, PB_Team6 };
            AIBits         = new[] { CHK_AI0, CHK_AI1, CHK_AI2, CHK_AI3, CHK_AI4, CHK_AI5, CHK_AI6, CHK_AI7 };

            CB_Species.Items.Clear();
            foreach (string s in specieslist)
            {
                CB_Species.Items.Add(s);
            }

            CB_Move1.Items.Clear();
            CB_Move2.Items.Clear();
            CB_Move3.Items.Clear();
            CB_Move4.Items.Clear();
            foreach (string s in movelist)
            {
                CB_Move1.Items.Add(s);
                CB_Move2.Items.Add(s);
                CB_Move3.Items.Add(s);
                CB_Move4.Items.Add(s);
            }

            CB_HPType.DataSource    = types.Skip(1).Take(16).ToArray();
            CB_HPType.SelectedIndex = 0;

            CB_Nature.Items.Clear();
            CB_Nature.Items.AddRange(natures.Take(25).ToArray());

            CB_Item.Items.Clear();
            foreach (string s in itemlist)
            {
                CB_Item.Items.Add(s);
            }

            CB_Gender.Items.Clear();
            CB_Gender.Items.Add("- / Genderless/Random");
            CB_Gender.Items.Add("♂ / Male");
            CB_Gender.Items.Add("♀ / Female");

            CB_Forme.Items.Add("");

            CB_Species.SelectedIndex = 0;
            CB_Item_1.Items.Clear();
            CB_Item_2.Items.Clear();
            CB_Item_3.Items.Clear();
            CB_Item_4.Items.Clear();
            foreach (string s in itemlist)
            {
                CB_Item_1.Items.Add(s);
                CB_Item_2.Items.Add(s);
                CB_Item_3.Items.Add(s);
                CB_Item_4.Items.Add(s);
            }

            CB_Money.Items.Clear();
            for (int i = 0; i < 256; i++)
            {
                CB_Money.Items.Add(i.ToString());
            }

            CB_TrainerID.SelectedIndex = 0;
            index = 0;
            pkm   = new trpoke7();
            PopulateFieldsTP7(pkm);
        }
Ejemplo n.º 5
0
        private static void GetQuickFiller(PictureBox pb, trpoke7 pk)
        {
            Bitmap rawImg = WinFormsUtil.getSprite(pk.Species, pk.Form, pk.Gender, pk.Item, Main.Config, pk.Shiny);

            pb.Image = WinFormsUtil.scaleImage(rawImg, 2);
        }
Ejemplo n.º 6
0
        private void Setup()
        {
            AltForms = forms.Select(f => Enumerable.Range(0, 100).Select(i => i.ToString()).ToArray()).ToArray();

            Array.Resize(ref trName, trdata.Length);
            CB_TrainerID.Items.Clear();
            for (int i = 0; i < trdata.Length; i++)
            {
                CB_TrainerID.Items.Add(string.Format("{1} - {0}", i.ToString("000"), trName[i] ?? "UNKNOWN"));
            }

            CB_Trainer_Class.Items.Clear();
            for (int i = 0; i < trClass.Length; i++)
            {
                CB_Trainer_Class.Items.Add(string.Format("{1} - {0}", i.ToString("000"), trClass[i]));
            }

            Trainers[0] = new trdata7();

            for (int i = 1; i < trdata.Length; i++)
            {
                Trainers[i] = new trdata7(trdata[i], trpoke[i])
                {
                    Name = trName[i],
                    ID   = i
                };
            }

            specieslist[0] = "---";
            abilitylist[0] = itemlist[0] = movelist[0] = "(None)";
            pba            = new[] { PB_Team1, PB_Team2, PB_Team3, PB_Team4, PB_Team5, PB_Team6 };

            CB_Species.Items.Clear();
            foreach (string s in specieslist)
            {
                CB_Species.Items.Add(s);
            }

            CB_Move1.Items.Clear();
            CB_Move2.Items.Clear();
            CB_Move3.Items.Clear();
            CB_Move4.Items.Clear();
            foreach (string s in movelist)
            {
                CB_Move1.Items.Add(s);
                CB_Move2.Items.Add(s);
                CB_Move3.Items.Add(s);
                CB_Move4.Items.Add(s);
            }

            CB_HPType.DataSource    = types.Skip(1).Take(16).ToArray();
            CB_HPType.SelectedIndex = 0;

            CB_Nature.Items.Clear();
            foreach (string s in natures)
            {
                CB_Nature.Items.Add(s);
            }

            CB_Item.Items.Clear();
            foreach (string s in itemlist)
            {
                CB_Item.Items.Add(s);
            }

            CB_Gender.Items.Clear();
            CB_Gender.Items.Add("- / G/Random");
            CB_Gender.Items.Add("♂ / M");
            CB_Gender.Items.Add("♀ / F");

            CB_Forme.Items.Add("");

            CB_Species.SelectedIndex = 0;
            CB_Item_1.Items.Clear();
            CB_Item_2.Items.Clear();
            CB_Item_3.Items.Clear();
            CB_Item_4.Items.Clear();
            foreach (string s in itemlist)
            {
                CB_Item_1.Items.Add(s);
                CB_Item_2.Items.Add(s);
                CB_Item_3.Items.Add(s);
                CB_Item_4.Items.Add(s);
            }

            CB_Money.Items.Clear();
            for (int i = 0; i < 256; i++)
            {
                CB_Money.Items.Add(i.ToString());
            }

            CB_TrainerID.SelectedIndex = 0;
            index = 0;
            pkm   = new trpoke7();
            populateFieldsTP7(pkm);
        }
Ejemplo n.º 7
0
 private static int[] getCurrentAttacks(trpoke7 pk)
 {
     int i = Main.Config.Personal.getFormeIndex(pk.Species, pk.Form);
     var learnset = Main.Config.Learnsets[i];
     var moves = learnset.getMoves(pk.Level).Distinct().Take(4).ToArray();
     Array.Resize(ref moves, 4);
     return moves;
 }
Ejemplo n.º 8
0
        private void Setup()
        {
            AltForms = forms.Select(f => Enumerable.Range(0, 100).Select(i => i.ToString()).ToArray()).ToArray();

            Array.Resize(ref trName, trdata.Length);
            CB_TrainerID.Items.Clear();
            for (int i = 0; i < trdata.Length; i++)
                CB_TrainerID.Items.Add(string.Format("{1} - {0}", i.ToString("000"), trName[i] ?? "UNKNOWN"));

            CB_Trainer_Class.Items.Clear();
            for (int i = 0; i < trClass.Length; i++)
                CB_Trainer_Class.Items.Add(string.Format("{1} - {0}", i.ToString("000"), trClass[i]));

            Trainers[0] = new trdata7();

            for (int i = 1; i < trdata.Length; i++)
            {
                Trainers[i] = new trdata7(trdata[i], trpoke[i])
                {
                    Name = trName[i],
                    ID = i
                };
            }

            specieslist[0] = "---";
            abilitylist[0] = itemlist[0] = movelist[0] = "(None)";
            pba = new[] { PB_Team1, PB_Team2, PB_Team3, PB_Team4, PB_Team5, PB_Team6 };

            CB_Species.Items.Clear();
            foreach (string s in specieslist)
                CB_Species.Items.Add(s);

            CB_Move1.Items.Clear();
            CB_Move2.Items.Clear();
            CB_Move3.Items.Clear();
            CB_Move4.Items.Clear();
            foreach (string s in movelist)
            {
                CB_Move1.Items.Add(s);
                CB_Move2.Items.Add(s);
                CB_Move3.Items.Add(s);
                CB_Move4.Items.Add(s);
            }

            CB_HPType.DataSource = types.Skip(1).Take(16).ToArray();
            CB_HPType.SelectedIndex = 0;

            CB_Nature.Items.Clear();
            foreach (string s in natures)
                CB_Nature.Items.Add(s);

            CB_Item.Items.Clear();
            foreach (string s in itemlist)
                CB_Item.Items.Add(s);

            CB_Gender.Items.Clear();
            CB_Gender.Items.Add("- / G/Random");
            CB_Gender.Items.Add("♂ / M");
            CB_Gender.Items.Add("♀ / F");

            CB_Forme.Items.Add("");

            CB_Species.SelectedIndex = 0;
            CB_Item_1.Items.Clear();
            CB_Item_2.Items.Clear();
            CB_Item_3.Items.Clear();
            CB_Item_4.Items.Clear();
            CB_Prize.Items.Clear();
            foreach (string s in itemlist)
            {
                CB_Item_1.Items.Add(s);
                CB_Item_2.Items.Add(s);
                CB_Item_3.Items.Add(s);
                CB_Item_4.Items.Add(s);
                CB_Prize.Items.Add(s);
            }

            CB_Money.Items.Clear();
            for (int i = 0; i < 256; i++)
            { CB_Money.Items.Add(i.ToString()); }

            CB_Battle_Type.Items.Clear();
            CB_Battle_Type.Items.Add("Single");
            CB_Battle_Type.Items.Add("Double");
            CB_Battle_Type.Items.Add("Royal");

            CB_TrainerID.SelectedIndex = 0;
            index = 0;
            pkm = new trpoke7();
            populateFieldsTP7(pkm);
        }
Ejemplo n.º 9
0
        private void populateFieldsTP7(trpoke7 pk)
        {
            pkm = pk.Clone();

            int spec = pkm.Species, form = pkm.Form;

            CB_Species.SelectedIndex = spec;
            CB_Forme.SelectedIndex = form;
            CB_Ability.SelectedIndex = pkm.Ability;
            CB_Item.SelectedIndex = pkm.Item;
            CHK_Shiny.Checked = pkm.Shiny;
            CB_Gender.SelectedIndex = pkm.Gender;

            CB_Move1.SelectedIndex = pkm.Move1;
            CB_Move2.SelectedIndex = pkm.Move2;
            CB_Move3.SelectedIndex = pkm.Move3;
            CB_Move4.SelectedIndex = pkm.Move4;

            updatingStats = true;
            CB_Nature.SelectedIndex = pkm.Nature;
            NUD_Level.Value = Math.Min(NUD_Level.Maximum, pkm.Level);

            TB_HPIV.Text = pkm.IV_HP.ToString();
            TB_ATKIV.Text = pkm.IV_ATK.ToString();
            TB_DEFIV.Text = pkm.IV_DEF.ToString();
            TB_SPAIV.Text = pkm.IV_SPA.ToString();
            TB_SPEIV.Text = pkm.IV_SPE.ToString();
            TB_SPDIV.Text = pkm.IV_SPD.ToString();

            TB_HPEV.Text = pkm.EV_HP.ToString();
            TB_ATKEV.Text = pkm.EV_ATK.ToString();
            TB_DEFEV.Text = pkm.EV_DEF.ToString();
            TB_SPAEV.Text = pkm.EV_SPA.ToString();
            TB_SPEEV.Text = pkm.EV_SPE.ToString();
            TB_SPDEV.Text = pkm.EV_SPD.ToString();
            updatingStats = false;
            updateStats(null, null);
        }
Ejemplo n.º 10
0
 private static void getQuickFiller(PictureBox pb, trpoke7 pk)
 {
     Bitmap rawImg = Util.getSprite(pk.Species, pk.Form, pk.Gender, pk.Item, pk.Shiny);
     pb.Image = Util.scaleImage(rawImg, 2);
 }
Ejemplo n.º 11
0
 private static int[] getHighAttacks(trpoke7 pk)
 {
     int i = Main.Config.Personal.getFormeIndex(pk.Species, pk.Form);
     var learnset = Main.Config.Learnsets[i];
     var moves = learnset.Moves.OrderByDescending(move => Main.Config.Moves[move].Power).Distinct().Take(4).ToArray();
     Array.Resize(ref moves, 4);
     return moves;
 }