small progress.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 9.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -109,7 +109,7 @@
|
||||
:rope {:name "Rope" :value :rope :cursor :rope}
|
||||
:crowbar {:name "Crowbar" :value :crowbar :cursor :crowbar}
|
||||
:flask-2 {:name "Flask" :value :flask-2 :cursor :flask}
|
||||
:flask-water {:name "Water from fountain" :value :flask-water :cursor :flask :scripts {:ash (make-water-and-ash) :flies (make-water-and-flies)}}
|
||||
:flask-water {:name "Water from fountain" :value :flask-water :cursor :flask-water :scripts {:ash (make-water-and-ash) :flies (make-water-and-flies)}}
|
||||
:flask-water-ash {:name "Water and ashes" :value :flask-water-ash :cursor :flask-with-contents :scripts {:flies (make-flies-ash)}}
|
||||
:flask-water-flies {:name "Water and flies" :value :flask-water-flies :cursor :flask-with-contents :scripts {:ash (make-flies-ash)}}
|
||||
:flask-flies-ash {:name "Water, flies, and ash" :value :flask-flies-ash :cursor :flask-with-contents :scripts {:feather (make-finished-component)}}
|
||||
@@ -124,4 +124,9 @@
|
||||
:money {:name "Money" :value :money :cursor :money}
|
||||
:watch {:name "Watch" :value :watch :cursor :watch}
|
||||
:broken-watch {:name "Halved watch" :value :broken-watch :cursor :broken-watch}
|
||||
:slingshot {:name "The Slinger's Shot" :value :slingshot :cursor :slingshot}})
|
||||
:slingshot {:name "The Slinger's Shot" :value :slingshot :cursor :slingshot}
|
||||
:note-2 {:name "Another note from Gandarf" :value :note-2 :cursor :note}
|
||||
:camera {:name "Image taking device" :value :camera :cursor :camera}
|
||||
:walkie-talkies {:name "Communication devices" :value :walkie-talkies :cursor :walkie-talkies}
|
||||
:walkie-talkie {:name "Communication device" :value :walkie-talkie :cursor :walkie-talkie}
|
||||
:flashlight {:name "Lighting device" :value :flashlight :cursor :flashlight}})
|
||||
|
||||
@@ -17,6 +17,16 @@
|
||||
(actions/walk-to entities :ego [268 61] :face :left))
|
||||
|
||||
|
||||
(defn drop-walkie-talkie [entities]
|
||||
(actions/talk entities :ego "I'll drop one of these off in here.")
|
||||
(actions/walk-to entities :ego [155 64])
|
||||
(actions/walk-straight-to entities :ego [106 18] :face :left)
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/remove-item entities :walkie-talkies)
|
||||
(actions/give entities :walkie-talkie)
|
||||
(actions/walk-straight-to entities :ego [155 64]))
|
||||
|
||||
|
||||
|
||||
(defn present-frankie-choices [entities]
|
||||
(actions/present-choices entities {:choices ["Please, Frankie. Give me my stuff back!"
|
||||
@@ -97,7 +107,10 @@
|
||||
:stand stand)))
|
||||
|
||||
|
||||
|
||||
(defn attempt-walking-through-gate [entities]
|
||||
(actions/walk-to entities :ego [157 83])
|
||||
(actions/transition-background entities :inside-castle [280 145])
|
||||
(actions/walk-to entities :ego [245 90]))
|
||||
|
||||
|
||||
(defn make [screen]
|
||||
@@ -111,7 +124,9 @@
|
||||
:cursor :right}
|
||||
:left-dir {:box [105 93 169 212]
|
||||
:script (actions/get-script entities (attempt-walking-through-gate entities))
|
||||
:cursor :left}}
|
||||
:cursor :left}
|
||||
:big-tree {:box [20 10 82 235]
|
||||
:scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}}}
|
||||
|
||||
:layers {:day [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:night [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)]}
|
||||
|
||||
@@ -213,6 +213,24 @@
|
||||
(when (get-in @entities [:room :entities :ladder])
|
||||
(actions/talk entities :ego "I'll get down.")
|
||||
(get-down entities)))})))}}
|
||||
:rock {:box [62 83 101 103]
|
||||
:script (actions/get-script entities
|
||||
(when (and (actions/has-obtained? entities :note-1)
|
||||
(not (actions/has-obtained? entities :walkie-talkies)))
|
||||
(actions/walk-to entities :ego [85 99])
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/do-dialogue entities
|
||||
:ego "Hey! A little lever."
|
||||
:ego "I think this is Gandarf's stash of helpful stuff.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities :flashlight)
|
||||
(actions/do-dialogue entities :ego "What is this?")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities :camera)
|
||||
(actions/do-dialogue entities :ego "These are all really strange devices.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities :walkie-talkies)
|
||||
(actions/do-dialogue entities :ego "I wonder what all of these magic devices do.")))}
|
||||
:grass {:box [26 105 60 160]
|
||||
:script (actions/get-script entities
|
||||
(if (not (actions/has-item? entities :grass))
|
||||
@@ -313,5 +331,6 @@
|
||||
entities)
|
||||
(if (= :night (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)))
|
||||
(utils/remove-interaction :rock)
|
||||
)))
|
||||
:start-pos [203 1])))
|
||||
|
||||
@@ -52,4 +52,47 @@
|
||||
:ego "'I will give you more instructions when I can.'"
|
||||
:ego "'And please hurry, because we're being forced into a karaoke competition.'"
|
||||
:ego "'I'm about at my witt's end.'"
|
||||
:ego "'P.S., Guard that slingshot with your life!'"))
|
||||
:ego "'P.S., Guard that slingshot with your life!'"
|
||||
:ego "'P.P.S., If anything goes wrong, you can look for supplies behind a nearby r...'"
|
||||
:ego "It just cuts off there."))
|
||||
|
||||
(defn read-note-2 [entities]
|
||||
(actions/do-dialogue entities
|
||||
:ego "It's another note from Gandarf. It's written on the back of a bingo card. It reads:"
|
||||
:ego "'Boy, the situation is dire. I don't have much time. Please hurry.'"
|
||||
:ego "'We've been forced into playing bingo for the last 3 hours.'"
|
||||
:ego "'You are almost done with the spell to restore magic to The Slinger's Shot.'"
|
||||
:ego "'You haven't lost it, right?'"
|
||||
:ego "'You need to add the root of all evil to the cauldron.'"
|
||||
:ego "'Also, you'll need to add a split second.'"
|
||||
:ego "'Then, dip the Slinger's Shot in to complete the spell.'"))
|
||||
|
||||
|
||||
(defn listen-1 [entities]
|
||||
(actions/talk entities :ego "Did you see the look on Faceplant'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]
|
||||
(if (get-in @entities [:room :entities :frankie])
|
||||
(do
|
||||
(actions/play-animation entities :ego :reach-up :stop? false)
|
||||
(Thread/sleep 1000)
|
||||
(actions/play-animation entities :ego :reach-down :stop? false)
|
||||
(actions/talk entities :ego "I don't hear anything in it."))
|
||||
(do
|
||||
(actions/talk entities :ego "I'll just give it a listen.")
|
||||
(actions/play-animation entities :ego :reach-up :stop? false)
|
||||
((rand-nth [listen-1 listen-2 listen-3]) entities)
|
||||
(actions/play-animation entities :ego :reach-down))))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns advent.screens.rooms.outside-castle
|
||||
(:require [advent.screens.items :as items]
|
||||
[advent.screens.rooms :as rooms]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.screens.rooms.castle-gate :as castle-gate]
|
||||
[advent.actions :as actions]
|
||||
[advent.utils :as utils]
|
||||
@@ -196,7 +197,7 @@
|
||||
:frankie "And what's this?"
|
||||
:frankie "The Slinger's Shot?"
|
||||
:ego "No, not the Slinger's Shot!"
|
||||
:franki "Look like we hit the jackpot tonight boys!")
|
||||
:frankie "Look like we hit the jackpot tonight boys!")
|
||||
(frankie-comment-on-item entities)
|
||||
(actions/give entities :money)
|
||||
(actions/do-dialogue entities
|
||||
@@ -227,11 +228,20 @@
|
||||
(actions/transition-background entities :inside-castle [280 145])
|
||||
(actions/walk-to entities :ego [245 90]))))
|
||||
|
||||
|
||||
(defn add-note-if-necessary [entities]
|
||||
(if (and (actions/has-obtained? entities :spell-component)
|
||||
(not (actions/has-item? entities :spell-component))
|
||||
(not (actions/has-obtained? entities :note-2)))
|
||||
(update-in entities [:room :entities] #(assoc % :note (get-in entities [:room :note])))
|
||||
entities))
|
||||
|
||||
(defn make-night [entities]
|
||||
(-> entities
|
||||
(update-in [:room :entities] #(dissoc % :peddler))
|
||||
(update-in [:room :entities] #(dissoc % :balloons))
|
||||
(utils/remove-interaction :wares)))
|
||||
(utils/remove-interaction :wares)
|
||||
add-note-if-necessary))
|
||||
|
||||
(defn make [screen]
|
||||
(let [peddler-sheet (texture! (texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
||||
@@ -355,6 +365,12 @@
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities :flies)
|
||||
(actions/talk entities :ego "Hopefully they won't fly out of my backpack."))})}
|
||||
:note (rooms/make-entity :note (assoc (texture "outside-castle/note.png")
|
||||
:x 198 :y 66 :baseline 174
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [210 79] :face :left)
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(common/read-note-2 entities))))
|
||||
:collision "outside-castle/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:start-pos [310 80]
|
||||
|
||||
@@ -136,6 +136,10 @@
|
||||
(texture (aget player-sheet 0 i))))
|
||||
stand-anim (animation 0.1 (for [i (flatten [(repeat 6 [(repeat 10 0) (repeat 3 1) (repeat 20 0)]) 3 4 5 5 5 6 5 6 5 6 5 4 3 ])]
|
||||
(texture (aget stand-sheet 0 i))))
|
||||
reach-up (animation 0.1 (for [i [0 3 4 5]]
|
||||
(texture (aget stand-sheet 0 i))))
|
||||
reach-down (animation 0.1 (for [i [5 4 3 0]]
|
||||
(texture (aget stand-sheet 0 i))))
|
||||
talk-anim (animation 0.2 (for [i (range 8)]
|
||||
(texture (aget talk-sheet 0 i))))
|
||||
start-squat (animation 0.05 (for [i [0 1 2 3 4]]
|
||||
@@ -181,6 +185,8 @@
|
||||
:hold-up-to-window hold-up-to-window
|
||||
:swing swing
|
||||
:grow-talk grow-talk
|
||||
:reach-up reach-up
|
||||
:reach-down reach-down
|
||||
[:fire 1] fire-1-anim
|
||||
[:fire 2] fire-2-anim
|
||||
[:fire 3] fire-3-anim
|
||||
@@ -199,6 +205,8 @@
|
||||
:grow (utils/flip grow)
|
||||
:hold-up-to-window (utils/flip hold-up-to-window)
|
||||
:grow-talk (utils/flip grow-talk)
|
||||
:reach-up (utils/flip reach-up)
|
||||
:reach-down (utils/flip reach-down)
|
||||
[:fire 1] (utils/flip fire-1-anim)
|
||||
[:fire 2] (utils/flip fire-2-anim)
|
||||
[:fire 3] (utils/flip fire-3-anim)
|
||||
@@ -238,6 +246,11 @@
|
||||
: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?"))
|
||||
: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."))
|
||||
:flashlight (actions/get-script entities (actions/talk entities :ego "It's a magic device that gives off light."))
|
||||
: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!"))
|
||||
:walkie-talkie (actions/get-script entities (common/listen-to-frankie entities))
|
||||
nil))
|
||||
:x (first start-pos) :y (last start-pos)
|
||||
:id "ego"}]
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
|
||||
(println (:input-x screen) (:input-y screen) "->" x y)))
|
||||
|
||||
(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :ladder :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength :medal :kiss :sword :hourglass :mandrake :ball-n-chain :key :rope :crowbar :note-1 :ash :sack-lunch :flies :spear :monocle :feather :spell-component :money :watch :broken-watch :slingshot])
|
||||
(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :ladder :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength :medal :kiss :sword :hourglass :mandrake :ball-n-chain :key :rope :crowbar :note-1 :ash :sack-lunch :flies :spear :monocle :feather :spell-component :money :watch :broken-watch :slingshot :camera :walkie-talkies :flashlight :walkie-talkie :flask-water])
|
||||
|
||||
(defn cursor [filename which]
|
||||
(let [scale 2
|
||||
|
||||
Reference in New Issue
Block a user