From 86c7cc6ccd76cf2f148c4fec7217094a379e1bca Mon Sep 17 00:00:00 2001 From: Nicholas Brochu Date: Fri, 15 Mar 2024 12:35:37 -0400 Subject: [PATCH] Zork Grand Inquisitor: Implement New Game (#2539) Adds Archipelago support for Zork Grand Inquisitor, the 1997 point-and-click PC adventure game. The client (based on `CommonClient`), on top of its regular Archipelago duties, fully handles the randomization of the game and the monitoring / modification of the game state. No game modding needed at all; the player is ready to play an Archipelago seed if they can play the vanilla game through ScummVM. The "reverse engineering" (there's likely a better term for this...) of the game is my own original work and I included an MIT license at the root of my world directory. A PopTracker pack was also created to help people learn the game: https://github.com/SerpentAI/ZorkGrandInquisitorAPTracker --- README.md | 1 + docs/CODEOWNERS | 3 + worlds/zork_grand_inquisitor/LICENSE | 21 + worlds/zork_grand_inquisitor/__init__.py | 17 + worlds/zork_grand_inquisitor/client.py | 188 ++ worlds/zork_grand_inquisitor/data/__init__.py | 0 .../data/entrance_rule_data.py | 419 +++ .../zork_grand_inquisitor/data/item_data.py | 792 +++++ .../data/location_data.py | 1535 +++++++++ ...missable_location_grant_conditions_data.py | 200 ++ .../zork_grand_inquisitor/data/region_data.py | 183 ++ worlds/zork_grand_inquisitor/data_funcs.py | 247 ++ .../docs/en_Zork Grand Inquisitor.md | 102 + worlds/zork_grand_inquisitor/docs/setup_en.md | 42 + worlds/zork_grand_inquisitor/enums.py | 350 ++ .../zork_grand_inquisitor/game_controller.py | 1388 ++++++++ .../game_state_manager.py | 370 +++ worlds/zork_grand_inquisitor/options.py | 61 + worlds/zork_grand_inquisitor/requirements.txt | 1 + worlds/zork_grand_inquisitor/test/__init__.py | 5 + .../zork_grand_inquisitor/test/test_access.py | 2927 +++++++++++++++++ .../test/test_data_funcs.py | 132 + .../test/test_locations.py | 49 + worlds/zork_grand_inquisitor/world.py | 206 ++ 24 files changed, 9239 insertions(+) create mode 100644 worlds/zork_grand_inquisitor/LICENSE create mode 100644 worlds/zork_grand_inquisitor/__init__.py create mode 100644 worlds/zork_grand_inquisitor/client.py create mode 100644 worlds/zork_grand_inquisitor/data/__init__.py create mode 100644 worlds/zork_grand_inquisitor/data/entrance_rule_data.py create mode 100644 worlds/zork_grand_inquisitor/data/item_data.py create mode 100644 worlds/zork_grand_inquisitor/data/location_data.py create mode 100644 worlds/zork_grand_inquisitor/data/missable_location_grant_conditions_data.py create mode 100644 worlds/zork_grand_inquisitor/data/region_data.py create mode 100644 worlds/zork_grand_inquisitor/data_funcs.py create mode 100644 worlds/zork_grand_inquisitor/docs/en_Zork Grand Inquisitor.md create mode 100644 worlds/zork_grand_inquisitor/docs/setup_en.md create mode 100644 worlds/zork_grand_inquisitor/enums.py create mode 100644 worlds/zork_grand_inquisitor/game_controller.py create mode 100644 worlds/zork_grand_inquisitor/game_state_manager.py create mode 100644 worlds/zork_grand_inquisitor/options.py create mode 100644 worlds/zork_grand_inquisitor/requirements.txt create mode 100644 worlds/zork_grand_inquisitor/test/__init__.py create mode 100644 worlds/zork_grand_inquisitor/test/test_access.py create mode 100644 worlds/zork_grand_inquisitor/test/test_data_funcs.py create mode 100644 worlds/zork_grand_inquisitor/test/test_locations.py create mode 100644 worlds/zork_grand_inquisitor/world.py diff --git a/README.md b/README.md index d914f860165e..975f0ce75a7b 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Currently, the following games are supported: * TUNIC * Kirby's Dream Land 3 * Celeste 64 +* Zork Grand Inquisitor For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/). Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index dea869fb5536..90b1dabb6dc8 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -188,6 +188,9 @@ # Zillion /worlds/zillion/ @beauxq +# Zork Grand Inquisitor +/worlds/zork_grand_inquisitor/ @nbrochu + ################################## ## Disabled Unmaintained Worlds ## ################################## diff --git a/worlds/zork_grand_inquisitor/LICENSE b/worlds/zork_grand_inquisitor/LICENSE new file mode 100644 index 000000000000..a94ca6bf9177 --- /dev/null +++ b/worlds/zork_grand_inquisitor/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Serpent.AI + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/worlds/zork_grand_inquisitor/__init__.py b/worlds/zork_grand_inquisitor/__init__.py new file mode 100644 index 000000000000..4da257e47bd0 --- /dev/null +++ b/worlds/zork_grand_inquisitor/__init__.py @@ -0,0 +1,17 @@ +import worlds.LauncherComponents as LauncherComponents + +from .world import ZorkGrandInquisitorWorld + + +def launch_client() -> None: + from .client import main + LauncherComponents.launch_subprocess(main, name="ZorkGrandInquisitorClient") + + +LauncherComponents.components.append( + LauncherComponents.Component( + "Zork Grand Inquisitor Client", + func=launch_client, + component_type=LauncherComponents.Type.CLIENT + ) +) diff --git a/worlds/zork_grand_inquisitor/client.py b/worlds/zork_grand_inquisitor/client.py new file mode 100644 index 000000000000..11d6b7f8f183 --- /dev/null +++ b/worlds/zork_grand_inquisitor/client.py @@ -0,0 +1,188 @@ +import asyncio + +import CommonClient +import NetUtils +import Utils + +from typing import Any, Dict, List, Optional, Set, Tuple + +from .data_funcs import item_names_to_id, location_names_to_id, id_to_items, id_to_locations, id_to_goals +from .enums import ZorkGrandInquisitorItems, ZorkGrandInquisitorLocations +from .game_controller import GameController + + +class ZorkGrandInquisitorCommandProcessor(CommonClient.ClientCommandProcessor): + def _cmd_zork(self) -> None: + """Attach to an open Zork Grand Inquisitor process.""" + result: bool = self.ctx.game_controller.open_process_handle() + + if result: + self.ctx.process_attached_at_least_once = True + self.output("Successfully attached to Zork Grand Inquisitor process.") + else: + self.output("Failed to attach to Zork Grand Inquisitor process.") + + def _cmd_brog(self) -> None: + """List received Brog items.""" + self.ctx.game_controller.list_received_brog_items() + + def _cmd_griff(self) -> None: + """List received Griff items.""" + self.ctx.game_controller.list_received_griff_items() + + def _cmd_lucy(self) -> None: + """List received Lucy items.""" + self.ctx.game_controller.list_received_lucy_items() + + def _cmd_hotspots(self) -> None: + """List received Hotspots.""" + self.ctx.game_controller.list_received_hotspots() + + +class ZorkGrandInquisitorContext(CommonClient.CommonContext): + tags: Set[str] = {"AP"} + game: str = "Zork Grand Inquisitor" + command_processor: CommonClient.ClientCommandProcessor = ZorkGrandInquisitorCommandProcessor + items_handling: int = 0b111 + want_slot_data: bool = True + + item_name_to_id: Dict[str, int] = item_names_to_id() + location_name_to_id: Dict[str, int] = location_names_to_id() + + id_to_items: Dict[int, ZorkGrandInquisitorItems] = id_to_items() + id_to_locations: Dict[int, ZorkGrandInquisitorLocations] = id_to_locations() + + game_controller: GameController + + controller_task: Optional[asyncio.Task] + + process_attached_at_least_once: bool + can_display_process_message: bool + + def __init__(self, server_address: Optional[str], password: Optional[str]) -> None: + super().__init__(server_address, password) + + self.game_controller = GameController(logger=CommonClient.logger) + + self.controller_task = None + + self.process_attached_at_least_once = False + self.can_display_process_message = True + + def run_gui(self) -> None: + from kvui import GameManager + + class TextManager(GameManager): + logging_pairs: List[Tuple[str, str]] = [("Client", "Archipelago")] + base_title: str = "Archipelago Zork Grand Inquisitor Client" + + self.ui = TextManager(self) + self.ui_task = asyncio.create_task(self.ui.async_run(), name="UI") + + async def server_auth(self, password_requested: bool = False): + if password_requested and not self.password: + await super().server_auth(password_requested) + + await self.get_username() + await self.send_connect() + + def on_package(self, cmd: str, _args: Any) -> None: + if cmd == "Connected": + self.game = self.slot_info[self.slot].game + + # Options + self.game_controller.option_goal = id_to_goals()[_args["slot_data"]["goal"]] + self.game_controller.option_deathsanity = _args["slot_data"]["deathsanity"] == 1 + + self.game_controller.option_grant_missable_location_checks = ( + _args["slot_data"]["grant_missable_location_checks"] == 1 + ) + + async def controller(self): + while not self.exit_event.is_set(): + await asyncio.sleep(0.1) + + # Enqueue Received Item Delta + network_item: NetUtils.NetworkItem + for network_item in self.items_received: + item: ZorkGrandInquisitorItems = self.id_to_items[network_item.item] + + if item not in self.game_controller.received_items: + if item not in self.game_controller.received_items_queue: + self.game_controller.received_items_queue.append(item) + + # Game Controller Update + if self.game_controller.is_process_running(): + self.game_controller.update() + self.can_display_process_message = True + else: + process_message: str + + if self.process_attached_at_least_once: + process_message = ( + "Lost connection to Zork Grand Inquisitor process. Please restart the game and use the /zork " + "command to reattach." + ) + else: + process_message = ( + "Please use the /zork command to attach to a running Zork Grand Inquisitor process." + ) + + if self.can_display_process_message: + CommonClient.logger.info(process_message) + self.can_display_process_message = False + + # Send Checked Locations + checked_location_ids: List[int] = list() + + while len(self.game_controller.completed_locations_queue) > 0: + location: ZorkGrandInquisitorLocations = self.game_controller.completed_locations_queue.popleft() + location_id: int = self.location_name_to_id[location.value] + + checked_location_ids.append(location_id) + + await self.send_msgs([ + { + "cmd": "LocationChecks", + "locations": checked_location_ids + } + ]) + + # Check for Goal Completion + if self.game_controller.goal_completed: + await self.send_msgs([ + { + "cmd": "StatusUpdate", + "status": CommonClient.ClientStatus.CLIENT_GOAL + } + ]) + + +def main() -> None: + Utils.init_logging("ZorkGrandInquisitorClient", exception_logger="Client") + + async def _main(): + ctx: ZorkGrandInquisitorContext = ZorkGrandInquisitorContext(None, None) + + ctx.server_task = asyncio.create_task(CommonClient.server_loop(ctx), name="server loop") + ctx.controller_task = asyncio.create_task(ctx.controller(), name="ZorkGrandInquisitorController") + + if CommonClient.gui_enabled: + ctx.run_gui() + + ctx.run_cli() + + await ctx.exit_event.wait() + await ctx.shutdown() + + import colorama + + colorama.init() + + asyncio.run(_main()) + + colorama.deinit() + + +if __name__ == "__main__": + main() diff --git a/worlds/zork_grand_inquisitor/data/__init__.py b/worlds/zork_grand_inquisitor/data/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/zork_grand_inquisitor/data/entrance_rule_data.py b/worlds/zork_grand_inquisitor/data/entrance_rule_data.py new file mode 100644 index 000000000000..f48be5eb6b6a --- /dev/null +++ b/worlds/zork_grand_inquisitor/data/entrance_rule_data.py @@ -0,0 +1,419 @@ +from typing import Dict, Tuple, Union + +from ..enums import ZorkGrandInquisitorEvents, ZorkGrandInquisitorItems, ZorkGrandInquisitorRegions + + +entrance_rule_data: Dict[ + Tuple[ + ZorkGrandInquisitorRegions, + ZorkGrandInquisitorRegions, + ], + Union[ + Tuple[ + Tuple[ + Union[ + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorRegions, + ], + ..., + ], + ..., + ], + None, + ], +] = { + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.DM_LAIR): ( + ( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE, + ), + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR, + ), + ), + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.GUE_TECH): ( + ( + ZorkGrandInquisitorItems.SPELL_REZROV, + ZorkGrandInquisitorItems.HOTSPOT_IN_MAGIC_WE_TRUST_DOOR, + ), + ), + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH, + ), + ), + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.HADES_SHORE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES, + ), + ), + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.PORT_FOOZLE): None, + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB, + ), + ), + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS): ( + ( + ZorkGrandInquisitorItems.SUBWAY_TOKEN, + ZorkGrandInquisitorItems.HOTSPOT_SUBWAY_TOKEN_SLOT, + ), + ), + (ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY, + ), + ), + (ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.CROSSROADS): None, + (ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR): ( + ( + ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR, + ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD, + ), + ), + (ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH, + ), + ), + (ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.HADES_SHORE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES, + ), + ), + (ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB, + ), + ), + (ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY, + ), + ), + (ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, ZorkGrandInquisitorRegions.DM_LAIR): None, + (ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, ZorkGrandInquisitorRegions.WALKING_CASTLE): ( + ( + ZorkGrandInquisitorItems.HOTSPOT_BLINDS, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL, + ), + ), + (ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, ZorkGrandInquisitorRegions.WHITE_HOUSE): ( + ( + ZorkGrandInquisitorItems.HOTSPOT_CLOSET_DOOR, + ZorkGrandInquisitorItems.SPELL_NARWILE, + ZorkGrandInquisitorEvents.KNOWS_YASTARD, + ), + ), + (ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO, ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON): ( + ( + ZorkGrandInquisitorItems.TOTEM_GRIFF, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_CLAW, + ), + ), + (ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO, ZorkGrandInquisitorRegions.HADES_BEYOND_GATES): None, + (ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO): None, + (ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, ZorkGrandInquisitorRegions.ENDGAME): ( + ( + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH, + ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS, + ZorkGrandInquisitorRegions.WHITE_HOUSE, + ZorkGrandInquisitorItems.TOTEM_BROG, # Needed here since White House is not broken down in 2 regions + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT, + ZorkGrandInquisitorItems.BROGS_PLANK, + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE, + ), + ), + (ZorkGrandInquisitorRegions.GUE_TECH, ZorkGrandInquisitorRegions.CROSSROADS): None, + (ZorkGrandInquisitorRegions.GUE_TECH, ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY): ( + ( + ZorkGrandInquisitorItems.SPELL_IGRAM, + ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS, + ), + ), + (ZorkGrandInquisitorRegions.GUE_TECH, ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE): ( + (ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_DOOR,), + ), + (ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, ZorkGrandInquisitorRegions.GUE_TECH): None, + (ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE): ( + ( + ZorkGrandInquisitorItems.STUDENT_ID, + ZorkGrandInquisitorItems.HOTSPOT_STUDENT_ID_MACHINE, + ), + ), + (ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, ZorkGrandInquisitorRegions.CROSSROADS): ( + (ZorkGrandInquisitorItems.MAP,), + ), + (ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, ZorkGrandInquisitorRegions.DM_LAIR): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR, + ), + ), + (ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, ZorkGrandInquisitorRegions.GUE_TECH): None, + (ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, ZorkGrandInquisitorRegions.HADES_SHORE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES, + ), + ), + (ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB, + ), + ), + (ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY, + ), + ), + (ZorkGrandInquisitorRegions.HADES, ZorkGrandInquisitorRegions.HADES_BEYOND_GATES): ( + ( + ZorkGrandInquisitorEvents.KNOWS_SNAVIG, + ZorkGrandInquisitorItems.TOTEM_BROG, # Visually hiding this totem is tied to owning it; no choice + ), + ), + (ZorkGrandInquisitorRegions.HADES, ZorkGrandInquisitorRegions.HADES_SHORE): ( + (ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS,), + ), + (ZorkGrandInquisitorRegions.HADES_BEYOND_GATES, ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO): ( + ( + ZorkGrandInquisitorItems.SPELL_NARWILE, + ZorkGrandInquisitorEvents.KNOWS_YASTARD, + ), + ), + (ZorkGrandInquisitorRegions.HADES_BEYOND_GATES, ZorkGrandInquisitorRegions.HADES): None, + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.CROSSROADS): ( + (ZorkGrandInquisitorItems.MAP,), + ), + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.DM_LAIR): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR, + ), + ), + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH, + ), + ), + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.HADES): ( + ( + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER, + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS, + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ), + ), + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB, + ), + ), + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS): None, + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM): ( + (ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM,), + ), + (ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): ( + (ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY,), + ), + (ZorkGrandInquisitorRegions.MENU, ZorkGrandInquisitorRegions.PORT_FOOZLE): None, + (ZorkGrandInquisitorRegions.MONASTERY, ZorkGrandInquisitorRegions.HADES_SHORE): ( + ( + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH, + ), + ), + (ZorkGrandInquisitorRegions.MONASTERY, ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT): ( + ( + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_HALL_OF_INQUISITION, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH, + ), + ), + (ZorkGrandInquisitorRegions.MONASTERY, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): None, + (ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, ZorkGrandInquisitorRegions.MONASTERY): None, + (ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST): ( + ( + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER, + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT, + ZorkGrandInquisitorItems.LARGE_TELEGRAPH_HAMMER, + ZorkGrandInquisitorItems.SPELL_NARWILE, + ZorkGrandInquisitorEvents.KNOWS_YASTARD, + ), + ), + (ZorkGrandInquisitorRegions.PORT_FOOZLE, ZorkGrandInquisitorRegions.CROSSROADS): ( + ( + ZorkGrandInquisitorEvents.LANTERN_DALBOZ_ACCESSIBLE, + ZorkGrandInquisitorItems.ROPE, + ZorkGrandInquisitorItems.HOTSPOT_WELL, + ), + ), + (ZorkGrandInquisitorRegions.PORT_FOOZLE, ZorkGrandInquisitorRegions.PORT_FOOZLE_JACKS_SHOP): ( + ( + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL, + ), + ), + (ZorkGrandInquisitorRegions.PORT_FOOZLE_JACKS_SHOP, ZorkGrandInquisitorRegions.PORT_FOOZLE): None, + (ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST, ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT): None, + (ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST, ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN): ( + ( + ZorkGrandInquisitorItems.TOTEM_LUCY, + ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR, + ), + ), + (ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, ZorkGrandInquisitorRegions.ENDGAME): ( + ( + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS, + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH, + ZorkGrandInquisitorRegions.WHITE_HOUSE, + ZorkGrandInquisitorItems.TOTEM_BROG, # Needed here since White House is not broken down in 2 regions + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT, + ZorkGrandInquisitorItems.BROGS_PLANK, + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE, + ), + ), + (ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST): None, + (ZorkGrandInquisitorRegions.SPELL_LAB, ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE): None, + (ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, ZorkGrandInquisitorRegions.CROSSROADS): ( + (ZorkGrandInquisitorItems.MAP,), + ), + (ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, ZorkGrandInquisitorRegions.DM_LAIR): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR, + ), + ), + (ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH, + ), + ), + (ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY): None, + (ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, ZorkGrandInquisitorRegions.HADES_SHORE): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES, + ), + ), + (ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, ZorkGrandInquisitorRegions.SPELL_LAB): ( + ( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE, + ZorkGrandInquisitorEvents.DAM_DESTROYED, + ZorkGrandInquisitorItems.SPELL_GOLGATEM, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM, + ), + ), + (ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): ( + ( + ZorkGrandInquisitorItems.MAP, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY, + ), + ), + (ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, ZorkGrandInquisitorRegions.CROSSROADS): None, + (ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, ZorkGrandInquisitorRegions.HADES_SHORE): ( + ( + ZorkGrandInquisitorItems.SPELL_KENDALL, + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES, + ), + ), + (ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM): ( + ( + ZorkGrandInquisitorItems.SPELL_KENDALL, + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM, + ), + ), + (ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): ( + ( + ZorkGrandInquisitorItems.SPELL_KENDALL, + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY, + ), + ), + (ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, ZorkGrandInquisitorRegions.HADES_SHORE): ( + (ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES,), + ), + (ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS): None, + (ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, ZorkGrandInquisitorRegions.SUBWAY_MONASTERY): ( + (ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY,), + ), + (ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, ZorkGrandInquisitorRegions.HADES_SHORE): ( + (ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES,), + ), + (ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, ZorkGrandInquisitorRegions.MONASTERY): ( + ( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorEvents.ROPE_GLORFABLE, + ZorkGrandInquisitorItems.HOTSPOT_MONASTERY_VENT, + ), + ), + (ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS): None, + (ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM): ( + (ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM,), + ), + (ZorkGrandInquisitorRegions.WALKING_CASTLE, ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR): None, + (ZorkGrandInquisitorRegions.WHITE_HOUSE, ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR): None, + (ZorkGrandInquisitorRegions.WHITE_HOUSE, ZorkGrandInquisitorRegions.ENDGAME): ( + ( + ZorkGrandInquisitorItems.TOTEM_BROG, # Needed here since White House is not broken down in 2 regions + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT, + ZorkGrandInquisitorItems.BROGS_PLANK, + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE, + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH, + ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS, + ), + ), +} diff --git a/worlds/zork_grand_inquisitor/data/item_data.py b/worlds/zork_grand_inquisitor/data/item_data.py new file mode 100644 index 000000000000..c312bbce3d09 --- /dev/null +++ b/worlds/zork_grand_inquisitor/data/item_data.py @@ -0,0 +1,792 @@ +from typing import Dict, NamedTuple, Optional, Tuple, Union + +from BaseClasses import ItemClassification + +from ..enums import ZorkGrandInquisitorItems, ZorkGrandInquisitorTags + + +class ZorkGrandInquisitorItemData(NamedTuple): + statemap_keys: Optional[Tuple[int, ...]] + archipelago_id: Optional[int] + classification: ItemClassification + tags: Tuple[ZorkGrandInquisitorTags, ...] + maximum_quantity: Optional[int] = 1 + + +ITEM_OFFSET = 9758067000 + +item_data: Dict[ZorkGrandInquisitorItems, ZorkGrandInquisitorItemData] = { + # Inventory Items + ZorkGrandInquisitorItems.BROGS_BICKERING_TORCH: ZorkGrandInquisitorItemData( + statemap_keys=(67,), # Extinguished = 103 + archipelago_id=ITEM_OFFSET + 0, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH: ZorkGrandInquisitorItemData( + statemap_keys=(68,), # Extinguished = 104 + archipelago_id=ITEM_OFFSET + 1, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.BROGS_GRUE_EGG: ZorkGrandInquisitorItemData( + statemap_keys=(70,), # Boiled = 71 + archipelago_id=ITEM_OFFSET + 2, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.BROGS_PLANK: ZorkGrandInquisitorItemData( + statemap_keys=(69,), + archipelago_id=ITEM_OFFSET + 3, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.FLATHEADIA_FUDGE: ZorkGrandInquisitorItemData( + statemap_keys=(54,), + archipelago_id=ITEM_OFFSET + 4, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP: ZorkGrandInquisitorItemData( + statemap_keys=(86,), + archipelago_id=ITEM_OFFSET + 5, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH: ZorkGrandInquisitorItemData( + statemap_keys=(84,), + archipelago_id=ITEM_OFFSET + 6, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT: ZorkGrandInquisitorItemData( + statemap_keys=(9,), + archipelago_id=ITEM_OFFSET + 7, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN: ZorkGrandInquisitorItemData( + statemap_keys=(16,), + archipelago_id=ITEM_OFFSET + 8, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.HAMMER: ZorkGrandInquisitorItemData( + statemap_keys=(23,), + archipelago_id=ITEM_OFFSET + 9, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.HUNGUS_LARD: ZorkGrandInquisitorItemData( + statemap_keys=(55,), + archipelago_id=ITEM_OFFSET + 10, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.JAR_OF_HOTBUGS: ZorkGrandInquisitorItemData( + statemap_keys=(56,), + archipelago_id=ITEM_OFFSET + 11, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.LANTERN: ZorkGrandInquisitorItemData( + statemap_keys=(4,), + archipelago_id=ITEM_OFFSET + 12, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.LARGE_TELEGRAPH_HAMMER: ZorkGrandInquisitorItemData( + statemap_keys=(88,), + archipelago_id=ITEM_OFFSET + 13, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1: ZorkGrandInquisitorItemData( + statemap_keys=(116,), # With fly = 120 + archipelago_id=ITEM_OFFSET + 14, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2: ZorkGrandInquisitorItemData( + statemap_keys=(117,), # With fly = 121 + archipelago_id=ITEM_OFFSET + 15, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3: ZorkGrandInquisitorItemData( + statemap_keys=(118,), # With fly = 122 + archipelago_id=ITEM_OFFSET + 16, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4: ZorkGrandInquisitorItemData( + statemap_keys=(119,), # With fly = 123 + archipelago_id=ITEM_OFFSET + 17, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.MAP: ZorkGrandInquisitorItemData( + statemap_keys=(6,), + archipelago_id=ITEM_OFFSET + 18, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.MEAD_LIGHT: ZorkGrandInquisitorItemData( + statemap_keys=(2,), + archipelago_id=ITEM_OFFSET + 19, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.MOSS_OF_MAREILON: ZorkGrandInquisitorItemData( + statemap_keys=(57,), + archipelago_id=ITEM_OFFSET + 20, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.MUG: ZorkGrandInquisitorItemData( + statemap_keys=(35,), + archipelago_id=ITEM_OFFSET + 21, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.OLD_SCRATCH_CARD: ZorkGrandInquisitorItemData( + statemap_keys=(17,), + archipelago_id=ITEM_OFFSET + 22, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.PERMA_SUCK_MACHINE: ZorkGrandInquisitorItemData( + statemap_keys=(36,), + archipelago_id=ITEM_OFFSET + 23, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.PLASTIC_SIX_PACK_HOLDER: ZorkGrandInquisitorItemData( + statemap_keys=(3,), + archipelago_id=ITEM_OFFSET + 24, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS: ZorkGrandInquisitorItemData( + statemap_keys=(5827,), + archipelago_id=ITEM_OFFSET + 25, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.PROZORK_TABLET: ZorkGrandInquisitorItemData( + statemap_keys=(65,), + archipelago_id=ITEM_OFFSET + 26, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.QUELBEE_HONEYCOMB: ZorkGrandInquisitorItemData( + statemap_keys=(53,), + archipelago_id=ITEM_OFFSET + 27, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.ROPE: ZorkGrandInquisitorItemData( + statemap_keys=(83,), + archipelago_id=ITEM_OFFSET + 28, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_ANS: ZorkGrandInquisitorItemData( + statemap_keys=(101,), # SNA = 41 + archipelago_id=ITEM_OFFSET + 29, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_GIV: ZorkGrandInquisitorItemData( + statemap_keys=(102,), # VIG = 48 + archipelago_id=ITEM_OFFSET + 30, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.SHOVEL: ZorkGrandInquisitorItemData( + statemap_keys=(49,), + archipelago_id=ITEM_OFFSET + 31, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.SNAPDRAGON: ZorkGrandInquisitorItemData( + statemap_keys=(50,), + archipelago_id=ITEM_OFFSET + 32, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.STUDENT_ID: ZorkGrandInquisitorItemData( + statemap_keys=(39,), + archipelago_id=ITEM_OFFSET + 33, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.SUBWAY_TOKEN: ZorkGrandInquisitorItemData( + statemap_keys=(20,), + archipelago_id=ITEM_OFFSET + 34, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.SWORD: ZorkGrandInquisitorItemData( + statemap_keys=(21,), + archipelago_id=ITEM_OFFSET + 35, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.ZIMDOR_SCROLL: ZorkGrandInquisitorItemData( + statemap_keys=(25,), + archipelago_id=ITEM_OFFSET + 36, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + ZorkGrandInquisitorItems.ZORK_ROCKS: ZorkGrandInquisitorItemData( + statemap_keys=(37,), + archipelago_id=ITEM_OFFSET + 37, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.INVENTORY_ITEM,), + ), + # Hotspots + ZorkGrandInquisitorItems.HOTSPOT_666_MAILBOX: ZorkGrandInquisitorItemData( + statemap_keys=(9116,), + archipelago_id=ITEM_OFFSET + 100 + 0, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS: ZorkGrandInquisitorItemData( + statemap_keys=(15434, 15436, 15438, 15440), + archipelago_id=ITEM_OFFSET + 100 + 1, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_BLANK_SCROLL_BOX: ZorkGrandInquisitorItemData( + statemap_keys=(12096,), + archipelago_id=ITEM_OFFSET + 100 + 2, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_BLINDS: ZorkGrandInquisitorItemData( + statemap_keys=(4799,), + archipelago_id=ITEM_OFFSET + 100 + 3, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS: ZorkGrandInquisitorItemData( + statemap_keys=(12691, 12692, 12693, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701), + archipelago_id=ITEM_OFFSET + 100 + 4, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(12702,), + archipelago_id=ITEM_OFFSET + 100 + 5, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_VACUUM_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(12909,), + archipelago_id=ITEM_OFFSET + 100 + 6, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_CHANGE_MACHINE_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(12900,), + archipelago_id=ITEM_OFFSET + 100 + 7, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_CLOSET_DOOR: ZorkGrandInquisitorItemData( + statemap_keys=(5010,), + archipelago_id=ITEM_OFFSET + 100 + 8, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(9539,), + archipelago_id=ITEM_OFFSET + 100 + 9, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER: ZorkGrandInquisitorItemData( + statemap_keys=(19712,), + archipelago_id=ITEM_OFFSET + 100 + 10, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT: ZorkGrandInquisitorItemData( + statemap_keys=(2586,), + archipelago_id=ITEM_OFFSET + 100 + 11, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_DENTED_LOCKER: ZorkGrandInquisitorItemData( + statemap_keys=(11878,), + archipelago_id=ITEM_OFFSET + 100 + 12, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_DIRT_MOUND: ZorkGrandInquisitorItemData( + statemap_keys=(11751,), + archipelago_id=ITEM_OFFSET + 100 + 13, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_DOCK_WINCH: ZorkGrandInquisitorItemData( + statemap_keys=(15147, 15153), + archipelago_id=ITEM_OFFSET + 100 + 14, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_CLAW: ZorkGrandInquisitorItemData( + statemap_keys=(1705,), + archipelago_id=ITEM_OFFSET + 100 + 15, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS: ZorkGrandInquisitorItemData( + statemap_keys=(1425, 1426), + archipelago_id=ITEM_OFFSET + 100 + 16, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE: ZorkGrandInquisitorItemData( + statemap_keys=(13106,), + archipelago_id=ITEM_OFFSET + 100 + 17, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS: ZorkGrandInquisitorItemData( + statemap_keys=(13219, 13220, 13221, 13222), + archipelago_id=ITEM_OFFSET + 100 + 18, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS: ZorkGrandInquisitorItemData( + statemap_keys=(14327, 14332, 14337, 14342), + archipelago_id=ITEM_OFFSET + 100 + 19, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_COIN_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(12528,), + archipelago_id=ITEM_OFFSET + 100 + 20, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_DOORS: ZorkGrandInquisitorItemData( + statemap_keys=(12523, 12524, 12525), + archipelago_id=ITEM_OFFSET + 100 + 21, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_GLASS_CASE: ZorkGrandInquisitorItemData( + statemap_keys=(13002,), + archipelago_id=ITEM_OFFSET + 100 + 22, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL: ZorkGrandInquisitorItemData( + statemap_keys=(10726,), + archipelago_id=ITEM_OFFSET + 100 + 23, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_DOOR: ZorkGrandInquisitorItemData( + statemap_keys=(12280,), + archipelago_id=ITEM_OFFSET + 100 + 24, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_GRASS: ZorkGrandInquisitorItemData( + statemap_keys=( + 17694, + 17695, + 17696, + 17697, + 18200, + 17703, + 17704, + 17705, + 17710, + 17711, + 17712, + 17713, + 17714, + 17715, + 17716, + 17722, + 17723, + 17724, + 17725, + 17726, + 17727 + ), + archipelago_id=ITEM_OFFSET + 100 + 25, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS: ZorkGrandInquisitorItemData( + statemap_keys=(8448, 8449, 8450, 8451, 8452, 8453, 8454, 8455, 8456, 8457, 8458, 8459), + archipelago_id=ITEM_OFFSET + 100 + 26, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER: ZorkGrandInquisitorItemData( + statemap_keys=(8446,), + archipelago_id=ITEM_OFFSET + 100 + 27, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_HARRY: ZorkGrandInquisitorItemData( + statemap_keys=(4260,), + archipelago_id=ITEM_OFFSET + 100 + 28, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_ASHTRAY: ZorkGrandInquisitorItemData( + statemap_keys=(18026,), + archipelago_id=ITEM_OFFSET + 100 + 29, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_BIRD_BATH: ZorkGrandInquisitorItemData( + statemap_keys=(17623,), + archipelago_id=ITEM_OFFSET + 100 + 30, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_IN_MAGIC_WE_TRUST_DOOR: ZorkGrandInquisitorItemData( + statemap_keys=(13140,), + archipelago_id=ITEM_OFFSET + 100 + 31, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR: ZorkGrandInquisitorItemData( + statemap_keys=(10441,), + archipelago_id=ITEM_OFFSET + 100 + 32, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_LOUDSPEAKER_VOLUME_BUTTONS: ZorkGrandInquisitorItemData( + statemap_keys=(19632, 19627), + archipelago_id=ITEM_OFFSET + 100 + 33, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_DOOR: ZorkGrandInquisitorItemData( + statemap_keys=(3025,), + archipelago_id=ITEM_OFFSET + 100 + 34, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG: ZorkGrandInquisitorItemData( + statemap_keys=(3036,), + archipelago_id=ITEM_OFFSET + 100 + 35, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_MIRROR: ZorkGrandInquisitorItemData( + statemap_keys=(5031,), + archipelago_id=ITEM_OFFSET + 100 + 36, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_MONASTERY_VENT: ZorkGrandInquisitorItemData( + statemap_keys=(13597,), + archipelago_id=ITEM_OFFSET + 100 + 37, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_MOSSY_GRATE: ZorkGrandInquisitorItemData( + statemap_keys=(13390,), + archipelago_id=ITEM_OFFSET + 100 + 38, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR: ZorkGrandInquisitorItemData( + statemap_keys=(2455, 2447), + archipelago_id=ITEM_OFFSET + 100 + 39, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS: ZorkGrandInquisitorItemData( + statemap_keys=(12389, 12390), + archipelago_id=ITEM_OFFSET + 100 + 40, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_QUELBEE_HIVE: ZorkGrandInquisitorItemData( + statemap_keys=(4302,), + archipelago_id=ITEM_OFFSET + 100 + 41, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE: ZorkGrandInquisitorItemData( + statemap_keys=(16383, 16384), + archipelago_id=ITEM_OFFSET + 100 + 42, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE: ZorkGrandInquisitorItemData( + statemap_keys=(2769,), + archipelago_id=ITEM_OFFSET + 100 + 43, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SNAPDRAGON: ZorkGrandInquisitorItemData( + statemap_keys=(4149,), + archipelago_id=ITEM_OFFSET + 100 + 44, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_BUTTONS: ZorkGrandInquisitorItemData( + statemap_keys=(12584, 12585, 12586, 12587), + archipelago_id=ITEM_OFFSET + 100 + 45, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_COIN_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(12574,), + archipelago_id=ITEM_OFFSET + 100 + 46, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SOUVENIR_COIN_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(13412,), + archipelago_id=ITEM_OFFSET + 100 + 47, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER: ZorkGrandInquisitorItemData( + statemap_keys=(12170,), + archipelago_id=ITEM_OFFSET + 100 + 48, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM: ZorkGrandInquisitorItemData( + statemap_keys=(16382,), + archipelago_id=ITEM_OFFSET + 100 + 49, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SPRING_MUSHROOM: ZorkGrandInquisitorItemData( + statemap_keys=(4209,), + archipelago_id=ITEM_OFFSET + 100 + 50, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_STUDENT_ID_MACHINE: ZorkGrandInquisitorItemData( + statemap_keys=(11973,), + archipelago_id=ITEM_OFFSET + 100 + 51, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_SUBWAY_TOKEN_SLOT: ZorkGrandInquisitorItemData( + statemap_keys=(13168,), + archipelago_id=ITEM_OFFSET + 100 + 52, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY: ZorkGrandInquisitorItemData( + statemap_keys=(15396,), + archipelago_id=ITEM_OFFSET + 100 + 53, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH: ZorkGrandInquisitorItemData( + statemap_keys=(9706,), + archipelago_id=ITEM_OFFSET + 100 + 54, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS: ZorkGrandInquisitorItemData( + statemap_keys=(9728, 9729, 9730), + archipelago_id=ITEM_OFFSET + 100 + 55, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + ZorkGrandInquisitorItems.HOTSPOT_WELL: ZorkGrandInquisitorItemData( + statemap_keys=(10314,), + archipelago_id=ITEM_OFFSET + 100 + 56, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.HOTSPOT,), + ), + # Spells + ZorkGrandInquisitorItems.SPELL_GLORF: ZorkGrandInquisitorItemData( + statemap_keys=(202,), + archipelago_id=ITEM_OFFSET + 200 + 0, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + ZorkGrandInquisitorItems.SPELL_GOLGATEM: ZorkGrandInquisitorItemData( + statemap_keys=(192,), + archipelago_id=ITEM_OFFSET + 200 + 1, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + ZorkGrandInquisitorItems.SPELL_IGRAM: ZorkGrandInquisitorItemData( + statemap_keys=(199,), + archipelago_id=ITEM_OFFSET + 200 + 2, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + ZorkGrandInquisitorItems.SPELL_KENDALL: ZorkGrandInquisitorItemData( + statemap_keys=(196,), + archipelago_id=ITEM_OFFSET + 200 + 3, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + ZorkGrandInquisitorItems.SPELL_NARWILE: ZorkGrandInquisitorItemData( + statemap_keys=(197,), + archipelago_id=ITEM_OFFSET + 200 + 4, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + ZorkGrandInquisitorItems.SPELL_REZROV: ZorkGrandInquisitorItemData( + statemap_keys=(195,), + archipelago_id=ITEM_OFFSET + 200 + 5, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + ZorkGrandInquisitorItems.SPELL_THROCK: ZorkGrandInquisitorItemData( + statemap_keys=(200,), + archipelago_id=ITEM_OFFSET + 200 + 6, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + ZorkGrandInquisitorItems.SPELL_VOXAM: ZorkGrandInquisitorItemData( + statemap_keys=(191,), + archipelago_id=ITEM_OFFSET + 200 + 7, + classification=ItemClassification.useful, + tags=(ZorkGrandInquisitorTags.SPELL,), + ), + # Subway Destinations + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM: ZorkGrandInquisitorItemData( + statemap_keys=(13757, 13297, 13486, 13625), + archipelago_id=ITEM_OFFSET + 300 + 0, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SUBWAY_DESTINATION,), + ), + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES: ZorkGrandInquisitorItemData( + statemap_keys=(13758, 13309, 13498, 13637), + archipelago_id=ITEM_OFFSET + 300 + 1, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SUBWAY_DESTINATION,), + ), + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY: ZorkGrandInquisitorItemData( + statemap_keys=(13759, 13316, 13505, 13644), + archipelago_id=ITEM_OFFSET + 300 + 2, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.SUBWAY_DESTINATION,), + ), + # Teleporter Destinations + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR: ZorkGrandInquisitorItemData( + statemap_keys=(2203,), + archipelago_id=ITEM_OFFSET + 400 + 0, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TELEPORTER_DESTINATION,), + ), + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH: ZorkGrandInquisitorItemData( + statemap_keys=(7132,), + archipelago_id=ITEM_OFFSET + 400 + 1, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TELEPORTER_DESTINATION,), + ), + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES: ZorkGrandInquisitorItemData( + statemap_keys=(7119,), + archipelago_id=ITEM_OFFSET + 400 + 2, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TELEPORTER_DESTINATION,), + ), + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY: ZorkGrandInquisitorItemData( + statemap_keys=(7148,), + archipelago_id=ITEM_OFFSET + 400 + 3, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TELEPORTER_DESTINATION,), + ), + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB: ZorkGrandInquisitorItemData( + statemap_keys=(16545,), + archipelago_id=ITEM_OFFSET + 400 + 4, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TELEPORTER_DESTINATION,), + ), + # Totemizer Destinations + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_HALL_OF_INQUISITION: ZorkGrandInquisitorItemData( + statemap_keys=(9660,), + archipelago_id=ITEM_OFFSET + 500 + 0, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TOTEMIZER_DESTINATION,), + ), + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_INFINITY: ZorkGrandInquisitorItemData( + statemap_keys=(9666,), + archipelago_id=ITEM_OFFSET + 500 + 1, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.TOTEMIZER_DESTINATION,), + ), + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL: ZorkGrandInquisitorItemData( + statemap_keys=(9668,), + archipelago_id=ITEM_OFFSET + 500 + 2, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TOTEMIZER_DESTINATION,), + ), + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_SURFACE_OF_MERZ: ZorkGrandInquisitorItemData( + statemap_keys=(9662,), + archipelago_id=ITEM_OFFSET + 500 + 3, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.TOTEMIZER_DESTINATION,), + ), + # Totems + ZorkGrandInquisitorItems.TOTEM_BROG: ZorkGrandInquisitorItemData( + statemap_keys=(4853,), + archipelago_id=ITEM_OFFSET + 600 + 0, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TOTEM,), + ), + ZorkGrandInquisitorItems.TOTEM_GRIFF: ZorkGrandInquisitorItemData( + statemap_keys=(4315,), + archipelago_id=ITEM_OFFSET + 600 + 1, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TOTEM,), + ), + ZorkGrandInquisitorItems.TOTEM_LUCY: ZorkGrandInquisitorItemData( + statemap_keys=(5223,), + archipelago_id=ITEM_OFFSET + 600 + 2, + classification=ItemClassification.progression, + tags=(ZorkGrandInquisitorTags.TOTEM,), + ), + # Filler + ZorkGrandInquisitorItems.FILLER_INQUISITION_PROPAGANDA_FLYER: ZorkGrandInquisitorItemData( + statemap_keys=None, + archipelago_id=ITEM_OFFSET + 700 + 0, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.FILLER,), + maximum_quantity=None, + ), + ZorkGrandInquisitorItems.FILLER_UNREADABLE_SPELL_SCROLL: ZorkGrandInquisitorItemData( + statemap_keys=None, + archipelago_id=ITEM_OFFSET + 700 + 1, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.FILLER,), + maximum_quantity=None, + ), + ZorkGrandInquisitorItems.FILLER_MAGIC_CONTRABAND: ZorkGrandInquisitorItemData( + statemap_keys=None, + archipelago_id=ITEM_OFFSET + 700 + 2, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.FILLER,), + maximum_quantity=None, + ), + ZorkGrandInquisitorItems.FILLER_FROBOZZ_ELECTRIC_GADGET: ZorkGrandInquisitorItemData( + statemap_keys=None, + archipelago_id=ITEM_OFFSET + 700 + 3, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.FILLER,), + maximum_quantity=None, + ), + ZorkGrandInquisitorItems.FILLER_NONSENSICAL_INQUISITION_PAPERWORK: ZorkGrandInquisitorItemData( + statemap_keys=None, + archipelago_id=ITEM_OFFSET + 700 + 4, + classification=ItemClassification.filler, + tags=(ZorkGrandInquisitorTags.FILLER,), + maximum_quantity=None, + ), +} diff --git a/worlds/zork_grand_inquisitor/data/location_data.py b/worlds/zork_grand_inquisitor/data/location_data.py new file mode 100644 index 000000000000..8b4e57392de8 --- /dev/null +++ b/worlds/zork_grand_inquisitor/data/location_data.py @@ -0,0 +1,1535 @@ +from typing import Dict, NamedTuple, Optional, Tuple, Union + +from ..enums import ( + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorLocations, + ZorkGrandInquisitorRegions, + ZorkGrandInquisitorTags, +) + + +class ZorkGrandInquisitorLocationData(NamedTuple): + game_state_trigger: Optional[ + Tuple[ + Union[ + Tuple[str, str], + Tuple[int, int], + Tuple[int, Tuple[int, ...]], + ], + ..., + ] + ] + archipelago_id: Optional[int] + region: ZorkGrandInquisitorRegions + tags: Optional[Tuple[ZorkGrandInquisitorTags, ...]] = None + requirements: Optional[ + Tuple[ + Union[ + Union[ + ZorkGrandInquisitorItems, + ZorkGrandInquisitorEvents, + ], + Tuple[ + Union[ + ZorkGrandInquisitorItems, + ZorkGrandInquisitorEvents, + ], + ..., + ], + ], + ..., + ] + ] = None + event_item_name: Optional[str] = None + + +LOCATION_OFFSET = 9758067000 + +location_data: Dict[ + Union[ZorkGrandInquisitorLocations, ZorkGrandInquisitorEvents], ZorkGrandInquisitorLocationData +] = { + ZorkGrandInquisitorLocations.ALARM_SYSTEM_IS_DOWN: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tr2m"),), + archipelago_id=LOCATION_OFFSET + 0, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.ARREST_THE_VANDAL: ZorkGrandInquisitorLocationData( + game_state_trigger=((10789, 1),), + archipelago_id=LOCATION_OFFSET + 1, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL, + ), + ), + ZorkGrandInquisitorLocations.ARTIFACTS_EXPLAINED: ZorkGrandInquisitorLocationData( + game_state_trigger=((11787, 1), (11788, 1), (11789, 1)), + archipelago_id=LOCATION_OFFSET + 2, + region=ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.A_BIG_FAT_SASSY_2_HEADED_MONSTER: ZorkGrandInquisitorLocationData( + game_state_trigger=((8929, 1),), + archipelago_id=LOCATION_OFFSET + 3, + region=ZorkGrandInquisitorRegions.HADES, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.KNOWS_OBIDIL,), + ), + ZorkGrandInquisitorLocations.A_LETTER_FROM_THE_WHITE_HOUSE: ZorkGrandInquisitorLocationData( + game_state_trigger=((9124, 1),), + archipelago_id=LOCATION_OFFSET + 4, + region=ZorkGrandInquisitorRegions.HADES, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE, + ZorkGrandInquisitorItems.HOTSPOT_666_MAILBOX, + ), + ), + ZorkGrandInquisitorLocations.A_SMALLWAY: ZorkGrandInquisitorLocationData( + game_state_trigger=((11777, 1),), + archipelago_id=LOCATION_OFFSET + 5, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS, + ZorkGrandInquisitorItems.SPELL_IGRAM, + ), + ), + ZorkGrandInquisitorLocations.BEAUTIFUL_THATS_PLENTY: ZorkGrandInquisitorLocationData( + game_state_trigger=((13278, 1),), + archipelago_id=LOCATION_OFFSET + 6, + region=ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_MOSSY_GRATE, + ZorkGrandInquisitorItems.SPELL_THROCK, + ), + ), + ZorkGrandInquisitorLocations.BEBURTT_DEMYSTIFIED: ZorkGrandInquisitorLocationData( + game_state_trigger=((16315, 1),), + archipelago_id=LOCATION_OFFSET + 7, + region=ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE, + ZorkGrandInquisitorItems.SPELL_KENDALL, + ), + ), + ZorkGrandInquisitorLocations.BETTER_SPELL_MANUFACTURING_IN_UNDER_10_MINUTES: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "th3x"),), + archipelago_id=LOCATION_OFFSET + 8, + region=ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE,), + ), + ZorkGrandInquisitorLocations.BOING_BOING_BOING: ZorkGrandInquisitorLocationData( + game_state_trigger=((4220, 1),), + archipelago_id=LOCATION_OFFSET + 9, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.HAMMER, + ZorkGrandInquisitorItems.SNAPDRAGON, + ZorkGrandInquisitorItems.HOTSPOT_SPRING_MUSHROOM, + ), + ), + ZorkGrandInquisitorLocations.BONK: ZorkGrandInquisitorLocationData( + game_state_trigger=((19491, 1),), + archipelago_id=LOCATION_OFFSET + 10, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.HAMMER, + ZorkGrandInquisitorItems.HOTSPOT_SNAPDRAGON, + ), + ), + ZorkGrandInquisitorLocations.BRAVE_SOULS_WANTED: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "us2g"),), + archipelago_id=LOCATION_OFFSET + 11, + region=ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.BROG_DO_GOOD: ZorkGrandInquisitorLocationData( + game_state_trigger=((2644, 1),), + archipelago_id=LOCATION_OFFSET + 12, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_BROG, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ) + ), + ZorkGrandInquisitorLocations.BROG_EAT_ROCKS: ZorkGrandInquisitorLocationData( + game_state_trigger=((2629, 1),), + archipelago_id=LOCATION_OFFSET + 13, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_BROG, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ) + ), + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB: ZorkGrandInquisitorLocationData( + game_state_trigger=((2650, 1),), + archipelago_id=LOCATION_OFFSET + 14, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_BROG, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ) + ), + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME: ZorkGrandInquisitorLocationData( + game_state_trigger=((15715, 1),), + archipelago_id=LOCATION_OFFSET + 15, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_BROG, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ZorkGrandInquisitorItems.BROGS_PLANK, + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE, + ) + ), + ZorkGrandInquisitorLocations.CASTLE_WATCHING_A_FIELD_GUIDE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "dv1t"),), + archipelago_id=LOCATION_OFFSET + 16, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.CAVES_NOTES: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "th3y"),), + archipelago_id=LOCATION_OFFSET + 17, + region=ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE,), + ), + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS: ZorkGrandInquisitorLocationData( + game_state_trigger=((9543, 1),), + archipelago_id=LOCATION_OFFSET + 18, + region=ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.CRISIS_AVERTED: ZorkGrandInquisitorLocationData( + game_state_trigger=((11769, 1),), + archipelago_id=LOCATION_OFFSET + 19, + region=ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED, + ZorkGrandInquisitorItems.SPELL_IGRAM, + ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS, + ZorkGrandInquisitorItems.HOTSPOT_DENTED_LOCKER, + ), + ), + ZorkGrandInquisitorLocations.CUT_THAT_OUT_YOU_LITTLE_CREEP: ZorkGrandInquisitorLocationData( + game_state_trigger=((19350, 1),), + archipelago_id=LOCATION_OFFSET + 20, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.DENIED_BY_THE_LAKE_MONSTER: ZorkGrandInquisitorLocationData( + game_state_trigger=((17632, 1),), + archipelago_id=LOCATION_OFFSET + 21, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_BLINDS, + ZorkGrandInquisitorItems.SPELL_GOLGATEM, + ), + ), + ZorkGrandInquisitorLocations.DESPERATELY_SEEKING_TUTOR: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tr2q"),), + archipelago_id=LOCATION_OFFSET + 22, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "hp5e"), (8919, 2), (9, 100)), + archipelago_id=LOCATION_OFFSET + 23, + region=ZorkGrandInquisitorRegions.HADES, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.SWORD,), + ), + ZorkGrandInquisitorLocations.DOOOOOOWN: ZorkGrandInquisitorLocationData( + game_state_trigger=((3619, 3600),), + archipelago_id=LOCATION_OFFSET + 24, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_GRIFF, + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG, + ), + ), + ZorkGrandInquisitorLocations.DOWN: ZorkGrandInquisitorLocationData( + game_state_trigger=((3619, 5300),), + archipelago_id=LOCATION_OFFSET + 25, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_LUCY, + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG, + ), + ), + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL: ZorkGrandInquisitorLocationData( + game_state_trigger=((9216, 1),), + archipelago_id=LOCATION_OFFSET + 26, + region=ZorkGrandInquisitorRegions.HADES_BEYOND_GATES, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.SPELL_NARWILE,), + ), + ZorkGrandInquisitorLocations.DUNCE_LOCKER: ZorkGrandInquisitorLocationData( + game_state_trigger=((11851, 1),), + archipelago_id=LOCATION_OFFSET + 27, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS, + ), + ), + ZorkGrandInquisitorLocations.EGGPLANTS: ZorkGrandInquisitorLocationData( + game_state_trigger=((3816, 11000),), + archipelago_id=LOCATION_OFFSET + 28, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.ELSEWHERE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "pc1e"),), + archipelago_id=LOCATION_OFFSET + 29, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.EMERGENCY_MAGICATRONIC_MESSAGE: ZorkGrandInquisitorLocationData( + game_state_trigger=((11784, 1),), + archipelago_id=LOCATION_OFFSET + 30, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + ), + ZorkGrandInquisitorLocations.ENJOY_YOUR_TRIP: ZorkGrandInquisitorLocationData( + game_state_trigger=((13743, 1),), + archipelago_id=LOCATION_OFFSET + 31, + region=ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.SPELL_KENDALL,), + ), + ZorkGrandInquisitorLocations.FAT_LOT_OF_GOOD_THATLL_DO_YA: ZorkGrandInquisitorLocationData( + game_state_trigger=((16368, 1),), + archipelago_id=LOCATION_OFFSET + 32, + region=ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.SPELL_IGRAM,), + ), + ZorkGrandInquisitorLocations.FIRE_FIRE: ZorkGrandInquisitorLocationData( + game_state_trigger=((10277, 1),), + archipelago_id=LOCATION_OFFSET + 33, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL, + ), + ), + ZorkGrandInquisitorLocations.FLOOD_CONTROL_DAM_3_THE_NOT_REMOTELY_BORING_TALE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "ue1h"),), + archipelago_id=LOCATION_OFFSET + 34, + region=ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON: ZorkGrandInquisitorLocationData( + game_state_trigger=((4222, 1),), + archipelago_id=LOCATION_OFFSET + 35, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SPELL_THROCK, + ZorkGrandInquisitorItems.SNAPDRAGON, + ZorkGrandInquisitorItems.HAMMER, + ZorkGrandInquisitorItems.HOTSPOT_SPRING_MUSHROOM, + ), + ), + ZorkGrandInquisitorLocations.FROBUARY_3_UNDERGROUNDHOG_DAY: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "dw2g"),), + archipelago_id=LOCATION_OFFSET + 36, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.GETTING_SOME_CHANGE: ZorkGrandInquisitorLocationData( + game_state_trigger=((12892, 1),), + archipelago_id=LOCATION_OFFSET + 37, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.ZORKMID_BILL_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_CHANGE_MACHINE_SLOT, + ), + ), + ZorkGrandInquisitorLocations.GO_AWAY: ZorkGrandInquisitorLocationData( + game_state_trigger=((10654, 1),), + archipelago_id=LOCATION_OFFSET + 38, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.GUE_TECH_DEANS_LIST: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tr2k"),), + archipelago_id=LOCATION_OFFSET + 39, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.GUE_TECH_ENTRANCE_EXAM: ZorkGrandInquisitorLocationData( + game_state_trigger=((11082, 1), (11307, 1), (11536, 1)), + archipelago_id=LOCATION_OFFSET + 40, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.GUE_TECH_HEALTH_MEMO: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tr2j"),), + archipelago_id=LOCATION_OFFSET + 41, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.GUE_TECH_MAGEMEISTERS: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tr2n"),), + archipelago_id=LOCATION_OFFSET + 42, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.HAVE_A_HELL_OF_A_DAY: ZorkGrandInquisitorLocationData( + game_state_trigger=((8443, 1),), + archipelago_id=LOCATION_OFFSET + 43, + region=ZorkGrandInquisitorRegions.HADES_SHORE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER, + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS, + ) + ), + ZorkGrandInquisitorLocations.HELLO_THIS_IS_SHONA_FROM_GURTH_PUBLISHING: ZorkGrandInquisitorLocationData( + game_state_trigger=((4698, 1),), + archipelago_id=LOCATION_OFFSET + 44, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.HELP_ME_CANT_BREATHE: ZorkGrandInquisitorLocationData( + game_state_trigger=((10421, 1),), + archipelago_id=LOCATION_OFFSET + 45, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_DOCK_WINCH, + ZorkGrandInquisitorItems.PLASTIC_SIX_PACK_HOLDER, + ), + ), + ZorkGrandInquisitorLocations.HEY_FREE_DIRT: ZorkGrandInquisitorLocationData( + game_state_trigger=((11747, 1),), + archipelago_id=LOCATION_OFFSET + 46, + region=ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_DIRT_MOUND, + ZorkGrandInquisitorItems.SHOVEL, + ), + ), + ZorkGrandInquisitorLocations.HI_MY_NAME_IS_DOUG: ZorkGrandInquisitorLocationData( + game_state_trigger=((4698, 2),), + archipelago_id=LOCATION_OFFSET + 47, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.HMMM_INFORMATIVE_YET_DEEPLY_DISTURBING: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "mt2h"),), + archipelago_id=LOCATION_OFFSET + 48, + region=ZorkGrandInquisitorRegions.MONASTERY, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.HOLD_ON_FOR_AN_IMPORTANT_MESSAGE: ZorkGrandInquisitorLocationData( + game_state_trigger=((4698, 5),), + archipelago_id=LOCATION_OFFSET + 49, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.HOW_TO_HYPNOTIZE_YOURSELF: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "uh1e"),), + archipelago_id=LOCATION_OFFSET + 50, + region=ZorkGrandInquisitorRegions.HADES_SHORE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.HOW_TO_WIN_AT_DOUBLE_FANUCCI: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "th3s"),), + archipelago_id=LOCATION_OFFSET + 51, + region=ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE,), + ), + ZorkGrandInquisitorLocations.IMBUE_BEBURTT: ZorkGrandInquisitorLocationData( + game_state_trigger=((194, 1),), + archipelago_id=LOCATION_OFFSET + 52, + region=ZorkGrandInquisitorRegions.SPELL_LAB, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_BLANK_SCROLL_BOX, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER, + ), + ), + ZorkGrandInquisitorLocations.IM_COMPLETELY_NUDE: ZorkGrandInquisitorLocationData( + game_state_trigger=((19344, 1),), + archipelago_id=LOCATION_OFFSET + 53, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.INTO_THE_FOLIAGE: ZorkGrandInquisitorLocationData( + game_state_trigger=((13060, 1),), + archipelago_id=LOCATION_OFFSET + 54, + region=ZorkGrandInquisitorRegions.CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE, + ), + ), + ZorkGrandInquisitorLocations.INVISIBLE_FLOWERS: ZorkGrandInquisitorLocationData( + game_state_trigger=((12967, 1),), + archipelago_id=LOCATION_OFFSET + 55, + region=ZorkGrandInquisitorRegions.CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.SPELL_IGRAM,), + ), + ZorkGrandInquisitorLocations.IN_CASE_OF_ADVENTURE: ZorkGrandInquisitorLocationData( + game_state_trigger=((12931, 1),), + archipelago_id=LOCATION_OFFSET + 56, + region=ZorkGrandInquisitorRegions.CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HAMMER, + ZorkGrandInquisitorItems.HOTSPOT_GLASS_CASE, + ), + ), + ZorkGrandInquisitorLocations.IN_MAGIC_WE_TRUST: ZorkGrandInquisitorLocationData( + game_state_trigger=((13062, 1),), + archipelago_id=LOCATION_OFFSET + 57, + region=ZorkGrandInquisitorRegions.CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SPELL_REZROV, + ZorkGrandInquisitorItems.HOTSPOT_IN_MAGIC_WE_TRUST_DOOR, + ), + ), + ZorkGrandInquisitorLocations.ITS_ONE_OF_THOSE_ADVENTURERS_AGAIN: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "pe3j"),), + archipelago_id=LOCATION_OFFSET + 58, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.I_DONT_THINK_YOU_WOULDVE_WANTED_THAT_TO_WORK_ANYWAY: ZorkGrandInquisitorLocationData( + game_state_trigger=((3816, 1008),), + archipelago_id=LOCATION_OFFSET + 59, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.SPELL_THROCK, + ZorkGrandInquisitorItems.HOTSPOT_SNAPDRAGON, + ), + ), + ZorkGrandInquisitorLocations.I_DONT_WANT_NO_TROUBLE: ZorkGrandInquisitorLocationData( + game_state_trigger=((10694, 1),), + archipelago_id=LOCATION_OFFSET + 60, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.I_HOPE_YOU_CAN_CLIMB_UP_THERE: ZorkGrandInquisitorLocationData( + game_state_trigger=((9637, 1),), + archipelago_id=LOCATION_OFFSET + 61, + region=ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorEvents.ROPE_GLORFABLE, + ZorkGrandInquisitorItems.HOTSPOT_MONASTERY_VENT, + ), + ), + ZorkGrandInquisitorLocations.I_LIKE_YOUR_STYLE: ZorkGrandInquisitorLocationData( + game_state_trigger=((16374, 1),), + archipelago_id=LOCATION_OFFSET + 62, + region=ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE, + ZorkGrandInquisitorEvents.DAM_DESTROYED, + ZorkGrandInquisitorItems.SPELL_GOLGATEM, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM, + ), + ), + ZorkGrandInquisitorLocations.I_SPIT_ON_YOUR_FILTHY_COINAGE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tp1e"), (9, 87), (1011, 1)), + archipelago_id=LOCATION_OFFSET + 63, + region=ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS,), + ), + ZorkGrandInquisitorLocations.LIT_SUNFLOWERS: ZorkGrandInquisitorLocationData( + game_state_trigger=((4129, 1),), + archipelago_id=LOCATION_OFFSET + 64, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.SPELL_THROCK,), + ), + ZorkGrandInquisitorLocations.MAGIC_FOREVER: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "pc1e"), (10304, 1), (5221, 1)), + archipelago_id=LOCATION_OFFSET + 65, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.LANTERN_DALBOZ_ACCESSIBLE, + ZorkGrandInquisitorItems.ROPE, + ZorkGrandInquisitorItems.HOTSPOT_WELL, + ), + ), + ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL: ZorkGrandInquisitorLocationData( + game_state_trigger=((2498, (1, 2)),), + archipelago_id=LOCATION_OFFSET + 66, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + (ZorkGrandInquisitorItems.TOTEM_GRIFF, ZorkGrandInquisitorItems.TOTEM_LUCY), + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_DOOR, + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG, + ), + ), + ZorkGrandInquisitorLocations.MAKE_LOVE_NOT_WAR: ZorkGrandInquisitorLocationData( + game_state_trigger=((8623, 21),), + archipelago_id=LOCATION_OFFSET + 67, + region=ZorkGrandInquisitorRegions.HADES_SHORE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.CHARON_CALLED, + ZorkGrandInquisitorItems.SWORD, + ), + ), + ZorkGrandInquisitorLocations.MEAD_LIGHT: ZorkGrandInquisitorLocationData( + game_state_trigger=((10485, 1),), + archipelago_id=LOCATION_OFFSET + 68, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.MEAD_LIGHT, + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR, + ), + ), + ZorkGrandInquisitorLocations.MIKES_PANTS: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tr2p"),), + archipelago_id=LOCATION_OFFSET + 69, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.MUSHROOM_HAMMERED: ZorkGrandInquisitorLocationData( + game_state_trigger=((4217, 1),), + archipelago_id=LOCATION_OFFSET + 70, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.HAMMER, + ZorkGrandInquisitorItems.HOTSPOT_SPRING_MUSHROOM, + ), + ), + ZorkGrandInquisitorLocations.NATIONAL_TREASURE: ZorkGrandInquisitorLocationData( + game_state_trigger=((14318, 1),), + archipelago_id=LOCATION_OFFSET + 71, + region=ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SPELL_REZROV, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS, + ), + ), + ZorkGrandInquisitorLocations.NATURAL_AND_SUPERNATURAL_CREATURES_OF_QUENDOR: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "dv1p"),), + archipelago_id=LOCATION_OFFSET + 72, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.NOOOOOOOOOOOOO: ZorkGrandInquisitorLocationData( + game_state_trigger=((12706, 1),), + archipelago_id=LOCATION_OFFSET + 73, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS, + ), + ), + ZorkGrandInquisitorLocations.NOTHIN_LIKE_A_GOOD_STOGIE: ZorkGrandInquisitorLocationData( + game_state_trigger=((4237, 1),), + archipelago_id=LOCATION_OFFSET + 74, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_ASHTRAY, + ), + ), + ZorkGrandInquisitorLocations.NOW_YOU_LOOK_LIKE_US_WHICH_IS_AN_IMPROVEMENT: ZorkGrandInquisitorLocationData( + game_state_trigger=((8935, 1),), + archipelago_id=LOCATION_OFFSET + 75, + region=ZorkGrandInquisitorRegions.HADES, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.KNOWS_SNAVIG,), + ), + ZorkGrandInquisitorLocations.NO_AUTOGRAPHS: ZorkGrandInquisitorLocationData( + game_state_trigger=((10476, 1),), + archipelago_id=LOCATION_OFFSET + 76, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR,), + ), + ZorkGrandInquisitorLocations.NO_BONDAGE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "pe2e"), (10262, 2), (15150, 83)), + archipelago_id=LOCATION_OFFSET + 77, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.ROPE, + ZorkGrandInquisitorItems.HOTSPOT_DOCK_WINCH, + ), + ), + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP: ZorkGrandInquisitorLocationData( + game_state_trigger=((12164, 1),), + archipelago_id=LOCATION_OFFSET + 78, + region=ZorkGrandInquisitorRegions.SPELL_LAB, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER, + ), + ), + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON: ZorkGrandInquisitorLocationData( + game_state_trigger=((1300, 1),), + archipelago_id=LOCATION_OFFSET + 79, + region=ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS, + ), + ), + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS: ZorkGrandInquisitorLocationData( + game_state_trigger=((2448, 1),), + archipelago_id=LOCATION_OFFSET + 80, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_BROG, + ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR, + ), + ), + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU: ZorkGrandInquisitorLocationData( + game_state_trigger=((4869, 1),), + archipelago_id=LOCATION_OFFSET + 81, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.FLATHEADIA_FUDGE, + ZorkGrandInquisitorItems.HUNGUS_LARD, + ZorkGrandInquisitorItems.JAR_OF_HOTBUGS, + ZorkGrandInquisitorItems.QUELBEE_HONEYCOMB, + ZorkGrandInquisitorItems.MOSS_OF_MAREILON, + ZorkGrandInquisitorItems.MUG, + ), + ), + ZorkGrandInquisitorLocations.OLD_SCRATCH_WINNER: ZorkGrandInquisitorLocationData( + game_state_trigger=((4512, 32),), + archipelago_id=LOCATION_OFFSET + 82, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, # This can be done anywhere if the item requirement is met + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.OLD_SCRATCH_CARD,), + ), + ZorkGrandInquisitorLocations.ONLY_YOU_CAN_PREVENT_FOOZLE_FIRES: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "pe5n"),), + archipelago_id=LOCATION_OFFSET + 83, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.OPEN_THE_GATES_OF_HELL: ZorkGrandInquisitorLocationData( + game_state_trigger=((8730, 1),), + archipelago_id=LOCATION_OFFSET + 84, + region=ZorkGrandInquisitorRegions.HADES, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.KNOWS_SNAVIG,), + ), + ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES: ZorkGrandInquisitorLocationData( + game_state_trigger=((4241, 1),), + archipelago_id=LOCATION_OFFSET + 85, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HUNGUS_LARD, + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_QUELBEE_HIVE, + ), + ), + ZorkGrandInquisitorLocations.PERMASEAL: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "mt1g"),), + archipelago_id=LOCATION_OFFSET + 86, + region=ZorkGrandInquisitorRegions.MONASTERY, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.PLANETFALL: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "pp1j"),), + archipelago_id=LOCATION_OFFSET + 87, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE_JACKS_SHOP, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.PLEASE_DONT_THROCK_THE_GRASS: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "te1g"),), + archipelago_id=LOCATION_OFFSET + 88, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL: ZorkGrandInquisitorLocationData( + game_state_trigger=((9404, 1),), + archipelago_id=LOCATION_OFFSET + 89, + region=ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER, + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT, + ZorkGrandInquisitorItems.LARGE_TELEGRAPH_HAMMER, + ZorkGrandInquisitorItems.SPELL_NARWILE, + ), + ), + ZorkGrandInquisitorLocations.PROZORKED: ZorkGrandInquisitorLocationData( + game_state_trigger=((4115, 1),), + archipelago_id=LOCATION_OFFSET + 90, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.PROZORK_TABLET, + ZorkGrandInquisitorItems.HOTSPOT_SNAPDRAGON, + ), + ), + ZorkGrandInquisitorLocations.REASSEMBLE_SNAVIG: ZorkGrandInquisitorLocationData( + game_state_trigger=((4512, 98),), + archipelago_id=LOCATION_OFFSET + 91, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_ANS, + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_GIV, + ZorkGrandInquisitorItems.HOTSPOT_MIRROR, + ), + ), + ZorkGrandInquisitorLocations.RESTOCKED_ON_GRUESDAY: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tr2h"),), + archipelago_id=LOCATION_OFFSET + 92, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.RIGHT_HELLO_YES_UH_THIS_IS_SNEFFLE: ZorkGrandInquisitorLocationData( + game_state_trigger=((4698, 3),), + archipelago_id=LOCATION_OFFSET + 93, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.RIGHT_UH_SORRY_ITS_ME_AGAIN_SNEFFLE: ZorkGrandInquisitorLocationData( + game_state_trigger=((4698, 4),), + archipelago_id=LOCATION_OFFSET + 94, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED: ZorkGrandInquisitorLocationData( + game_state_trigger=((201, 1),), + archipelago_id=LOCATION_OFFSET + 95, + region=ZorkGrandInquisitorRegions.SPELL_LAB, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER, + ), + ), + ZorkGrandInquisitorLocations.SOUVENIR: ZorkGrandInquisitorLocationData( + game_state_trigger=((13408, 1),), + archipelago_id=LOCATION_OFFSET + 96, + region=ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_SOUVENIR_COIN_SLOT, + ), + ), + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL: ZorkGrandInquisitorLocationData( + game_state_trigger=((9719, 1),), + archipelago_id=LOCATION_OFFSET + 97, + region=ZorkGrandInquisitorRegions.MONASTERY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS, + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH, + ), + ), + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER: ZorkGrandInquisitorLocationData( + game_state_trigger=((14511, 1), (14524, 5)), + archipelago_id=LOCATION_OFFSET + 98, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS, + ), + ), + ZorkGrandInquisitorLocations.SUCKING_ROCKS: ZorkGrandInquisitorLocationData( + game_state_trigger=((12859, 1),), + archipelago_id=LOCATION_OFFSET + 99, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE, + ZorkGrandInquisitorItems.PERMA_SUCK_MACHINE, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_VACUUM_SLOT, + ), + ), + ZorkGrandInquisitorLocations.TALK_TO_ME_GRAND_INQUISITOR: ZorkGrandInquisitorLocationData( + game_state_trigger=((10299, 1),), + archipelago_id=LOCATION_OFFSET + 100, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL,), + ), + ZorkGrandInquisitorLocations.TAMING_YOUR_SNAPDRAGON: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "dv1h"),), + archipelago_id=LOCATION_OFFSET + 101, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS: ZorkGrandInquisitorLocationData( + game_state_trigger=((1311, 1), (1312, 1)), + archipelago_id=LOCATION_OFFSET + 102, + region=ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH, + ), + ), + ZorkGrandInquisitorLocations.THATS_A_ROPE: ZorkGrandInquisitorLocationData( + game_state_trigger=((10486, 1),), + archipelago_id=LOCATION_OFFSET + 103, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.ROPE, + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR, + ), + ), + ZorkGrandInquisitorLocations.THATS_IT_JUST_KEEP_HITTING_THOSE_BUTTONS: ZorkGrandInquisitorLocationData( + game_state_trigger=((13805, 1),), + archipelago_id=LOCATION_OFFSET + 104, + region=ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + ), + ZorkGrandInquisitorLocations.THATS_STILL_A_ROPE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "tp1e"), (9, 83), (1011, 1)), + archipelago_id=LOCATION_OFFSET + 105, + region=ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorEvents.ROPE_GLORFABLE,), + ), + ZorkGrandInquisitorLocations.THATS_THE_SPIRIT: ZorkGrandInquisitorLocationData( + game_state_trigger=((10341, 95),), + archipelago_id=LOCATION_OFFSET + 106, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.HOTSPOT_LOUDSPEAKER_VOLUME_BUTTONS,), + ), + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE: ZorkGrandInquisitorLocationData( + game_state_trigger=((9459, 1),), + archipelago_id=LOCATION_OFFSET + 107, + region=ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE: ZorkGrandInquisitorLocationData( + game_state_trigger=((9473, 1),), + archipelago_id=LOCATION_OFFSET + 108, + region=ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO: ZorkGrandInquisitorLocationData( + game_state_trigger=((9520, 1),), + archipelago_id=LOCATION_OFFSET + 109, + region=ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "me1j"),), + archipelago_id=LOCATION_OFFSET + 110, + region=ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.THE_UNDERGROUND_UNDERGROUND: ZorkGrandInquisitorLocationData( + game_state_trigger=((13167, 1),), + archipelago_id=LOCATION_OFFSET + 111, + region=ZorkGrandInquisitorRegions.CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SUBWAY_TOKEN, + ZorkGrandInquisitorItems.HOTSPOT_SUBWAY_TOKEN_SLOT, + ), + ), + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "cd60"), (1524, 1)), + archipelago_id=LOCATION_OFFSET + 112, + region=ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.TOTEM_LUCY,), + ), + ZorkGrandInquisitorLocations.THROCKED_MUSHROOM_HAMMERED: ZorkGrandInquisitorLocationData( + game_state_trigger=((4219, 1),), + archipelago_id=LOCATION_OFFSET + 113, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HAMMER, + ZorkGrandInquisitorItems.SPELL_THROCK, + ZorkGrandInquisitorItems.HOTSPOT_SPRING_MUSHROOM, + ), + ), + ZorkGrandInquisitorLocations.TIME_TRAVEL_FOR_DUMMIES: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "th3z"),), + archipelago_id=LOCATION_OFFSET + 114, + region=ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE,), + ), + ZorkGrandInquisitorLocations.TOTEMIZED_DAILY_BILLBOARD: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "px1h"),), + archipelago_id=LOCATION_OFFSET + 115, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "cd60"), (1520, 1)), + archipelago_id=LOCATION_OFFSET + 116, + region=ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.TOTEM_BROG,), + ), + ZorkGrandInquisitorLocations.UMBRELLA_FLOWERS: ZorkGrandInquisitorLocationData( + game_state_trigger=((12926, 1),), + archipelago_id=LOCATION_OFFSET + 117, + region=ZorkGrandInquisitorRegions.CROSSROADS, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorEvents.KNOWS_BEBURTT,), + ), + ZorkGrandInquisitorLocations.UP: ZorkGrandInquisitorLocationData( + game_state_trigger=((3619, 5200),), + archipelago_id=LOCATION_OFFSET + 118, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_LUCY, + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG, + ), + ), + ZorkGrandInquisitorLocations.USELESS_BUT_FUN: ZorkGrandInquisitorLocationData( + game_state_trigger=((14321, 1),), + archipelago_id=LOCATION_OFFSET + 119, + region=ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=(ZorkGrandInquisitorItems.SPELL_GOLGATEM,), + ), + ZorkGrandInquisitorLocations.UUUUUP: ZorkGrandInquisitorLocationData( + game_state_trigger=((3619, 3500),), + archipelago_id=LOCATION_OFFSET + 120, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_GRIFF, + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG, + ), + ), + ZorkGrandInquisitorLocations.VOYAGE_OF_CAPTAIN_ZAHAB: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "uh1h"),), + archipelago_id=LOCATION_OFFSET + 121, + region=ZorkGrandInquisitorRegions.HADES_SHORE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.WANT_SOME_RYE_COURSE_YA_DO: ZorkGrandInquisitorLocationData( + game_state_trigger=((4034, 1),), + archipelago_id=LOCATION_OFFSET + 122, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR, + ZorkGrandInquisitorItems.MEAD_LIGHT, + ZorkGrandInquisitorItems.ZIMDOR_SCROLL, + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_BIRD_BATH, + ), + ), + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE: ZorkGrandInquisitorLocationData( + game_state_trigger=((2461, 1),), + archipelago_id=LOCATION_OFFSET + 123, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.TOTEM_GRIFF, + ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR, + ), + ), + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER: ZorkGrandInquisitorLocationData( + game_state_trigger=((15472, 1),), + archipelago_id=LOCATION_OFFSET + 124, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS, + ), + ), + ZorkGrandInquisitorLocations.WHAT_ARE_YOU_STUPID: ZorkGrandInquisitorLocationData( + game_state_trigger=((10484, 1),), + archipelago_id=LOCATION_OFFSET + 125, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.PLASTIC_SIX_PACK_HOLDER, + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR, + ), + ), + ZorkGrandInquisitorLocations.WHITE_HOUSE_TIME_TUNNEL: ZorkGrandInquisitorLocationData( + game_state_trigger=((4983, 1),), + archipelago_id=LOCATION_OFFSET + 126, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_CLOSET_DOOR, + ZorkGrandInquisitorItems.SPELL_NARWILE, + ), + ), + ZorkGrandInquisitorLocations.WOW_IVE_NEVER_GONE_INSIDE_HIM_BEFORE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "dc10"), (1596, 1)), + archipelago_id=LOCATION_OFFSET + 127, + region=ZorkGrandInquisitorRegions.WALKING_CASTLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.YAD_GOHDNUORGREDNU_3_YRAUBORF: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "dm2g"),), + archipelago_id=LOCATION_OFFSET + 128, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.HOTSPOT_MIRROR,), + ), + ZorkGrandInquisitorLocations.YOUR_PUNY_WEAPONS_DONT_PHASE_ME_BABY: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "dg4e"), (4266, 1), (9, 21), (4035, 1)), + archipelago_id=LOCATION_OFFSET + 129, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_HARRY, + ), + ), + ZorkGrandInquisitorLocations.YOU_DONT_GO_MESSING_WITH_A_MANS_ZIPPER: ZorkGrandInquisitorLocationData( + game_state_trigger=((16405, 1),), + archipelago_id=LOCATION_OFFSET + 130, + region=ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.SPELL_REZROV,), + ), + ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS: ZorkGrandInquisitorLocationData( + game_state_trigger=((16342, 1),), + archipelago_id=LOCATION_OFFSET + 131, + region=ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + tags=(ZorkGrandInquisitorTags.CORE,), + requirements=( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE, + ), + ), + ZorkGrandInquisitorLocations.YOU_ONE_OF_THEM_AGITATORS_AINT_YA: ZorkGrandInquisitorLocationData( + game_state_trigger=((10586, 1),), + archipelago_id=LOCATION_OFFSET + 132, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE,), + ), + ZorkGrandInquisitorLocations.YOU_WANT_A_PIECE_OF_ME_DOCK_BOY: ZorkGrandInquisitorLocationData( + game_state_trigger=((15151, 1),), + archipelago_id=LOCATION_OFFSET + 133, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.CORE, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.HOTSPOT_DOCK_WINCH,), + ), + # Deathsanity + ZorkGrandInquisitorLocations.DEATH_ARRESTED_WITH_JACK: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 1)), + archipelago_id=LOCATION_OFFSET + 200 + 0, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL, + ), + ), + ZorkGrandInquisitorLocations.DEATH_ATTACKED_THE_QUELBEES: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 20)), + archipelago_id=LOCATION_OFFSET + 200 + 1, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.SWORD, + ZorkGrandInquisitorItems.HOTSPOT_QUELBEE_HIVE, + ), + ), + ZorkGrandInquisitorLocations.DEATH_CLIMBED_OUT_OF_THE_WELL: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 21)), + archipelago_id=LOCATION_OFFSET + 200 + 2, + region=ZorkGrandInquisitorRegions.CROSSROADS, + tags=(ZorkGrandInquisitorTags.DEATHSANITY,), + ), + ZorkGrandInquisitorLocations.DEATH_EATEN_BY_A_GRUE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 18)), + archipelago_id=LOCATION_OFFSET + 200 + 3, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.ROPE, + ZorkGrandInquisitorItems.HOTSPOT_WELL, + ), + ), + ZorkGrandInquisitorLocations.DEATH_JUMPED_IN_BOTTOMLESS_PIT: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 3)), + archipelago_id=LOCATION_OFFSET + 200 + 4, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.DEATHSANITY,), + ), + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 37)), + archipelago_id=LOCATION_OFFSET + 200 + 5, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS, + ), + ), + ZorkGrandInquisitorLocations.DEATH_LOST_SOUL_TO_OLD_SCRATCH: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 23)), + archipelago_id=LOCATION_OFFSET + 200 + 6, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorItems.OLD_SCRATCH_CARD,), + ), + ZorkGrandInquisitorLocations.DEATH_OUTSMARTED_BY_THE_QUELBEES: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 29)), + archipelago_id=LOCATION_OFFSET + 200 + 7, + region=ZorkGrandInquisitorRegions.DM_LAIR, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.HUNGUS_LARD, + ZorkGrandInquisitorItems.HOTSPOT_QUELBEE_HIVE, + ), + ), + ZorkGrandInquisitorLocations.DEATH_SLICED_UP_BY_THE_INVISIBLE_GUARD: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 30)), + archipelago_id=LOCATION_OFFSET + 200 + 8, + region=ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + ), + ZorkGrandInquisitorLocations.DEATH_STEPPED_INTO_THE_INFINITE: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 4)), + archipelago_id=LOCATION_OFFSET + 200 + 9, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.SPELL_IGRAM, + ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS, + ), + ), + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 11)), + archipelago_id=LOCATION_OFFSET + 200 + 10, + region=ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=( + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH, + ), + ), + ZorkGrandInquisitorLocations.DEATH_THROCKED_THE_GRASS: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 34)), + archipelago_id=LOCATION_OFFSET + 200 + 11, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.DEATHSANITY,), + requirements=( + ZorkGrandInquisitorItems.SPELL_THROCK, + ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_GRASS, + ), + ), + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, (9, 32, 33))), + archipelago_id=LOCATION_OFFSET + 200 + 12, + region=ZorkGrandInquisitorRegions.MONASTERY, + tags=(ZorkGrandInquisitorTags.DEATHSANITY,), + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH, + ), + ), + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED_PERMANENTLY: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, (5, 6, 7, 8, 13))), + archipelago_id=LOCATION_OFFSET + 200 + 13, + region=ZorkGrandInquisitorRegions.MONASTERY, + tags=(ZorkGrandInquisitorTags.DEATHSANITY,), + requirements=(ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH,), + ), + ZorkGrandInquisitorLocations.DEATH_YOURE_NOT_CHARON: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 10)), + archipelago_id=LOCATION_OFFSET + 200 + 14, + region=ZorkGrandInquisitorRegions.HADES, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorEvents.KNOWS_SNAVIG,), + ), + ZorkGrandInquisitorLocations.DEATH_ZORK_ROCKS_EXPLODED: ZorkGrandInquisitorLocationData( + game_state_trigger=(("location", "gjde"), (2201, 19)), + archipelago_id=LOCATION_OFFSET + 200 + 15, + region=ZorkGrandInquisitorRegions.GUE_TECH, + tags=(ZorkGrandInquisitorTags.DEATHSANITY, ZorkGrandInquisitorTags.MISSABLE), + requirements=(ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED,), + ), + # Events + ZorkGrandInquisitorEvents.CHARON_CALLED: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.HADES_SHORE, + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER, + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS, + ), + event_item_name=ZorkGrandInquisitorEvents.CHARON_CALLED.value, + ), + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + requirements=( + ZorkGrandInquisitorItems.LANTERN, + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR, + ), + event_item_name=ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE.value, + ), + ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.GUE_TECH, + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS, + ), + event_item_name=ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE.value, + ), + ZorkGrandInquisitorEvents.DAM_DESTROYED: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + requirements=( + ZorkGrandInquisitorItems.SPELL_REZROV, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS, + ), + event_item_name=ZorkGrandInquisitorEvents.DAM_DESTROYED.value, + ), + ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.DM_LAIR, + requirements=( + ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR, + ZorkGrandInquisitorItems.MEAD_LIGHT, + ZorkGrandInquisitorItems.ZIMDOR_SCROLL, + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_BIRD_BATH, + ), + event_item_name=ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD.value, + ), + ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.DM_LAIR, + requirements=( + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_ASHTRAY, + ), + event_item_name=ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR.value, + ), + ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.GUE_TECH, + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS, + ), + event_item_name=ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE.value, + ), + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.GUE_TECH, + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_COIN_SLOT, + ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_DOORS, + ), + event_item_name=ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL.value, + ), + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + requirements=( + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_ANS, + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_GIV, + ZorkGrandInquisitorItems.HOTSPOT_MIRROR, + ), + event_item_name=ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG.value, + ), + ZorkGrandInquisitorEvents.KNOWS_BEBURTT: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.SPELL_LAB, + requirements=( + ZorkGrandInquisitorItems.HOTSPOT_BLANK_SCROLL_BOX, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER, + ), + event_item_name=ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ), + ZorkGrandInquisitorEvents.KNOWS_OBIDIL: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.SPELL_LAB, + requirements=( + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER, + ), + event_item_name=ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ), + ZorkGrandInquisitorEvents.KNOWS_SNAVIG: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.SPELL_LAB, + requirements=( + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER, + ), + event_item_name=ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ), + ZorkGrandInquisitorEvents.KNOWS_YASTARD: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + requirements=( + ZorkGrandInquisitorItems.FLATHEADIA_FUDGE, + ZorkGrandInquisitorItems.HUNGUS_LARD, + ZorkGrandInquisitorItems.JAR_OF_HOTBUGS, + ZorkGrandInquisitorItems.QUELBEE_HONEYCOMB, + ZorkGrandInquisitorItems.MOSS_OF_MAREILON, + ZorkGrandInquisitorItems.MUG, + ), + event_item_name=ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ), + ZorkGrandInquisitorEvents.LANTERN_DALBOZ_ACCESSIBLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + requirements=( + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL, + ), + event_item_name=ZorkGrandInquisitorEvents.LANTERN_DALBOZ_ACCESSIBLE.value, + ), + ZorkGrandInquisitorEvents.ROPE_GLORFABLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.CROSSROADS, + requirements=(ZorkGrandInquisitorItems.SPELL_GLORF,), + event_item_name=ZorkGrandInquisitorEvents.ROPE_GLORFABLE.value, + ), + ZorkGrandInquisitorEvents.VICTORY: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.ENDGAME, + event_item_name=ZorkGrandInquisitorEvents.VICTORY.value, + ), + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.WHITE_HOUSE, + requirements=( + (ZorkGrandInquisitorItems.TOTEM_GRIFF, ZorkGrandInquisitorItems.TOTEM_LUCY), + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG, + ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_DOOR, + ), + event_item_name=ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE.value, + ), + ZorkGrandInquisitorEvents.ZORKMID_BILL_ACCESSIBLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.PORT_FOOZLE, + requirements=(ZorkGrandInquisitorItems.OLD_SCRATCH_CARD,), + event_item_name=ZorkGrandInquisitorEvents.ZORKMID_BILL_ACCESSIBLE.value, + ), + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.GUE_TECH, + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_COIN_SLOT, + ZorkGrandInquisitorItems.ZORK_ROCKS, + ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_BUTTONS, + ), + event_item_name=ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED.value, + ), + ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE: ZorkGrandInquisitorLocationData( + game_state_trigger=None, + archipelago_id=None, + region=ZorkGrandInquisitorRegions.GUE_TECH, + requirements=( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT, + ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS, + ), + event_item_name=ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE.value, + ), +} diff --git a/worlds/zork_grand_inquisitor/data/missable_location_grant_conditions_data.py b/worlds/zork_grand_inquisitor/data/missable_location_grant_conditions_data.py new file mode 100644 index 000000000000..ef6eacb78ceb --- /dev/null +++ b/worlds/zork_grand_inquisitor/data/missable_location_grant_conditions_data.py @@ -0,0 +1,200 @@ +from typing import Dict, NamedTuple, Optional, Tuple + +from ..enums import ZorkGrandInquisitorItems, ZorkGrandInquisitorLocations + + +class ZorkGrandInquisitorMissableLocationGrantConditionsData(NamedTuple): + location_condition: ZorkGrandInquisitorLocations + item_conditions: Optional[Tuple[ZorkGrandInquisitorItems, ...]] + + +missable_location_grant_conditions_data: Dict[ + ZorkGrandInquisitorLocations, ZorkGrandInquisitorMissableLocationGrantConditionsData +] = { + ZorkGrandInquisitorLocations.BOING_BOING_BOING: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.BONK: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.PROZORKED, + item_conditions=(ZorkGrandInquisitorItems.HAMMER,), + ) + , + ZorkGrandInquisitorLocations.DEATH_ARRESTED_WITH_JACK: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.ARREST_THE_VANDAL, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_ATTACKED_THE_QUELBEES: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_EATEN_BY_A_GRUE: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.MAGIC_FOREVER, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_LOST_SOUL_TO_OLD_SCRATCH: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.OLD_SCRATCH_WINNER, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_OUTSMARTED_BY_THE_QUELBEES: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_SLICED_UP_BY_THE_INVISIBLE_GUARD: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_STEPPED_INTO_THE_INFINITE: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.A_SMALLWAY, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.THAR_SHE_BLOWS, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_YOURE_NOT_CHARON: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.OPEN_THE_GATES_OF_HELL, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DEATH_ZORK_ROCKS_EXPLODED: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.CRISIS_AVERTED, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.DENIED_BY_THE_LAKE_MONSTER: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.WOW_IVE_NEVER_GONE_INSIDE_HIM_BEFORE, + item_conditions=(ZorkGrandInquisitorItems.SPELL_GOLGATEM,), + ) + , + ZorkGrandInquisitorLocations.EMERGENCY_MAGICATRONIC_MESSAGE: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.ARTIFACTS_EXPLAINED, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.FAT_LOT_OF_GOOD_THATLL_DO_YA: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS, + item_conditions=(ZorkGrandInquisitorItems.SPELL_IGRAM,), + ) + , + ZorkGrandInquisitorLocations.I_DONT_THINK_YOU_WOULDVE_WANTED_THAT_TO_WORK_ANYWAY: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.PROZORKED, + item_conditions=(ZorkGrandInquisitorItems.SPELL_THROCK,), + ) + , + ZorkGrandInquisitorLocations.I_SPIT_ON_YOUR_FILTHY_COINAGE: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS, + item_conditions=(ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS,), + ) + , + ZorkGrandInquisitorLocations.MEAD_LIGHT: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.FIRE_FIRE, + item_conditions=(ZorkGrandInquisitorItems.MEAD_LIGHT,), + ) + , + ZorkGrandInquisitorLocations.MUSHROOM_HAMMERED: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.THROCKED_MUSHROOM_HAMMERED, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.NO_AUTOGRAPHS: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.FIRE_FIRE, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.NO_BONDAGE: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.HELP_ME_CANT_BREATHE, + item_conditions=(ZorkGrandInquisitorItems.ROPE,), + ) + , + ZorkGrandInquisitorLocations.TALK_TO_ME_GRAND_INQUISITOR: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.FIRE_FIRE, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.THATS_A_ROPE: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.FIRE_FIRE, + item_conditions=(ZorkGrandInquisitorItems.ROPE,), + ) + , + ZorkGrandInquisitorLocations.THATS_IT_JUST_KEEP_HITTING_THOSE_BUTTONS: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.ENJOY_YOUR_TRIP, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.THATS_STILL_A_ROPE: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS, + item_conditions=(ZorkGrandInquisitorItems.SPELL_GLORF,), + ) + , + ZorkGrandInquisitorLocations.WHAT_ARE_YOU_STUPID: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.FIRE_FIRE, + item_conditions=(ZorkGrandInquisitorItems.PLASTIC_SIX_PACK_HOLDER,), + ) + , + ZorkGrandInquisitorLocations.YAD_GOHDNUORGREDNU_3_YRAUBORF: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.REASSEMBLE_SNAVIG, + item_conditions=None, + ) + , + ZorkGrandInquisitorLocations.YOUR_PUNY_WEAPONS_DONT_PHASE_ME_BABY: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.WANT_SOME_RYE_COURSE_YA_DO, + item_conditions=(ZorkGrandInquisitorItems.SWORD, ZorkGrandInquisitorItems.HOTSPOT_HARRY), + ) + , + ZorkGrandInquisitorLocations.YOU_DONT_GO_MESSING_WITH_A_MANS_ZIPPER: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS, + item_conditions=(ZorkGrandInquisitorItems.SPELL_REZROV,), + ) + , + ZorkGrandInquisitorLocations.YOU_WANT_A_PIECE_OF_ME_DOCK_BOY: + ZorkGrandInquisitorMissableLocationGrantConditionsData( + location_condition=ZorkGrandInquisitorLocations.HELP_ME_CANT_BREATHE, + item_conditions=None, + ) + , +} diff --git a/worlds/zork_grand_inquisitor/data/region_data.py b/worlds/zork_grand_inquisitor/data/region_data.py new file mode 100644 index 000000000000..1aed160f3088 --- /dev/null +++ b/worlds/zork_grand_inquisitor/data/region_data.py @@ -0,0 +1,183 @@ +from typing import Dict, NamedTuple, Optional, Tuple + +from ..enums import ZorkGrandInquisitorRegions + + +class ZorkGrandInquisitorRegionData(NamedTuple): + exits: Optional[Tuple[ZorkGrandInquisitorRegions, ...]] + + +region_data: Dict[ZorkGrandInquisitorRegions, ZorkGrandInquisitorRegionData] = { + ZorkGrandInquisitorRegions.CROSSROADS: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.DM_LAIR, + ZorkGrandInquisitorRegions.GUE_TECH, + ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.PORT_FOOZLE, + ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.DM_LAIR: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.CROSSROADS, + ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.DM_LAIR, + ZorkGrandInquisitorRegions.WALKING_CASTLE, + ZorkGrandInquisitorRegions.WHITE_HOUSE, + ) + ), + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, + ZorkGrandInquisitorRegions.HADES_BEYOND_GATES, + ) + ), + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO, + ZorkGrandInquisitorRegions.ENDGAME, + ) + ), + ZorkGrandInquisitorRegions.ENDGAME: ZorkGrandInquisitorRegionData(exits=None), + ZorkGrandInquisitorRegions.GUE_TECH: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.CROSSROADS, + ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, + ) + ), + ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.GUE_TECH, + ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + ) + ), + ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.CROSSROADS, + ZorkGrandInquisitorRegions.DM_LAIR, + ZorkGrandInquisitorRegions.GUE_TECH, + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.HADES: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.HADES_BEYOND_GATES, + ZorkGrandInquisitorRegions.HADES_SHORE, + ) + ), + ZorkGrandInquisitorRegions.HADES_BEYOND_GATES: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO, + ZorkGrandInquisitorRegions.HADES, + ) + ), + ZorkGrandInquisitorRegions.HADES_SHORE: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.CROSSROADS, + ZorkGrandInquisitorRegions.DM_LAIR, + ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, + ZorkGrandInquisitorRegions.HADES, + ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE, + ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, + ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.MENU: ZorkGrandInquisitorRegionData( + exits=(ZorkGrandInquisitorRegions.PORT_FOOZLE,) + ), + ZorkGrandInquisitorRegions.MONASTERY: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.MONASTERY, + ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST, + ) + ), + ZorkGrandInquisitorRegions.PORT_FOOZLE: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.CROSSROADS, + ZorkGrandInquisitorRegions.PORT_FOOZLE_JACKS_SHOP, + ) + ), + ZorkGrandInquisitorRegions.PORT_FOOZLE_JACKS_SHOP: ZorkGrandInquisitorRegionData( + exits=(ZorkGrandInquisitorRegions.PORT_FOOZLE,) + ), + ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT, + ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN, + ) + ), + ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.ENDGAME, + ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST, + ) + ), + ZorkGrandInquisitorRegions.SPELL_LAB: ZorkGrandInquisitorRegionData( + exits=(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE,) + ), + ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.CROSSROADS, + ZorkGrandInquisitorRegions.DM_LAIR, + ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, + ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY, + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.SPELL_LAB, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.CROSSROADS, + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY, + ) + ), + ZorkGrandInquisitorRegions.SUBWAY_MONASTERY: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.HADES_SHORE, + ZorkGrandInquisitorRegions.MONASTERY, + ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS, + ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM, + ) + ), + ZorkGrandInquisitorRegions.WALKING_CASTLE: ZorkGrandInquisitorRegionData( + exits=(ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR,) + ), + ZorkGrandInquisitorRegions.WHITE_HOUSE: ZorkGrandInquisitorRegionData( + exits=( + ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, + ZorkGrandInquisitorRegions.ENDGAME, + ) + ), +} diff --git a/worlds/zork_grand_inquisitor/data_funcs.py b/worlds/zork_grand_inquisitor/data_funcs.py new file mode 100644 index 000000000000..9ea806e8aa4d --- /dev/null +++ b/worlds/zork_grand_inquisitor/data_funcs.py @@ -0,0 +1,247 @@ +from typing import Dict, Set, Tuple, Union + +from .data.entrance_rule_data import entrance_rule_data +from .data.item_data import item_data, ZorkGrandInquisitorItemData +from .data.location_data import location_data, ZorkGrandInquisitorLocationData + +from .enums import ( + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorGoals, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorLocations, + ZorkGrandInquisitorRegions, + ZorkGrandInquisitorTags, +) + + +def item_names_to_id() -> Dict[str, int]: + return {item.value: data.archipelago_id for item, data in item_data.items()} + + +def item_names_to_item() -> Dict[str, ZorkGrandInquisitorItems]: + return {item.value: item for item in item_data} + + +def location_names_to_id() -> Dict[str, int]: + return { + location.value: data.archipelago_id + for location, data in location_data.items() + if data.archipelago_id is not None + } + + +def location_names_to_location() -> Dict[str, ZorkGrandInquisitorLocations]: + return { + location.value: location + for location, data in location_data.items() + if data.archipelago_id is not None + } + + +def id_to_goals() -> Dict[int, ZorkGrandInquisitorGoals]: + return {goal.value: goal for goal in ZorkGrandInquisitorGoals} + + +def id_to_items() -> Dict[int, ZorkGrandInquisitorItems]: + return {data.archipelago_id: item for item, data in item_data.items()} + + +def id_to_locations() -> Dict[int, ZorkGrandInquisitorLocations]: + return { + data.archipelago_id: location + for location, data in location_data.items() + if data.archipelago_id is not None + } + + +def item_groups() -> Dict[str, Set[str]]: + groups: Dict[str, Set[str]] = dict() + + item: ZorkGrandInquisitorItems + data: ZorkGrandInquisitorItemData + for item, data in item_data.items(): + if data.tags is not None: + for tag in data.tags: + groups.setdefault(tag.value, set()).add(item.value) + + return {k: v for k, v in groups.items() if len(v)} + + +def items_with_tag(tag: ZorkGrandInquisitorTags) -> Set[ZorkGrandInquisitorItems]: + items: Set[ZorkGrandInquisitorItems] = set() + + item: ZorkGrandInquisitorItems + data: ZorkGrandInquisitorItemData + for item, data in item_data.items(): + if data.tags is not None and tag in data.tags: + items.add(item) + + return items + + +def game_id_to_items() -> Dict[int, ZorkGrandInquisitorItems]: + mapping: Dict[int, ZorkGrandInquisitorItems] = dict() + + item: ZorkGrandInquisitorItems + data: ZorkGrandInquisitorItemData + for item, data in item_data.items(): + if data.statemap_keys is not None: + for key in data.statemap_keys: + mapping[key] = item + + return mapping + + +def location_groups() -> Dict[str, Set[str]]: + groups: Dict[str, Set[str]] = dict() + + tag: ZorkGrandInquisitorTags + for tag in ZorkGrandInquisitorTags: + groups[tag.value] = set() + + location: ZorkGrandInquisitorLocations + data: ZorkGrandInquisitorLocationData + for location, data in location_data.items(): + if data.tags is not None: + for tag in data.tags: + groups[tag.value].add(location.value) + + return {k: v for k, v in groups.items() if len(v)} + + +def locations_by_region(include_deathsanity: bool = False) -> Dict[ + ZorkGrandInquisitorRegions, Set[ZorkGrandInquisitorLocations] +]: + mapping: Dict[ZorkGrandInquisitorRegions, Set[ZorkGrandInquisitorLocations]] = dict() + + region: ZorkGrandInquisitorRegions + for region in ZorkGrandInquisitorRegions: + mapping[region] = set() + + location: ZorkGrandInquisitorLocations + data: ZorkGrandInquisitorLocationData + for location, data in location_data.items(): + if not include_deathsanity and ZorkGrandInquisitorTags.DEATHSANITY in ( + data.tags or tuple() + ): + continue + + mapping[data.region].add(location) + + return mapping + + +def locations_with_tag(tag: ZorkGrandInquisitorTags) -> Set[ZorkGrandInquisitorLocations]: + location: ZorkGrandInquisitorLocations + data: ZorkGrandInquisitorLocationData + + return {location for location, data in location_data.items() if data.tags is not None and tag in data.tags} + + +def location_access_rule_for(location: ZorkGrandInquisitorLocations, player: int) -> str: + data: ZorkGrandInquisitorLocationData = location_data[location] + + if data.requirements is None: + return "lambda state: True" + + lambda_string: str = "lambda state: " + + i: int + requirement: Union[ + Tuple[ + Union[ + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ], + ..., + ], + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems + ] + + for i, requirement in enumerate(data.requirements): + if isinstance(requirement, tuple): + lambda_string += "(" + + ii: int + sub_requirement: Union[ZorkGrandInquisitorEvents, ZorkGrandInquisitorItems] + for ii, sub_requirement in enumerate(requirement): + lambda_string += f"state.has(\"{sub_requirement.value}\", {player})" + + if ii < len(requirement) - 1: + lambda_string += " or " + + lambda_string += ")" + else: + lambda_string += f"state.has(\"{requirement.value}\", {player})" + + if i < len(data.requirements) - 1: + lambda_string += " and " + + return lambda_string + + +def entrance_access_rule_for( + region_origin: ZorkGrandInquisitorRegions, + region_destination: ZorkGrandInquisitorRegions, + player: int +) -> str: + data: Union[ + Tuple[ + Tuple[ + Union[ + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorRegions, + ], + ..., + ], + ..., + ], + None, + ] = entrance_rule_data[(region_origin, region_destination)] + + if data is None: + return "lambda state: True" + + lambda_string: str = "lambda state: " + + i: int + requirement_group: Tuple[ + Union[ + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorRegions, + ], + ..., + ] + for i, requirement_group in enumerate(data): + lambda_string += "(" + + ii: int + requirement: Union[ + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorRegions, + ] + for ii, requirement in enumerate(requirement_group): + requirement_type: Union[ + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorRegions, + ] = type(requirement) + + if requirement_type in (ZorkGrandInquisitorEvents, ZorkGrandInquisitorItems): + lambda_string += f"state.has(\"{requirement.value}\", {player})" + elif requirement_type == ZorkGrandInquisitorRegions: + lambda_string += f"state.can_reach(\"{requirement.value}\", \"Region\", {player})" + + if ii < len(requirement_group) - 1: + lambda_string += " and " + + lambda_string += ")" + + if i < len(data) - 1: + lambda_string += " or " + + return lambda_string diff --git a/worlds/zork_grand_inquisitor/docs/en_Zork Grand Inquisitor.md b/worlds/zork_grand_inquisitor/docs/en_Zork Grand Inquisitor.md new file mode 100644 index 000000000000..d5821914beca --- /dev/null +++ b/worlds/zork_grand_inquisitor/docs/en_Zork Grand Inquisitor.md @@ -0,0 +1,102 @@ +# Zork Grand Inquisitor + +## Where is the options page? + +The [player options page for this game](../player-options) contains all the options you need to configure and export a +configuration file. + +## Is a tracker available for this game? + +Yes! You can download the latest PopTracker pack for Zork Grand Inquisitor [here](https://github.com/SerpentAI/ZorkGrandInquisitorAPTracker/releases/latest). + +## What does randomization do to this game? + +A majority of inventory items you can normally pick up are completely removed from the game (e.g. the lantern won't be +in the crate, the mead won't be at the fish market, etc.). Instead, these items will be distributed in the multiworld. +This means that you can expect to access areas and be in a position to solve certain puzzles in a completely different +order than you normally would. + +Subway, teleporter and totemizer destinations are initially locked and need to be unlocked by receiving the +corresponding item in the multiworld. This alone enables creative routing in a game that would otherwise be rather +linear. The Crossroads destination is always unlocked for both the subway and teleporter to prevent softlocks. Until you +receive your first totemizer destination, it will be locked to Newark, New Jersey. + +Important hotspots are also randomized. This means that you will be unable to interact with certain objects until you +receive the corresponding item in the multiworld. This can be a bit confusing at first, but it adds depth to the +randomization and makes the game more interesting to play. + +You can travel back to the surface without dying by looking inside the bucket. This will work as long as the rope is +still attached to the well. + +Attempting to cast VOXAM will teleport you back to the Crossroads. Fast Travel! + +## What item types are distributed in the multiworld? + +- Inventory items +- Pouch of Zorkmids +- Spells +- Totems +- Subway destinations +- Teleporter destinations +- Totemizer destinations +- Hotspots (with option to start with the items enabling them instead if you prefer not playing with the randomization + of hotspots) + +## When the player receives an item, what happens? + +- **Inventory items**: Directly added to the player's inventory. +- **Pouch of Zorkmids**: Appears on the inventory screen. The player can then pick up Zorkmid coins from it. +- **Spells**: Learned and directly added to the spell book. +- **Totems**: Appears on the inventory screen. +- **Subway destinations**: The destination button on the subway map becomes functional. +- **Teleporter destinations**: The destination can show up on the teleporter screen. +- **Totemizer destinations**: The destination button on the panel becomes functional. +- **Hotspots**: The hotspot becomes interactable. + +## What is considered a location check in Zork Grand Inquisitor? + +- Solving puzzles +- Accessing certain areas for the first time +- Triggering certain interactions, even if they aren't puzzles per se +- Dying in unique ways (Optional; Deathsanity option) + +## The location check names are fun but don't always convey well what's needed to unlock them. Is there a guide? + +Yes! You can find a complete guide for the location checks [here](https://gist.github.com/nbrochu/f7bed7a1fef4e2beb67ad6ddbf18b970). + +## What is the victory condition? + +Victory is achieved when the 3 artifacts of magic are retrieved and placed inside the walking castle. + +## Can I use the save system without a problem? + +Absolutely! The save system is fully supported (and its use is in fact strongly encouraged!). You can save and load your +game as you normally would and the client will automatically sync your items and hotspots with what you should have in +that game state. + +Depending on how your game progresses, there's a chance that certain location checks might become missable. This +presents an excellent opportunity to utilize the save system. Simply make it a habit to save before undertaking +irreversible actions, ensuring you can revert to a previous state if necessary. If you prefer not to depend on the save +system for accessing missable location checks, there's an option to automatically unlock them as they become +unavailable. + +## Unique Local Commands +The following commands are only available when using the Zork Grand Inquisitor Client to play the game with Archipelago. + +- `/zork` Attempts to attach to a running instance of Zork Grand Inquisitor. If successful, the client will then be able + to read and control the state of the game. +- `/brog` Lists received items for Brog. +- `/griff` Lists received items for Griff. +- `/lucy` Lists received items for Lucy. +- `/hotspots` Lists received hotspots. + +## Known issues + +- You will get a second rope right after using GLORF (one in your inventory and one on your cursor). This is a harmless + side effect that will go away after you store it in your inventory as duplicates are actively removed. +- After climbing up to the Monastery for the first time, a rope will forever remain in place in the vent. When you come + back to the Monastery, you will be able to climb up without needing to combine the sword and rope again. However, when + arriving at the top, you will receive a duplicate sword on a rope. This is a harmless side effect that will go away + after you store it in your inventory as duplicates are actively removed. +- Since the client is reading and manipulating the game's memory, rare game crashes can happen. If you encounter one, + simply restart the game, load your latest save and use the `/zork` command again in the client. Nothing will be lost. diff --git a/worlds/zork_grand_inquisitor/docs/setup_en.md b/worlds/zork_grand_inquisitor/docs/setup_en.md new file mode 100644 index 000000000000..f9078c6d39ba --- /dev/null +++ b/worlds/zork_grand_inquisitor/docs/setup_en.md @@ -0,0 +1,42 @@ +# Zork Grand Inquisitor Randomizer Setup Guide + +## Requirements + +- Windows OS (Hard required. Client is using memory reading / writing through Win32 API) +- A copy of Zork Grand Inquisitor. Only the GOG version is supported. The Steam version can work with some tinkering but + is not officially supported. +- ScummVM 2.7.1 64-bit (Important: Will not work with any other version. [Direct Download](https://downloads.scummvm.org/frs/scummvm/2.7.1/scummvm-2.7.1-win32-x86_64.zip)) +- Archipelago 0.4.4+ + +## Game Setup Instructions + +No game modding is required to play Zork Grand Inquisitor with Archipelago. The client does all the work by attaching to +the game process and reading and manipulating the game state in real-time. + +This being said, the game does need to be played through ScummVM 2.7.1, so some configuration is required around that. + +### GOG + +- Open the directory where you installed Zork Grand Inquisitor. You should see a `Launch Zork Grand Inquisitor` + shortcut. +- Open the `scummvm` directory. Delete the entire contents of that directory. +- Still inside the `scummvm` directory, unzip the contents of the ScummVM 2.7.1 zip file you downloaded earlier. +- Go back to the directory where you installed Zork Grand Inquisitor. +- Verify that the game still launches when using the `Launch Zork Grand Inquisitor` shortcut. +- Your game is now ready to be played with Archipelago. From now on, you can use the `Launch Zork Grand Inquisitor` + shortcut to launch the game. + +## Joining a Multiworld Game + +- Launch Zork Grand Inquisitor and start a new game. +- Open the Archipelago Launcher and click `Zork Grand Inquisitor Client`. +- Using the `Zork Grand Inquisitor Client`: + - Enter the room's hostname and port number (e.g. `archipelago.gg:54321`) in the top box and press `Connect`. + - Input your player name at the bottom when prompted and press `Enter`. + - You should now be connected to the Archipelago room. + - Next, input `/zork` at the bottom and press `Enter`. This will attach the client to the game process. + - If the command is successful, you are now ready to play Zork Grand Inquisitor with Archipelago. + +## Continuing a Multiworld Game + +- Perform the same steps as above, but instead of starting a new game, load your latest save file. diff --git a/worlds/zork_grand_inquisitor/enums.py b/worlds/zork_grand_inquisitor/enums.py new file mode 100644 index 000000000000..ecbb38a949b4 --- /dev/null +++ b/worlds/zork_grand_inquisitor/enums.py @@ -0,0 +1,350 @@ +import enum + + +class ZorkGrandInquisitorEvents(enum.Enum): + CHARON_CALLED = "Event: Charon Called" + CIGAR_ACCESSIBLE = "Event: Cigar Accessible" + DALBOZ_LOCKER_OPENABLE = "Event: Dalboz Locker Openable" + DAM_DESTROYED = "Event: Dam Destroyed" + DOOR_DRANK_MEAD = "Event: Door Drank Mead" + DOOR_SMOKED_CIGAR = "Event: Door Smoked Cigar" + DUNCE_LOCKER_OPENABLE = "Event: Dunce Locker Openable" + HAS_REPAIRABLE_OBIDIL = "Event: Has Repairable OBIDIL" + HAS_REPAIRABLE_SNAVIG = "Event: Has Repairable SNAVIG" + KNOWS_BEBURTT = "Event: Knows BEBURTT" + KNOWS_OBIDIL = "Event: Knows OBIDIL" + KNOWS_SNAVIG = "Event: Knows SNAVIG" + KNOWS_YASTARD = "Event: Knows YASTARD" + LANTERN_DALBOZ_ACCESSIBLE = "Event: Lantern (Dalboz) Accessible" + ROPE_GLORFABLE = "Event: Rope GLORFable" + VICTORY = "Victory" + WHITE_HOUSE_LETTER_MAILABLE = "Event: White House Letter Mailable" + ZORKMID_BILL_ACCESSIBLE = "Event: 500 Zorkmid Bill Accessible" + ZORK_ROCKS_ACTIVATED = "Event: Zork Rocks Activated" + ZORK_ROCKS_SUCKABLE = "Event: Zork Rocks Suckable" + + +class ZorkGrandInquisitorGoals(enum.Enum): + THREE_ARTIFACTS = 0 + + +class ZorkGrandInquisitorItems(enum.Enum): + BROGS_BICKERING_TORCH = "Brog's Bickering Torch" + BROGS_FLICKERING_TORCH = "Brog's Flickering Torch" + BROGS_GRUE_EGG = "Brog's Grue Egg" + BROGS_PLANK = "Brog's Plank" + FILLER_FROBOZZ_ELECTRIC_GADGET = "Frobozz Electric Gadget" + FILLER_INQUISITION_PROPAGANDA_FLYER = "Inquisition Propaganda Flyer" + FILLER_MAGIC_CONTRABAND = "Magic Contraband" + FILLER_NONSENSICAL_INQUISITION_PAPERWORK = "Nonsensical Inquisition Paperwork" + FILLER_UNREADABLE_SPELL_SCROLL = "Unreadable Spell Scroll" + FLATHEADIA_FUDGE = "Flatheadia Fudge" + GRIFFS_AIR_PUMP = "Griff's Air Pump" + GRIFFS_DRAGON_TOOTH = "Griff's Dragon Tooth" + GRIFFS_INFLATABLE_RAFT = "Griff's Inflatable Raft" + GRIFFS_INFLATABLE_SEA_CAPTAIN = "Griff's Inflatable Sea Captain" + HAMMER = "Hammer" + HOTSPOT_666_MAILBOX = "Hotspot: 666 Mailbox" + HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS = "Hotspot: Alpine's Quandry Card Slots" + HOTSPOT_BLANK_SCROLL_BOX = "Hotspot: Blank Scroll Box" + HOTSPOT_BLINDS = "Hotspot: Blinds" + HOTSPOT_CANDY_MACHINE_BUTTONS = "Hotspot: Candy Machine Buttons" + HOTSPOT_CANDY_MACHINE_COIN_SLOT = "Hotspot: Candy Machine Coin Slot" + HOTSPOT_CANDY_MACHINE_VACUUM_SLOT = "Hotspot: Candy Machine Vacuum Slot" + HOTSPOT_CHANGE_MACHINE_SLOT = "Hotspot: Change Machine Slot" + HOTSPOT_CLOSET_DOOR = "Hotspot: Closet Door" + HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT = "Hotspot: Closing the Time Tunnels Hammer Slot" + HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER = "Hotspot: Closing the Time Tunnels Lever" + HOTSPOT_COOKING_POT = "Hotspot: Cooking Pot" + HOTSPOT_DENTED_LOCKER = "Hotspot: Dented Locker" + HOTSPOT_DIRT_MOUND = "Hotspot: Dirt Mound" + HOTSPOT_DOCK_WINCH = "Hotspot: Dock Winch" + HOTSPOT_DRAGON_CLAW = "Hotspot: Dragon Claw" + HOTSPOT_DRAGON_NOSTRILS = "Hotspot: Dragon Nostrils" + HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE = "Hotspot: Dungeon Master's Lair Entrance" + HOTSPOT_FLOOD_CONTROL_BUTTONS = "Hotspot: Flood Control Buttons" + HOTSPOT_FLOOD_CONTROL_DOORS = "Hotspot: Flood Control Doors" + HOTSPOT_FROZEN_TREAT_MACHINE_COIN_SLOT = "Hotspot: Frozen Treat Machine Coin Slot" + HOTSPOT_FROZEN_TREAT_MACHINE_DOORS = "Hotspot: Frozen Treat Machine Doors" + HOTSPOT_GLASS_CASE = "Hotspot: Glass Case" + HOTSPOT_GRAND_INQUISITOR_DOLL = "Hotspot: Grand Inquisitor Doll" + HOTSPOT_GUE_TECH_DOOR = "Hotspot: GUE Tech Door" + HOTSPOT_GUE_TECH_GRASS = "Hotspot: GUE Tech Grass" + HOTSPOT_HADES_PHONE_BUTTONS = "Hotspot: Hades Phone Buttons" + HOTSPOT_HADES_PHONE_RECEIVER = "Hotspot: Hades Phone Receiver" + HOTSPOT_HARRY = "Hotspot: Harry" + HOTSPOT_HARRYS_ASHTRAY = "Hotspot: Harry's Ashtray" + HOTSPOT_HARRYS_BIRD_BATH = "Hotspot: Harry's Bird Bath" + HOTSPOT_IN_MAGIC_WE_TRUST_DOOR = "Hotspot: In Magic We Trust Door" + HOTSPOT_JACKS_DOOR = "Hotspot: Jack's Door" + HOTSPOT_LOUDSPEAKER_VOLUME_BUTTONS = "Hotspot: Loudspeaker Volume Buttons" + HOTSPOT_MAILBOX_DOOR = "Hotspot: Mailbox Door" + HOTSPOT_MAILBOX_FLAG = "Hotspot: Mailbox Flag" + HOTSPOT_MIRROR = "Hotspot: Mirror" + HOTSPOT_MONASTERY_VENT = "Hotspot: Monastery Vent" + HOTSPOT_MOSSY_GRATE = "Hotspot: Mossy Grate" + HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR = "Hotspot: Port Foozle Past Tavern Door" + HOTSPOT_PURPLE_WORDS = "Hotspot: Purple Words" + HOTSPOT_QUELBEE_HIVE = "Hotspot: Quelbee Hive" + HOTSPOT_ROPE_BRIDGE = "Hotspot: Rope Bridge" + HOTSPOT_SKULL_CAGE = "Hotspot: Skull Cage" + HOTSPOT_SNAPDRAGON = "Hotspot: Snapdragon" + HOTSPOT_SODA_MACHINE_BUTTONS = "Hotspot: Soda Machine Buttons" + HOTSPOT_SODA_MACHINE_COIN_SLOT = "Hotspot: Soda Machine Coin Slot" + HOTSPOT_SOUVENIR_COIN_SLOT = "Hotspot: Souvenir Coin Slot" + HOTSPOT_SPELL_CHECKER = "Hotspot: Spell Checker" + HOTSPOT_SPELL_LAB_CHASM = "Hotspot: Spell Lab Chasm" + HOTSPOT_SPRING_MUSHROOM = "Hotspot: Spring Mushroom" + HOTSPOT_STUDENT_ID_MACHINE = "Hotspot: Student ID Machine" + HOTSPOT_SUBWAY_TOKEN_SLOT = "Hotspot: Subway Token Slot" + HOTSPOT_TAVERN_FLY = "Hotspot: Tavern Fly" + HOTSPOT_TOTEMIZER_SWITCH = "Hotspot: Totemizer Switch" + HOTSPOT_TOTEMIZER_WHEELS = "Hotspot: Totemizer Wheels" + HOTSPOT_WELL = "Hotspot: Well" + HUNGUS_LARD = "Hungus Lard" + JAR_OF_HOTBUGS = "Jar of Hotbugs" + LANTERN = "Lantern" + LARGE_TELEGRAPH_HAMMER = "Large Telegraph Hammer" + LUCYS_PLAYING_CARD_1 = "Lucy's Playing Card: 1 Pip" + LUCYS_PLAYING_CARD_2 = "Lucy's Playing Card: 2 Pips" + LUCYS_PLAYING_CARD_3 = "Lucy's Playing Card: 3 Pips" + LUCYS_PLAYING_CARD_4 = "Lucy's Playing Card: 4 Pips" + MAP = "Map" + MEAD_LIGHT = "Mead Light" + MOSS_OF_MAREILON = "Moss of Mareilon" + MUG = "Mug" + OLD_SCRATCH_CARD = "Old Scratch Card" + PERMA_SUCK_MACHINE = "Perma-Suck Machine" + PLASTIC_SIX_PACK_HOLDER = "Plastic Six-Pack Holder" + POUCH_OF_ZORKMIDS = "Pouch of Zorkmids" + PROZORK_TABLET = "Prozork Tablet" + QUELBEE_HONEYCOMB = "Quelbee Honeycomb" + ROPE = "Rope" + SCROLL_FRAGMENT_ANS = "Scroll Fragment: ANS" + SCROLL_FRAGMENT_GIV = "Scroll Fragment: GIV" + SHOVEL = "Shovel" + SNAPDRAGON = "Snapdragon" + SPELL_GLORF = "Spell: GLORF" + SPELL_GOLGATEM = "Spell: GOLGATEM" + SPELL_IGRAM = "Spell: IGRAM" + SPELL_KENDALL = "Spell: KENDALL" + SPELL_NARWILE = "Spell: NARWILE" + SPELL_REZROV = "Spell: REZROV" + SPELL_THROCK = "Spell: THROCK" + SPELL_VOXAM = "Spell: VOXAM" + STUDENT_ID = "Student ID" + SUBWAY_DESTINATION_FLOOD_CONTROL_DAM = "Subway Destination: Flood Control Dam #3" + SUBWAY_DESTINATION_HADES = "Subway Destination: Hades" + SUBWAY_DESTINATION_MONASTERY = "Subway Destination: Monastery" + SUBWAY_TOKEN = "Subway Token" + SWORD = "Sword" + TELEPORTER_DESTINATION_DM_LAIR = "Teleporter Destination: Dungeon Master's Lair" + TELEPORTER_DESTINATION_GUE_TECH = "Teleporter Destination: GUE Tech" + TELEPORTER_DESTINATION_HADES = "Teleporter Destination: Hades" + TELEPORTER_DESTINATION_MONASTERY = "Teleporter Destination: Monastery Station" + TELEPORTER_DESTINATION_SPELL_LAB = "Teleporter Destination: Spell Lab" + TOTEM_BROG = "Totem: Brog" + TOTEM_GRIFF = "Totem: Griff" + TOTEM_LUCY = "Totem: Lucy" + TOTEMIZER_DESTINATION_HALL_OF_INQUISITION = "Totemizer Destination: Hall of Inquisition" + TOTEMIZER_DESTINATION_INFINITY = "Totemizer Destination: Infinity" + TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL = "Totemizer Destination: Straight to Hell" + TOTEMIZER_DESTINATION_SURFACE_OF_MERZ = "Totemizer Destination: Surface of Merz" + ZIMDOR_SCROLL = "ZIMDOR Scroll" + ZORK_ROCKS = "Zork Rocks" + + +class ZorkGrandInquisitorLocations(enum.Enum): + ALARM_SYSTEM_IS_DOWN = "Alarm System is Down" + ARREST_THE_VANDAL = "Arrest the Vandal!" + ARTIFACTS_EXPLAINED = "Artifacts, Explained" + A_BIG_FAT_SASSY_2_HEADED_MONSTER = "A Big, Fat, SASSY 2-Headed Monster" + A_LETTER_FROM_THE_WHITE_HOUSE = "A Letter from the White House" + A_SMALLWAY = "A Smallway" + BEAUTIFUL_THATS_PLENTY = "Beautiful, That's Plenty!" + BEBURTT_DEMYSTIFIED = "BEBURTT, Demystified" + BETTER_SPELL_MANUFACTURING_IN_UNDER_10_MINUTES = "Better Spell Manufacturing in Under 10 Minutes" + BOING_BOING_BOING = "Boing, Boing, Boing" + BONK = "Bonk!" + BRAVE_SOULS_WANTED = "Brave Souls Wanted" + BROG_DO_GOOD = "Brog Do Good!" + BROG_EAT_ROCKS = "Brog Eat Rocks" + BROG_KNOW_DUMB_THAT_DUMB = "Brog Know Dumb. That Dumb" + BROG_MUCH_BETTER_AT_THIS_GAME = "Brog Much Better at This Game" + CASTLE_WATCHING_A_FIELD_GUIDE = "Castle Watching: A Field Guide" + CAVES_NOTES = "Cave's Notes" + CLOSING_THE_TIME_TUNNELS = "Closing the Time Tunnels" + CRISIS_AVERTED = "Crisis Averted" + CUT_THAT_OUT_YOU_LITTLE_CREEP = "Cut That Out You Little Creep!" + DEATH_ARRESTED_WITH_JACK = "Death: Arrested With Jack" + DEATH_ATTACKED_THE_QUELBEES = "Death: Attacked the Quelbees" + DEATH_CLIMBED_OUT_OF_THE_WELL = "Death: Climbed Out of the Well" + DEATH_EATEN_BY_A_GRUE = "Death: Eaten by a Grue" + DEATH_JUMPED_IN_BOTTOMLESS_PIT = "Death: Jumped in Bottomless Pit" + DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER = "Death: Lost Game of Strip Grue, Fire, Water" + DEATH_LOST_SOUL_TO_OLD_SCRATCH = "Death: Lost Soul to Old Scratch" + DEATH_OUTSMARTED_BY_THE_QUELBEES = "Death: Outsmarted by the Quelbees" + DEATH_SLICED_UP_BY_THE_INVISIBLE_GUARD = "Death: Sliced up by the Invisible Guard" + DEATH_STEPPED_INTO_THE_INFINITE = "Death: Step Into the Infinite" + DEATH_SWALLOWED_BY_A_DRAGON = "Death: Swallowed by a Dragon" + DEATH_THROCKED_THE_GRASS = "Death: THROCKed the Grass" + DEATH_TOTEMIZED = "Death: Totemized?" + DEATH_TOTEMIZED_PERMANENTLY = "Death: Totemized... Permanently" + DEATH_YOURE_NOT_CHARON = "Death: You're Not Charon!?" + DEATH_ZORK_ROCKS_EXPLODED = "Death: Zork Rocks Exploded" + DENIED_BY_THE_LAKE_MONSTER = "Denied by the Lake Monster" + DESPERATELY_SEEKING_TUTOR = "Desperately Seeking Tutor" + DONT_EVEN_START_WITH_US_SPARKY = "Don't Even Start With Us, Sparky" + DOOOOOOWN = "Doooooown" + DOWN = "Down" + DRAGON_ARCHIPELAGO_TIME_TUNNEL = "Dragon Archipelago Time Tunnel" + DUNCE_LOCKER = "Dunce Locker" + EGGPLANTS = "Eggplants" + ELSEWHERE = "Elsewhere" + EMERGENCY_MAGICATRONIC_MESSAGE = "Emergency Magicatronic Message" + ENJOY_YOUR_TRIP = "Enjoy Your Trip!" + FAT_LOT_OF_GOOD_THATLL_DO_YA = "Fat Lot of Good That'll Do Ya" + FIRE_FIRE = "Fire! Fire!" + FLOOD_CONTROL_DAM_3_THE_NOT_REMOTELY_BORING_TALE = "Flood Control Dam #3: The Not Remotely Boring Tale" + FLYING_SNAPDRAGON = "Flying Snapdragon" + FROBUARY_3_UNDERGROUNDHOG_DAY = "Frobruary 3 - Undergroundhog Day" + GETTING_SOME_CHANGE = "Getting Some Change" + GO_AWAY = "GO AWAY!" + GUE_TECH_DEANS_LIST = "GUE Tech Dean's List" + GUE_TECH_ENTRANCE_EXAM = "GUE Tech Entrance Exam" + GUE_TECH_HEALTH_MEMO = "GUE Tech Health Memo" + GUE_TECH_MAGEMEISTERS = "GUE Tech Magemeisters" + HAVE_A_HELL_OF_A_DAY = "Have a Hell of a Day!" + HELLO_THIS_IS_SHONA_FROM_GURTH_PUBLISHING = "Hello, This is Shona from Gurth Publishing" + HELP_ME_CANT_BREATHE = "Help... Me. Can't... Breathe" + HEY_FREE_DIRT = "Hey, Free Dirt!" + HI_MY_NAME_IS_DOUG = "Hi, My Name is Doug" + HMMM_INFORMATIVE_YET_DEEPLY_DISTURBING = "Hmmm. Informative. Yet Deeply Disturbing" + HOLD_ON_FOR_AN_IMPORTANT_MESSAGE = "Hold on for an Important Message" + HOW_TO_HYPNOTIZE_YOURSELF = "How to Hypnotize Yourself" + HOW_TO_WIN_AT_DOUBLE_FANUCCI = "How to Win at Double Fanucci" + IMBUE_BEBURTT = "Imbue BEBURTT" + IM_COMPLETELY_NUDE = "I'm Completely Nude" + INTO_THE_FOLIAGE = "Into the Foliage" + INVISIBLE_FLOWERS = "Invisible Flowers" + IN_CASE_OF_ADVENTURE = "In Case of Adventure, Break Glass!" + IN_MAGIC_WE_TRUST = "In Magic We Trust" + ITS_ONE_OF_THOSE_ADVENTURERS_AGAIN = "It's One of Those Adventurers Again..." + I_DONT_THINK_YOU_WOULDVE_WANTED_THAT_TO_WORK_ANYWAY = "I Don't Think You Would've Wanted That to Work Anyway" + I_DONT_WANT_NO_TROUBLE = "I Don't Want No Trouble!" + I_HOPE_YOU_CAN_CLIMB_UP_THERE = "I Hope You Can Climb Up There With All This Junk" + I_LIKE_YOUR_STYLE = "I Like Your Style!" + I_SPIT_ON_YOUR_FILTHY_COINAGE = "I Spit on Your Filthy Coinage" + LIT_SUNFLOWERS = "Lit Sunflowers" + MAGIC_FOREVER = "Magic Forever!" + MAILED_IT_TO_HELL = "Mailed it to Hell" + MAKE_LOVE_NOT_WAR = "Make Love, Not War" + MEAD_LIGHT = "Mead Light?" + MIKES_PANTS = "Mike's Pants" + MUSHROOM_HAMMERED = "Mushroom, Hammered" + NATIONAL_TREASURE = "300 Year Old National Treasure" + NATURAL_AND_SUPERNATURAL_CREATURES_OF_QUENDOR = "Natural and Supernatural Creatures of Quendor" + NOOOOOOOOOOOOO = "NOOOOOOOOOOOOO!" + NOTHIN_LIKE_A_GOOD_STOGIE = "Nothin' Like a Good Stogie" + NOW_YOU_LOOK_LIKE_US_WHICH_IS_AN_IMPROVEMENT = "Now You Look Like Us, Which is an Improvement" + NO_AUTOGRAPHS = "No Autographs" + NO_BONDAGE = "No Bondage" + OBIDIL_DRIED_UP = "OBIDIL, Dried Up" + OH_DEAR_GOD_ITS_A_DRAGON = "Oh Dear God, It's a Dragon!" + OH_VERY_FUNNY_GUYS = "Oh, Very Funny Guys" + OH_WOW_TALK_ABOUT_DEJA_VU = "Oh, Wow! Talk About Deja Vu" + OLD_SCRATCH_WINNER = "Old Scratch Winner!" + ONLY_YOU_CAN_PREVENT_FOOZLE_FIRES = "Only You Can Prevent Foozle Fires" + OPEN_THE_GATES_OF_HELL = "Open the Gates of Hell" + OUTSMART_THE_QUELBEES = "Outsmart the Quelbees" + PERMASEAL = "PermaSeal" + PLANETFALL = "Planetfall" + PLEASE_DONT_THROCK_THE_GRASS = "Please Don't THROCK the Grass" + PORT_FOOZLE_TIME_TUNNEL = "Port Foozle Time Tunnel" + PROZORKED = "Prozorked" + REASSEMBLE_SNAVIG = "Reassemble SNAVIG" + RESTOCKED_ON_GRUESDAY = "Restocked on Gruesday" + RIGHT_HELLO_YES_UH_THIS_IS_SNEFFLE = "Right. Hello. Yes. Uh, This is Sneffle" + RIGHT_UH_SORRY_ITS_ME_AGAIN_SNEFFLE = "Right. Uh, Sorry. It's Me Again. Sneffle" + SNAVIG_REPAIRED = "SNAVIG, Repaired" + SOUVENIR = "Souvenir" + STRAIGHT_TO_HELL = "Straight to Hell" + STRIP_GRUE_FIRE_WATER = "Strip Grue, Fire, Water" + SUCKING_ROCKS = "Sucking Rocks" + TALK_TO_ME_GRAND_INQUISITOR = "Talk to Me Grand Inquisitor" + TAMING_YOUR_SNAPDRAGON = "Taming Your Snapdragon" + THAR_SHE_BLOWS = "Thar She Blows!" + THATS_A_ROPE = "That's a Rope" + THATS_IT_JUST_KEEP_HITTING_THOSE_BUTTONS = "That's it! Just Keep Hitting Those Buttons" + THATS_STILL_A_ROPE = "That's Still a Rope" + THATS_THE_SPIRIT = "That's the Spirit!" + THE_ALCHEMICAL_DEBACLE = "The Alchemical Debacle" + THE_ENDLESS_FIRE = "The Endless Fire" + THE_FLATHEADIAN_FUDGE_FIASCO = "The Flatheadian Fudge Fiasco" + THE_PERILS_OF_MAGIC = "The Perils of Magic" + THE_UNDERGROUND_UNDERGROUND = "The Underground Underground" + THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE = "This Doesn't Look Anything Like the Brochure" + THROCKED_MUSHROOM_HAMMERED = "THROCKed Mushroom, Hammered" + TIME_TRAVEL_FOR_DUMMIES = "Time Travel for Dummies" + TOTEMIZED_DAILY_BILLBOARD = "Totemized Daily Billboard Functioning Correctly" + UH_OH_BROG_CANT_SWIM = "Uh-Oh. Brog Can't Swim" + UMBRELLA_FLOWERS = "Umbrella Flowers" + UP = "Up" + USELESS_BUT_FUN = "Useless, But Fun" + UUUUUP = "Uuuuup" + VOYAGE_OF_CAPTAIN_ZAHAB = "Voyage of Captain Zahab" + WANT_SOME_RYE_COURSE_YA_DO = "Want Some Rye? Course Ya Do!" + WE_DONT_SERVE_YOUR_KIND_HERE = "We Don't Serve Your Kind Here" + WE_GOT_A_HIGH_ROLLER = "We Got a High Roller!" + WHAT_ARE_YOU_STUPID = "What Are You, Stupid?" + WHITE_HOUSE_TIME_TUNNEL = "White House Time Tunnel" + WOW_IVE_NEVER_GONE_INSIDE_HIM_BEFORE = "Wow! I've Never Gone Inside Him Before!" + YAD_GOHDNUORGREDNU_3_YRAUBORF = "yaD gohdnuorgrednU - 3 yrauborF" + YOUR_PUNY_WEAPONS_DONT_PHASE_ME_BABY = "Your Puny Weapons Don't Phase Me, Baby!" + YOU_DONT_GO_MESSING_WITH_A_MANS_ZIPPER = "You Don't Go Messing With a Man's Zipper" + YOU_GAINED_86_EXPERIENCE_POINTS = "You Gained 86 Experience Points" + YOU_ONE_OF_THEM_AGITATORS_AINT_YA = "You One of Them Agitators, Ain't Ya?" + YOU_WANT_A_PIECE_OF_ME_DOCK_BOY = "You Want a Piece of Me, Dock Boy? or Girl" + + +class ZorkGrandInquisitorRegions(enum.Enum): + CROSSROADS = "Crossroads" + DM_LAIR = "Dungeon Master's Lair" + DM_LAIR_INTERIOR = "Dungeon Master's Lair - Interior" + DRAGON_ARCHIPELAGO = "Dragon Archipelago" + DRAGON_ARCHIPELAGO_DRAGON = "Dragon Archipelago - Dragon" + ENDGAME = "Endgame" + GUE_TECH = "GUE Tech" + GUE_TECH_HALLWAY = "GUE Tech - Hallway" + GUE_TECH_OUTSIDE = "GUE Tech - Outside" + HADES = "Hades" + HADES_BEYOND_GATES = "Hades - Beyond Gates" + HADES_SHORE = "Hades - Shore" + MENU = "Menu" + MONASTERY = "Monastery" + MONASTERY_EXHIBIT = "Monastery - Exhibit" + PORT_FOOZLE = "Port Foozle" + PORT_FOOZLE_JACKS_SHOP = "Port Foozle - Jack's Shop" + PORT_FOOZLE_PAST = "Port Foozle Past" + PORT_FOOZLE_PAST_TAVERN = "Port Foozle Past - Tavern" + SPELL_LAB = "Spell Lab" + SPELL_LAB_BRIDGE = "Spell Lab - Bridge" + SUBWAY_CROSSROADS = "Subway Platform - Crossroads" + SUBWAY_FLOOD_CONTROL_DAM = "Subway Platform - Flood Control Dam #3" + SUBWAY_MONASTERY = "Subway Platform - Monastery" + WALKING_CASTLE = "Walking Castle" + WHITE_HOUSE = "White House" + + +class ZorkGrandInquisitorTags(enum.Enum): + CORE = "Core" + DEATHSANITY = "Deathsanity" + FILLER = "Filler" + HOTSPOT = "Hotspot" + INVENTORY_ITEM = "Inventory Item" + MISSABLE = "Missable" + SPELL = "Spell" + SUBWAY_DESTINATION = "Subway Destination" + TELEPORTER_DESTINATION = "Teleporter Destination" + TOTEMIZER_DESTINATION = "Totemizer Destination" + TOTEM = "Totem" diff --git a/worlds/zork_grand_inquisitor/game_controller.py b/worlds/zork_grand_inquisitor/game_controller.py new file mode 100644 index 000000000000..7a60a1460829 --- /dev/null +++ b/worlds/zork_grand_inquisitor/game_controller.py @@ -0,0 +1,1388 @@ +import collections +import functools +import logging + +from typing import Dict, Optional, Set, Tuple, Union + +from .data.item_data import item_data, ZorkGrandInquisitorItemData +from .data.location_data import location_data, ZorkGrandInquisitorLocationData + +from .data.missable_location_grant_conditions_data import ( + missable_location_grant_conditions_data, + ZorkGrandInquisitorMissableLocationGrantConditionsData, +) + +from .data_funcs import game_id_to_items, items_with_tag, locations_with_tag + +from .enums import ( + ZorkGrandInquisitorGoals, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorLocations, + ZorkGrandInquisitorTags, +) + +from .game_state_manager import GameStateManager + + +class GameController: + logger: Optional[logging.Logger] + + game_state_manager: GameStateManager + + received_items: Set[ZorkGrandInquisitorItems] + completed_locations: Set[ZorkGrandInquisitorLocations] + + completed_locations_queue: collections.deque + received_items_queue: collections.deque + + all_hotspot_items: Set[ZorkGrandInquisitorItems] + + game_id_to_items: Dict[int, ZorkGrandInquisitorItems] + + possible_inventory_items: Set[ZorkGrandInquisitorItems] + + available_inventory_slots: Set[int] + + goal_completed: bool + + option_goal: Optional[ZorkGrandInquisitorGoals] + option_deathsanity: Optional[bool] + option_grant_missable_location_checks: Optional[bool] + + def __init__(self, logger=None) -> None: + self.logger = logger + + self.game_state_manager = GameStateManager() + + self.received_items = set() + self.completed_locations = set() + + self.completed_locations_queue = collections.deque() + self.received_items_queue = collections.deque() + + self.all_hotspot_items = ( + items_with_tag(ZorkGrandInquisitorTags.HOTSPOT) + | items_with_tag(ZorkGrandInquisitorTags.SUBWAY_DESTINATION) + | items_with_tag(ZorkGrandInquisitorTags.TOTEMIZER_DESTINATION) + ) + + self.game_id_to_items = game_id_to_items() + + self.possible_inventory_items = ( + items_with_tag(ZorkGrandInquisitorTags.INVENTORY_ITEM) + | items_with_tag(ZorkGrandInquisitorTags.SPELL) + | items_with_tag(ZorkGrandInquisitorTags.TOTEM) + ) + + self.available_inventory_slots = set() + + self.goal_completed = False + + self.option_goal = None + self.option_deathsanity = None + self.option_grant_missable_location_checks = None + + @functools.cached_property + def brog_items(self) -> Set[ZorkGrandInquisitorItems]: + return { + ZorkGrandInquisitorItems.BROGS_BICKERING_TORCH, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG, + ZorkGrandInquisitorItems.BROGS_PLANK, + } + + @functools.cached_property + def griff_items(self) -> Set[ZorkGrandInquisitorItems]: + return { + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN, + } + + @functools.cached_property + def lucy_items(self) -> Set[ZorkGrandInquisitorItems]: + return { + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4, + } + + @property + def totem_items(self) -> Set[ZorkGrandInquisitorItems]: + return self.brog_items | self.griff_items | self.lucy_items + + @functools.cached_property + def missable_locations(self) -> Set[ZorkGrandInquisitorLocations]: + return locations_with_tag(ZorkGrandInquisitorTags.MISSABLE) + + def log(self, message) -> None: + if self.logger: + self.logger.info(message) + + def log_debug(self, message) -> None: + if self.logger: + self.logger.debug(message) + + def open_process_handle(self) -> bool: + return self.game_state_manager.open_process_handle() + + def close_process_handle(self) -> bool: + return self.game_state_manager.close_process_handle() + + def is_process_running(self) -> bool: + return self.game_state_manager.is_process_running + + def list_received_brog_items(self) -> None: + self.log("Received Brog Items:") + + self._process_received_items() + received_brog_items: Set[ZorkGrandInquisitorItems] = self.received_items & self.brog_items + + if not len(received_brog_items): + self.log(" Nothing") + return + + for item in sorted(i.value for i in received_brog_items): + self.log(f" {item}") + + def list_received_griff_items(self) -> None: + self.log("Received Griff Items:") + + self._process_received_items() + received_griff_items: Set[ZorkGrandInquisitorItems] = self.received_items & self.griff_items + + if not len(received_griff_items): + self.log(" Nothing") + return + + for item in sorted(i.value for i in received_griff_items): + self.log(f" {item}") + + def list_received_lucy_items(self) -> None: + self.log("Received Lucy Items:") + + self._process_received_items() + received_lucy_items: Set[ZorkGrandInquisitorItems] = self.received_items & self.lucy_items + + if not len(received_lucy_items): + self.log(" Nothing") + return + + for item in sorted(i.value for i in received_lucy_items): + self.log(f" {item}") + + def list_received_hotspots(self) -> None: + self.log("Received Hotspots:") + + self._process_received_items() + + hotspot_items: Set[ZorkGrandInquisitorItems] = items_with_tag(ZorkGrandInquisitorTags.HOTSPOT) + received_hotspots: Set[ZorkGrandInquisitorItems] = self.received_items & hotspot_items + + if not len(received_hotspots): + self.log(" Nothing") + return + + for item in sorted(i.value for i in received_hotspots): + self.log(f" {item}") + + def update(self) -> None: + if self.game_state_manager.is_process_still_running(): + try: + self.game_state_manager.refresh_game_location() + + self._apply_permanent_game_state() + self._apply_conditional_game_state() + + self._apply_permanent_game_flags() + + self._check_for_completed_locations() + + if self.option_grant_missable_location_checks: + self._check_for_missable_locations_to_grant() + + self._process_received_items() + + self._manage_hotspots() + self._manage_items() + + self._apply_conditional_teleports() + + self._check_for_victory() + except Exception as e: + self.log_debug(e) + + def _apply_permanent_game_state(self) -> None: + self._write_game_state_value_for(10934, 1) # Rope Taken + self._write_game_state_value_for(10418, 1) # Mead Light Taken + self._write_game_state_value_for(10275, 0) # Lantern in Crate + self._write_game_state_value_for(13929, 1) # Great Underground Door Open + self._write_game_state_value_for(13968, 1) # Subway Token Taken + self._write_game_state_value_for(12930, 1) # Hammer Taken + self._write_game_state_value_for(12935, 1) # Griff Totem Taken + self._write_game_state_value_for(12948, 1) # ZIMDOR Scroll Taken + self._write_game_state_value_for(4058, 1) # Shovel Taken + self._write_game_state_value_for(4059, 1) # THROCK Scroll Taken + self._write_game_state_value_for(11758, 1) # KENDALL Scroll Taken + self._write_game_state_value_for(16959, 1) # Old Scratch Card Taken + self._write_game_state_value_for(12840, 0) # Zork Rocks in Perma-Suck Machine + self._write_game_state_value_for(11886, 1) # Student ID Taken + self._write_game_state_value_for(16279, 1) # Prozork Tablet Taken + self._write_game_state_value_for(13260, 1) # GOLGATEM Scroll Taken + self._write_game_state_value_for(4834, 1) # Flatheadia Fudge Taken + self._write_game_state_value_for(4746, 1) # Jar of Hotbugs Taken + self._write_game_state_value_for(4755, 1) # Hungus Lard Taken + self._write_game_state_value_for(4758, 1) # Mug Taken + self._write_game_state_value_for(3716, 1) # NARWILE Scroll Taken + self._write_game_state_value_for(17147, 1) # Lucy Totem Taken + self._write_game_state_value_for(9818, 1) # Middle Telegraph Hammer Taken + self._write_game_state_value_for(3766, 0) # ANS Scroll in Window + self._write_game_state_value_for(4980, 0) # ANS Scroll in Window + self._write_game_state_value_for(3768, 0) # GIV Scroll in Window + self._write_game_state_value_for(4978, 0) # GIV Scroll in Window + self._write_game_state_value_for(3765, 0) # SNA Scroll in Window + self._write_game_state_value_for(4979, 0) # SNA Scroll in Window + self._write_game_state_value_for(3767, 0) # VIG Scroll in Window + self._write_game_state_value_for(4977, 0) # VIG Scroll in Window + self._write_game_state_value_for(15065, 1) # Brog's Bickering Torch Taken + self._write_game_state_value_for(15088, 1) # Brog's Flickering Torch Taken + self._write_game_state_value_for(2628, 4) # Brog's Grue Eggs Taken + self._write_game_state_value_for(2971, 1) # Brog's Plank Taken + self._write_game_state_value_for(1340, 1) # Griff's Inflatable Sea Captain Taken + self._write_game_state_value_for(1341, 1) # Griff's Inflatable Raft Taken + self._write_game_state_value_for(1477, 1) # Griff's Air Pump Taken + self._write_game_state_value_for(1814, 1) # Griff's Dragon Tooth Taken + self._write_game_state_value_for(15403, 0) # Lucy's Cards Taken + self._write_game_state_value_for(15404, 1) # Lucy's Cards Taken + self._write_game_state_value_for(15405, 4) # Lucy's Cards Taken + self._write_game_state_value_for(5222, 1) # User Has Spell Book + self._write_game_state_value_for(13930, 1) # Skip Well Cutscenes + self._write_game_state_value_for(19057, 1) # Skip Well Cutscenes + self._write_game_state_value_for(13934, 1) # Skip Well Cutscenes + self._write_game_state_value_for(13935, 1) # Skip Well Cutscenes + self._write_game_state_value_for(13384, 1) # Skip Meanwhile... Cutscene + self._write_game_state_value_for(8620, 1) # First Coin Paid to Charon + self._write_game_state_value_for(8731, 1) # First Coin Paid to Charon + + def _apply_conditional_game_state(self): + # Can teleport to Dungeon Master's Lair + if self._player_has(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR): + self._write_game_state_value_for(2203, 1) + else: + self._write_game_state_value_for(2203, 0) + + # Can teleport to GUE Tech + if self._player_has(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH): + self._write_game_state_value_for(7132, 1) + else: + self._write_game_state_value_for(7132, 0) + + # Can Teleport to Spell Lab + if self._player_has(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB): + self._write_game_state_value_for(16545, 1) + else: + self._write_game_state_value_for(16545, 0) + + # Can Teleport to Hades + if self._player_has(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES): + self._write_game_state_value_for(7119, 1) + else: + self._write_game_state_value_for(7119, 0) + + # Can Teleport to Monastery Station + if self._player_has(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY): + self._write_game_state_value_for(7148, 1) + else: + self._write_game_state_value_for(7148, 0) + + # Initial Totemizer Destination + should_force_initial_totemizer_destination: bool = True + + if self._player_has(ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_HALL_OF_INQUISITION): + should_force_initial_totemizer_destination = False + elif self._player_has(ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL): + should_force_initial_totemizer_destination = False + elif self._player_has(ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_INFINITY): + should_force_initial_totemizer_destination = False + elif self._player_has(ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_SURFACE_OF_MERZ): + should_force_initial_totemizer_destination = False + + if should_force_initial_totemizer_destination: + self._write_game_state_value_for(9617, 2) + + # Pouch of Zorkmids + if self._player_has(ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS): + self._write_game_state_value_for(5827, 1) + else: + self._write_game_state_value_for(5827, 0) + + # Brog Torches + if self._player_is_brog() and self._player_has(ZorkGrandInquisitorItems.BROGS_BICKERING_TORCH): + self._write_game_state_value_for(10999, 1) + else: + self._write_game_state_value_for(10999, 0) + + if self._player_is_brog() and self._player_has(ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH): + self._write_game_state_value_for(10998, 1) + else: + self._write_game_state_value_for(10998, 0) + + # Monastery Rope + if ZorkGrandInquisitorLocations.I_HOPE_YOU_CAN_CLIMB_UP_THERE in self.completed_locations: + self._write_game_state_value_for(9637, 1) + + def _apply_permanent_game_flags(self) -> None: + self._write_game_flags_value_for(9437, 2) # Monastery Exhibit Door to Outside + self._write_game_flags_value_for(3074, 2) # White House Door + self._write_game_flags_value_for(13005, 2) # Map + self._write_game_flags_value_for(13006, 2) # Sword + self._write_game_flags_value_for(13007, 2) # Sword + self._write_game_flags_value_for(13389, 2) # Moss of Mareilon + self._write_game_flags_value_for(4301, 2) # Quelbee Honeycomb + self._write_game_flags_value_for(12895, 2) # Change Machine Money + self._write_game_flags_value_for(4150, 2) # Prozorked Snapdragon + self._write_game_flags_value_for(13413, 2) # Letter Opener + self._write_game_flags_value_for(15403, 2) # Lucy's Cards + + def _check_for_completed_locations(self) -> None: + location: ZorkGrandInquisitorLocations + data: ZorkGrandInquisitorLocationData + for location, data in location_data.items(): + if location in self.completed_locations or not isinstance( + location, ZorkGrandInquisitorLocations + ): + continue + + is_location_completed: bool = True + + trigger: [Union[str, int]] + value: Union[str, int, Tuple[int, ...]] + for trigger, value in data.game_state_trigger: + if trigger == "location": + if not self._player_is_at(value): + is_location_completed = False + break + elif isinstance(trigger, int): + if isinstance(value, int): + if self._read_game_state_value_for(trigger) != value: + is_location_completed = False + break + elif isinstance(value, tuple): + if self._read_game_state_value_for(trigger) not in value: + is_location_completed = False + break + else: + is_location_completed = False + break + else: + is_location_completed = False + break + + if is_location_completed: + self.completed_locations.add(location) + self.completed_locations_queue.append(location) + + def _check_for_missable_locations_to_grant(self) -> None: + missable_location: ZorkGrandInquisitorLocations + for missable_location in self.missable_locations: + if missable_location in self.completed_locations: + continue + + data: ZorkGrandInquisitorLocationData = location_data[missable_location] + + if ZorkGrandInquisitorTags.DEATHSANITY in data.tags and not self.option_deathsanity: + continue + + condition_data: ZorkGrandInquisitorMissableLocationGrantConditionsData = ( + missable_location_grant_conditions_data.get(missable_location) + ) + + if condition_data is None: + self.log_debug(f"Missable Location {missable_location.value} has no grant conditions") + continue + + if condition_data.location_condition in self.completed_locations: + grant_location: bool = True + + item: ZorkGrandInquisitorItems + for item in condition_data.item_conditions or tuple(): + if self._player_doesnt_have(item): + grant_location = False + break + + if grant_location: + self.completed_locations_queue.append(missable_location) + + def _process_received_items(self) -> None: + while len(self.received_items_queue) > 0: + item: ZorkGrandInquisitorItems = self.received_items_queue.popleft() + data: ZorkGrandInquisitorItemData = item_data[item] + + if ZorkGrandInquisitorTags.FILLER in data.tags: + continue + + self.received_items.add(item) + + def _manage_hotspots(self) -> None: + hotspot_item: ZorkGrandInquisitorItems + for hotspot_item in self.all_hotspot_items: + data: ZorkGrandInquisitorItemData = item_data[hotspot_item] + + if hotspot_item not in self.received_items: + key: int + for key in data.statemap_keys: + self._write_game_flags_value_for(key, 2) + else: + if hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_666_MAILBOX: + if self.game_state_manager.game_location == "hp5g": + if self._read_game_state_value_for(9113) == 0: + self._write_game_flags_value_for(9116, 0) + else: + self._write_game_flags_value_for(9116, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS: + if self.game_state_manager.game_location == "qb2g": + if self._read_game_state_value_for(15433) == 0: + self._write_game_flags_value_for(15434, 0) + else: + self._write_game_flags_value_for(15434, 2) + + if self._read_game_state_value_for(15435) == 0: + self._write_game_flags_value_for(15436, 0) + else: + self._write_game_flags_value_for(15436, 2) + + if self._read_game_state_value_for(15437) == 0: + self._write_game_flags_value_for(15438, 0) + else: + self._write_game_flags_value_for(15438, 2) + + if self._read_game_state_value_for(15439) == 0: + self._write_game_flags_value_for(15440, 0) + else: + self._write_game_flags_value_for(15440, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_BLANK_SCROLL_BOX: + if self.game_state_manager.game_location == "tp2g": + if self._read_game_state_value_for(12095) == 1: + self._write_game_flags_value_for(9115, 2) + else: + self._write_game_flags_value_for(9115, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_BLINDS: + if self.game_state_manager.game_location == "dv1e": + if self._read_game_state_value_for(4743) == 0: + self._write_game_flags_value_for(4799, 0) + else: + self._write_game_flags_value_for(4799, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS: + if self.game_state_manager.game_location == "tr5g": + key: int + for key in data.statemap_keys: + self._write_game_flags_value_for(key, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT: + if self.game_state_manager.game_location == "tr5g": + self._write_game_flags_value_for(12702, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_VACUUM_SLOT: + if self.game_state_manager.game_location == "tr5m": + self._write_game_flags_value_for(12909, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_CHANGE_MACHINE_SLOT: + if self.game_state_manager.game_location == "tr5j": + if self._read_game_state_value_for(12892) == 0: + self._write_game_flags_value_for(12900, 0) + else: + self._write_game_flags_value_for(12900, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_CLOSET_DOOR: + if self.game_state_manager.game_location == "dw1e": + if self._read_game_state_value_for(4983) == 0: + self._write_game_flags_value_for(5010, 0) + else: + self._write_game_flags_value_for(5010, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT: + if self.game_state_manager.game_location == "me2j": + if self._read_game_state_value_for(9491) == 2: + self._write_game_flags_value_for(9539, 0) + else: + self._write_game_flags_value_for(9539, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER: + if self.game_state_manager.game_location == "me2j": + if self._read_game_state_value_for(9546) == 2 or self._read_game_state_value_for(9419) == 1: + self._write_game_flags_value_for(19712, 2) + else: + self._write_game_flags_value_for(19712, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT: + if self.game_state_manager.game_location == "sg1f": + self._write_game_flags_value_for(2586, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_DENTED_LOCKER: + if self.game_state_manager.game_location == "th3j": + five_is_open: bool = self._read_game_state_value_for(11847) == 1 + six_is_open: bool = self._read_game_state_value_for(11840) == 1 + seven_is_open: bool = self._read_game_state_value_for(11841) == 1 + eight_is_open: bool = self._read_game_state_value_for(11848) == 1 + + rocks_in_six: bool = self._read_game_state_value_for(11769) == 1 + six_blasted: bool = self._read_game_state_value_for(11770) == 1 + + if five_is_open or six_is_open or seven_is_open or eight_is_open or rocks_in_six or six_blasted: + self._write_game_flags_value_for(11878, 2) + else: + self._write_game_flags_value_for(11878, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_DIRT_MOUND: + if self.game_state_manager.game_location == "te5e": + if self._read_game_state_value_for(11747) == 0: + self._write_game_flags_value_for(11751, 0) + else: + self._write_game_flags_value_for(11751, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_DOCK_WINCH: + if self.game_state_manager.game_location == "pe2e": + self._write_game_flags_value_for(15147, 0) + self._write_game_flags_value_for(15153, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_DRAGON_CLAW: + if self.game_state_manager.game_location == "cd70": + self._write_game_flags_value_for(1705, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS: + if self.game_state_manager.game_location == "cd3h": + raft_in_left: bool = self._read_game_state_value_for(1301) == 1 + raft_in_right: bool = self._read_game_state_value_for(1304) == 1 + raft_inflated: bool = self._read_game_state_value_for(1379) == 1 + + captain_in_left: bool = self._read_game_state_value_for(1374) == 1 + captain_in_right: bool = self._read_game_state_value_for(1381) == 1 + captain_inflated: bool = self._read_game_state_value_for(1378) == 1 + + left_inflated: bool = (raft_in_left and raft_inflated) or (captain_in_left and captain_inflated) + + right_inflated: bool = (raft_in_right and raft_inflated) or ( + captain_in_right and captain_inflated + ) + + if left_inflated: + self._write_game_flags_value_for(1425, 2) + else: + self._write_game_flags_value_for(1425, 0) + + if right_inflated: + self._write_game_flags_value_for(1426, 2) + else: + self._write_game_flags_value_for(1426, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE: + if self.game_state_manager.game_location == "uc3e": + if self._read_game_state_value_for(13060) == 0: + self._write_game_flags_value_for(13106, 0) + else: + self._write_game_flags_value_for(13106, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS: + if self.game_state_manager.game_location == "ue1e": + if self._read_game_state_value_for(14318) == 0: + self._write_game_flags_value_for(13219, 0) + self._write_game_flags_value_for(13220, 0) + self._write_game_flags_value_for(13221, 0) + self._write_game_flags_value_for(13222, 0) + else: + self._write_game_flags_value_for(13219, 2) + self._write_game_flags_value_for(13220, 2) + self._write_game_flags_value_for(13221, 2) + self._write_game_flags_value_for(13222, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS: + if self.game_state_manager.game_location == "ue1e": + if self._read_game_state_value_for(14318) == 0: + self._write_game_flags_value_for(14327, 0) + self._write_game_flags_value_for(14332, 0) + self._write_game_flags_value_for(14337, 0) + self._write_game_flags_value_for(14342, 0) + else: + self._write_game_flags_value_for(14327, 2) + self._write_game_flags_value_for(14332, 2) + self._write_game_flags_value_for(14337, 2) + self._write_game_flags_value_for(14342, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_COIN_SLOT: + if self.game_state_manager.game_location == "tr5e": + self._write_game_flags_value_for(12528, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_DOORS: + if self.game_state_manager.game_location == "tr5e": + if self._read_game_state_value_for(12220) == 0: + self._write_game_flags_value_for(12523, 2) + self._write_game_flags_value_for(12524, 2) + self._write_game_flags_value_for(12525, 2) + else: + self._write_game_flags_value_for(12523, 0) + self._write_game_flags_value_for(12524, 0) + self._write_game_flags_value_for(12525, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_GLASS_CASE: + if self.game_state_manager.game_location == "uc1g": + if self._read_game_state_value_for(12931) == 1 or self._read_game_state_value_for(12929) == 1: + self._write_game_flags_value_for(13002, 2) + else: + self._write_game_flags_value_for(13002, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL: + if self.game_state_manager.game_location == "pe5e": + if self._read_game_state_value_for(10277) == 0: + self._write_game_flags_value_for(10726, 0) + else: + self._write_game_flags_value_for(10726, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_DOOR: + if self.game_state_manager.game_location == "tr1k": + if self._read_game_state_value_for(12212) == 0: + self._write_game_flags_value_for(12280, 0) + else: + self._write_game_flags_value_for(12280, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_GRASS: + if self.game_state_manager.game_location in ("te10", "te1g", "te20", "te30", "te40"): + key: int + for key in data.statemap_keys: + self._write_game_flags_value_for(key, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS: + if self.game_state_manager.game_location == "hp1e": + if self._read_game_state_value_for(8431) == 1: + key: int + for key in data.statemap_keys: + self._write_game_flags_value_for(key, 0) + else: + key: int + for key in data.statemap_keys: + self._write_game_flags_value_for(key, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER: + if self.game_state_manager.game_location == "hp1e": + if self._read_game_state_value_for(8431) == 1: + self._write_game_flags_value_for(8446, 2) + else: + self._write_game_flags_value_for(8446, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_HARRY: + if self.game_state_manager.game_location == "dg4e": + if self._read_game_state_value_for(4237) == 1 and self._read_game_state_value_for(4034) == 1: + self._write_game_flags_value_for(4260, 2) + else: + self._write_game_flags_value_for(4260, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_HARRYS_ASHTRAY: + if self.game_state_manager.game_location == "dg4h": + if self._read_game_state_value_for(4279) == 1: + self._write_game_flags_value_for(18026, 2) + else: + self._write_game_flags_value_for(18026, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_HARRYS_BIRD_BATH: + if self.game_state_manager.game_location == "dg4g": + if self._read_game_state_value_for(4034) == 1: + self._write_game_flags_value_for(17623, 2) + else: + self._write_game_flags_value_for(17623, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_IN_MAGIC_WE_TRUST_DOOR: + if self.game_state_manager.game_location == "uc4e": + if self._read_game_state_value_for(13062) == 1: + self._write_game_flags_value_for(13140, 2) + else: + self._write_game_flags_value_for(13140, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR: + if self.game_state_manager.game_location == "pe1e": + if self._read_game_state_value_for(10451) == 1: + self._write_game_flags_value_for(10441, 2) + else: + self._write_game_flags_value_for(10441, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_LOUDSPEAKER_VOLUME_BUTTONS: + if self.game_state_manager.game_location == "pe2j": + self._write_game_flags_value_for(19632, 0) + self._write_game_flags_value_for(19627, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_DOOR: + if self.game_state_manager.game_location == "sw4e": + if self._read_game_state_value_for(2989) == 1: + self._write_game_flags_value_for(3025, 2) + else: + self._write_game_flags_value_for(3025, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG: + if self.game_state_manager.game_location == "sw4e": + self._write_game_flags_value_for(3036, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_MIRROR: + if self.game_state_manager.game_location == "dw1f": + self._write_game_flags_value_for(5031, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_MONASTERY_VENT: + if self.game_state_manager.game_location == "um1e": + if self._read_game_state_value_for(9637) == 0: + self._write_game_flags_value_for(13597, 0) + else: + self._write_game_flags_value_for(13597, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_MOSSY_GRATE: + if self.game_state_manager.game_location == "ue2g": + if self._read_game_state_value_for(13278) == 0: + self._write_game_flags_value_for(13390, 0) + else: + self._write_game_flags_value_for(13390, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR: + if self.game_state_manager.game_location == "qe1e": + if self._player_is_brog(): + self._write_game_flags_value_for(2447, 0) + elif self._player_is_griff(): + self._write_game_flags_value_for(2455, 0) + elif self._player_is_lucy(): + if self._read_game_state_value_for(2457) == 0: + self._write_game_flags_value_for(2455, 0) + else: + self._write_game_flags_value_for(2455, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS: + if self.game_state_manager.game_location == "tr3h": + if self._read_game_state_value_for(11777) == 1: + self._write_game_flags_value_for(12389, 2) + else: + self._write_game_flags_value_for(12389, 0) + + self._write_game_state_value_for(12390, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_QUELBEE_HIVE: + if self.game_state_manager.game_location == "dg4f": + if self._read_game_state_value_for(4241) == 1: + self._write_game_flags_value_for(4302, 2) + else: + self._write_game_flags_value_for(4302, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE: + if self.game_state_manager.game_location == "tp1e": + if self._read_game_state_value_for(16342) == 1: + self._write_game_flags_value_for(16383, 2) + self._write_game_flags_value_for(16384, 2) + else: + self._write_game_flags_value_for(16383, 0) + self._write_game_flags_value_for(16384, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE: + if self.game_state_manager.game_location == "sg6e": + if self._read_game_state_value_for(15715) == 1: + self._write_game_flags_value_for(2769, 2) + else: + self._write_game_flags_value_for(2769, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SNAPDRAGON: + if self.game_state_manager.game_location == "dg2f": + if self._read_game_state_value_for(4114) == 1 or self._read_game_state_value_for(4115) == 1: + self._write_game_flags_value_for(4149, 2) + else: + self._write_game_flags_value_for(4149, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_BUTTONS: + if self.game_state_manager.game_location == "tr5f": + self._write_game_flags_value_for(12584, 0) + self._write_game_flags_value_for(12585, 0) + self._write_game_flags_value_for(12586, 0) + self._write_game_flags_value_for(12587, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_COIN_SLOT: + if self.game_state_manager.game_location == "tr5f": + self._write_game_flags_value_for(12574, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SOUVENIR_COIN_SLOT: + if self.game_state_manager.game_location == "ue2j": + if self._read_game_state_value_for(13408) == 1: + self._write_game_flags_value_for(13412, 2) + else: + self._write_game_flags_value_for(13412, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER: + if self.game_state_manager.game_location == "tp4g": + self._write_game_flags_value_for(12170, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM: + if self.game_state_manager.game_location == "tp1e": + if self._read_game_state_value_for(16342) == 1 and self._read_game_state_value_for(16374) == 0: + self._write_game_flags_value_for(16382, 0) + else: + self._write_game_flags_value_for(16382, 2) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SPRING_MUSHROOM: + if self.game_state_manager.game_location == "dg3e": + self._write_game_flags_value_for(4209, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_STUDENT_ID_MACHINE: + if self.game_state_manager.game_location == "th3r": + self._write_game_flags_value_for(11973, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_SUBWAY_TOKEN_SLOT: + if self.game_state_manager.game_location == "uc6e": + self._write_game_flags_value_for(13168, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY: + if self.game_state_manager.game_location == "qb2e": + if self._read_game_state_value_for(15395) == 1: + self._write_game_flags_value_for(15396, 2) + else: + self._write_game_flags_value_for(15396, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH: + if self.game_state_manager.game_location == "mt2e": + self._write_game_flags_value_for(9706, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS: + if self.game_state_manager.game_location == "mt2g": + self._write_game_flags_value_for(9728, 0) + self._write_game_flags_value_for(9729, 0) + self._write_game_flags_value_for(9730, 0) + elif hotspot_item == ZorkGrandInquisitorItems.HOTSPOT_WELL: + if self.game_state_manager.game_location == "pc1e": + self._write_game_flags_value_for(10314, 0) + elif hotspot_item == ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM: + if self.game_state_manager.game_location == "us2e": + self._write_game_flags_value_for(13757, 0) + elif self.game_state_manager.game_location == "ue2e": + self._write_game_flags_value_for(13297, 0) + elif self.game_state_manager.game_location == "uh2e": + self._write_game_flags_value_for(13486, 0) + elif self.game_state_manager.game_location == "um2e": + self._write_game_flags_value_for(13625, 0) + elif hotspot_item == ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES: + if self.game_state_manager.game_location == "us2e": + self._write_game_flags_value_for(13758, 0) + elif self.game_state_manager.game_location == "ue2e": + self._write_game_flags_value_for(13309, 0) + elif self.game_state_manager.game_location == "uh2e": + self._write_game_flags_value_for(13498, 0) + elif self.game_state_manager.game_location == "um2e": + self._write_game_flags_value_for(13637, 0) + elif hotspot_item == ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY: + if self.game_state_manager.game_location == "us2e": + self._write_game_flags_value_for(13759, 0) + elif self.game_state_manager.game_location == "ue2e": + self._write_game_flags_value_for(13316, 0) + elif self.game_state_manager.game_location == "uh2e": + self._write_game_flags_value_for(13505, 0) + elif self.game_state_manager.game_location == "um2e": + self._write_game_flags_value_for(13644, 0) + elif hotspot_item == ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_HALL_OF_INQUISITION: + if self.game_state_manager.game_location == "mt1f": + self._write_game_flags_value_for(9660, 0) + elif hotspot_item == ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_INFINITY: + if self.game_state_manager.game_location == "mt1f": + self._write_game_flags_value_for(9666, 0) + elif hotspot_item == ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL: + if self.game_state_manager.game_location == "mt1f": + self._write_game_flags_value_for(9668, 0) + elif hotspot_item == ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_SURFACE_OF_MERZ: + if self.game_state_manager.game_location == "mt1f": + self._write_game_flags_value_for(9662, 0) + + def _manage_items(self) -> None: + if self._player_is_afgncaap(): + self.available_inventory_slots = self._determine_available_inventory_slots() + + received_inventory_items: Set[ZorkGrandInquisitorItems] + received_inventory_items = self.received_items & self.possible_inventory_items + + received_inventory_items = self._filter_received_inventory_items(received_inventory_items) + elif self._player_is_totem(): + self.available_inventory_slots = self._determine_available_inventory_slots(is_totem=True) + + received_inventory_items: Set[ZorkGrandInquisitorItems] + + if self._player_is_brog(): + received_inventory_items = self.received_items & self.brog_items + received_inventory_items = self._filter_received_brog_inventory_items(received_inventory_items) + elif self._player_is_griff(): + received_inventory_items = self.received_items & self.griff_items + received_inventory_items = self._filter_received_griff_inventory_items(received_inventory_items) + elif self._player_is_lucy(): + received_inventory_items = self.received_items & self.lucy_items + received_inventory_items = self._filter_received_lucy_inventory_items(received_inventory_items) + else: + return None + else: + return None + + game_state_inventory_items: Set[ZorkGrandInquisitorItems] = self._determine_game_state_inventory() + + inventory_items_to_remove: Set[ZorkGrandInquisitorItems] + inventory_items_to_remove = game_state_inventory_items - received_inventory_items + + inventory_items_to_add: Set[ZorkGrandInquisitorItems] + inventory_items_to_add = received_inventory_items - game_state_inventory_items + + item: ZorkGrandInquisitorItems + for item in inventory_items_to_remove: + self._remove_from_inventory(item) + + item: ZorkGrandInquisitorItems + for item in inventory_items_to_add: + self._add_to_inventory(item) + + # Item Deduplication (Just in Case) + seen_items: Set[int] = set() + + i: int + for i in range(151, 171): + item: int = self._read_game_state_value_for(i) + + if item in seen_items: + self._write_game_state_value_for(i, 0) + else: + seen_items.add(item) + + def _apply_conditional_teleports(self) -> None: + if self._player_is_at("uw1x"): + self.game_state_manager.set_game_location("uw10", 0) + + if self._player_is_at("uw1k") and self._read_game_state_value_for(13938) == 0: + self.game_state_manager.set_game_location("pc10", 250) + + if self._player_is_at("ue1q"): + self.game_state_manager.set_game_location("ue1e", 0) + + if self._player_is_at("ej10"): + self.game_state_manager.set_game_location("uc10", 1200) + + if self._read_game_state_value_for(9) == 224: + self._write_game_state_value_for(9, 0) + self.game_state_manager.set_game_location("uc10", 1200) + + def _check_for_victory(self) -> None: + if self.option_goal == ZorkGrandInquisitorGoals.THREE_ARTIFACTS: + coconut_is_placed = self._read_game_state_value_for(2200) == 1 + cube_is_placed = self._read_game_state_value_for(2322) == 1 + skull_is_placed = self._read_game_state_value_for(2321) == 1 + + self.goal_completed = coconut_is_placed and cube_is_placed and skull_is_placed + + def _determine_game_state_inventory(self) -> Set[ZorkGrandInquisitorItems]: + game_state_inventory: Set[ZorkGrandInquisitorItems] = set() + + # Item on Cursor + item_on_cursor: int = self._read_game_state_value_for(9) + + if item_on_cursor != 0: + if item_on_cursor in self.game_id_to_items: + game_state_inventory.add(self.game_id_to_items[item_on_cursor]) + + # Item in Inspector + item_in_inspector: int = self._read_game_state_value_for(4512) + + if item_in_inspector != 0: + if item_in_inspector in self.game_id_to_items: + game_state_inventory.add(self.game_id_to_items[item_in_inspector]) + + # Items in Inventory Slots + i: int + for i in range(151, 171): + if self._read_game_state_value_for(i) != 0: + if self._read_game_state_value_for(i) in self.game_id_to_items: + game_state_inventory.add( + self.game_id_to_items[self._read_game_state_value_for(i)] + ) + + # Pouch of Zorkmids + if self._read_game_state_value_for(5827) == 1: + game_state_inventory.add(ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS) + + # Spells + i: int + for i in range(191, 203): + if self._read_game_state_value_for(i) == 1: + if i in self.game_id_to_items: + game_state_inventory.add(self.game_id_to_items[i]) + + # Totems + if self._read_game_state_value_for(4853) == 1: + game_state_inventory.add(ZorkGrandInquisitorItems.TOTEM_BROG) + + if self._read_game_state_value_for(4315) == 1: + game_state_inventory.add(ZorkGrandInquisitorItems.TOTEM_GRIFF) + + if self._read_game_state_value_for(5223) == 1: + game_state_inventory.add(ZorkGrandInquisitorItems.TOTEM_LUCY) + + return game_state_inventory + + def _add_to_inventory(self, item: ZorkGrandInquisitorItems) -> None: + if item == ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS: + return None + + data: ZorkGrandInquisitorItemData = item_data[item] + + if ZorkGrandInquisitorTags.INVENTORY_ITEM in data.tags: + if len(self.available_inventory_slots): # Inventory slot overflow protection + inventory_slot: int = self.available_inventory_slots.pop() + self._write_game_state_value_for(inventory_slot, data.statemap_keys[0]) + elif ZorkGrandInquisitorTags.SPELL in data.tags: + self._write_game_state_value_for(data.statemap_keys[0], 1) + elif ZorkGrandInquisitorTags.TOTEM in data.tags: + self._write_game_state_value_for(data.statemap_keys[0], 1) + + def _remove_from_inventory(self, item: ZorkGrandInquisitorItems) -> None: + if item == ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS: + return None + + data: ZorkGrandInquisitorItemData = item_data[item] + + if ZorkGrandInquisitorTags.INVENTORY_ITEM in data.tags: + inventory_slot: Optional[int] = self._inventory_slot_for(item) + + if inventory_slot is None: + return None + + self._write_game_state_value_for(inventory_slot, 0) + + if inventory_slot != 9: + self.available_inventory_slots.add(inventory_slot) + elif ZorkGrandInquisitorTags.SPELL in data.tags: + self._write_game_state_value_for(data.statemap_keys[0], 0) + elif ZorkGrandInquisitorTags.TOTEM in data.tags: + self._write_game_state_value_for(data.statemap_keys[0], 0) + + def _determine_available_inventory_slots(self, is_totem: bool = False) -> Set[int]: + available_inventory_slots: Set[int] = set() + + inventory_slot_range_end: int = 171 + + if is_totem: + if self._player_is_brog(): + inventory_slot_range_end = 161 + elif self._player_is_griff(): + inventory_slot_range_end = 160 + elif self._player_is_lucy(): + inventory_slot_range_end = 157 + + i: int + for i in range(151, inventory_slot_range_end): + if self._read_game_state_value_for(i) == 0: + available_inventory_slots.add(i) + + return available_inventory_slots + + def _inventory_slot_for(self, item) -> Optional[int]: + data: ZorkGrandInquisitorItemData = item_data[item] + + if ZorkGrandInquisitorTags.INVENTORY_ITEM in data.tags: + i: int + for i in range(151, 171): + if self._read_game_state_value_for(i) == data.statemap_keys[0]: + return i + + if self._read_game_state_value_for(9) == data.statemap_keys[0]: + return 9 + + if self._read_game_state_value_for(4512) == data.statemap_keys[0]: + return 4512 + + return None + + def _filter_received_inventory_items( + self, received_inventory_items: Set[ZorkGrandInquisitorItems] + ) -> Set[ZorkGrandInquisitorItems]: + to_filter_inventory_items: Set[ZorkGrandInquisitorItems] = self.totem_items + + inventory_item_values: Set[int] = set() + + i: int + for i in range(151, 171): + inventory_item_values.add(self._read_game_state_value_for(i)) + + cursor_item_value: int = self._read_game_state_value_for(9) + inspector_item_value: int = self._read_game_state_value_for(4512) + + inventory_item_values.add(cursor_item_value) + inventory_item_values.add(inspector_item_value) + + item: ZorkGrandInquisitorItems + for item in received_inventory_items: + if item == ZorkGrandInquisitorItems.FLATHEADIA_FUDGE: + if self._read_game_state_value_for(4766) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(4869) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.HUNGUS_LARD: + if self._read_game_state_value_for(4870) == 1: + to_filter_inventory_items.add(item) + elif ( + self._read_game_state_value_for(4244) == 1 + and self._read_game_state_value_for(4309) == 0 + ): + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.JAR_OF_HOTBUGS: + if self._read_game_state_value_for(4750) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(4869) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.LANTERN: + if self._read_game_state_value_for(10477) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(5221) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.LARGE_TELEGRAPH_HAMMER: + if self._read_game_state_value_for(9491) == 3: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.MAP: + if self._read_game_state_value_for(16618) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.MEAD_LIGHT: + if 105 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(17620) > 0: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(4034) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.MOSS_OF_MAREILON: + if self._read_game_state_value_for(4763) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(4869) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.MUG: + if self._read_game_state_value_for(4772) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(4869) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.OLD_SCRATCH_CARD: + if 32 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(12892) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.PERMA_SUCK_MACHINE: + if self._read_game_state_value_for(12218) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.PLASTIC_SIX_PACK_HOLDER: + if self._read_game_state_value_for(15150) == 3: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(10421) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.PROZORK_TABLET: + if self._read_game_state_value_for(4115) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.QUELBEE_HONEYCOMB: + if self._read_game_state_value_for(4769) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(4869) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.ROPE: + if 22 in inventory_item_values: + to_filter_inventory_items.add(item) + elif 111 in inventory_item_values: + to_filter_inventory_items.add(item) + elif ( + self._read_game_state_value_for(10304) == 1 + and not self._read_game_state_value_for(13938) == 1 + ): + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15150) == 83: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.SCROLL_FRAGMENT_ANS: + if 41 in inventory_item_values: + to_filter_inventory_items.add(item) + elif 98 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(201) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.SCROLL_FRAGMENT_GIV: + if 48 in inventory_item_values: + to_filter_inventory_items.add(item) + elif 98 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(201) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.SNAPDRAGON: + if self._read_game_state_value_for(4199) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.STUDENT_ID: + if self._read_game_state_value_for(11838) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.SUBWAY_TOKEN: + if self._read_game_state_value_for(13167) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.SWORD: + if 22 in inventory_item_values: + to_filter_inventory_items.add(item) + elif 100 in inventory_item_values: + to_filter_inventory_items.add(item) + elif 111 in inventory_item_values: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.ZIMDOR_SCROLL: + if 105 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(17620) == 3: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(4034) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.ZORK_ROCKS: + if self._read_game_state_value_for(12486) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(12487) == 1: + to_filter_inventory_items.add(item) + elif 52 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(11769) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(11840) == 1: + to_filter_inventory_items.add(item) + + return received_inventory_items - to_filter_inventory_items + + def _filter_received_brog_inventory_items( + self, received_inventory_items: Set[ZorkGrandInquisitorItems] + ) -> Set[ZorkGrandInquisitorItems]: + to_filter_inventory_items: Set[ZorkGrandInquisitorItems] = set() + + inventory_item_values: Set[int] = set() + + i: int + for i in range(151, 161): + inventory_item_values.add(self._read_game_state_value_for(i)) + + cursor_item_value: int = self._read_game_state_value_for(9) + inspector_item_value: int = self._read_game_state_value_for(2194) + + inventory_item_values.add(cursor_item_value) + inventory_item_values.add(inspector_item_value) + + item: ZorkGrandInquisitorItems + for item in received_inventory_items: + if item == ZorkGrandInquisitorItems.BROGS_BICKERING_TORCH: + if 103 in inventory_item_values: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH: + if 104 in inventory_item_values: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.BROGS_GRUE_EGG: + if self._read_game_state_value_for(2577) == 1: + to_filter_inventory_items.add(item) + elif 71 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(2641) == 1: + to_filter_inventory_items.add(item) + + return received_inventory_items - to_filter_inventory_items + + def _filter_received_griff_inventory_items( + self, received_inventory_items: Set[ZorkGrandInquisitorItems] + ) -> Set[ZorkGrandInquisitorItems]: + to_filter_inventory_items: Set[ZorkGrandInquisitorItems] = set() + + inventory_item_values: Set[int] = set() + + i: int + for i in range(151, 160): + inventory_item_values.add(self._read_game_state_value_for(i)) + + cursor_item_value: int = self._read_game_state_value_for(9) + inspector_item_value: int = self._read_game_state_value_for(4512) + + inventory_item_values.add(cursor_item_value) + inventory_item_values.add(inspector_item_value) + + item: ZorkGrandInquisitorItems + for item in received_inventory_items: + if item == ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT: + if self._read_game_state_value_for(1301) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(1304) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(16562) == 1: + to_filter_inventory_items.add(item) + if item == ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN: + if self._read_game_state_value_for(1374) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(1381) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(16562) == 1: + to_filter_inventory_items.add(item) + + return received_inventory_items - to_filter_inventory_items + + def _filter_received_lucy_inventory_items( + self, received_inventory_items: Set[ZorkGrandInquisitorItems] + ) -> Set[ZorkGrandInquisitorItems]: + to_filter_inventory_items: Set[ZorkGrandInquisitorItems] = set() + + inventory_item_values: Set[int] = set() + + i: int + for i in range(151, 157): + inventory_item_values.add(self._read_game_state_value_for(i)) + + cursor_item_value: int = self._read_game_state_value_for(9) + inspector_item_value: int = self._read_game_state_value_for(2198) + + inventory_item_values.add(cursor_item_value) + inventory_item_values.add(inspector_item_value) + + item: ZorkGrandInquisitorItems + for item in received_inventory_items: + if item == ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1: + if 120 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15433) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15435) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15437) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15439) == 1: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15472) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2: + if 121 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15433) == 2: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15435) == 2: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15437) == 2: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15439) == 2: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15472) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3: + if 122 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15433) == 3: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15435) == 3: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15437) == 3: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15439) == 3: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15472) == 1: + to_filter_inventory_items.add(item) + elif item == ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4: + if 123 in inventory_item_values: + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15433) in (4, 5): + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15435) in (4, 5): + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15437) in (4, 5): + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15439) in (4, 5): + to_filter_inventory_items.add(item) + elif self._read_game_state_value_for(15472) == 1: + to_filter_inventory_items.add(item) + + return received_inventory_items - to_filter_inventory_items + + def _read_game_state_value_for(self, key: int) -> Optional[int]: + try: + return self.game_state_manager.read_game_state_value_for(key) + except Exception as e: + self.log_debug(f"Exception: {e} while trying to read game state key '{key}'") + raise e + + def _write_game_state_value_for(self, key: int, value: int) -> Optional[bool]: + try: + return self.game_state_manager.write_game_state_value_for(key, value) + except Exception as e: + self.log_debug(f"Exception: {e} while trying to write '{key} = {value}' to game state") + raise e + + def _read_game_flags_value_for(self, key: int) -> Optional[int]: + try: + return self.game_state_manager.read_game_flags_value_for(key) + except Exception as e: + self.log_debug(f"Exception: {e} while trying to read game flags key '{key}'") + raise e + + def _write_game_flags_value_for(self, key: int, value: int) -> Optional[bool]: + try: + return self.game_state_manager.write_game_flags_value_for(key, value) + except Exception as e: + self.log_debug(f"Exception: {e} while trying to write '{key} = {value}' to game flags") + raise e + + def _player_has(self, item: ZorkGrandInquisitorItems) -> bool: + return item in self.received_items + + def _player_doesnt_have(self, item: ZorkGrandInquisitorItems) -> bool: + return item not in self.received_items + + def _player_is_at(self, game_location: str) -> bool: + return self.game_state_manager.game_location == game_location + + def _player_is_afgncaap(self) -> bool: + return self._read_game_state_value_for(1596) == 1 + + def _player_is_totem(self) -> bool: + return self._player_is_brog() or self._player_is_griff() or self._player_is_lucy() + + def _player_is_brog(self) -> bool: + return self._read_game_state_value_for(1520) == 1 + + def _player_is_griff(self) -> bool: + return self._read_game_state_value_for(1296) == 1 + + def _player_is_lucy(self) -> bool: + return self._read_game_state_value_for(1524) == 1 diff --git a/worlds/zork_grand_inquisitor/game_state_manager.py b/worlds/zork_grand_inquisitor/game_state_manager.py new file mode 100644 index 000000000000..25b35969bf5e --- /dev/null +++ b/worlds/zork_grand_inquisitor/game_state_manager.py @@ -0,0 +1,370 @@ +from typing import Optional, Tuple + +from pymem import Pymem +from pymem.process import close_handle + + +class GameStateManager: + process_name = "scummvm.exe" + + process: Optional[Pymem] + is_process_running: bool + + script_manager_struct_address: int + render_manager_struct_address: int + + game_location: Optional[str] + game_location_offset: Optional[int] + + def __init__(self) -> None: + self.process = None + self.is_process_running = False + + self.script_manager_struct_address = 0x0 + self.render_manager_struct_address = 0x0 + + self.game_location = None + self.game_location_offset = None + + @property + def game_state_storage_pointer_address(self) -> int: + return self.script_manager_struct_address + 0x88 + + @property + def game_state_storage_address(self) -> int: + return self.process.read_longlong(self.game_state_storage_pointer_address) + + @property + def game_state_hashmap_size_address(self) -> int: + return self.script_manager_struct_address + 0x90 + + @property + def game_state_key_count_address(self) -> int: + return self.script_manager_struct_address + 0x94 + + @property + def game_state_deleted_key_count_address(self) -> int: + return self.script_manager_struct_address + 0x98 + + @property + def game_flags_storage_pointer_address(self) -> int: + return self.script_manager_struct_address + 0x120 + + @property + def game_flags_storage_address(self) -> int: + return self.process.read_longlong(self.game_flags_storage_pointer_address) + + @property + def game_flags_hashmap_size_address(self) -> int: + return self.script_manager_struct_address + 0x128 + + @property + def game_flags_key_count_address(self) -> int: + return self.script_manager_struct_address + 0x12C + + @property + def game_flags_deleted_key_count_address(self) -> int: + return self.script_manager_struct_address + 0x130 + + @property + def current_location_address(self) -> int: + return self.script_manager_struct_address + 0x400 + + @property + def current_location_offset_address(self) -> int: + return self.script_manager_struct_address + 0x404 + + @property + def next_location_address(self) -> int: + return self.script_manager_struct_address + 0x408 + + @property + def next_location_offset_address(self) -> int: + return self.script_manager_struct_address + 0x40C + + @property + def panorama_reversed_address(self) -> int: + return self.render_manager_struct_address + 0x1C + + def open_process_handle(self) -> bool: + try: + self.process = Pymem(self.process_name) + self.is_process_running = True + + self.script_manager_struct_address = self._resolve_address(0x5276600, (0xC8, 0x0)) + self.render_manager_struct_address = self._resolve_address(0x5276600, (0xD0, 0x120)) + except Exception: + return False + + return True + + def close_process_handle(self) -> bool: + if close_handle(self.process.process_handle): + self.is_process_running = False + self.process = None + + self.script_manager_struct_address = 0x0 + self.render_manager_struct_address = 0x0 + + return True + + return False + + def is_process_still_running(self) -> bool: + try: + self.process.read_int(self.process.base_address) + except Exception: + self.is_process_running = False + self.process = None + + self.script_manager_struct_address = 0x0 + self.render_manager_struct_address = 0x0 + + return False + + return True + + def read_game_state_value_for(self, key: int) -> Optional[int]: + return self.read_statemap_value_for(key, scope="game_state") + + def read_game_flags_value_for(self, key: int) -> Optional[int]: + return self.read_statemap_value_for(key, scope="game_flags") + + def read_statemap_value_for(self, key: int, scope: str = "game_state") -> Optional[int]: + if self.is_process_running: + offset: int + + address: int + address_value: int + + if scope == "game_state": + offset = self._get_game_state_address_read_offset_for(key) + + address = self.game_state_storage_address + offset + address_value = self.process.read_longlong(address) + elif scope == "game_flags": + offset = self._get_game_flags_address_read_offset_for(key) + + address = self.game_flags_storage_address + offset + address_value = self.process.read_longlong(address) + else: + raise ValueError(f"Invalid scope: {scope}") + + if address_value == 0: + return 0 + + statemap_value: int = self.process.read_int(address_value + 0x0) + statemap_key: int = self.process.read_int(address_value + 0x4) + + assert statemap_key == key + + return statemap_value + + return None + + def write_game_state_value_for(self, key: int, value: int) -> Optional[bool]: + return self.write_statemap_value_for(key, value, scope="game_state") + + def write_game_flags_value_for(self, key: int, value: int) -> Optional[bool]: + return self.write_statemap_value_for(key, value, scope="game_flags") + + def write_statemap_value_for(self, key: int, value: int, scope: str = "game_state") -> Optional[bool]: + if self.is_process_running: + offset: int + is_existing_node: bool + is_reused_dummy_node: bool + + key_count_address: int + deleted_key_count_address: int + + storage_address: int + + if scope == "game_state": + offset, is_existing_node, is_reused_dummy_node = self._get_game_state_address_write_offset_for(key) + + key_count_address = self.game_state_key_count_address + deleted_key_count_address = self.game_state_deleted_key_count_address + + storage_address = self.game_state_storage_address + elif scope == "game_flags": + offset, is_existing_node, is_reused_dummy_node = self._get_game_flags_address_write_offset_for(key) + + key_count_address = self.game_flags_key_count_address + deleted_key_count_address = self.game_flags_deleted_key_count_address + + storage_address = self.game_flags_storage_address + else: + raise ValueError(f"Invalid scope: {scope}") + + statemap_key_count: int = self.process.read_int(key_count_address) + statemap_deleted_key_count: int = self.process.read_int(deleted_key_count_address) + + if value == 0: + if not is_existing_node: + return False + + self.process.write_longlong(storage_address + offset, 1) + + self.process.write_int(key_count_address, statemap_key_count - 1) + self.process.write_int(deleted_key_count_address, statemap_deleted_key_count + 1) + else: + if is_existing_node: + address_value: int = self.process.read_longlong(storage_address + offset) + self.process.write_int(address_value + 0x0, value) + else: + write_address: int = self.process.allocate(0x8) + + self.process.write_int(write_address + 0x0, value) + self.process.write_int(write_address + 0x4, key) + + self.process.write_longlong(storage_address + offset, write_address) + + self.process.write_int(key_count_address, statemap_key_count + 1) + + if is_reused_dummy_node: + self.process.write_int(deleted_key_count_address, statemap_deleted_key_count - 1) + + return True + + return None + + def refresh_game_location(self) -> Optional[bool]: + if self.is_process_running: + game_location_bytes: bytes = self.process.read_bytes(self.current_location_address, 4) + + self.game_location = game_location_bytes.decode("ascii") + self.game_location_offset = self.process.read_int(self.current_location_offset_address) + + return True + + return None + + def set_game_location(self, game_location: str, offset: int) -> Optional[bool]: + if self.is_process_running: + game_location_bytes: bytes = game_location.encode("ascii") + + self.process.write_bytes(self.next_location_address, game_location_bytes, 4) + self.process.write_int(self.next_location_offset_address, offset) + + return True + + return None + + def set_panorama_reversed(self, is_reversed: bool) -> Optional[bool]: + if self.is_process_running: + self.process.write_int(self.panorama_reversed_address, 1 if is_reversed else 0) + + return True + + return None + + def _resolve_address(self, base_offset: int, offsets: Tuple[int, ...]): + address: int = self.process.read_longlong(self.process.base_address + base_offset) + + for offset in offsets[:-1]: + address = self.process.read_longlong(address + offset) + + return address + offsets[-1] + + def _get_game_state_address_read_offset_for(self, key: int): + return self._get_statemap_address_read_offset_for(key, scope="game_state") + + def _get_game_flags_address_read_offset_for(self, key: int): + return self._get_statemap_address_read_offset_for(key, scope="game_flags") + + def _get_statemap_address_read_offset_for(self, key: int, scope: str = "game_state") -> int: + hashmap_size_address: int + storage_address: int + + if scope == "game_state": + hashmap_size_address = self.game_state_hashmap_size_address + storage_address = self.game_state_storage_address + elif scope == "game_flags": + hashmap_size_address = self.game_flags_hashmap_size_address + storage_address = self.game_flags_storage_address + else: + raise ValueError(f"Invalid scope: {scope}") + + statemap_hashmap_size: int = self.process.read_int(hashmap_size_address) + + perturb: int = key + perturb_shift: int = 0x5 + + index: int = key & statemap_hashmap_size + offset: int = index * 0x8 + + while True: + offset_value: int = self.process.read_longlong(storage_address + offset) + + if offset_value == 0: # Null Pointer + break + elif offset_value == 1: # Dummy Node + pass + elif offset_value > 1: # Existing Node + if self.process.read_int(offset_value + 0x4) == key: + break + + index = ((0x5 * index) + perturb + 0x1) & statemap_hashmap_size + offset = index * 0x8 + + perturb >>= perturb_shift + + return offset + + def _get_game_state_address_write_offset_for(self, key: int) -> Tuple[int, bool, bool]: + return self._get_statemap_address_write_offset_for(key, scope="game_state") + + def _get_game_flags_address_write_offset_for(self, key: int) -> Tuple[int, bool, bool]: + return self._get_statemap_address_write_offset_for(key, scope="game_flags") + + def _get_statemap_address_write_offset_for(self, key: int, scope: str = "game_state") -> Tuple[int, bool, bool]: + hashmap_size_address: int + storage_address: int + + if scope == "game_state": + hashmap_size_address = self.game_state_hashmap_size_address + storage_address = self.game_state_storage_address + elif scope == "game_flags": + hashmap_size_address = self.game_flags_hashmap_size_address + storage_address = self.game_flags_storage_address + else: + raise ValueError(f"Invalid scope: {scope}") + + statemap_hashmap_size: int = self.process.read_int(hashmap_size_address) + + perturb: int = key + perturb_shift: int = 0x5 + + index: int = key & statemap_hashmap_size + offset: int = index * 0x8 + + node_found: bool = False + + dummy_node_found: bool = False + dummy_node_offset: Optional[int] = None + + while True: + offset_value: int = self.process.read_longlong(storage_address + offset) + + if offset_value == 0: # Null Pointer + break + elif offset_value == 1: # Dummy Node + if not dummy_node_found: + dummy_node_offset = offset + dummy_node_found = True + elif offset_value > 1: # Existing Node + if self.process.read_int(offset_value + 0x4) == key: + node_found = True + break + + index = ((0x5 * index) + perturb + 0x1) & statemap_hashmap_size + offset = index * 0x8 + + perturb >>= perturb_shift + + if not node_found and dummy_node_found: # We should reuse the dummy node + return dummy_node_offset, False, True + elif not node_found and not dummy_node_found: # We should allocate a new node + return offset, False, False + + return offset, True, False # We should update the existing node diff --git a/worlds/zork_grand_inquisitor/options.py b/worlds/zork_grand_inquisitor/options.py new file mode 100644 index 000000000000..f06415199934 --- /dev/null +++ b/worlds/zork_grand_inquisitor/options.py @@ -0,0 +1,61 @@ +from dataclasses import dataclass + +from Options import Choice, DefaultOnToggle, PerGameCommonOptions, Toggle + + +class Goal(Choice): + """ + Determines the victory condition + + Three Artifacts: Retrieve the three artifacts of magic and place them in the walking castle + """ + display_name: str = "Goal" + + default: int = 0 + option_three_artifacts: int = 0 + + +class QuickPortFoozle(DefaultOnToggle): + """If true, the items needed to go down the well will be found in early locations for a smoother early game""" + + display_name: str = "Quick Port Foozle" + + +class StartWithHotspotItems(DefaultOnToggle): + """ + If true, the player will be given all the hotspot items at the start of the game, effectively removing the need + to enable the important hotspots in the game before interacting with them. Recommended for beginners + + Note: The spots these hotspot items would have occupied in the item pool will instead be filled with junk items. + Expect a higher volume of filler items if you enable this option + """ + + display_name: str = "Start with Hotspot Items" + + +class Deathsanity(Toggle): + """If true, adds 16 player death locations to the world""" + + display_name: str = "Deathsanity" + + +class GrantMissableLocationChecks(Toggle): + """ + If true, performing an irreversible action will grant the locations checks that would have become unobtainable as a + result of that action when you meet the item requirements + + Otherwise, the player is expected to potentially have to use the save system to reach those location checks. If you + don't like the idea of rarely having to reload an earlier save to get a location check, make sure this option is + enabled + """ + + display_name: str = "Grant Missable Checks" + + +@dataclass +class ZorkGrandInquisitorOptions(PerGameCommonOptions): + goal: Goal + quick_port_foozle: QuickPortFoozle + start_with_hotspot_items: StartWithHotspotItems + deathsanity: Deathsanity + grant_missable_location_checks: GrantMissableLocationChecks diff --git a/worlds/zork_grand_inquisitor/requirements.txt b/worlds/zork_grand_inquisitor/requirements.txt new file mode 100644 index 000000000000..fe25267f6705 --- /dev/null +++ b/worlds/zork_grand_inquisitor/requirements.txt @@ -0,0 +1 @@ +Pymem>=1.13.0 \ No newline at end of file diff --git a/worlds/zork_grand_inquisitor/test/__init__.py b/worlds/zork_grand_inquisitor/test/__init__.py new file mode 100644 index 000000000000..c8ceda43a7bf --- /dev/null +++ b/worlds/zork_grand_inquisitor/test/__init__.py @@ -0,0 +1,5 @@ +from test.bases import WorldTestBase + + +class ZorkGrandInquisitorTestBase(WorldTestBase): + game = "Zork Grand Inquisitor" diff --git a/worlds/zork_grand_inquisitor/test/test_access.py b/worlds/zork_grand_inquisitor/test/test_access.py new file mode 100644 index 000000000000..63a5f8c9ab1d --- /dev/null +++ b/worlds/zork_grand_inquisitor/test/test_access.py @@ -0,0 +1,2927 @@ +from typing import List + +from . import ZorkGrandInquisitorTestBase + +from ..enums import ( + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorLocations, + ZorkGrandInquisitorRegions, +) + + +class AccessTestRegions(ZorkGrandInquisitorTestBase): + options = { + "start_with_hotspot_items": "false", + } + + def test_access_crossroads_to_dm_lair_sword(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + def test_access_crossroads_to_dm_lair_teleporter(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + def test_access_crossroads_to_gue_tech(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_REZROV.value, + ZorkGrandInquisitorItems.HOTSPOT_IN_MAGIC_WE_TRUST_DOOR.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH.value)) + + def test_access_crossroads_to_gue_tech_outside(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + def test_access_crossroads_to_hades_shore(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_crossroads_to_port_foozle(self) -> None: + self._go_to_crossroads() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE.value)) + + def test_access_crossroads_to_spell_lab_bridge(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + def test_access_crossroads_to_subway_crossroads(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SUBWAY_TOKEN.value, + ZorkGrandInquisitorItems.HOTSPOT_SUBWAY_TOKEN_SLOT.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS.value)) + + def test_access_crossroads_to_subway_monastery(self) -> None: + self._go_to_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_dm_lair_to_crossroads(self) -> None: + self._go_to_dm_lair() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + def test_access_dm_lair_to_dm_lair_interior(self) -> None: + self._go_to_dm_lair() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_ASHTRAY.value, + ZorkGrandInquisitorItems.MEAD_LIGHT.value, + ZorkGrandInquisitorItems.ZIMDOR_SCROLL.value, + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_BIRD_BATH.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR.value)) + + def test_access_dm_lair_to_gue_tech_outside(self) -> None: + self._go_to_dm_lair() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH.value)) + + def test_access_dm_lair_to_hades_shore(self) -> None: + self._go_to_dm_lair() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_dm_lair_to_spell_lab_bridge(self) -> None: + self._go_to_dm_lair() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + def test_access_dm_lair_to_subway_monastery(self) -> None: + self._go_to_dm_lair() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_dm_lair_interior_to_dm_lair(self) -> None: + self._go_to_dm_lair_interior() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + def test_access_dm_lair_interior_to_walking_castle(self) -> None: + self._go_to_dm_lair_interior() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.WALKING_CASTLE.value)) + + self._obtain_obidil() + + self.collect_by_name(ZorkGrandInquisitorItems.HOTSPOT_BLINDS.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.WALKING_CASTLE.value)) + + def test_access_dm_lair_interior_to_white_house(self) -> None: + self._go_to_dm_lair_interior() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.WHITE_HOUSE.value)) + + self._obtain_yastard() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_CLOSET_DOOR.value, + ZorkGrandInquisitorItems.SPELL_NARWILE.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.WHITE_HOUSE.value)) + + def test_access_dragon_archipelago_to_dragon_archipelago_dragon(self) -> None: + self._go_to_dragon_archipelago() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEM_GRIFF.value, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_CLAW.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON.value)) + + def test_access_dragon_archipelago_to_hades_beyond_gates(self) -> None: + self._go_to_dragon_archipelago() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_BEYOND_GATES.value)) + + def test_access_dragon_archipelago_dragon_to_dragon_archipelago(self) -> None: + self._go_to_dragon_archipelago_dragon() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO.value)) + + def test_access_dragon_archipelago_dragon_to_endgame(self) -> None: + self._go_to_dragon_archipelago_dragon() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.ENDGAME.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP.value, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT.value, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN.value, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS.value, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH.value, + ) + ) + + self._go_to_port_foozle_past_tavern() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4.value, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY.value, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS.value, + ) + ) + + self._go_to_white_house() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEM_BROG.value, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH.value, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG.value, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT.value, + ZorkGrandInquisitorItems.BROGS_PLANK.value, + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.ENDGAME.value)) + + def test_access_gue_tech_to_crossroads(self) -> None: + self._go_to_gue_tech() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + def test_access_gue_tech_to_gue_tech_hallway(self) -> None: + self._go_to_gue_tech() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_IGRAM.value, + ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY.value)) + + def test_access_gue_tech_to_gue_tech_outside(self) -> None: + self._go_to_gue_tech() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + self.collect_by_name(ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_DOOR.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + def test_access_gue_tech_hallway_to_gue_tech(self) -> None: + self._go_to_gue_tech_hallway() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH.value)) + + def test_access_gue_tech_hallway_to_spell_lab_bridge(self) -> None: + self._go_to_gue_tech_hallway() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.STUDENT_ID.value, + ZorkGrandInquisitorItems.HOTSPOT_STUDENT_ID_MACHINE.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + def test_access_gue_tech_outside_to_crossroads(self) -> None: + self._go_to_gue_tech_outside() + + # Direct connection requires the map but indirect connection is free + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + def test_access_gue_tech_outside_to_dm_lair(self) -> None: + self._go_to_gue_tech_outside() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + def test_access_gue_tech_outside_to_gue_tech(self) -> None: + self._go_to_gue_tech_outside() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH.value)) + + def test_access_gue_tech_outside_to_hades_shore(self) -> None: + self._go_to_gue_tech_outside() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_gue_tech_outside_to_spell_lab_bridge(self) -> None: + self._go_to_gue_tech_outside() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + def test_access_gue_tech_outside_to_subway_monastery(self) -> None: + self._go_to_gue_tech_outside() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_hades_to_hades_beyond_gates(self) -> None: + self._go_to_hades() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_BEYOND_GATES.value)) + + self._obtain_snavig() + + self.collect_by_name(ZorkGrandInquisitorItems.TOTEM_BROG.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_BEYOND_GATES.value)) + + def test_access_hades_to_hades_shore(self) -> None: + self._go_to_hades() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_hades_beyond_gates_to_dragon_archipelago(self) -> None: + self._go_to_hades_beyond_gates() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO.value)) + + self._obtain_yastard() + + self.collect_by_name(ZorkGrandInquisitorItems.SPELL_NARWILE.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO.value)) + + def test_access_hades_beyond_gates_to_hades(self) -> None: + self._go_to_hades_beyond_gates() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES.value)) + + def test_access_hades_shore_to_crossroads(self) -> None: + self._go_to_hades_shore() + + # Direct connection requires the map but indirect connection is free + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + def test_access_hades_shore_to_dm_lair(self) -> None: + self._go_to_hades_shore() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + def test_access_hades_shore_to_gue_tech_outside(self) -> None: + self._go_to_hades_shore() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + def test_access_hades_shore_to_hades(self) -> None: + self._go_to_hades_shore() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER.value, + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS.value, + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES.value)) + + def test_access_hades_shore_to_spell_lab_bridge(self) -> None: + self._go_to_hades_shore() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + def test_access_hades_shore_to_subway_crossroads(self) -> None: + self._go_to_hades_shore() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS.value)) + + def test_access_hades_shore_to_subway_flood_control_dam(self) -> None: + self._go_to_hades_shore() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM.value)) + + self.collect_by_name(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM.value)) + + def test_access_hades_shore_to_subway_monastery(self) -> None: + self._go_to_hades_shore() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + self.collect_by_name(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_monastery_to_hades_shore(self) -> None: + self._go_to_monastery() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL.value, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS.value, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_monastery_to_monastery_exhibit(self) -> None: + self._go_to_monastery() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_HALL_OF_INQUISITION.value, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS.value, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT.value)) + + def test_access_monastery_to_subway_monastery(self) -> None: + self._go_to_monastery() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_monastery_exhibit_to_monastery(self) -> None: + self._go_to_monastery_exhibit() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.MONASTERY.value)) + + def test_access_monastery_exhibit_to_port_foozle_past(self) -> None: + self._go_to_monastery_exhibit() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST.value)) + + self._obtain_yastard() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER.value, + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT.value, + ZorkGrandInquisitorItems.LARGE_TELEGRAPH_HAMMER.value, + ZorkGrandInquisitorItems.SPELL_NARWILE.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST.value)) + + def test_access_port_foozle_to_crossroads(self) -> None: + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR.value, + ZorkGrandInquisitorItems.LANTERN.value, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL.value, + ZorkGrandInquisitorItems.ROPE.value, + ZorkGrandInquisitorItems.HOTSPOT_WELL.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + def test_access_port_foozle_to_port_foozle_jacks_shop(self) -> None: + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE_JACKS_SHOP.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR.value, + ZorkGrandInquisitorItems.LANTERN.value, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE_JACKS_SHOP.value)) + + def test_access_port_foozle_jacks_shop_to_port_foozle(self) -> None: + self._go_to_port_foozle_jacks_shop() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE.value)) + + def test_access_port_foozle_past_to_monastery_exhibit(self) -> None: + self._go_to_port_foozle_past() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.MONASTERY_EXHIBIT.value)) + + def test_access_port_foozle_past_to_port_foozle_past_tavern(self) -> None: + self._go_to_port_foozle_past() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEM_LUCY.value, + ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST_TAVERN.value)) + + def test_access_port_foozle_past_tavern_to_endgame(self) -> None: + self._go_to_port_foozle_past_tavern() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.ENDGAME.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4.value, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY.value, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS.value, + ) + ) + + self._go_to_dragon_archipelago_dragon() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP.value, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT.value, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN.value, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS.value, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH.value, + ) + ) + + self._go_to_white_house() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEM_BROG.value, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH.value, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG.value, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT.value, + ZorkGrandInquisitorItems.BROGS_PLANK.value, + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.ENDGAME.value)) + + def test_access_port_foozle_past_tavern_to_port_foozle_past(self) -> None: + self._go_to_port_foozle_past_tavern() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.PORT_FOOZLE_PAST.value)) + + def test_access_spell_lab_to_spell_lab_bridge(self) -> None: + self._go_to_spell_lab() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB_BRIDGE.value)) + + def test_access_spell_lab_bridge_to_crossroads(self) -> None: + self._go_to_spell_lab_bridge() + + # Direct connection requires the map but indirect connection is free + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + def test_access_spell_lab_bridge_to_dm_lair(self) -> None: + self._go_to_spell_lab_bridge() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR.value)) + + def test_access_spell_lab_bridge_to_gue_tech_outside(self) -> None: + self._go_to_spell_lab_bridge() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE.value)) + + def test_access_spell_lab_bridge_to_gue_tech_hallway(self) -> None: + self._go_to_spell_lab_bridge() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.GUE_TECH_HALLWAY.value)) + + def test_access_spell_lab_bridge_to_hades_shore(self) -> None: + self._go_to_spell_lab_bridge() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_spell_lab_bridge_to_spell_lab(self) -> None: + self._go_to_spell_lab_bridge() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB.value)) + + self._go_to_subway_flood_control_dam() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_REZROV.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS.value, + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE.value, + ZorkGrandInquisitorItems.SPELL_GOLGATEM.value, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SPELL_LAB.value)) + + def test_access_spell_lab_bridge_to_subway_monastery(self) -> None: + self._go_to_spell_lab_bridge() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_subway_crossroads_to_crossroads(self) -> None: + self._go_to_subway_crossroads() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.CROSSROADS.value)) + + def test_access_subway_crossroads_to_hades_shore(self) -> None: + self._go_to_subway_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_KENDALL.value, + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_subway_crossroads_to_subway_flood_control_dam(self) -> None: + self._go_to_subway_crossroads() + + self.assertFalse( + self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM.value) + ) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_KENDALL.value, + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM.value, + ) + ) + + self.assertTrue( + self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM.value) + ) + + def test_access_subway_crossroads_to_subway_monastery(self) -> None: + self._go_to_subway_crossroads() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_KENDALL.value, + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_subway_flood_control_dam_to_hades_shore(self) -> None: + self._go_to_subway_flood_control_dam() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_subway_flood_control_dam_to_subway_crossroads(self) -> None: + self._go_to_subway_flood_control_dam() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS.value)) + + def test_access_subway_flood_control_dam_to_subway_monastery(self) -> None: + self._go_to_subway_flood_control_dam() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + self.collect_by_name(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_MONASTERY.value)) + + def test_access_subway_monastery_to_hades_shore(self) -> None: + self._go_to_subway_monastery() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + self.collect_by_name(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES.value) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.HADES_SHORE.value)) + + def test_access_subway_monastery_to_monastery(self) -> None: + self._go_to_subway_monastery() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.MONASTERY.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.SPELL_GLORF.value, + ZorkGrandInquisitorItems.HOTSPOT_MONASTERY_VENT.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.MONASTERY.value)) + + def test_access_subway_monastery_to_subway_crossroads(self) -> None: + self._go_to_subway_monastery() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_CROSSROADS.value)) + + def test_access_subway_monastery_to_subway_flood_control_dam(self) -> None: + self._go_to_subway_monastery() + + self.assertFalse( + self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM.value) + ) + + self.collect_by_name(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM.value) + + self.assertTrue( + self.can_reach_region(ZorkGrandInquisitorRegions.SUBWAY_FLOOD_CONTROL_DAM.value) + ) + + def test_access_walking_castle_to_dm_lair_interior(self) -> None: + self._go_to_walking_castle() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR.value)) + + def test_access_white_house_to_dm_lair_interior(self) -> None: + self._go_to_white_house() + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR.value)) + + def test_access_white_house_to_endgame(self) -> None: + self._go_to_white_house() + + self.assertFalse(self.can_reach_region(ZorkGrandInquisitorRegions.ENDGAME.value)) + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEM_BROG.value, + ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH.value, + ZorkGrandInquisitorItems.BROGS_GRUE_EGG.value, + ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT.value, + ZorkGrandInquisitorItems.BROGS_PLANK.value, + ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE.value, + ) + ) + + self._go_to_dragon_archipelago_dragon() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP.value, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT.value, + ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN.value, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS.value, + ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH.value, + ) + ) + + self._go_to_port_foozle_past_tavern() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3.value, + ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4.value, + ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY.value, + ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS.value, + ) + ) + + self.assertTrue(self.can_reach_region(ZorkGrandInquisitorRegions.ENDGAME.value)) + + def _go_to_crossroads(self) -> None: + self.collect_by_name( + ( + ZorkGrandInquisitorItems.LANTERN.value, + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR.value, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL.value, + ZorkGrandInquisitorItems.ROPE.value, + ZorkGrandInquisitorItems.HOTSPOT_WELL.value, + ) + ) + + def _go_to_dm_lair(self) -> None: + self._go_to_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE.value, + ) + ) + + def _go_to_dm_lair_interior(self) -> None: + self._go_to_dm_lair() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_ASHTRAY.value, + ZorkGrandInquisitorItems.MEAD_LIGHT.value, + ZorkGrandInquisitorItems.ZIMDOR_SCROLL.value, + ZorkGrandInquisitorItems.HOTSPOT_HARRYS_BIRD_BATH.value, + ) + ) + + def _go_to_dragon_archipelago(self) -> None: + self._go_to_hades_beyond_gates() + self._obtain_yastard() + + self.collect_by_name(ZorkGrandInquisitorItems.SPELL_NARWILE.value) + + def _go_to_dragon_archipelago_dragon(self) -> None: + self._go_to_dragon_archipelago() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEM_GRIFF.value, + ZorkGrandInquisitorItems.HOTSPOT_DRAGON_CLAW.value, + ) + ) + + def _go_to_gue_tech(self) -> None: + self._go_to_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_REZROV.value, + ZorkGrandInquisitorItems.HOTSPOT_IN_MAGIC_WE_TRUST_DOOR.value, + ) + ) + + def _go_to_gue_tech_hallway(self) -> None: + self._go_to_gue_tech() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_IGRAM.value, + ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS.value, + ) + ) + + def _go_to_gue_tech_outside(self) -> None: + self._go_to_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH.value, + ) + ) + + def _go_to_hades(self) -> None: + self._go_to_hades_shore() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER.value, + ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS.value, + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS.value, + ) + ) + + def _go_to_hades_beyond_gates(self) -> None: + self._go_to_hades() + self._obtain_snavig() + + self.collect_by_name(ZorkGrandInquisitorItems.TOTEM_BROG.value) + + def _go_to_hades_shore(self) -> None: + self._go_to_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES.value, + ) + ) + + def _go_to_monastery(self) -> None: + self._go_to_subway_monastery() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.SPELL_GLORF.value, + ZorkGrandInquisitorItems.HOTSPOT_MONASTERY_VENT.value, + ) + ) + + def _go_to_monastery_exhibit(self) -> None: + self._go_to_monastery() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_HALL_OF_INQUISITION.value, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS.value, + ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH.value, + ) + ) + + def _go_to_port_foozle_jacks_shop(self) -> None: + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR.value, + ZorkGrandInquisitorItems.LANTERN.value, + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL.value, + ) + ) + + def _go_to_port_foozle_past(self) -> None: + self._go_to_monastery_exhibit() + + self._obtain_yastard() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER.value, + ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT.value, + ZorkGrandInquisitorItems.LARGE_TELEGRAPH_HAMMER.value, + ZorkGrandInquisitorItems.SPELL_NARWILE.value, + ) + ) + + def _go_to_port_foozle_past_tavern(self) -> None: + self._go_to_port_foozle_past() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.TOTEM_LUCY.value, + ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR.value, + ) + ) + + def _go_to_spell_lab(self) -> None: + self._go_to_subway_flood_control_dam() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_REZROV.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS.value, + ) + ) + + self._go_to_spell_lab_bridge() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE.value, + ZorkGrandInquisitorItems.SPELL_GOLGATEM.value, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM.value, + ) + ) + + def _go_to_spell_lab_bridge(self) -> None: + self._go_to_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB.value, + ) + ) + + def _go_to_subway_crossroads(self) -> None: + self._go_to_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SUBWAY_TOKEN.value, + ZorkGrandInquisitorItems.HOTSPOT_SUBWAY_TOKEN_SLOT.value, + ) + ) + + def _go_to_subway_flood_control_dam(self) -> None: + self._go_to_subway_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_KENDALL.value, + ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM.value, + ) + ) + + def _go_to_subway_monastery(self) -> None: + self._go_to_crossroads() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.MAP.value, + ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY.value, + ) + ) + + def _go_to_white_house(self) -> None: + self._go_to_dm_lair_interior() + + self._obtain_yastard() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.HOTSPOT_CLOSET_DOOR.value, + ZorkGrandInquisitorItems.SPELL_NARWILE.value, + ) + ) + + def _go_to_walking_castle(self) -> None: + self._go_to_dm_lair_interior() + + self._obtain_obidil() + self.collect_by_name(ZorkGrandInquisitorItems.HOTSPOT_BLINDS.value) + + def _obtain_obidil(self) -> None: + self._go_to_crossroads() + self._go_to_gue_tech() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS.value, + ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_COIN_SLOT.value, + ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_DOORS.value, + ) + ) + + self._go_to_subway_flood_control_dam() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_REZROV.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS.value, + ) + ) + + self._go_to_spell_lab_bridge() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE.value, + ZorkGrandInquisitorItems.SPELL_GOLGATEM.value, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM.value, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER.value, + ) + ) + + def _obtain_snavig(self) -> None: + self._go_to_crossroads() + self._go_to_dm_lair_interior() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_ANS.value, + ZorkGrandInquisitorItems.SCROLL_FRAGMENT_GIV.value, + ZorkGrandInquisitorItems.HOTSPOT_MIRROR.value, + ) + ) + + self._go_to_subway_flood_control_dam() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SPELL_REZROV.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS.value, + ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS.value, + ) + ) + + self._go_to_spell_lab_bridge() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.SWORD.value, + ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE.value, + ZorkGrandInquisitorItems.SPELL_GOLGATEM.value, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM.value, + ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER.value, + ) + ) + + def _obtain_yastard(self) -> None: + self._go_to_crossroads() + self._go_to_dm_lair_interior() + + self.collect_by_name( + ( + ZorkGrandInquisitorItems.FLATHEADIA_FUDGE.value, + ZorkGrandInquisitorItems.HUNGUS_LARD.value, + ZorkGrandInquisitorItems.JAR_OF_HOTBUGS.value, + ZorkGrandInquisitorItems.QUELBEE_HONEYCOMB.value, + ZorkGrandInquisitorItems.MOSS_OF_MAREILON.value, + ZorkGrandInquisitorItems.MUG.value, + ) + ) + + +class AccessTestLocations(ZorkGrandInquisitorTestBase): + options = { + "deathsanity": "true", + "start_with_hotspot_items": "false", + } + + def test_access_locations_requiring_brogs_flickering_torch(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_EAT_ROCKS.value, + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.BROGS_FLICKERING_TORCH.value,)] + ) + + def test_access_locations_requiring_brogs_grue_egg(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.BROGS_GRUE_EGG.value,)] + ) + + def test_access_locations_requiring_brogs_plank(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.BROGS_PLANK.value,)] + ) + + def test_access_locations_requiring_flatheadia_fudge(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.FLATHEADIA_FUDGE.value,)] + ) + + def test_access_locations_requiring_griffs_air_pump(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.GRIFFS_AIR_PUMP.value,)] + ) + + def test_access_locations_requiring_griffs_dragon_tooth(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.GRIFFS_DRAGON_TOOTH.value,)] + ) + + def test_access_locations_requiring_griffs_inflatable_raft(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_RAFT.value,)] + ) + + def test_access_locations_requiring_griffs_inflatable_sea_captain(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.GRIFFS_INFLATABLE_SEA_CAPTAIN.value,)] + ) + + def test_access_locations_requiring_hammer(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BOING_BOING_BOING.value, + ZorkGrandInquisitorLocations.BONK.value, + ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON.value, + ZorkGrandInquisitorLocations.IN_CASE_OF_ADVENTURE.value, + ZorkGrandInquisitorLocations.MUSHROOM_HAMMERED.value, + ZorkGrandInquisitorLocations.THROCKED_MUSHROOM_HAMMERED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HAMMER.value,)] + ) + + def test_access_locations_requiring_hungus_lard(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.DEATH_OUTSMARTED_BY_THE_QUELBEES.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HUNGUS_LARD.value,)] + ) + + def test_access_locations_requiring_jar_of_hotbugs(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.JAR_OF_HOTBUGS.value,)] + ) + + def test_access_locations_requiring_lantern(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.LANTERN.value,)] + ) + + def test_access_locations_requiring_large_telegraph_hammer(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.LARGE_TELEGRAPH_HAMMER.value,)] + ) + + def test_access_locations_requiring_lucys_playing_cards(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_1.value,)] + ) + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_2.value,)] + ) + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_3.value,)] + ) + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.LUCYS_PLAYING_CARD_4.value,)] + ) + + def test_access_locations_requiring_map(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.MAP.value,)] + ) + + def test_access_locations_requiring_mead_light(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.MEAD_LIGHT.value, + ZorkGrandInquisitorLocations.WANT_SOME_RYE_COURSE_YA_DO.value, + ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.MEAD_LIGHT.value,)] + ) + + def test_access_locations_requiring_moss_of_mareilon(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.MOSS_OF_MAREILON.value,)] + ) + + def test_access_locations_requiring_mug(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.MUG.value,)] + ) + + def test_access_locations_requiring_old_scratch_card(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_LOST_SOUL_TO_OLD_SCRATCH.value, + ZorkGrandInquisitorLocations.OLD_SCRATCH_WINNER.value, + ZorkGrandInquisitorEvents.ZORKMID_BILL_ACCESSIBLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.OLD_SCRATCH_CARD.value,)] + ) + + def test_access_locations_requiring_perma_suck_machine(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.SUCKING_ROCKS.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.PERMA_SUCK_MACHINE.value,)] + ) + + def test_access_locations_requiring_plastic_six_pack_holder(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.HELP_ME_CANT_BREATHE.value, + ZorkGrandInquisitorLocations.WHAT_ARE_YOU_STUPID.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.PLASTIC_SIX_PACK_HOLDER.value,)] + ) + + def test_access_locations_requiring_pouch_of_zorkmids(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.A_BIG_FAT_SASSY_2_HEADED_MONSTER.value, + ZorkGrandInquisitorLocations.A_LETTER_FROM_THE_WHITE_HOUSE.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DEATH_YOURE_NOT_CHARON.value, + ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY.value, + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.DUNCE_LOCKER.value, + ZorkGrandInquisitorLocations.I_SPIT_ON_YOUR_FILTHY_COINAGE.value, + ZorkGrandInquisitorLocations.NOOOOOOOOOOOOO.value, + ZorkGrandInquisitorLocations.NOW_YOU_LOOK_LIKE_US_WHICH_IS_AN_IMPROVEMENT.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.OPEN_THE_GATES_OF_HELL.value, + ZorkGrandInquisitorLocations.SOUVENIR.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM.value, + ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.POUCH_OF_ZORKMIDS.value,)] + ) + + def test_access_locations_requiring_prozork_tablet(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.PROZORKED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.PROZORK_TABLET.value,)] + ) + + def test_access_locations_requiring_quelbee_honeycomb(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.QUELBEE_HONEYCOMB.value,)] + ) + + def test_access_locations_requiring_rope(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.ALARM_SYSTEM_IS_DOWN.value, + ZorkGrandInquisitorLocations.ARTIFACTS_EXPLAINED.value, + ZorkGrandInquisitorLocations.A_BIG_FAT_SASSY_2_HEADED_MONSTER.value, + ZorkGrandInquisitorLocations.A_LETTER_FROM_THE_WHITE_HOUSE.value, + ZorkGrandInquisitorLocations.A_SMALLWAY.value, + ZorkGrandInquisitorLocations.BEAUTIFUL_THATS_PLENTY.value, + ZorkGrandInquisitorLocations.BEBURTT_DEMYSTIFIED.value, + ZorkGrandInquisitorLocations.BETTER_SPELL_MANUFACTURING_IN_UNDER_10_MINUTES.value, + ZorkGrandInquisitorLocations.BOING_BOING_BOING.value, + ZorkGrandInquisitorLocations.BONK.value, + ZorkGrandInquisitorLocations.BRAVE_SOULS_WANTED.value, + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_EAT_ROCKS.value, + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorLocations.CASTLE_WATCHING_A_FIELD_GUIDE.value, + ZorkGrandInquisitorLocations.CAVES_NOTES.value, + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS.value, + ZorkGrandInquisitorLocations.CRISIS_AVERTED.value, + ZorkGrandInquisitorLocations.DEATH_ATTACKED_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.DEATH_CLIMBED_OUT_OF_THE_WELL.value, + ZorkGrandInquisitorLocations.DEATH_EATEN_BY_A_GRUE.value, + ZorkGrandInquisitorLocations.DEATH_JUMPED_IN_BOTTOMLESS_PIT.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DEATH_OUTSMARTED_BY_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.DEATH_SLICED_UP_BY_THE_INVISIBLE_GUARD.value, + ZorkGrandInquisitorLocations.DEATH_STEPPED_INTO_THE_INFINITE.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DEATH_THROCKED_THE_GRASS.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED_PERMANENTLY.value, + ZorkGrandInquisitorLocations.DEATH_YOURE_NOT_CHARON.value, + ZorkGrandInquisitorLocations.DEATH_ZORK_ROCKS_EXPLODED.value, + ZorkGrandInquisitorLocations.DENIED_BY_THE_LAKE_MONSTER.value, + ZorkGrandInquisitorLocations.DESPERATELY_SEEKING_TUTOR.value, + ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY.value, + ZorkGrandInquisitorLocations.DOOOOOOWN.value, + ZorkGrandInquisitorLocations.DOWN.value, + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.DUNCE_LOCKER.value, + ZorkGrandInquisitorLocations.EGGPLANTS.value, + ZorkGrandInquisitorLocations.EMERGENCY_MAGICATRONIC_MESSAGE.value, + ZorkGrandInquisitorLocations.ENJOY_YOUR_TRIP.value, + ZorkGrandInquisitorLocations.FAT_LOT_OF_GOOD_THATLL_DO_YA.value, + ZorkGrandInquisitorLocations.FLOOD_CONTROL_DAM_3_THE_NOT_REMOTELY_BORING_TALE.value, + ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON.value, + ZorkGrandInquisitorLocations.FROBUARY_3_UNDERGROUNDHOG_DAY.value, + ZorkGrandInquisitorLocations.GETTING_SOME_CHANGE.value, + ZorkGrandInquisitorLocations.GUE_TECH_DEANS_LIST.value, + ZorkGrandInquisitorLocations.GUE_TECH_ENTRANCE_EXAM.value, + ZorkGrandInquisitorLocations.GUE_TECH_HEALTH_MEMO.value, + ZorkGrandInquisitorLocations.GUE_TECH_MAGEMEISTERS.value, + ZorkGrandInquisitorLocations.HAVE_A_HELL_OF_A_DAY.value, + ZorkGrandInquisitorLocations.HELLO_THIS_IS_SHONA_FROM_GURTH_PUBLISHING.value, + ZorkGrandInquisitorLocations.HEY_FREE_DIRT.value, + ZorkGrandInquisitorLocations.HI_MY_NAME_IS_DOUG.value, + ZorkGrandInquisitorLocations.HMMM_INFORMATIVE_YET_DEEPLY_DISTURBING.value, + ZorkGrandInquisitorLocations.HOLD_ON_FOR_AN_IMPORTANT_MESSAGE.value, + ZorkGrandInquisitorLocations.HOW_TO_HYPNOTIZE_YOURSELF.value, + ZorkGrandInquisitorLocations.HOW_TO_WIN_AT_DOUBLE_FANUCCI.value, + ZorkGrandInquisitorLocations.I_DONT_THINK_YOU_WOULDVE_WANTED_THAT_TO_WORK_ANYWAY.value, + ZorkGrandInquisitorLocations.I_SPIT_ON_YOUR_FILTHY_COINAGE.value, + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorLocations.INTO_THE_FOLIAGE.value, + ZorkGrandInquisitorLocations.IN_CASE_OF_ADVENTURE.value, + ZorkGrandInquisitorLocations.IN_MAGIC_WE_TRUST.value, + ZorkGrandInquisitorLocations.INVISIBLE_FLOWERS.value, + ZorkGrandInquisitorLocations.I_HOPE_YOU_CAN_CLIMB_UP_THERE.value, + ZorkGrandInquisitorLocations.I_LIKE_YOUR_STYLE.value, + ZorkGrandInquisitorLocations.LIT_SUNFLOWERS.value, + ZorkGrandInquisitorLocations.MAGIC_FOREVER.value, + ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL.value, + ZorkGrandInquisitorLocations.MAKE_LOVE_NOT_WAR.value, + ZorkGrandInquisitorLocations.MIKES_PANTS.value, + ZorkGrandInquisitorLocations.MUSHROOM_HAMMERED.value, + ZorkGrandInquisitorLocations.NATIONAL_TREASURE.value, + ZorkGrandInquisitorLocations.NATURAL_AND_SUPERNATURAL_CREATURES_OF_QUENDOR.value, + ZorkGrandInquisitorLocations.NO_BONDAGE.value, + ZorkGrandInquisitorLocations.NOOOOOOOOOOOOO.value, + ZorkGrandInquisitorLocations.NOTHIN_LIKE_A_GOOD_STOGIE.value, + ZorkGrandInquisitorLocations.NOW_YOU_LOOK_LIKE_US_WHICH_IS_AN_IMPROVEMENT.value, + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorLocations.OPEN_THE_GATES_OF_HELL.value, + ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.PERMASEAL.value, + ZorkGrandInquisitorLocations.PLEASE_DONT_THROCK_THE_GRASS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.PROZORKED.value, + ZorkGrandInquisitorLocations.REASSEMBLE_SNAVIG.value, + ZorkGrandInquisitorLocations.RESTOCKED_ON_GRUESDAY.value, + ZorkGrandInquisitorLocations.RIGHT_HELLO_YES_UH_THIS_IS_SNEFFLE.value, + ZorkGrandInquisitorLocations.RIGHT_UH_SORRY_ITS_ME_AGAIN_SNEFFLE.value, + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED.value, + ZorkGrandInquisitorLocations.SOUVENIR.value, + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.SUCKING_ROCKS.value, + ZorkGrandInquisitorLocations.TAMING_YOUR_SNAPDRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.THATS_A_ROPE.value, + ZorkGrandInquisitorLocations.THATS_IT_JUST_KEEP_HITTING_THOSE_BUTTONS.value, + ZorkGrandInquisitorLocations.THATS_STILL_A_ROPE.value, + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE.value, + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE.value, + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO.value, + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC.value, + ZorkGrandInquisitorLocations.THE_UNDERGROUND_UNDERGROUND.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.THROCKED_MUSHROOM_HAMMERED.value, + ZorkGrandInquisitorLocations.TIME_TRAVEL_FOR_DUMMIES.value, + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM.value, + ZorkGrandInquisitorLocations.UMBRELLA_FLOWERS.value, + ZorkGrandInquisitorLocations.UP.value, + ZorkGrandInquisitorLocations.USELESS_BUT_FUN.value, + ZorkGrandInquisitorLocations.UUUUUP.value, + ZorkGrandInquisitorLocations.VOYAGE_OF_CAPTAIN_ZAHAB.value, + ZorkGrandInquisitorLocations.WANT_SOME_RYE_COURSE_YA_DO.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorLocations.WHITE_HOUSE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.WOW_IVE_NEVER_GONE_INSIDE_HIM_BEFORE.value, + ZorkGrandInquisitorLocations.YAD_GOHDNUORGREDNU_3_YRAUBORF.value, + ZorkGrandInquisitorLocations.YOU_DONT_GO_MESSING_WITH_A_MANS_ZIPPER.value, + ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS.value, + ZorkGrandInquisitorLocations.YOUR_PUNY_WEAPONS_DONT_PHASE_ME_BABY.value, + ZorkGrandInquisitorEvents.CHARON_CALLED.value, + ZorkGrandInquisitorEvents.DAM_DESTROYED.value, + ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD.value, + ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR.value, + ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ZorkGrandInquisitorEvents.ROPE_GLORFABLE.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.ROPE.value,)] + ) + + def test_access_locations_requiring_scroll_fragment_ans(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.REASSEMBLE_SNAVIG.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SCROLL_FRAGMENT_ANS.value,)] + ) + + def test_access_locations_requiring_scroll_fragment_giv(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.REASSEMBLE_SNAVIG.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SCROLL_FRAGMENT_GIV.value,)] + ) + + def test_access_locations_requiring_shovel(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.HEY_FREE_DIRT.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SHOVEL.value,)] + ) + + def test_access_locations_requiring_snapdragon(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BOING_BOING_BOING.value, + ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SNAPDRAGON.value,)] + ) + + def test_access_locations_requiring_student_id(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.STUDENT_ID.value,)] + ) + + def test_access_locations_requiring_subway_token(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.THE_UNDERGROUND_UNDERGROUND.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SUBWAY_TOKEN.value,)] + ) + + def test_access_locations_requiring_sword(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS.value, + ZorkGrandInquisitorLocations.DEATH_ATTACKED_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED_PERMANENTLY.value, + ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY.value, + ZorkGrandInquisitorLocations.HMMM_INFORMATIVE_YET_DEEPLY_DISTURBING.value, + ZorkGrandInquisitorLocations.I_HOPE_YOU_CAN_CLIMB_UP_THERE.value, + ZorkGrandInquisitorLocations.I_LIKE_YOUR_STYLE.value, + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorLocations.INTO_THE_FOLIAGE.value, + ZorkGrandInquisitorLocations.MAKE_LOVE_NOT_WAR.value, + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.PERMASEAL.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED.value, + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE.value, + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE.value, + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO.value, + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS.value, + ZorkGrandInquisitorLocations.YOUR_PUNY_WEAPONS_DONT_PHASE_ME_BABY.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SWORD.value,)] + ) + + def test_access_locations_requiring_zimdor_scroll(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.WANT_SOME_RYE_COURSE_YA_DO.value, + ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.ZIMDOR_SCROLL.value,)] + ) + + def test_access_locations_requiring_zork_rocks(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.ZORK_ROCKS.value,)] + ) + + def test_access_locations_requiring_hotspot_666_mailbox(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.A_LETTER_FROM_THE_WHITE_HOUSE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_666_MAILBOX.value,)] + ) + + def test_access_locations_requiring_hotspot_alpines_quandry_card_slots(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_ALPINES_QUANDRY_CARD_SLOTS.value,)] + ) + + def test_access_locations_requiring_hotspot_blank_scroll_box(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_BLANK_SCROLL_BOX.value,)] + ) + + def test_access_locations_requiring_hotspot_blinds(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DENIED_BY_THE_LAKE_MONSTER.value, + ZorkGrandInquisitorLocations.WOW_IVE_NEVER_GONE_INSIDE_HIM_BEFORE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_BLINDS.value,)] + ) + + def test_access_locations_requiring_hotspot_candy_machine_buttons(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DUNCE_LOCKER.value, + ZorkGrandInquisitorLocations.NOOOOOOOOOOOOO.value, + ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_BUTTONS.value,)] + ) + + def test_access_locations_requiring_hotspot_candy_machine_coin_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DUNCE_LOCKER.value, + ZorkGrandInquisitorLocations.NOOOOOOOOOOOOO.value, + ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_COIN_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_candy_machine_vacuum_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.SUCKING_ROCKS.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_CANDY_MACHINE_VACUUM_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_change_machine_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.GETTING_SOME_CHANGE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_CHANGE_MACHINE_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_closet_door(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_EAT_ROCKS.value, + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorLocations.DOOOOOOWN.value, + ZorkGrandInquisitorLocations.DOWN.value, + ZorkGrandInquisitorLocations.UP.value, + ZorkGrandInquisitorLocations.UUUUUP.value, + ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL.value, + ZorkGrandInquisitorLocations.WHITE_HOUSE_TIME_TUNNEL.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_CLOSET_DOOR.value,)] + ) + + def test_access_locations_requiring_hotspot_closing_the_time_tunnels_hammer_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_HAMMER_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_closing_the_time_tunnels_lever(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_CLOSING_THE_TIME_TUNNELS_LEVER.value,)] + ) + + def test_access_locations_requiring_hotspot_cooking_pot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_COOKING_POT.value,)] + ) + + def test_access_locations_requiring_hotspot_dented_locker(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.CRISIS_AVERTED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_DENTED_LOCKER.value,)] + ) + + def test_access_locations_requiring_hotspot_dirt_mound(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.HEY_FREE_DIRT.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_DIRT_MOUND.value,)] + ) + + def test_access_locations_requiring_hotspot_dock_winch(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.HELP_ME_CANT_BREATHE.value, + ZorkGrandInquisitorLocations.NO_BONDAGE.value, + ZorkGrandInquisitorLocations.YOU_WANT_A_PIECE_OF_ME_DOCK_BOY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_DOCK_WINCH.value,)] + ) + + def test_access_locations_requiring_hotspot_dragon_claw(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_DRAGON_CLAW.value,)] + ) + + def test_access_locations_requiring_hotspot_dragon_nostrils(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_DRAGON_NOSTRILS.value,)] + ) + + def test_access_locations_requiring_hotspot_dungeon_masters_lair_entrance(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.INTO_THE_FOLIAGE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_DUNGEON_MASTERS_LAIR_ENTRANCE.value,)] + ) + + def test_access_locations_requiring_hotspot_flood_control_buttons(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.NATIONAL_TREASURE.value, + ZorkGrandInquisitorEvents.DAM_DESTROYED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_BUTTONS.value,)] + ) + + def test_access_locations_requiring_hotspot_flood_control_doors(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.NATIONAL_TREASURE.value, + ZorkGrandInquisitorEvents.DAM_DESTROYED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_FLOOD_CONTROL_DOORS.value,)] + ) + + def test_access_locations_requiring_hotspot_frozen_treat_machine_coin_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_COIN_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_frozen_treat_machine_doors(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_FROZEN_TREAT_MACHINE_DOORS.value,)] + ) + + def test_access_locations_requiring_hotspot_glass_case(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.IN_CASE_OF_ADVENTURE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_GLASS_CASE.value,)] + ) + + def test_access_locations_requiring_hotspot_grand_inquisitor_doll(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.ARREST_THE_VANDAL.value, + ZorkGrandInquisitorLocations.DEATH_ARRESTED_WITH_JACK.value, + ZorkGrandInquisitorLocations.FIRE_FIRE.value, + ZorkGrandInquisitorLocations.PLANETFALL.value, + ZorkGrandInquisitorLocations.TALK_TO_ME_GRAND_INQUISITOR.value, + ZorkGrandInquisitorEvents.LANTERN_DALBOZ_ACCESSIBLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL.value,)] + ) + + def test_access_locations_requiring_hotspot_gue_tech_door(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_DOOR.value,)] + ) + + def test_access_locations_requiring_hotspot_gue_tech_grass(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_THROCKED_THE_GRASS.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_GUE_TECH_GRASS.value,)] + ) + + def test_access_locations_requiring_hotspot_hades_phone_buttons(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.A_BIG_FAT_SASSY_2_HEADED_MONSTER.value, + ZorkGrandInquisitorLocations.A_LETTER_FROM_THE_WHITE_HOUSE.value, + ZorkGrandInquisitorLocations.DEATH_YOURE_NOT_CHARON.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY.value, + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.HAVE_A_HELL_OF_A_DAY.value, + ZorkGrandInquisitorLocations.NOW_YOU_LOOK_LIKE_US_WHICH_IS_AN_IMPROVEMENT.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.OPEN_THE_GATES_OF_HELL.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM.value, + ZorkGrandInquisitorEvents.CHARON_CALLED.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_BUTTONS.value,)] + ) + + def test_access_locations_requiring_hotspot_hades_phone_receiver(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.A_BIG_FAT_SASSY_2_HEADED_MONSTER.value, + ZorkGrandInquisitorLocations.A_LETTER_FROM_THE_WHITE_HOUSE.value, + ZorkGrandInquisitorLocations.DEATH_YOURE_NOT_CHARON.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY.value, + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.HAVE_A_HELL_OF_A_DAY.value, + ZorkGrandInquisitorLocations.NOW_YOU_LOOK_LIKE_US_WHICH_IS_AN_IMPROVEMENT.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.OPEN_THE_GATES_OF_HELL.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM.value, + ZorkGrandInquisitorEvents.CHARON_CALLED.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_HADES_PHONE_RECEIVER.value,)] + ) + + def test_access_locations_requiring_hotspot_harry(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.YOUR_PUNY_WEAPONS_DONT_PHASE_ME_BABY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_HARRY.value,)] + ) + + def test_access_locations_requiring_hotspot_harrys_ashtray(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.NOTHIN_LIKE_A_GOOD_STOGIE.value, + ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_HARRYS_ASHTRAY.value,)] + ) + + def test_access_locations_requiring_hotspot_harrys_bird_bath(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.WANT_SOME_RYE_COURSE_YA_DO.value, + ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_HARRYS_BIRD_BATH.value,)] + ) + + def test_access_locations_requiring_hotspot_in_magic_we_trust_door(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.IN_MAGIC_WE_TRUST.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_IN_MAGIC_WE_TRUST_DOOR.value,)] + ) + + def test_access_locations_requiring_hotspot_jacks_door(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.MEAD_LIGHT.value, + ZorkGrandInquisitorLocations.NO_AUTOGRAPHS.value, + ZorkGrandInquisitorLocations.THATS_A_ROPE.value, + ZorkGrandInquisitorLocations.WHAT_ARE_YOU_STUPID.value, + ZorkGrandInquisitorEvents.CIGAR_ACCESSIBLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR.value,)] + ) + + def test_access_locations_requiring_hotspot_loudspeaker_volume_buttons(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.THATS_THE_SPIRIT.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_LOUDSPEAKER_VOLUME_BUTTONS.value,)] + ) + + def test_access_locations_requiring_hotspot_mailbox_door(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL.value, + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_DOOR.value,)] + ) + + def test_access_locations_requiring_hotspot_mailbox_flag(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DOOOOOOWN.value, + ZorkGrandInquisitorLocations.DOWN.value, + ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL.value, + ZorkGrandInquisitorLocations.UP.value, + ZorkGrandInquisitorLocations.UUUUUP.value, + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_MAILBOX_FLAG.value,)] + ) + + def test_access_locations_requiring_hotspot_mirror(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.REASSEMBLE_SNAVIG.value, + ZorkGrandInquisitorLocations.YAD_GOHDNUORGREDNU_3_YRAUBORF.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_MIRROR.value,)] + ) + + def test_access_locations_requiring_hotspot_monastery_vent(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED_PERMANENTLY.value, + ZorkGrandInquisitorLocations.HMMM_INFORMATIVE_YET_DEEPLY_DISTURBING.value, + ZorkGrandInquisitorLocations.I_HOPE_YOU_CAN_CLIMB_UP_THERE.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.PERMASEAL.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE.value, + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE.value, + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO.value, + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_MONASTERY_VENT.value,)] + ) + + def test_access_locations_requiring_hotspot_mossy_grate(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BEAUTIFUL_THATS_PLENTY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_MOSSY_GRATE.value,)] + ) + + def test_access_locations_requiring_hotspot_port_foozle_past_tavern_door(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_PORT_FOOZLE_PAST_TAVERN_DOOR.value,)] + ) + + def test_access_locations_requiring_hotspot_purple_words(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.A_SMALLWAY.value, + ZorkGrandInquisitorLocations.CRISIS_AVERTED.value, + ZorkGrandInquisitorLocations.DEATH_STEPPED_INTO_THE_INFINITE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_PURPLE_WORDS.value,)] + ) + + def test_access_locations_requiring_hotspot_quelbee_hive(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_ATTACKED_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.DEATH_OUTSMARTED_BY_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_QUELBEE_HIVE.value,)] + ) + + def test_access_locations_requiring_hotspot_rope_bridge(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.I_LIKE_YOUR_STYLE.value, + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP.value, + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED.value, + ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_ROPE_BRIDGE.value,)] + ) + + def test_access_locations_requiring_hotspot_skull_cage(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SKULL_CAGE.value,)] + ) + + def test_access_locations_requiring_hotspot_snapdragon(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BONK.value, + ZorkGrandInquisitorLocations.I_DONT_THINK_YOU_WOULDVE_WANTED_THAT_TO_WORK_ANYWAY.value, + ZorkGrandInquisitorLocations.PROZORKED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SNAPDRAGON.value,)] + ) + + def test_access_locations_requiring_hotspot_soda_machine_buttons(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_BUTTONS.value,)] + ) + + def test_access_locations_requiring_hotspot_soda_machine_coin_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SODA_MACHINE_COIN_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_souvenir_coin_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.SOUVENIR.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SOUVENIR_COIN_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_spell_checker(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP.value, + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SPELL_CHECKER.value,)] + ) + + def test_access_locations_requiring_hotspot_spell_lab_chasm(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.I_LIKE_YOUR_STYLE.value, + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP.value, + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SPELL_LAB_CHASM.value,)] + ) + + def test_access_locations_requiring_hotspot_spring_mushroom(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BOING_BOING_BOING.value, + ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON.value, + ZorkGrandInquisitorLocations.MUSHROOM_HAMMERED.value, + ZorkGrandInquisitorLocations.THROCKED_MUSHROOM_HAMMERED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SPRING_MUSHROOM.value,)] + ) + + def test_access_locations_requiring_hotspot_student_id_machine(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_STUDENT_ID_MACHINE.value,)] + ) + + def test_access_locations_requiring_hotspot_subway_token_slot(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.THE_UNDERGROUND_UNDERGROUND.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_SUBWAY_TOKEN_SLOT.value,)] + ) + + def test_access_locations_requiring_hotspot_tavern_fly(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_TAVERN_FLY.value,)] + ) + + def test_access_locations_requiring_hotspot_totemizer_switch(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED_PERMANENTLY.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE.value, + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE.value, + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO.value, + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_SWITCH.value,)] + ) + + def test_access_locations_requiring_hotspot_totemizer_wheels(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE.value, + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE.value, + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO.value, + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_TOTEMIZER_WHEELS.value,)] + ) + + def test_access_locations_requiring_hotspot_well(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.ALARM_SYSTEM_IS_DOWN.value, + ZorkGrandInquisitorLocations.ARTIFACTS_EXPLAINED.value, + ZorkGrandInquisitorLocations.A_BIG_FAT_SASSY_2_HEADED_MONSTER.value, + ZorkGrandInquisitorLocations.A_LETTER_FROM_THE_WHITE_HOUSE.value, + ZorkGrandInquisitorLocations.A_SMALLWAY.value, + ZorkGrandInquisitorLocations.BEAUTIFUL_THATS_PLENTY.value, + ZorkGrandInquisitorLocations.BEBURTT_DEMYSTIFIED.value, + ZorkGrandInquisitorLocations.BETTER_SPELL_MANUFACTURING_IN_UNDER_10_MINUTES.value, + ZorkGrandInquisitorLocations.BOING_BOING_BOING.value, + ZorkGrandInquisitorLocations.BONK.value, + ZorkGrandInquisitorLocations.BRAVE_SOULS_WANTED.value, + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_EAT_ROCKS.value, + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorLocations.CASTLE_WATCHING_A_FIELD_GUIDE.value, + ZorkGrandInquisitorLocations.CAVES_NOTES.value, + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS.value, + ZorkGrandInquisitorLocations.CRISIS_AVERTED.value, + ZorkGrandInquisitorLocations.DEATH_ATTACKED_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.DEATH_CLIMBED_OUT_OF_THE_WELL.value, + ZorkGrandInquisitorLocations.DEATH_EATEN_BY_A_GRUE.value, + ZorkGrandInquisitorLocations.DEATH_JUMPED_IN_BOTTOMLESS_PIT.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DEATH_OUTSMARTED_BY_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.DEATH_SLICED_UP_BY_THE_INVISIBLE_GUARD.value, + ZorkGrandInquisitorLocations.DEATH_STEPPED_INTO_THE_INFINITE.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DEATH_THROCKED_THE_GRASS.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED.value, + ZorkGrandInquisitorLocations.DEATH_TOTEMIZED_PERMANENTLY.value, + ZorkGrandInquisitorLocations.DEATH_YOURE_NOT_CHARON.value, + ZorkGrandInquisitorLocations.DEATH_ZORK_ROCKS_EXPLODED.value, + ZorkGrandInquisitorLocations.DENIED_BY_THE_LAKE_MONSTER.value, + ZorkGrandInquisitorLocations.DESPERATELY_SEEKING_TUTOR.value, + ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY.value, + ZorkGrandInquisitorLocations.DOOOOOOWN.value, + ZorkGrandInquisitorLocations.DOWN.value, + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.DUNCE_LOCKER.value, + ZorkGrandInquisitorLocations.EGGPLANTS.value, + ZorkGrandInquisitorLocations.EMERGENCY_MAGICATRONIC_MESSAGE.value, + ZorkGrandInquisitorLocations.ENJOY_YOUR_TRIP.value, + ZorkGrandInquisitorLocations.FAT_LOT_OF_GOOD_THATLL_DO_YA.value, + ZorkGrandInquisitorLocations.FLOOD_CONTROL_DAM_3_THE_NOT_REMOTELY_BORING_TALE.value, + ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON.value, + ZorkGrandInquisitorLocations.FROBUARY_3_UNDERGROUNDHOG_DAY.value, + ZorkGrandInquisitorLocations.GETTING_SOME_CHANGE.value, + ZorkGrandInquisitorLocations.GUE_TECH_DEANS_LIST.value, + ZorkGrandInquisitorLocations.GUE_TECH_ENTRANCE_EXAM.value, + ZorkGrandInquisitorLocations.GUE_TECH_HEALTH_MEMO.value, + ZorkGrandInquisitorLocations.GUE_TECH_MAGEMEISTERS.value, + ZorkGrandInquisitorLocations.HAVE_A_HELL_OF_A_DAY.value, + ZorkGrandInquisitorLocations.HELLO_THIS_IS_SHONA_FROM_GURTH_PUBLISHING.value, + ZorkGrandInquisitorLocations.HEY_FREE_DIRT.value, + ZorkGrandInquisitorLocations.HI_MY_NAME_IS_DOUG.value, + ZorkGrandInquisitorLocations.HMMM_INFORMATIVE_YET_DEEPLY_DISTURBING.value, + ZorkGrandInquisitorLocations.HOLD_ON_FOR_AN_IMPORTANT_MESSAGE.value, + ZorkGrandInquisitorLocations.HOW_TO_HYPNOTIZE_YOURSELF.value, + ZorkGrandInquisitorLocations.HOW_TO_WIN_AT_DOUBLE_FANUCCI.value, + ZorkGrandInquisitorLocations.I_DONT_THINK_YOU_WOULDVE_WANTED_THAT_TO_WORK_ANYWAY.value, + ZorkGrandInquisitorLocations.I_SPIT_ON_YOUR_FILTHY_COINAGE.value, + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorLocations.INTO_THE_FOLIAGE.value, + ZorkGrandInquisitorLocations.IN_CASE_OF_ADVENTURE.value, + ZorkGrandInquisitorLocations.IN_MAGIC_WE_TRUST.value, + ZorkGrandInquisitorLocations.INVISIBLE_FLOWERS.value, + ZorkGrandInquisitorLocations.I_HOPE_YOU_CAN_CLIMB_UP_THERE.value, + ZorkGrandInquisitorLocations.I_LIKE_YOUR_STYLE.value, + ZorkGrandInquisitorLocations.LIT_SUNFLOWERS.value, + ZorkGrandInquisitorLocations.MAGIC_FOREVER.value, + ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL.value, + ZorkGrandInquisitorLocations.MAKE_LOVE_NOT_WAR.value, + ZorkGrandInquisitorLocations.MIKES_PANTS.value, + ZorkGrandInquisitorLocations.MUSHROOM_HAMMERED.value, + ZorkGrandInquisitorLocations.NATIONAL_TREASURE.value, + ZorkGrandInquisitorLocations.NATURAL_AND_SUPERNATURAL_CREATURES_OF_QUENDOR.value, + ZorkGrandInquisitorLocations.NOOOOOOOOOOOOO.value, + ZorkGrandInquisitorLocations.NOTHIN_LIKE_A_GOOD_STOGIE.value, + ZorkGrandInquisitorLocations.NOW_YOU_LOOK_LIKE_US_WHICH_IS_AN_IMPROVEMENT.value, + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.OH_WOW_TALK_ABOUT_DEJA_VU.value, + ZorkGrandInquisitorLocations.OPEN_THE_GATES_OF_HELL.value, + ZorkGrandInquisitorLocations.OUTSMART_THE_QUELBEES.value, + ZorkGrandInquisitorLocations.PERMASEAL.value, + ZorkGrandInquisitorLocations.PLEASE_DONT_THROCK_THE_GRASS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.PROZORKED.value, + ZorkGrandInquisitorLocations.REASSEMBLE_SNAVIG.value, + ZorkGrandInquisitorLocations.RESTOCKED_ON_GRUESDAY.value, + ZorkGrandInquisitorLocations.RIGHT_HELLO_YES_UH_THIS_IS_SNEFFLE.value, + ZorkGrandInquisitorLocations.RIGHT_UH_SORRY_ITS_ME_AGAIN_SNEFFLE.value, + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED.value, + ZorkGrandInquisitorLocations.SOUVENIR.value, + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.SUCKING_ROCKS.value, + ZorkGrandInquisitorLocations.TAMING_YOUR_SNAPDRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.THATS_IT_JUST_KEEP_HITTING_THOSE_BUTTONS.value, + ZorkGrandInquisitorLocations.THATS_STILL_A_ROPE.value, + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE.value, + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE.value, + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO.value, + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC.value, + ZorkGrandInquisitorLocations.THE_UNDERGROUND_UNDERGROUND.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.THROCKED_MUSHROOM_HAMMERED.value, + ZorkGrandInquisitorLocations.TIME_TRAVEL_FOR_DUMMIES.value, + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM.value, + ZorkGrandInquisitorLocations.UMBRELLA_FLOWERS.value, + ZorkGrandInquisitorLocations.UP.value, + ZorkGrandInquisitorLocations.USELESS_BUT_FUN.value, + ZorkGrandInquisitorLocations.UUUUUP.value, + ZorkGrandInquisitorLocations.VOYAGE_OF_CAPTAIN_ZAHAB.value, + ZorkGrandInquisitorLocations.WANT_SOME_RYE_COURSE_YA_DO.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorLocations.WHITE_HOUSE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.WOW_IVE_NEVER_GONE_INSIDE_HIM_BEFORE.value, + ZorkGrandInquisitorLocations.YAD_GOHDNUORGREDNU_3_YRAUBORF.value, + ZorkGrandInquisitorLocations.YOU_DONT_GO_MESSING_WITH_A_MANS_ZIPPER.value, + ZorkGrandInquisitorLocations.YOU_GAINED_86_EXPERIENCE_POINTS.value, + ZorkGrandInquisitorLocations.YOUR_PUNY_WEAPONS_DONT_PHASE_ME_BABY.value, + ZorkGrandInquisitorEvents.CHARON_CALLED.value, + ZorkGrandInquisitorEvents.DAM_DESTROYED.value, + ZorkGrandInquisitorEvents.DOOR_DRANK_MEAD.value, + ZorkGrandInquisitorEvents.DOOR_SMOKED_CIGAR.value, + ZorkGrandInquisitorEvents.DALBOZ_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.DUNCE_LOCKER_OPENABLE.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_OBIDIL.value, + ZorkGrandInquisitorEvents.HAS_REPAIRABLE_SNAVIG.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ZorkGrandInquisitorEvents.KNOWS_YASTARD.value, + ZorkGrandInquisitorEvents.ROPE_GLORFABLE.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_ACTIVATED.value, + ZorkGrandInquisitorEvents.ZORK_ROCKS_SUCKABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.HOTSPOT_WELL.value,)] + ) + + def test_access_locations_requiring_spell_glorf(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorEvents.ROPE_GLORFABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SPELL_GLORF.value,)] + ) + + def test_access_locations_requiring_spell_golgatem(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DENIED_BY_THE_LAKE_MONSTER.value, + ZorkGrandInquisitorLocations.I_LIKE_YOUR_STYLE.value, + ZorkGrandInquisitorLocations.IMBUE_BEBURTT.value, + ZorkGrandInquisitorLocations.OBIDIL_DRIED_UP.value, + ZorkGrandInquisitorLocations.SNAVIG_REPAIRED.value, + ZorkGrandInquisitorLocations.USELESS_BUT_FUN.value, + ZorkGrandInquisitorEvents.KNOWS_BEBURTT.value, + ZorkGrandInquisitorEvents.KNOWS_OBIDIL.value, + ZorkGrandInquisitorEvents.KNOWS_SNAVIG.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SPELL_GOLGATEM.value,)] + ) + + def test_access_locations_requiring_spell_igram(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.A_SMALLWAY.value, + ZorkGrandInquisitorLocations.CRISIS_AVERTED.value, + ZorkGrandInquisitorLocations.DEATH_STEPPED_INTO_THE_INFINITE.value, + ZorkGrandInquisitorLocations.FAT_LOT_OF_GOOD_THATLL_DO_YA.value, + ZorkGrandInquisitorLocations.INVISIBLE_FLOWERS.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SPELL_IGRAM.value,)] + ) + + def test_access_locations_requiring_spell_kendall(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BEBURTT_DEMYSTIFIED.value, + ZorkGrandInquisitorLocations.ENJOY_YOUR_TRIP.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SPELL_KENDALL.value,)] + ) + + def test_access_locations_requiring_spell_narwile(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_EAT_ROCKS.value, + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DOOOOOOWN.value, + ZorkGrandInquisitorLocations.DOWN.value, + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM.value, + ZorkGrandInquisitorLocations.UP.value, + ZorkGrandInquisitorLocations.UUUUUP.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorLocations.WHITE_HOUSE_TIME_TUNNEL.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ZorkGrandInquisitorEvents.WHITE_HOUSE_LETTER_MAILABLE.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SPELL_NARWILE.value,)] + ) + + def test_access_locations_requiring_spell_rezrov(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.IN_MAGIC_WE_TRUST.value, + ZorkGrandInquisitorLocations.NATIONAL_TREASURE.value, + ZorkGrandInquisitorLocations.YOU_DONT_GO_MESSING_WITH_A_MANS_ZIPPER.value, + ZorkGrandInquisitorEvents.DAM_DESTROYED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SPELL_REZROV.value,)] + ) + + def test_access_locations_requiring_spell_throck(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BEAUTIFUL_THATS_PLENTY.value, + ZorkGrandInquisitorLocations.DEATH_THROCKED_THE_GRASS.value, + ZorkGrandInquisitorLocations.FLYING_SNAPDRAGON.value, + ZorkGrandInquisitorLocations.I_DONT_THINK_YOU_WOULDVE_WANTED_THAT_TO_WORK_ANYWAY.value, + ZorkGrandInquisitorLocations.LIT_SUNFLOWERS.value, + ZorkGrandInquisitorLocations.THROCKED_MUSHROOM_HAMMERED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SPELL_THROCK.value,)] + ) + + def test_access_locations_requiring_subway_destination_flood_control_dam(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BEAUTIFUL_THATS_PLENTY.value, + ZorkGrandInquisitorLocations.FLOOD_CONTROL_DAM_3_THE_NOT_REMOTELY_BORING_TALE.value, + ZorkGrandInquisitorLocations.NATIONAL_TREASURE.value, + ZorkGrandInquisitorLocations.SOUVENIR.value, + ZorkGrandInquisitorLocations.USELESS_BUT_FUN.value, + ZorkGrandInquisitorEvents.DAM_DESTROYED.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_FLOOD_CONTROL_DAM.value,)] + ) + + def test_access_locations_requiring_subway_destination_hades(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_HADES.value,)] + ) + + def test_access_locations_requiring_subway_destination_monastery(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.SUBWAY_DESTINATION_MONASTERY.value,)] + ) + + def test_access_locations_requiring_teleporter_destination_dm_lair(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_DM_LAIR.value,)] + ) + + def test_access_locations_requiring_teleporter_destination_gue_tech(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_GUE_TECH.value,)] + ) + + def test_access_locations_requiring_teleporter_destination_hades(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_HADES.value,)] + ) + + def test_access_locations_requiring_teleporter_destination_monastery(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_MONASTERY.value,)] + ) + + def test_access_locations_requiring_teleporter_destination_spell_lab(self) -> None: + locations: List[str] = list() + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TELEPORTER_DESTINATION_SPELL_LAB.value,)] + ) + + def test_access_locations_requiring_totemizer_destination_hall_of_inquisition(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.CLOSING_THE_TIME_TUNNELS.value, + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.PORT_FOOZLE_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.THE_ALCHEMICAL_DEBACLE.value, + ZorkGrandInquisitorLocations.THE_ENDLESS_FIRE.value, + ZorkGrandInquisitorLocations.THE_FLATHEADIAN_FUDGE_FIASCO.value, + ZorkGrandInquisitorLocations.THE_PERILS_OF_MAGIC.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_HALL_OF_INQUISITION.value,)] + ) + + def test_access_locations_requiring_totemizer_destination_straight_to_hell(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.STRAIGHT_TO_HELL.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TOTEMIZER_DESTINATION_STRAIGHT_TO_HELL.value,)] + ) + + def test_access_locations_requiring_totem_brog(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.BROG_DO_GOOD.value, + ZorkGrandInquisitorLocations.BROG_EAT_ROCKS.value, + ZorkGrandInquisitorLocations.BROG_KNOW_DUMB_THAT_DUMB.value, + ZorkGrandInquisitorLocations.BROG_MUCH_BETTER_AT_THIS_GAME.value, + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.OH_VERY_FUNNY_GUYS.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.UH_OH_BROG_CANT_SWIM.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TOTEM_BROG.value,)] + ) + + def test_access_locations_requiring_totem_griff(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_SWALLOWED_BY_A_DRAGON.value, + ZorkGrandInquisitorLocations.DOOOOOOWN.value, + ZorkGrandInquisitorLocations.OH_DEAR_GOD_ITS_A_DRAGON.value, + ZorkGrandInquisitorLocations.THAR_SHE_BLOWS.value, + ZorkGrandInquisitorLocations.UUUUUP.value, + ZorkGrandInquisitorLocations.WE_DONT_SERVE_YOUR_KIND_HERE.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TOTEM_GRIFF.value,)] + ) + + def test_access_locations_requiring_totem_lucy(self) -> None: + locations: List[str] = [ + ZorkGrandInquisitorLocations.DEATH_LOST_GAME_OF_STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.DOWN.value, + ZorkGrandInquisitorLocations.STRIP_GRUE_FIRE_WATER.value, + ZorkGrandInquisitorLocations.THIS_DOESNT_LOOK_ANYTHING_LIKE_THE_BROCHURE.value, + ZorkGrandInquisitorLocations.UP.value, + ZorkGrandInquisitorLocations.WE_GOT_A_HIGH_ROLLER.value, + ZorkGrandInquisitorEvents.VICTORY.value, + ] + + self.assertAccessDependency( + locations, [(ZorkGrandInquisitorItems.TOTEM_LUCY.value,)] + ) diff --git a/worlds/zork_grand_inquisitor/test/test_data_funcs.py b/worlds/zork_grand_inquisitor/test/test_data_funcs.py new file mode 100644 index 000000000000..9d8d5a4ba356 --- /dev/null +++ b/worlds/zork_grand_inquisitor/test/test_data_funcs.py @@ -0,0 +1,132 @@ +import unittest + +from ..data_funcs import location_access_rule_for, entrance_access_rule_for +from ..enums import ZorkGrandInquisitorLocations, ZorkGrandInquisitorRegions + + +class DataFuncsTest(unittest.TestCase): + def test_location_access_rule_for(self) -> None: + # No Requirements + self.assertEqual( + "lambda state: True", + location_access_rule_for(ZorkGrandInquisitorLocations.ALARM_SYSTEM_IS_DOWN, 1), + ) + + # Single Item Requirement + self.assertEqual( + 'lambda state: state.has("Sword", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.DONT_EVEN_START_WITH_US_SPARKY, 1), + ) + + self.assertEqual( + 'lambda state: state.has("Spell: NARWILE", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.DRAGON_ARCHIPELAGO_TIME_TUNNEL, 1), + ) + + # Single Event Requirement + self.assertEqual( + 'lambda state: state.has("Event: Knows OBIDIL", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.A_BIG_FAT_SASSY_2_HEADED_MONSTER, 1), + ) + + self.assertEqual( + 'lambda state: state.has("Event: Dunce Locker Openable", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.BETTER_SPELL_MANUFACTURING_IN_UNDER_10_MINUTES, 1), + ) + + # Multiple Item Requirements + self.assertEqual( + 'lambda state: state.has("Hotspot: Purple Words", 1) and state.has("Spell: IGRAM", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.A_SMALLWAY, 1), + ) + + self.assertEqual( + 'lambda state: state.has("Hotspot: Mossy Grate", 1) and state.has("Spell: THROCK", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.BEAUTIFUL_THATS_PLENTY, 1), + ) + + # Multiple Item Requirements OR + self.assertEqual( + 'lambda state: (state.has("Totem: Griff", 1) or state.has("Totem: Lucy", 1)) and state.has("Hotspot: Mailbox Door", 1) and state.has("Hotspot: Mailbox Flag", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.MAILED_IT_TO_HELL, 1), + ) + + # Multiple Mixed Requirements + self.assertEqual( + 'lambda state: state.has("Event: Cigar Accessible", 1) and state.has("Hotspot: Grand Inquisitor Doll", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.ARREST_THE_VANDAL, 1), + ) + + self.assertEqual( + 'lambda state: state.has("Sword", 1) and state.has("Event: Rope GLORFable", 1) and state.has("Hotspot: Monastery Vent", 1)', + location_access_rule_for(ZorkGrandInquisitorLocations.I_HOPE_YOU_CAN_CLIMB_UP_THERE, 1), + ) + + def test_entrance_access_rule_for(self) -> None: + # No Requirements + self.assertEqual( + "lambda state: True", + entrance_access_rule_for( + ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.PORT_FOOZLE, 1 + ), + ) + + self.assertEqual( + "lambda state: True", + entrance_access_rule_for( + ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.CROSSROADS, 1 + ), + ) + + # Single Requirement + self.assertEqual( + 'lambda state: (state.has("Map", 1))', + entrance_access_rule_for( + ZorkGrandInquisitorRegions.GUE_TECH_OUTSIDE, ZorkGrandInquisitorRegions.CROSSROADS, 1 + ), + ) + + self.assertEqual( + 'lambda state: (state.has("Map", 1))', + entrance_access_rule_for( + ZorkGrandInquisitorRegions.HADES_SHORE, ZorkGrandInquisitorRegions.CROSSROADS, 1 + ), + ) + + # Multiple Requirements AND + self.assertEqual( + 'lambda state: (state.has("Spell: REZROV", 1) and state.has("Hotspot: In Magic We Trust Door", 1))', + entrance_access_rule_for( + ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.GUE_TECH, 1 + ), + ) + + self.assertEqual( + 'lambda state: (state.has("Event: Door Smoked Cigar", 1) and state.has("Event: Door Drank Mead", 1))', + entrance_access_rule_for( + ZorkGrandInquisitorRegions.DM_LAIR, ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, 1 + ), + ) + + self.assertEqual( + 'lambda state: (state.has("Hotspot: Closet Door", 1) and state.has("Spell: NARWILE", 1) and state.has("Event: Knows YASTARD", 1))', + entrance_access_rule_for( + ZorkGrandInquisitorRegions.DM_LAIR_INTERIOR, ZorkGrandInquisitorRegions.WHITE_HOUSE, 1 + ), + ) + + # Multiple Requirements AND + OR + self.assertEqual( + 'lambda state: (state.has("Sword", 1) and state.has("Hotspot: Dungeon Master\'s Lair Entrance", 1)) or (state.has("Map", 1) and state.has("Teleporter Destination: Dungeon Master\'s Lair", 1))', + entrance_access_rule_for( + ZorkGrandInquisitorRegions.CROSSROADS, ZorkGrandInquisitorRegions.DM_LAIR, 1 + ), + ) + + # Multiple Requirements Regions + self.assertEqual( + 'lambda state: (state.has("Griff\'s Air Pump", 1) and state.has("Griff\'s Inflatable Raft", 1) and state.has("Griff\'s Inflatable Sea Captain", 1) and state.has("Hotspot: Dragon Nostrils", 1) and state.has("Griff\'s Dragon Tooth", 1) and state.can_reach("Port Foozle Past - Tavern", "Region", 1) and state.has("Lucy\'s Playing Card: 1 Pip", 1) and state.has("Lucy\'s Playing Card: 2 Pips", 1) and state.has("Lucy\'s Playing Card: 3 Pips", 1) and state.has("Lucy\'s Playing Card: 4 Pips", 1) and state.has("Hotspot: Tavern Fly", 1) and state.has("Hotspot: Alpine\'s Quandry Card Slots", 1) and state.can_reach("White House", "Region", 1) and state.has("Totem: Brog", 1) and state.has("Brog\'s Flickering Torch", 1) and state.has("Brog\'s Grue Egg", 1) and state.has("Hotspot: Cooking Pot", 1) and state.has("Brog\'s Plank", 1) and state.has("Hotspot: Skull Cage", 1))', + entrance_access_rule_for( + ZorkGrandInquisitorRegions.DRAGON_ARCHIPELAGO_DRAGON, ZorkGrandInquisitorRegions.ENDGAME, 1 + ), + ) diff --git a/worlds/zork_grand_inquisitor/test/test_locations.py b/worlds/zork_grand_inquisitor/test/test_locations.py new file mode 100644 index 000000000000..fa576dd510dc --- /dev/null +++ b/worlds/zork_grand_inquisitor/test/test_locations.py @@ -0,0 +1,49 @@ +from typing import Dict, Set + +from . import ZorkGrandInquisitorTestBase + +from ..data_funcs import location_names_to_location, locations_with_tag +from ..enums import ZorkGrandInquisitorLocations, ZorkGrandInquisitorTags + + +class LocationsTestNoDeathsanity(ZorkGrandInquisitorTestBase): + options = { + "deathsanity": "false", + } + + def test_correct_locations_exist(self) -> None: + expected_locations: Set[ZorkGrandInquisitorLocations] = locations_with_tag( + ZorkGrandInquisitorTags.CORE + ) + + self._assert_expected_locations_exist(expected_locations) + + def _assert_expected_locations_exist(self, expected_locations: Set[ZorkGrandInquisitorLocations]) -> None: + location_name_to_location: Dict[str, ZorkGrandInquisitorLocations] = location_names_to_location() + + for location_object in self.multiworld.get_locations(1): + location: ZorkGrandInquisitorLocations = location_name_to_location.get( + location_object.name + ) + + if location is None: + continue + + self.assertIn(location, expected_locations) + + expected_locations.remove(location) + + self.assertEqual(0, len(expected_locations)) + + +class LocationsTestDeathsanity(LocationsTestNoDeathsanity): + options = { + "deathsanity": "true", + } + + def test_correct_locations_exist(self) -> None: + expected_locations: Set[ZorkGrandInquisitorLocations] = ( + locations_with_tag(ZorkGrandInquisitorTags.CORE) | locations_with_tag(ZorkGrandInquisitorTags.DEATHSANITY) + ) + + self._assert_expected_locations_exist(expected_locations) diff --git a/worlds/zork_grand_inquisitor/world.py b/worlds/zork_grand_inquisitor/world.py new file mode 100644 index 000000000000..2dc634e47d8d --- /dev/null +++ b/worlds/zork_grand_inquisitor/world.py @@ -0,0 +1,206 @@ +from typing import Any, Dict, List, Set, Tuple + +from BaseClasses import Item, ItemClassification, Location, Region, Tutorial + +from worlds.AutoWorld import WebWorld, World + +from .data.item_data import item_data, ZorkGrandInquisitorItemData +from .data.location_data import location_data, ZorkGrandInquisitorLocationData +from .data.region_data import region_data + +from .data_funcs import ( + item_names_to_id, + item_names_to_item, + location_names_to_id, + item_groups, + items_with_tag, + location_groups, + locations_by_region, + location_access_rule_for, + entrance_access_rule_for, +) + +from .enums import ( + ZorkGrandInquisitorEvents, + ZorkGrandInquisitorItems, + ZorkGrandInquisitorLocations, + ZorkGrandInquisitorRegions, + ZorkGrandInquisitorTags, +) + +from .options import ZorkGrandInquisitorOptions + + +class ZorkGrandInquisitorItem(Item): + game = "Zork Grand Inquisitor" + + +class ZorkGrandInquisitorLocation(Location): + game = "Zork Grand Inquisitor" + + +class ZorkGrandInquisitorWebWorld(WebWorld): + theme: str = "stone" + + tutorials: List[Tutorial] = [ + Tutorial( + "Multiworld Setup Guide", + "A guide to setting up the Zork Grand Inquisitor randomizer connected to an Archipelago Multiworld", + "English", + "setup_en.md", + "setup/en", + ["Serpent.AI"], + ) + ] + + +class ZorkGrandInquisitorWorld(World): + """ + Zork: Grand Inquisitor is a 1997 point-and-click adventure game for PC. + Magic has been banned from the great Underground Empire of Zork. By edict of the Grand Inquisitor Mir Yannick, the + Empire has been sealed off and the practice of mystic arts declared punishable by "Totemization" (a very bad thing). + The only way to restore magic to the kingdom is to find three hidden artifacts: The Coconut of Quendor, The Cube of + Foundation, and The Skull of Yoruk. + """ + + options_dataclass = ZorkGrandInquisitorOptions + options: ZorkGrandInquisitorOptions + + game = "Zork Grand Inquisitor" + + item_name_to_id = item_names_to_id() + location_name_to_id = location_names_to_id() + + item_name_groups = item_groups() + location_name_groups = location_groups() + + required_client_version: Tuple[int, int, int] = (0, 4, 4) + + web = ZorkGrandInquisitorWebWorld() + + item_name_to_item: Dict[str, ZorkGrandInquisitorItems] = item_names_to_item() + + def create_regions(self) -> None: + deathsanity: bool = bool(self.options.deathsanity) + + region_mapping: Dict[ZorkGrandInquisitorRegions, Region] = dict() + + region_enum_item: ZorkGrandInquisitorRegions + for region_enum_item in region_data.keys(): + region_mapping[region_enum_item] = Region(region_enum_item.value, self.player, self.multiworld) + + region_locations_mapping: Dict[ZorkGrandInquisitorRegions, Set[ZorkGrandInquisitorLocations]] + region_locations_mapping = locations_by_region(include_deathsanity=deathsanity) + + region_enum_item: ZorkGrandInquisitorRegions + region: Region + for region_enum_item, region in region_mapping.items(): + regions_locations: Set[ZorkGrandInquisitorLocations] = region_locations_mapping[region_enum_item] + + # Locations + location_enum_item: ZorkGrandInquisitorLocations + for location_enum_item in regions_locations: + data: ZorkGrandInquisitorLocationData = location_data[location_enum_item] + + location: ZorkGrandInquisitorLocation = ZorkGrandInquisitorLocation( + self.player, + location_enum_item.value, + data.archipelago_id, + region_mapping[data.region], + ) + + location.event = isinstance(location_enum_item, ZorkGrandInquisitorEvents) + + if location.event: + location.place_locked_item( + ZorkGrandInquisitorItem( + data.event_item_name, + ItemClassification.progression, + None, + self.player, + ) + ) + + location_access_rule: str = location_access_rule_for(location_enum_item, self.player) + + if location_access_rule != "lambda state: True": + location.access_rule = eval(location_access_rule) + + region.locations.append(location) + + # Connections + region_exit: ZorkGrandInquisitorRegions + for region_exit in region_data[region_enum_item].exits or tuple(): + entrance_access_rule: str = entrance_access_rule_for(region_enum_item, region_exit, self.player) + + if entrance_access_rule == "lambda state: True": + region.connect(region_mapping[region_exit]) + else: + region.connect(region_mapping[region_exit], rule=eval(entrance_access_rule)) + + self.multiworld.regions.append(region) + + def create_items(self) -> None: + quick_port_foozle: bool = bool(self.options.quick_port_foozle) + start_with_hotspot_items: bool = bool(self.options.start_with_hotspot_items) + + item_pool: List[ZorkGrandInquisitorItem] = list() + + item: ZorkGrandInquisitorItems + data: ZorkGrandInquisitorItemData + for item, data in item_data.items(): + tags: Tuple[ZorkGrandInquisitorTags, ...] = data.tags or tuple() + + if ZorkGrandInquisitorTags.FILLER in tags: + continue + elif ZorkGrandInquisitorTags.HOTSPOT in tags and start_with_hotspot_items: + continue + + item_pool.append(self.create_item(item.value)) + + total_locations: int = len(self.multiworld.get_unfilled_locations(self.player)) + item_pool += [self.create_filler() for _ in range(total_locations - len(item_pool))] + + self.multiworld.itempool += item_pool + + if quick_port_foozle: + self.multiworld.early_items[self.player][ZorkGrandInquisitorItems.ROPE.value] = 1 + self.multiworld.early_items[self.player][ZorkGrandInquisitorItems.LANTERN.value] = 1 + + if not start_with_hotspot_items: + self.multiworld.early_items[self.player][ZorkGrandInquisitorItems.HOTSPOT_WELL.value] = 1 + self.multiworld.early_items[self.player][ZorkGrandInquisitorItems.HOTSPOT_JACKS_DOOR.value] = 1 + + self.multiworld.early_items[self.player][ + ZorkGrandInquisitorItems.HOTSPOT_GRAND_INQUISITOR_DOLL.value + ] = 1 + + if start_with_hotspot_items: + item: ZorkGrandInquisitorItems + for item in items_with_tag(ZorkGrandInquisitorTags.HOTSPOT): + self.multiworld.push_precollected(self.create_item(item.value)) + + def create_item(self, name: str) -> ZorkGrandInquisitorItem: + data: ZorkGrandInquisitorItemData = item_data[self.item_name_to_item[name]] + + return ZorkGrandInquisitorItem( + name, + data.classification, + data.archipelago_id, + self.player, + ) + + def generate_basic(self) -> None: + self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) + + def fill_slot_data(self) -> Dict[str, Any]: + return self.options.as_dict( + "goal", + "quick_port_foozle", + "start_with_hotspot_items", + "deathsanity", + "grant_missable_location_checks", + ) + + def get_filler_item_name(self) -> str: + return self.random.choice(list(self.item_name_groups["Filler"]))