diff --git a/desktop/ready-to-pull-sword.edn b/desktop/ready-to-pull-sword.edn new file mode 100644 index 00000000..e5dfa265 --- /dev/null +++ b/desktop/ready-to-pull-sword.edn @@ -0,0 +1 @@ +{:active? true, :convinced-wizard? true, :inventory [:ladder :flask-1 :grass :medal :kiss :trophy ], :wizard-left? false, :clues #{}, :current-riddle :wool, :last-room :inside-castle, :wants-toy true, :mints-eaten 0, :object nil, :obtained-items #{:kiss :medal :flask-1 :grass :ladder :trophy}} diff --git a/desktop/resources/ego/pull-sword.psd b/desktop/resources/ego/pull-sword.psd new file mode 100644 index 00000000..8d25b1e7 Binary files /dev/null and b/desktop/resources/ego/pull-sword.psd differ diff --git a/desktop/resources/inside-castle/pull-sword.png b/desktop/resources/inside-castle/pull-sword.png new file mode 100644 index 00000000..a1e17916 Binary files /dev/null and b/desktop/resources/inside-castle/pull-sword.png differ diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 3aabf4ee..5ec025f6 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -98,6 +98,10 @@ (defn pull-sword [entities] (actions/play-animation entities :ego :reach) + (actions/transition-music entities :town-1 :fight) + (actions/add-entity entities :blackout (get-in @entities [:room :blackout])) + (actions/add-entity entities :pull-sword (get-in @entities [:room :pull-sword])) + (actions/play-animation entities :pull-sword :pull-sword) (actions/give entities :sword) (actions/remove-entity entities :sword) (actions/talk entities :ego "I got it! I will become the greatest knight Remington has ever known!")) @@ -130,7 +134,8 @@ (aget game-player-talk-sheet 0 i))) 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 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]))] + 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.15 (flatten [(map #(repeat 40 %) (range 3)) [2 2 3 2 3 3 3 3 2 2 2 2 3 2 3 3 3 2 2 3 3 2 2 3 2 3 2 3 2 3 2 3 2 2 2 2 2 2 3 2 3 3 3 3 3 3 ]]))] (rooms/make :music :town-1 :interactions {:right-door {:box [286 140 306 160] @@ -195,6 +200,16 @@ :ego "One day, when I'm a knight, I'll ask her to be my girlfriend."))}} :layers [(assoc (texture "inside-castle/background.png") :x 0 :y 0 :baseline 0) (assoc (texture "inside-castle/pedestal-overlay.png") :x 0 :y 0 :baseline 135)] + :blackout (assoc (texture "black.png") + :x 0 :y 0 + :width 320 + :height 240 :opacity 0.8 + :baseline 239) + :pull-sword (assoc (animation->texture screen pull-sword-anim) + :x 10 + :y 40 + :baseline 240 + :pull-sword pull-sword-anim) :entities {:bird-1 (utils/make-bird screen (as-> [[185 235] [220 225] [210 230] [250 235]] p (concat p (reverse p))))