added dice logic courtesy of Brian from Roll20.net