descriptions for stuff in pot.

This commit is contained in:
Bryce Covert
2015-08-16 00:32:22 -07:00
parent 5394b4dd77
commit 772e2bb0bf
3 changed files with 32 additions and 754 deletions

View File

@@ -8,6 +8,7 @@
[advent.tween :as tween]
[advent.utils :as utils]
[clojure.zip :as zip]
[clojure.string :as str]
[play-clj.core :refer :all]
[play-clj.ui :refer :all]
[play-clj.math :refer :all]
@@ -536,6 +537,34 @@
entities)))
(defn examine-cauldron [entities]
(let [put-clock (and (actions/has-obtained? entities :broken-clock)
(not (actions/has-item? entities :broken-clock)))
put-money (and (actions/has-obtained? entities :money)
(not (actions/has-item? entities :money)))
note-2-requirements (filter identity [(when (not put-money)
"the root of all evil")
(when (not put-clock)
"a split second")])]
(cond (actions/has-item? entities :note-2)
(do (actions/do-dialogue entities :ego "According to Gandarf's note...")
(if (seq note-2-requirements)
(actions/do-dialogue entities :ego (str "I need to add " (str/join " and " note-2-requirements) ".")
:ego "Then dip in the Slinger's Shot.")
(actions/do-dialogue entities :ego "I just need to dip in the Slinger's Shot.")))
(and (not (actions/has-item? entities :spell-component))
(actions/has-obtained? entities :spell-component))
(actions/do-dialogue entities
:ego "I added the contents of the flask."
:ego "But now what?")
(actions/has-item? entities :note-1)
(actions/do-dialogue entities :ego "According to Gandarf's note..."
:ego "I need to some stuff up in a flask and dump it in here.")
:else
(actions/talk entities :ego "That's a big cauldron!"))))
(defn make [screen]
@@ -721,7 +750,8 @@
:anim cauldron
:anim-start 0
:night-profile :none
:script (actions/get-script entities (actions/talk entities :ego "That's a big cauldron!"))
:script (actions/get-script entities
(examine-cauldron entities))
:scripts put-something-in-cauldron))
:wizard (rooms/make-entity :wizard (common/make-wizard screen {:x 190 :y 78 :baseline 162 :scale-x 1.2 :scale-y 1.2
:script (actions/get-script entities (talk-to-gandarf-outside entities))