예제 #1
0
파일: Product.cs 프로젝트: mcmelmon/archfey
    // private

    private void SetComponents()
    {
        Category     = category;
        Item         = GetComponent <Item>();
        Materials    = recipe.Select(r => r.item).ToList();
        Recipe       = recipe;
        Name         = this.name;
        RequiredTool = tool;
    }
예제 #2
0
파일: Actions.cs 프로젝트: mcmelmon/archfey
    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);
    }