diff --git a/desktop/resources/castle-gate/background.png b/desktop/resources/castle-gate/background.png index 403ceeb2..02cd0339 100644 Binary files a/desktop/resources/castle-gate/background.png and b/desktop/resources/castle-gate/background.png differ diff --git a/desktop/resources/castle-gate/castle-door.psd b/desktop/resources/castle-gate/castle-door.psd index 4731c84e..85c66bb9 100644 Binary files a/desktop/resources/castle-gate/castle-door.psd and b/desktop/resources/castle-gate/castle-door.psd differ diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 4fb25776..9ccff3ec 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -621,8 +621,8 @@ (let [ego (get-in entities [:room :entities :ego]) old-music (get-music (get-in entities [:room :music]) (get-in entities [:state :time])) entities (as-> entities e - (if between (between screen e) e) (assoc-in e [:room] (get-in entities [:rooms new-background])) + (if between (between screen e) e) (assoc-in e [:room :entities :ego] ego) (assoc-in e [:state :last-room] new-background) (assoc-in e [:tweens :fade-in] (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 time)) diff --git a/desktop/src-common/advent/screens/rooms/castle_gate.clj b/desktop/src-common/advent/screens/rooms/castle_gate.clj index 6e984b7a..39edefac 100644 --- a/desktop/src-common/advent/screens/rooms/castle_gate.clj +++ b/desktop/src-common/advent/screens/rooms/castle_gate.clj @@ -133,7 +133,7 @@ :cursor :left} :big-tree {:box [20 10 82 235] :scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}} - :window {:box [190 176 206 211] + :window {:box [192 157 215 215] :script (actions/get-script entities (actions/do-dialogue entities :ego "It's a big window!")) :scripts {:walkie-talkies (actions/get-script entities @@ -143,8 +143,8 @@ (actions/remove-item entities :walkie-talkies) (actions/walk-straight-to entities :ego [285 71]))}}} - :layers {:day [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)] - :night [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)]} + :layers {:day [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)] + :night [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)]} :entities {:frankie (make-frankie screen) :goon-1 (make-goon-1 screen) :goon-2 (make-goon-2 screen)} diff --git a/desktop/src-common/advent/screens/rooms/inside_house.clj b/desktop/src-common/advent/screens/rooms/inside_house.clj index 3bb49259..a4b882cf 100644 --- a/desktop/src-common/advent/screens/rooms/inside_house.clj +++ b/desktop/src-common/advent/screens/rooms/inside_house.clj @@ -37,7 +37,7 @@ (actions/update-state entities #(assoc % :active? false))) (defn do-wizard-dialogue [entities] - (actions/play-animation entities :wizard :experiment) + (actions/do-dialogue entities :wizard "What can I do for you boy?") (actions/present-choices entities {:choices ["What's with the safe?" @@ -136,12 +136,7 @@ (assoc (texture "inside-house/desk.png") :x 0 :y 0 :baseline 200) (assoc (texture "inside-house/sillhoute.png") :x 0 :y 0 :baseline 240 :parallax 2.0) (assoc (texture "inside-house/glow.png") :x 0 :y 0 :baseline 199 :additive? true)] - :entities {:experiment (assoc (animation->texture screen experiment-left) - :x 228 :y 60 :scale-x 1.75 :scale-y 1.75 :origin-x 7.43 :origin-y 0 - :anim experiment-left - :stand experiment-left - :anim-start 0 - :baseline 225) + :entities { :wizard (common/make-wizard screen {:x 228 :y 60 :baseline 160 :scale-x 1.75 :scale-y 1.75 :origin-x 0 :origin-y 0 :script (actions/get-script entities (do-wizard-dialogue entities)) :scripts #(condp = % @@ -202,6 +197,10 @@ (do (actions/give entities :frog-legs) (actions/remove-entity entities :frog-legs) (actions/do-dialogue entities :ego "Eww. Frog legs.")))))} + :experiment (rooms/make-entity :experiment (assoc (animation->texture screen experiment-left) + :x 228 :y 60 :scale-x 1.75 :scale-y 1.75 :origin-x 7.43 :origin-y 0 + :experiment experiment-left + :baseline 225)) :collision "inside-house/collision.png" :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75) :apply-state (fn [entities] diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index fbfd78f7..1ef58f34 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -345,7 +345,14 @@ (actions/play-animation entities :ego :reach) (if (= :night (get-in @entities [:state :time])) (actions/talk entities :ego "It's locked.") - (do (actions/transition-background entities :inside-house [237 0]) + (do (actions/transition-background entities :inside-house [237 0] :between (fn [s e] + (if true + (assoc-in e [:room :entities :experiment] (get-in e [:room :experiment])) + e))) + (when (get-in @entities [:room :entities :experiment]) + (actions/play-animation entities :experiment :experiment) + (actions/remove-entity entities :experiment)) + (if (get-in @entities [:state :convinced-wizard?]) (do (actions/talk entities :wizard (str "Oh, hello there boy.")) (utils/save @entities))