This commit is contained in:
2014-11-08 11:29:56 -08:00
parent e57e6be125
commit 39cbd94df6
5 changed files with 16 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -48,5 +48,6 @@
(def balloon {:name "Choicest of balloons" :value :balloon :cursor :balloon}) (def balloon {:name "Choicest of balloons" :value :balloon :cursor :balloon})
(def frog-legs {:name "Frog legs" :value :frog-legs :cursor :frog-legs}) (def frog-legs {:name "Frog legs" :value :frog-legs :cursor :frog-legs})
(def stool {:name "Stool" :value :stool :cursor :stool}) (def stool {:name "Stool" :value :stool :cursor :stool})
(def teddy {:name "Teddy Bear" :value :teddy :cursor :teddy})

View File

@@ -43,21 +43,21 @@
"Listen, I really need that teddy bear you have.") "Listen, I really need that teddy bear you have.")
{:run #(actions/respond entities % {:run #(actions/respond entities %
:shopkeep "Why?" :shopkeep "Why?"
:shopkeep "It belonged to my long lost son."
:shopkeep "Why should I give it to you?") :shopkeep "Why should I give it to you?")
:choices ["I just need it ok?" :choices ["I just need it ok?"
{:run #(actions/respond entities % {:run #(actions/respond entities %
:shopkeep "I'm sorry, it's not for sale.") :shopkeep "I'm sorry, it's not for sale.")
:choices actions/something-else} :choices actions/something-else}
(when (get-in @entities [:state :knows-about-son]) "Your long lost son said I could have it."
"Your long lost son said I could have it.") {:run #(do (actions/respond entities % :shopkeep "REALLY? You've met him?")
{:run #(actions/respond entities % :shopkeep "REALLY? You've met him?")}]} (actions/give entities items/teddy))}]}
"How's life in the antique shop biz?" "How's life in the antique shop biz?"
{:run #(do (actions/update-state entities (fn [state] (assoc state :knows-about-son true))) {:run #(actions/respond entities %
(actions/respond entities % :shopkeep "Pretty lonely."
:shopkeep "Pretty lonely." :shopkeep "My long lost son used to help me run this shop, but he's been gone for five years now."
:shopkeep "My long lost son used to help me run this shop, but he's been gone for five years now." :shopkeep "I've been couped up in here by myself ever since."
:shopkeep "I've been couped up in here by myself ever since." :shopkeep "Now all I have is this grandfather clock to keep me company.")
:shopkeep "Now all I have is this grandfather clock to keep me company."))
:choices actions/previous-choices} :choices actions/previous-choices}
"Nevermind." {:run #(actions/respond entities % :shopkeep "Feel free to look around.")}]})) "Nevermind." {:run #(actions/respond entities % :shopkeep "Feel free to look around.")}]}))

View File

@@ -61,8 +61,11 @@
:ego "But I haven't got any money!" :ego "But I haven't got any money!"
:peddler "Then you won't have the choicest of balloons." :peddler "Then you won't have the choicest of balloons."
:peddler "I could, however, give you the balloon if you could procure for me a ware I'm missing." :peddler "I could, however, give you the balloon if you could procure for me a ware I'm missing."
:peddler "A child's toy. And I mean the choicest of children's toys.") :peddler "A child's toy. And I mean the choicest of children's toys."))
(actions/give entities items/balloon))}} :scripts {:teddy (actions/get-script entities
(actions/remove-item entities items/teddy)
(actions/give entities items/balloon)
(actions/talk entities :peddler "Thank you for your business!"))}}}
:layers [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)] :layers [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)]
:entities {:peddler (actions/start-animation screen :entities {:peddler (actions/start-animation screen
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil (assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil

View File

@@ -11,7 +11,7 @@
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})] (let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
(println (:input-x screen) (:input-y screen) "->" x y))) (println (:input-x screen) (:input-y screen) "->" x y)))
(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :stool :stick :cat-toy :balloon :frog-legs]) (def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :stool :stick :cat-toy :balloon :frog-legs :teddy])
(defn cursor [filename which] (defn cursor [filename which]
(let [scale 2 (let [scale 2