better ladder dialogue.
This commit is contained in:
@@ -102,6 +102,7 @@
|
||||
(defn pull-sword [entities]
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/give entities :sword)
|
||||
(actions/remove-entity entities :sword)
|
||||
(actions/talk entities :ego "I got it! I will become the greatest knight Remington has ever known!"))
|
||||
|
||||
(defn try-to-pull-sword [entities missing-items obtained-items]
|
||||
@@ -153,15 +154,17 @@
|
||||
(actions/transition-background entities :inside-antique [222 15]))}
|
||||
:sword {:box [0 130 39 165]
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ego "That's the coolest sword I've ever seen!!")
|
||||
(actions/walk-to entities :ego [37 134] :face :left)
|
||||
(actions/talk entities :ego "If I pull it out I can become a great knight!")
|
||||
(let [missing-items (set/difference #{:trophy :medal :certificate} (get-in @entities [:state :obtained-items]))
|
||||
obtained-items (set/intersection #{:trophy :medal :certificate} (get-in @entities [:state :obtained-items]))]
|
||||
(if (= #{} missing-items)
|
||||
(pull-sword entities)
|
||||
(try-to-pull-sword entities missing-items obtained-items))
|
||||
))}
|
||||
(if (actions/has-item? entities :sword)
|
||||
(actions/talk entities :ego "I already have the Sword of Blergh!")
|
||||
(do (actions/talk entities :ego "That's the coolest sword I've ever seen!!")
|
||||
(actions/walk-to entities :ego [37 134] :face :left)
|
||||
(actions/talk entities :ego "If I pull it out I can become a great knight!")
|
||||
(let [missing-items (set/difference #{:trophy :medal :certificate} (get-in @entities [:state :obtained-items]))
|
||||
obtained-items (set/intersection #{:trophy :medal :certificate} (get-in @entities [:state :obtained-items]))]
|
||||
(if (= #{} missing-items)
|
||||
(pull-sword entities)
|
||||
(try-to-pull-sword entities missing-items obtained-items)))))
|
||||
)}
|
||||
:sign {:box [125 140 165 155]
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ego "Ye Ol' Antique Shoppe."))}
|
||||
@@ -191,11 +194,18 @@
|
||||
(concat p (reverse p))))
|
||||
:bird-2 (utils/make-bird screen (as-> [[220 225] [195 235] [210 230] [250 225]] p
|
||||
(concat p (reverse p))))
|
||||
:sword (assoc (texture "inside-castle/sword.png")
|
||||
:x 16
|
||||
:y 145
|
||||
:baseline 95)
|
||||
:trophy (assoc (animation->texture screen trophy)
|
||||
:x 253 :y 69 :baseline 191
|
||||
:anim trophy
|
||||
:anim-start 0
|
||||
:script (actions/get-script entities
|
||||
(actions/give entities :trophy)
|
||||
(actions/give entities :certificate)
|
||||
(actions/give entities :medal)
|
||||
(walk-to-player entities)
|
||||
(if (= nil (get-in @entities [:state :current-riddle]))
|
||||
(let [{:keys [run choices]} (nice-trophy-dialogue entities)]
|
||||
@@ -251,5 +261,8 @@
|
||||
(as-> entities entities
|
||||
(if (actions/has-item? entities :trophy)
|
||||
(update-in entities [:room :entities] #(dissoc % :trophy))
|
||||
entities)
|
||||
(if (actions/has-item? entities :sword)
|
||||
(update-in entities [:room :entities] #(dissoc % :sword))
|
||||
entities)))
|
||||
:start-pos [245 90])))
|
||||
|
||||
Reference in New Issue
Block a user