wizard keeps his place.
This commit is contained in:
@@ -82,7 +82,8 @@
|
||||
{:run #(do (actions/respond entities %
|
||||
:wizard "Already?"
|
||||
:wizard "Ok, I'll deliver them myself. Don't touch anything while I'm gone.")
|
||||
(actions/update-state entities (fn [s] (assoc s :mints-eaten 0)))
|
||||
(actions/update-state entities (fn [s] (assoc s :mints-eaten 0
|
||||
:wizard-left? true)))
|
||||
(sound! (sound "inside-house/disappear.ogg") :play)
|
||||
(actions/play-animation entities :wizard :disappear :stop? false)
|
||||
(actions/remove-entity entities :wizard))}
|
||||
@@ -102,6 +103,7 @@
|
||||
(rooms/make :music :inside-fangald
|
||||
:interactions {:down-dir {:box [151 0 320 20]
|
||||
:script (actions/get-script entities
|
||||
(actions/update-state entities #(assoc % :wizard-left? false))
|
||||
(actions/walk-to entities :ego [237 1])
|
||||
(actions/transition-background entities :outside-house [262 88]))
|
||||
:cursor :down}
|
||||
@@ -143,5 +145,7 @@
|
||||
(if (actions/has-one-of? entities [:flask-1 :flask-1-with-cream-of-mushroom :flask-1-strength :flask-1-with-mushrooms :flask-1-with-milk])
|
||||
(update-in entities [:room :entities] #(dissoc % :flask))
|
||||
entities)
|
||||
(assoc-in entities [:state :mints-eaten] 3)))
|
||||
(if (get-in entities [:state :wizard-left?])
|
||||
(update-in entities [:room :entities] #(dissoc % :wizard))
|
||||
entities)))
|
||||
:start-pos [237 0])))
|
||||
|
||||
Reference in New Issue
Block a user