progresss on blergh fight.

This commit is contained in:
2015-01-08 22:24:13 -08:00
parent 3fe5071467
commit b89cf36e25
32 changed files with 121 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,30 @@
<?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>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,38 @@
<?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>
<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>

View File

@@ -516,7 +516,11 @@
(>= (get-in entities [:transition :opacity]) 1.0))
(terminate [this screen entities]
entities)
(if-let [next-time (get-in entities [:state :next-time])]
(-> entities
(assoc-in [:state :time] next-time)
(assoc-in [:state :next-time] nil))
entities))
(can-skip? [this screen entities]
false))
(run-action entities

View File

@@ -178,7 +178,7 @@
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.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]))
monocle (utils/make-anim "inside-castle/monocle.png" [7 7] 0.05 (flatten [(repeat 70 0) 1 2 3 3 3 2 1]))]
(rooms/make :music {:day :town-1 :night :night}
(rooms/make :music {:day :town-1 :night :night :sunrise :night}
:interactions
{:right-door {:box [286 140 306 160]
:cursor :right
@@ -249,7 +249,8 @@
:layers {:day [(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)]
:night [(assoc (texture "inside-castle/background-dark.png") :x 0 :y 0 :baseline 0)
(assoc (texture "inside-castle/pedestal-overlay-dark.png") :x 0 :y 0 :baseline 135)]}
(assoc (texture "inside-castle/pedestal-overlay-dark.png") :x 0 :y 0 :baseline 135)]
:sunrise [(assoc (texture "inside-castle/background-sunrise.png") :x 0 :y 0 :baseline 0)]}
:blackout (assoc (texture "black.png")
:x 0 :y 0
:width 320

View File

@@ -122,7 +122,7 @@
:else (do-initial-peddler-conversation entities)))
(defn should-block? [entities]
(and (= :night (get-in @entities [:state :time]))
(and (:night (get-in @entities [:state :time]))
(actions/has-obtained? entities :flask-2)
(not (actions/has-item? entities :magic-slingshot))))
@@ -258,7 +258,7 @@
steer-stand (animation 0.2 (for [i [0 0 0 0 0 0 0 0 0 1 0 2 0 1 0 2 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 3 3 3 3 3 0 0 0 0]]
(aget steer-sheet 0 i)))
flies-stand (utils/make-anim "outside-castle/flies.png" [15 15] 0.075 [0 1 2 1])]
(rooms/make :music {:day :town-2 :night :night}
(rooms/make :music {:day :town-2 :night :night :sunrise :night}
:interactions
{:right-dir {:box [300 40 320 140]
:script (actions/get-script
@@ -291,7 +291,8 @@
(actions/talk entities :ego "No one will notice one missing.")
(actions/give entities :carrot))))}}
:layers {:day [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)]
:night [(assoc (texture "outside-castle/background-dark.png") :x 0 :y 0 :baseline 0)]}
:night [(assoc (texture "outside-castle/background-dark.png") :x 0 :y 0 :baseline 0)]
:sunrise [(assoc (texture "outside-castle/background-sunrise.png") :x 0 :y 0 :baseline 0)]}
:entities {:peddler (actions/start-animation screen
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
:talk peddler-talk :stand peddler-stand
@@ -378,6 +379,6 @@
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
:start-pos [310 80]
:apply-state (fn [entities]
(if (= :night (get-in entities [:state :time]))
(if (#{:night :sunrise} (get-in entities [:state :time]))
(make-night entities)
entities)))))

View File

@@ -54,9 +54,16 @@
:ego "It worked!"
:ego "I now have The Slinger's Shot."
:ego "And just in time, too. It's getting light.")
(actions/update-state entities #(assoc % :next-time :sunrise))
(walk-to-castle entities)
(outside-castle/go-through-gate entities)
(inside-castle/walk-to-blergh entities))))
(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?"))))
:broken-clock (actions/get-script entities
(actions/walk-to entities :ego [141 90] :face :right)
(actions/play-animation entities :ego :reach)

View File

@@ -31,7 +31,8 @@
blergh-stand-anim (animation 0.7 [blergh-flex blergh-stand])
blergh-swing (utils/make-anim "space/blergh-swing.png" [106 165] 0.1 [0 0 1 2 3 4 ])
blergh-appear (utils/make-anim "space/blergh-appear.png" [106 165] 0.05 (flatten [(range 13) 12 12 12 12 12 12 12 12 12 12 12 12 12 ]))
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]) ]
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])]
(rooms/make :music :town-1
:interactions
{}
@@ -57,10 +58,34 @@
(common/go-to-jail entities)
(actions/do-dialogue entities :ego "Hey!"
:ego "What's going on? I was just about to teach Blergh a lesson!"))}))
:ego "What's going on? I was just about to teach Blergh a lesson!"))
:magic-slingshot (actions/get-script entities
(actions/do-dialogue entities
:ego "Hey Blergh!"
:ego "Take 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/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))
(actions/do-dialogue entities
:blergh "Argh! My magic lightning helmet!"
:blergh "No matter. I will destroy you with my bare hands!"))}))
:entities {}
:bullet (assoc (animation->texture screen bullet)
:x 130 :y 85 :baseline 241
:walk bullet)
:broken-jewel (assoc (texture "space/broken-jewel.png")
:x 222 :y 172 :baseline 240)
:collision "space/collision.png"
:scale-fn (constantly 1.5)
:start-pos [43 80]
:start-pos [140 55]
:apply-state (fn [e]
(assoc-in e [:room :entities :blergh] (get-in e [:room :blergh]))))))
(as-> e e
(if (get-in e [:state :broke-jewel?])
(assoc-in e [:room :entities :broken-jewel] (get-in e [:room :entities :broken-jewel]))
e)
(assoc-in e [:room :entities :blergh] (get-in e [:room :blergh])))
))))

View File

@@ -175,6 +175,7 @@
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])
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])
shoot (utils/make-anim "ego/shoot.png" [24 36] 0.075 [0 0 0 1 1 2 2 2 2 2 2 2 2 3 4 5 4])
ego {:right {:walk walk-right
:stand stand-anim
@@ -196,6 +197,7 @@
:reach-down reach-down
:reach-start reach-start
:reach-stop reach-stop
:shoot shoot
[:fire 1] fire-1-anim
[:fire 2] fire-2-anim
[:fire 3] fire-3-anim
@@ -218,6 +220,7 @@
:reach-down (utils/flip reach-down)
:reach-start (utils/flip reach-start)
:reach-stop (utils/flip reach-stop)
:shoot (utils/flip shoot)
[:fire 1] (utils/flip fire-1-anim)
[:fire 2] (utils/flip fire-2-anim)
[:fire 3] (utils/flip fire-3-anim)