sample conversation.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
[play-clj.ui :refer :all]
|
||||
[play-clj.utils :refer :all]
|
||||
[play-clj.g2d :refer :all]
|
||||
[clojure.zip :as zip]
|
||||
[clojure.pprint]
|
||||
[advent.pathfind]
|
||||
[advent.actions :as actions]
|
||||
@@ -179,16 +180,20 @@
|
||||
:cursor :down}
|
||||
:wizard {:box [228 80 248 126]
|
||||
:script (actions/get-script entities
|
||||
(actions/present-choices entities {:choices {"Hello there" {:run #(do (actions/talk entities :ego %)
|
||||
(actions/talk entities :wizard "Oh, hello."))
|
||||
:choices {"How are you doing?" {:run #(do (actions/talk entities :ego %)
|
||||
(actions/talk entities :wizard "I'm ok."))
|
||||
:choices actions/previous-choices}
|
||||
"Any news?" {:run #(do (actions/talk entities :ego %)
|
||||
(actions/talk entities :wizard "Not really"))
|
||||
:choices actions/previous-choices}
|
||||
"Something Else" {:choices actions/something-else}}}
|
||||
"Good bye" {:run #(actions/talk entities :ego %)}}})
|
||||
(actions/present-choices entities {:choices {"Hello there Mr. Fangald" {:run #(do (actions/talk entities :ego %)
|
||||
(actions/talk entities :wizard "Oh, no. Not you again!"))
|
||||
:choices {"What do you mean, \"Not you again?\"" {:run #(do (actions/talk entities :ego %)
|
||||
(actions/talk entities :wizard "I mean, you've wrecked my life and I never want to see you again."))
|
||||
:choices {"You mean the time I set your house on fire with a fire mint?" {:choices actions/previous-choices}
|
||||
"You're still cross about my stealing your magic cowboy hat?" {:choices actions/previous-choices}
|
||||
"Even an old hoot like you needs a kick in the pants every now and again." {:choices actions/previous-choices}
|
||||
"Something else" {:choices actions/something-else}}}
|
||||
"You're not happy to see me, Mr. Fangald?" {:run #(do (actions/talk entities :ego %)
|
||||
(actions/talk entities :wizard "Of course not, you little cheat. You're nothing but a little cheat."))
|
||||
:choices #(-> % zip/left)}
|
||||
"Something else" {:choices actions/something-else}}}
|
||||
"Good bye, Mr. Fangald!" {:run #(do (actions/talk entities :ego %)
|
||||
(actions/talk entities :wizard "Now scram!"))}}})
|
||||
|
||||
)}}
|
||||
:layers [(assoc (texture "inside-house/background.png") :x 0 :y 0 :baseline 0)
|
||||
|
||||
Reference in New Issue
Block a user