can only use shovel sometimes.

This commit is contained in:
2015-04-15 09:06:42 -07:00
parent a8b1b39a37
commit 146ccebdb9

View File

@@ -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"))}] }