diff options
Diffstat (limited to 'org-d20.el')
-rw-r--r-- | org-d20.el | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -129,10 +129,9 @@ the best N of them, e.g., 4d6k3." (let ((rolls* (org-d20--rolls-concat sign rolls (int-to-string times)))) (cons rolls* (+ total (* sign times)))) - (while (> times 0) - (let ((new-roll (1+ (random sides)))) - (push new-roll new-rolls)) - (setq times (1- times))) + (loop repeat times + do (let ((new-roll (1+ (random sides)))) + (push new-roll new-rolls))) (when keep ;; TODO: This should drop the items without reordering the ;; list (spw 2019-01-05) |