Customizer option to always allow flipping Sanctuary
This commit is contained in:
@@ -3363,7 +3363,7 @@ def find_inaccessible_regions(world, player):
|
||||
while len(queue) > 0:
|
||||
next_region = queue.popleft()
|
||||
visited_regions.add(next_region)
|
||||
if world.mode[player] == 'inverted' and next_region.name == 'Dark Sanctuary Hint': # special spawn point in cave
|
||||
if world.is_dark_chapel_start(player) and next_region.name == 'Dark Sanctuary Hint': # special spawn point in cave
|
||||
for ent in next_region.entrances:
|
||||
parent = ent.parent_region
|
||||
if parent and parent.type is not RegionType.Dungeon and parent not in queue and parent not in visited_regions:
|
||||
|
||||
@@ -1348,17 +1348,16 @@ def full_shuffle_dungeons(world, Dungeon_Exits, player):
|
||||
|
||||
|
||||
def place_links_house(world, player, ignore_list=[]):
|
||||
invFlag = world.mode[player] == 'inverted'
|
||||
if world.mode[player] == 'standard' or not world.shufflelinks[player]:
|
||||
links_house = 'Links House' if not world.is_bombshop_start(player) else 'Big Bomb Shop'
|
||||
else:
|
||||
if invFlag:
|
||||
if world.is_dark_chapel_start(player):
|
||||
for dark_sanc in world.get_entrance('Dark Sanctuary Hint Exit', player).connected_region.exits:
|
||||
if dark_sanc.connected_region and dark_sanc.connected_region.name == 'Dark Sanctuary Hint':
|
||||
dark_sanc = dark_sanc.name
|
||||
break
|
||||
|
||||
if invFlag and isinstance(dark_sanc, str):
|
||||
if world.is_dark_chapel_start(player) and isinstance(dark_sanc, str):
|
||||
links_house_doors = [i for i in get_distant_entrances(world, dark_sanc, player) if i in entrance_pool]
|
||||
else:
|
||||
links_house_doors = [i for i in get_starting_entrances(world, player, world.shuffle[player] != 'insanity') if i in entrance_pool]
|
||||
@@ -1399,16 +1398,14 @@ def place_dark_sanc(world, player, ignore_list=[]):
|
||||
|
||||
|
||||
def place_blacksmith(world, links_house, player):
|
||||
invFlag = world.mode[player] == 'inverted'
|
||||
|
||||
assumed_inventory = list()
|
||||
if world.logic[player] in ['noglitches', 'minorglitches'] and (world.is_tile_swapped(0x29, player) == invFlag):
|
||||
if world.logic[player] in ['noglitches', 'minorglitches'] and (world.is_tile_swapped(0x29, player) == world.is_dark_chapel_start(player)):
|
||||
assumed_inventory.append('Titans Mitts')
|
||||
|
||||
links_region = world.get_entrance(links_house, player).parent_region.name
|
||||
blacksmith_doors = list(build_accessible_entrance_list(world, links_region, player, assumed_inventory, False, True, True))
|
||||
|
||||
if invFlag:
|
||||
if world.is_dark_chapel_start(player):
|
||||
dark_sanc = world.get_entrance('Dark Sanctuary Hint Exit', player).connected_region.name
|
||||
blacksmith_doors = list(OrderedDict.fromkeys(blacksmith_doors + list(build_accessible_entrance_list(world, dark_sanc, player, assumed_inventory, False, True, True))))
|
||||
elif world.doorShuffle[player] == 'vanilla' or world.intensity[player] < 3:
|
||||
|
||||
@@ -517,7 +517,7 @@ fixed_take_anys = [
|
||||
|
||||
|
||||
def set_up_take_anys(world, player, skip_adjustments=False):
|
||||
if world.mode[player] == 'inverted':
|
||||
if world.is_dark_chapel_start(player):
|
||||
if 'Dark Sanctuary Hint' in take_any_locations:
|
||||
take_any_locations.remove('Dark Sanctuary Hint')
|
||||
if world.is_tile_swapped(0x29, player):
|
||||
|
||||
@@ -1076,7 +1076,7 @@ def shuffle_tiles(world, groups, result_list, do_grouped, forced_flips, player):
|
||||
attempts -= 1
|
||||
continue
|
||||
# ensure sanc can be placed in LW in certain modes
|
||||
if not do_grouped and world.shuffle[player] in ['simple', 'restricted', 'full', 'district'] and world.mode[player] != 'inverted' and (world.doorShuffle[player] != 'crossed' or world.intensity[player] < 3 or world.mode[player] == 'standard'):
|
||||
if not do_grouped and world.shuffle[player] in ['simple', 'restricted', 'full', 'district'] and not world.is_dark_chapel_start(player) and (world.doorShuffle[player] != 'crossed' or world.intensity[player] < 3 or world.mode[player] == 'standard'):
|
||||
free_dw_drops = parity[5] + (1 if world.shuffle_ganon[player] else 0)
|
||||
free_drops = 6 + (1 if world.mode[player] != 'standard' else 0) + (1 if world.shuffle_ganon[player] else 0)
|
||||
if free_dw_drops == free_drops:
|
||||
@@ -1130,7 +1130,7 @@ def define_tile_groups(world, do_grouped, player):
|
||||
# sanctuary/chapel should not be flipped if S+Q guaranteed to output on that screen
|
||||
if 0x13 in group and not allow_flip_sanc and ((world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull', 'district'] \
|
||||
and (world.mode[player] in ['standard', 'inverted'] or world.doorShuffle[player] not in ['partitioned', 'crossed'] \
|
||||
or world.intensity[player] < 3)) or (world.shuffle[player] in ['lite', 'lean'] and world.mode[player] == 'inverted')):
|
||||
or world.intensity[player] < 3)) or (world.shuffle[player] in ['lite', 'lean'] and world.is_dark_chapel_start(player))):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
@@ -383,7 +383,6 @@ def create_regions(world, player):
|
||||
|
||||
def create_dungeon_regions(world, player):
|
||||
std_flag = world.mode[player] == 'standard'
|
||||
inv_flag = world.mode[player] == 'inverted'
|
||||
world.regions += [
|
||||
create_dungeon_region(player, 'Sanctuary Portal', 'Hyrule Castle', None, ['Sanctuary Exit', 'Enter HC (Sanc)']),
|
||||
create_dungeon_region(player, 'Hyrule Castle West Portal', 'Hyrule Castle', None, ['Hyrule Castle Exit (West)', 'Enter HC (West)']),
|
||||
|
||||
@@ -200,7 +200,10 @@ def do_vanilla_connections(avail_pool):
|
||||
connect_vanilla_two_way(ent, avail_pool.default_map[ent], avail_pool)
|
||||
if ent in avail_pool.one_way_map and avail_pool.one_way_map[ent] in avail_pool.exits:
|
||||
connect_vanilla(ent, avail_pool.one_way_map[ent], avail_pool)
|
||||
if avail_pool.inverted:
|
||||
if avail_pool.world.is_bombshop_start(avail_pool.player):
|
||||
ext = avail_pool.world.get_entrance('Big Bomb Shop Exit', avail_pool.player)
|
||||
ext.connect(avail_pool.world.get_region('Big Bomb Shop Area', avail_pool.player))
|
||||
if avail_pool.world.is_dark_chapel_start(avail_pool.player):
|
||||
ext = avail_pool.world.get_entrance('Dark Sanctuary Hint Exit', avail_pool.player)
|
||||
ext.connect(avail_pool.world.get_region('Dark Chapel Area', avail_pool.player))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user