Stage one of new puzzle complete.

This commit is contained in:
2014-12-28 16:25:48 -08:00
parent 2fcace279c
commit 3ef0a4e157
3 changed files with 68 additions and 56 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -101,68 +101,75 @@
(defn talk-to-owl [entities]
(actions/walk-to entities :ego [141 54] :face :right)
(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))
(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 (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))}]})))
(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))
:else
(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 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)
(actions/remove-entity entities :monocle)
(actions/remove-item entities :monocle)
(actions/do-dialogue entities
:owl "It is!"
:owl "Thank you!"

View File

@@ -290,7 +290,12 @@
(actions/play-animation entities :ego :squat)
(actions/remove-item entities :recipe)
(actions/give entities :ash)
(actions/talk entities :ego "It burned up into ash."))}))
(actions/talk entities :ego "It burned up into ash."))
:spell-component (actions/get-script entities
(actions/walk-to entities :ego [141 90] :face :right)
(actions/play-animation entities :ego :reach)
(actions/remove-item entities :spell-component)
(actions/talk entities :ego "I poured it in. Now what?"))}))
:wizard (rooms/make-entity :wizard (common/make-wizard screen {:x 190 :y 78 :baseline 162 :scale-x 1.2 :scale-y 1.2
:script (actions/get-script entities (talk-to-gandarf-outside entities))}))
:note (rooms/make-entity :note (assoc (texture "outsidehouse/note.png")