Ejemplo n.º 1
0
 /// <summary>
 /// Fills the skills.
 /// </summary>
 /// <param name="skills">Skills available.</param>
 /// <param name="scores">Scores to base skill ranks on.</param>
 private void FillSkills(IEnumerable <Skill> skills, AbilityScores scores)
 {
     foreach (var s in skills)
     {
         this.skills.Add(
             s.Name,
             new CharacterSkill(
                 s,
                 scores.GetAbility(s.Ability),
                 false));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SilverNeedle.Characters.DefenseStats"/> class.
        /// </summary>
        /// <param name="abilityScores">Ability scores of the character.</param>
        /// <param name="size">Size of the character.</param>
        /// <param name="inv">Inventory of the character.</param>
        public DefenseStats(AbilityScores abilityScores, SizeStats size, Inventory inv)
        {
            this.abilities = abilityScores;
            this.size      = size;
            this.inventory = inv;

            this.fortitudeSave = new BasicStat();
            this.fortitudeSave.AddModifier(
                new AbilityStatModifier(abilityScores.GetAbility(AbilityScoreTypes.Constitution)));

            this.reflexSave = new BasicStat();
            this.reflexSave.AddModifier(
                new AbilityStatModifier(abilityScores.GetAbility(AbilityScoreTypes.Dexterity)));

            this.willSave = new BasicStat();
            this.willSave.AddModifier(
                new AbilityStatModifier(abilityScores.GetAbility(AbilityScoreTypes.Wisdom)));

            this.armor = new BasicStat(BaseArmorClass);

            this.specialAbilities = new List <SpecialAbility>();
        }
Ejemplo n.º 3
0
        public void AddSkill(Skill skill)
        {
            if (this.skills.ContainsKey(skill.Name))
            {
                return;
            }

            this.skills.Add(
                skill.Name,
                new CharacterSkill(
                    skill,
                    abilityScores.GetAbility(skill.Ability),
                    false
                    )
                );
        }