Dice calc: yellow base + black stress dice (Alien RPG rules)
Base dice (yellow) = attribute + skill Stress dice (black) = current stress level, added on top Menu shows: "Close Combat 5 zlute + 2 cerne = 7 celkem" Buffer shows breakdown after selection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
20
alien-rpg.el
20
alien-rpg.el
@@ -1238,25 +1238,23 @@ Průlezy G<->H: G3<->H3, G4<->H4, G7<->H7, G8<->H8, G9<->H9
|
||||
(name (cdr (assq key alien-rpg-skill-names)))
|
||||
(attr-val (plist-get (plist-get alien-rpg-character :attributes) attr-key))
|
||||
(skill-val (plist-get (plist-get alien-rpg-character :skills) key))
|
||||
(total (+ attr-val skill-val))
|
||||
(effective (max 0 (- total stress)))
|
||||
(base (+ attr-val skill-val))
|
||||
(attr-abbr (cdr (assq attr-key alien-rpg-attr-abbrevs))))
|
||||
(cons (format "%-18s %d kostek (%s %d + %d - stress %d)"
|
||||
name effective attr-abbr attr-val skill-val stress)
|
||||
(list name total effective attr-abbr attr-val skill-val))))
|
||||
(cons (format "%-18s %d zlute + %d cerne = %d celkem"
|
||||
name base stress (+ base stress))
|
||||
(list name base attr-abbr attr-val skill-val))))
|
||||
alien-rpg-skill-attributes))
|
||||
(choice (completing-read "Hod na: " choices nil t))
|
||||
(data (cdr (assoc choice choices)))
|
||||
(name (nth 0 data))
|
||||
(total (nth 1 data))
|
||||
(effective (nth 2 data)))
|
||||
(base (nth 1 data)))
|
||||
(with-current-buffer (get-buffer-create "*Alien RPG*")
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(insert (format "%s: %d kostek\n" name effective))
|
||||
(insert (format "Základ: %d (atribut + dovednost)\n" total))
|
||||
(insert (format "Stress: -%d\n" stress))
|
||||
(insert (format "Výsledek: %d kostek k hodu\n" effective)))
|
||||
(insert (format "%s\n" name))
|
||||
(insert (format "%d zlutych kostek (zaklad)\n" base))
|
||||
(insert (format "%d cernych kostek (stress)\n" stress))
|
||||
(insert (format "%d kostek celkem\n" (+ base stress))))
|
||||
(goto-char (point-min))
|
||||
(special-mode))
|
||||
(switch-to-buffer "*Alien RPG*")))
|
||||
|
||||
Reference in New Issue
Block a user