Example #1
0
 public void DisplayRuleRoll(string rule_name)
 {
     StructCollection.Rule rule = Secretary.GetRule(rule_name);
     OpenDisplay();
     results_display.AddRollDisplay(new RollDisplay(DiceTower.RollDice(rule.dice), DiceTower.SumModifiers(rule.modifiers), rule));
     this.Focus();
 }
Example #2
0
            public override (string roll, string result, Color colour) Display(int roll_number, int roll_modifier, Color?colour = null)
            {
                if (crit_success && roll_number >= crit_success_threshold)
                {
                    return(roll : ("Natural " + roll_number.ToString()), result : "Critical Hit!\n" + (DiceTower.RollDice(dice) + DiceTower.RollDice(dice) + DiceTower.SumModifiers(modifiers)).ToString() + " " + damage_type + " damage!", colour : Color.Blue);
                }
                else if (crit_fail && roll_number <= crit_fail_threshold)
                {
                    return(roll : ("Natural " + roll_number.ToString()), result : "Critical Fail!", colour : Color.Red);
                }

                return(roll: (roll_number + roll_modifier).ToString(), result : DiceTower.RollDice(dice, modifiers).ToString() + " " + damage_type + " damage", colour : colour != null ? (Color)colour : Color.Green);
            }