diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index b467d84a..67e6c9fc 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -175,11 +175,16 @@ (actions/transition-background entities :castle-gate [340 40]) (actions/walk-straight-to entities :ego [300 45]) (if (get-in @entities [:state :seen-frankie?]) - (do - (actions/do-dialogue entities - :frankie "Well, well, well. What have we here boys?" - :frankie "It's good ol' Dipstick again.") - (actions/play-animation entities :frankie :laugh)) + ((rand-nth [#(do + (actions/do-dialogue entities + :frankie "Well, well, well. What have we here boys?" + :frankie "It's good ol' Dipstick again.") + (actions/play-animation entities :frankie :laugh)) + #(do + (actions/do-dialogue entities + :frankie "Quiet boys." + :frankie "Dipstick's here.") + )])) (do (actions/do-dialogue entities :frankie "Well, well, well. What have we here boys?") (actions/play-animation entities :frankie :glance) @@ -242,16 +247,16 @@ (actions/update-state entities #(assoc % :seen-frankie? true))) -(defn go-through-gate [entities] +(defn go-through-gate [entities & {:keys [skip-type stop?] :or {skip-type :end stop? true}}] (if (should-block? entities) (do - (actions/walk-to entities :ego [82 180] :face :left :skip-type :end) + (actions/walk-to entities :ego [82 180] :face :left :skip-type skip-type) (block-entrance entities)) (do - (actions/walk-to entities :ego [82 180] :skip-type :end :stop? false) + (actions/walk-to entities :ego [82 180] :skip-type skip-type :stop? false) (actions/walk-straight-to entities :ego [61 182]) (actions/transition-background entities :inside-castle [295 145]) - (actions/walk-to entities :ego [245 90] :skip-type :end)))) + (actions/walk-to entities :ego [245 90] :skip-type skip-type :stop? stop?)))) (defn add-note-if-necessary [entities] diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index fd290176..ccf97f7e 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -37,17 +37,19 @@ (done? [this screen entities] true) (terminate [this screen entities] - entities))) + entities) + (skip-type [this screen entities] + :none))) -(defn walk-to-castle [entities] - (actions/walk-to entities :ego [0 80] :skip-type :end) +(defn walk-to-castle [entities & {:keys [skip-type stop?] :or {skip-type :end stop? true}}] + (actions/walk-to entities :ego [0 80] :skip-type skip-type) (actions/walk-straight-to entities :ego [-20 80]) (actions/transition-background entities :outside-castle [330 80]) (actions/walk-straight-to entities :ego [319 80] :stop? false) - (actions/walk-to entities :ego [273 81] :skip-type :end)) + (actions/walk-to entities :ego [273 81] :skip-type skip-type :stop? stop?)) (def ego-sheep-loc [132 140]) @@ -84,7 +86,9 @@ (done? [this screen entities] (particle-effect! (get-in entities [:room :entities :magic]) :is-complete)) (terminate [this screen entities] - entities))) + entities) + (skip-type [this screen entities] + :none))) (defn put-something-in-cauldron [item] (condp = item @@ -117,8 +121,8 @@ :ego "And just in time, too. It's getting light.") (actions/update-state entities #(assoc % :next-time :sunrise :seen-bloodclot? false)) - (walk-to-castle entities) - (outside-castle/go-through-gate entities) + (walk-to-castle entities :skip-type :none :stop? false) + (outside-castle/go-through-gate entities :skip-type :none :stop? false) (actions/update-state entities #(assoc % :next-time :day)) (inside-castle/walk-to-blergh entities) (actions/do-dialogue entities