From ffe112cfcb565948dd716f999f3b3ef24b0946c1 Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Wed, 18 Feb 2015 20:04:34 -0800 Subject: [PATCH] strength potion --- .../advent/screens/rooms/outside_house.clj | 11 +-- .../src-common/advent/screens/rooms/space.clj | 72 ++++++++++++------- desktop/src-common/advent/screens/scene.clj | 4 +- 3 files changed, 54 insertions(+), 33 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index 81414ec4..9c87bfdb 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -60,10 +60,13 @@ (actions/update-state entities #(assoc % :next-time :day)) (inside-castle/walk-to-blergh entities) (actions/do-dialogue entities - :ego "Blergh!" - :blergh "Oh, hello again." - :blergh "I thought I had taken care of you the last time I saw you." - :blergh "Any final words before I destroy you again?")))) + :ego "Bloodclot!" + :bloodclot-head "Oh, hello again." + :bloodclot-head "I thought I had taken care of you the last time I saw you." + :bloodclot-head "Any final words before I destroy you again?") + (actions/play-animation entities :ego :scared :continue? true) + (Thread/sleep 500) + (actions/walk-straight-to entities :ego [35 45] :override-dir :right :speed 3.0)))) :broken-clock (actions/get-script entities (actions/walk-to entities :ego [141 90] :face :right) (actions/play-animation entities :ego :reach) diff --git a/desktop/src-common/advent/screens/rooms/space.clj b/desktop/src-common/advent/screens/rooms/space.clj index d5249712..c31d9417 100644 --- a/desktop/src-common/advent/screens/rooms/space.clj +++ b/desktop/src-common/advent/screens/rooms/space.clj @@ -166,7 +166,8 @@ blergh-stand-anim (utils/make-anim "space/bloodclot-stand.png" [106 165] 0.75 [0 1]) blergh-grow (utils/make-anim "space/blergh-grow.png" [106 165] 0.10 [0 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 2 2 2 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 3 3 3 3 3 3 3 3 3 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 5 6 7 8 9 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11]) bullet (utils/make-anim "space/bullet.png" [24 24] 0.0075 [0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 3 3 3 4 4 5 5 6 5 4 7]) - effect (particle-effect "space/appear")] + effect (particle-effect "space/appear") + blowup-effect (particle-effect "space/blowup")] (rooms/make :music :fight :interactions {} @@ -175,6 +176,9 @@ :entities {:appear (assoc effect :x 240 :y 50 :baseline 200) + :blowup (assoc blowup-effect + :x 225 :y 175 + :baseline 240) :bloodclot-head (assoc (animation->texture screen bloodclot-head-stand-anim) :x 195 :y 138 :baseline 195 :opacity 0.0 @@ -196,42 +200,56 @@ :script (actions/get-script entities (actions/do-dialogue entities :bloodclot-head "Come on! Try and hit me!")) :scripts {:sword (actions/get-script entities - (swing-at-blergh entities) - - (actions/do-dialogue entities :bloodclot-head "Ha ha ha! Is that the best you can do?" - :bloodclot-head "Take this!") + (if (actions/has-item? entities :magic-slingshot) + (if (get-in @entities [:state :broke-jewel?]) + (do + (swing-at-blergh entities) + (actions/do-dialogue entities + :bloodclot-head "Ha ha ha! Still a weakling, I see." + :bloodclot-head "But you'll not best me!") - (sound! (sound "space/shock.ogg") :play) - (actions/play-animation entities :bloodclot-head :shoot :stop? false) - (actions/begin-animation entities :bloodclot-head :keep-shoot) - (actions/play-animation entities :ego :shock :stop? false) - (actions/begin-animation entities :bloodclot-head :stand) - (actions/play-animation entities :ego :burnt :stop? false) - (actions/play-animation entities :ego :passed-out :continue? true) - (actions/do-dialogue entities :bloodclot-head "Oh shucks. I overcooked him." - :bloodclot-head "No matter." - :bloodclot-head "Tomorrow, I will return with my legion of goblins." - :bloodclot-head "And THEN the feast will begin." - :bloodclot-head "Starting with his precious Georgia McGorgeous.") - (bloodclot-disappear entities) - (common/go-to-jail entities) - (actions/do-dialogue entities :ego "Hey!" :ego "What's going on? I was just about to teach Bloodclot a lesson!")) + (actions/play-animation entities :ego :scared :continue? true) + (Thread/sleep 500) + (actions/walk-straight-to entities :ego [35 45] :override-dir :right :speed 3.0)) + (actions/do-dialogue entities :ego "I don't want to get too close while he still has his lightning gem!")) + (do + (swing-at-blergh entities) + (actions/do-dialogue entities :bloodclot-head "Ha ha ha! Is that the best you can do?" + :bloodclot-head "Take this!") + + (sound! (sound "space/shock.ogg") :play) + (actions/play-animation entities :bloodclot-head :shoot :stop? false) + (actions/begin-animation entities :bloodclot-head :keep-shoot) + (actions/play-animation entities :ego :shock :stop? false) + (actions/begin-animation entities :bloodclot-head :stand) + (actions/play-animation entities :ego :burnt :stop? false) + (actions/play-animation entities :ego :passed-out :continue? true) + (actions/do-dialogue entities :bloodclot-head "Oh shucks. I overcooked him." + :bloodclot-head "No matter." + :bloodclot-head "Tomorrow, I will return with my legion of goblins." + :bloodclot-head "And THEN the feast will begin." + :bloodclot-head "Starting with his precious Georgia McGorgeous.") + (bloodclot-disappear entities) + (common/go-to-jail entities) + (actions/do-dialogue entities :ego "Hey!" :ego "What's going on? I was just about to teach Bloodclot a lesson!")))) :magic-slingshot (actions/get-script entities (actions/do-dialogue entities - :ego "Hey Blergh!" - :ego "Take this!") + :ego "Hey Bloodclot!" + :ego "Eat this!") (actions/play-animation entities :ego :shoot) (actions/add-entity entities :bullet (get-in @entities [:room :bullet])) - (actions/walk-straight-to entities :bullet [213 166] :update-baseline? false :speed 5.0) + (actions/walk-straight-to entities :bullet [213 166] :update-baseline? false :speed 15.0) + (particle-effect! (get-in @entities [:room :entities :blowup]) :reset) + (particle-effect! (get-in @entities [:room :entities :blowup]) :start) (actions/add-entity entities :broken-jewel (get-in @entities [:room :broken-jewel])) - (Thread/sleep 500) (actions/remove-entity entities :bullet) (actions/update-state entities #(assoc % :broke-jewel? true)) + (Thread/sleep 5000) (actions/do-dialogue entities - :bloodclot-head "Argh! My magic lightning helmet!" - :bloodclot-head "No matter. I will destroy you with my bare hands!"))})} + :bloodclot-head "Argh! My lightning gem!" + :bloodclot-head "No matter. I will rip you apart with my bare hands!"))})} :bullet (assoc (animation->texture screen bullet) - :x 130 :y 85 :baseline 241 + :x 37 :y 85 :baseline 241 :walk bullet) :broken-jewel (assoc (texture "space/broken-jewel.png") :x 222 :y 172 :baseline 240) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 66a59cdd..f80c1bdb 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -451,7 +451,7 @@ :inventory (assoc (texture "inventory.png") :x 278 :y 0 :baseline 9000 :mouse-in? (zone/box 278 0 320 42)) :fps (assoc (label "0" (color :white) ) :x 5 :baseline 0)}] - (music! (utils/get-current-music entities) :set-volume 0.0 #_(get-in entities [:volume :value])) + (music! (utils/get-current-music entities) :set-volume (get-in entities [:volume :value])) (utils/play-sound (get-in entities [:musics (actions/get-music (get-in entities [:room :music]) (get-in entities [:state :time]))])) @@ -490,7 +490,7 @@ (play-key-sounds (get-in entities [:room :entities])) (doseq [m (vals (get-in entities [:musics]))] (when m - (music! m :set-volume 0.0 #_(get-in entities [:volume :value]) ))) + (music! m :set-volume (get-in entities [:volume :value]) ))) (label! (:fps entities) :set-text (str (game :fps)))