different approach to walkie talkie.
This commit is contained in:
@@ -129,7 +129,16 @@
|
||||
:script (actions/get-script entities (attempt-walking-through-gate entities))
|
||||
:cursor :left}
|
||||
:big-tree {:box [20 10 82 235]
|
||||
:scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}}}
|
||||
:scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}}
|
||||
:window {:box [190 176 206 211]
|
||||
:script (actions/get-script entities
|
||||
(actions/do-dialogue entities :ego "It's a big window!"))
|
||||
:scripts {:walkie-talkies (actions/get-script entities
|
||||
(actions/walk-to entities :ego [285 71])
|
||||
(actions/walk-straight-to entities :ego [308 115] :face :left)
|
||||
(actions/play-animation entities :ego :throw)
|
||||
(actions/remove-item entities :walkie-talkies)
|
||||
(actions/walk-straight-to entities :ego [285 71]))}}}
|
||||
|
||||
:layers {:day [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:night [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)]}
|
||||
|
||||
@@ -231,6 +231,7 @@
|
||||
(actions/do-dialogue entities :ego "These are all really strange devices.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities :walkie-talkies)
|
||||
(actions/talk entities :ego "Tin cans connected with string?")
|
||||
(actions/do-dialogue entities :ego "I wonder what all of these magic devices do.")))}
|
||||
:grass {:box [26 105 60 160]
|
||||
:script (actions/get-script entities
|
||||
|
||||
@@ -87,14 +87,4 @@
|
||||
(actions/talk entities :ego "Am I right boys?" :animate? false :stop? false))
|
||||
|
||||
(defn listen-to-frankie [entities]
|
||||
(if (get-in @entities [:room :entities :frankie])
|
||||
(do
|
||||
(actions/play-animation entities :ego :reach-up :stop? false)
|
||||
(Thread/sleep 1000)
|
||||
(actions/play-animation entities :ego :reach-down :stop? false)
|
||||
(actions/talk entities :ego "I don't hear anything in it."))
|
||||
(do
|
||||
(actions/talk entities :ego "I'll just give it a listen.")
|
||||
(actions/play-animation entities :ego :reach-up :stop? false)
|
||||
((rand-nth [listen-1 listen-2 listen-3]) entities)
|
||||
(actions/play-animation entities :ego :reach-down))))
|
||||
((rand-nth [listen-1 listen-2 listen-3]) entities))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns advent.screens.rooms.inside-castle
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.actions :as actions]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.screens.items :as items]
|
||||
[advent.utils :as utils]
|
||||
[advent.tween :as tween]
|
||||
@@ -354,6 +355,16 @@
|
||||
:x 22
|
||||
:y 110
|
||||
:baseline 95)
|
||||
:walkie-talkie (assoc (texture "inside-castle/walkie-talkie.png")
|
||||
:x 257
|
||||
:y 135
|
||||
:baseline 0
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ego "Let's give it a listen.")
|
||||
(actions/walk-to entities :ego [272 136] :face :left)
|
||||
(actions/play-animation entities :ego :start-squat-2 :stop? false)
|
||||
(common/listen-to-frankie entities)
|
||||
(actions/play-animation entities :ego :end-squat)))
|
||||
|
||||
:trophy (assoc (animation->texture screen trophy)
|
||||
:x 253 :y 69 :baseline 191
|
||||
@@ -455,6 +466,10 @@
|
||||
(if (actions/has-item? entities :sword)
|
||||
(update-in entities [:room :entities] #(dissoc % :sword))
|
||||
entities)
|
||||
(if (and (not (actions/has-item? entities :walkie-talkies))
|
||||
(actions/has-obtained? entities :walkie-talkies))
|
||||
entities
|
||||
(update-in entities [:room :entities] dissoc :walkie-talkie))
|
||||
(if (#{:night :sunrise} (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)))
|
||||
|
||||
Reference in New Issue
Block a user