owl puking, lol.

This commit is contained in:
2014-12-28 14:53:58 -08:00
parent 06312fbbdc
commit 37c047709d
4 changed files with 98 additions and 7 deletions

View File

@@ -149,8 +149,16 @@
(str/join " and " (map item->proof missing-items))
".")))))
(defn add-monocle-if-necessary [entities]
(if (and (not (actions/has-obtained? entities :monocle))
(get-in entities [:state :talked-to-owl?]))
(update-in entities [:room :entities] #(assoc % :monocle (doto (get-in entities [:room :monocle]) println)))
entities))
(defn make-night [entities]
(update-in entities [:room :entities] #(dissoc % :game-player)))
(-> entities
(update-in [:room :entities] #(dissoc % :game-player))
add-monocle-if-necessary))
(defn make [screen]
(let [game-player-talk-sheet (texture! (texture "inside-castle/game-player-talk.png") :split 40 44)
@@ -162,7 +170,8 @@
game-player-flex (animation 0.075 (for [i [0 0 4 4 5 5 5 5 5 5 5 6 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 6 5 5 5 5 5 5 5 5 5 5 4 4 0 0 0 0]]
(aget game-player-talk-sheet 0 i)))
trophy (utils/make-anim "inside-castle/trophy.png" [16 16] 0.1 (flatten [(repeat 50 0) 1 2 3 3 3 3 2 1]))
pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]))]
pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]))
monocle (utils/make-anim "inside-castle/monocle.png" [7 7] 0.05 (flatten [(repeat 70 0) 1 2 3 3 3 2 1]))]
(rooms/make :music :town-1
:interactions
{:right-door {:box [286 140 306 160]
@@ -319,6 +328,13 @@
:stand game-player-stand
:flex game-player-flex
:talk game-player-talk)}
:monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle)
:x 209 :y 160 :baseline 240
:anim monocle
:anim-start 0
:script (actions/get-script entities
(actions/walk-to entities :ego [213 87] :face :left)
(actions/talk entities :ego "There's something up there on the roof!"))))
:collision "inside-castle/collision.png"
:scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00)
:apply-state (fn [entities]