From cfc9d79c79fc49e43c09ffd69f179fca9be0f057 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sat, 23 Jul 2022 12:42:14 +0200 Subject: [PATCH] The Witness: Small changes in response to beta tests (#801) * Option order and better tooltip * Logic fix: Hedge Laser requires access to all Hedges * Add item groups: Lasers, Symbols, Doors * Update worlds/witness/items.py Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> * Comment for clarity * Logic fix * Another logic fix Co-authored-by: metzner Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> --- worlds/witness/Options.py | 7 ++++--- worlds/witness/WitnessItems.txt | 4 ++-- worlds/witness/WitnessLogic.txt | 2 +- worlds/witness/__init__.py | 1 + worlds/witness/items.py | 12 +++++++++++- worlds/witness/settings/Disable_Unrandomized.txt | 3 ++- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/worlds/witness/Options.py b/worlds/witness/Options.py index 2bfe3f41..631a5bc0 100644 --- a/worlds/witness/Options.py +++ b/worlds/witness/Options.py @@ -36,7 +36,8 @@ class ShuffleLasers(Toggle): class ShuffleDoors(Choice): """If on, opening doors will require their respective "keys". If set to "panels", those keys will unlock the panels on doors. - In "doors_simple" and "doors_complex", the doors will magically open by themselves upon receiving the key.""" + In "doors_simple" and "doors_complex", the doors will magically open by themselves upon receiving the key. + The last option, "max", is a combination of "doors_complex" and "panels".""" display_name = "Shuffle Doors" option_none = 0 option_panels = 1 @@ -124,10 +125,10 @@ the_witness_options: Dict[str, type] = { "shuffle_uncommon": ShuffleUncommonLocations, "shuffle_postgame": ShufflePostgame, "victory_condition": VictoryCondition, - "trap_percentage": TrapPercentage, - "early_secret_area": EarlySecretArea, "mountain_lasers": MountainLasers, "challenge_lasers": ChallengeLasers, + "early_secret_area": EarlySecretArea, + "trap_percentage": TrapPercentage, "puzzle_skip_amount": PuzzleSkipAmount, } diff --git a/worlds/witness/WitnessItems.txt b/worlds/witness/WitnessItems.txt index 5631ab2f..44496025 100644 --- a/worlds/witness/WitnessItems.txt +++ b/worlds/witness/WitnessItems.txt @@ -173,8 +173,8 @@ Doors: 1906 - Symmetry Island Doors - 0x17F3E,0x18269 1909 - Orchard Gates - 0x03313,0x03307 1912 - Desert Doors - 0x09FEE,0x0C2C3,0x0A24B,0x0C316 -1915 - Quarry Main Entry - 0x09D6F -1918 - Quarry Mill Shortcuts - 0x17C07,0x17CE8,0x0368A +1915 - Quarry Main Entry - 0x09D6F,0x17C07 +1918 - Quarry Mill Shortcuts - 0x17CE8,0x0368A,0x275FF 1921 - Quarry Boathouse Barriers - 0x17C50,0x3865F 1924 - Shadows Laser Room Door - 0x194B2,0x19665 1927 - Shadows Barriers - 0x19865,0x0A2DF,0x1855B,0x19ADE diff --git a/worlds/witness/WitnessLogic.txt b/worlds/witness/WitnessLogic.txt index 350f72b6..a4cdd9f1 100644 --- a/worlds/witness/WitnessLogic.txt +++ b/worlds/witness/WitnessLogic.txt @@ -354,7 +354,7 @@ Shipwreck (Shipwreck) - Keep 3rd Pressure Plate - True: Keep Tower (Keep) - Keep - 0x04F8F: 158206 - 0x0361B (Tower Shortcut to Keep Panel) - True - True Door - 0x04F8F (Tower Shortcut to Keep) - 0x0361B -158704 - 0x0360E (Laser Panel Hedges) - 0x01A0F - Environment & Sound +158704 - 0x0360E (Laser Panel Hedges) - 0x01A0F & 0x019E7 & 0x019DC & 0x00139 - Environment & Sound 158705 - 0x03317 (Laser Panel Pressure Plates) - 0x01D3F - Shapers & Squares & Black/White Squares & Colored Squares & Stars & Stars + Same Colored Symbol & Dots Laser - 0x014BB (Laser) - 0x0360E | 0x03317 diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index 01669cff..da6683b5 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -47,6 +47,7 @@ class WitnessWorld(World): name: data.code for name, data in static_items.ALL_ITEM_TABLE.items() } location_name_to_id = StaticWitnessLocations.ALL_LOCATIONS_TO_ID + item_name_groups = StaticWitnessItems.ITEM_NAME_GROUPS def _get_slot_data(self): return { diff --git a/worlds/witness/items.py b/worlds/witness/items.py index 65a83269..9ffd5a11 100644 --- a/worlds/witness/items.py +++ b/worlds/witness/items.py @@ -2,7 +2,7 @@ Defines progression, junk and event items for The Witness """ import copy -from typing import Dict, NamedTuple, Optional +from typing import Dict, NamedTuple, Optional, Set from BaseClasses import Item, MultiWorld from . import StaticWitnessLogic, WitnessPlayerLocations, WitnessPlayerLogic @@ -35,6 +35,8 @@ class StaticWitnessItems: ALL_ITEM_TABLE: Dict[str, ItemData] = {} + ITEM_NAME_GROUPS: Dict[str, Set[str]] = dict() + # These should always add up to 1!!! BONUS_WEIGHTS = { "Speed Boost": Fraction(1, 1), @@ -57,9 +59,17 @@ class StaticWitnessItems: item_tab[item[0]] = ItemData(158000 + item[1], True, False) + self.ITEM_NAME_GROUPS.setdefault("Symbols", set()).add(item[0]) + for item in StaticWitnessLogic.ALL_DOOR_ITEMS: item_tab[item[0]] = ItemData(158000 + item[1], True, False) + # 1500 - 1510 are the laser items, which are handled like doors but should be their own separate group. + if item[1] in range(1500, 1511): + self.ITEM_NAME_GROUPS.setdefault("Lasers", set()).add(item[0]) + else: + self.ITEM_NAME_GROUPS.setdefault("Doors", set()).add(item[0]) + for item in StaticWitnessLogic.ALL_TRAPS: item_tab[item[0]] = ItemData( 158000 + item[1], False, False, True diff --git a/worlds/witness/settings/Disable_Unrandomized.txt b/worlds/witness/settings/Disable_Unrandomized.txt index 6f957ada..43c25964 100644 --- a/worlds/witness/settings/Disable_Unrandomized.txt +++ b/worlds/witness/settings/Disable_Unrandomized.txt @@ -82,7 +82,8 @@ Disabled Locations: 0x002C7 (Waves 7) 0x15ADD (River Rhombic Avoid Vault) 0x03702 (River Vault Box) -0x17C2E (Door to Bunker) - True - Squares & Black/White Squares +0x17CAA (Rhombic Avoid to Monastery Garden) +0x17C2E (Door to Bunker) 0x09F7D (Bunker Drawn Squares 1) 0x09FDC (Bunker Drawn Squares 2) 0x09FF7 (Bunker Drawn Squares 3)