all three quests are now completeable.

This commit is contained in:
2014-11-20 16:42:51 -08:00
parent 8691be9ec6
commit 8e8713e278
5 changed files with 19 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -72,3 +72,4 @@
(def medal {:name "Medal of strength" :value :medal :cursor :medal})
(def certificate {:name "Certificate of courage" :value :certificate :cursor :certificate})

View File

@@ -8,6 +8,13 @@
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(defn get-down [entities]
(actions/talk entities :ego "I'll get down.")
(actions/walk-straight-to entities :ego [151 50] :update-baseline? false :face :left)
(actions/play-animation entities :ego :reach)
(actions/remove-entity entities :blank)
(actions/remove-entity entities :ladder)
(actions/give entities items/ladder))
(defn make [screen]
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
@@ -34,7 +41,7 @@
{:object nil :x 0 :y 0 :width 320 :height 240 :baseline 240
:script (actions/get-script entities
(when (get-in @entities [:room :entities :ladder])
(actions/talk entities :ego "I'll get down."))) }))
(get-down entities)))}))
)}}}
:layers [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
@@ -47,7 +54,14 @@
(actions/talk entities :ego "Kitty's not so interested in me."))
:scripts {:cat-toy (actions/get-script entities
(actions/play-animation entities :ego :cat-toy)
(actions/talk entities :ego "I guess I'm too far away."))})
(if (get-in @entities [:room :entities :ladder])
(do (actions/talk entities :ego "I think he's going for it!")
(actions/play-animation entities :ego :cat-toy)
(actions/remove-entity entities :cat)
(get-down entities)
(actions/talk entities :ego "TODO: get award from little old lady in this room")
(actions/give entities items/certificate))
(actions/talk entities :ego "I guess I'm too far away.")))})
cat-stand)}
:collision "cat-tree/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20))))

View File

@@ -226,7 +226,7 @@
:inside-fangald (make-music "inside-fangald.ogg")}
:state {:object nil
:active? true
:inventory [items/grass items/ladder]
:inventory [items/grass ]
:clues #{}
:mints-eaten 0}
:actions {:object nil

View File

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