From b89b92e85fbd429e5786f2d6e9c58a9b7e52eb21 Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Sat, 13 Dec 2014 12:37:23 -0800 Subject: [PATCH] Added grandma talk. --- .../advent/screens/rooms/cat_tree.clj | 68 ++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/cat_tree.clj b/desktop/src-common/advent/screens/rooms/cat_tree.clj index 2c344a71..b5a386e7 100644 --- a/desktop/src-common/advent/screens/rooms/cat_tree.clj +++ b/desktop/src-common/advent/screens/rooms/cat_tree.clj @@ -16,6 +16,67 @@ (actions/remove-entity entities :ladder) (actions/give entities :ladder)) +(defn do-grandma-dialogue [entities] + (actions/walk-straight-to entities :ego [165 45] :face :left) + (actions/do-dialogue entities + :grandma "Oh, good, a strapping young lad!" + :grandma "Are you here to help this damsel in distress?") + (actions/present-choices entities {:choices + ["Damsel in distress?" + {:run #(actions/respond entities % + :grandma "Yes! I'm a damsel, and I'm in distress!" + :ego "Don't you have to be young to be a damsel?" + :grandma "I'm 113 years young! I'm practically a baby!") + :choices ["What's your distress?" + {:run #(actions/respond entities % + :grandma "It's my Smuffle Wuffles!" + :grandma "We were on a pleasant walk through the woods." + :grandma "Then we got in argument, and so he ran up into that tree!" + :ego "An argument? With a cat?" + :grandma "Yes of course! We were arguing about politics!") + :choices ["So you want me to get your cat down?" + {:run #(actions/respond entities % + :grandma "Yes! I need a courageous hero to rescue Smuffle Wuffles for me." + :grandma "And this damsel in distress will reward you handsomely for your bravery.") + :choices actions/previous-choices} + "Cat's can't talk. How could he argue about politics?" + {:run #(actions/respond entities % + :grandma "Smuffle Wuffles is not your ordinary cat." + :grandma "He's got an exceptionally high intellect for a cat." + :ego "So other people can hear him?" + :grandma "Well, not exactly." + :grandma "No one else gives him the time of day, so he only speaks when we're alone." + :ego "Why would such an intelligent cat be named Smuffle Wuffles?" + :grandma "You'd have to take that up with his parents, Mr. and Mrs. Cuddly Wuddly.") + :choices actions/previous-choices} + "Something else." + {:choices actions/something-else}]} + "113 years old isn't young, lady." + {:run #(actions/respond entities % + :grandma "Oh sure it is!" + :grandma "I do the same things every young damsel does." + :grandma "Sit in my rocking chair, knit, take photos of the grandkids..." + :ego "... Right.") + :choices actions/previous-choices} + "Something else." + {:choices actions/something-else}]} + "What are you doing way out here?" + {:run #(actions/respond entities % + :grandma "Me and my cat, Smuffle Wuffles were on a nice, leisurely stroll." + :grandma "Then he ran up that tree!" + :grandma "So I've been camped out here for the last two days.") + :choices actions/previous-choices} + "Do you know how I can pull the Sword of Blergh, and become a knight?" + {:run #(actions/respond entities % + :grandma "Young man, I was here when that sword was put in the stone 100 years ago!" + :grandma "Of course I know how it can be pulled!" + :grandma "One must prove themselves worthy in wisdom, courage, and might." + :grandma "How about proving your courage by helping rescue Smuffle Wuffles?") + :choices actions/previous-choices} + "Later." + {:run #(actions/respond entities % + :grandma "Please come back soon and help me rescue Smuffle Wuffles!")}]})) + (defn make [screen] (let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10) cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])] @@ -35,7 +96,7 @@ (actions/transition-background entities :outside-house [137 204]) (actions/walk-to entities :ego [195 140])) :cursor :down} - :ladder-area {:box [46 40 265 190] + :ladder-area {:box [134 40 265 190] :scripts {:ladder (actions/get-unsaved-script entities (actions/talk entities :ego "I'll just set this up.") (actions/walk-to entities :ego [151 50] :face :left) @@ -57,7 +118,10 @@ (actions/walk-to entities :ego [60 100] :face :left) (actions/play-animation entities :ego :reach) (actions/give entities :grass)) - (actions/talk entities :ego "I don't really need any more grass.")))}} + (actions/talk entities :ego "I don't really need any more grass.")))} + :grandma {:box [109 33 132 98] + :script (actions/get-script entities (do-grandma-dialogue entities)) +}} :layers [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0) (assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161) (assoc (texture "cat-tree/sillhoute.png") :x 0 :y 0 :baseline 240)]