Esempio n. 1
0
        public int GetDamage(IRandomSource source)
        {
            int result = 0;

            for (int i = 0; i < _diceNumber; ++i)
            {
                result += 1 + source.GetRandom() % _damageDie;
            }

            return(result);
        }
Esempio n. 2
0
        public bool DetermineHit(Creature source, Creature target)
        {
            var roll = _randomSource.GetRandom();

            if (roll == 20)
            {
                return(true);
            }

            if (roll == 1)
            {
                return(false);
            }

            return(roll + GetAttackBonus(source) >= target.GetAc());
        }