improving the story a bit.

This commit is contained in:
2015-01-01 11:04:17 -08:00
parent 1ee46df3f1
commit 9d3772b976
9 changed files with 97 additions and 124 deletions

View File

@@ -16,11 +16,10 @@
(defn walk-to-frankie [entities]
(actions/walk-to entities :ego [268 61] :face :left))
(defn payed-toll? [entities]
(not (actions/has-one-of? entities [:used-earplugs :glass-eye :motivational-tapes])))
(defn present-frankie-choices [entities]
(actions/present-choices entities {:choices ["Please, Frankie. Let me through!"
(actions/present-choices entities {:choices ["Please, Frankie. Give me my stuff back!"
{:run #(do (actions/respond entities %
:frankie "Not a chance, Faceplant."
:frankie "Burglers like us gotta eat too, you know."
@@ -31,12 +30,7 @@
:frankie "Ain't that right boys?")
(actions/play-animation entities :frankie :glance))
:choices actions/previous-choices}
"Toll?"
{:run #(actions/respond entities %
:frankie "That's right."
:frankie "Hand over all of your valuables. Gold coins, precious gems, etc."
:frankie "We've got mouths to feed.")
:choices actions/previous-choices}
"You guys are nothing but a bunch of crooks!"
{:run #(do (actions/respond entities %
:frankie "Oh please, Faceplant."
@@ -44,98 +38,22 @@
:frankie "Am I right boys?")
(actions/play-animation entities :frankie :glance)
(actions/do-dialogue entities
:frankie "We steal gold and diamonds."
:frankie "We steal gold, diamonds, and relic slingshots."
:frankie "And you steal teddy bears.")
(actions/play-animation entities :frankie :laugh))
:choices actions/previous-choices}
"Where is your secret stash?"
{:run #(do (actions/respond entities % :frankie "Like I'd ever tell you, Faceplant.")
(actions/play-animation entities :frankie :laugh)
(actions/do-dialogue entities :frankie "That's only for people in the 'Super secret cool club'!"))
:choices actions/previous-choices}
"Nevermind."
{:run #(actions/respond entities % :frankie "Come back when you've got some good valuables.")}]}))
(defn give-item-to-frankie [item]
(condp = item
:trophy (actions/get-script entities
(walk-to-frankie entities)
(if (payed-toll? entities)
(actions/talk entities :frankie "Faceplant, I can't thank you enough.")
(actions/do-dialogue entities :ego "How about this gold trophy, Frankie? Will you let me through?"
:frankie "That's not gold!"
:frankie "Ha ha ha!"
:frankie "That's made out of brass dummy.")))
:medal (actions/get-script entities
(walk-to-frankie entities)
(if (payed-toll? entities)
(actions/talk entities :frankie "Faceplant, I can't thank you enough.")
(actions/do-dialogue entities :ego "How about this gold medal, Frankie?"
:frankie "Faceplant. Your stupidity knows no limits."
:frankie "That's a plastic medal.")))
:glass-eye (actions/get-script entities
(walk-to-frankie entities)
(actions/do-dialogue entities
:ego "How about this glass eye Frankie?"
:ego "It's the choicest of glass eyes."
:frankie "Let me see that!")
(actions/remove-item entities :glass-eye)
(actions/do-dialogue entities
:frankie "It IS the choicest of glass eyes!"
:frankie "It's the choicest glass eye I've ever seen!"
:frankie "It must be made of the choicest glass, from across the sea!"
:frankie "Wow! Faceplant this is great!"
:frankie "I could fetch some real good dough for this."
:frankie "What would you say boys?")
(actions/play-animation entities :frankie :glance)
(actions/do-dialogue entities
:frankie "95 sheckles?"
:frankie "Faceplant, you are too kind. This is too generous."
:frankie "We can't send you out empty handed."
:frankie "Here, take this small cut.")
(actions/give entities :money))
:used-earplugs (actions/get-script entities
(actions/walk-to entities :ego [268 61])
(actions/do-dialogue entities :ego "How about these choice used earplugs, Frankie?"
:frankie "Let me see them!")
(actions/remove-item entities :used-earplugs)
(actions/do-dialogue entities
:frankie "Wow! They ARE the choicest of earplugs!"
:frankie "Faceplant this is great!"
:frankie "I could fetch some real good dough for them."
:frankie "What would you say boys? ")
(actions/play-animation entities :frankie :glance)
(actions/do-dialogue entities
:frankie "10 sheckels?"
:frankie "Faceplant, you are too kind. This is too generous."
:frankie "We can't send you out empty handed."
:frankie "Here, take this small cut.")
(actions/give entities :money))
:motivational-tapes (actions/get-script entities
(walk-to-frankie entities)
(actions/do-dialogue entities :ego "How about these choice motivational tapes, Frankie?"
:frankie "Let me see them!")
(actions/remove-item entities :motivational-tapes)
(actions/do-dialogue entities
:frankie "Wow! They ARE the choicest of motivational-tapes!"
:frankie "Faceplant this is great!"
:frankie "I could be motivated to turn away from this life of crime!" :frankie "Or, I could fetch some real good dough for them."
)
(actions/play-animation entities :frankie :laugh)
(actions/do-dialogue entities :frankie "What would you say boys? ")
(actions/play-animation entities :frankie :glance)
(actions/do-dialogue entities
:frankie "3 easy payments of 29.99 sheckels?"
:frankie "Faceplant, you are too kind. This is too generous."
:frankie "We can't send you out empty handed."
:frankie "Here, take this small cut.")
(actions/give entities :money))
(actions/get-script entities
(walk-to-frankie entities)
(if (payed-toll? entities)
(actions/talk entities :frankie "Faceplant, I can't thank you enough.")
(do
(actions/do-dialogue entities :ego "How about this Frankie?"
:frankie "Ha! Don't make me laugh."
:frankie "Right boys?")
(actions/play-animation entities :frankie :glance))))))
(defn make-frankie [screen]
(let [stand (utils/make-anim "castle-gate/frankie.png" [48 35] 0.19 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
@@ -155,11 +73,8 @@
:glance glance
:script (actions/get-script entities
(walk-to-frankie entities)
(if (payed-toll? entities)
(actions/talk entities :frankie "Faceplant, I can't thank you enough.")
(do (actions/talk entities :ego "Listen, Frankie...")
(present-frankie-choices entities))))
:scripts give-item-to-frankie)))
(actions/talk entities :ego "Listen, Frankie...")
(present-frankie-choices entities)))))
(defn make-goon-1 [screen]
(let [stand (utils/make-anim "castle-gate/goon-1.png" [12 33] 0.21 [0 0 0 0 0 0 0 0 0 1])]
@@ -181,20 +96,7 @@
:anim-start 0
:stand stand)))
(defn attempt-walking-through-gate [entities]
(if (payed-toll? entities)
(do
(actions/walk-straight-to entities :ego [157 83])
(actions/transition-background entities :inside-castle [280 145])
(actions/walk-to entities :ego [245 90]))
(do
(actions/walk-straight-to entities :ego [220 55])
(actions/do-dialogue entities :frankie "Not so fast."
:frankie "Not without paying the toll.")
(actions/play-animation entities :frankie :laugh)
(actions/talk entities :frankie "Right boys?")
(actions/play-animation entities :frankie :glance)
(actions/walk-straight-to entities :ego [250 50]))))