Merge branch 'master' of https://bitbucket.org/brycecovertoperations/advent
This commit is contained in:
BIN
desktop/resources/ego/crowbar.png
Normal file
BIN
desktop/resources/ego/crowbar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
desktop/resources/ego/crowbar.pxa/0.pxi
Normal file
BIN
desktop/resources/ego/crowbar.pxa/0.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/ego/crowbar.pxa/1.pxi
Normal file
BIN
desktop/resources/ego/crowbar.pxa/1.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/ego/crowbar.pxa/2.pxi
Normal file
BIN
desktop/resources/ego/crowbar.pxa/2.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/ego/crowbar.pxa/3.pxi
Normal file
BIN
desktop/resources/ego/crowbar.pxa/3.pxi
Normal file
Binary file not shown.
22
desktop/resources/ego/crowbar.pxa/CelData.plist
Normal file
22
desktop/resources/ego/crowbar.pxa/CelData.plist
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</plist>
|
||||||
40
desktop/src-common/advent/screens/rooms/inside_stash.clj
Normal file
40
desktop/src-common/advent/screens/rooms/inside_stash.clj
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
(ns advent.screens.rooms.inside-stash
|
||||||
|
(:require [advent.screens.rooms :as rooms]
|
||||||
|
[advent.screens.items :as items]
|
||||||
|
[advent.actions :as actions]
|
||||||
|
[advent.utils :as utils]
|
||||||
|
[clojure.zip :as zip]
|
||||||
|
[play-clj.core :refer :all]
|
||||||
|
[play-clj.ui :refer :all]
|
||||||
|
[play-clj.utils :refer :all]
|
||||||
|
[play-clj.g2d :refer :all]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defn make [screen]
|
||||||
|
(rooms/make :music {:day :town-2 :night :night}
|
||||||
|
:interactions
|
||||||
|
{:left-dir {:box [91 60 125 140]
|
||||||
|
:script (actions/get-script
|
||||||
|
entities
|
||||||
|
(actions/walk-straight-to entities :ego [118 96])
|
||||||
|
(actions/transition-background entities :outside-jail [200 97])
|
||||||
|
(actions/walk-straight-to entities :ego [167 100]))
|
||||||
|
:cursor :left}
|
||||||
|
:chest {:box [151 107 180 124]
|
||||||
|
:script (actions/get-script entities
|
||||||
|
(actions/walk-to entities :ego [152 95])
|
||||||
|
(actions/talk entities :ego "Maybe my stuff is in here...")
|
||||||
|
(actions/play-animation entities :ego :reach)
|
||||||
|
(actions/talk entities :ego "It's locked tight!"))
|
||||||
|
:scripts {:sword (actions/get-script entities (actions/talk entities :ego "There's not enough room to swing my sword here."))
|
||||||
|
:crowbar (actions/get-script entities
|
||||||
|
(actions/talk entities :ego "Let's see if this can open this puppy up.")
|
||||||
|
(actions/walk-straight-to entities :ego [152 95] :face :right)
|
||||||
|
(actions/play-animation entities :ego :crowbar)
|
||||||
|
)}}}
|
||||||
|
:layers [(assoc (texture "inside-stash/background.png") :x 0 :y 0 :baseline 0)]
|
||||||
|
:entities {}
|
||||||
|
:collision "inside-stash/collision.png"
|
||||||
|
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||||
|
:start-pos [143 96]))
|
||||||
@@ -76,7 +76,10 @@
|
|||||||
(actions/talk entities :ego "Here goes nothing!")
|
(actions/talk entities :ego "Here goes nothing!")
|
||||||
(actions/play-animation entities :ego :squat)
|
(actions/play-animation entities :ego :squat)
|
||||||
(actions/play-animation entities :stash :open :stop? false)
|
(actions/play-animation entities :stash :open :stop? false)
|
||||||
(actions/walk-straight-to entities :ego [212 97])))
|
(actions/walk-straight-to entities :ego [212 97])
|
||||||
|
(actions/transition-background entities :inside-stash [118 96])
|
||||||
|
(actions/walk-straight-to entities :ego [142 96])
|
||||||
|
(actions/talk entities :ego "This must be Frankie Rockfist's secret stash!")))
|
||||||
|
|
||||||
(defn make [screen]
|
(defn make [screen]
|
||||||
(let [fountain (utils/make-anim "outside-jail/fountain.png" [42 50] 0.2 (range 3))
|
(let [fountain (utils/make-anim "outside-jail/fountain.png" [42 50] 0.2 (range 3))
|
||||||
@@ -197,7 +200,7 @@
|
|||||||
(actions/remove-entity entities :watch)
|
(actions/remove-entity entities :watch)
|
||||||
(actions/give entities :watch))))
|
(actions/give entities :watch))))
|
||||||
|
|
||||||
:stash (rooms/make-entity :stash (assoc (texture "outside-jail/closed-stash.png")
|
:stash (rooms/make-entity :stash (assoc (animation->texture screen open-stash)
|
||||||
:x 197 :y 94 :baseline 146
|
:x 197 :y 94 :baseline 146
|
||||||
:open open-stash
|
:open open-stash
|
||||||
:close close-stash))
|
:close close-stash))
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
[advent.screens.rooms.castle-gate :as rooms.castle-gate]
|
[advent.screens.rooms.castle-gate :as rooms.castle-gate]
|
||||||
[advent.screens.rooms.outside-house :as rooms.outside-house]
|
[advent.screens.rooms.outside-house :as rooms.outside-house]
|
||||||
[advent.screens.rooms.inside-house :as rooms.inside-house]
|
[advent.screens.rooms.inside-house :as rooms.inside-house]
|
||||||
|
[advent.screens.rooms.inside-stash :as rooms.inside-stash]
|
||||||
[advent.screens.rooms.inside-castle :as rooms.inside-castle]
|
[advent.screens.rooms.inside-castle :as rooms.inside-castle]
|
||||||
[advent.screens.rooms.inside-jail :as rooms.inside-jail]
|
[advent.screens.rooms.inside-jail :as rooms.inside-jail]
|
||||||
[advent.screens.rooms.outside-jail :as rooms.outside-jail]
|
[advent.screens.rooms.outside-jail :as rooms.outside-jail]
|
||||||
@@ -91,36 +92,36 @@
|
|||||||
entities))))
|
entities))))
|
||||||
|
|
||||||
#_(defn drink-blergh [entities]
|
#_(defn drink-blergh [entities]
|
||||||
(actions/walk-straight-to entities :ego [205 45])
|
(actions/walk-straight-to entities :ego [205 45])
|
||||||
(sound! (sound "ego/potion.ogg") :play)
|
(sound! (sound "ego/potion.ogg") :play)
|
||||||
(actions/play-animation entities :ego :grow :stop? false)
|
(actions/play-animation entities :ego :grow :stop? false)
|
||||||
(actions/do-dialogue entities
|
(actions/do-dialogue entities
|
||||||
:blergh "What this? A potion of strength?"
|
:blergh "What this? A potion of strength?"
|
||||||
:blergh "You're still no match for me."
|
:blergh "You're still no match for me."
|
||||||
:blergh "Give it to me, or I'll make you regret it!")
|
:blergh "Give it to me, or I'll make you regret it!")
|
||||||
(actions/present-choices entities {:choices ["Ok."
|
(actions/present-choices entities {:choices ["Ok."
|
||||||
{:run (fn [_]
|
{:run (fn [_]
|
||||||
(actions/talk entities :ego "Ok." :anim :grow-talk :stop? false)
|
(actions/talk entities :ego "Ok." :anim :grow-talk :stop? false)
|
||||||
(actions/talk entities :ego "Here you go." :anim :grow-talk)
|
(actions/talk entities :ego "Here you go." :anim :grow-talk)
|
||||||
(actions/do-dialogue entities
|
(actions/do-dialogue entities
|
||||||
:blergh "Yes! Now I can drink this whole thing and can become powerful enough to rule the world!"
|
:blergh "Yes! Now I can drink this whole thing and can become powerful enough to rule the world!"
|
||||||
:blergh "[#AAFFAAFF]*gulp*[]"
|
:blergh "[#AAFFAAFF]*gulp*[]"
|
||||||
:blergh "What's this? What's happening?")
|
:blergh "What's this? What's happening?")
|
||||||
(actions/talk entities :ego "Uh oh." :anim :grow-talk :stop? false)
|
(actions/talk entities :ego "Uh oh." :anim :grow-talk :stop? false)
|
||||||
(actions/walk-straight-to entities :ego [100 45] :face :right)
|
(actions/walk-straight-to entities :ego [100 45] :face :right)
|
||||||
(actions/play-animation entities :blergh :grow :stop? false)
|
(actions/play-animation entities :blergh :grow :stop? false)
|
||||||
(actions/do-dialogue entities :ego "'Not more than that do drink,\nOr you'll push your body to the brink.'"
|
(actions/do-dialogue entities :ego "'Not more than that do drink,\nOr you'll push your body to the brink.'"
|
||||||
:ego "Brilliant! I win!")
|
:ego "Brilliant! I win!")
|
||||||
(actions/walk-straight-to entities :ego [800 75] :face :right)
|
(actions/walk-straight-to entities :ego [800 75] :face :right)
|
||||||
(actions/update-state entities (fn [s] (assoc s :blergh-dead? true))))}
|
(actions/update-state entities (fn [s] (assoc s :blergh-dead? true))))}
|
||||||
"No way!"
|
"No way!"
|
||||||
{:run (fn [_]
|
{:run (fn [_]
|
||||||
(actions/talk entities :ego "No way!" :anim :grow-talk)
|
(actions/talk entities :ego "No way!" :anim :grow-talk)
|
||||||
(actions/talk entities :blergh "Then take this!")
|
(actions/talk entities :blergh "Then take this!")
|
||||||
(actions/play-animation entities :blergh :swing)
|
(actions/play-animation entities :blergh :swing)
|
||||||
(actions/walk-straight-to entities :ego [100 45] :anim :squat :override-dir :right :speed 3.0)
|
(actions/walk-straight-to entities :ego [100 45] :anim :squat :override-dir :right :speed 3.0)
|
||||||
(actions/do-dialogue entities :ego "Yeow!!"
|
(actions/do-dialogue entities :ego "Yeow!!"
|
||||||
:ego "Even with that potion, I'm not strong enough."))}]}))
|
:ego "Even with that potion, I'm not strong enough."))}]}))
|
||||||
|
|
||||||
|
|
||||||
(defn get-ego [screen start-pos start-scale]
|
(defn get-ego [screen start-pos start-scale]
|
||||||
@@ -145,13 +146,13 @@
|
|||||||
start-squat (animation 0.05 (for [i [0 1 2 3 4]]
|
start-squat (animation 0.05 (for [i [0 1 2 3 4]]
|
||||||
(texture (aget squat-sheet 0 i))))
|
(texture (aget squat-sheet 0 i))))
|
||||||
end-squat (animation 0.05 (for [i [4 3 2 1 0]]
|
end-squat (animation 0.05 (for [i [4 3 2 1 0]]
|
||||||
(texture (aget squat-sheet 0 i))))
|
(texture (aget squat-sheet 0 i))))
|
||||||
squat-anim (animation 0.05 (for [i [0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 2 1] ]
|
squat-anim (animation 0.05 (for [i [0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 2 1] ]
|
||||||
(texture (aget squat-sheet 0 i))))
|
(texture (aget squat-sheet 0 i))))
|
||||||
reach-anim (animation 0.1 (for [i [0 1 2 3 3 3 3 3 3 2 1 0]]
|
reach-anim (animation 0.1 (for [i [0 1 2 3 3 3 3 3 3 2 1 0]]
|
||||||
(texture (aget reach-sheet 0 i))))
|
(texture (aget reach-sheet 0 i))))
|
||||||
reach-start (animation 0.1 (for [i [0 1 2 3 ]]
|
reach-start (animation 0.1 (for [i [0 1 2 3 ]]
|
||||||
(texture (aget reach-sheet 0 i))))
|
(texture (aget reach-sheet 0 i))))
|
||||||
reach-stop (animation 0.1 (for [i [3 2 1 0]]
|
reach-stop (animation 0.1 (for [i [3 2 1 0]]
|
||||||
(texture (aget reach-sheet 0 i))))
|
(texture (aget reach-sheet 0 i))))
|
||||||
cat-toy-anim (animation 0.1 (for [i [0 0 1 1 2 2 3 4 3 2 3 4 3 2 3 4 3 2 3 4 3 2 2 1 1 0 0]]
|
cat-toy-anim (animation 0.1 (for [i [0 0 1 1 2 2 3 4 3 2 3 4 3 2 3 4 3 2 3 4 3 2 2 1 1 0 0]]
|
||||||
@@ -173,6 +174,7 @@
|
|||||||
grow-talk (utils/make-anim "ego/grow-talk.png" [18 36] 0.2 (range 2))
|
grow-talk (utils/make-anim "ego/grow-talk.png" [18 36] 0.2 (range 2))
|
||||||
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]) )
|
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]) )
|
||||||
spear (utils/make-anim "ego/spear.png" [18 100] 0.2 [0 1 2 3 2 3 2 3 2 3 2 1 0])
|
spear (utils/make-anim "ego/spear.png" [18 100] 0.2 [0 1 2 3 2 3 2 3 2 3 2 1 0])
|
||||||
|
crowbar (utils/make-anim "ego/crowbar.png" [36 36] 0.1 [0 0 0 1 1 2 2 2 2 2 3 2 3 2 3 2 3 2 3 3 3 1 1 0 0 0])
|
||||||
|
|
||||||
ego {:right {:walk walk-right
|
ego {:right {:walk walk-right
|
||||||
:stand stand-anim
|
:stand stand-anim
|
||||||
@@ -185,6 +187,7 @@
|
|||||||
:cat-toy-first-half cat-toy-first-half
|
:cat-toy-first-half cat-toy-first-half
|
||||||
:cat-toy-last-half cat-toy-last-half
|
:cat-toy-last-half cat-toy-last-half
|
||||||
:grow grow
|
:grow grow
|
||||||
|
:crowbar crowbar
|
||||||
:get-sick get-sick
|
:get-sick get-sick
|
||||||
:hold-up-to-window hold-up-to-window
|
:hold-up-to-window hold-up-to-window
|
||||||
:swing swing
|
:swing swing
|
||||||
@@ -342,6 +345,7 @@
|
|||||||
(update! screen :renderer (stage) :camera (orthographic))
|
(update! screen :renderer (stage) :camera (orthographic))
|
||||||
(let [_ (input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
|
(let [_ (input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
|
||||||
rooms {:inside-house (rooms.inside-house/make screen)
|
rooms {:inside-house (rooms.inside-house/make screen)
|
||||||
|
:inside-stash (rooms.inside-stash/make screen)
|
||||||
:outside-house (rooms.outside-house/make screen)
|
:outside-house (rooms.outside-house/make screen)
|
||||||
:behind-house (rooms.behind-house/make screen)
|
:behind-house (rooms.behind-house/make screen)
|
||||||
:cat-tree (rooms.cat-tree/make screen)
|
:cat-tree (rooms.cat-tree/make screen)
|
||||||
|
|||||||
Reference in New Issue
Block a user