sheep hoarding.
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/0.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/1.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/2.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/3.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/4.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/5.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/6.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/7.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/8.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-1.pxa/9.pxi
Normal file
46
desktop/asset-work/outsidehouse/sheep-1.pxa/CelData.plist
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?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>0.5</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>2</real>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</plist>
|
||||||
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/0.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/1.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/2.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/3.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/4.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/5.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/6.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/7.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/8.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-2.pxa/9.pxi
Normal file
46
desktop/asset-work/outsidehouse/sheep-2.pxa/CelData.plist
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?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>0.5</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>2</real>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</plist>
|
||||||
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/0.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/1.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/2.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/3.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/4.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/5.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/6.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/7.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/8.pxi
Normal file
BIN
desktop/asset-work/outsidehouse/sheep-3.pxa/9.pxi
Normal file
46
desktop/asset-work/outsidehouse/sheep-3.pxa/CelData.plist
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?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>0.5</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>2</real>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</plist>
|
||||||
|
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 223 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 182 KiB |
@@ -6,6 +6,7 @@
|
|||||||
[advent.screens.rooms.inside-castle :as inside-castle]
|
[advent.screens.rooms.inside-castle :as inside-castle]
|
||||||
[advent.actions :as actions]
|
[advent.actions :as actions]
|
||||||
[advent.tween :as tween]
|
[advent.tween :as tween]
|
||||||
|
[advent.steam :as steam]
|
||||||
[advent.utils :as utils]
|
[advent.utils :as utils]
|
||||||
[clojure.zip :as zip]
|
[clojure.zip :as zip]
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
ego-sheep-loc))
|
ego-sheep-loc))
|
||||||
|
|
||||||
(defn is-sheep-close? [entities]
|
(defn is-sheep-close? [entities]
|
||||||
(< (dist-to-sheep entities) 45))
|
(< (dist-to-sheep entities) 50))
|
||||||
|
|
||||||
(defn is-ready-for-slingshot [entities]
|
(defn is-ready-for-slingshot [entities]
|
||||||
(and (actions/has-obtained? entities :broken-clock)
|
(and (actions/has-obtained? entities :broken-clock)
|
||||||
@@ -65,8 +66,17 @@
|
|||||||
(actions/has-obtained? entities :money)
|
(actions/has-obtained? entities :money)
|
||||||
(not (actions/has-item? entities :money))))
|
(not (actions/has-item? entities :money))))
|
||||||
|
|
||||||
|
(defn set-sheep-anim [screen entities]
|
||||||
|
(if-let [wool-count (get-in entities [:state :wool-count])]
|
||||||
|
(update-in entities
|
||||||
|
[:room :entities :sheep]
|
||||||
|
#(actions/start-animation screen %
|
||||||
|
(get % [:stand wool-count])))
|
||||||
|
|
||||||
|
entities))
|
||||||
|
|
||||||
(defn walk-to-sheep [entities]
|
(defn walk-to-sheep [entities]
|
||||||
(actions/walk-to entities :ego [119 134] :skip-type :end))
|
(actions/walk-to entities :ego [118 131] :skip-type :end))
|
||||||
|
|
||||||
(defn magic [entities]
|
(defn magic [entities]
|
||||||
(actions/run-action entities
|
(actions/run-action entities
|
||||||
@@ -592,8 +602,11 @@
|
|||||||
(let [sheep-stand-sheet (texture! (utils/get-texture "outsidehouse/sheep-anim.png") :split 33 21)
|
(let [sheep-stand-sheet (texture! (utils/get-texture "outsidehouse/sheep-anim.png") :split 33 21)
|
||||||
sheep-walk-sheet (texture! (utils/get-texture "outsidehouse/sheep-walk.png") :split 33 21)
|
sheep-walk-sheet (texture! (utils/get-texture "outsidehouse/sheep-walk.png") :split 33 21)
|
||||||
lamb-walk-sheet (texture! (utils/get-texture "outsidehouse/lamb-walk.png") :split 27 28)
|
lamb-walk-sheet (texture! (utils/get-texture "outsidehouse/lamb-walk.png") :split 27 28)
|
||||||
sheep-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 9 10 (repeat 25 11) (repeat 15 12)])]
|
sheep-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 2 1 (repeat 25 11) (repeat 15 12)])]
|
||||||
(aget sheep-stand-sheet 0 i)))
|
(aget sheep-stand-sheet 0 i)))
|
||||||
|
sheep-1 (utils/make-anim "outsidehouse/sheep-1.png" [33 21] 0.15 (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 2 1 (repeat 25 0) (repeat 15 9)]))
|
||||||
|
sheep-2 (utils/make-anim "outsidehouse/sheep-2.png" [33 21] 0.15 (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 2 1 (repeat 25 0) (repeat 15 9)]))
|
||||||
|
sheep-3 (utils/make-anim "outsidehouse/sheep-3.png" [33 21] 0.15 (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 2 1 (repeat 25 0) (repeat 15 9)]))
|
||||||
door (utils/make-anim "outsidehouse/door.png" [24 58] 0.15 (flatten [(range 4) 3 3 3 3 3 3 3]))
|
door (utils/make-anim "outsidehouse/door.png" [24 58] 0.15 (flatten [(range 4) 3 3 3 3 3 3 3]))
|
||||||
sheep-walk (animation 0.05 (for [i (range 6)]
|
sheep-walk (animation 0.05 (for [i (range 6)]
|
||||||
(aget sheep-walk-sheet 0 i)))
|
(aget sheep-walk-sheet 0 i)))
|
||||||
@@ -668,6 +681,9 @@
|
|||||||
(assoc (utils/get-texture "outsidehouse/fg2.png") :x (- 320 55) :y 0 :baseline 1000 :parallax 1.5)]}
|
(assoc (utils/get-texture "outsidehouse/fg2.png") :x (- 320 55) :y 0 :baseline 1000 :parallax 1.5)]}
|
||||||
:entities {:sheep (actions/start-animation screen
|
:entities {:sheep (actions/start-animation screen
|
||||||
(assoc (animation->texture screen sheep-stand) :x 38 :y 160 :baseline 80
|
(assoc (animation->texture screen sheep-stand) :x 38 :y 160 :baseline 80
|
||||||
|
[:stand 1] sheep-1
|
||||||
|
[:stand 2] sheep-2
|
||||||
|
[:stand 3] sheep-3
|
||||||
:scale-x (scaler [38 160])
|
:scale-x (scaler [38 160])
|
||||||
:scale-y (scaler [38 160])
|
:scale-y (scaler [38 160])
|
||||||
:box [38 160 71 181]
|
:box [38 160 71 181]
|
||||||
@@ -679,6 +695,15 @@
|
|||||||
(if (is-sheep-close? @entities)
|
(if (is-sheep-close? @entities)
|
||||||
(do (walk-to-sheep entities)
|
(do (walk-to-sheep entities)
|
||||||
(actions/play-animation entities :ego :reach)
|
(actions/play-animation entities :ego :reach)
|
||||||
|
(actions/update-state entities #(assoc % :wool-count (inc (or (:wool-count %) 0))))
|
||||||
|
(when (= 3 (doto (get-in @entities [:state :wool-count]) println))
|
||||||
|
(steam/set-achievement "SHEEP_HORDER"))
|
||||||
|
|
||||||
|
(actions/update-entities entities #(update-in
|
||||||
|
% [:room :entities :sheep]
|
||||||
|
(fn [s]
|
||||||
|
(let [which (get-in % [:state :wool-count])]
|
||||||
|
(assoc s :anim (get s [:stand which]))))))
|
||||||
(actions/give entities :wool)
|
(actions/give entities :wool)
|
||||||
(actions/talk entities :ego "I guess her wool is shedding.")
|
(actions/talk entities :ego "I guess her wool is shedding.")
|
||||||
)
|
)
|
||||||
@@ -700,7 +725,7 @@
|
|||||||
:carrot (actions/get-script entities
|
:carrot (actions/get-script entities
|
||||||
(walk-to-sheep entities)
|
(walk-to-sheep entities)
|
||||||
(actions/talk entities :ego "Come on, girl, get the carrot!")
|
(actions/talk entities :ego "Come on, girl, get the carrot!")
|
||||||
(actions/walk-straight-to entities :sheep [90 138] :update-baseline? false)
|
(actions/walk-straight-to entities :sheep [85 138] :update-baseline? false)
|
||||||
(actions/play-animation entities :ego :reach)
|
(actions/play-animation entities :ego :reach)
|
||||||
(actions/remove-item entities :carrot)
|
(actions/remove-item entities :carrot)
|
||||||
(actions/update-state entities (fn [s] (assoc s :coaxed-sheep? true)))
|
(actions/update-state entities (fn [s] (assoc s :coaxed-sheep? true)))
|
||||||
@@ -826,10 +851,11 @@
|
|||||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||||
(as-> entities entities
|
(as-> entities entities
|
||||||
(if (get-in entities [:state :coaxed-sheep?])
|
(if (get-in entities [:state :coaxed-sheep?])
|
||||||
(let [scale ((get-in entities [:room :scale-fn]) [90 138])]
|
(let [scale ((get-in entities [:room :scale-fn]) [85 138])]
|
||||||
(update-in entities [:room :entities :sheep] #(assoc % :x 90 :y 138 :baseline 40 :scale-x scale :scale-y scale)))
|
(update-in entities [:room :entities :sheep] #(assoc % :x 85 :y 138 :baseline 40 :scale-x scale :scale-y scale)))
|
||||||
entities)
|
entities)
|
||||||
(if (= :night (get-in entities [:state :time]))
|
(if (= :night (get-in entities [:state :time]))
|
||||||
(make-night screen entities)
|
(make-night screen entities)
|
||||||
entities)))
|
entities)
|
||||||
|
(set-sheep-anim screen entities)))
|
||||||
:start-pos [30 80])))
|
:start-pos [30 80])))
|
||||||
|
|||||||