예제 #1
0
        public void CanAddMultipleModifiersAtOnce()
        {
            var stat = new BasicStat("Statistic");

            stat.AddModifiers(
                new ValueStatModifier(1),
                new ValueStatModifier(3),
                new ValueStatModifier(-2)
                );
            Assert.Equal(stat.Modifiers.Count(), 3);
        }
예제 #2
0
        public void Initialize(ComponentContainer components)
        {
            var offenseStats  = components.Get <OffenseStats>();
            var abilityScores = components.Get <AbilityScores>();
            var dexterity     = abilityScores.GetAbility(AbilityScoreTypes.Dexterity);
            var sizeStats     = components.Get <SizeStats>();

            baseRangeAttackBonus.AddModifiers(
                new StatisticStatModifier(StatNames.RangeAttackBonus, offenseStats.BaseAttackBonus),
                dexterity.UniversalStatModifier,
                sizeStats.PositiveSizeModifier
                );
        }
예제 #3
0
        public void Initialize(ComponentContainer components)
        {
            var offenseStats  = components.Get <OffenseStats>();
            var abilityScores = components.Get <AbilityScores>();
            var strength      = abilityScores.GetAbility(AbilityScoreTypes.Strength);
            var sizeStats     = components.Get <SizeStats>();

            baseMeleeAttackBonus.AddModifiers(
                new StatisticStatModifier(StatNames.MeleeAttackBonus, offenseStats.BaseAttackBonus),
                new AbilityStatModifier(strength),
                sizeStats.PositiveSizeModifier
                );
        }