fire mints.

This commit is contained in:
2014-11-09 10:14:25 -08:00
parent 2e0bc148de
commit 8a8a9fe270
3 changed files with 21 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -120,6 +120,24 @@
(actions/play-animation entities :ego :reach)
(actions/talk entities :ego "It's a portrait. There's something on the back but I can't read it.")
(actions/remove-entity entities :portrait)
(actions/give entities items/portrait)))}
(actions/give entities items/portrait)))
:bowl (assoc (texture "inside-antique/bowl.png")
:x 155
:y 125
:baseline 125
:script (actions/get-script entities
(if (= 3 (get-in @entities [:state :mints-eaten]))
(do (actions/walk-to entities :ego [145 80] :face :right)
(actions/do-dialogue entities
:ego "She's all out."
:ego "Maybe Gandarf can brew her up another batch."))
(do (actions/walk-to entities :ego [145 80] :face :right)
(actions/talk entities :ego "I'll just try one of these mints.")
(actions/play-animation entities :ego :reach)
(actions/update-state entities (fn [s] (assoc s :mints-eaten (inc (s :mints-eaten)))))
(actions/talk entities :ego "WOWZA! Those are hot.")
(when (= 3 (get-in @entities [:state :mints-eaten]))
(actions/talk entities :shopkeep "You brat! You ate the last mint.")
(actions/talk entities :shopkeep "Since you ate the last one, you have to go tell Gandarf to bring me some more."))))))}
:collision "inside-antique/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.50))))

View File

@@ -183,7 +183,8 @@
:state {:object nil
:active? true
:inventory []
:clues #{}}
:clues #{}
:mints-eaten 0}
:actions {:object nil
:channel (chan)
:current nil