more failure interactions.
This commit is contained in:
@@ -90,10 +90,13 @@
|
||||
(defn put-something-in-cauldron [item]
|
||||
(condp = item
|
||||
:money (actions/get-script entities
|
||||
(actions/walk-to entities :ego [141 90] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :money)
|
||||
(actions/talk entities :ego "I guess that's what you could call 'money in the pot'."))
|
||||
(if (actions/has-item? entities :note-2)
|
||||
(do
|
||||
(actions/walk-to entities :ego [141 90] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :money)
|
||||
(actions/talk entities :ego "I guess that's what you could call 'money in the pot'."))
|
||||
(actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to.")))
|
||||
:slingshot (actions/get-script entities
|
||||
(if (is-ready-for-slingshot entities)
|
||||
(do
|
||||
@@ -128,10 +131,13 @@
|
||||
(Thread/sleep 500)
|
||||
(actions/walk-straight-to entities :ego [35 45] :override-dir :right :speed 3.0))))
|
||||
:broken-clock (actions/get-script entities
|
||||
(actions/walk-to entities :ego [141 90] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :broken-clock)
|
||||
(actions/talk entities :ego "Just in the nick of time."))
|
||||
(if (actions/has-item? entities :note-2)
|
||||
(do
|
||||
(actions/walk-to entities :ego [141 90] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :broken-clock)
|
||||
(actions/talk entities :ego "Just in the nick of time."))
|
||||
(actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to.")))
|
||||
:recipe (actions/get-script entities
|
||||
(actions/walk-to entities :ego [151 90] :face :right)
|
||||
(actions/play-animation entities :ego :squat)
|
||||
|
||||
@@ -156,38 +156,51 @@
|
||||
(actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 1.0))
|
||||
(actions/walk-straight-to entities :ego [170 71]))
|
||||
:scripts {:alarm-clock (actions/get-script entities
|
||||
(actions/walk-to entities :ego [170 71] :face :right)
|
||||
(actions/walk-straight-to entities :ego [188 71] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :alarm-clock)
|
||||
(actions/add-entity entities :alarm-clock (get-in @entities [:room :alarm-clock]))
|
||||
(actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 0.0))
|
||||
(actions/play-animation entities :ego :axe)
|
||||
|
||||
(actions/talk entities :ego "It's split right down the middle!")
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-entity entities :alarm-clock)
|
||||
(actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 1.0))
|
||||
(actions/give entities :broken-clock)
|
||||
(actions/walk-straight-to entities :ego [170 71]))
|
||||
:sword (actions/get-script entities (actions/talk entities :ego "I can just use the axe."))}}
|
||||
(if (actions/has-item? entities :note-2)
|
||||
(do
|
||||
(actions/walk-to entities :ego [170 71] :face :right)
|
||||
(actions/walk-straight-to entities :ego [188 71] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :alarm-clock)
|
||||
(actions/add-entity entities :alarm-clock (get-in @entities [:room :alarm-clock]))
|
||||
(actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 0.0))
|
||||
(actions/play-animation entities :ego :axe)
|
||||
|
||||
(actions/talk entities :ego "It's split right down the middle!")
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-entity entities :alarm-clock)
|
||||
(actions/update-entities entities #(assoc-in % [:room :entities :axe :opacity] 1.0))
|
||||
(actions/give entities :broken-clock)
|
||||
(actions/walk-straight-to entities :ego [170 71]))
|
||||
(actions/talk entities :ego "No reason to chop that!"))
|
||||
)
|
||||
:sword (actions/get-script entities (actions/talk entities :ego "I can just use the axe."))
|
||||
:default (actions/get-script entities (actions/talk entities :ego "No reason to chop that!"))
|
||||
:frog-legs (actions/get-script entities (actions/talk entities :ego "They're already chopped up!"))}}
|
||||
:lever {:box [3 72 20 90]
|
||||
:script (actions/get-script entities
|
||||
(interact-with-lever entities))
|
||||
:scripts {:rope (actions/get-script entities
|
||||
(when (get-in @entities [:state :knows-about-stash?])
|
||||
(actions/walk-to entities :ego [48 36] :face :left)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :rope)
|
||||
(actions/add-entity entities :rope (get-in @entities [:room :rope]))))
|
||||
(if (get-in @entities [:state :knows-about-stash?])
|
||||
(do
|
||||
(actions/walk-to entities :ego [48 36] :face :left)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :rope)
|
||||
(actions/add-entity entities :rope (get-in @entities [:room :rope])))
|
||||
(actions/talk entities :ego "Why would I want to burn that?")))
|
||||
:recipe (actions/get-script entities
|
||||
(actions/walk-to entities :ego [48 36] :face :left)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :recipe)
|
||||
(actions/give entities :ash)
|
||||
(actions/talk entities :ego "It burned up into ash."))
|
||||
(if (= :night (get-in @entities [:state :time]))
|
||||
(do
|
||||
(actions/walk-to entities :ego [48 36] :face :left)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-item entities :recipe)
|
||||
(actions/give entities :ash)
|
||||
(actions/talk entities :ego "It burned up into ash."))
|
||||
(actions/talk entities :ego "The candle's not lit right now.")))
|
||||
:default (actions/get-script entities
|
||||
(actions/talk entities :ego "Why would I want to burn that?"))}}
|
||||
(if (= :night (get-in @entities [:state :time]))
|
||||
(actions/talk entities :ego "Why would I want to burn that?")
|
||||
(actions/talk entities :ego "The candle's not lit right now.")))}}
|
||||
:end-of-rope {:box [177 101 185 108]
|
||||
:script (actions/get-script entities (try-to-go-in-stash entities))}
|
||||
:fountain {:box [150 126 193 147]
|
||||
|
||||
Reference in New Issue
Block a user