Actually restrict Sanctuary from being a DW lobby in non-crossed ER modes

This commit is contained in:
aerinon
2021-05-17 13:41:32 -06:00
parent 9f877d8811
commit 8f00f7969b
5 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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]:

View File

@@ -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'

View File

@@ -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):

View File

@@ -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