able to get back to blergh.

This commit is contained in:
2015-01-08 16:36:27 -08:00
parent f41a9deae1
commit 16639ef14c
11 changed files with 106 additions and 71 deletions

View File

@@ -95,6 +95,12 @@
"Nevermind."
{:run #(actions/respond entities % :game-player "See you around.")}]}))
(defn walk-to-blergh [entities]
(actions/walk-to entities :ego [85 145] :face :right)
(actions/transition-background entities :space [0 65])
(actions/walk-straight-to entities :ego [140 55] :face :right)
(actions/play-animation entities :blergh :appear :stop? false)
(actions/transition-music entities :town-1 :fight))
(defn pull-sword [entities]
(actions/play-animation entities :ego :reach)
@@ -109,12 +115,10 @@
(actions/transition-music entities :pull-sword :town-1)
(actions/do-dialogue entities :ego "That was weird."
:ego "I have to go show my friends!")
(actions/walk-to entities :ego [85 145] :face :right)
(actions/transition-background entities :space [0 65])
(actions/walk-straight-to entities :ego [140 55] :face :right)
(actions/add-entity entities :blergh (get-in @entities [:room :blergh]))
(actions/play-animation entities :blergh :appear :stop? false)
(actions/transition-music entities :town-1 :fight)
(actions/do-dialogue entities :ego "Who are YOU?!?!?!"
:blergh "I'm your worst nightmare."
:blergh "I am Blergh, and this is now my dimension."
@@ -155,16 +159,12 @@
(update-in entities [:room :entities] #(assoc % :monocle (get-in entities [:room :monocle])))
entities))
(defn add-watch-if-necessary [entities]
(if (not (actions/has-obtained? entities :watch))
(update-in entities [:room :entities] #(assoc % :watch (get-in entities [:room :watch])))
entities))
(defn make-night [entities]
(-> entities
(update-in [:room :entities] #(dissoc % :game-player))
add-monocle-if-necessary
add-watch-if-necessary))
add-monocle-if-necessary))
(defn make [screen]
(let [game-player-talk-sheet (texture! (texture "inside-castle/game-player-talk.png") :split 40 44)
@@ -349,21 +349,7 @@
(actions/remove-entity entities :monocle)
(actions/give entities :monocle)
(actions/talk entities :ego "It looks like a monocle."))}))
:watch (rooms/make-entity :watch (assoc (texture "inside-castle/watch.png")
:x 282 :y 62 :baseline 140
:script (actions/get-script entities
(actions/talk entities :ego "There's something on that chair.")
(actions/walk-to entities :ego [265 90] :face :right)
(actions/walk-straight-to entities :ego [303 80])
(actions/walk-straight-to entities :ego [302 48])
(actions/play-animation entities :ego :squat)
(actions/remove-entity entities :watch)
(actions/give entities :watch)
(actions/do-dialogue entities :ego "It's a watch."
:ego "Brian O'Brainy must have left it behind.")
(actions/walk-straight-to entities :ego [303 80])
(actions/walk-straight-to entities :ego [265 90]))))
:collision "inside-castle/collision.png"
:scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00)
:apply-state (fn [entities]