diff --git a/desktop/resources/cat-tree/grandma.png b/desktop/resources/cat-tree/grandma.png
index 7d954840..274af61c 100644
Binary files a/desktop/resources/cat-tree/grandma.png and b/desktop/resources/cat-tree/grandma.png differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/0.pxi b/desktop/resources/cat-tree/grandma.pxa/0.pxi
index 877f0472..e4253d90 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/0.pxi and b/desktop/resources/cat-tree/grandma.pxa/0.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/1.pxi b/desktop/resources/cat-tree/grandma.pxa/1.pxi
index 9d0da782..19cebc69 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/1.pxi and b/desktop/resources/cat-tree/grandma.pxa/1.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/2.pxi b/desktop/resources/cat-tree/grandma.pxa/2.pxi
index 073f432b..e13f53d1 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/2.pxi and b/desktop/resources/cat-tree/grandma.pxa/2.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/3.pxi b/desktop/resources/cat-tree/grandma.pxa/3.pxi
index 7745afe3..c172e8f3 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/3.pxi and b/desktop/resources/cat-tree/grandma.pxa/3.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/4.pxi b/desktop/resources/cat-tree/grandma.pxa/4.pxi
index 672fed4e..9e9ea1a3 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/4.pxi and b/desktop/resources/cat-tree/grandma.pxa/4.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/5.pxi b/desktop/resources/cat-tree/grandma.pxa/5.pxi
index e0cae98e..0c7c7766 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/5.pxi and b/desktop/resources/cat-tree/grandma.pxa/5.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/6.pxi b/desktop/resources/cat-tree/grandma.pxa/6.pxi
index bc0f6c14..13c518ea 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/6.pxi and b/desktop/resources/cat-tree/grandma.pxa/6.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/7.pxi b/desktop/resources/cat-tree/grandma.pxa/7.pxi
index b2eba581..aab57466 100644
Binary files a/desktop/resources/cat-tree/grandma.pxa/7.pxi and b/desktop/resources/cat-tree/grandma.pxa/7.pxi differ
diff --git a/desktop/resources/cat-tree/grandma.pxa/CelData.plist b/desktop/resources/cat-tree/grandma.pxa/CelData.plist
index 3cc9cf5c..53e79e6e 100644
--- a/desktop/resources/cat-tree/grandma.pxa/CelData.plist
+++ b/desktop/resources/cat-tree/grandma.pxa/CelData.plist
@@ -34,5 +34,17 @@
duration
1
+
+ duration
+ 1
+
+
+ duration
+ 1
+
+
+ duration
+ 1
+
diff --git a/desktop/resources/cursor.png b/desktop/resources/cursor.png
index 8de22243..3648f35a 100644
Binary files a/desktop/resources/cursor.png and b/desktop/resources/cursor.png differ
diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj
index 63d9b0af..97740826 100644
--- a/desktop/src-common/advent/screens/items.clj
+++ b/desktop/src-common/advent/screens/items.clj
@@ -72,7 +72,6 @@
(def medal {:name "Medal of strength" :value :medal :cursor :medal})
-(def certificate {:name "Certificate of courage" :value :certificate :cursor :certificate})
(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
:scripts {:slobber (make-strength-potion)}}
: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}
})
diff --git a/desktop/src-common/advent/screens/rooms/cat_tree.clj b/desktop/src-common/advent/screens/rooms/cat_tree.clj
index cef03444..2c344a71 100644
--- a/desktop/src-common/advent/screens/rooms/cat_tree.clj
+++ b/desktop/src-common/advent/screens/rooms/cat_tree.clj
@@ -9,7 +9,7 @@
[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)
@@ -23,9 +23,10 @@
cat-walk (animation 0.2 [(texture "cat-tree/pounce.png")])
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-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 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [3 4 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-squat-1 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [3 4 5 5 5 5 5])
+ 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-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
:interactions
{:down-dir {:box [150 0 270 20]
@@ -46,6 +47,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)))}))
)}}
:grass {:box [26 105 60 160]
@@ -72,20 +74,27 @@
(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-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/play-animation entities :ego :cat-toy-last-half)
- (swap! entities #(assoc-in % [:room :entities :grandma :stand]
- (get-in % [:room :entities :grandma :cat-stand])))
- (actions/play-animation entities :grandma :squat)
+ (actions/play-animation entities :grandma :squat-1 :stop? false)
(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)
+ (actions/walk-straight-to entities :ego [165 45] :face :left)
(actions/do-dialogue entities
- :grandma "Thank you for rescuing my furry friend, young man!"
- :ego "It's nothing."
- :grandma "You are so brave!"
- :grandma "Here's a certificate of bravery!")
- (actions/talk entities :ego "TODO: get award from little old lady in this room")
- (actions/give entities :certificate))
+ :ego "It's no big deal."
+ :grandma "You won't go unrewarded!"
+ :grandma "Come here young man.")
+ (actions/walk-straight-to entities :ego [133 35])
+ (actions/talk entities :grandma "For your impressive display of courage and bravery, I give you this. ")
+ (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.")))})
cat-stand)
:grandma (assoc (animation->texture screen grandma-stand)
@@ -93,9 +102,10 @@
:anim grandma-stand
:anim-start 0
:talk grandma-talk
- :cat-stand grandma-cat-stand
+ :kiss grandma-kiss
:stand grandma-stand
- :squat grandma-squat
+ :squat-1 grandma-squat-1
+ :squat-2 grandma-squat-2
:origin-x 12
:origin-y 0
:scale-x 1.45
@@ -104,7 +114,7 @@
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
:apply-state (fn [entities]
(as-> entities entities
- (if (actions/has-item? entities :certificate)
+ (if (actions/has-item? entities :kiss)
(update-in entities [:room :entities] #(dissoc % :cat))
entities)))
:start-pos [203 1])))
diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj
index 2a62bb88..b38663d9 100644
--- a/desktop/src-common/advent/screens/rooms/inside_castle.clj
+++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj
@@ -106,7 +106,7 @@
(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]
- (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/do-dialogue entities
: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!!")
(actions/walk-to entities :ego [37 134] :face :left)
(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]))
- obtained-items (set/intersection #{: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 :kiss} (get-in @entities [:state :obtained-items]))]
(if (= #{} missing-items)
(pull-sword entities)
(try-to-pull-sword entities missing-items obtained-items)))))
@@ -203,9 +203,6 @@
:anim trophy
:anim-start 0
:script (actions/get-script entities
- (actions/give entities :trophy)
- (actions/give entities :certificate)
- (actions/give entities :medal)
(walk-to-player entities)
(if (= nil (get-in @entities [:state :current-riddle]))
(let [{:keys [run choices]} (nice-trophy-dialogue entities)]
diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj
index c33dddff..8573ae9d 100644
--- a/desktop/src-common/advent/screens/scene.clj
+++ b/desktop/src-common/advent/screens/scene.clj
@@ -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]]
(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])
+ 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
:stand stand-anim
:talk talk-anim
@@ -133,6 +134,7 @@
:cat-toy-first-half cat-toy-first-half
:cat-toy-last-half cat-toy-last-half
:grow grow
+ :get-sick get-sick
:hold-up-to-window hold-up-to-window
[:fire 1] fire-1-anim
[:fire 2] fire-2-anim
@@ -145,6 +147,7 @@
:squat (utils/flip squat-anim)
:reach (utils/flip reach-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-last-half (utils/flip cat-toy-last-half)
:grow (utils/flip grow)
diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj
index 726cdd61..72f054a4 100644
--- a/desktop/src-common/advent/utils.clj
+++ b/desktop/src-common/advent/utils.clj
@@ -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 :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]
(let [scale 2