diff options
-rw-r--r-- | NEWS.md | 1 | ||||
-rw-r--r-- | org-d20.el | 7 |
2 files changed, 4 insertions, 4 deletions
@@ -4,6 +4,7 @@ - Bug fix: off-by-one error in call to `random` - This meant that the maximum value on a dice could never be rolled. Now monsters can critically hit players again. +- Bug fix: make roll20's 'k' notation actually have an effect - Change default keybindings to match Emacs conventions - Avoid binding to <f9> @@ -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) |