adding charcoal.

This commit is contained in:
Bryce Covert
2015-11-22 14:47:33 -08:00
parent 989c565300
commit 85cf347b87
10 changed files with 112 additions and 44 deletions

View File

@@ -513,6 +513,7 @@
(update-in entities [:room :entities] #(dissoc % :butterfly))
(update-in entities [:room :entities] #(assoc % :cauldron (get-in entities [:room :cauldron])))
(update-in entities [:room :entities] assoc :charcoal (get-in entities [:room :charcoal]))
(utils/play-sound! screen entities
(get-in entities [:room :cauldron-sound :sound])
(utils/sourced-volume-fn :cauldron 0.15 [139 73])
@@ -592,6 +593,7 @@
(aget sheep-walk-sheet 0 i)))
butterfly-stand (utils/make-anim "butterfly.png" [7 7] 0.1 [0 1])
cauldron (utils/make-anim "outsidehouse/cauldron.png" [50 38] 0.15 (range 4))
charcoal (utils/make-anim-seq "outsidehouse/charcoal" [18 18] 0.25 (range 4))
scaler (utils/scaler-fn-with-baseline 110 0.10 1.00)
lamb-stand (aget lamb-walk-sheet 0 0)
lamb-walk (animation 0.075 (for [i (range 4)]
@@ -733,6 +735,7 @@
:scaled true)
sheep-stand)
:outside-particles (common/make-outside-particles)
:magic (assoc (doto (particle-effect "particles/magic") )
:x 153
@@ -780,6 +783,21 @@
:script (actions/get-script entities
(examine-cauldron entities))
:scripts put-something-in-cauldron))
:charcoal (rooms/make-entity :charcoal
(assoc (animation->texture screen charcoal)
:anim charcoal
:anim-start 0
:night-profile :none
:x 125 :y 73 :baseline 167
:script (actions/get-script entities
(actions/walk-to entities :ego [120 73])
(actions/play-animation entities :ego :start-squat-2 :stop? false)
(Thread/sleep 200)
(actions/remove-entity entities :charcoal)
(actions/play-animation entities :ego :end-squat)
(actions/talk entities :ego "It's a small, sharp piece of charcoal.")
)
))
:wizard (rooms/make-entity :wizard (common/make-wizard screen {:x 190 :y 78 :baseline 162 :scale-x 1.2 :scale-y 1.2
:script (actions/get-script entities (talk-to-gandarf-outside entities))
:scripts {:default (actions/get-script entities (actions/talk entities :wizard "No time for that!"))