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,79 +12,102 @@
(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} "So you're just waiting in the dark?"
"Is there anything here you will sell?" {:run #(do (actions/respond entities %
{:run #(actions/respond entities % :shopkeep "Somebody's got to guard all of this stuff."
:shopkeep "No." :shopkeep "Plus my son will be back any minute now with those candles.")
:shopkeep "But I do have some free magical lava mints that Gandarf brewed up." (actions/play-animation entities :shopkeep :sigh))
:shopkeep "Careful! They're spicy.") :choices actions/previous-choices}
:choices actions/previous-choices} "Something else."
"So in order to continue on my quest, I'll need to solve some puzzle here?" {:choices actions/something-else}]]
{:run #(actions/respond entities % (actions/present-choices entities
:shopkeep "I have no idea what you're talking about, sonny.") {:choices ["I can barely see anything!"
:choices actions/previous-choices} {:run #(actions/respond entities %
"Something else." :shopkeep "Sorry about that, sonny."
{:choices actions/something-else}]} :shopkeep "My son will be back any minute with some candles.")
(when (and (get-in @entities [:state :wants-toy]) :choices son-choices}
(not (get-in @entities [:state :allowed-to-keep-teddy?]))) "What do you have for sale here?"
"Listen, I really need that teddy bear you have.") {:run #(actions/respond entities %
{:run #(actions/respond entities % :shopkeep "We're not open for business right now."
:shopkeep "Why?" :shopkeep "Can't you see the lights are out?"
:shopkeep "It belonged to my long lost son." :shopkeep "We'll be open again when my son comes back with some candles.")
:shopkeep "Why should I give it to you?") :choices ["Why don't you just open the curtains?"
:choices ["Because it's the choicest toy I've ever seen!" {:run #(actions/respond entities %
{:run #(actions/respond entities % :shopkeep "That window doesn't let much light in anyhow."
:shopkeep "I'm sorry, it's not for sale.") :shopkeep "Plus, my son should be back any minute now.")
:choices actions/something-else} :choices son-choices}
"Your long lost son said I could have it." "Is there anything here you will sell?"
{:run #(do (actions/respond entities % {:run #(actions/respond entities %
:shopkeep "REALLY? You've met him?" :shopkeep "No, not until my son returns.")
:ego "... erm. Yes!" :choices #(-> % zip/left)}
:shopkeep "If you really met him, you'll have to prove it." "If I get some light in here, will you open up shop?"
:shopkeep "What is my son's name?")) {:run #(actions/respond entities %
:choices ["... Bud?" :shopkeep "No."
{:run #(do (actions/respond entities % :shopkeep "No. That's not it.") :shopkeep "I need my son to help around the shop anyways."
(actions/play-animation entities :shopkeep :sigh) :shopkeep "And there's a lot to fix up before we're ready to open shop again.")
(actions/do-dialogue entities :ego "Oh. I must be thinking of another long lost son."))} :choices #(-> % zip/left zip/left)}
"... Steve?" "Something else."
{:run #(do (actions/respond entities % :shopkeep "No. That's not it.") {:choices actions/something-else}]}
(actions/play-animation entities :shopkeep :sigh) "Are those lava mints on the desk?"
(actions/do-dialogue entities :ego "Oh. I must be thinking of another long lost son."))} {:run #(actions/respond entities %
"... Bob?" :shopkeep "They're the finest lava mints in all of Remington."
{:run #(do (actions/respond entities % :shopkeep "No. That's not it.") :shopkeep "Hand-brewed and delivered by none other than Gandarf himself!"
(actions/play-animation entities :shopkeep :sigh) :shopkeep "They're free for customers."
(actions/do-dialogue entities :ego "Oh. I must be thinking of another long lost son."))} :shopkeep "We're not open for business, but I'll let you have one.")
(when ((get-in @entities [:state :clues]) :name) :choices actions/previous-choices}
"Herb.") (when (and (get-in @entities [:state :wants-toy])
{:run #(do (actions/respond entities % (not (get-in @entities [:state :allowed-to-keep-teddy?])))
:shopkeep "Yes, that's it!" "Listen, I really need that teddy bear you have.")
:shopkeep "You must have really met my son!" {:run #(actions/respond entities %
:shopkeep "Of course you can keep the teddy bear.") :shopkeep "Why?"
:shopkeep "It belonged to my long lost son."
(actions/update-state entities (fn [s] (assoc s :allowed-to-keep-teddy? true))))}]}]} :shopkeep "Why should I give it to you?")
"How's life in the antique shop biz?" :choices ["Because it's the choicest toy I've ever seen!"
{:run #(do (actions/respond entities % {:run #(actions/respond entities %
:shopkeep "Pretty lonely." :shopkeep "I'm sorry, it's not for sale.")
:shopkeep "My long lost son used to help me run this shop, but he's been gone for five years now." :choices actions/something-else}
:shopkeep "I've been couped up in here by myself ever since.") "Your long lost son said I could have it."
(actions/play-animation entities :shopkeep :sigh) {:run #(do (actions/respond entities %
(actions/do-dialogue entities :shopkeep "Now all I have is this grandfather clock to keep me company.")) :shopkeep "REALLY? You've met him?"
:choices actions/previous-choices} :ego "... erm. Yes!"
"Nevermind." {:run #(actions/respond entities % :shopkeep "Feel free to look around.")}]})) :shopkeep "If you really met him, you'll have to prove it."
:shopkeep "What is my son's name?"))
:choices ["... Bud?"
{:run #(do (actions/respond entities % :shopkeep "No. That's not it.")
(actions/play-animation entities :shopkeep :sigh)
(actions/do-dialogue entities :ego "Oh. I must be thinking of another long lost son."))}
"... Steve?"
{:run #(do (actions/respond entities % :shopkeep "No. That's not it.")
(actions/play-animation entities :shopkeep :sigh)
(actions/do-dialogue entities :ego "Oh. I must be thinking of another long lost son."))}
"... Bob?"
{:run #(do (actions/respond entities % :shopkeep "No. That's not it.")
(actions/play-animation entities :shopkeep :sigh)
(actions/do-dialogue entities :ego "Oh. I must be thinking of another long lost son."))}
(when ((get-in @entities [:state :clues]) :name)
"Herb.")
{:run #(do (actions/respond entities %
:shopkeep "Yes, that's it!"
:shopkeep "You must have really met my son!"
:shopkeep "Of course you can keep the teddy bear.")
(actions/update-state entities (fn [s] (assoc s :allowed-to-keep-teddy? true))))}]}]}
"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)