Exemplo n.º 1
0
        public void Die(CombatForm combatForm, MainForm mainForm)
        {
            DialogResult defeat = MessageBox.Show(combatForm,
                                                  "You died...\n" +
                                                  $"You lost {(int)(this.experienceCurrent * 0.10)} (10%) experience.",
                                                  "Defeat!",
                                                  MessageBoxButtons.OK);

            this.experienceCurrent -= (int)(this.experienceCurrent * 0.10);

            mainForm.UpdateText();

            if (defeat == DialogResult.OK)
            {
                combatForm.Close();
            }
        }
Exemplo n.º 2
0
 private void btnGo_Click(object sender, EventArgs e)
 {
     if (_selected.Equals(Selection.Arena))
     {
         // TODO: Dedicated form.
     }
     else if (_selected.Equals(Selection.HuntingGrounds))
     {
         // TODO: Dedicated form.
     }
     else if (_selected.Equals(Selection.Town))
     {
         // TODO: Dedicated form.
     }
     else
     {
         _combatForm = new CombatForm(_player, _mainForm, _selected);
         _combatForm.Show();
     }
 }