diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-01-06 10:34:35 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-01-06 10:34:35 +0000 |
commit | b2dc59d0f89a69069ca8fd52caa68a4c68034ada (patch) | |
tree | bf2c7fcf08980a26ee1a4e6e0cd72719e2e86096 /org-d20.el | |
parent | 373361744e144bcee5327a07f4c1c3792299d775 (diff) | |
download | org-d20-b2dc59d0f89a69069ca8fd52caa68a4c68034ada.tar.gz |
Bug fix: make roll20's 'k' notation actually have an effect
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
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) |