Exemple #1
0
        private void ApplyProficiency(CheckSituation sit)
        {
            if (sit.skillType == SkillType.NULL)
            {
                return;
            }

            SkillProficiency best = character.BestSkillProficiencyFromType(sit.skillType);

            if (best != null)
            {
                int chPro = character.ProficiencyModifier();
                int bonus = (int)Mathf.Floor(chPro * best.Ratio);
                sit.checkValue.Modify(new Modifier(bonus, PresentableSkillNameFromType(sit.skillType) + " proficiency"));
            }
        }
Exemple #2
0
    public Character(string ToonFirstName, string ToonLastName, string ToonAge, string ToonHeight, string ToonWeight, string ToonRace, string ToonSubrace, string ToonClass, string ToonBackground)
    {
        FirstName        = ToonFirstName;
        LastName         = ToonLastName;
        Age              = ToonAge;
        Height           = ToonHeight;
        Weight           = ToonWeight;
        Race             = ToonRace;
        Subrace          = ToonSubrace;
        Class            = ToonClass;
        Background       = ToonBackground;
        HitPoints        = RollHP(Class);
        Level            = 1;
        Initiative       = 0;
        Speed            = 0;
        ProficiencyBonus = 2;
        Dictionary <string, int> Attributes    = new Dictionary <string, int>();
        Dictionary <string, int> AttributeMods = new Dictionary <string, int>();
        //this.InitialiseAttributes();
        //SetAttMods(this);
        Dictionary <string, string> FeatsList  = new Dictionary <string, string>();
        SkillProficiency            Skills     = new SkillProficiency(this);
        Dictionary <string, int>    SkillsList = new Dictionary <string, int>();

        //this.InitialiseSkills(this);

        Skills.PresetBackgroundProfs(this);
        Skills.PresetRaceProfs(this);
        Skills.PresetClassProfs(this);
        Feats Feats = new Feats(this);

        SetHitDie(Class);
        List <string>            ProfSavingThrows = new List <String>();
        Dictionary <string, int> SavingThrows     = new Dictionary <string, int>();

        SetupClass(this);
        //ReCalcSkills(this);
    }
 public SkillViewModel(SkillProficiency skill)
 {
     _skill = new Skill(skill);
     Name = _skill.Name;
     PropertyChanged += skillViewModel_PropertyChanged;
 }
        public static ObservableCollection<SkillViewModel> GetSkills(SkillProficiency ability)
        {
            ObservableCollection<SkillViewModel> skills = new ObservableCollection<SkillViewModel>();

            foreach (SkillProficiency cs in ability.GetUniqueFlags())
            {
                skills.Add(new SkillViewModel(cs));
            }

            return skills;
        }
Exemple #5
0
 public Skill(SkillProficiency skill)
 {
     _name = skill.Description();
 }
Exemple #6
0
 public Skill(int id, string name, SkillProficiency proficiency)
 {
     Id          = id;
     Name        = name;
     Proficiency = proficiency;
 }
Exemple #7
0
 public EnumBase(SkillProficiency skillProficiency)
 {
     Value = skillProficiency;
     Description = skillProficiency.Description();
 }