magic!
This commit is contained in:
@@ -54,6 +54,20 @@
|
||||
(defn leave-sheep [entities]
|
||||
(actions/walk-straight-to entities :ego [154 133] :update-baseline? false))
|
||||
|
||||
(defn magic [entities]
|
||||
(actions/run-action entities
|
||||
(begin [this screen entities]
|
||||
(doto (get-in entities [:room :entities :magic])
|
||||
(particle-effect! :reset)
|
||||
(particle-effect! :start))
|
||||
entities)
|
||||
(continue [this screen entities]
|
||||
entities)
|
||||
(done? [this screen entities]
|
||||
(particle-effect! (get-in entities [:room :entities :magic]) :is-complete))
|
||||
(terminate [this screen entities]
|
||||
entities)))
|
||||
|
||||
(defn put-something-in-cauldron [item]
|
||||
(condp = item
|
||||
:money (actions/get-script entities
|
||||
@@ -66,11 +80,17 @@
|
||||
(do
|
||||
(actions/walk-to entities :ego [141 90] :face :right)
|
||||
(actions/talk entities :ego "Here goes!")
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/play-animation entities :ego :reach-start :stop? false)
|
||||
(magic entities)
|
||||
(actions/play-animation entities :ego :reach-stop :stop? true)
|
||||
|
||||
(actions/remove-item entities :slingshot)
|
||||
(actions/give entities :magic-slingshot)
|
||||
(actions/do-dialogue entities
|
||||
:ego "It worked!"
|
||||
|
||||
(actions/do-dialogue entities :ego "It worked!")
|
||||
|
||||
(actions/glad entities)
|
||||
(actions/do-dialogue entities
|
||||
:ego "I now have The Slinger's Shot."
|
||||
:ego "And just in time, too. It's getting light.")
|
||||
(actions/update-state entities #(assoc % :next-time :sunrise))
|
||||
@@ -406,6 +426,10 @@
|
||||
:stand sheep-stand}
|
||||
:scaled true)
|
||||
sheep-stand)
|
||||
:magic (assoc (doto (particle-effect "outsidehouse/magic") )
|
||||
:x 153
|
||||
:y 105
|
||||
:baseline 238)
|
||||
:lamb (assoc (texture "outsidehouse/lamb.png")
|
||||
:x 10 :y 163 :baseline 77
|
||||
:right {:stand (animation 0.1 [lamb-stand])
|
||||
|
||||
Reference in New Issue
Block a user