Example #1
0
        public virtual void CalculateBaseAttack()
        {
            BaseAttackModifier baseAttack = new BaseAttackModifier();

            Attack.BaseAttack      = baseAttack.GetBaseAttack(PlayerLevel, ChosenClass);
            Attack.BaseAttackTotal = baseAttack.BaseAttackString(Attack.BaseAttack);
        }
Example #2
0
        public void Baseattack5Return11()
        {
            BaseAttackModifier bAttack  = new BaseAttackModifier();
            string             expected = "11";
            string             actual   = bAttack.BaseAttackString(5, 11);

            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public void BadDataToHitException()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = -999;
            int actual   = bAttack.GetBaseAttack(99, "");

            Assert.AreEqual(expected, actual);
        }
Example #4
0
        public void Level1FightReturns1()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 1;
            int actual   = bAttack.GetBaseAttack(1, "Fighter");

            Assert.AreEqual(expected, actual);
        }
Example #5
0
        public void BastAttackStringBad50()
        {
            BaseAttackModifier bAttack  = new BaseAttackModifier();
            string             expected = "Error";
            string             actual   = bAttack.BaseAttackString(-5, 0);

            Assert.AreEqual(expected, actual);
        }
Example #6
0
        public void Level1NullReturns0()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 1;
            int actual   = bAttack.GetBaseAttack(1, "");

            Assert.AreEqual(expected, actual);
        }
Example #7
0
        public void Level11ClericReturns83()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 8;
            int actual   = bAttack.GetBaseAttack(11, "Cleric");

            Assert.AreEqual(expected, actual);
        }
Example #8
0
        public void BastAttackString2015105()
        {
            BaseAttackModifier bAttack  = new BaseAttackModifier();
            string             expected = "20/15/10/5";
            string             actual   = bAttack.BaseAttackString(20);

            Assert.AreEqual(expected, actual);
        }
Example #9
0
        public void Baseattack20Return1050()
        {
            BaseAttackModifier bAttack  = new BaseAttackModifier();
            string             expected = "10/5/0/-5";
            string             actual   = bAttack.BaseAttackString(20, 10);

            Assert.AreEqual(expected, actual);
        }
Example #10
0
        public void Level20SorcererReturns105()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 10;
            int actual   = bAttack.GetBaseAttack(20, "Sorcerer");

            Assert.AreEqual(expected, actual);
        }
Example #11
0
        public virtual void CalculateRangeTotal(int rangeMiscMod)
        {
            BaseAttackModifier baseAttack = new BaseAttackModifier();

            PlayerClass.Attack.RangedAttackTotal = baseAttack.BaseAttackString(PlayerClass.Attack.BaseAttack, baseAttack.MeleeAttackTotal(PlayerClass.Attack.BaseAttack, PlayerClass.StatMods.DexAbilityMod, Race.SizeMod, rangeMiscMod));
        }