Merge branch 'master' of bitbucket.org:brycecovertoperations/advent

This commit is contained in:
Bryce Covert
2015-09-05 16:20:45 -07:00
36 changed files with 266 additions and 179 deletions

View File

@@ -1,23 +1,14 @@
ART
+ shitty plates and knights
+ Update all collisions
+ can walk to top corner in house screen
+ mark the squeaky board a bit
+ outside castle trees need to be updated
+ gate z-index
PROGRAMMING
+ fight with blergh at end isn't great
+ blergh taunts for first fight
+ ending
+ you can drink the strength potion while in blood clots hand
+ proper save/settings file location
+ Save slots?
+ descriptions for all items when used on self.
+ try to have dialogue for every wrong interaction
+ Have to open curtains
+ grime on portrait
+ impersonate bubba dialogue tree
+ Dialogue frozen
AUDIO

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 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.

Binary file not shown.

Binary file not shown.

View 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>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>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1 +1 @@
{:sound-volume 69.0, :music-volume 86.0}
{:sound-volume 67.0, :music-volume 86.0}

View File

@@ -74,10 +74,10 @@
:frankie "What?!"
:frankie "Impossible!")
(actions/play-animation entities :frankie :laugh)
(actions/update-state entities (fn [s] (assoc s :bubba-gone? true)))
(actions/do-dialogue entities :frankie "Bubba, go check to make sure our stuff is safe."
:goon-2 "You got it boss.")
(actions/walk-straight-to entities :goon-2 [0 100])
(actions/update-state entities (fn [s] (assoc s :bubba-gone? true))))}
(actions/walk-straight-to entities :goon-2 [0 100]))}
"Nevermind."
{:run #(actions/respond entities % :frankie "Come back when you've got some good valuables.")}]}))
@@ -102,7 +102,7 @@
:night-profile :sprite
:scale-x 1.4
:scale-y 1.4
:talk-color (color 0.6 0.2 0.6 1.0)
:talk-color common/frankie-color
:talk talk
:flex flex
:stand stand
@@ -202,7 +202,7 @@
(actions/talk entities :goon-2 "You made me lose my coin, Dipstick!" :anim :search)
(actions/talk entities :ego "Umm, sorry!"))
(do
(actions/do-dialogue entities :ego "Hey Bubba!"
(actions/do-dialogue entities :ego "Hi Bubba."
:goon-2 "Beat it, Dipstick."))))
:scripts {:money (actions/get-script entities
(actions/do-dialogue entities :ego "I don't want to give it back!"))
@@ -215,12 +215,16 @@
(defn attempt-walking-through-gate [entities]
(actions/walk-to entities :ego [157 83] :skip-type :end)
(actions/walk-straight-to entities :ego [100 83])
(actions/transition-background entities :inside-castle [280 145])
(actions/walk-to entities :ego [245 90] :skip-type :end))
(defn flip-coin [screen entities]
(if (and (= 0 (rand-int 2))
(not (get-in entities [:state :has-dropped-coin?])))
(not (get-in entities [:state :has-dropped-coin?]))
(not (get-in entities [:state :bubba-gone?]))
(= (get-in entities [:room :entities :goon-2 :anim])
(get-in entities [:room :entities :goon-2 :stand])))
(-> entities
(update-in [:room :entities :coin-flip] (fn [cf] (-> (actions/start-animation screen cf :coinflip)
(assoc :opacity 1.0))))
@@ -251,8 +255,6 @@
:script (actions/get-script entities (attempt-walking-through-gate entities))
:cursor :left}
:big-tree {:box [20 10 82 235]
:scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}}
:window {:box [192 157 215 215]
:script (actions/get-script entities
(actions/talk entities :ego "That's a big window!"))
@@ -269,8 +271,10 @@
(Thread/sleep 2000)
(actions/walk-straight-to entities :ego [285 71]))}}}
:layers {:day [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)]
:night [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)]}
:layers {:day [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]
:night [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]}
:entities {:frankie (make-frankie screen)
:goon-1 (make-goon-1 screen)
:goon-2 (make-goon-2 screen)

View File

@@ -11,7 +11,8 @@
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.math :refer :all]
[play-clj.g2d :refer :all]))
[play-clj.g2d :refer :all])
(:import [com.badlogic.gdx.graphics Color]))
(defn go-to-jail [entities]
@@ -86,16 +87,18 @@
:ego "'Also, you'll need to add a split second.'"
:ego "'Then, dip the Slinger's Shot in to complete the spell.'"
:ego "'Don't forget about my secret stash of helpful stuff.'"))
(def frankie-color (Color/valueOf "9907CFFF"))
(defn listen-to-frankie [entities]
(let [respond (fn [msg]
(actions/talk entities :ego msg :animate? false :stop? false :color (color 0.6 0.2 0.6 1.0))
(actions/talk entities :ego msg :animate? false :stop? false :color frankie-color)
(Thread/sleep 200))
talk (fn [msg]
(actions/talk entities :ego msg :animate? false :stop? false)
(Thread/sleep 200))]
(talk "Hello?")
(respond "Who said that?!")
(respond "What the?! A walkie-talkie?")
(respond "Who's there?")
(actions/present-choices entities
{:choices ["It's me, Tick!"
{:run #(do
@@ -224,6 +227,7 @@
(-> entities
(update-in [:room :entities :bloodclot] #(actions/start-animation screen % :explode))
(update-in [:room :entities] dissoc :broken-jewel)
(update-in [:room :entities] dissoc :bloodclot-head)
(assoc-in [:room :entities :ego :facing] :right)
(update-in [:room :entities :ego] #(actions/start-animation screen % :crawl))))
@@ -315,113 +319,112 @@
(skip-type [this screen entities]
:none)))
(defn do-win [entities]
(actions/do-dialogue entities
:ego "Hey Bloodclot!"
:ego "I have this potion which will make me as strong as you!"
:bloodclot-head "What?!"
:bloodclot-head "Give it here!")
(actions/transition-background entities :space [200 45] :between (fn [s e]
(-> e
(assoc-in [:room :entities :ego :stand-override] :crawl-stand)
(update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand)))
))
(actions/do-dialogue entities
:bloodclot-head "Yes!"
:bloodclot-head "Ultimate power is mine!"
:bloodclot-head "If I drink this entire bottle, I'll be as powerful as a god!")
(explode entities)
(actions/play-animation entities :ego :standup)
(actions/walk-straight-to entities :ego [340 55])
(actions/run-action entities
(begin [this screen entities]
(assoc-in entities [:tweens :later] (tween/tween :later screen [:room :entities :later :opacity] 0.0 1.0 4.0 :ease tween/ease-in-cubic)))
(continue [this screen entities]
entities)
(done? [this screen entities]
(not (get-in entities [:tweens :later])))
(terminate [this screen entities]
entities)
(skip-type [this screen entities]
:none))
(Thread/sleep 2000)
(actions/do-stop entities :ego :face :left)
(actions/transition-background entities :ending [165 49] :time 4.0)
(actions/do-dialogue entities
:duke "Ladies and gentlemen."
:duke "As the Duke of Remington, I'm pleased to inform you..."
:duke "The goblin by the name of Bloodclot has been destroyed!"
:duke "Our town is saved."
:duke "Thanks to this young boy, Tick."
:duke "It is my rightful duty as Duke of Remington to knight you."
:duke "You've proven yourself worthy."
:duke "Your sword, please.")
(actions/walk-straight-to entities :ego [150 49])
(actions/play-animation entities :ego :reach-start :stop? false)
(actions/play-animation entities :duke :reach :stop? false)
(actions/play-animation entities :ego :reach-stop :stop? false)
(actions/talk entities :duke "Kneel." :anim :reach-talk :stop? false)
(actions/play-animation entities :ego :start-squat-2 :stop? false)
(Thread/sleep 1000)
(actions/play-animation entities :duke :knight :stop? false)
(actions/update-entity entities :duke (fn [d] (assoc d :baseline (- 240 48))))
(actions/play-animation entities :duke :knight :stop? false)
(actions/talk entities :duke "In honor of your bravery..." :anim :reach-talk :stop? false)
(actions/talk entities :duke "I declare you Sir Tick of Remington." :anim :reach-talk)
(actions/play-animation entities :ego :end-squat :stop? true)
(Thread/sleep 500)
(actions/glad entities)
(Thread/sleep 200)
(actions/do-dialogue entities :ego "Wait...")
(Thread/sleep 400)
(actions/do-stop entities :ego :face :right)
(Thread/sleep 400)
(actions/do-stop entities :ego :face :left)
(Thread/sleep 400)
(actions/do-stop entities :ego :face :right)
(Thread/sleep 400)
(actions/do-stop entities :ego :face :left)
(Thread/sleep 400)
(actions/do-dialogue entities :ego "Where's Georgia McGorgeous?")
(actions/walk-straight-to entities :gandarf-cloud [215 100] :update-baseline? false)
(actions/do-dialogue entities :gandarf "Quickly, boy!")
(actions/do-stop entities :ego :face :right)
(actions/do-dialogue entities :ego "Gandarf?"
:gandarf "Yes, it is I!"
:ego "How did you escape?"
:gandarf "No time for that!"
:gandarf "Georgia McGorgeous has been captured!"
:ego "Captured?! By who?"
:gandarf "Bloodclot's second-in-command, Swinebreath."
:gandarf "I'm afraid that I can't save her."
:gandarf "This is a job for a knight."
:gandarf "If you are willing, Tick..."
:duke "That's 'Sir Tick'..."
:gandarf "Quite right, quite right."
:gandarf "If you are willing, Sir Tick..."
:gandarf "I can transport you to the land where her prision lies."
:gandarf "But it is far out of my sight, and I know not what you'll find."
:gandarf "Well? What say you?"
:ego "I'll do it! "
:gandarf "Very good."
:gandarf "Prepare yourself.")
(Thread/sleep 300)
(actions/talk entities :gandarf "Beamium Up!!!" :anim :talk-angry)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :reset)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :start)
(disappear entities)
(Thread/sleep 2000)
(fade-out entities)
(on-gl (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits)))
)
(defn win []
(actions/get-script entities
(actions/do-dialogue entities
:ego "Hey Bloodclot!"
:ego "I have this potion which will make me as strong as you!"
:bloodclot-head "What?!"
:bloodclot-head "Give it here!")
(actions/transition-background entities :space [200 45] :between (fn [s e]
(-> e
(assoc-in [:room :entities :ego :stand-override] :crawl-stand)
(update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand)))
))
(actions/do-dialogue entities
:bloodclot-head "Yes!"
:bloodclot-head "Ultimate power is mine!"
:bloodclot-head "If I drink this entire bottle, I'll be as powerful as a god!")
(explode entities)
(actions/play-animation entities :ego :standup)
(actions/walk-straight-to entities :ego [340 55])
(actions/run-action entities
(begin [this screen entities]
(assoc-in entities [:tweens :later] (tween/tween :later screen [:room :entities :later :opacity] 0.0 1.0 4.0 :ease tween/ease-in-cubic)))
(continue [this screen entities]
entities)
(done? [this screen entities]
(not (get-in entities [:tweens :later])))
(terminate [this screen entities]
entities)
(skip-type [this screen entities]
:none))
(Thread/sleep 2000)
(actions/do-stop entities :ego :face :left)
(actions/transition-background entities :ending [165 49] :time 4.0)
(actions/do-dialogue entities
:duke "Ladies and gentlemen."
:duke "As the Duke of Remington, I'm pleased to inform you..."
:duke "The goblin by the name of Bloodclot has been destroyed!"
:duke "Our town is saved."
:duke "Thanks to this young boy, Tick."
:duke "It is my rightful duty as Duke of Remington to knight you."
:duke "You've proven yourself worthy."
:duke "Your sword, please.")
(actions/walk-straight-to entities :ego [150 49])
(actions/play-animation entities :ego :reach-start :stop? false)
(actions/play-animation entities :duke :reach :stop? false)
(actions/play-animation entities :ego :reach-stop :stop? false)
(actions/talk entities :duke "Kneel." :anim :reach-talk :stop? false)
(actions/play-animation entities :ego :start-squat-2 :stop? false)
(Thread/sleep 1000)
(actions/play-animation entities :duke :knight :stop? false)
(actions/update-entity entities :duke (fn [d] (assoc d :baseline (- 240 48))))
(actions/play-animation entities :duke :knight :stop? false)
(actions/talk entities :duke "In honor of your bravery..." :anim :reach-talk :stop? false)
(actions/talk entities :duke "I declare you Sir Tick of Remington." :anim :reach-talk)
(actions/play-animation entities :ego :end-squat :stop? true)
(Thread/sleep 500)
(actions/glad entities)
(Thread/sleep 200)
(actions/do-dialogue entities :ego "Wait...")
(Thread/sleep 400)
(actions/do-stop entities :ego :face :right)
(Thread/sleep 400)
(actions/do-stop entities :ego :face :left)
(Thread/sleep 400)
(actions/do-stop entities :ego :face :right)
(Thread/sleep 400)
(actions/do-stop entities :ego :face :left)
(Thread/sleep 400)
(actions/do-dialogue entities :ego "Where's Georgia McGorgeous?")
(actions/walk-straight-to entities :gandarf-cloud [215 100] :update-baseline? false)
(actions/do-dialogue entities :gandarf "Quickly, boy!")
(actions/do-stop entities :ego :face :right)
(actions/do-dialogue entities :ego "Gandarf?"
:gandarf "Yes, it is I!"
:ego "How did you escape?"
:gandarf "No time for that!"
:gandarf "Georgia McGorgeous has been captured!"
:ego "Captured?! By who?"
:gandarf "Bloodclot's second-in-command, Swinebreath."
:gandarf "I'm afraid that I can't save her."
:gandarf "This is a job for a knight."
:gandarf "If you are willing, Tick..."
:duke "That's 'Sir Tick'..."
:gandarf "Quite right, quite right."
:gandarf "If you are willing, Sir Tick..."
:gandarf "I can transport you to the land where her prision lies."
:gandarf "But it is far out of my sight, and I know not what you'll find."
:gandarf "Well? What say you?"
:ego "I'll do it! "
:gandarf "Very good."
:gandarf "Prepare yourself.")
(Thread/sleep 300)
(actions/talk entities :gandarf "Beamium Up!!!" :anim :talk-angry)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :reset)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :start)
(disappear entities)
(Thread/sleep 2000)
(fade-out entities)
(on-gl (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits)))
))
(actions/get-script entities (do-win entities)))
(defn make-outside-particles []

View File

@@ -3,6 +3,7 @@
[advent.actions :as actions]
[advent.screens.items :as items]
[advent.utils :as utils]
[advent.tween :as tween]
[clojure.zip :as zip]
[play-clj.core :refer :all]
[play-clj.ui :refer :all]
@@ -39,17 +40,27 @@
"Something else."
{:choices actions/something-else}]]
(actions/present-choices entities
{:choices ["I can barely see anything!"
{:choices [(when-not (get-in @entities [:state :opened-blinds?])
"I can barely see anything!")
{:run #(actions/respond entities %
:shopkeep "Sorry about that, sonny."
:shopkeep "My son will be back any minute with some candles.")
:choices son-choices}
(when (get-in @entities [:state :opened-blinds?])
"I let some light in. Will you open up shop?")
{:run #(actions/respond entities %
:shopkeep "It's still too dark in here."
:shopkeep "Don't worry."
:shopkeep "My son will be back any minute with those candles.")
:choices son-choices}
"What do you have for sale here?"
{:run #(actions/respond entities %
:shopkeep "We're not open for business right now."
:shopkeep "Can't you see the lights are out?"
:shopkeep "We'll be open again when my son comes back with some candles.")
:choices ["Why don't you just open the curtains?"
:choices [(when-not (get-in @entities [:state :opened-blinds?])
"Why don't you just open the curtains?")
{:run #(actions/respond entities %
:shopkeep "That window doesn't let much light in anyhow."
:shopkeep "Plus, my son should be back any minute now.")
@@ -58,12 +69,14 @@
{:run #(actions/respond entities %
:shopkeep "No, not until my son returns.")
:choices #(-> % zip/left zip/left)}
"If I get some light in here, will you open up shop?"
(if (get-in @entities [:state :opened-blinds?])
"Since I got some light in here, will you open up shop?"
"If I get some light in here, will you open up shop?")
{:run #(actions/respond entities %
:shopkeep "No."
:shopkeep "I need my son to help around the shop anyways."
:shopkeep "And there's a lot to fix up before we're ready to open shop again.")
:choices #(-> % zip/left zip/left zip/left zip/left)}
:choices son-choices}
"Something else."
{:choices actions/something-else}]}
"Are those lava mints on the desk?"
@@ -136,6 +149,19 @@
(and (actions/has-item? entities :teddy)
(not (get-in @entities [:state :allowed-to-keep-teddy?]))))
(defn choose-correct-blind-state [e]
(if (get-in e [:state :opened-blinds?])
(-> e
(assoc-in [:room :entities :closed-blinds :opacity] 0.0)
(assoc-in [:room :entities :open-blinds :opacity] 1.0)
(assoc-in [:room :entities :darken :opacity] 0.0)
(assoc-in [:room :entities :glow :opacity] 0.25))
(-> e
(assoc-in [:room :entities :closed-blinds :opacity] 1.0)
(assoc-in [:room :entities :open-blinds :opacity] 0.0)
(assoc-in [:room :entities :darken :opacity] 0.4)
(assoc-in [:room :entities :glow :opacity] 0.0))))
(defn make [screen]
(let [shopkeep-sheet (texture! (texture "inside-antique/shopkeep-talk.png") :split 18 21)
shopkeep-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 1 (repeat 50 0) 1 0 1 0 1])]
@@ -191,14 +217,38 @@
(return-teddy entities))
:portrait (actions/get-script entities
(return-portrait entities))}}
:window {:box [210 125 256 183]
:window {:box [195 121 256 190]
:script (actions/get-script entities
(actions/talk entities :ego "It's a nice, big window."))
(actions/walk-to entities :ego [207 68])
(actions/play-animation entities :ego :reach)
(actions/update-state entities (fn [s] (assoc s :opened-blinds? (not (:opened-blinds? s)))))
(actions/update-entities entities (fn [screen e]
(if (get-in e [:state :opened-blinds?])
(-> e
(assoc-in [:room :entities :closed-blinds :opacity] 0.0)
(assoc-in [:room :entities :open-blinds :opacity] 1.0)
(assoc-in [:tweens :fade-darken-out]
(tween/tween :fade-darken-out screen [:room :entities :darken :opacity] 0.4 0.0 0.75 :ease tween/ease-out-quadratic))
(assoc-in [:tweens :fade-glow-in]
(tween/tween :fade-glow-in screen [:room :entities :glow :opacity] 0.0 0.3 0.75 :ease tween/ease-out-quadratic)))
(-> e
(assoc-in [:room :entities :closed-blinds :opacity] 1.0)
(assoc-in [:room :entities :open-blinds :opacity] 0.0)
(assoc-in [:tweens :fade-darken-in]
(tween/tween :fade-darken-in screen [:room :entities :darken :opacity] 0.0 0.4 0.75 :ease tween/ease-out-quadratic))
(assoc-in [:tweens :fade-glow-out]
(tween/tween :fade-glow-out screen [:room :entities :glow :opacity] 0.3 0.0 0.75 :ease tween/ease-out-quadratic)))))
:use-screen? true))
:scripts {:portrait (actions/get-script entities
(actions/walk-to entities :ego [142 49] :face :left)
(actions/play-animation entities :ego :hold-up-to-window)
(actions/talk entities :ego "The portrait says 'Herb' on the back.")
(actions/update-state entities (fn [state] (update-in state [:clues] #(conj % :name)) )))}}
(if (get-in @entities [:state :opened-blinds?])
(do (actions/walk-to entities :ego [142 49] :face :left)
(actions/play-animation entities :ego :hold-up-to-window)
(actions/talk entities :ego "The portrait says 'Herb' on the back.")
(actions/update-state entities (fn [state] (update-in state [:clues] #(conj % :name)) )))
(do (actions/walk-to entities :ego [142 49] :face :left)
(actions/play-animation entities :ego :hold-up-to-window)
(actions/talk entities :ego "It's just too dim."))))}}
:grandfather-clock {:box [55 70 103 185]
:script (actions/get-script entities
(actions/do-dialogue entities :ego "Cool grandfather clock!"
@@ -220,8 +270,9 @@
}
:layers [(assoc (texture "inside-antique/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "inside-antique/desk.png") :x 0 :y 0 :baseline 113)
(assoc (texture "inside-antique/fg.png") :x 0 :y 0 :baseline 320 :parallax 1.5)
(assoc (texture "inside-antique/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.3)]
]
:entities {:shopkeep (actions/start-animation screen (assoc (animation->texture screen shopkeep-stand) :x 148 :y 122 :baseline 112
:stand shopkeep-stand
:scale-x 1.6
@@ -248,6 +299,10 @@
(actions/get-script entities
(actions/talk entities :shopkeep "No thanks, sonny."))))
:stand)
:glow (assoc (texture "inside-antique/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.3)
:closed-blinds (assoc (texture "inside-antique/closed-blinds.png") :x 0 :y 0 :baseline 0 :opacity 1.0)
:open-blinds (assoc (texture "inside-antique/open-blinds.png") :x 0 :y 0 :baseline 0 :opacity 0.0)
:darken (assoc (texture "inside-antique/darken.png") :x 0 :y 0 :baseline 321 :opacity 0.4 )
:beard (assoc (animation->texture screen beard)
:anim beard
:anim-start 0
@@ -318,6 +373,8 @@
(if (actions/has-item? entities :portrait )
entities
(assoc-in entities [:room :entities :portrait] (get-in entities [:room :portrait])))))
(assoc-in entities [:room :entities :portrait] (get-in entities [:room :portrait])))
(choose-correct-blind-state entities)
))
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75)
:start-pos [222 3])))

View File

@@ -31,7 +31,19 @@
(actions/talk entities :ego "Hey guys!")
(actions/talk entities :warriors "Hark! Good day, young esquire.")
(actions/present-choices entities
{:choices ["Why dost thou speaketh in this manner?"
{:choices ["Can I have some of your food?"
{:run #(actions/respond entities %
:warriors "Verily I say unto you: no."
:warriors "We art filled with hunger."
:warriors "And we musteth replentish our strength."
:warriors "Get ye your own food!")
:choices actions/previous-choices}
"Shouldn't you be guarding something?"
{:run #(actions/respond entities %
:warriors "Even the mightiest of knights musteth replentish their strength."
:warriors "And geteth some R and R.")
:choices actions/previous-choices}
"Why dost thou speaketh in this manner?"
{:run #(actions/respond entities %
:warriors "`Tis a tradition!"
:warriors "All knights speaketh in such a manner."
@@ -160,7 +172,8 @@
#_#_ladder-guard-stand (animation 0.1 [(aget ladder-guard-sheet 0 0)])
ladder-guard-stand (animation 0.1 [(texture "inside-cafeteria/ladder-guard-2.png")])
ladder-guard-talk (animation 0.1 [ (texture "inside-cafeteria/ladder-guard-2.png")])
warriors-stand (utils/make-anim "inside-cafeteria/knights-stand.png" [74 97] 0.6 (take 100 (repeatedly #(rand-int 10))))
warriors-stand (utils/make-anim "inside-cafeteria/knights-stand.png" [49 80] 0.6 (take 100 (repeatedly #(rand-int 10))))
knight-a-stand (utils/make-anim "inside-cafeteria/knight-a.png" [70 85] 0.2 (flatten [(repeat 3 [(repeat 7 0) (repeat 7 1) (repeat 7 0) (repeat 7 2)]) [3 4 5 6 7 8 9]]))
@@ -188,8 +201,7 @@
(assoc (texture "inside-cafeteria/glow.png") :y 0 :baseline 240 :additive? true :opacity 0.3)
(assoc (texture "inside-cafeteria/fg.png") :x 10 :y 0 :scale-x 1.1 :scale-y 1.0 :baseline 320 :parallax 1.5)
]
:entities {
:warriors (actions/start-animation screen (assoc (animation->texture screen warriors-stand) :x 8 :y 19 :baseline 180
:entities {:warriors (actions/start-animation screen (assoc (animation->texture screen warriors-stand) :x 31 :y 36 :baseline 180
:left {:stand (utils/flip warriors-stand)
:talk (utils/flip warriors-stand)}
@@ -204,6 +216,12 @@
(actions/do-dialogue entities :warriors
"We are warriors. We coveteth not earthly possessions."))))
:stand)
:knight-a (assoc (animation->texture screen knight-a-stand)
:x 0 :y 21 :baseline 181
:anim knight-a-stand
:anim-start 0
:talk knight-a-stand
:stand knight-a-stand)
:ladder-guard (actions/start-animation screen (assoc (animation->texture screen ladder-guard-stand) :x 180 :y 70 :baseline 170
:stand ladder-guard-stand
:talk ladder-guard-talk

View File

@@ -224,6 +224,7 @@
:ego "No, not the Slinger's Shot!"
:frankie "Look like we hit the jackpot tonight boys!")
(frankie-comment-on-item entities)
(actions/update-state entities #(assoc % :bubba-gone? true))
(actions/do-dialogue entities
:frankie "Bubba, put this stuff in the secret stash."
:goon-2 "You got it boss.")
@@ -238,7 +239,6 @@
(actions/remove-item entities :medal)
(actions/remove-item entities :trophy)
(actions/remove-item entities :slingshot)
(actions/update-state entities #(assoc % :bubba-gone? true))
(actions/walk-to entities :ego [181 79])
(actions/do-dialogue entities

View File

@@ -292,7 +292,7 @@
:apply-state (fn [_ e]
(as-> e e
(if (get-in e [:state :broke-jewel?])
(assoc-in e [:room :entities :broken-jewel] (get-in e [:room :entities :broken-jewel]))
(assoc-in e [:room :entities :broken-jewel] (get-in e [:room :broken-jewel]))
e)
(if (get-in e [:state :seen-bloodclot?])
(assoc-in e [:room :entities :bloodclot :opacity ] 1.0)

View File

@@ -285,38 +285,6 @@ void main()
((:get-script default-interaction) (get-in entities [:cursor :current]) [x y])) entities))
(assoc-in entities [:cursor :down-target] nil)))
(defn drink-blergh [entities]
(actions/walk-straight-to entities :ego [205 45])
(sound! (sound "ego/potion.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :grow :stop? false)
(actions/do-dialogue entities
:blergh "What this? A potion of strength?"
:blergh "You're still no match for me."
:blergh "Give it to me, or I'll make you regret it!")
(actions/present-choices entities {:choices ["Ok."
{:run (fn [_]
(actions/talk entities :ego "Ok." :anim :grow-talk :stop? false)
(actions/talk entities :ego "Here you go." :anim :grow-talk)
(actions/do-dialogue entities
:blergh "Yes! Now I can drink this whole thing and can become powerful enough to rule the world!"
:blergh "[#AAFFAAFF]*gulp*[]"
:blergh "What's this? What's happening?")
(actions/talk entities :ego "Uh oh." :anim :grow-talk :stop? false)
(actions/walk-straight-to entities :ego [100 45] :face :right)
(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.'"
:ego "Brilliant! I win!")
(actions/walk-straight-to entities :ego [800 75] :face :right)
(actions/update-state entities (fn [s] (assoc s :blergh-dead? true))))}
"No way!"
{:run (fn [_]
(actions/talk entities :ego "No way!" :anim :grow-talk)
(actions/talk entities :blergh "Then take this!")
(actions/play-animation entities :blergh :swing)
(actions/walk-straight-to entities :ego [100 45] :anim :squat :override-dir :right :speed 3.0)
(actions/do-dialogue entities :ego "Yeow!!"
:ego "Even with that potion, I'm not strong enough."))}]}))
(defn get-ego-script [cursor [x y]]
(condp = (:value cursor)
@@ -325,9 +293,9 @@ void main()
:flask-1-strength
(actions/get-script entities
(cond (and (actions/has-item? entities :magic-slingshot)
(get-in @entities [:room :blergh]))
(drink-blergh entities)
(cond (= :held
(get-in @entities [:state :last-room]))
(common/do-win entities)
(get-in @entities [:room :entities :warden])
(do