Esempio n. 1
0
        /// <summary>
        /// Inflict damage to both the Hero and Enemy depending on the result of the DamageTable
        /// </summary>
        /// <param name="strenghDifference"></param>
        /// <param name="enemy"></param>
        /// <returns></returns>
        private bool ResolveDamage(int strenghDifference, Enemy enemy)
        {
            int RandomD10 = DiceRoll.D10Roll();

            enemy.TakeDamage(DamageTable.enemyDamageTaken(strenghDifference, RandomD10));
            try
            {
                this.TakeDamage(DamageTable.heroDamageTaken(strenghDifference, RandomD10));
            }
            catch (YouAreDeadException)
            {
                throw;
            }
            if (enemy.ActualHitPoint <= 0)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        private int RandBaseAgility()
        {
            int minimumValue = 10;

            return(minimumValue + DiceRoll.D10Roll());
        }
Esempio n. 3
0
        private int RandMaxHitPoint()
        {
            int minimumValue = 20;

            return(minimumValue + DiceRoll.D10Roll());
        }