diff --git a/desktop/resources/cursor.png b/desktop/resources/cursor.png index 65ce497f..7bd248ba 100644 Binary files a/desktop/resources/cursor.png and b/desktop/resources/cursor.png differ diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 35d0ea61..bc02daa7 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -496,7 +496,8 @@ :scale-x 20 :scale-y 20 :baseline 9500 - :opacity 0.1)))) + :opacity 0.1)) + (assoc-in [:cursor :current] :main))) (continue [this screen entities] (when music-changed? diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj index 7dd0f212..e0c1b9b0 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -113,4 +113,5 @@ :scripts {:flask-1-slobber (make-strength-potion) }} :ball-n-chain {:name "Ball-n-chain" :value :ball-n-chain :cursor :ball-n-chain} :key {:name "Jail key" :value :key :cursor :key} + :rope {:name "Rope" :value :rope :cursor :rope} }) diff --git a/desktop/src-common/advent/screens/rooms/inside_jail.clj b/desktop/src-common/advent/screens/rooms/inside_jail.clj index fb1bef66..34dcf455 100644 --- a/desktop/src-common/advent/screens/rooms/inside_jail.clj +++ b/desktop/src-common/advent/screens/rooms/inside_jail.clj @@ -45,6 +45,7 @@ (assoc :inventory (concat (:inventory %) (:chest-contents %))) (assoc :chest-contents []))) (when (not (actions/has-obtained? entities :rope)) + (actions/give entities :rope) (actions/do-dialogue entities :ego "Looks like there's some rope in here too."))) :else @@ -111,6 +112,17 @@ :ego "I get to just take the key and leave?" :ego "Seems like a pretty sorry excuse for a puzzle.")))) +(defn tie-up-warden [entities] + (actions/do-dialogue entities + :ego "Good thinking!" + :ego "I'll tie him up.") + (actions/walk-to entities :ego [91 61] :face :left) + (actions/play-animation entities :ego :reach) + (actions/do-dialogue entities + :warden "Hey! What do you think you're doing?" + :warden "Back in the slammer you go.") + (common/go-to-jail entities)) + (defn search-hay [entities] (actions/walk-to entities :ego [144 86] :face :right) (let [hay-searches (get-in @entities [:state :hay-searches] 0)] @@ -224,7 +236,11 @@ (actions/update-state entities #(assoc % :warden-fast-asleep? true))) :else (do (actions/walk-to entities :ego [103 82]) - (do-warden-dialogue entities))))) + (do-warden-dialogue entities)))) + :scripts {:sword (actions/get-script entities (actions/do-dialogue entities + :ego "That's pretty gruesome." + :ego "I can't kill him just for doing his job.")) + :rope (actions/get-script entities (tie-up-warden entities))}) :ball-n-chain (assoc (texture "inside-jail/ball-n-chain.png") :x 80 :y 80 :baseline 160 :script (actions/get-script entities diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj index f4a1e274..635c3df4 100644 --- a/desktop/src-common/advent/utils.clj +++ b/desktop/src-common/advent/utils.clj @@ -14,7 +14,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 :ladder :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength :medal :kiss :sword :hourglass :mandrake :ball-n-chain :key]) +(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :ladder :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength :medal :kiss :sword :hourglass :mandrake :ball-n-chain :key :rope]) (defn cursor [filename which] (let [scale 2