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:
parent
106ed2e6dd
commit
656c168a52
8 changed files with 155 additions and 59 deletions
2
rpgdm.el
2
rpgdm.el
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue