wizard improvements.

This commit is contained in:
2014-12-10 23:22:40 -08:00
parent c0ef31966e
commit d069849bc8
24 changed files with 91 additions and 3 deletions

View File

@@ -75,6 +75,8 @@
:wizard "Already?"
:wizard "Ok, I'll deliver them myself. Don't touch anything while I'm gone.")
(actions/update-state entities (fn [s] (assoc s :mints-eaten 0)))
(sound! (sound "inside-house/disappear.ogg") :play)
(actions/play-animation entities :wizard :disappear :stop? false)
(actions/remove-entity entities :wizard))}
"Nevermind."
{:run #(actions/do-dialogue entities :ego %)}]}))
@@ -83,6 +85,7 @@
(let [wizard-sheet (texture! (texture "wizard/talk.png") :split 20 46)
wizard-stand (animation 0.2 (for [i (flatten [(repeat 10 0) 1])]
(aget wizard-sheet 0 i)))
wizard-disappear (utils/make-anim "wizard/disappear.png" [20 46] 0.075 (range 19))
wizard-talk (animation 0.2 (for [i [0 2 0 2 1 2 0 3 0 2 0 1 0 2]]
(aget wizard-sheet 0 i)))
safelock-sheet (texture! (texture "inside-house/safe-lock.png") :split 9 2)
@@ -106,9 +109,11 @@
(assoc (texture "inside-house/sillhoute.png") :x 0 :y 0 :baseline 240)]
:entities {:wizard (actions/start-animation screen (assoc (animation->texture screen wizard-stand) :x 228 :y 80 :baseline 160 :scale-x 1.75 :scale-y 1.75
:left {:talk (utils/flip wizard-talk)
:stand (utils/flip wizard-stand)}
:stand (utils/flip wizard-stand)
:disappear (utils/flip wizard-disappear)}
:right {:talk wizard-talk
:stand wizard-stand}
:stand wizard-stand
:disappear wizard-disappear}
:facing :left
:script (actions/get-script entities (do-wizard-dialogue entities)))
:stand)
@@ -128,5 +133,6 @@
(as-> entities entities
(if (actions/has-one-of? entities [:flask-1 :flask-1-with-cream-of-mushroom :flask-1-strength :flask-1-with-mushrooms :flask-1-with-milk])
(update-in entities [:room :entities] #(dissoc % :flask))
entities)))
entities)
(assoc-in entities [:state :mints-eaten] 3)))
:start-pos [237 0])))