state updates screens.
This commit is contained in:
@@ -64,4 +64,9 @@
|
||||
(actions/talk entities :ego "I guess I'm too far away.")))})
|
||||
cat-stand)}
|
||||
:collision "cat-tree/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20))))
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
|
||||
:apply-state (fn [entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-item? entities items/certificate)
|
||||
(update-in entities [:room :entities] #(dissoc % :cat))
|
||||
entities))))))
|
||||
|
||||
@@ -147,4 +147,9 @@
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ladder-guard "Do not toucheth, young sire.")))}
|
||||
:collision "inside-cafeteria/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.50))))
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.50)
|
||||
:apply-state (fn [entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-item? entities items/ladder)
|
||||
(update-in entities [:room :entities] #(dissoc % :ladder))
|
||||
entities))))))
|
||||
|
||||
@@ -166,4 +166,9 @@
|
||||
:anim nil
|
||||
:talk game-player-talk)}
|
||||
:collision "inside-castle/collision.png"
|
||||
:scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00))))
|
||||
:scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00)
|
||||
:apply-state (fn [entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-item? entities items/ladder)
|
||||
(update-in entities [:room :entities] #(dissoc % :ladder))
|
||||
entities))))))
|
||||
|
||||
@@ -82,4 +82,9 @@
|
||||
(actions/do-dialogue entities :ego "Hey you think I could have this flask?"
|
||||
:wizard "Sure.")))}
|
||||
:collision "inside-house/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75))))
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75)
|
||||
:apply-state (fn [entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-one-of? entities [items/flask-1 items/flask-1-with-cream-of-mushroom items/flask-1-strength items/flask-1-with-mushrooms items/flask-1-with-milk])
|
||||
(update-in entities [:room :entities] #(dissoc % :flask))
|
||||
entities))))))
|
||||
|
||||
@@ -179,7 +179,10 @@
|
||||
:carrot (actions/get-script entities
|
||||
(actions/walk-to entities :ego ego-sheep-loc :face :left)
|
||||
(actions/talk entities :ego "Come on girl, get the carrot!")
|
||||
(actions/walk-straight-to entities :sheep [95 150]))
|
||||
(actions/walk-straight-to entities :sheep [95 150])
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities items/carrot)
|
||||
(actions/update-state entities #(assoc % :coaxed-sheep? true)))
|
||||
:flask-1 (actions/get-script entities
|
||||
(if (is-sheep-close? @entities)
|
||||
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
|
||||
@@ -195,4 +198,9 @@
|
||||
:stand sheep-stand})
|
||||
sheep-stand)}
|
||||
:collision "outsidehouse/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00))))
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:apply-state (fn [entities]
|
||||
(as-> entities entities
|
||||
(if (get-in entities [:state :coaxed-sheep?])
|
||||
(update-in entities [:room :entities :sheep] #(assoc % :x 95 :y 150 :baseline 40))
|
||||
entities))))))
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
:inside-fangald (make-music "inside-fangald.ogg")}
|
||||
:state {:object nil
|
||||
:active? true
|
||||
:inventory [items/grass]
|
||||
:inventory [items/grass items/carrot]
|
||||
:clues #{}
|
||||
:mints-eaten 0}
|
||||
:actions {:object nil
|
||||
|
||||
Reference in New Issue
Block a user