trying to make antique dialogue funnier.

This commit is contained in:
Bryce Covert
2015-08-19 07:33:49 -07:00
parent 5b4ebb26e4
commit 746b1130c4
2 changed files with 98 additions and 73 deletions

View File

@@ -12,33 +12,63 @@
(defn do-antique-dialogue [entities] (defn do-antique-dialogue [entities]
(actions/do-dialogue entities (actions/do-dialogue entities
:shopkeep "Welcome to my antique shop!" :shopkeep "Oh, hello there."
:shopkeep "Can I help you?") :shopkeep "Can I help you?")
(actions/present-choices entities (let [son-choices ["How long has he been gone?"
{:choices ["What do you have for sale here?" {:run #(do (actions/respond entities %
{:run #(actions/respond entities % :shopkeep "5..."
:shopkeep "For sale?" :shopkeep "... maybe 6 years."
:shopkeep "This is a very UNIQUE antique shop." :ego "6 YEARS?!"
:shopkeep "Nothing's for sale, sonny." :shopkeep "There must have been some delay."
:shopkeep "It's more like a museum." :shopkeep "He should be back any minute."
:shopkeep "You can take look around at some of my items, but nothing is for sale.") :ego "... Are you sure he's coming back?"
:choices ["How do you make money then?" :shopkeep "Of course he is!")
{:run #(actions/respond entities % (actions/play-animation entities :shopkeep :sigh)
:shopkeep "Mostly insurance claims." (actions/do-dialogue entities :shopkeep "Until then, I just have this grandfather clock to keep me company."))
:shopkeep "When you run such an impressive shop as I do, items sometimes just go missing.")
:choices actions/previous-choices} :choices actions/previous-choices}
"Is there anything here you will sell?" "So you're just waiting in the dark?"
{:run #(actions/respond entities % {:run #(do (actions/respond entities %
:shopkeep "No." :shopkeep "Somebody's got to guard all of this stuff."
:shopkeep "But I do have some free magical lava mints that Gandarf brewed up." :shopkeep "Plus my son will be back any minute now with those candles.")
:shopkeep "Careful! They're spicy.") (actions/play-animation entities :shopkeep :sigh))
:choices actions/previous-choices}
"So in order to continue on my quest, I'll need to solve some puzzle here?"
{:run #(actions/respond entities %
:shopkeep "I have no idea what you're talking about, sonny.")
:choices actions/previous-choices} :choices actions/previous-choices}
"Something else." "Something else."
{:choices actions/something-else}]]
(actions/present-choices entities
{:choices ["I can barely see anything!"
{:run #(actions/respond entities %
:shopkeep "Sorry about that, sonny."
:shopkeep "My son will be back any minute with some candles.")
:choices son-choices}
"What do you have for sale here?"
{:run #(actions/respond entities %
:shopkeep "We're not open for business right now."
:shopkeep "Can't you see the lights are out?"
:shopkeep "We'll be open again when my son comes back with some candles.")
:choices ["Why don't you just open the curtains?"
{:run #(actions/respond entities %
:shopkeep "That window doesn't let much light in anyhow."
:shopkeep "Plus, my son should be back any minute now.")
:choices son-choices}
"Is there anything here you will sell?"
{:run #(actions/respond entities %
:shopkeep "No, not until my son returns.")
:choices #(-> % zip/left)}
"If I get some light in here, will you open up shop?"
{:run #(actions/respond entities %
:shopkeep "No."
:shopkeep "I need my son to help around the shop anyways."
:shopkeep "And there's a lot to fix up before we're ready to open shop again.")
:choices #(-> % zip/left zip/left)}
"Something else."
{:choices actions/something-else}]} {:choices actions/something-else}]}
"Are those lava mints on the desk?"
{:run #(actions/respond entities %
:shopkeep "They're the finest lava mints in all of Remington."
:shopkeep "Hand-brewed and delivered by none other than Gandarf himself!"
:shopkeep "They're free for customers."
:shopkeep "We're not open for business, but I'll let you have one.")
:choices actions/previous-choices}
(when (and (get-in @entities [:state :wants-toy]) (when (and (get-in @entities [:state :wants-toy])
(not (get-in @entities [:state :allowed-to-keep-teddy?]))) (not (get-in @entities [:state :allowed-to-keep-teddy?])))
"Listen, I really need that teddy bear you have.") "Listen, I really need that teddy bear you have.")
@@ -76,15 +106,8 @@
:shopkeep "Of course you can keep the teddy bear.") :shopkeep "Of course you can keep the teddy bear.")
(actions/update-state entities (fn [s] (assoc s :allowed-to-keep-teddy? true))))}]}]} (actions/update-state entities (fn [s] (assoc s :allowed-to-keep-teddy? true))))}]}]}
"How's life in the antique shop biz?"
{:run #(do (actions/respond entities % "Nevermind." {:run #(actions/respond entities % :shopkeep "Feel free to look around.")}]})))
:shopkeep "Pretty lonely."
:shopkeep "My long lost son used to help me run this shop, but he's been gone for five years now."
:shopkeep "I've been couped up in here by myself ever since.")
(actions/play-animation entities :shopkeep :sigh)
(actions/do-dialogue entities :shopkeep "Now all I have is this grandfather clock to keep me company."))
:choices actions/previous-choices}
"Nevermind." {:run #(actions/respond entities % :shopkeep "Feel free to look around.")}]}))
(defn return-portrait [ entities] (defn return-portrait [ entities]
(actions/walk-to entities :ego [143 64] :face :left) (actions/walk-to entities :ego [143 64] :face :left)

View File

@@ -388,7 +388,9 @@
:shopkeep "Have you seen Herb lately?" :shopkeep "Have you seen Herb lately?"
:ego "Erm... No, not recently." :ego "Erm... No, not recently."
:shopkeep "Oh. Send him my love if you do see him.") :shopkeep "Oh. Send him my love if you do see him.")
(actions/talk entities :shopkeep "Hello there, sonny.")))))} (actions/do-dialogue entities :shopkeep "... Son?"
:shopkeep "Oh, you're not him."
:shopkeep "Welcome to Ye Olde Antique Shop.")))))}
:sword {:box [15 93 49 125] :sword {:box [15 93 49 125]
:script (actions/get-script entities :script (actions/get-script entities
(if (actions/has-item? entities :sword) (if (actions/has-item? entities :sword)