From 146ccebdb9f03501d2fbe304d157507bc53f335f Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Wed, 15 Apr 2015 09:06:42 -0700 Subject: [PATCH] can only use shovel sometimes. --- desktop/src-common/advent/screens/rooms/dream.clj | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/dream.clj b/desktop/src-common/advent/screens/rooms/dream.clj index 205f0f29..0ff98ca6 100644 --- a/desktop/src-common/advent/screens/rooms/dream.clj +++ b/desktop/src-common/advent/screens/rooms/dream.clj @@ -252,8 +252,12 @@ :script (actions/get-script entities (read-sword-plaque entities)) :scripts {:shovel (actions/get-script entities - (actions/walk-to entities :ego [148 76] :face :right) - (swing entities))}) + (if (get-in @entities [:room :entities :fairy-godfather :distracted?]) + (do (actions/walk-to entities :ego [148 76] :face :right) + (swing entities)) + (do (actions/walk-to entities :ego [148 76] :face :right) + (actions/do-dialogue entities + :fairy-godfather "What are you doing?" :ego "Erm... Nothing."))))}) :explode (assoc (particle-effect "dream/explode") :x 150 :y 138 :baseline 240) :broom (assoc (texture "dream/broom.png") :x 286 :y 122 :path (catmull-rom-spline (map #(apply vector-2* %) [[286 122] [286 128]]) true) @@ -325,6 +329,7 @@ :ego "Yes, that's it! A dragon!" :fairy-godfather "Over there on that island!?!") (actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] dissoc :path))) + (actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :distracted? true))) (actions/walk-straight-to entities :fairy-godfather [211 210] ) (actions/talk entities :fairy-godfather "Test"))}] }