started filling out inside the jail.

This commit is contained in:
2014-12-27 11:58:55 -08:00
parent 2e2d1c617c
commit d7a6823165
5 changed files with 58 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -111,4 +111,5 @@
:sword {:name "Sword of Blergh" :value :sword :cursor :sword}
:mandrake {:name "Mandrake root" :value :mandrake :cursor :mandrake
:scripts {:flask-1-slobber (make-strength-potion) }}
:ball-n-chain {:name "Ball-n-chain" :value :ball-n-chain :cursor :ball-n-chain}
})

View File

@@ -10,6 +10,42 @@
[play-clj.g2d :refer :all]))
(defn do-warden-dialogue [entities]
(actions/do-dialogue entities :ego "Hey, who are you? Why am I in this cell?"
:warden "You're under arrest for theft of public property."
:ego "Under arrest? But I'm the good guy!\nThe game is named after me!"
:warden "Sorry chap. The law's the law.")
(actions/present-choices entities
{:choices ["But I'm just a kid."
{:run #(actions/respond entities %
:warden "The Duke of Remington is a very stern chap."
:warden "He doesn't bend the rules, even for young thieves.")
:choices actions/previous-choices}
"But I was going to teach Blergh a lesson!"
{:run #(actions/respond entities %
:warden "Sure you were. If he even exists."
:ego "He does! He's going to come destroy the town first thing in the morning!"
:warden "Uh huh."
:warden "As if I have heard the 'bad guy is coming to destroy the town' 1000 times already."
:warden "You could try coming up with something creative, chap."
:ego "Creative?"
:warden "Yeah, like, 'My mother is in the hospital.'"
:warden "Or, 'I have a highly contagious case of the lizard-pox.'")
:choices actions/previous-choices}
"But the whole town will die if I don't do something!"
{:run #(actions/respond entities %
:warden "The whole town will have a thief on the loose if I don't keep you here."
:warden "We don't want that either, do we?"
:ego "This is life and death we're talking about here!"
:warden "And this is my job. A chap's got to do his job, am I right?"
:warden "You've got to steal, and I've got to lock you up."
:warden "It's how it works.")
:choices actions/previous-choices}
"Nevermind."
{:run #(actions/respond entities %
:warden "This conversation has got me very tired."
:warden "Be a good chap and let me rest.")}]}))
(defn make [screen]
(rooms/make :music :inside-antique
:interactions {
@@ -18,6 +54,13 @@
(actions/walk-to entities :ego [174 80] :face :right)
(actions/play-animation entities :ego :reach)
(actions/talk entities :ego "There's no helping it. It's locked."))}
:window {:box [98 110 118 140]
:script (actions/get-script entities
(actions/walk-to entities :ego [102 88] :face :right)
(actions/do-dialogue entities
:ego "What a peaceful night."
:ego "Oh my sweet Georgia McGorgeous. How will I ever save you now?"
:ego "I have to find a way out of here!"))}
:hay {:box [130 86 177 102]
:script (actions/get-script entities
(actions/walk-to entities :ego [144 86] :face :right)
@@ -31,9 +74,18 @@
:x 40 :y 60 :baseline 166
:talk-color (color 0.9 0.3 0.9 1.0)
:script (actions/get-script entities
(actions/do-dialogue entities :ego "Hey, who are you? Why am I in this cell?"
:warden "You're under arrest for theft of public property."
:ego "Under arrest? But I'm the good guy!\nThe game is named after me!")))}
(do-warden-dialogue entities)))
:ball-n-chain (assoc (texture "inside-jail/ball-n-chain.png")
:x 80 :y 80 :baseline 160
:script (actions/get-script entities
(actions/walk-to entities :ego [103 83] :face :left)
(actions/play-animation entities :ego :squat)
(actions/remove-entity entities :ball-n-chain)
(actions/give entities :ball-n-chain)))}
:collision "inside-jail/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 0 0.50 1.5)
:start-pos [130 85]))
:start-pos [130 85]
:apply-state (fn [entities]
(if (actions/has-item? entities :ball-n-chain)
(update-in entities [:room :entities] #(dissoc % :ball-n-chain))
entities))))

View File

@@ -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])
(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])
(defn cursor [filename which]
(let [scale 2