From 22d80046379528b577822fc7762f805c3da41ade Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Sat, 8 Nov 2014 17:23:37 -0800 Subject: [PATCH] started puzzle. --- .../advent/screens/rooms/inside_antique.clj | 23 ++++++++++++++++--- desktop/src-common/advent/screens/scene.clj | 3 ++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/inside_antique.clj b/desktop/src-common/advent/screens/rooms/inside_antique.clj index 3f136510..7a4bccdb 100644 --- a/desktop/src-common/advent/screens/rooms/inside_antique.clj +++ b/desktop/src-common/advent/screens/rooms/inside_antique.clj @@ -50,8 +50,21 @@ :shopkeep "I'm sorry, it's not for sale.") :choices actions/something-else} "Your long lost son said I could have it." - {:run #(do (actions/respond entities % :shopkeep "REALLY? You've met him?") - (actions/give entities items/teddy))}]} + {:run #(do (actions/respond entities % + :shopkeep "REALLY? You've met him?" + :ego "... erm. Yes!" + :shopkeep "If you really met him, you'll have to prove it." + :shopkeep "What is my son's name?")) + :choices ["... Bud?" + {:run #(actions/respond entities % :shopkeep "No. *sigh* That's not it.")} + "... Steve?" + {:run #(actions/respond entities % :shopkeep "No. *sigh* That's not it.")} + "... Bob?" + {:run #(actions/respond entities % :shopkeep "No. *sigh* That's not it.")} + (when ((get-in @entities [:state :clues]) :name) + "Herb.") + {:run #(do (actions/respond entities % :shopkeep "Yes, that's it!") + (actions/give entities items/teddy))}]}]} "How's life in the antique shop biz?" {:run #(actions/respond entities % :shopkeep "Pretty lonely." @@ -74,7 +87,11 @@ :cursor :down :script (actions/get-script entities (actions/walk-to entities :ego [222 3]) - (actions/transition-background entities :inside-castle [182 90]))}} + (actions/transition-background entities :inside-castle [182 90]))} + :portrait {:box [109 120 125 140] + :script (actions/get-script entities + (actions/talk entities :ego "It's a portrait, labeled 'Herb.'") + (actions/update-state entities (fn [state] (update-in state [:clues] #(conj % :name)) )))}} :layers [(assoc (texture "inside-antique/background.png") :x 0 :y 0 :baseline 0)] :entities {:shopkeep (actions/start-animation screen (assoc (animation->texture screen shopkeep-stand) :x 137 :y 128 :baseline 112 :stand shopkeep-stand diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 36d8bed3..43dba2fd 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -182,7 +182,8 @@ :inside-fangald (make-music "inside-fangald.ogg")} :state {:object nil :active? true - :inventory []} + :inventory [] + :clues #{}} :actions {:object nil :channel (chan) :current nil