From b8b323fc06f1c52b2c63da0162327f012e5223b9 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Thu, 7 Jan 2016 22:14:09 -0800 Subject: [PATCH] made gate bi-directional. --- .../advent/screens/rooms/inside_castle.clj | 12 +++++++++--- .../advent/screens/rooms/outside_castle.clj | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 2dda3ce6..b35309f4 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -3,6 +3,7 @@ [advent.actions :as actions] [advent.saves :as saves] [advent.screens.rooms.common :as common] + [advent.screens.rooms.outside-castle :as outside-castle] [advent.screens.items :as items] [advent.utils :as utils] [advent.steam :as steam] @@ -383,9 +384,14 @@ :script (actions/get-script entities (actions/walk-to entities :ego [284 145] :skip-type :end) (actions/walk-straight-to entities :ego [295 145]) - (actions/transition-background entities :outside-castle [61 182]) - (actions/walk-straight-to entities :ego [82 180]) - (actions/walk-to entities :ego [129 148] :skip-type :end))} + (if (outside-castle/should-block? entities) + (do + (actions/transition-background entities :castle-gate [100 83]) + (actions/walk-straight-to entities :ego [157 83] :skip-type :end)) + (do + (actions/transition-background entities :outside-castle [61 182]) + (actions/walk-straight-to entities :ego [82 180]) + (actions/walk-to entities :ego [129 148] :skip-type :end))))} :up-door {:box [50 150 70 170] :script (actions/get-script entities (actions/walk-to entities :ego [65 155] :skip-type :end) diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 05ecf6f6..58fe30db 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -215,7 +215,7 @@ (actions/do-dialogue entities :frankie "3 easy payments of 29.99 sheckles?")))) (defn block-entrance [entities] - (actions/update-state entities #(assoc % :bubba-gone? false)) + (actions/transition-background entities :castle-gate [340 40]) (actions/walk-straight-to entities :ego [300 45]) (if (get-in @entities [:state :seen-frankie?])