diff --git a/desktop/resources/inside-antique/bowl.png b/desktop/resources/inside-antique/bowl.png new file mode 100644 index 00000000..94969b56 Binary files /dev/null and b/desktop/resources/inside-antique/bowl.png differ diff --git a/desktop/src-common/advent/screens/rooms/inside_antique.clj b/desktop/src-common/advent/screens/rooms/inside_antique.clj index 5a59a1cd..c4f50c18 100644 --- a/desktop/src-common/advent/screens/rooms/inside_antique.clj +++ b/desktop/src-common/advent/screens/rooms/inside_antique.clj @@ -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)))) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 43dba2fd..5ccefa55 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -183,7 +183,8 @@ :state {:object nil :active? true :inventory [] - :clues #{}} + :clues #{} + :mints-eaten 0} :actions {:object nil :channel (chan) :current nil