From 8f00f7969b81cca68d1f01cfa4b92047536853b7 Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 17 May 2021 13:41:32 -0600 Subject: [PATCH] Actually restrict Sanctuary from being a DW lobby in non-crossed ER modes --- BaseClasses.py | 1 + DoorShuffle.py | 3 +++ Doors.py | 2 ++ Main.py | 2 +- RELEASENOTES.md | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/BaseClasses.py b/BaseClasses.py index 36437715..411e9438 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1280,6 +1280,7 @@ class Door(object): self.dungeonLink = None self.bk_shuffle_req = False self.standard_restricted = False # flag if portal is not allowed in HC in standard + self.lw_restricted = False # flag if portal is not allowed in DW # self.incognitoPos = -1 # self.sectorLink = False diff --git a/DoorShuffle.py b/DoorShuffle.py index 1b505377..5c1285a9 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -563,6 +563,9 @@ def assign_portal(candidates, possible_portals, world, player): candidate = random.choice(candidates) portal_choice = random.choice(possible_portals) portal = world.get_portal(portal_choice, player) + while candidate.lw_restricted and not portal.light_world: + candidates.remove(candidate) + candidate = random.choice(candidates) if candidate != portal.door: if candidate.entranceFlag: for other_portal in world.dungeon_portals[player]: diff --git a/Doors.py b/Doors.py index 5f20d285..eb824fb1 100644 --- a/Doors.py +++ b/Doors.py @@ -1465,6 +1465,8 @@ def create_doors(world, player): # static portal flags world.get_door('Sanctuary S', player).dead_end(allowPassage=True) + if world.mode[player] == 'open' and world.shuffle[player] not in ['crossed', 'insanity']: + world.get_door('Sanctuary S', player).lw_restricted = True world.get_door('Eastern Hint Tile Blocked Path SE', player).passage = False world.get_door('TR Big Chest Entrance SE', player).passage = False world.get_door('Sewers Secret Room Key Door S', player).dungeonLink = 'Hyrule Castle' diff --git a/Main.py b/Main.py index c1f01cc2..4064b27d 100644 --- a/Main.py +++ b/Main.py @@ -27,7 +27,7 @@ from Fill import sell_potions, sell_keys, balance_multiworld_progression, balanc from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops from Utils import output_path, parse_player_names -__version__ = '0.4.0.2-u' +__version__ = '0.4.0.3-u' class EnemizerError(RuntimeError): diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4873d28c..d3057c15 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -6,6 +6,8 @@ Thanks to qadan, cheuer, & compiling # Bug Fixes and Notes. +* 0.4.0.3 + * Fixed a bug where Sanctuary could be chosen as a lobby for a DW dungeon in non-crossed ER modes * 0.4.0.2 * Fixed a bug where Defeat Ganon is not possible * Fixed the item counter total