working on making it better for conversation.

This commit is contained in:
2015-05-05 17:33:32 -07:00
parent 5e0ebc8f48
commit a661426343

View File

@@ -104,9 +104,10 @@
:ego "'You'll smell like a hog,\nwith stench like a fog,'"
:ego "'So with you, no girl will flirt.'")
(actions/play-animation entities :ego :sigh)
(actions/talk entities :ego "So can I at least slay ghouls with this broom?")
(actions/stop-walking entities :ego :face :left)
(when-not (get-in @entities [:room :entities :fairy-godfather :distracted?])
(actions/talk entities :ego "So can I at least slay ghouls with this broom?")
(actions/stop-walking entities :ego :face :left)
(actions/do-dialogue entities :fairy-godfather "Not quite, young Tick."
:fairy-godfather "This weapon is used to fight a more persistent foe."
:fairy-godfather "Dust and grime!"
@@ -235,12 +236,30 @@
entities))
nil)
(defn distract [entities message subject]
(actions/respond entities message
:fairy-godfather (str "A " subject "!? Where?")
:ego "Err..."
:ego "Umm..."
)
(actions/play-animation entities :ego :idea)
(actions/do-dialogue entities
:ego "On that island over there!"
:ego (str "Yes, that's it! There's a " subject " on that island!")
:fairy-godfather "Let me go check it out.")
(actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] dissoc :path)))
(actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :distracted? true)))
(actions/walk-straight-to entities :fairy-godfather [211 210] ))
(defn talk-to-fairy [entities]
(do
(actions/do-dialogue entities :fairy-godfather "Young Tick, you must choose your destiny!")
(actions/present-choices entities {:choices ["What if I don't like any of these choices?"
{:run #(do (actions/respond entities %
:fairy-godfather "Tough luck"))
:fairy-godfather "Who wouldn't want to be a grave digger or janitor?"
:fairy-godfather "That's the problem with kids these days."
:fairy-godfather "Always complaining about what they can't have."
:fairy-godfather "You need an attitude adjustment, mister."))
:choices actions/previous-choices}
"Look out!"
@@ -249,12 +268,11 @@
:ego "Err... Um..."
:ego "I saw a, um..."))
:choices ["... a dragon!"
{:run #(do (actions/respond entities %
:ego "Yes, that's it! A dragon!"
:fairy-godfather "Over there on that island!?!")
(actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] dissoc :path)))
(actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :distracted? true)))
(actions/walk-straight-to entities :fairy-godfather [211 210] ))}] }
{:run #(distract entities % "dragon")}
"... a flying zebra!"
{:run #(distract entities % "flying zebra")}
"... a fairy godfather-eating plant!"
{:run #(distract entities % "fairy godfather-eating plant")}] }
"Nevermind."
{:run #(actions/respond entities % :fairy-godfather "Don't worry, Tick.")}]})))
@@ -302,7 +320,7 @@
:ego "I can't bring myself to do it."
:ego "That sounds horrible!"
:ego "Plus, how can I ever win the heart of my true love, Georgia McGorgeous?"))}}}
:timers {:return [30.0 30.0 return-from-island]}
:timers {:return [15.0 15.0 return-from-island]}
:layers [(assoc (texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1)
(assoc (texture "dream/island.png") :x 180 :y 180 :baseline 0 :parallax 0.3 :scale-x 1.1 :scale-y 1.1)
(assoc (texture "dream/cliff.png") :x 50 :y 133 :baseline 1 :parallax 0.6 :scale-x 1.2 :scale-y 1.2)