more grandma refinement.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -34,5 +34,17 @@
|
|||||||
<key>duration</key>
|
<key>duration</key>
|
||||||
<real>1</real>
|
<real>1</real>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -72,7 +72,6 @@
|
|||||||
|
|
||||||
|
|
||||||
(def medal {:name "Medal of strength" :value :medal :cursor :medal})
|
(def medal {:name "Medal of strength" :value :medal :cursor :medal})
|
||||||
(def certificate {:name "Certificate of courage" :value :certificate :cursor :certificate})
|
|
||||||
|
|
||||||
|
|
||||||
(def items
|
(def items
|
||||||
@@ -108,6 +107,6 @@
|
|||||||
:flask-1-with-cream-of-mushroom {:name "Flask with cream of mushrooms soup" :value :flask-1-with-cream-of-mushroom :cursor :flask-with-contents
|
:flask-1-with-cream-of-mushroom {:name "Flask with cream of mushrooms soup" :value :flask-1-with-cream-of-mushroom :cursor :flask-with-contents
|
||||||
:scripts {:slobber (make-strength-potion)}}
|
:scripts {:slobber (make-strength-potion)}}
|
||||||
:medal {:name "Medal of strength" :value :medal :cursor :medal}
|
:medal {:name "Medal of strength" :value :medal :cursor :medal}
|
||||||
:certificate {:name "Certificate of courage" :value :certificate :cursor :certificate}
|
:kiss {:name "Kiss for courage" :value :kiss :cursor :kiss}
|
||||||
:sword {:name "Sword of Blergh" :value :sword :cursor :sword}
|
:sword {:name "Sword of Blergh" :value :sword :cursor :sword}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
[play-clj.utils :refer :all]
|
[play-clj.utils :refer :all]
|
||||||
[play-clj.g2d :refer :all]))
|
[play-clj.g2d :refer :all]))
|
||||||
(defn get-down [entities]
|
(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/walk-straight-to entities :ego [151 50] :update-baseline? false :face :left)
|
||||||
(actions/play-animation entities :ego :reach)
|
(actions/play-animation entities :ego :reach)
|
||||||
(actions/remove-entity entities :blank)
|
(actions/remove-entity entities :blank)
|
||||||
@@ -23,9 +23,10 @@
|
|||||||
cat-walk (animation 0.2 [(texture "cat-tree/pounce.png")])
|
cat-walk (animation 0.2 [(texture "cat-tree/pounce.png")])
|
||||||
ladder-entity (assoc (texture "inside-cafeteria/ladder.png") :x 120 :y 60 :baseline 162)
|
ladder-entity (assoc (texture "inside-cafeteria/ladder.png") :x 120 :y 60 :baseline 162)
|
||||||
grandma-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
grandma-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||||
grandma-cat-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [6 6 6 6 6 6 6 6 6 6 6 6 6 6 7])
|
grandma-squat-1 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [3 4 5 5 5 5 5])
|
||||||
grandma-squat (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [3 4 5 4 3])
|
grandma-squat-2 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [5 5 4 3])
|
||||||
grandma-talk (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 2 0 2 0 2 0 2 0 2 0 1 0 2 0 0])]
|
grandma-talk (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 2 0 2 0 2 0 2 0 2 0 1 0 2 0 0])
|
||||||
|
grandma-kiss (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 8 9 10 9 10 9 10 9 8 0])]
|
||||||
(rooms/make :music :town-2
|
(rooms/make :music :town-2
|
||||||
:interactions
|
:interactions
|
||||||
{:down-dir {:box [150 0 270 20]
|
{:down-dir {:box [150 0 270 20]
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
{:object nil :x 0 :y 0 :width 320 :height 240 :baseline 240
|
{:object nil :x 0 :y 0 :width 320 :height 240 :baseline 240
|
||||||
:script (actions/get-script entities
|
:script (actions/get-script entities
|
||||||
(when (get-in @entities [:room :entities :ladder])
|
(when (get-in @entities [:room :entities :ladder])
|
||||||
|
(actions/talk entities :ego "I'll get down.")
|
||||||
(get-down entities)))}))
|
(get-down entities)))}))
|
||||||
)}}
|
)}}
|
||||||
:grass {:box [26 105 60 160]
|
:grass {:box [26 105 60 160]
|
||||||
@@ -72,20 +74,27 @@
|
|||||||
(if (get-in @entities [:room :entities :ladder])
|
(if (get-in @entities [:room :entities :ladder])
|
||||||
(do (actions/talk entities :ego "I think he's going for it!")
|
(do (actions/talk entities :ego "I think he's going for it!")
|
||||||
(actions/play-animation entities :ego :cat-toy-first-half :stop? false)
|
(actions/play-animation entities :ego :cat-toy-first-half :stop? false)
|
||||||
|
(sound! (sound "cat-tree/cat.ogg") :play)
|
||||||
(actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3)
|
(actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3)
|
||||||
(actions/play-animation entities :ego :cat-toy-last-half)
|
(actions/play-animation entities :ego :cat-toy-last-half)
|
||||||
(swap! entities #(assoc-in % [:room :entities :grandma :stand]
|
(actions/play-animation entities :grandma :squat-1 :stop? false)
|
||||||
(get-in % [:room :entities :grandma :cat-stand])))
|
|
||||||
(actions/play-animation entities :grandma :squat)
|
|
||||||
(actions/remove-entity entities :cat)
|
(actions/remove-entity entities :cat)
|
||||||
|
(actions/play-animation entities :grandma :squat-2)
|
||||||
|
(actions/do-dialogue entities :grandma "Thank you for rescuing my furry friend, young man!")
|
||||||
(get-down entities)
|
(get-down entities)
|
||||||
|
(actions/walk-straight-to entities :ego [165 45] :face :left)
|
||||||
(actions/do-dialogue entities
|
(actions/do-dialogue entities
|
||||||
:grandma "Thank you for rescuing my furry friend, young man!"
|
:ego "It's no big deal."
|
||||||
:ego "It's nothing."
|
:grandma "You won't go unrewarded!"
|
||||||
:grandma "You are so brave!"
|
:grandma "Come here young man.")
|
||||||
:grandma "Here's a certificate of bravery!")
|
(actions/walk-straight-to entities :ego [133 35])
|
||||||
(actions/talk entities :ego "TODO: get award from little old lady in this room")
|
(actions/talk entities :grandma "For your impressive display of courage and bravery, I give you this. ")
|
||||||
(actions/give entities :certificate))
|
(sound! (sound "cat-tree/kiss.ogg") :play)
|
||||||
|
(actions/play-animation entities :grandma :kiss)
|
||||||
|
(actions/give entities :kiss)
|
||||||
|
(actions/play-animation entities :ego :get-sick :stop? false)
|
||||||
|
(actions/walk-straight-to entities :ego [165 45])
|
||||||
|
(actions/talk entities :ego "Ugh! Gross!"))
|
||||||
(actions/talk entities :ego "I guess I'm too far away.")))})
|
(actions/talk entities :ego "I guess I'm too far away.")))})
|
||||||
cat-stand)
|
cat-stand)
|
||||||
:grandma (assoc (animation->texture screen grandma-stand)
|
:grandma (assoc (animation->texture screen grandma-stand)
|
||||||
@@ -93,9 +102,10 @@
|
|||||||
:anim grandma-stand
|
:anim grandma-stand
|
||||||
:anim-start 0
|
:anim-start 0
|
||||||
:talk grandma-talk
|
:talk grandma-talk
|
||||||
:cat-stand grandma-cat-stand
|
:kiss grandma-kiss
|
||||||
:stand grandma-stand
|
:stand grandma-stand
|
||||||
:squat grandma-squat
|
:squat-1 grandma-squat-1
|
||||||
|
:squat-2 grandma-squat-2
|
||||||
:origin-x 12
|
:origin-x 12
|
||||||
:origin-y 0
|
:origin-y 0
|
||||||
:scale-x 1.45
|
:scale-x 1.45
|
||||||
@@ -104,7 +114,7 @@
|
|||||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
|
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
|
||||||
:apply-state (fn [entities]
|
:apply-state (fn [entities]
|
||||||
(as-> entities entities
|
(as-> entities entities
|
||||||
(if (actions/has-item? entities :certificate)
|
(if (actions/has-item? entities :kiss)
|
||||||
(update-in entities [:room :entities] #(dissoc % :cat))
|
(update-in entities [:room :entities] #(dissoc % :cat))
|
||||||
entities)))
|
entities)))
|
||||||
:start-pos [203 1])))
|
:start-pos [203 1])))
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
(actions/talk entities :ego "I got it! I will become the greatest knight Remington has ever known!"))
|
(actions/talk entities :ego "I got it! I will become the greatest knight Remington has ever known!"))
|
||||||
|
|
||||||
(defn try-to-pull-sword [entities missing-items obtained-items]
|
(defn try-to-pull-sword [entities missing-items obtained-items]
|
||||||
(let [item->proof {:trophy "wisdom" :medal "strength" :certificate "courage"}]
|
(let [item->proof {:trophy "wisdom" :medal "strength" :kiss "courage"}]
|
||||||
(actions/play-animation entities :ego :reach)
|
(actions/play-animation entities :ego :reach)
|
||||||
(actions/do-dialogue entities
|
(actions/do-dialogue entities
|
||||||
:ego "I can't pull it out!"
|
:ego "I can't pull it out!"
|
||||||
@@ -159,8 +159,8 @@
|
|||||||
(do (actions/talk entities :ego "That's the coolest sword I've ever seen!!")
|
(do (actions/talk entities :ego "That's the coolest sword I've ever seen!!")
|
||||||
(actions/walk-to entities :ego [37 134] :face :left)
|
(actions/walk-to entities :ego [37 134] :face :left)
|
||||||
(actions/talk entities :ego "If I pull it out I can become a great knight!")
|
(actions/talk entities :ego "If I pull it out I can become a great knight!")
|
||||||
(let [missing-items (set/difference #{:trophy :medal :certificate} (get-in @entities [:state :obtained-items]))
|
(let [missing-items (set/difference #{:trophy :medal :kiss} (get-in @entities [:state :obtained-items]))
|
||||||
obtained-items (set/intersection #{:trophy :medal :certificate} (get-in @entities [:state :obtained-items]))]
|
obtained-items (set/intersection #{:trophy :medal :kiss} (get-in @entities [:state :obtained-items]))]
|
||||||
(if (= #{} missing-items)
|
(if (= #{} missing-items)
|
||||||
(pull-sword entities)
|
(pull-sword entities)
|
||||||
(try-to-pull-sword entities missing-items obtained-items)))))
|
(try-to-pull-sword entities missing-items obtained-items)))))
|
||||||
@@ -203,9 +203,6 @@
|
|||||||
:anim trophy
|
:anim trophy
|
||||||
:anim-start 0
|
:anim-start 0
|
||||||
:script (actions/get-script entities
|
:script (actions/get-script entities
|
||||||
(actions/give entities :trophy)
|
|
||||||
(actions/give entities :certificate)
|
|
||||||
(actions/give entities :medal)
|
|
||||||
(walk-to-player entities)
|
(walk-to-player entities)
|
||||||
(if (= nil (get-in @entities [:state :current-riddle]))
|
(if (= nil (get-in @entities [:state :current-riddle]))
|
||||||
(let [{:keys [run choices]} (nice-trophy-dialogue entities)]
|
(let [{:keys [run choices]} (nice-trophy-dialogue entities)]
|
||||||
|
|||||||
@@ -122,6 +122,7 @@
|
|||||||
grow (animation 0.1 (for [i [0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 3 0 0 0 0 3 0 0 0 3 3 0 0 0 2 2 0 0 2 0 0 2 0 2 0 2 0 2 0 2 0 2 3 2 3 2 3 2 3 2 4 3 4 3 4 3 4]]
|
grow (animation 0.1 (for [i [0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 3 0 0 0 0 3 0 0 0 3 3 0 0 0 2 2 0 0 2 0 0 2 0 2 0 2 0 2 0 2 0 2 3 2 3 2 3 2 3 2 4 3 4 3 4 3 4]]
|
||||||
(texture (aget grow-sheet 0 i))))
|
(texture (aget grow-sheet 0 i))))
|
||||||
hold-up-to-window (utils/make-anim "ego/hold-up-to-window.png" [18 36] 0.1 [0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1 0 0 0 0 0 0])
|
hold-up-to-window (utils/make-anim "ego/hold-up-to-window.png" [18 36] 0.1 [0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1 0 0 0 0 0 0])
|
||||||
|
get-sick (animation 0.3 (map (partial get [(aget talk-sheet 0 0 ) (texture "ego/get-sick.png")]) [0 1 1 1 1 1 1 1 1 1 1 1]) )
|
||||||
ego {:right {:walk walk-right
|
ego {:right {:walk walk-right
|
||||||
:stand stand-anim
|
:stand stand-anim
|
||||||
:talk talk-anim
|
:talk talk-anim
|
||||||
@@ -133,6 +134,7 @@
|
|||||||
:cat-toy-first-half cat-toy-first-half
|
:cat-toy-first-half cat-toy-first-half
|
||||||
:cat-toy-last-half cat-toy-last-half
|
:cat-toy-last-half cat-toy-last-half
|
||||||
:grow grow
|
:grow grow
|
||||||
|
:get-sick get-sick
|
||||||
:hold-up-to-window hold-up-to-window
|
:hold-up-to-window hold-up-to-window
|
||||||
[:fire 1] fire-1-anim
|
[:fire 1] fire-1-anim
|
||||||
[:fire 2] fire-2-anim
|
[:fire 2] fire-2-anim
|
||||||
@@ -145,6 +147,7 @@
|
|||||||
:squat (utils/flip squat-anim)
|
:squat (utils/flip squat-anim)
|
||||||
:reach (utils/flip reach-anim)
|
:reach (utils/flip reach-anim)
|
||||||
:cat-toy (utils/flip cat-toy-anim)
|
:cat-toy (utils/flip cat-toy-anim)
|
||||||
|
:get-sick (utils/flip get-sick)
|
||||||
:cat-toy-first-half (utils/flip cat-toy-first-half)
|
:cat-toy-first-half (utils/flip cat-toy-first-half)
|
||||||
:cat-toy-last-half (utils/flip cat-toy-last-half)
|
:cat-toy-last-half (utils/flip cat-toy-last-half)
|
||||||
:grow (utils/flip grow)
|
:grow (utils/flip grow)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
|
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
|
||||||
(println (:input-x screen) (:input-y screen) "->" x y)))
|
(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 :certificate :sword])
|
(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])
|
||||||
|
|
||||||
(defn cursor [filename which]
|
(defn cursor [filename which]
|
||||||
(let [scale 2
|
(let [scale 2
|
||||||
|
|||||||
Reference in New Issue
Block a user