drops the coin correctly.

This commit is contained in:
Bryce Covert
2015-07-30 09:05:41 -07:00
parent e7629b8c96
commit a19f7ebd41
6 changed files with 56 additions and 23 deletions

View File

@@ -270,12 +270,12 @@
(actions/give entities :flask-2))))
(defn add-wizard-if-necessary [entities]
(if (actions/has-obtained? entities :money)
(if (get-in entities [:state :seen-frankie?])
entities
(update-in entities [:room :entities] #(assoc % :wizard (get-in entities [:room :wizard])))))
(defn add-note-if-necessary [entities]
(if (and (actions/has-obtained? entities :money)
(if (and (get-in entities [:state :seen-frankie?])
(not (actions/has-obtained? entities :note-1)))
(update-in entities [:room :entities] #(assoc % :note (get-in entities [:room :note])))
entities))