diff --git a/desktop/resources/cursor.png b/desktop/resources/cursor.png index 824741df..0f63380b 100644 Binary files a/desktop/resources/cursor.png and b/desktop/resources/cursor.png differ diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj index 2dbddcae..c35f1a21 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -48,5 +48,6 @@ (def balloon {:name "Choicest of balloons" :value :balloon :cursor :balloon}) (def frog-legs {:name "Frog legs" :value :frog-legs :cursor :frog-legs}) (def stool {:name "Stool" :value :stool :cursor :stool}) +(def teddy {:name "Teddy Bear" :value :teddy :cursor :teddy}) diff --git a/desktop/src-common/advent/screens/rooms/inside_antique.clj b/desktop/src-common/advent/screens/rooms/inside_antique.clj index 62732c08..3f136510 100644 --- a/desktop/src-common/advent/screens/rooms/inside_antique.clj +++ b/desktop/src-common/advent/screens/rooms/inside_antique.clj @@ -43,21 +43,21 @@ "Listen, I really need that teddy bear you have.") {:run #(actions/respond entities % :shopkeep "Why?" + :shopkeep "It belonged to my long lost son." :shopkeep "Why should I give it to you?") :choices ["I just need it ok?" {:run #(actions/respond entities % :shopkeep "I'm sorry, it's not for sale.") :choices actions/something-else} - (when (get-in @entities [:state :knows-about-son]) - "Your long lost son said I could have it.") - {:run #(actions/respond entities % :shopkeep "REALLY? You've met him?")}]} + "Your long lost son said I could have it." + {:run #(do (actions/respond entities % :shopkeep "REALLY? You've met him?") + (actions/give entities items/teddy))}]} "How's life in the antique shop biz?" - {:run #(do (actions/update-state entities (fn [state] (assoc state :knows-about-son true))) - (actions/respond entities % - :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 "I've been couped up in here by myself ever since." - :shopkeep "Now all I have is this grandfather clock to keep me company.")) + {:run #(actions/respond entities % + :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 "I've been couped up in here by myself ever since." + :shopkeep "Now all I have is this grandfather clock to keep me company.") :choices actions/previous-choices} "Nevermind." {:run #(actions/respond entities % :shopkeep "Feel free to look around.")}]})) diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 4d60d4fb..d69cfdeb 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -61,8 +61,11 @@ :ego "But I haven't got any money!" :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 "A child's toy. And I mean the choicest of children's toys.") - (actions/give entities items/balloon))}} + :peddler "A child's toy. And I mean the choicest of children's toys.")) + :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)] :entities {:peddler (actions/start-animation screen (assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj index ed51c75c..084ee7e5 100644 --- a/desktop/src-common/advent/utils.clj +++ b/desktop/src-common/advent/utils.clj @@ -11,7 +11,7 @@ (let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})] (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] (let [scale 2