diff --git a/desktop/resources/outside-castle/background.png b/desktop/resources/outside-castle/background.png index 5411a61b..7209ae66 100644 Binary files a/desktop/resources/outside-castle/background.png and b/desktop/resources/outside-castle/background.png differ diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 8bec5110..7646f5af 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -14,7 +14,16 @@ peddler-talk (animation 0.18 (for [i (flatten [2 3 2 3 2 3 6 1 0 1 0 1 0 1 0 1 2 3 2 3 2 3 6 4 5 4 5 4 5 4 5])] (aget peddler-sheet 0 i))) peddler-stand (animation 0.2 (for [i (flatten [(repeat 5 0) 6])] - (aget peddler-sheet 0 i)))] + (aget peddler-sheet 0 i))) + balloon-sheet (texture! (texture "outside-castle/balloons.png") :split 20 36) + balloon-stand (animation 0.3 (for [i [0 1 2 1]] + (aget balloon-sheet 0 i))) + bird-sheet (texture! (texture "outside-castle/bird.png") :split 60 22) + bird-order [0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ] + bird-stand (animation 0.15 (for [i (concat bird-order + (reverse bird-order))] + (aget bird-sheet 0 i))) + ] (rooms/make :music :town-2 :interactions {:right-dir {:box [300 40 320 140] @@ -30,6 +39,12 @@ (actions/transition-background entities :inside-castle [280 145]) (actions/walk-to entities :ego [245 90])) :cursor :left} + :castle {:box [0 181 100 240] + :script (actions/get-script entities + (actions/do-dialogue entities :ego "That's the town of Remington in the distance."))} + :wares {:box [69 75 97 110] + :script (actions/get-script entities + (actions/talk entities :ego "That peddler has all kinds of strange trinkets."))} :garden {:box [103 170 178 200] :script (actions/get-script entities @@ -126,7 +141,23 @@ (actions/play-animation entities :ego :reach) (actions/remove-item entities :grass) (actions/talk entities :ego "Eww! He slobbered on my hand.") - (actions/give entities :slobber))})} + (actions/give entities :slobber))}) + :balloons (actions/start-animation screen + (assoc (animation->texture screen balloon-stand) + :x 75 + :y 100 + :baseline 140 + :stand balloon-stand + :script (actions/get-script entities + (actions/talk entities :ego "Those look like the choicest of balloons."))) + :stand) + :bird (actions/start-animation screen + (assoc (animation->texture screen bird-stand) + :x 161 + :y 218 + :baseline 21 + :stand bird-stand) + :stand)} :collision "outside-castle/collision.png" :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00) :start-pos [310 80]))) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 6931bf77..fb49be34 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -74,7 +74,9 @@ (if current-action entities ((or (when interaction - ((:get-script interaction) (get-in entities [:cursor :current]) [x y])) + ((:get-script interaction) (or (when (:cursor interaction) :main) + (get-in entities [:cursor :current])) + [x y])) (when interacting-entity ((:get-script interacting-entity) (get-in entities [:cursor :current]) [x y])) ((:get-script default-interaction) (get-in entities [:cursor :current]) [x y])) entities))