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] (defn talk-to-owl [entities]
(actions/walk-to entities :ego [141 54] :face :right) (actions/walk-to entities :ego [141 54] :face :right)
(if (get-in @entities [:state :talked-to-owl?]) (cond (actions/has-obtained? entities :feather)
(do (actions/do-dialogue entities :ego "Hello again." (do (actions/do-dialogue entities :ego "Hello again."
:owl "Have you found my glass monocle!?" :owl "Oh! Hello again! Thanks you again for all your help."
:owl "I'll have no relief of this nausea until you do.") :owl "My nausea has nearly worn off.")
(actions/play-animation entities :owl :puke)) (actions/play-animation entities :owl :puke))
(do (actions/do-dialogue entities :ego "Hello there little owl." (get-in @entities [:state :talked-to-owl?])
:owl "Who you calling little?" (do (actions/do-dialogue entities :ego "Hello again."
:ego "Wow! You can talk?" :owl "Have you found my glass monocle!?"
:owl "Of course I can!" :owl "I'll have no relief of this nausea until you do.")
:ego "But none of the other animals so far in this game have talked!" (actions/play-animation entities :owl :puke))
:owl "Have you ever thought that maybe you're not that enjoyable to talk with?"
:ego "I guess not." :else
:owl "Naw, I'm just pulling your leg." (do (actions/do-dialogue entities :ego "Hello there little owl."
:owl "I'm an owl, and owls are wise.") :owl "Who you calling little?"
(actions/present-choices entities {:choices ["Can you help me in my quest?" :ego "Wow! You can talk?"
{:run #(actions/respond entities % :owl "Of course I can!"
:owl "Of course I can help you in your quest." :ego "But none of the other animals so far in this game have talked!"
:owl "I know just what you need." :owl "Have you ever thought that maybe you're not that enjoyable to talk with?"
:owl "But I'm also in trouble of my own.") :ego "I guess not."
:choices ["What kind of trouble?" :owl "Naw, I'm just pulling your leg."
{:run #(do (actions/respond entities % :owl "I'm an owl, and owls are wise.")
:owl "You see, we owls have very strong vision." (actions/present-choices entities {:choices ["Can you help me in my quest?"
:owl "I was born with a birth defect, and only one of my eyes is good." {:run #(actions/respond entities %
:owl "I dropped my monocle somewhere around here!" :owl "Of course I can help you in your quest."
:owl "Without it, I have severe nausea.") :owl "I know just what you need."
(actions/play-animation entities :owl :puke) :owl "But I'm also in trouble of my own.")
(actions/do-dialogue entities :choices ["What kind of trouble?"
:owl "Excuse me." {:run #(do (actions/respond entities %
:owl "I don't suppose you could help me find it?" :owl "You see, we owls have very strong vision."
:ego "I'll let you know if I find it."))} :owl "I was born with a birth defect, and only one of my eyes is good."
"Something else." :owl "I dropped my monocle somewhere around here!"
{:choices actions/something-else}]} :owl "Without it, I have severe nausea.")
"Catch any mice tonight?" (actions/play-animation entities :owl :puke)
{:run #(do (actions/respond entities % (actions/do-dialogue entities
:owl "Nothing at all." :owl "Excuse me."
:owl "I'm missing my eyepiece, and without it, I get too much motion sickness." :owl "I don't suppose you could help me find it?"
:owl "I've been sitting here sick ever since I dropped it.") :ego "I'll let you know if I find it."))}
(actions/play-animation entities :owl :puke) "Something else."
(actions/do-dialogue entities {:choices actions/something-else}]}
:owl "Excuse me." "Catch any mice tonight?"
:owl "Could you help me find it?" {:run #(do (actions/respond entities %
:ego "I'll let you know if I see anything." :owl "Nothing at all."
:owl "Oh, thank you."))} :owl "I'm missing my eyepiece, and without it, I get too much motion sickness."
"Have you seen Gandarf tonight?" :owl "I've been sitting here sick ever since I dropped it.")
{:run #(actions/respond entities % (actions/play-animation entities :owl :puke)
:owl "I don't know him." (actions/do-dialogue entities
:owl "I'm actually just travelling through this land.") :owl "Excuse me."
:choices actions/previous-choices} :owl "Could you help me find it?"
"Nevermind." :ego "I'll let you know if I see anything."
{:run #(do (actions/respond entities % :owl "Oh, thank you."))}
:owl "Oh, do tell me if you see a glass monocle around." "Have you seen Gandarf tonight?"
:owl "I can't see at all without it. On top of that, I have severe nausea!" {:run #(actions/respond entities %
:owl "I'll be stranded here for who knows how long without it.") :owl "I don't know him."
(actions/play-animation entities :owl :puke))}]}))) :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))) (actions/update-state entities #(assoc % :talked-to-owl? true)))
(defn give-monocle [entities] (defn give-monocle [entities]
(actions/walk-to entities :ego [141 54] :face :right) (actions/walk-to entities :ego [141 54] :face :right)
(actions/talk entities :ego "Is this your monocle?") (actions/talk entities :ego "Is this your monocle?")
(actions/play-animation entities :owl :puke) (actions/play-animation entities :owl :puke)
(actions/remove-entity entities :monocle) (actions/remove-item entities :monocle)
(actions/do-dialogue entities (actions/do-dialogue entities
:owl "It is!" :owl "It is!"
:owl "Thank you!" :owl "Thank you!"

View File

@@ -290,7 +290,12 @@
(actions/play-animation entities :ego :squat) (actions/play-animation entities :ego :squat)
(actions/remove-item entities :recipe) (actions/remove-item entities :recipe)
(actions/give entities :ash) (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 :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))})) :script (actions/get-script entities (talk-to-gandarf-outside entities))}))
:note (rooms/make-entity :note (assoc (texture "outsidehouse/note.png") :note (rooms/make-entity :note (assoc (texture "outsidehouse/note.png")