Exemplo n.º 1
0
        private void update_view()
        {
            int value = (int)this.LevelBox.Value;
            int num   = (int)this.CompBox.Value;

            this.LengthLbl.Text = string.Concat(Masterplan.Data.SkillChallenge.GetSuccesses(num), " successes before 3 failures");
            this.InfoList.Items.Clear();
            if (this.fChallenge.Level == -1)
            {
                ListViewItem item = this.InfoList.Items.Add("DCs");
                ListViewItem.ListViewSubItem grayText = item.SubItems.Add("(varies by level)");
                item.UseItemStyleForSubItems = false;
                grayText.ForeColor           = SystemColors.GrayText;
                item.Group      = this.InfoList.Groups[0];
                this.XPLbl.Text = "(XP varies by level)";
            }
            else
            {
                ListViewItem listViewItem = this.InfoList.Items.Add("Easy");
                listViewItem.SubItems.Add(string.Concat("DC ", AI.GetSkillDC(Difficulty.Easy, value)));
                listViewItem.Group = this.InfoList.Groups[0];
                ListViewItem item1 = this.InfoList.Items.Add("Moderate");
                item1.SubItems.Add(string.Concat("DC ", AI.GetSkillDC(Difficulty.Moderate, value)));
                item1.Group = this.InfoList.Groups[0];
                ListViewItem listViewItem1 = this.InfoList.Items.Add("Hard");
                listViewItem1.SubItems.Add(string.Concat("DC ", AI.GetSkillDC(Difficulty.Hard, value)));
                listViewItem1.Group = this.InfoList.Groups[0];
                this.XPLbl.Text     = string.Concat(Masterplan.Data.SkillChallenge.GetXP(value, num), " XP");
            }
            SkillChallengeResult results = this.fChallenge.Results;

            this.SuccessCountLbl.Text = string.Concat("Successes: ", results.Successes);
            this.FailureCountLbl.Text = string.Concat("Failures: ", results.Fails);
        }
Exemplo n.º 2
0
        private void Application_Idle(object sender, EventArgs e)
        {
            this.RemoveBtn.Enabled    = this.SelectedSkill != null;
            this.EditBtn.Enabled      = this.SelectedSkill != null;
            this.BreakdownBtn.Enabled = this.fChallenge.Skills.Count != 0;
            SkillChallengeResult results = this.fChallenge.Results;

            this.ResetProgressBtn.Enabled = results.Successes + results.Fails != 0;
        }
        void Application_Idle(object sender, EventArgs e)
        {
            RemoveBtn.Enabled = (SelectedSkill != null);
            EditBtn.Enabled   = (SelectedSkill != null);

            BreakdownBtn.Enabled = (fChallenge.Skills.Count != 0);

            SkillChallengeResult results = fChallenge.Results;

            ResetProgressBtn.Enabled = (results.Successes + results.Fails != 0);
        }
        void update_view()
        {
            int level      = (int)LevelBox.Value;
            int complexity = (int)CompBox.Value;

            LengthLbl.Text = SkillChallenge.GetSuccesses(complexity) + " successes before 3 failures";

            InfoList.Items.Clear();
            if (fChallenge.Level != -1)
            {
                ListViewItem lvi_easy = InfoList.Items.Add("Easy");
                lvi_easy.SubItems.Add("DC " + AI.GetSkillDC(Difficulty.Easy, level));
                lvi_easy.Group = InfoList.Groups[0];

                ListViewItem lvi_mod = InfoList.Items.Add("Moderate");
                lvi_mod.SubItems.Add("DC " + AI.GetSkillDC(Difficulty.Moderate, level));
                lvi_mod.Group = InfoList.Groups[0];

                ListViewItem lvi_hard = InfoList.Items.Add("Hard");
                lvi_hard.SubItems.Add("DC " + AI.GetSkillDC(Difficulty.Hard, level));
                lvi_hard.Group = InfoList.Groups[0];

                XPLbl.Text = SkillChallenge.GetXP(level, complexity) + " XP";
            }
            else
            {
                ListViewItem lvi = InfoList.Items.Add("DCs");
                ListViewItem.ListViewSubItem lvsi = lvi.SubItems.Add("(varies by level)");
                lvi.UseItemStyleForSubItems = false;
                lvsi.ForeColor = SystemColors.GrayText;
                lvi.Group      = InfoList.Groups[0];

                XPLbl.Text = "(XP varies by level)";
            }

            SkillChallengeResult results = fChallenge.Results;

            SuccessCountLbl.Text = "Successes: " + results.Successes;
            FailureCountLbl.Text = "Failures: " + results.Fails;
        }