More ER support added
This commit is contained in:
112
DoorShuffle.py
112
DoorShuffle.py
@@ -345,7 +345,7 @@ def find_enabled_origins(sectors, enabled, entrance_list):
|
|||||||
|
|
||||||
|
|
||||||
def remove_drop_origins(entrance_list):
|
def remove_drop_origins(entrance_list):
|
||||||
entrance_list[:] = [x for x in entrance_list if x not in drop_entrances]
|
return [x for x in entrance_list if x not in drop_entrances]
|
||||||
|
|
||||||
|
|
||||||
def find_new_entrances(sector, connections, potentials, enabled):
|
def find_new_entrances(sector, connections, potentials, enabled):
|
||||||
@@ -1213,61 +1213,65 @@ def determine_required_paths(world):
|
|||||||
|
|
||||||
|
|
||||||
def overworld_prep(world, player):
|
def overworld_prep(world, player):
|
||||||
|
find_inaccessible_regions(world, player)
|
||||||
|
add_inaccessible_doors(world, player)
|
||||||
|
|
||||||
|
|
||||||
|
# todo : multiplayer?
|
||||||
|
def find_inaccessible_regions(world, player):
|
||||||
if world.mode != 'inverted':
|
if world.mode != 'inverted':
|
||||||
if world.mode == 'standard':
|
start_regions = ['Links House', 'Sanctuary']
|
||||||
world.inaccessible_regions.append('Hyrule Castle Ledge') # maybe only with er off
|
|
||||||
world.inaccessible_regions.append('Sewer Drop')
|
|
||||||
world.inaccessible_regions.append('Skull Woods Forest (West)')
|
|
||||||
world.inaccessible_regions.append('Dark Death Mountain Ledge')
|
|
||||||
world.inaccessible_regions.append('Dark Death Mountain Isolated Ledge')
|
|
||||||
world.inaccessible_regions.append('Desert Palace Lone Stairs')
|
|
||||||
world.inaccessible_regions.append('Bumper Cave Ledge')
|
|
||||||
world.inaccessible_regions.append('Death Mountain Floating Island (Dark World)')
|
|
||||||
else:
|
else:
|
||||||
world.inaccessible_regions.append('Desert Ledge')
|
start_regions = ['Inverted Links House', 'Inverted Dark Sanctuary']
|
||||||
# world.inaccessible_regions.append('Hyrule Castle Ledge') # accessible via aga 1?
|
regs = convert_regions(start_regions, world, player)
|
||||||
world.inaccessible_regions.append('Desert Palace Lone Stairs')
|
all_regions = set([r for r in world.regions if r.player == player and r.type is not RegionType.Dungeon])
|
||||||
world.inaccessible_regions.append('Death Mountain Return Ledge')
|
visited_regions = set()
|
||||||
world.inaccessible_regions.append('Maze Race Ledge')
|
queue = collections.deque(regs)
|
||||||
if world.shuffle == 'vanilla':
|
while len(queue) > 0:
|
||||||
skull_doors = [
|
next_region = queue.popleft()
|
||||||
Door(player, 'Skull Woods Second Section Exit (West)', DoorType.Logical),
|
visited_regions.add(next_region)
|
||||||
Door(player, 'Skull Woods Second Section Door (West)', DoorType.Logical),
|
for ext in next_region.exits:
|
||||||
Door(player, 'Skull Woods Second Section Hole', DoorType.Logical),
|
connect = ext.connected_region
|
||||||
Door(player, 'Skull Woods Final Section', DoorType.Logical)
|
if connect is not None and connect.type is not RegionType.Dungeon and connect not in queue and connect not in visited_regions:
|
||||||
]
|
queue.append(connect)
|
||||||
world.doors += skull_doors
|
world.inaccessible_regions.extend([r.name for r in all_regions.difference(visited_regions) if r.type is not RegionType.Cave])
|
||||||
connect_door_only(world, skull_doors[0].name, 'Skull Woods Forest (West)', player)
|
logger = logging.getLogger('')
|
||||||
connect_door_only(world, skull_doors[1].name, 'Skull 2 West Lobby', player)
|
logger.info('Inaccessible Regions:')
|
||||||
connect_door_only(world, skull_doors[2].name, 'Skull Back Drop', player)
|
for r in world.inaccessible_regions:
|
||||||
connect_door_only(world, skull_doors[3].name, 'Skull 3 Lobby', player)
|
logger.info('%s', r)
|
||||||
tr_doors = [
|
|
||||||
Door(player, 'Turtle Rock Ledge Exit (West)', DoorType.Logical),
|
|
||||||
Door(player, 'Turtle Rock Ledge Exit (East)', DoorType.Logical),
|
def add_inaccessible_doors(world, player):
|
||||||
Door(player, 'Dark Death Mountain Ledge (East)', DoorType.Logical),
|
if 'Skull Woods Forest (West)' in world.inaccessible_regions:
|
||||||
Door(player, 'Dark Death Mountain Ledge (West)', DoorType.Logical),
|
create_door(world, player, 'Skull Woods Second Section Door (West)', 'Skull Woods Forest (West)')
|
||||||
Door(player, 'Turtle Rock Isolated Ledge Exit', DoorType.Logical),
|
create_door(world, player, 'Skull Woods Second Section Hole', 'Skull Woods Forest (West)')
|
||||||
Door(player, 'Turtle Rock Isolated Ledge Entrance', DoorType.Logical),
|
create_door(world, player, 'Skull Woods Final Section', 'Skull Woods Forest (West)')
|
||||||
]
|
if 'Dark Death Mountain Ledge' in world.inaccessible_regions:
|
||||||
world.doors += tr_doors
|
create_door(world, player, 'Dark Death Mountain Ledge (East)', 'Dark Death Mountain Ledge')
|
||||||
connect_door_only(world, tr_doors[0].name, 'Dark Death Mountain Ledge', player)
|
create_door(world, player, 'Dark Death Mountain Ledge (West)', 'Dark Death Mountain Ledge')
|
||||||
connect_door_only(world, tr_doors[1].name, 'Dark Death Mountain Ledge', player)
|
create_door(world, player, 'Mimic Cave Mirror Spot', 'Dark Death Mountain Ledge')
|
||||||
connect_door_only(world, tr_doors[2].name, 'TR Big Chest Entrance', player)
|
if 'Mimic Cave Ledge' in world.inaccessible_regions:
|
||||||
connect_door_only(world, tr_doors[3].name, 'TR Lazy Eyes', player)
|
create_door(world, player, 'Mimic Cave', 'Mimic Cave Ledge')
|
||||||
connect_door_only(world, tr_doors[4].name, 'Dark Death Mountain Isolated Ledge', player)
|
if 'Dark Death Mountain Isolated Ledge' in world.inaccessible_regions:
|
||||||
connect_door_only(world, tr_doors[5].name, 'TR Eye Bridge', player)
|
create_door(world, player, 'Turtle Rock Isolated Ledge Entrance', 'Dark Death Mountain Isolated Ledge')
|
||||||
if world.mode == 'standard':
|
if 'Death Mountain Floating Island (Dark World)' in world.inaccessible_regions:
|
||||||
castle_doors = [
|
create_door(world, player, 'Hookshot Cave Back Entrance', 'Death Mountain Floating Island (Dark World)')
|
||||||
Door(player, 'Hyrule Castle Exit (West)', DoorType.Logical),
|
# todo: desert palace lone stairs
|
||||||
Door(player, 'Hyrule Castle Exit (East)', DoorType.Logical),
|
if world.mode == 'standard' and 'Hyrule Castle Ledge' in world.inaccessible_regions:
|
||||||
Door(player, 'Hyrule Castle Entrance (East)', DoorType.Logical),
|
create_door(world, player, 'Hyrule Castle Entrance (East)', 'Hyrule Castle Ledge')
|
||||||
Door(player, 'Hyrule Castle Entrance (West)', DoorType.Logical)
|
create_door(world, player, 'Hyrule Castle Entrance (West)', 'Hyrule Castle Ledge')
|
||||||
]
|
|
||||||
world.doors += castle_doors
|
|
||||||
connect_door_only(world, castle_doors[0].name, 'Hyrule Castle Ledge', player)
|
def create_door(world, player, entName, region_name):
|
||||||
connect_door_only(world, castle_doors[1].name, 'Hyrule Castle Ledge', player)
|
connect = world.get_entrance(entName, player).connected_region
|
||||||
connect_door_only(world, castle_doors[2].name, 'Hyrule Castle East Lobby', player)
|
for ext in connect.exits:
|
||||||
connect_door_only(world, castle_doors[3].name, 'Hyrule Castle West Lobby', player)
|
if ext.connected_region is not None and ext.connected_region.name == region_name:
|
||||||
|
d = Door(player, ext.name, DoorType.Logical),
|
||||||
|
world.doors += d
|
||||||
|
connect_door_only(world, ext.name, ext.connected_region, player)
|
||||||
|
d = Door(player, entName, DoorType.Logical),
|
||||||
|
world.doors += d
|
||||||
|
connect_door_only(world, entName, connect, player)
|
||||||
|
|
||||||
|
|
||||||
def check_required_paths(paths, world, player):
|
def check_required_paths(paths, world, player):
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ flexible_starts = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
drop_entrances = [
|
drop_entrances = [
|
||||||
'Sewers Rat Path', 'Skull Pinball', 'Skull Left Drop', 'Skull Back Drop' # Pot circle is unique
|
'Sewers Rat Path', 'Skull Pinball', 'Skull Left Drop' # Pot circle, Back drop have unique access
|
||||||
]
|
]
|
||||||
|
|
||||||
dungeon_keys = {
|
dungeon_keys = {
|
||||||
|
|||||||
Reference in New Issue
Block a user