public int RollDice() { DiceRolls.Clear(); int result = 0; Random randy = new Random(); if (dieMax < 1) { return(1); } else { if (dieAmt > 999) { dieAmt = 999; } for (int i = 0; i < dieAmt; i++) { int temp = randy.Next(dieMax) + 1; DiceRolls.Add(temp); result += temp; } RawDieTotal = result; result += add; return(result); } }