Exemple #1
0
        private void btn3type2Clicked()
        {
            //lil money+lil exp
            int reward = Convert.ToInt32(((dungeon.complexity * 2) % FormLogin.currentUser.level + 1) * 1.2);

            FormLogin.currentUser.money += reward;

            int rewardExp = Convert.ToInt32(((dungeon.complexity * 2) % FormLogin.currentUser.level + 1) * 1.2);

            FormLogin.currentUser.exp += rewardExp;

            DialogResult result = MessageBox.Show(
                dungeon.reaction3 + "\n" + "You got: " + "\n" + "Money: " + reward + " Exp:  " + rewardExp,
                " ",
                MessageBoxButtons.OK,
                MessageBoxIcon.Warning,
                MessageBoxDefaultButton.Button1,
                MessageBoxOptions.DefaultDesktopOnly);

            if (result == DialogResult.OK)
            {
                Close();
                Connection.updDB();
                FormComplexity formComplexity = new FormComplexity();
                formComplexity.Show();
            }
        }
        private void btnToDungeon_Click(object sender, EventArgs e)
        {
            Close();
            FormComplexity formComplexity = new FormComplexity();

            formComplexity.Show();
        }
Exemple #3
0
        private void btn3type1Clicked()
        {
            if (textBoxAnswer.Text == dungeon.answ1 || textBoxAnswer.Text == dungeon.answ2 || textBoxAnswer.Text == dungeon.answ3)
            {
                Random rand = new Random();
                if (rand.Next(1, 5) == 1)
                {
                    Item item = new Item();
                    item.id = rand.Next(0, 100);
                    item    = Connection.getItem(item.id);
                    if (item.name != null)
                    {
                        FormLogin.currentUser.itemsInBag.Add(item);
                    }
                }
                DialogResult result = MessageBox.Show(
                    dungeon.reaction1 + "\n" + "You got: " + FormLogin.currentUser.itemsInBag.Last <Item>().name,
                    " ",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning,
                    MessageBoxDefaultButton.Button1,
                    MessageBoxOptions.DefaultDesktopOnly);

                if (result == DialogResult.OK)
                {
                    Close();
                    Connection.updDB();
                    FormComplexity formComplexity = new FormComplexity();
                    formComplexity.Show();
                }
            }
            else
            {
                DialogResult result = MessageBox.Show(
                    dungeon.reaction2,
                    " ",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning,
                    MessageBoxDefaultButton.Button1,
                    MessageBoxOptions.DefaultDesktopOnly);

                if (result == DialogResult.OK)
                {
                    Close();
                    Connection.updDB();
                    FormComplexity formComplexity = new FormComplexity();
                    formComplexity.Show();
                }
            }
        }
Exemple #4
0
        private void btn3type3Clicked()
        {
            DialogResult result = MessageBox.Show(
                dungeon.reaction3,
                " ",
                MessageBoxButtons.OK,
                MessageBoxIcon.Warning,
                MessageBoxDefaultButton.Button1,
                MessageBoxOptions.DefaultDesktopOnly);

            if (result == DialogResult.OK)
            {
                Close();
                Connection.updDB();
                FormComplexity formComplexity = new FormComplexity();
                formComplexity.Show();
            }
        }
Exemple #5
0
        private void btnAns1_Click(object sender, EventArgs e)
        {
            //money only
            int reward = Convert.ToInt32(((dungeon.complexity * 2) % FormLogin.currentUser.level + 1) * 1.2);

            FormLogin.currentUser.money += reward;
            DialogResult result = MessageBox.Show(
                dungeon.reaction1 + "\n" + "You got: " + "\n " + "Money: " + reward,
                " ",
                MessageBoxButtons.OK,
                MessageBoxIcon.Warning,
                MessageBoxDefaultButton.Button1,
                MessageBoxOptions.DefaultDesktopOnly);

            if (result == DialogResult.OK)
            {
                Close();
                Connection.updDB();
                FormComplexity formComplexity = new FormComplexity();
                formComplexity.Show();
            }
        }