This commit is contained in:
2015-05-07 18:18:17 -07:00
parent f6ed261b4c
commit 983a4ac251
6 changed files with 25 additions and 13 deletions

View File

@@ -34,6 +34,7 @@
:stand wizard-stand :stand wizard-stand
:disappear wizard-disappear :disappear wizard-disappear
} }
:night-profile :sprite
:origin-x 0 :origin-x 0
:origin-y 0 :origin-y 0
:talk-color (color 0.95 0.3 1.0 1.0) :talk-color (color 0.95 0.3 1.0 1.0)

View File

@@ -458,6 +458,7 @@
:x 209 :y 160 :baseline 240 :x 209 :y 160 :baseline 240
:anim monocle :anim monocle
:anim-start 0 :anim-start 0
:night-profile :none
:script (actions/get-script entities :script (actions/get-script entities
(actions/walk-to entities :ego [213 87] :face :left) (actions/walk-to entities :ego [213 87] :face :left)
(actions/talk entities :ego "There's something up there on the roof!")) (actions/talk entities :ego "There's something up there on the roof!"))
@@ -483,7 +484,7 @@
entities) entities)
(if (and (not (actions/has-item? entities :walkie-talkies)) (if (and (not (actions/has-item? entities :walkie-talkies))
(actions/has-obtained? entities :walkie-talkies)) (actions/has-obtained? entities :walkie-talkies))
(update-in entities [:room :entities] dissoc :walkie-talkie) entities
(update-in entities [:room :entities] dissoc :walkie-talkie)) (update-in entities [:room :entities] dissoc :walkie-talkie))
(if (#{:night :sunrise} (get-in entities [:state :time])) (if (#{:night :sunrise} (get-in entities [:state :time]))
(make-night entities) (make-night entities)

View File

@@ -114,8 +114,9 @@
:ego "Seems like a pretty sorry excuse for a puzzle.")))) :ego "Seems like a pretty sorry excuse for a puzzle."))))
(defn tie-up-warden [entities] (defn tie-up-warden [entities]
(actions/play-animation entities :ego :idea)
(actions/do-dialogue entities (actions/do-dialogue entities
:ego "Good thinking!" :ego "I know!"
:ego "I'll tie him up.") :ego "I'll tie him up.")
(actions/walk-to entities :ego [91 61] :face :left) (actions/walk-to entities :ego [91 61] :face :left)
(actions/play-animation entities :ego :reach) (actions/play-animation entities :ego :reach)
@@ -228,10 +229,10 @@
:door {:box [257 62 301 152] :door {:box [257 62 301 152]
:cursor :down :cursor :down
:script (actions/get-script entities (leave entities))}} :script (actions/get-script entities (leave entities))}}
:layers [(assoc (texture "inside-jail/background.png") :x 0 :y 0 :baseline 0) :layers [(assoc (texture "inside-jail/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)
(assoc (texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165) (assoc (texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165 :night-profile :none)
(assoc (texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.35) (assoc (texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.35 :night-profile :none)
(assoc (texture "inside-jail/fg.png") :x 0 :y 5 :baseline 241 :parallax 1.5 )] (assoc (texture "inside-jail/fg.png") :x 0 :y 5 :baseline 241 :parallax 1.5 :night-profile :none)]
:hotspots [{:box [121 40 258 44] :hotspots [{:box [121 40 258 44]
:fn (fn [screen entities] :fn (fn [screen entities]
@@ -262,6 +263,7 @@
:fall-asleep warden-fall-asleep :fall-asleep warden-fall-asleep
:anim warden-stand :anim warden-stand
:anim-start 0 :anim-start 0
:night-profile :none
:inhale (sound "inside-jail/inhale.ogg") :inhale (sound "inside-jail/inhale.ogg")
:exhale (sound "inside-jail/exhale.ogg") :exhale (sound "inside-jail/exhale.ogg")
:talk-color (color 0.9 0.3 0.9 1.0) :talk-color (color 0.9 0.3 0.9 1.0)
@@ -290,15 +292,18 @@
:rope (actions/get-script entities (tie-up-warden entities))}) :rope (actions/get-script entities (tie-up-warden entities))})
:ball-n-chain (assoc (texture "inside-jail/ball-n-chain.png") :ball-n-chain (assoc (texture "inside-jail/ball-n-chain.png")
:x 80 :y 80 :baseline 160 :x 80 :y 80 :baseline 160
:night-profile :none
:script (actions/get-script entities :script (actions/get-script entities
(actions/walk-to entities :ego [103 83] :face :left) (actions/walk-to entities :ego [103 83] :face :left)
(actions/play-animation entities :ego :squat) (actions/play-animation entities :ego :squat)
(actions/remove-entity entities :ball-n-chain) (actions/remove-entity entities :ball-n-chain)
(actions/give entities :ball-n-chain))) (actions/give entities :ball-n-chain)))
:moveable-bars (assoc (texture "inside-jail/moveable-bars.png") :moveable-bars (assoc (texture "inside-jail/moveable-bars.png")
:x 132 :y 77 :baseline 163) :night-profile :none
:x 132 :y 77 :baseline 163)
:crowbar (assoc (texture "inside-jail/crowbar.png") :crowbar (assoc (texture "inside-jail/crowbar.png")
:x 304 :y 65 :baseline 175 :x 304 :y 65 :baseline 175
:night-profile :none
:script (actions/get-script entities :script (actions/get-script entities
(if (get-in @entities [:state :opened-bars?]) (if (get-in @entities [:state :opened-bars?])
(do (actions/walk-to entities :ego [295 55] :face :right) (do (actions/walk-to entities :ego [295 55] :face :right)
@@ -308,6 +313,7 @@
(actions/talk entities :ego "It's a crowbar.")) (actions/talk entities :ego "It's a crowbar."))
(actions/talk entities :ego "I can't reach it.")))) (actions/talk entities :ego "I can't reach it."))))
:closed-window (assoc (texture "inside-jail/window.png") :closed-window (assoc (texture "inside-jail/window.png")
:night-profile :none
:x 99 :y 111 :baseline 128)} :x 99 :y 111 :baseline 128)}
:collision "inside-jail/collision-locked.png" :collision "inside-jail/collision-locked.png"
:collision-free (advent.pathfind/map-from-resource "inside-jail/collision-free.png") :collision-free (advent.pathfind/map-from-resource "inside-jail/collision-free.png")

View File

@@ -187,7 +187,7 @@
:ego "... and I'm just passing through..." :ego "... and I'm just passing through..."
:frankie "Not tonight you're not." :frankie "Not tonight you're not."
:frankie "Unless, of course, you can pay the toll." :frankie "Unless, of course, you can pay the toll."
:frankie "Come here, faceplant." :frankie "Come here, Dipstick."
:ego "Umm, err, I'd rather not." :ego "Umm, err, I'd rather not."
:frankie "I said, come here." :frankie "I said, come here."
:frankie "Now.") :frankie "Now.")

View File

@@ -346,7 +346,7 @@
(if (= :night (get-in @entities [:state :time])) (if (= :night (get-in @entities [:state :time]))
(actions/talk entities :ego "It's locked.") (actions/talk entities :ego "It's locked.")
(do (actions/transition-background entities :inside-house [237 0] :between (fn [s e] (do (actions/transition-background entities :inside-house [237 0] :between (fn [s e]
(if true (if (= 1 (rand-int 3))
(assoc-in e [:room :entities :experiment] (get-in e [:room :experiment])) (assoc-in e [:room :entities :experiment] (get-in e [:room :experiment]))
e))) e)))
(when (get-in @entities [:room :entities :experiment]) (when (get-in @entities [:room :entities :experiment])
@@ -495,6 +495,7 @@
:script (actions/get-script entities (talk-to-gandarf-outside entities))})) :script (actions/get-script entities (talk-to-gandarf-outside entities))}))
:note (rooms/make-entity :note (assoc (texture "outsidehouse/note.png") :note (rooms/make-entity :note (assoc (texture "outsidehouse/note.png")
:x 277 :y 74 :baseline 160 :x 277 :y 74 :baseline 160
:night-profile :none
:script (actions/get-script entities :script (actions/get-script entities
(actions/walk-to entities :ego [280 80] :face :right) (actions/walk-to entities :ego [280 80] :face :right)
(actions/play-animation entities :ego :squat) (actions/play-animation entities :ego :squat)

View File

@@ -133,10 +133,10 @@
(actions/walk-to entities :ego [170 71] :face :right) (actions/walk-to entities :ego [170 71] :face :right)
(actions/walk-straight-to entities :ego [188 71] :face :right) (actions/walk-straight-to entities :ego [188 71] :face :right)
(actions/play-animation entities :ego :reach) (actions/play-animation entities :ego :reach)
(actions/remove-entity entities :axe) (actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 0.0))
(actions/play-animation entities :ego :axe-wood) (actions/play-animation entities :ego :axe-wood)
(actions/play-animation entities :ego :reach) (actions/play-animation entities :ego :reach)
(actions/add-entity entities :axe (get-in @entities [:room [:axe (get-in @entities [:state :time])]])) (actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 1.0))
(actions/walk-straight-to entities :ego [170 71])) (actions/walk-straight-to entities :ego [170 71]))
:scripts {:alarm-clock (actions/get-script entities :scripts {:alarm-clock (actions/get-script entities
(actions/walk-to entities :ego [170 71] :face :right) (actions/walk-to entities :ego [170 71] :face :right)
@@ -145,9 +145,11 @@
(actions/remove-item entities :alarm-clock) (actions/remove-item entities :alarm-clock)
(actions/add-entity entities :alarm-clock (get-in @entities [:room :alarm-clock])) (actions/add-entity entities :alarm-clock (get-in @entities [:room :alarm-clock]))
(actions/play-animation entities :ego :axe) (actions/play-animation entities :ego :axe)
(actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 0.0))
(actions/talk entities :ego "It's split right down the middle!") (actions/talk entities :ego "It's split right down the middle!")
(actions/play-animation entities :ego :reach) (actions/play-animation entities :ego :reach)
(actions/remove-entity entities :alarm-clock) (actions/remove-entity entities :alarm-clock)
(actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 1.0))
(actions/give entities :broken-clock) (actions/give entities :broken-clock)
(actions/walk-straight-to entities :ego [170 71])) (actions/walk-straight-to entities :ego [170 71]))
:sword (actions/get-script entities (actions/talk entities :ego "I can just use the axe."))}} :sword (actions/get-script entities (actions/talk entities :ego "I can just use the axe."))}}
@@ -203,8 +205,9 @@
:rope (rooms/make-entity :rope (assoc (texture "outside-jail/rope.png") :rope (rooms/make-entity :rope (assoc (texture "outside-jail/rope.png")
:x 14 :y 20 :baseline 1 :night-profile :sprite)) :x 14 :y 20 :baseline 1 :night-profile :sprite))
:spear (rooms/make-entity :spear (assoc (texture "outside-jail/spear.png") :spear (rooms/make-entity :spear (assoc (texture "outside-jail/spear.png")
:x 60 :y 65 :baseline 180 :night-profile :none
:script (actions/get-script entities (grab-spear entities)))) :x 60 :y 65 :baseline 180
:script (actions/get-script entities (grab-spear entities))))
:alarm-clock (rooms/make-entity :alarm-clock (assoc (texture "outside-jail/alarm-clock.png") :alarm-clock (rooms/make-entity :alarm-clock (assoc (texture "outside-jail/alarm-clock.png")
:x 217 :y 83 :baseline 160 :x 217 :y 83 :baseline 160
:script (actions/get-script entities :script (actions/get-script entities