able to get back to blergh.
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
(assoc-in entities [:room :entities :spear] (get-in entities [:room :spear]))
|
||||
entities))
|
||||
|
||||
(defn add-watch-if-necessary [entities]
|
||||
(if (and (not (actions/has-obtained? entities :broken-watch))
|
||||
(not (actions/has-item? entities :watch))
|
||||
(actions/has-obtained? entities :watch))
|
||||
(assoc-in entities [:room :entities :watch] (get-in entities [:room :watch]))
|
||||
(defn add-clock-if-necessary [entities]
|
||||
(if (and (not (actions/has-obtained? entities :broken-clock))
|
||||
(not (actions/has-item? entities :alarm-clock))
|
||||
(actions/has-obtained? entities :alarm-clock))
|
||||
(assoc-in entities [:room :entities :alarm-clock] (get-in entities [:room :alarm-clock]))
|
||||
entities))
|
||||
|
||||
(defn add-rope-if-necessary [entities]
|
||||
@@ -33,7 +33,7 @@
|
||||
(-> entities
|
||||
(assoc-in [:room :entities :guard] (get-in entities [:room :guard]))
|
||||
add-spear-if-necessary
|
||||
add-watch-if-necessary
|
||||
add-clock-if-necessary
|
||||
(assoc-in [:room :entities :stash] (get-in entities [:room :stash]))
|
||||
add-rope-if-necessary))
|
||||
|
||||
@@ -131,21 +131,21 @@
|
||||
:stump {:box [205 68 251 89]
|
||||
:script (actions/get-script entities
|
||||
(actions/do-dialogue entities :ego "It's a stump."))
|
||||
:scripts {:watch (actions/get-script entities
|
||||
:scripts {:alarm-clock (actions/get-script entities
|
||||
(actions/walk-to entities :ego [189 65] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :watch)
|
||||
(actions/add-entity entities :watch (get-in @entities [:room :watch])))
|
||||
(actions/remove-item entities :alarm-clock)
|
||||
(actions/add-entity entities :alarm-clock (get-in @entities [:room :alarm-clock])))
|
||||
:sword (actions/get-script entities
|
||||
(when (get-in @entities [:room :entities :watch])
|
||||
(when (get-in @entities [:room :entities :alarm-clock])
|
||||
(actions/walk-to entities :ego [129 65] :face :right)
|
||||
(actions/talk entities :ego "I'll take a big swing!")
|
||||
(actions/walk-straight-to entities :ego [189 65] :face :right :speed 3.5)
|
||||
(actions/play-animation entities :ego :swing)
|
||||
(actions/talk entities :ego "It's split right down the middle!")
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-entity entities :watch)
|
||||
(actions/give entities :broken-watch)))}}
|
||||
(actions/remove-entity entities :alarm-clock)
|
||||
(actions/give entities :broken-clock)))}}
|
||||
:lever {:box [10 72 17 85]
|
||||
:script (actions/get-script entities
|
||||
(interact-with-lever entities))
|
||||
@@ -192,13 +192,13 @@
|
||||
:spear (rooms/make-entity :spear (assoc (texture "outside-jail/spear.png")
|
||||
:x 60 :y 65 :baseline 180
|
||||
:script (actions/get-script entities (grab-spear entities))))
|
||||
:watch (rooms/make-entity :watch (assoc (texture "inside-castle/watch.png")
|
||||
:x 217 :y 83 :baseline 160
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [189 65] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-entity entities :watch)
|
||||
(actions/give entities :watch))))
|
||||
:alarm-clock (rooms/make-entity :alarm-clock (assoc (texture "outside-jail/alarm-clock.png")
|
||||
:x 217 :y 83 :baseline 160
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [189 65] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-entity entities :alarm-clock)
|
||||
(actions/give entities :alarm-clock))))
|
||||
|
||||
:stash (rooms/make-entity :stash (assoc (animation->texture screen open-stash)
|
||||
:x 197 :y 94 :baseline 146
|
||||
|
||||
Reference in New Issue
Block a user