(ns advent.screens.rooms.inside-castle
  (:require [advent.screens.rooms :as rooms]
            [advent.actions :as actions]
            [advent.utils :as utils]
            [clojure.zip :as zip]
            [play-clj.core :refer :all]
            [play-clj.ui :refer :all]
            [play-clj.utils :refer :all]
            [play-clj.g2d :refer :all]))

(defn make [screen]
  (rooms/make :interactions
              {:right-door {:box [286 140 306 160]
                            :cursor :right
                            :script (actions/get-script entities
                                                        (actions/walk-to entities :ego [284 145])
                                                        (actions/transition-background entities :outside-castle [82 180])
                                                        (actions/walk-to entities :ego [129 148]))
                            }}
              :layers [(assoc (texture "inside-castle/background.png") :x 0 :y 0 :baseline 0)
                       (assoc (texture "inside-castle/pedestal-overlay.png") :x 0 :y 0 :baseline 135)]
              :entities {}
              :collision "inside-castle/collision.png"
              :scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00)))
