Esempio n. 1
0
        private void B_SRankCompleted_Click(object sender, EventArgs e)
        {
            int value = 3;    //default value
            int j     = 0;

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, 3, value, "rank"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            foreach (byte[] stage in new byte[][] { db.StagesMain, db.StagesExpert })
            {
                int entrylen = BitConverter.ToInt32(stage, 0x4);
                for (int i = 0; i < (BitConverter.ToInt32(stage, 0) - ((stage == db.StagesMain) ? 1 : 0)); i++)
                {
                    if (GetStage(i, j).Completed)
                    {
                        SetRank(i, j, value);
                        PatchScore(i, j);
                    }
                }
                j++;
            }
            MessageBox.Show("All Completed Normal & Expert stages have been " + new string[] { "C", "B", "A", "S" }[value] +"-ranked.");
        }
Esempio n. 2
0
        private void B_StreetPassDelete_Click(object sender, EventArgs e)
        {
            int  value = 0;    //default value
            bool boool = true; //default value

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, 9999, value, boool, "streetpass encounters", "Wipe tags"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                        boool = form.retChk;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            Array.Copy(BitConverter.GetBytes(value), 0, savedata, StreetCount.Ofset(), 2); //Sets streetpass count to value
            if (boool)
            {
                for (int i = 0; i < 10; i++)
                {
                    Array.Copy(new byte[StreetTag.Length()], 0, savedata, StreetTag.Ofset(i), StreetTag.Length()); //Erase StreetPass tags
                }
            }
            MessageBox.Show("Streetpass count set to " + value + ".\nStreetpass tags " + (boool ? "" : "not ") + "wiped.");
        }
Esempio n. 3
0
        private void B_MaxTalent_Click(object sender, EventArgs e)
        {
            int value = 5;    //default value

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, 5, value, "skill lvl"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            for (int i = 0; i < db.MegaStartIndex; i++)
            {
                if (GetMon(i).Caught)
                {
                    for (int j = 0; j < db.Rest[i].Item2; j++)
                    {
                        SetSkill(i, j, value);
                    }
                }
            }
            MessageBox.Show("Every pokemon that you have caught now has all its skills powered to level " + value + " !");
        }
Esempio n. 4
0
        private void B_LevelMax_Click(object sender, EventArgs e)
        {
            int value = 10, lollipops = 10;

            foreach (Tuple <int, int, bool, int, int, int[], int, Tuple <int, int> > tuple in db.Mons)
            {
                if (tuple.Item4 > lollipops)
                {
                    lollipops = tuple.Item4;
                }
            }
            value += lollipops;    //default value
            bool boool = false;

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, value, value, "max level"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                        boool = true;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            for (int i = 0; i < db.MegaStartIndex; i++)
            {
                if (GetMon(i).Caught)
                {
                    SetLevel(i, Math.Min(10 + db.Mons[i].Item4, value));
                }
            }
            if (boool)
            {
                MessageBox.Show("Everything you've caught is now level " + value + ((value > 10) ? " or below." : "."));
            }
            else
            {
                MessageBox.Show("Everything you've caught is now at its maximum level.");
            }
        }
Esempio n. 5
0
        private void B_LevelMax_Click(object sender, EventArgs e)
        {
            int value = 10, lollipops = 20;

            foreach (dbMon dbI in db.Mons) //if a pokemon can have more lollipops than coded, use that as max level instead
            {
                if (dbI.MaxLollipops > lollipops)
                {
                    lollipops = dbI.MaxLollipops;
                }
            }
            value += lollipops;    //default value
            bool boool = false;

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, value, value, "max level"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                        boool = true;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            for (int i = 0; i < db.MegaStartIndex; i++)
            {
                if (GetMon(i).Caught)
                {
                    SetLevel(i, Math.Min(10 + db.Mons[i].MaxLollipops, value));
                }
            }
            if (boool)
            {
                MessageBox.Show("Everything you've caught is now level " + value + ((value > 10) ? " or below." : "."));
            }
            else
            {
                MessageBox.Show("Everything you've caught is now at its maximum level.");
            }
        }
Esempio n. 6
0
        private void B_SRankCompleted_Click(object sender, EventArgs e)
        {
            int value = 3;    //default value

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, 3, value, "rank"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                    }
                    else
                    {
                        return;
                    }
                }
            }

            //foreach (byte[] stage in new byte[][] { db.StagesMainBin, db.StagesExpertBin })
            //{
            //    int entrylen = BitConverter.ToInt32(stage, 0x4);
            //    int lim = BitConverter.ToInt32(stage, 0);
            //    if (stage == db.StagesMainBin)
            //        lim = (lim - 1) * 2;    //UX stages

            for (int j = 0; j < 2; j++) //only affects Main & EX stages
            {
                for (int i = 0; i < db.Stages[j].Length; i++)
                {
                    if (GetStage(i, j).State == LvlState.Defeated)
                    {
                        SetRank(i, j, value);
                        PatchScore(i, j);
                    }
                }
            }
            MessageBox.Show("All Completed Normal & Expert stages have been " + new string[] { "C", "B", "A", "S" }[value] +"-ranked.");
        }
Esempio n. 7
0
        private void B_MaxSpeedups_Click(object sender, EventArgs e)
        {
            int  value = 127;   //default value
            bool boool = false;

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, 127, value, "max speedUps"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                        boool = true;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            for (int i = 0; i < db.MegaStartIndex; i++)
            {   //if (caught && (hasMegaX || hasMegaY) && (at least one stone owned))
                if (GetMon(i).Caught&& (db.HasMega[i][0] || db.HasMega[i][1]) && (GetMon(i).Stone > 0 || GetMon(i).Stone < 4))
                {
                    int suX = Math.Min(db.HasMega[i][0] ? db.Megas[db.MegaList.IndexOf(i)].Item2 : 0, value);
                    int suY = Math.Min(db.HasMega[i][1] ? db.Megas[db.MegaList.IndexOf(i, db.MegaList.IndexOf(i) + 1)].Item2 : 0, value);
                    SetSpeedup(i, (db.HasMega[i][0] && ((GetMon(i).Stone & 1) == 1)), suX, (db.HasMega[i][1] && ((GetMon(i).Stone & 2) == 2)), suY);   //(i, (hasMegaX && owned stoneX), max X value from db, (hasMegaY && owned stoneY), max Y value from db)
                }
            }
            if (boool)
            {
                MessageBox.Show("All Owned Megas (for which you own the stone too) have been fed with " + value + " speedups" + ((value > 1) ? " or below." : "."));
            }
            else
            {
                MessageBox.Show("All Owned Megas (for which you own the stone too) have been fed with as much Mega Speedups as possible.");
            }
        }
Esempio n. 8
0
        private void B_MaxExcalationBattle_Click(object sender, EventArgs e)
        {
            int value = 999;    //default value

            if (ModifierKeys == Keys.Control)
            {
                using (var form = new NUP_Popup(0, 999, value, "step"))
                {
                    form.ShowDialog();
                    if (form.DialogResult == DialogResult.OK)
                    {
                        value = form.retVal;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            SetExcalationStep(value);
            MessageBox.Show("Curent escalation battle has been taken to step " + value + ".\nIf you skipped rewards you'll get all of them at once after beating it.");
        }