fixed ending.

This commit is contained in:
2015-09-05 13:56:19 -07:00
parent da00759f47
commit 641c1fb155
4 changed files with 108 additions and 141 deletions

View File

@@ -5,7 +5,6 @@ PROGRAMMING
+ fight with blergh at end isn't great + fight with blergh at end isn't great
+ blergh taunts for first fight + blergh taunts for first fight
+ ending + ending
+ you can drink the strength potion while in blood clots hand
+ proper save/settings file location + proper save/settings file location
+ Save slots? + Save slots?
+ descriptions for all items when used on self. + descriptions for all items when used on self.

View File

@@ -227,6 +227,7 @@
(-> entities (-> entities
(update-in [:room :entities :bloodclot] #(actions/start-animation screen % :explode)) (update-in [:room :entities :bloodclot] #(actions/start-animation screen % :explode))
(update-in [:room :entities] dissoc :broken-jewel)
(update-in [:room :entities] dissoc :bloodclot-head) (update-in [:room :entities] dissoc :bloodclot-head)
(assoc-in [:room :entities :ego :facing] :right) (assoc-in [:room :entities :ego :facing] :right)
(update-in [:room :entities :ego] #(actions/start-animation screen % :crawl)))) (update-in [:room :entities :ego] #(actions/start-animation screen % :crawl))))
@@ -318,11 +319,7 @@
(skip-type [this screen entities] (skip-type [this screen entities]
:none))) :none)))
(defn do-win [entities]
(defn win []
(actions/get-script entities
(actions/do-dialogue entities (actions/do-dialogue entities
:ego "Hey Bloodclot!" :ego "Hey Bloodclot!"
:ego "I have this potion which will make me as strong as you!" :ego "I have this potion which will make me as strong as you!"
@@ -424,7 +421,10 @@
(Thread/sleep 2000) (Thread/sleep 2000)
(fade-out entities) (fade-out entities)
(on-gl (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits))) (on-gl (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits)))
)) )
(defn win []
(actions/get-script entities (do-win entities)))
(defn make-outside-particles [] (defn make-outside-particles []

View File

@@ -292,7 +292,7 @@
:apply-state (fn [_ e] :apply-state (fn [_ e]
(as-> e e (as-> e e
(if (get-in e [:state :broke-jewel?]) (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) e)
(if (get-in e [:state :seen-bloodclot?]) (if (get-in e [:state :seen-bloodclot?])
(assoc-in e [:room :entities :bloodclot :opacity ] 1.0) (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)) ((:get-script default-interaction) (get-in entities [:cursor :current]) [x y])) entities))
(assoc-in entities [:cursor :down-target] nil))) (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]] (defn get-ego-script [cursor [x y]]
(condp = (:value cursor) (condp = (:value cursor)
@@ -325,9 +293,9 @@ void main()
:flask-1-strength :flask-1-strength
(actions/get-script entities (actions/get-script entities
(cond (and (actions/has-item? entities :magic-slingshot) (cond (= :held
(get-in @entities [:room :blergh])) (get-in @entities [:state :last-room]))
(drink-blergh entities) (common/do-win entities)
(get-in @entities [:room :entities :warden]) (get-in @entities [:room :entities :warden])
(do (do