you're getting a different random roll each time, the rng() call needs to move outside the loop