From 640aadc47f0d12d10ffb464eeda5169962c20184 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 6 Jan 2019 08:09:03 +0000 Subject: use `1-' Signed-off-by: Sean Whitton --- org-d20.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org-d20.el b/org-d20.el index dfb7bd9..8f4d35c 100644 --- a/org-d20.el +++ b/org-d20.el @@ -132,7 +132,7 @@ the best N of them, e.g., 4d6k3." (while (> times 0) (let ((new-roll (1+ (random sides)))) (push new-roll new-rolls)) - (setq times (- times 1))) + (setq times (1- times))) (when keep ;; TODO this should drop the items without reordering the list (setq new-rolls (seq-drop (sort new-rolls #'<) (- times keep)))) @@ -405,7 +405,7 @@ the best N of them, e.g., 4d6k3." (seq-elt (list "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z") - (- n 1)) + (1- n)) (int-to-string n))) ;; concat b onto a as a signed term, where a is possibly empty -- cgit v1.2.3