made it so you can make the spell componoent.
This commit is contained in:
@@ -239,7 +239,16 @@
|
||||
:y 175
|
||||
:anim flies-stand
|
||||
:anim-start 0
|
||||
:baseline 240)}
|
||||
:baseline 240
|
||||
:scripts {:sack-lunch (actions/get-script entities
|
||||
(actions/walk-to entities :ego [168 150] :face :right)
|
||||
(actions/talk entities :ego "Maybe I can catch some of these flies.")
|
||||
(actions/remove-item entities :sack-lunch)
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "I think it's working!")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities :flies)
|
||||
(actions/talk entities :ego "Hopefully they won't fly out of my backpack."))})}
|
||||
:collision "outside-castle/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:start-pos [310 80]
|
||||
|
||||
@@ -140,12 +140,12 @@
|
||||
(actions/give entities :flask-2))))
|
||||
|
||||
(defn add-wizard-if-necessary [entities]
|
||||
(if (actions/has-item? entities :flask-water)
|
||||
(if (actions/has-obtained? entities :flask-water)
|
||||
entities
|
||||
(update-in entities [:room :entities] #(assoc % :wizard (get-in entities [:room :wizard])))))
|
||||
|
||||
(defn add-note-if-necessary [entities]
|
||||
(if (and (actions/has-item? entities :flask-water)
|
||||
(if (and (actions/has-obtained? entities :flask-water)
|
||||
(not (actions/has-obtained? entities :note-1)))
|
||||
(update-in entities [:room :entities] #(assoc % :note (get-in entities [:room :note])))
|
||||
entities))
|
||||
|
||||
Reference in New Issue
Block a user