Ejemplo n.º 1
0
        public static int RoundDieRoll(float num, DieRollType typ)
        {
            num = (int)Math.Floor(num);
            if (num < 0)
            {
                if (typ == DieRollType.Damage || typ == DieRollType.HitPoint)
                {
                    // Hitpoint and damage die rolls always have a minimum of one
                    num = 1;
                }
            }

            return((int)num);
        }
Ejemplo n.º 2
0
        public static int RoundDieRoll(float num, DieRollType typ)
        {
            num = (int)Math.Floor(num);
            if(num < 0)
            {
                if(typ == DieRollType.Damage || typ == DieRollType.HitPoint)
                {
                    // Hitpoint and damage die rolls always have a minimum of one
                    num = 1;
                }
            }

            return (int)num;
        }