Ejemplo n.º 1
0
        private void refreshSpeciesAbility(object sender, EventArgs e)
        {
            int i = Array.IndexOf(trpk_pkm, sender as ComboBox);

            FormUtil.setForms(trpk_pkm[i].SelectedIndex, trpk_form[i], AltForms);
            refreshPKMSlotAbility(i);
        }
Ejemplo n.º 2
0
        private void getEntry()
        {
            if (!loaded)
            {
                return;
            }
            if (Main.Config.ORAS && entry == 384 && !dumping) // Current Mon is Rayquaza
            {
                WinFormsUtil.Alert("Rayquaza is special and uses a different activator for its evolution. If it knows Dragon Ascent, it can Mega Evolve", "Don't edit its evolution table if you want to keep this functionality.");
            }

            byte[] data = files[entry];

            foreach (ComboBox CB in forme_spec)
            {
                FormUtil.setForms(entry, CB, AltForms);
            }

            me = new MegaEvolutions(data);
            for (int i = 0; i < 2; i++)
            {
                checkbox_spec[i].Checked    = me.Method[i] == 1;
                item_spec[i].SelectedValue  = (int)me.Argument[i];
                forme_spec[i].SelectedIndex = me.Form[i];
            }
        }
Ejemplo n.º 3
0
 private void RefreshSpeciesAbility(object sender, EventArgs e)
 {
     if (index < 0)
     {
         return;
     }
     pkm.Species = (ushort)CB_Species.SelectedIndex;
     FormUtil.setForms(CB_Species.SelectedIndex, CB_Forme, AltForms);
     RefreshPKMSlotAbility();
 }
Ejemplo n.º 4
0
        private void readFile()
        {
            if (start)
            {
                return;
            }
            index   = CB_TrainerID.SelectedIndex;
            loading = true;

            if (index == 0)
            {
                return;
            }

            tabControl1.Enabled = true;
            byte[] trd = trdata[index];
            byte[] trp = trpoke[index];
            tr = new trdata6(trd, trp, Main.Config.ORAS);

            // Load Trainer Data
            CB_Trainer_Class.SelectedIndex = tr.Class;
            checkBox_Item.Checked          = tr.Item;
            checkBox_Moves.Checked         = tr.Moves;
            CB_Battle_Type.SelectedIndex   = tr.BattleType;
            CB_numPokemon.SelectedIndex    = tr.NumPokemon;
            CB_Item_1.SelectedIndex        = tr.Items[0];
            CB_Item_2.SelectedIndex        = tr.Items[1];
            CB_Item_3.SelectedIndex        = tr.Items[2];
            CB_Item_4.SelectedIndex        = tr.Items[3];
            CB_AI.SelectedIndex            = tr.AI;
            checkBox_Healer.Checked        = tr.Healer;
            CB_Money.SelectedIndex         = tr.Money;
            CB_Prize.SelectedIndex         = tr.Prize;

            // Load Pokemon Data
            for (int i = 0; i < tr.NumPokemon; i++)
            {
                trpk_IV[i].SelectedIndex  = tr.Team[i].IVs;
                trpk_lvl[i].SelectedIndex = tr.Team[i].Level;
                trpk_pkm[i].SelectedIndex = tr.Team[i].Species;
                FormUtil.setForms(tr.Team[i].Species, trpk_form[i], AltForms);
                trpk_form[i].SelectedIndex = tr.Team[i].Form % trpk_form[i].Items.Count; // stupid X/Y buggy edge cases (220 / 222)
                refreshPKMSlotAbility(i);                                                // Repopulate Abilities

                trpk_abil[i].SelectedIndex   = tr.Team[i].Ability;
                trpk_gender[i].SelectedIndex = tr.Team[i].Gender;

                trpk_item[i].SelectedIndex = tr.Team[i].Item;
                trpk_m1[i].SelectedIndex   = tr.Team[i].Moves[0];
                trpk_m2[i].SelectedIndex   = tr.Team[i].Moves[1];
                trpk_m3[i].SelectedIndex   = tr.Team[i].Moves[2];
                trpk_m4[i].SelectedIndex   = tr.Team[i].Moves[3];
            }
            loading = false;
            changeTrainerType(null, null); // Prompt cleaning update of PKM fields

            // Refresh Team View
            if (!loading)
            {
                for (int i = 0; i < 6; i++)
                {
                    showTeams(i);
                }
                // showText(); // Commented out for now, have to figure out how text is assigned.
            }
        }