gandarf turns you into a frog

This commit is contained in:
Bryce Covert
2015-07-31 07:56:04 -07:00
parent f6d881fa98
commit bb9b7b82de
13 changed files with 372 additions and 5 deletions

View File

@@ -25,6 +25,7 @@
wizard-stand (animation 0.2 (for [i (flatten [(repeat 10 0) 1])]
(aget wizard-sheet 0 i)))
wizard-talk-angry (utils/make-anim "wizard/talk-angry.png" [20 50] 0.2 [0 2 0 2 1 2 0 3 0 2 0 1 0 2])
wizard-magic-hands (utils/make-anim "wizard/magic-hands.png" [20 50] 0.2 (range 2))
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)))]
@@ -33,12 +34,14 @@
:stand (utils/flip wizard-stand)
:disappear (utils/flip wizard-disappear)
:magic-hands (utils/flip wizard-magic-hands)
:talk-angry (utils/flip wizard-talk-angry)
}
:right {:talk wizard-talk
:stand wizard-stand
:disappear wizard-disappear
:talk-angry (utils/flip wizard-talk-angry)
:talk-angry wizard-talk-angry
:magic-hands wizard-magic-hands
}
:night-profile :sprite
:origin-x 0

View File

@@ -181,6 +181,9 @@
:candle-smoke (doto (assoc (particle-effect "inside-house/candle") :x 172 :y 112
:baseline 200)
(particle-effect! :set-position 172 112))
:magic-frog-particle (doto (assoc (particle-effect "inside-house/magic-frog") :x 230 :y 0
:baseline 241)
(particle-effect! :set-position 237 0))
:flask (assoc (texture "inside-house/flask.png")
:x 265 :y 80 :baseline 240
:script (actions/get-script entities

View File

@@ -147,7 +147,24 @@
(actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to."))))
(defn wizard-dialogue [entities]
(actions/do-dialogue entities :ego "Hello there Gandarf!" :wizard "Oh no, not you again!")
(if (get-in @entities [:state :has-met-gandarf?])
(do (actions/do-dialogue entities :ego "Hello again Gandarf!"
:wizard "Not you again!")
(actions/talk entities :wizard "I command you, leave at once!" :anim :talk-angry :stop? false)
(actions/talk entities :wizard "Don't make me use my powers against you!" :anim :talk-angry :stop? false)
(actions/talk entities :wizard "Leave now, or else!" :anim :talk-angry :stop? false)
(actions/begin-animation entities :wizard :magic-hands))
(do (actions/do-dialogue entities :ego "Hello there Gandarf!"
:wizard "Oh no, not you!"
:ego "What do you mean, 'not you!'?"
:wizard "I mean, you've wrecked my life!"
:wizard "I never want to see the likes of you again!"
:wizard "Leave!"
:ego "But...")
(actions/talk entities :wizard "I command you, by all the power I can muster..." :anim :talk-angry :stop? false)
(actions/talk entities :wizard "Leave now, or else!" :anim :talk-angry :stop? false)
(actions/begin-animation entities :wizard :magic-hands)))
(actions/update-state entities (fn [s] (assoc s :has-met-gandarf? true)))
(actions/present-choices entities
{:choices ["What do you mean, \"Not you again?\""
{:run #(actions/respond entities % :wizard "I mean, you've wrecked my life and I never want to see you again.")
@@ -236,9 +253,41 @@
"You're not happy to see me, Gandarf?"
{:run #(actions/respond entities % :wizard "Of course not, you little brat. You've made my life a living hell!")
:choices #(-> % zip/left)}
"Goodbye, Gandarf!"
"Or else what?"
{:run #(do (actions/talk entities :ego %)
(actions/talk entities :wizard "Or else I'll turn you into a frog!" :anim :talk-angry :stop? false)
(actions/begin-animation entities :wizard :magic-hands))
:choices ["You don't scare me."
{:run
#(do
(actions/talk entities :ego %)
(actions/talk entities :wizard "You asked for it, boy." :anim :talk-angry :stop? false)
(actions/talk entities :wizard "Grenouille KALA!!!" :anim :talk-angry :stop? false)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :reset)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :start)
(actions/begin-animation entities :ego :frog)
(Thread/sleep 2000)
(actions/begin-animation entities :wizard :stand)
(Thread/sleep 1000)
(actions/do-dialogue entities
:wizard "I warned you, Tick."
:wizard "Now, I will return you to your true state if you leave me in peace."
:wizard "Do you promise?")
(actions/play-animation entities :ego :frog-nod :stop? false)
(actions/talk entities :wizard "Frustatium DISPOSIUM!!!" :anim :talk-angry :stop? false)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :reset)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :start)
(Thread/sleep 1500)
(actions/transition-background entities :outside-house [257 90] :face :left))}
"Okay, okay, I'm leaving."
{:run
#(do
(actions/talk entities :ego %)
(actions/transition-background entities :outside-house [257 90] :face :left))}]}
"Okay, okay, I'm leaving."
{:run #(do
(actions/respond entities % :wizard "Now scram!")
(actions/talk entities :ego %)
(actions/talk entities :wizard "Okay, okay, I'm leaving." :anim :talk-angry)
(actions/transition-background entities :outside-house [257 90] :face :left))}]}))
@@ -342,7 +391,7 @@
:interactions
{:door {:box [250 100 281 160]
:script
(actions/get-unsaved-script
(actions/get-script
entities
(actions/walk-to entities :ego [257 90] :face :right)
(actions/talk entities :ego (str "Anyone home?"))