expanded so you can't make strength potion without mandrake.

This commit is contained in:
2014-12-17 16:59:30 -08:00
parent 4377982f13
commit b1b4335ee3
8 changed files with 105 additions and 23 deletions

View File

@@ -16,7 +16,7 @@
(if (actions/has-item? entities :recipe)
(do
(actions/play-animation entities :ego :squat)
(actions/talk entities :ego "It's empty now."))
(actions/talk entities :ego "I already took everything interesting from there."))
(do
(actions/talk entities :ego "Yes! That worked.")
(actions/talk entities :ego "Let's see here...")
@@ -29,8 +29,8 @@
(actions/talk entities :ego "Aha! Here it is! I found a recipe for a strength potion!")
(actions/talk entities :ego "Looks like there's something else in here too...")
(actions/play-animation entities :ego :squat)
(actions/give entities :frog-legs)
(actions/talk entities :ego "Eww. Frog legs."))))
(actions/give entities :mandrake)
(actions/talk entities :ego "Weird. It's some kind of root."))))
:failure (actions/get-script entities
(actions/talk entities :ego "I don't think that worked...")))
(actions/update-state entities #(assoc % :active? false)))
@@ -137,7 +137,35 @@
:disappear wizard-disappear}
:talk-color (color 0.95 0.3 1.0 1.0)
:facing :left
:script (actions/get-script entities (do-wizard-dialogue entities)))
:script (actions/get-script entities (do-wizard-dialogue entities))
:scripts #(condp = %
:kiss (actions/get-script entities
(actions/do-dialogue entities
:wizard "Good job boy! You saved a damsel in distress."
:wizard "You have proven yourself worthy in courage."))
:medal (actions/get-script entities
(actions/do-dialogue entities
:wizard "So you beat Captain McHulk at arm wrestling? "
:wizard "You must have been working out!"))
:trophy (actions/get-script entities
(actions/do-dialogue entities
:wizard "My, my, you have proven your worth in wisdom!"
:wizard "One day you'll be as wise as me!"))
:recipe (actions/get-script entities
(actions/do-dialogue entities
:ego "I probably shouldn't show him that I have his stolen posessions."))
:frog-legs (actions/get-script entities
(actions/do-dialogue entities
:ego "I probably shouldn't show him that I have his stolen posessions."))
:mandrake (actions/get-script entities
(actions/do-dialogue entities
:ego "I probably shouldn't show him that I have his stolen posessions."))
:flask-1 (actions/get-script entities
(actions/do-dialogue entities
:wizard "You can keep the flask."))
(actions/get-script entities
(actions/do-dialogue entities
:wizard "No thank you."))))
:stand)
:safe-lock (actions/start-animation screen (assoc (animation->texture screen safe-lock) :x 51 :y 95 :baseline 145
:stand safe-lock)
@@ -156,14 +184,25 @@
(actions/give entities :flask-1)
(when (get-in @entities [:room :entities :wizard])
(actions/do-dialogue entities :ego "Hey you think I could have this flask?"
:wizard "Sure."))))}
:wizard "Sure."))))
:frog-legs (assoc (texture "inside-house/frog-legs.png")
:x 180 :y 77 :baseline 240
:script (actions/get-script entities
(if (get-in @entities [:room :entities :wizard])
(actions/do-dialogue entities :wizard "Hey, I need those frog legs for one of my spells!")
(do (actions/give entities :frog-legs)
(actions/remove-entity entities :frog-legs)
(actions/do-dialogue entities :ego "Eww. Frog legs.")))))}
:collision "inside-house/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75)
:apply-state (fn [entities]
(as-> entities entities
(if (actions/has-one-of? entities [:flask-1 :flask-1-with-cream-of-mushroom :flask-1-strength :flask-1-with-mushrooms :flask-1-with-milk])
(if (actions/has-obtained? entities :flask-1)
(update-in entities [:room :entities] #(dissoc % :flask))
entities)
(if (actions/has-obtained? entities :frog-legs)
(update-in entities [:room :entities] #(dissoc % :frog-legs))
entities)
(if (get-in entities [:state :wizard-left?])
(update-in entities [:room :entities] #(dissoc % :wizard))
entities)))