puking better.

This commit is contained in:
2015-07-26 21:49:49 -07:00
parent 8f27e46df0
commit 2b0c5dba0d
4 changed files with 466 additions and 9 deletions

View File

@@ -26,6 +26,11 @@
(actions/walk-straight-to entities :ego [205 10])
(actions/talk entities :ego "No way."))
(defn do-puke [entities]
(particle-effect! (get-in @entities [:room :entities :puke]) :reset)
(particle-effect! (get-in @entities [:room :entities :puke]) :start)
(actions/play-animation entities :owl :puke))
(defn do-grandma-dialogue-with-cat [entities]
(actions/walk-to entities :ego [165 45] :face :left)
(actions/do-dialogue entities
@@ -100,18 +105,19 @@
(update-in [:room :entities] #(assoc % :owl (doto (get-in entities [:room :owl]) println)))))
(defn talk-to-owl [entities]
(actions/walk-to entities :ego [141 54] :face :right)
(cond (actions/has-obtained? entities :feather)
(do (actions/do-dialogue entities :ego "Hello again."
:owl "Oh! Hello again! Thanks you again for all your help."
:owl "My nausea has nearly worn off.")
(actions/play-animation entities :owl :puke))
(do-puke entities))
(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-puke entities))
:else
(do (actions/do-dialogue entities :ego "Hello there little owl."
@@ -134,7 +140,7 @@
: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)
(do-puke entities)
(actions/do-dialogue entities
:owl "Excuse me."
:owl "I don't suppose you could help me find it?"
@@ -146,7 +152,7 @@
: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)
(do-puke entities)
(actions/do-dialogue entities
:owl "Excuse me."
:owl "Could you help me find it?"
@@ -162,13 +168,13 @@
: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))}]})))
(do-puke entities))}]})))
(actions/update-state entities #(assoc % :talked-to-owl? true)))
(defn give-monocle [entities]
(actions/walk-to entities :ego [141 54] :face :right)
(actions/talk entities :ego "Is this your monocle?")
(actions/play-animation entities :owl :puke)
(do-puke entities)
(actions/remove-item entities :monocle)
(actions/do-dialogue entities
:owl "It is!"
@@ -190,7 +196,8 @@
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-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])]
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])
puke (particle-effect "cat-tree/puke")]
(rooms/make :music {:day :town-2 :night :night}
:interactions
{:down-dir {:box [150 0 270 20]
@@ -315,7 +322,9 @@
:origin-x 12
:origin-y 0
:scale-x 1.45
:scale-y 1.45)}
:scale-y 1.45)
:puke (assoc puke
:x 194 :y 188 :baseline 241)}
:owl (rooms/make-entity :owl (assoc (animation->texture screen owl-stand)
:x 187 :y 172 :baseline 241
:stand owl-stand