From 37c047709d61d964c856006dd9592f8f45bac5c6 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Sun, 28 Dec 2014 14:53:58 -0800 Subject: [PATCH] owl puking, lol. --- desktop/resources/cat-tree/owl.png | Bin 2021 -> 2502 bytes .../resources/cat-tree/owl.pxa/CelData.plist | 20 ++++++ .../advent/screens/rooms/cat_tree.clj | 65 ++++++++++++++++-- .../advent/screens/rooms/inside_castle.clj | 20 +++++- 4 files changed, 98 insertions(+), 7 deletions(-) diff --git a/desktop/resources/cat-tree/owl.png b/desktop/resources/cat-tree/owl.png index f02dab6a624340094a7440208b729801ab1491f1..0b756233de6f8cf90d062e1d6bd5a34c7e567d49 100644 GIT binary patch delta 1448 zcmV;Z1y}mz55^NAiBL{Q4GJ0x0000DNk~Le0001(0000S2nGNE0G;D@@3A2=1b+ox zNkl8sYoZ_&ExoUU5LIM-v?AmvL`hT7p<1Vrn z+OXAA(!>&>V;+)KwJpi~^tk0>>G=Rl@RH0&$IAGXfE6jQJ-heP`^OKPHKPq%Jta*n zn{d0IWPbKoyPpKh#V*Z2q`;OA4?OpK(+r~Gwc=u3y!;#Cl4AE^cUZy>F;|V|%RH!K zV?IB9hW;x2RP#9t5Bra;e}A6NefzN)A1uq?pMXwRU!X-jOTq~}znf9@B{N*Do zt~>J=nDyi<5Dzinf?XF8nYKk?!4It7(G4cFUMysn<;)8cK-L0| zjU_f@F)58$g5aLg|9|nb(L>Udq*RYhzpY_6!VL7$;h0Htxz;3ZeRnX zL}7_9s@4yn@YljhV}D+m%n0T4SIl~dnrn^VVf&#hs?ZIIep0?LMvA_ESXDO?vKq};`njuS-c^W?;{_PI(seLDO1n?B^DFJHh;XX-(0Xi)7Q&ix_My1 zpRM=#+_wGv7XTP+ER4s3>RZb;JF|m|qIPkqBXEL0K@|#aK+x z#+viI^T|iSdZD(PdjeY(X~TnU(u+wkHK#a z28LJ+5Cp`b#U&y^sC|a3;h`qRIIPC-wPAdyZtmaxc}GZG*h7dbsU|v+f&6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mVR6hf>PMj)R#;vU zK8NM<8u3V{vovDf25nMQVGNxW1cU(@(HyG z%U3~=*0&r4=^`OQ&w~%^)u!j{2bPc2+{~Ru@%tCz`EEV$iGQnvS&+%cB5lEv+m(s2 zK%T23grO4ZRz)0s7Om#ng5{~y#Mmf3K!&4np;r;)ISzZZSn{lePi>rQ1D3CnAX=+$ zseGl)!V<@Z#J$<(pI$Q9!LR|#^I4ZW8JARDLDE(Y2u#JIVt(0sUez4fwql9tOIg~k mJnFduration 1 + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + diff --git a/desktop/src-common/advent/screens/rooms/cat_tree.clj b/desktop/src-common/advent/screens/rooms/cat_tree.clj index f0e55ef2..3a3dad05 100644 --- a/desktop/src-common/advent/screens/rooms/cat_tree.clj +++ b/desktop/src-common/advent/screens/rooms/cat_tree.clj @@ -101,8 +101,62 @@ (defn talk-to-owl [entities] (actions/walk-to entities :ego [141 54] :face :right) - (actions/do-dialogue entities :ego "Hello there little owl." - :owl "You talking to me?")) + (if (get-in @entities [:state :talked-to-owl?]) + (do (actions/do-dialogue entities :ego "Hello again." + :owl "Have you found my glass monocle!?" + :owl "I'll have no relief of this nausea until you do.") + (actions/play-animation entities :owl :puke)) + + (do (actions/do-dialogue entities :ego "Hello there little owl." + :owl "Who you calling little?" + :ego "Wow! You can talk?" + :owl "Of course I can!" + :ego "But none of the other animals so far in this game have talked!" + :owl "Have you ever thought that maybe you're not that enjoyable to talk with?" + :ego "I guess not." + :owl "Naw, I'm just pulling your leg." + :owl "I'm an owl, and owls are wise.") + (actions/present-choices entities {:choices ["Can you help me in my quest?" + {:run #(actions/respond entities % + :owl "Of course I can help you in your quest." + :owl "I know just what you need." + :owl "But I'm also in trouble of my own.") + :choices ["What kind of trouble?" + {:run #(do (actions/respond entities % + :owl "You see, we owls have very strong vision." + :owl "I was born with a birth defect, and only one of my eyes is good." + :owl "I dropped my monocle somewhere around here!" + :owl "Without it, I have severe nausea.") + (actions/play-animation entities :owl :puke) + (actions/do-dialogue entities + :owl "Excuse me." + :owl "I don't suppose you could help me find it?" + :ego "I'll let you know if I find it."))} + "Something else." + {:choices actions/something-else}]} + "Catch any mice tonight?" + {:run #(do (actions/respond entities % + :owl "Nothing at all." + :owl "I'm missing my eyepiece, and without it, I get too much motion sickness." + :owl "I've been sitting here sick ever since I dropped it.") + (actions/play-animation entities :owl :puke) + (actions/do-dialogue entities + :owl "Excuse me." + :owl "Could you help me find it?" + :ego "I'll let you know if I see anything." + :owl "Oh, thank you."))} + "Have you seen Gandarf tonight?" + {:run #(actions/respond entities % + :owl "I don't know him." + :owl "I'm actually just travelling through this land.") + :choices actions/previous-choices} + "Nevermind." + {:run #(do (actions/respond entities % + :owl "Oh, do tell me if you see a glass monocle around." + :owl "I can't see at all without it. On top of that, I have severe nausea!" + :owl "I'll be stranded here for who knows how long without it.") + (actions/play-animation entities :owl :puke))}]}))) + (actions/update-state entities #(assoc % :talked-to-owl? true))) (defn make [screen] (let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10) @@ -116,7 +170,8 @@ 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]) owl-stand (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [0 0 0 0 0 0 0 2]) - owl-talk (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [1 0 1 0 1 0 0 0 2 0])] + owl-talk (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [1 0 1 0 1 0 0 0 2 0]) + owl-puke (utils/make-anim "cat-tree/owl.png" [19 28] 0.10 [0 0 2 2 3 2 2 3 3 2 3 3 3 4 5 6 7 4 4 3 3 2 2 2 2 2])] (rooms/make :music :town-2 :interactions {:down-dir {:box [150 0 270 20] @@ -138,8 +193,7 @@ :script (actions/get-script entities (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] :script (actions/get-script entities (if (not (actions/has-item? entities :grass)) @@ -223,6 +277,7 @@ :x 187 :y 172 :baseline 241 :stand owl-stand :talk owl-talk + :puke owl-puke :talk-color (color 0.5 0.5 1.0 1.0) :anim owl-stand :anim-start 0 diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 715e575c..8cb26b3c 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -149,8 +149,16 @@ (str/join " and " (map item->proof missing-items)) "."))))) +(defn add-monocle-if-necessary [entities] + (if (and (not (actions/has-obtained? entities :monocle)) + (get-in entities [:state :talked-to-owl?])) + (update-in entities [:room :entities] #(assoc % :monocle (doto (get-in entities [:room :monocle]) println))) + entities)) + (defn make-night [entities] - (update-in entities [:room :entities] #(dissoc % :game-player))) + (-> entities + (update-in [:room :entities] #(dissoc % :game-player)) + add-monocle-if-necessary)) (defn make [screen] (let [game-player-talk-sheet (texture! (texture "inside-castle/game-player-talk.png") :split 40 44) @@ -162,7 +170,8 @@ game-player-flex (animation 0.075 (for [i [0 0 4 4 5 5 5 5 5 5 5 6 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 6 5 5 5 5 5 5 5 5 5 5 4 4 0 0 0 0]] (aget game-player-talk-sheet 0 i))) trophy (utils/make-anim "inside-castle/trophy.png" [16 16] 0.1 (flatten [(repeat 50 0) 1 2 3 3 3 3 2 1])) - pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]))] + pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ])) + monocle (utils/make-anim "inside-castle/monocle.png" [7 7] 0.05 (flatten [(repeat 70 0) 1 2 3 3 3 2 1]))] (rooms/make :music :town-1 :interactions {:right-door {:box [286 140 306 160] @@ -319,6 +328,13 @@ :stand game-player-stand :flex game-player-flex :talk game-player-talk)} + :monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle) + :x 209 :y 160 :baseline 240 + :anim monocle + :anim-start 0 + :script (actions/get-script entities + (actions/walk-to entities :ego [213 87] :face :left) + (actions/talk entities :ego "There's something up there on the roof!")))) :collision "inside-castle/collision.png" :scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00) :apply-state (fn [entities]