From a3734368cd5a36541dab2fa8f7404cb850991b5b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 12 Nov 2020 21:53:08 -0700 Subject: org-d20-d20: show d4 in case Bless spell is active Signed-off-by: Sean Whitton --- org-d20.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'org-d20.el') diff --git a/org-d20.el b/org-d20.el index 198b585..28ab294 100644 --- a/org-d20.el +++ b/org-d20.el @@ -210,16 +210,25 @@ the best N of them, e.g., 4d6k3." (interactive) (let* ((fst (cdr (org-d20--roll "1d20"))) (snd (cdr (org-d20--roll "1d20"))) + (bls (cdr (org-d20--roll "1d4"))) (fst* (int-to-string fst)) (snd* (int-to-string snd)) + (bls* (int-to-string bls)) (adv (if (>= fst snd) (concat (propertize fst* 'face 'bold) " " snd*) (concat fst* " " (propertize snd* 'face 'bold)))) (disadv (if (<= fst snd) (concat (propertize fst* 'face 'bold) " " snd*) (concat fst* " " (propertize snd* 'face 'bold))))) - (org-d20--record-roll "No adv./disadv.: %s\tAdv.: %s\tDisadv.: %s" - fst* adv disadv)) + (org-d20--record-roll + "No adv./disadv.: %s%sAdv.: %s%sDisadv.: %s%sBless: %s" + fst* + (make-string (- 4 (length fst*)) ?\ ) + adv + (make-string (- 8 (length adv)) ?\ ) + disadv + (make-string (- 10 (length disadv)) ?\ ) + bls*)) (when org-d20-dice-sound (play-sound-file org-d20-dice-sound))) -- cgit v1.2.3