From 9529c60cf7a49da929aed953d0559455e538eb7c Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Fri, 14 Nov 2014 17:19:16 -0800 Subject: [PATCH] adding strength potion transformation. --- desktop/resources/cursor.png | Bin 5162 -> 5347 bytes desktop/src-common/advent/screens/items.clj | 21 ++++++++++++++---- .../advent/screens/rooms/outside_house.clj | 2 +- desktop/src-common/advent/screens/scene.clj | 18 ++++++++++----- desktop/src-common/advent/utils.clj | 2 +- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/desktop/resources/cursor.png b/desktop/resources/cursor.png index 9a06201f6e80f871a0680aa0103c93757404003e..782a841aef7fdd609e5a5ab9ee1d73c8ad21c7e7 100644 GIT binary patch delta 4281 zcmV;q5JvB+DB~%xQv`nydPzhM90}2xXBO)T8I8c%DQ)`7( zQB<&1>x@zX!RmC1v`Qc?L<6yQD6OL-NU-2efRghfQi1Hxtz0S&pEqqbMO1kp56OU>Kjse7j=KIaPi}sb;`3eI|EH& z23EAswQwEHv8;W3tcB~lxua0Xgj^;CU zY5i}L{&Gkhb9MqeXr?}Ck1wW6&peq`HLZMeB;OMFcmHdjYX6-Rw2yVub_Lq!=H^

%wr<_7wLjXkM_qq+(=DOCwDM8@$J+9cGycR` zcQ(l}Mwyc4_WVZqOj(`O8E8pSV+H~6i7!G)Z@Xhwqif`D6Qbg_RHPTi)*2maiPTdRWahX+gS$E5eq zTCXR6@}zU!e-u+Oq>kq|CnqQJ^BdwW+uQ_azzG1lopVk`nE(R*ym^nPapP{+7kN-- z2Ea!N2Hx1XKV`bG`ey)8p9!$ALP=2+f)4p7rhFkp1%J3n7erxa78{IBk#Ai9xUY_1 z18slNp6>Yld><(}!2kJq4Pfup&*v4&GJ^nsKXd{9k_Pcw(f$XvO(_WQ0)LJ*ZV)i$ z=cm%NfljS$;5|63>bcr~W!+A7Y4488q%h;^pDs-Bhy4EffMBu_2++oh0=yTMEpVDf z1x)SgYR{s+G2Xs45YfBjf3*VKR1 zqy?g|L&?j_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iBc{25A34KL%cDQeRcMYvCJx${LFtSfS4Zd?7EX9aklFqs6n!}6dnZZ3j8i2x<-=6!g=pCrIs>6`s#Jla9v&pwg> z89UttcX{RhM?lzVbPoZ>ya@6!-CMm|P!%A~z#Dce0C3gc6A%^ykOv9iHvp!fA2wTQ zUpfQn479o#0NC@9KuXw5QV?h0c;t_-IQ~&SBpOkEar%?w0`L?3sk4oH;Z#3f)G4J+ w>SjOM>DBsY08a++{|RXQqfJNn|1bmp1AydNojsYO5dZ)H07*qoM6N<$g2}K2BLDyZ diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj index b1d2eb29..9e50a60b 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -6,6 +6,10 @@ (declare wool) (declare cat-toy) (declare flask-1-with-milk) +(declare slobber) +(declare flask-1-strength) +(declare flask-1-with-cream-of-mushroom) + (def make-cat-toy (actions/get-script entities (actions/remove-item entities stick) @@ -18,8 +22,6 @@ (def carrot {:name "Carrot" :value :carrot :cursor :carrot}) (def flask-1-with-mushrooms {:name "Flask with mushrooms" :value :flask-1-with-mushrooms :cursor :flask-with-contents}) -(def flask-1-with-cream-of-mushroom {:name "Flask with cream of mushrooms soup" :value :flask-1-with-cream-of-mushroom :cursor :flask-with-contents}) - (defn make-cream-of-mushroom [] (actions/get-script entities @@ -32,7 +34,7 @@ (def flask-1-with-milk {:name "Flask with milk" :value :flask-1-with-milk :cursor :flask-with-contents :scripts {:mushrooms (make-cream-of-mushroom)}}) -(def flask-1-strength {:name "Strength potion" :value :flask-1-strength :cursor :flask-with-contents}) +(def flask-1-strength {:name "Strength potion" :value :flask-1-strength :cursor :flask-with-strength}) (def flask-1 {:name "Flask" :value :flask-1 :cursor :flask :scripts {:mushrooms (actions/get-script entities (actions/remove-item entities flask-1) @@ -56,4 +58,15 @@ (def motivational-tapes {:name "Choicest motivational tapes" :value :motivational-tapes :cursor :motivational-tapes}) (def used-earplugs {:name "Choicest used earplugs" :value :used-earplugs :cursor :used-earplugs}) (def grass {:name "Huge grass" :value :grass :cursor :grass}) -(def slobber {:name "Bull slobber" :value :slobber :cursor :slobber}) + +(defn make-strength-potion [] + (actions/get-script entities + (actions/remove-item entities flask-1-with-cream-of-mushroom) + (actions/remove-item entities slobber) + (actions/give entities flask-1-strength) + (actions/talk entities :ego "It's the completed potion of strength!"))) + +(def slobber {:name "Bull slobber" :value :slobber :cursor :slobber :scripts {:flask-1-with-cream-of-mushroom (make-strength-potion)}}) +(def 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)}}) + diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index cfcd06e3..32f69eb3 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -188,7 +188,7 @@ (actions/give entities items/flask-1-with-milk) (actions/talk entities :ego "Sheeps milk.")) (actions/talk entities :ego "She's too far away."))) - items/flask-1-with-mushrooms (items/make-cream-of-mushroom)} + :flask-1-with-mushrooms (items/make-cream-of-mushroom)} :left {:walk (utils/flip sheep-walk) :stand (utils/flip sheep-stand)} :right {:walk sheep-walk diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index f25a66c4..05925a38 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -83,6 +83,7 @@ stand-sheet (texture! (texture "ego/stand.png") :split 18 36) squat-sheet (texture! (texture "ego/squat.png") :split 18 36) reach-sheet (texture! (texture "ego/reach.png") :split 18 36) + grow-sheet (texture! (texture "ego/grow.png") :split 18 36) cat-toy-sheet (texture! (texture "ego/cat-toy.png") :split 41 50) fire-sheet (texture! (texture "ego/fire.png") :split 18 36) walk-right (animation 0.075 (for [i (range 8)] @@ -107,6 +108,8 @@ (texture (aget fire-sheet 0 i)))) fire-3-anim (animation 0.1 (for [i [0 1 2 2 2 2 3 2 3 2 2 2 4 5 6 7 2 2 2 8 9 10 11 2 2 2 2 2 2 2 2 0]] (texture (aget fire-sheet 0 i)))) + grow (animation 0.1 (for [i [0 2 0 0 0 0 2 0 0 0 2 2 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 2 1 2 1 2 1 2 1 3 2 3 2 3 2 3]] + (texture (aget grow-sheet 0 i)))) ego {:right {:walk walk-right :stand stand-anim :talk talk-anim @@ -115,6 +118,7 @@ :end-squat end-squat :reach reach-anim :cat-toy cat-toy-anim + :grow grow [:fire 1] fire-1-anim [:fire 2] fire-2-anim [:fire 3] fire-3-anim} @@ -126,6 +130,7 @@ :squat (utils/flip squat-anim) :reach (utils/flip reach-anim) :cat-toy (utils/flip cat-toy-anim) + :grow (utils/flip grow) [:fire 1] (utils/flip fire-1-anim) [:fire 2] (utils/flip fire-2-anim) [:fire 3] (utils/flip fire-3-anim)} @@ -144,15 +149,18 @@ ((zone/box (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)) x y))) :get-script (fn [cursor [x y]] - (condp = cursor - items/flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "My muscles have doubled in size!")) + (condp = cursor + items/flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "Blegh! Gross!")) + items/flask-1-strength (actions/get-script entities + (actions/talk entities :ego "I'll just take a sip!") + (actions/talk entities :ego "Woah! I feel something!!") + (actions/play-animation entities :ego :grow :stop? false)) items/recipe (actions/get-script entities (actions/do-dialogue entities :ego "The recipe says:" :ego "'For strength beyond measure,'" - :ego "'you must mix, at your leisure,'" + :ego "'you must mix, at your leisure:'" :ego "'1. Cream of mushroom soup.'" :ego "'2. Saliva of the creature whose strength you want to match.'" - :ego "'3. Heat over flame.'" :ego "'A word of warning, before you go.'" :ego "'A sip is all it takes to grow.'" :ego "'Not more than that do drink,'" @@ -219,7 +227,7 @@ :inside-fangald (make-music "inside-fangald.ogg")} :state {:object nil :active? true - :inventory [items/grass] + :inventory [items/flask-1-strength] :clues #{} :mints-eaten 0} :actions {:object nil diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj index c0f7badb..0a0d4fda 100644 --- a/desktop/src-common/advent/utils.clj +++ b/desktop/src-common/advent/utils.clj @@ -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 :stool :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber]) +(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :stool :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength]) (defn cursor [filename which] (let [scale 2