public void CastingDoesntBreakConditionalModifiers() { var stat = new BasicStat("TestStat", 10); IValueStatModifier mod = new ConditionalStatModifier(new ValueStatModifier("Attack Bonus", 3, "bonus"), "vs. Thor"); stat.AddModifier(mod); Assert.Equal(1, stat.GetConditions().Count()); Assert.Equal(10, stat.TotalValue); Assert.Equal(13, stat.GetConditionalValue("vs. Thor")); }
public void StatModifiersCanHaveConditionalModifiers() { var stat = new BasicStat(10); var mod = new ConditionalStatModifier("vs. Giants", "Skill", 5, "bonus", "Feat"); stat.AddModifier(mod); Assert.AreEqual(10, stat.TotalValue); Assert.AreEqual(15, stat.GetConditionalValue("vs. Giants")); Assert.AreEqual(1, stat.GetConditions().Count()); Assert.AreEqual("vs. Giants", stat.GetConditions().First()); }
public int GetConditionalValue(string condition) { return(baseRangeAttackBonus.GetConditionalValue(condition)); }
public int GetConditionalValue(string condition) { return(amount.GetConditionalValue(condition)); }