background script pt 1
This commit is contained in:
@@ -281,7 +281,7 @@
|
||||
(defn return-from-island [screen entities]
|
||||
|
||||
|
||||
(when (and (not (get-in entities [:actions :script-running?]))
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(get-in entities [:state :active?])
|
||||
(get-in entities [:room :entities :fairy-godfather :distracted?]))
|
||||
(if (> (get-in entities [:room :entities :fairy-godfather :distracted-time] 0) 15)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
(actions/update-entities entities (fn [e] (assoc-in e [:room :bloodclot-timer] 0))))}]}))
|
||||
|
||||
(defn add-second [screen entities]
|
||||
(when (and (not (get-in entities [:actions :script-running?]))
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(get-in entities [:state :active?]))
|
||||
(if (> (get-in entities [:room :bloodclot-timer] 0) 7)
|
||||
(do
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn brian [screen entities]
|
||||
(when (and (not (get-in entities [:actions :script-running?]))
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(get-in entities [:state :active?])
|
||||
(get-in entities [:room :entities :game-player]))
|
||||
((actions/get-script entities
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
(get-in entities [:room :entities :ego :right :walk])} (get-in entities [:room :entities :ego :anim]))]
|
||||
(if is-walking?
|
||||
(let [entities (-> entities
|
||||
(update-in [:actions] #(assoc % :channel (chan) :current nil :started? false :script-running? false))
|
||||
(update-in [:fg-actions] #(assoc % :channel (chan) :current nil :started? false :script-running? false))
|
||||
(update-in [:room :entities :ego] #(actions/start-animation screen % :stand)))]
|
||||
((actions/get-script entities
|
||||
(actions/stop-walking entities :ego)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn taunt [screen entities]
|
||||
(when (and (not (get-in entities [:actions :script-running?]))
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(get-in entities [:state :active?])
|
||||
(not (get-in entities [:state :blergh-dead?]))
|
||||
(not (actions/has-item? entities :magic-slingshot)))
|
||||
@@ -30,7 +30,7 @@
|
||||
nil)
|
||||
|
||||
(defn shock [screen entities]
|
||||
(when (and (not (get-in entities [:actions :script-running?]))
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(get-in entities [:state :active?])
|
||||
(not (get-in entities [:state :blergh-dead?]))
|
||||
(actions/has-item? entities :magic-slingshot))
|
||||
|
||||
Reference in New Issue
Block a user