Liking cljdoc? Tell your friends :D

advenjure.dialogs


conditionalclj/s≠macro

clj
(conditional condition true-line)
(conditional condition true-line false-line)
cljs
(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.
source (clj)source (cljs)raw docstring

dialogclj/s≠macro

clj
(dialog & lines)
cljs
(dialog &form &env & lines)

Expand a dialog definition into a function to execute it.

Expand a dialog definition into a function to execute it.
source (clj)source (cljs)raw docstring

eval-lineclj/s

(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.
sourceraw docstring

event?clj/s

(event? event-kw)
source

execute-optionalclj/s

(execute-optional game-state options)
source

filter-availableclj/s

(filter-available game-state options)
source

get-show-ifclj/s

(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.
sourceraw docstring

is-availableclj/s

(is-available game-state option)
source

item?clj/s

(item? item-name)
source

not-event?clj/s

(not-event? event-kw)
source

not-item?clj/s

(not-item? item-name)
source

option-specclj/s

(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.
sourceraw docstring

optionalclj/s≠macro

clj
(optional & options)
cljs
(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.
source (clj)source (cljs)raw docstring

(print-dialog game-state character speech)
source

(print-options options)
source

randomclj/s≠macro

clj
(random & lines)
cljs
(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.
source (clj)source (cljs)raw docstring

select-optionclj/s

(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.
sourceraw docstring

set-eventclj/s

(set-event event-kw)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close