aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-01-06 08:09:03 +0000
committerSean Whitton <spwhitton@spwhitton.name>2019-01-06 08:09:03 +0000
commit640aadc47f0d12d10ffb464eeda5169962c20184 (patch)
tree9e3735f560c6017192764692f2db266be6503b52
parentd975f15b1fa4e5026a912f7693d2d3e4d6d50e3d (diff)
downloadorg-d20-640aadc47f0d12d10ffb464eeda5169962c20184.tar.gz
use `1-'
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--org-d20.el4
1 files 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