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); }
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 ); }
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 ); }