made things a little more rewarding.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
@@ -22,5 +22,13 @@
|
||||
<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>
|
||||
|
||||
@@ -1 +1 @@
|
||||
{:sound-volume 0.0, :music-volume 0.0}
|
||||
{:sound-volume 56.0, :music-volume 30.0}
|
||||
@@ -36,6 +36,13 @@
|
||||
(actions/has-obtained? entities :money)
|
||||
(not (actions/has-item? entities :money))))
|
||||
|
||||
(defn walk-to-sheep [entities]
|
||||
(actions/walk-to entities :ego [154 133])
|
||||
(actions/walk-straight-to entities :ego [119 134] :update-baseline? false))
|
||||
|
||||
(defn leave-sheep [entities]
|
||||
(actions/walk-straight-to entities :ego [154 133] :update-baseline? false))
|
||||
|
||||
(defn put-something-in-cauldron [item]
|
||||
(condp = item
|
||||
:money (actions/get-script entities
|
||||
@@ -337,13 +344,13 @@
|
||||
(if (actions/has-item? entities :wool)
|
||||
(actions/talk entities :ego "The sheep has given me enough wool.")
|
||||
(if (is-sheep-close? @entities)
|
||||
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
|
||||
(do (walk-to-sheep entities)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/give entities :wool)
|
||||
(actions/talk entities :ego "I guess her wool is shedding."))
|
||||
(actions/talk entities :ego "I guess her wool is shedding.")
|
||||
(leave-sheep entities))
|
||||
(do
|
||||
(actions/talk entities :ego "Come here mama sheep!")
|
||||
(actions/glad entities)
|
||||
(actions/play-animation entities :ego :sigh)
|
||||
|
||||
(actions/talk entities :ego "She's too far away for me to pet her.")))))
|
||||
@@ -351,31 +358,34 @@
|
||||
:wool (actions/get-script entities
|
||||
(actions/talk entities :ego "She doesn't need it back."))
|
||||
:grass (actions/get-script entities
|
||||
(actions/walk-to entities :ego ego-sheep-loc :face :left)
|
||||
(walk-to-sheep entities)
|
||||
(actions/talk entities :ego "Come on girl, get the grass!")
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/talk entities :ego "I think she's not interested."))
|
||||
:carrot (actions/get-script entities
|
||||
(actions/walk-to entities :ego ego-sheep-loc :face :left)
|
||||
(walk-to-sheep entities)
|
||||
(actions/talk entities :ego "Come on girl, get the carrot!")
|
||||
(actions/walk-straight-to entities :sheep [90 138] :update-baseline? false)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(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)))
|
||||
(leave-sheep entities))
|
||||
:flask-1 (actions/get-script entities
|
||||
(if (is-sheep-close? @entities)
|
||||
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(do (walk-to-sheep entities)
|
||||
(actions/play-animation entities :ego :milk)
|
||||
(actions/remove-item entities :flask-1)
|
||||
(actions/give entities :flask-1-with-milk)
|
||||
(actions/talk entities :ego "Sheeps milk."))
|
||||
(actions/talk entities :ego "Sheeps milk.")
|
||||
(leave-sheep entities))
|
||||
(actions/talk entities :ego "She's too far away.")))
|
||||
:flask-1-with-mushrooms
|
||||
(actions/get-script entities
|
||||
(if (is-sheep-close? @entities)
|
||||
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(items/make-cream-of-mushroom entities))
|
||||
(do (walk-to-sheep entities)
|
||||
(actions/play-animation entities :ego :milk)
|
||||
(items/make-cream-of-mushroom entities)
|
||||
(leave-sheep entities))
|
||||
(actions/talk entities :ego "She's too far away.")))
|
||||
nil)
|
||||
:left {:walk (utils/flip sheep-walk)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
(def start-y 83)
|
||||
|
||||
(defn close [entities]
|
||||
|
||||
(screen! @(resolve 'advent.screens.scene/scene) :on-reactivate)
|
||||
(-> entities
|
||||
(assoc :shown? false)
|
||||
@@ -69,6 +70,7 @@
|
||||
entities))
|
||||
|
||||
:show-screen (fn [{:keys [success failure]} [entities]]
|
||||
(sound! (sound "inside-house/open-safe.ogg") :play (utils/current-sound-volume))
|
||||
(assoc entities
|
||||
:start-showing? true
|
||||
:button-choices []
|
||||
@@ -103,7 +105,9 @@
|
||||
(> x (+ start-x 200))
|
||||
(< y start-y)
|
||||
(> y (+ start-y 75)))
|
||||
(close entities))))))
|
||||
(do
|
||||
(sound! (sound "inside-house/close-safe.ogg") :play (utils/current-sound-volume))
|
||||
(close entities)))))))
|
||||
|
||||
:on-resize (fn [{:keys [width height viewport]} entities]
|
||||
(.update viewport width height)))
|
||||
|
||||
@@ -198,6 +198,7 @@
|
||||
scared-walk (utils/make-anim "ego/scared-walk.png" [16 36] 0.05 (range 6))
|
||||
sigh (utils/make-anim "ego/sigh.png" [18 36] 0.08 [0 0 0 0 1 1 1 2 3 4 5 6 7 8 8 8 8 8 8 8 8 8 0 0 0 0 ])
|
||||
glad (utils/make-anim "ego/glad.png" [20 46] 0.04 (flatten [0 1 2 3 4 (repeat 8 [5 5 5]) (repeat 20 0)]))
|
||||
milk (utils/make-anim "ego/squat.png" [18 36] 0.05 [0 1 2 2 3 3 3 3 3 3 6 5 6 5 6 5 6 5 6 5 6 5 6 5 6 5 6 5 6 5 3 3 3 3 3 3 3 3 3 3 3 2 1 0])
|
||||
|
||||
ego {:right {:walk walk-right
|
||||
:stand stand-anim
|
||||
@@ -233,7 +234,8 @@
|
||||
:scared-talk scared-talk
|
||||
:scared-walk scared-walk
|
||||
:sigh sigh
|
||||
:glad glad}
|
||||
:glad glad
|
||||
:milk milk}
|
||||
:left {:walk (utils/flip walk-right)
|
||||
:stand (utils/flip stand-anim)
|
||||
:talk (utils/flip talk-anim)
|
||||
@@ -259,12 +261,14 @@
|
||||
:spear (utils/flip spear)
|
||||
:pant (utils/flip pant)
|
||||
:sigh (utils/flip sigh)
|
||||
:glad (utils/flip glad)}
|
||||
:glad (utils/flip glad)
|
||||
:milk (utils/flip milk)}
|
||||
:baseline (- 240 (last start-pos))
|
||||
:facing :right
|
||||
:origin-x 9
|
||||
:origin-y 0
|
||||
:scaled true
|
||||
:milk-sound (sound "outsidehouse/milk.ogg")
|
||||
:step-sound-1 (sound "ego/step-1.ogg")
|
||||
:step-sound-2 (sound "ego/step-2.ogg")
|
||||
:sigh-sound (sound "ego/sigh.ogg")
|
||||
@@ -338,7 +342,10 @@
|
||||
143 [:blink 0.15]
|
||||
176 [:blink 0.15]}
|
||||
(get-in ego [:left :sigh]) {1 [:sigh-sound 0.4]}
|
||||
(get-in ego [:right :sigh]) {1 [:sigh-sound 0.4]}}
|
||||
(get-in ego [:right :sigh]) {1 [:sigh-sound 0.4]}
|
||||
(get-in ego [:left :milk]) {8 [:milk-sound 1.0]}
|
||||
(get-in ego [:right :milk]) {8 [:milk-sound 1.0]}
|
||||
}
|
||||
:anim-merges {(get-in ego [:right :shock]) {:origin-x 15}
|
||||
:default {:origin-x 9}})]
|
||||
(actions/start-animation screen
|
||||
|
||||
Reference in New Issue
Block a user