small progress.

This commit is contained in:
2015-01-03 14:36:44 -08:00
parent 9d3772b976
commit 57492617f7
9 changed files with 120 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
(ns advent.screens.rooms.outside-castle
(:require [advent.screens.items :as items]
[advent.screens.rooms :as rooms]
[advent.screens.rooms.common :as common]
[advent.screens.rooms.castle-gate :as castle-gate]
[advent.actions :as actions]
[advent.utils :as utils]
@@ -196,7 +197,7 @@
:frankie "And what's this?"
:frankie "The Slinger's Shot?"
:ego "No, not the Slinger's Shot!"
:franki "Look like we hit the jackpot tonight boys!")
:frankie "Look like we hit the jackpot tonight boys!")
(frankie-comment-on-item entities)
(actions/give entities :money)
(actions/do-dialogue entities
@@ -227,11 +228,20 @@
(actions/transition-background entities :inside-castle [280 145])
(actions/walk-to entities :ego [245 90]))))
(defn add-note-if-necessary [entities]
(if (and (actions/has-obtained? entities :spell-component)
(not (actions/has-item? entities :spell-component))
(not (actions/has-obtained? entities :note-2)))
(update-in entities [:room :entities] #(assoc % :note (get-in entities [:room :note])))
entities))
(defn make-night [entities]
(-> entities
(update-in [:room :entities] #(dissoc % :peddler))
(update-in [:room :entities] #(dissoc % :balloons))
(utils/remove-interaction :wares)))
(utils/remove-interaction :wares)
add-note-if-necessary))
(defn make [screen]
(let [peddler-sheet (texture! (texture "outside-castle/peddler-talk.png" ) :split 18 36)
@@ -355,6 +365,12 @@
(actions/play-animation entities :ego :squat)
(actions/give entities :flies)
(actions/talk entities :ego "Hopefully they won't fly out of my backpack."))})}
:note (rooms/make-entity :note (assoc (texture "outside-castle/note.png")
:x 198 :y 66 :baseline 174
:script (actions/get-script entities
(actions/walk-to entities :ego [210 79] :face :left)
(actions/play-animation entities :ego :squat)
(common/read-note-2 entities))))
:collision "outside-castle/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
:start-pos [310 80]