owl puking, lol.

This commit is contained in:
2014-12-28 14:53:58 -08:00
parent 06312fbbdc
commit 37c047709d
4 changed files with 98 additions and 7 deletions

View File

@@ -101,8 +101,62 @@
(defn talk-to-owl [entities]
(actions/walk-to entities :ego [141 54] :face :right)
(actions/do-dialogue entities :ego "Hello there little owl."
:owl "You talking to me?"))
(if (get-in @entities [:state :talked-to-owl?])
(do (actions/do-dialogue entities :ego "Hello again."
:owl "Have you found my glass monocle!?"
:owl "I'll have no relief of this nausea until you do.")
(actions/play-animation entities :owl :puke))
(do (actions/do-dialogue entities :ego "Hello there little owl."
:owl "Who you calling little?"
:ego "Wow! You can talk?"
:owl "Of course I can!"
:ego "But none of the other animals so far in this game have talked!"
:owl "Have you ever thought that maybe you're not that enjoyable to talk with?"
:ego "I guess not."
:owl "Naw, I'm just pulling your leg."
:owl "I'm an owl, and owls are wise.")
(actions/present-choices entities {:choices ["Can you help me in my quest?"
{:run #(actions/respond entities %
:owl "Of course I can help you in your quest."
:owl "I know just what you need."
:owl "But I'm also in trouble of my own.")
:choices ["What kind of trouble?"
{:run #(do (actions/respond entities %
:owl "You see, we owls have very strong vision."
:owl "I was born with a birth defect, and only one of my eyes is good."
:owl "I dropped my monocle somewhere around here!"
:owl "Without it, I have severe nausea.")
(actions/play-animation entities :owl :puke)
(actions/do-dialogue entities
:owl "Excuse me."
:owl "I don't suppose you could help me find it?"
:ego "I'll let you know if I find it."))}
"Something else."
{:choices actions/something-else}]}
"Catch any mice tonight?"
{:run #(do (actions/respond entities %
:owl "Nothing at all."
:owl "I'm missing my eyepiece, and without it, I get too much motion sickness."
:owl "I've been sitting here sick ever since I dropped it.")
(actions/play-animation entities :owl :puke)
(actions/do-dialogue entities
:owl "Excuse me."
:owl "Could you help me find it?"
:ego "I'll let you know if I see anything."
:owl "Oh, thank you."))}
"Have you seen Gandarf tonight?"
{:run #(actions/respond entities %
:owl "I don't know him."
:owl "I'm actually just travelling through this land.")
:choices actions/previous-choices}
"Nevermind."
{:run #(do (actions/respond entities %
:owl "Oh, do tell me if you see a glass monocle around."
:owl "I can't see at all without it. On top of that, I have severe nausea!"
:owl "I'll be stranded here for who knows how long without it.")
(actions/play-animation entities :owl :puke))}]})))
(actions/update-state entities #(assoc % :talked-to-owl? true)))
(defn make [screen]
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
@@ -116,7 +170,8 @@
grandma-talk (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 2 0 2 0 2 0 2 0 2 0 1 0 2 0 0])
grandma-kiss (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 8 9 10 9 10 9 10 9 8 0])
owl-stand (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [0 0 0 0 0 0 0 2])
owl-talk (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [1 0 1 0 1 0 0 0 2 0])]
owl-talk (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [1 0 1 0 1 0 0 0 2 0])
owl-puke (utils/make-anim "cat-tree/owl.png" [19 28] 0.10 [0 0 2 2 3 2 2 3 3 2 3 3 3 4 5 6 7 4 4 3 3 2 2 2 2 2])]
(rooms/make :music :town-2
:interactions
{:down-dir {:box [150 0 270 20]
@@ -138,8 +193,7 @@
:script (actions/get-script entities
(when (get-in @entities [:room :entities :ladder])
(actions/talk entities :ego "I'll get down.")
(get-down entities)))}))
)}}
(get-down entities)))})))}}
:grass {:box [26 105 60 160]
:script (actions/get-script entities
(if (not (actions/has-item? entities :grass))
@@ -223,6 +277,7 @@
:x 187 :y 172 :baseline 241
:stand owl-stand
:talk owl-talk
:puke owl-puke
:talk-color (color 0.5 0.5 1.0 1.0)
:anim owl-stand
:anim-start 0