prepping for descriptions.

This commit is contained in:
Bryce Covert
2015-08-14 12:59:16 -07:00
parent de6874f27d
commit 7b6e58cddf
2 changed files with 84 additions and 45 deletions

View File

@@ -3,7 +3,6 @@
+ blergh taunts
+ ending
+ proper save/settings file location
+ closing should stop all scripts
+ descriptions for all items when used on self.
+ alternate solutions to puzzle in jail (strength potion etc)
+ Opening should include dialogue tree

View File

@@ -306,6 +306,89 @@ void main()
:ego "Even with that potion, I'm not strong enough."))}]}))
(defn get-ego-script [cursor [x y]]
(condp = (:value cursor)
:flask-1-with-cream-of-mushroom
(actions/get-script entities (actions/talk entities :ego "Blegh! Gross!"))
:flask-1-strength
(actions/get-script entities
(cond (and (actions/has-item? entities :magic-slingshot)
(get-in @entities [:room :blergh]))
(drink-blergh entities)
(get-in @entities [:room :entities :warden])
(do
(actions/talk entities :ego "I'll just take a sip!")
(sound! (sound "ego/potion.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :grow :stop? false)
(actions/talk entities :warden "Huh? What was that?!")
(Thread/sleep 1000)
(actions/talk entities :warden "Hey, get back in jail!")
(common/go-to-jail entities))
(get-in @entities [:room :blergh])
(actions/talk entities :ego "There's no time!")
:else
(do
(actions/talk entities :ego "I'll just take a sip!")
(sound! (sound "ego/potion.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :grow :stop? false))))
:recipe
(actions/get-script entities
(actions/do-dialogue entities
:ego "The recipe says:"
:ego "'For strength beyond measure,\nyou must mix, at your leisure:'"
:ego "'1. Cream of mushroom soup.'"
:ego "'2. Saliva of the creature whose strength you want to match.'"
:ego "'3. Mandrake root.'"
:ego "'A word of warning, before you go.\nA sip is all it takes to grow.'"
:ego "'Not more than that do drink,\nOr you'll push your body to the brink.'"
:ego "Hmm. I wonder what that last part means?"))
:portrait
(actions/get-script entities
(actions/do-dialogue entities
:ego "It's a portrait of a young man."
:ego "It has something written on it, but it's very dim."))
:note-1
(actions/get-script entities (common/read-note-1 entities))
:note-2
(actions/get-script entities (common/read-note-2 entities))
:camera
(actions/get-script entities
(actions/talk entities :ego "It's some sort of magical device that captures images."))
:alarm-clock
(actions/get-script entities
(actions/talk entities :ego "It's a magic device that tells the time."))
:walkie-talkies
(actions/get-script entities
(actions/do-dialogue entities :ego "If I talk in one of these devices, I can hear it in the other one!"))
:mushrooms
(actions/get-script entities
(actions/do-dialogue entities
:ego "I don't really care for mushrooms."
:ego "... but I'll give it a shot.")
(actions/play-animation entities :ego :get-sick)
(actions/do-dialogue entities :ego "Yuck!"))
:stick
(actions/get-script entities
(actions/do-dialogue entities :ego "It's a huge stick."))
:wool
(actions/get-script entities
(actions/do-dialogue entities :ego "Better not wash it in hot water."))
nil))
(defn get-ego [screen start-pos start-scale]
(let [player-sheet (texture! (texture "player.png") :split 18 36)
talk-sheet (texture! (texture "ego/talk.png") :split 18 36)
@@ -510,50 +593,7 @@ void main()
["entity " (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)]])
((zone/box (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)) x y)))
:get-script (fn [cursor [x y]]
(condp = (:value cursor)
:flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "Blegh! Gross!"))
:flask-1-strength (actions/get-script entities
(cond (and (actions/has-item? entities :magic-slingshot)
(get-in @entities [:room :blergh]))
(drink-blergh entities)
(get-in @entities [:room :entities :warden])
(do
(actions/talk entities :ego "I'll just take a sip!")
(sound! (sound "ego/potion.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :grow :stop? false)
(actions/talk entities :warden "Huh? What was that?!")
(Thread/sleep 1000)
(actions/talk entities :warden "Hey, get back in jail!")
(common/go-to-jail entities))
(get-in @entities [:room :blergh])
(actions/talk entities :ego "There's no time!")
:else
(do
(actions/talk entities :ego "I'll just take a sip!")
(sound! (sound "ego/potion.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :grow :stop? false))))
:recipe (actions/get-script entities (actions/do-dialogue entities
:ego "The recipe says:"
:ego "'For strength beyond measure,\nyou must mix, at your leisure:'"
:ego "'1. Cream of mushroom soup.'"
:ego "'2. Saliva of the creature whose strength you want to match.'"
:ego "'3. Mandrake root.'"
:ego "'A word of warning, before you go.\nA sip is all it takes to grow.'"
:ego "'Not more than that do drink,\nOr you'll push your body to the brink.'"
:ego "Hmm. I wonder what that last part means?"))
:portrait (actions/get-script entities (actions/do-dialogue entities
:ego "It's a portrait of a young man."
:ego "It has something written on it, but it's very dim."))
:note-1 (actions/get-script entities (common/read-note-1 entities))
:note-2 (actions/get-script entities (common/read-note-2 entities))
:camera (actions/get-script entities (actions/talk entities :ego "It's some sort of magical device that captures images."))
:alarm-clock (actions/get-script entities (actions/talk entities :ego "It's a magic device that tells the time."))
:walkie-talkies (actions/get-script entities (actions/do-dialogue entities :ego "If I talk in one of these devices, I can hear it in the other one!"))
nil))
:get-script get-ego-script
:x (first start-pos) :y (last start-pos)
:id "ego"}