// private private void SetComponents() { Category = category; Item = GetComponent <Item>(); Materials = recipe.Select(r => r.item).ToList(); Recipe = recipe; Name = this.name; RequiredTool = tool; }
public int ToolCheck(Proficiencies.Tool tool, bool advantage = false, bool disadvatnage = false) { // We may be rolling to create the challenge rating (e.g. a forgery), so don't check for "success" here bool proficient = Me.Stats.Tools.Contains(tool); bool expertise = Me.Stats.ExpertiseInTools.Contains(tool); int proficiency_bonus = expertise ? Me.Stats.ProficiencyBonus * 2 : Me.Stats.ProficiencyBonus; int roll = RollDie(20, 1, advantage, disadvatnage); return(roll + proficiency_bonus); }