Add dice tables

A dice table is a direct translation of a gaming table from a book,
where the table has a stated dice expression, and each entry has a
numeric range. Most tables can now be taken as is from published
sources.

Also, if a message from a randomly rolled table contains a dice
expression, like Found 2d8 scrolls, the expression is automatically
substituted.

Finally if a message contains something like:
  You found a [wolf/fox/badger].
The displayed message will only include on of those entries.
This commit is contained in:
Howard Abrams 2021-02-11 22:08:06 -08:00
parent 106ed2e6dd
commit 656c168a52
8 changed files with 155 additions and 59 deletions

View file

@ -71,11 +71,13 @@
"Replace `messasge' function allowing it to be re-displayed.
The FORMAT-STRING is a standard string for the `format' function,
and ARGS are substitued values."
;; TODO Push this onto a ring instead of reset this string variable:
(setq rpgdm-last-results (apply 'format format-string args))
(rpgdm-last-results))
(defun rpgdm-last-results ()
"Display results from the last call to a `rpgdm-screen-' function."
;; TODO Need to add a prefix and display a numeric version with last as a ring.
(interactive)
(message rpgdm-last-results))