(conditional condition true-line)
(conditional condition true-line false-line)
(conditional &form &env condition true-line)
(conditional &form &env condition true-line false-line)
Return a function that will test the condition function using the game-state and execute the dialog line if true. If false and a second line is given, that will be executed instead.
Return a function that will test the condition function using the game-state and execute the dialog line if true. If false and a second line is given, that will be executed instead.
(dialog & lines)
(dialog &form &env & lines)
Expand a dialog definition into a function to execute it.
Expand a dialog definition into a function to execute it.
(eval-line line)
If line is a literal line, return the expression to print it. If it's a callable, return an expression that calls it.
If line is a literal line, return the expression to print it. If it's a callable, return an expression that calls it.
(get-show-if modifiers)
Check the list of option modifiers for :show-if and return the associated function if present.
Check the list of option modifiers for :show-if and return the associated function if present.
(option-spec option)
Take an option expression and build a spec hash for it.
Take an option expression and build a spec hash for it.
(optional & options)
(optional &form &env & options)
Present dialog options to the user and execute the one selected.
Present dialog options to the user and execute the one selected.
(random & lines)
(random &form &env & lines)
Given a list of dialog forms, return a function that would execute any of them randomly each time it's called.
Given a list of dialog forms, return a function that would execute any of them randomly each time it's called.
(select-option options)
Present the player with a list of options, read input and return the selected one. If only one option is available return that right away.
Present the player with a list of options, read input and return the selected one. If only one option is available return that right away.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close