diff --git a/desktop/resources/cursor.png b/desktop/resources/cursor.png index 95d8609f..8132e284 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 15d23a5c..7e7e6b66 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -50,5 +50,8 @@ (def stool {:name "Stool" :value :stool :cursor :stool}) (def teddy {:name "Teddy Bear" :value :teddy :cursor :teddy}) (def portrait {:name "Portrait" :value :portrait :cursor :portrait}) +(def recipe {:name "Strength potion recipe" :value :recipe :cursor :recipe}) - +(def glass-eye {:name "Choicest of glass eyes" :value :glass-eye :cursor :glass-eye}) +(def motivational-tapes {:name "Choicest motivational tapes" :value :motivational-tapes :cursor :motivational-tapes}) +(def used-earplugs {:name "Choicest used earplugs" :value :used-earplugs :cursor :used-earplugs}) diff --git a/desktop/src-common/advent/screens/rooms/inside_house.clj b/desktop/src-common/advent/screens/rooms/inside_house.clj index 3efef0e3..5beae356 100644 --- a/desktop/src-common/advent/screens/rooms/inside_house.clj +++ b/desktop/src-common/advent/screens/rooms/inside_house.clj @@ -15,8 +15,12 @@ :success (actions/get-script entities (actions/talk entities :ego "Yes! That worked.") (actions/play-animation entities :ego :squat) + (actions/give entities items/recipe) + (actions/talk entities :ego "I found a recipe for a strength potion!") + (actions/talk entities :ego "Looks like there's something else in here too...") + (actions/play-animation entities :ego :squat) (actions/give entities items/frog-legs) - (actions/talk entities :ego "I found some frog legs inside.")) + (actions/talk entities :ego "Eww. Frog legs.")) :failure (actions/get-script entities (actions/talk entities :ego "I don't think that worked..."))) (actions/update-state entities #(assoc % :active? false))) diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 2bd72145..a1398369 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -69,8 +69,7 @@ :peddler "Well I'm afraid you won't have the choicest of earplugs." :ego "Can't I give you something else for them?" :peddler "Well, I am low on choice children's toys." - :peddler "If you can bring me one, and I mean the choicest of toys, I will give you the earplugs.")) - :choices actions/previous-choices} + :peddler "If you can bring me one, and I mean the choicest of toys, I will give you the earplugs."))} "I'm interested in a glass eye." {:run #(do (actions/update-state entities (fn [state] (assoc state :wants-toy true))) (actions/respond entities % @@ -82,8 +81,7 @@ :peddler "Well I'm afraid you won't have the choicest of glass eyes." :ego "Can't I give you something else for them?" :peddler "I'll tell you what, I don't have any thing for the kids that come to my stand." - :peddler "If you can bring me the choicest of toys, I will give you the glass eye.")) - :choices actions/previous-choices} + :peddler "If you can bring me the choicest of toys, I will give you the glass eye."))} "I'm interested in the motivational tapes." {:run #(do (actions/update-state entities (fn [state] (assoc state :wants-toy true))) (actions/respond entities % @@ -92,10 +90,9 @@ :peddler "These choicest of motivation tapes will convince you that life isn't so bad." :peddler "For only 3 easy payments of 29.99 scheckles, they're yours!" :ego "But I'm broke!" - :peddler "Well I'm afraid you won't have the choicest of glass eyes." + :peddler "Well I'm afraid you won't have the choicest of motivational tapes." :ego "Is there anything else you'd take instead?" - :peddler "If you can bring me a nice kid's toy, I will give you the tapes.")) - :choices actions/previous-choices} + :peddler "If you can bring me a nice kid's toy, I will give you the tapes."))} "Nevermind." {:run #(actions/respond entities % :peddler "Goodbye, sir.")}]})) :scripts {:teddy (actions/get-script entities (actions/remove-item entities items/teddy) @@ -105,11 +102,14 @@ :peddler "What would you like?") (actions/present-choices entities {:choices ["The glass eye." - {:run #(do (actions/respond entities % :peddler "Of course sir. Here you go."))} + {:run #(do (actions/respond entities % :peddler "Of course sir. Here you go.") + (actions/give entities items/glass-eye))} "The motivational tapes." - {:run #(do (actions/respond entities % :peddler "Of course sir. Here you go."))} + {:run #(do (actions/respond entities % :peddler "Of course sir. Here you go.") + (actions/give entities items/motivational-tapes))} "The used earplugs." - {:run #(do (actions/respond entities % :peddler "Of course sir. Here you go."))}]}) + {:run #(do (actions/respond entities % :peddler "Of course sir. Here you go.") + (actions/give entities items/used-earplugs))}]}) (actions/talk entities :peddler "And, of course, here is your balloon.") (actions/give entities items/balloon) (actions/talk entities :peddler "Thank you for your business!"))}}} diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj index d9142614..00f245ff 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 :teddy :portrait]) +(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :stool :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs]) (defn cursor [filename which] (let [scale 2