hamacs/snippets/emacs-lisp-mode/npc
Howard Abrams 513f2f06de Let's go ... first commit after a major refactor
Why yes, this will look like it sprung, like Athena, fully grown and
in armor from my head, but this is really just the mid-point of a new
endeavor.
2021-11-02 12:09:41 -07:00

10 lines
253 B
Text

# -*- mode: snippet -*-
# name: npc
# key: npc
# --
(defun rpgdm-npc--${1:$(replace-regexp-in-string " " "-" yas-text)} ()
"Return string from a random $1."
(let ((roll (rpgdm--roll-die $2)))
(cond
((<= roll $3) $4)
((<= roll $5) $6)))