progress on intro.

This commit is contained in:
2015-04-19 09:47:51 -07:00
parent f85bbf39f3
commit d7a6e9d42c
2 changed files with 64 additions and 27 deletions

View File

@@ -1 +1 @@
{:sound-volume 0.0, :music-volume 0.0}
{:sound-volume 44.0, :music-volume 70.0}

View File

@@ -232,6 +232,42 @@
entities))
nil)
(defn talk-to-fairy [entities]
(do
(actions/do-dialogue entities :fairy-godfather "Young Tick, you must choose your destiny!")
(actions/present-choices entities {:choices ["What if I don't like any of these choices?"
{:run #(do (actions/respond entities %
:fairy-godfather "Tough luck"))
:choices actions/previous-choices}
"Look out!"
{:run #(do (actions/respond entities %
:fairy-godfather "What is it?"
:ego "Err... Um..."
:ego "I saw a, um..."))
:choices ["... a dragon!"
{:run #(do (actions/respond entities %
: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] ))}] }
"Nevermind."
{:run #(actions/respond entities % :fairy-godfather "Don't worry, Tick.")}]})))
(defn describe-shovel [entities]
(actions/do-dialogue entities :fairy-godfather "Grave-digging is just the thing for you, Tick."
:fairy-godfather "Just think about it."
:fairy-godfather "You'll have your own little shack at the cemetery..."
:fairy-godfather "... where you can stay at not see another person for months on end ..."
:fairy-godfather "well, another alive person anyways."))
(defn describe-broom [entities]
(actions/do-dialogue entities :fairy-godfather "Janitoring is just the thing for you, Tick."
:fairy-godfather "Just think about it."
:fairy-godfather "Imagine the sweet smell of victory once you've mopped up some spilled milk."
:fairy-godfather "Or the smell of soap in the bathroom, where you'll spend a lot of your time."))
(defn make [screen]
(let [fairy-godfather-anim (utils/make-anim "dream/fairy-godfather.png" [63 77] 0.15 [0 1 2 3 2 1 0 1 4 3 2 1])
@@ -245,14 +281,24 @@
(actions/walk-to entities :ego [154 41])
(actions/talk entities :ego "I guess I'm doomed to be a grave-digger.")
(actions/play-animation entities :ego :sigh)
(actions/play-animation entities :ego :reach)
(actions/talk entities :ego "Wait a second! If I become a grave-digger, I'll never win Georgia McGorgeous' heart!"))
(actions/play-animation entities :ego :reach-start :stop? false)
(describe-shovel entities)
(actions/play-animation entities :ego :reach-stop :stop? true)
(actions/do-dialogue entities
:ego "I can't bring myself to do it."
:ego "That sounds horrible!"
:ego "Plus, how can I ever win the heart of my true love, Georgia McGorgeous?"))
:broom (actions/get-script entities
(actions/walk-to entities :ego [154 41])
(actions/talk entities :ego "I guess I'm doomed to be a janitor.")
(actions/play-animation entities :ego :sigh)
(actions/play-animation entities :ego :reach)
(actions/talk entities :ego "Wait a second! If I become a janitor, I'll never win Georgia McGorgeous' heart!"))}}}
(actions/play-animation entities :ego :reach-start :stop? false)
(describe-broom entities)
(actions/play-animation entities :ego :reach-stop :stop? true)
(actions/do-dialogue entities
:ego "I can't bring myself to do it."
:ego "That sounds horrible!"
:ego "Plus, how can I ever win the heart of my true love, Georgia McGorgeous?"))}}}
:timers {:return [30.0 30.0 return-from-island]}
:layers [(assoc (texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1)
(assoc (texture "dream/island.png") :x 180 :y 180 :baseline 0 :parallax 0.3 :scale-x 1.1 :scale-y 1.1)
@@ -287,6 +333,12 @@
:ego "Man! What a dream!"
:ego "If I only really could be a knight."
:ego "Then I'd be able to win Georgia McGorgeous' heart."))
(do (actions/walk-to entities :ego [148 76] :face :right)
(actions/do-dialogue entities
:fairy-godfather "What are you doing?" :ego "Erm... Nothing."))))
:broom (actions/get-script entities
(if (get-in @entities [:room :entities :fairy-godfather :distracted?])
(actions/talk entities :ego "I don't think this is hard enough to break the case.")
(do (actions/walk-to entities :ego [148 76] :face :right)
(actions/do-dialogue entities
:fairy-godfather "What are you doing?" :ego "Erm... Nothing."))))})
@@ -347,28 +399,13 @@
:script (actions/get-script entities
(if (get-in @entities [:room :entities :fairy-godfather :distracted?])
(actions/do-dialogue entities :ego "He wouldn't be able to hear me from there.")
(do
(actions/do-dialogue entities :fairy-godfather "Young Tick, you must choose your destiny!")
(actions/present-choices entities {:choices ["What if I don't like any of these choices?"
{:run #(do (actions/respond entities %
:fairy-godfather "Tough luck"))
:choices actions/previous-choices}
"Look out!"
{:run #(do (actions/respond entities %
:fairy-godfather "What is it?"
:ego "Err... Um..."
:ego "I saw a, um..."))
:choices ["... a dragon!"
{:run #(do (actions/respond entities %
: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] ))}] }
"Nevermind."
{:run #(actions/respond entities % :fairy-godfather "Don't worry, Tick.")}]})))))}
(talk-to-fairy entities)))
:scripts {:shovel (actions/get-script entities
(describe-shovel entities)
(actions/play-animation entities :ego :sigh))
:broom (actions/get-script entities
(describe-broom entities)
(actions/play-animation entities :ego :sigh))})}
:collision "dream/collision.png"
:scale-fn (utils/scaler-fn-from-image "dream/scale.png" 0.1 1.3)
:apply-state (fn [entities]