From bf3ae37e16c4fd61a06de0e8abd98faf7a284094 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 5 Jan 2019 17:03:20 +0000 Subject: fix off-by-one error in call to `random' to actually roll dice Signed-off-by: Sean Whitton --- org-d20.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org-d20.el') diff --git a/org-d20.el b/org-d20.el index 2889839..38f480d 100644 --- a/org-d20.el +++ b/org-d20.el @@ -106,7 +106,7 @@ the best N of them, e.g., 4d6k3." (org-d20--rolls-concat sign rolls (int-to-string times)))) (cons rolls* (+ total (* sign times)))) (while (> times 0) - (let ((new-roll (1+ (random (- sides 1))))) + (let ((new-roll (1+ (random sides)))) (push new-roll new-rolls)) (setq times (- times 1))) (when keep -- cgit v1.2.3