From 967bc8f6a5361573cdfd872c74b7812cf518f87a Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Fri, 4 Sep 2015 20:33:18 -0700 Subject: [PATCH] reworked the stash discovery puzzle. much better. --- desktop/ready-for-magic-slingshot.edn | 2 +- .../advent/screens/rooms/castle_gate.clj | 15 +- .../advent/screens/rooms/common.clj | 172 +++++++++++------- .../advent/screens/rooms/outside_castle.clj | 1 + desktop/started-night.edn | 2 +- 5 files changed, 123 insertions(+), 69 deletions(-) diff --git a/desktop/ready-for-magic-slingshot.edn b/desktop/ready-for-magic-slingshot.edn index 0964a8b1..8a119205 100644 --- a/desktop/ready-for-magic-slingshot.edn +++ b/desktop/ready-for-magic-slingshot.edn @@ -1 +1 @@ -{:active? true, :seen-intro? true, :seen-frankie? true, :knows-about-stash? true, :convinced-wizard? true, :time :night, :broke-lock? true, :opened-bars? true, :inventory (:slingshot :trophy :medal :flask-1-strength :walkie-talkie :note-2 :spear :camera :note-1 :key :crowbar :ladder :grass :kiss :sword), :wizard-left? false, :dropped-ball? true, :hay-searches 4, :clues #{}, :stop? false, :warden-sleeping? true, :current-riddle :wool, :warden-fast-asleep? true, :last-room :outside-castle, :wants-toy true, :bent-bars? true, :chest-contents [], :mints-eaten 0, :object nil, :talked-to-owl? true, :obtained-items #{:money :flask-2 :key :slingshot :flies :rope :kiss :spear :medal :sword :magic-slingshot :flask-flies-ash :flask-1 :flask-1-strength :flask-water-flies :walkie-talkies :ash :grass :camera :sack-lunch :ladder :walkie-talkie :trophy :broken-clock :monocle :alarm-clock :crowbar :note-1 :flask-water :note-2 :ball-n-chain :feather :spell-component}} +{:has-dropped-coin? true :active? true, :seen-intro? true, :seen-frankie? true, :knows-about-stash? true, :convinced-wizard? true, :time :night, :broke-lock? true, :opened-bars? true, :inventory (:slingshot :trophy :medal :flask-1-strength :walkie-talkie :note-2 :spear :camera :note-1 :key :crowbar :ladder :grass :kiss :sword), :wizard-left? false, :dropped-ball? true, :hay-searches 4, :clues #{}, :stop? false, :warden-sleeping? true, :current-riddle :wool, :warden-fast-asleep? true, :last-room :outside-castle, :wants-toy true, :bent-bars? true, :chest-contents [], :mints-eaten 0, :object nil, :talked-to-owl? true, :obtained-items #{:money :flask-2 :key :slingshot :flies :rope :kiss :spear :medal :sword :magic-slingshot :flask-flies-ash :flask-1 :flask-1-strength :flask-water-flies :walkie-talkies :ash :grass :camera :sack-lunch :ladder :walkie-talkie :trophy :broken-clock :monocle :alarm-clock :crowbar :note-1 :flask-water :note-2 :ball-n-chain :feather :spell-component}} diff --git a/desktop/src-common/advent/screens/rooms/castle_gate.clj b/desktop/src-common/advent/screens/rooms/castle_gate.clj index bed96f3a..e9434d8f 100644 --- a/desktop/src-common/advent/screens/rooms/castle_gate.clj +++ b/desktop/src-common/advent/screens/rooms/castle_gate.clj @@ -67,6 +67,18 @@ (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} + + (when-not (get-in @entities [:state :bubba-gone?]) + "I found your secret stash!") + {:run #(do (actions/respond entities % + :frankie "What?!" + :frankie "Impossible!") + (actions/play-animation entities :frankie :laugh) + (actions/do-dialogue entities :frankie "Bubba, go check to make sure our stuff is safe." + :goon-2 "You got it boss.") + (actions/walk-straight-to entities :goon-2 [0 100]) + (actions/update-state entities (fn [s] (assoc s :bubba-gone? true))))} + "Nevermind." {:run #(actions/respond entities % :frankie "Come back when you've got some good valuables.")}]})) @@ -203,8 +215,7 @@ (defn attempt-walking-through-gate [entities] (actions/walk-to entities :ego [157 83] :skip-type :end) - (actions/transition-background entities :inside-castle [280 145]) - (actions/update-state entities #(assoc % :bubba-gone? false)) + (actions/transition-background entities :inside-castle [280 145]) (actions/walk-to entities :ego [245 90] :skip-type :end)) (defn flip-coin [screen entities] diff --git a/desktop/src-common/advent/screens/rooms/common.clj b/desktop/src-common/advent/screens/rooms/common.clj index 3ecf6dc9..7d581ea6 100644 --- a/desktop/src-common/advent/screens/rooms/common.clj +++ b/desktop/src-common/advent/screens/rooms/common.clj @@ -87,23 +87,6 @@ :ego "'Then, dip the Slinger's Shot in to complete the spell.'" :ego "'Don't forget about my secret stash of helpful stuff.'")) - -(defn listen-1 [entities] - (actions/talk entities :ego "Did you see the look on Tick's face when we took his stuff?" :animate? false :stop? false) - (actions/talk entities :ego "It looked like he was about to pee his pants." :animate? false :stop? false) - (actions/talk entities :ego "Am I right boys?" :animate? false :stop? false)) - -(defn listen-2 [entities] - (actions/talk entities :ego "Hey Bubba, did you put our spoils in our secret stash yet?" :animate? false :stop? false) - (actions/talk entities :ego "You don't remember where it's at?" :animate? false :stop? false) - (actions/talk entities :ego "It's right outside the jail." :animate? false :stop? false) - (actions/talk entities :ego "You just have to pull the secret lever." :animate? false :stop? false) - (actions/update-state entities #(assoc % :knows-about-stash? true :stop? false))) - -(defn listen-3 [entities] - (actions/talk entities :ego "We're going to be rich after we fence this stuff we've stolen." :animate? false :stop? false) - (actions/talk entities :ego "Am I right boys?" :animate? false :stop? false)) - (defn listen-to-frankie [entities] (let [respond (fn [msg] (actions/talk entities :ego msg :animate? false :stop? false :color (color 0.6 0.2 0.6 1.0)) @@ -117,60 +100,119 @@ {:choices ["It's me, Tick!" {:run #(do (talk %) - (respond "I don't know where you are, Tick, but leave us alone!"))} + (respond "Dipstick! Leave us in peace!"))} "It's me, Bubba!" - {:run #(do - (talk %) - (respond "Bubba!?") - (respond "What happened to your voice?")) - :choices ["(Higher pitch) I think I'm getting a cold." - {:run (fn [m] - (talk "I think I'm getting a cold.") - (respond "Wait a second...") - (respond "You're not Bubba!") - (respond "Bubba has a deep voice!"))} - "(Same pitch) I think I'm getting a cold." - {:run (fn [m] - (talk "I think I'm getting a cold.") - (respond "Wait a second...") - (respond "I recognize that voice!") - (respond "I don't know where you are, Dipstick, but quit fooling around!"))} - "(Lower pitch) I think I'm getting a cold." - {:run (fn [m] - (talk "I think I'm getting a cold.") - (respond "Sorry to hear that, Bubba.") - (respond "Whaddaya want?")) - :choices ["Where is our tree fort again?" - {:run (fn [m] - (talk m) - (respond "We don't have a tree fort, Bubba!") - (respond "You must be going crazy.") - (respond "Wait a second...") - (respond "You're not Bubba!") - (respond "I don't know who you are, mister, but quit fooling around!"))} - "Where is the secret stash again?" - {:run (fn [m] - (talk m) - (respond "We don't have a tree fort, Bubba!") - (respond "You must be going crazy.") - (respond "Wait a second...") - (respond "You're not Bubba!") - (respond "I don't know who you are, mister, but quit fooling around!"))} - "Maybe we should give Tick his stuff back." - {:run (fn [m] - (talk m) - (respond "Are you crazy!?") - (respond "We hit the jackpot, and you want to return it?!") - (respond "Wait a second...") - (respond "You're not Bubba!") - (respond "I don't know who you are, mister, but quit fooling around!"))}]}] - } + (if (get-in @entities [:state :bubba-gone?]) + {:run #(do + (talk %) + (respond "Bubba!?") + (respond "What happened to your voice?")) + :choices ["(Higher pitch) I think I'm getting a cold." + {:run (fn [m] + (talk "I think I'm getting a cold.") + (respond "Wait a second...") + (respond "You're not Bubba!") + (respond "Bubba has a deep voice!") + (respond "Imposter!") + (respond "Leave us alone."))} + "(Same pitch) I think I'm getting a cold." + {:run (fn [m] + (talk "I think I'm getting a cold.") + (respond "Wait a second...") + (respond "I recognize that voice!") + (respond "I don't know what you're up trying to pull, Dipstick.") + (respond "Leave us alone."))} + "(Lower pitch) I think I'm getting a cold." + {:run (fn [m] + (talk "I think I'm getting a cold.") + (respond "Sorry to hear that, Bubba.") + (respond "Whaddaya want?")) + :choices ["Where is our tree fort again?" + {:run (fn [m] + (talk m) + (respond "We don't have a tree fort, Bubba!") + (respond "You must be going crazy.") + (respond "Wait a second...") + (respond "You're not Bubba!") + (respond "I don't know who you are, mister, but quit fooling around!"))} + "Where is the secret stash again?" + {:run (fn [m] + (talk m) + (respond "Bubba, we've talked about this.") + (respond "Our club charter, Chapter 17, Section 23 cleary states...") + (respond "... that we are not to discuss stash locations unless in person!")) + :choices ["Can't you make an exception?" + {:run (fn [m] + (talk m) + (respond "No! Just come back to the gate and I'll tell you in person.")) + :choices actions/previous-choices} + "But what about Chapter 24, section 9?" + {:run (fn [m] + (talk m) + (respond "Let's see, Chapter 24...") + (respond "Ahh, yes, here it is.") + (respond "'There is to be no robbery of the elderly...'") + (respond "Bubba, Chapter 24 doesn't say anything about our stash!")) + :choices actions/previous-choices} + + "But what about Chapter 19A, section 3?" + {:run (fn [m] + (talk m) + (respond "Let's see, Chapter 19A...") + (respond "Ahh yes, here it is.") + (respond "'If visual confirmation cannot be made...'") + (respond "'The 'The super cool secret club' member can validate his allegiance... ") + (respond "'By giving a nice complement to the gang leader.'") + (respond "... Well?")) + :choices ["Umm, you've got a killer smile." + {:run (fn [m] + (talk m) + (respond "Thanks! I agree.") + (respond "The stash is by the jail.") + (respond "You just have to pull the secret lever.") + (actions/update-state entities #(assoc % :knows-about-stash? true :stop? false)))} + "Err, your biceps are two in a million." + {:run (fn [m] + (talk m) + (respond "Thanks! I agree.") + (respond "The stash is by the jail.") + (respond "You just have to pull the secret lever.") + (actions/update-state entities #(assoc % :knows-about-stash? true :stop? false)))} + "Ahh, Your charisma really holds the gang together." + {:run (fn [m] + (talk m) + (respond "Thanks! I agree.") + (respond "The stash is by the jail.") + (respond "You just have to pull the secret lever.") + (actions/update-state entities #(assoc % :knows-about-stash? true :stop? false)))}]} + + "But what about Chapter 47, section 12?" + {:run (fn [m] + (talk m) + (respond "Let's see, Chapter 47...") + (respond "Wait, there is no chapter 47.") + (talk "... righto. I must have been mistaken.")) + :choices actions/previous-choices}]} + "Maybe we should give Tick his stuff back." + {:run (fn [m] + (talk m) + (respond "Are you crazy!?") + (respond "We hit the jackpot, and you want to return it?!") + (respond "Wait a second...") + (respond "You're not Bubba!") + (respond "I don't know who you are, mister, but quit fooling around!"))}]}] + } + {:run #(do (talk %) + (respond "Bubba's standing right next to me!") + (respond "You're an imposter!") + (respond "Leave us alone."))}) "It's me, Frankie!" {:run #(do (talk %) (respond "Frankie?") (respond "But, I'm Frankie!") - (respond "Are you my doppleganger?"))}]})) + (respond "Imposter!") + (respond "Leave us alone!"))}]})) ) diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 67e6c9fc..6345a0f9 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -172,6 +172,7 @@ (actions/do-dialogue entities :frankie "3 easy payments of 29.99 sheckles?")))) (defn block-entrance [entities] + (actions/update-state entities #(assoc % :bubba-gone? false)) (actions/transition-background entities :castle-gate [340 40]) (actions/walk-straight-to entities :ego [300 45]) (if (get-in @entities [:state :seen-frankie?]) diff --git a/desktop/started-night.edn b/desktop/started-night.edn index 6a513479..d2109a69 100644 --- a/desktop/started-night.edn +++ b/desktop/started-night.edn @@ -1 +1 @@ -{:active? true, :coaxed-sheep? true, :seen-bloodclot? true, :plaques-read #{:shovel}, :convinced-wizard? true, :time :night, :opened-bars? true, :inventory (:note-1 :key :rope :crowbar :sword :recipe :kiss :ladder :cat-toy), :seen-intro? true, :wizard-left? false, :dropped-ball? true, :hay-searches 1, :clues #{:name}, :hud-active? false, :allowed-to-keep-teddy? true, :warden-sleeping? true, :current-riddle :done, :warden-fast-asleep? true, :last-room :outside-jail, :wants-toy true, :bent-bars? true, :chest-contents [], :mints-eaten 0, :object nil, :obtained-items #{:balloon :flask-1-with-cream-of-mushroom :key :slingshot :teddy :recipe :mushrooms :rope :flask-1-with-milk :kiss :wool :portrait :slobber :medal :sword :frog-legs :flask-1 :flask-1-strength :dream-sword :mandrake :shovel :cat-toy :grass :stick :motivational-tapes :ladder :carrot :trophy :crowbar :note-1 :flask-1-slobber :ball-n-chain}} +{:active? true, :coaxed-sheep? true, :seen-bloodclot? true, :plaques-read #{:shovel}, :convinced-wizard? true, :time :night, :opened-bars? true, :inventory (:key :rope :crowbar :sword :recipe :kiss :ladder :cat-toy), :seen-intro? true, :wizard-left? false, :dropped-ball? true, :hay-searches 1, :clues #{:name}, :hud-active? false, :allowed-to-keep-teddy? true, :warden-sleeping? true, :current-riddle :done, :warden-fast-asleep? true, :last-room :outside-jail, :wants-toy true, :bent-bars? true, :chest-contents [], :mints-eaten 0, :object nil, :obtained-items #{:balloon :flask-1-with-cream-of-mushroom :key :slingshot :teddy :recipe :mushrooms :rope :flask-1-with-milk :kiss :wool :portrait :slobber :medal :sword :frog-legs :flask-1 :flask-1-strength :dream-sword :mandrake :shovel :cat-toy :grass :stick :motivational-tapes :ladder :carrot :trophy :crowbar :flask-1-slobber :ball-n-chain}}