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(); }
private void RefreshRuleButtons() { RuleLayout.Controls.Clear(); foreach (string rule_name in Secretary.GetActiveProfile().rule_names) { RuleLayout.Controls.Add(new RuleButton(this, rule_name, Secretary.GetRule(rule_name).colour)); } }
public void EditRule(string rule_name) { StructCollection.Rule rule = Secretary.GetRule(rule_name); if (rule.results.type == StructCollection.ResultCollection.Type.Event) { ShowEditEventRule(rule); } else if (rule.results.type == StructCollection.ResultCollection.Type.Damage) { ShowEditAttackRule(rule); } }
public void DeleteRuleButton(RuleButton rule_button) { Secretary.DeleteRule(Secretary.GetRule(rule_button.GetRuleName())); RuleLayout.Controls.Remove(rule_button); }