示例#1
0
        public void FinalACBonusInput()
        {
            ACBonus ac       = new ACBonus(lev, level, attribute, circumstantial, item, status, untyped);
            int     expected = 1 + 2 + 13 + 10 + 3 + 5 + 7 + 11;
            int     actual   = ac.FinalACBonus();

            Assert.AreEqual(expected, actual, 0.001,
                            "ACBonus with all args calculating wrong. \n Expected: " + expected + " Got: " + actual);
        }
示例#2
0
        public void FinalACBonusDefault()
        {
            ACBonus ac       = new ACBonus(lev, level, attribute);
            int     expected = 1 + 2 + 13 + 10;
            int     actual   = ac.FinalACBonus();

            Assert.AreEqual(expected, actual, 0.001,
                            "ACBonus with defualt args calculating wrong. \n Expected: " + expected + " Got: " + actual);
        }
示例#3
0
        public void FinalACBonusMax()
        {
            ACBonus ac = new ACBonus(lev, level, attribute, circumstantial, item, status, untyped);

            ac.MaxArmorBonus(5);
            int expected = 1 + 2 + 5 + 10 + 3 + 5 + 7 + 11;
            int actual   = ac.FinalACBonus();

            Assert.AreEqual(expected, actual, 0.001,
                            "ACBonus with max armorclass bonsus calculating wrong. \n Expected: " + expected + " Got: " + actual);
        }
示例#4
0
        public void FinalACBonusforced()
        {
            ACBonus ac = new ACBonus(lev, level, attribute, circumstantial, item, status, untyped);

            ac.Force(forced);
            int expected = 4;
            int actual   = ac.FinalACBonus();

            Assert.AreEqual(expected, actual, 0.001,
                            "ACBonus with forced value calculating wrong. \n Expected: " + expected + " Got: " + actual);
        }
示例#5
0
 /// <summary>
 /// Creates an effect that increases the AC of an object.
 /// </summary>
 /// <param name="amount">The AC bonus.</param>
 /// <param name="acType">The AC type of the AC bonus.</param>
 public static Effect ACIncrease(int amount, ACBonus acType = ACBonus.Dodge)
 => NWScript.EffectACIncrease(amount, (int)acType);
示例#6
0
 /// <summary>
 /// Creates an effect that decreases the AC of an object.<br/>
 /// </summary>
 /// <param name="amount">The AC penalty.</param>
 /// <param name="acType">The type of AC to decrease (Dodge).</param>
 public static Effect ACDecrease(int amount, ACBonus acType = ACBonus.Dodge)
 {
     return(NWScript.EffectACDecrease(amount, (int)acType) !);
 }