Only start at Big Bomb Shop if not ER
This commit is contained in:
@@ -304,6 +304,9 @@ class World(object):
|
|||||||
def is_tile_swapped(self, owid, player):
|
def is_tile_swapped(self, owid, player):
|
||||||
return (self.mode[player] == 'inverted') != (owid in self.owswaps[player][0] and self.owMixed[player])
|
return (self.mode[player] == 'inverted') != (owid in self.owswaps[player][0] and self.owMixed[player])
|
||||||
|
|
||||||
|
def is_bombshop_start(self, player):
|
||||||
|
return self.is_tile_swapped(0x2c, player) and (self.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull'] or not self.shufflelinks[player])
|
||||||
|
|
||||||
def check_for_door(self, doorname, player):
|
def check_for_door(self, doorname, player):
|
||||||
if isinstance(doorname, Door):
|
if isinstance(doorname, Door):
|
||||||
return doorname
|
return doorname
|
||||||
|
|||||||
+3
-3
@@ -1815,7 +1815,7 @@ def remove_pair_type_if_present(door, world, player):
|
|||||||
|
|
||||||
def find_inaccessible_regions(world, player):
|
def find_inaccessible_regions(world, player):
|
||||||
world.inaccessible_regions[player] = []
|
world.inaccessible_regions[player] = []
|
||||||
start_regions = ['Links House' if not world.is_tile_swapped(0x2c, player) else 'Big Bomb Shop', 'Sanctuary' if world.mode[player] != 'inverted' else 'Dark Sanctuary Hint']
|
start_regions = ['Links House' if not world.is_bombshop_start(player) else 'Big Bomb Shop', 'Sanctuary' if world.mode[player] != 'inverted' else 'Dark Sanctuary Hint']
|
||||||
regs = convert_regions(start_regions, world, player)
|
regs = convert_regions(start_regions, world, player)
|
||||||
all_regions = [r for r in world.regions if r.player == player and r.type is not RegionType.Dungeon]
|
all_regions = [r for r in world.regions if r.player == player and r.type is not RegionType.Dungeon]
|
||||||
visited_regions = set()
|
visited_regions = set()
|
||||||
@@ -1851,7 +1851,7 @@ def find_accessible_entrances(world, player, builder):
|
|||||||
if world.mode[player] == 'standard' and builder.name == 'Hyrule Castle':
|
if world.mode[player] == 'standard' and builder.name == 'Hyrule Castle':
|
||||||
start_regions = ['Hyrule Castle Courtyard']
|
start_regions = ['Hyrule Castle Courtyard']
|
||||||
else:
|
else:
|
||||||
start_regions = ['Links House' if not world.is_tile_swapped(0x2c, player) else 'Big Bomb Shop', 'Sanctuary' if world.mode[player] != 'inverted' else 'Dark Sanctuary Hint']
|
start_regions = ['Links House' if not world.is_bombshop_start(player) else 'Big Bomb Shop', 'Sanctuary' if world.mode[player] != 'inverted' else 'Dark Sanctuary Hint']
|
||||||
if world.is_tile_swapped(0x1b, player):
|
if world.is_tile_swapped(0x1b, player):
|
||||||
start_regions.append('Hyrule Castle Ledge')
|
start_regions.append('Hyrule Castle Ledge')
|
||||||
regs = convert_regions(start_regions, world, player)
|
regs = convert_regions(start_regions, world, player)
|
||||||
@@ -1886,7 +1886,7 @@ def find_accessible_entrances(world, player, builder):
|
|||||||
|
|
||||||
|
|
||||||
def valid_inaccessible_region(world, r, player):
|
def valid_inaccessible_region(world, r, player):
|
||||||
return r.type is not RegionType.Cave or (len(r.exits) > 0 and r.name not in ['Links House' if not world.is_tile_swapped(0x2c, player) else 'Big Bomb Shop', 'Chris Houlihan Room'])
|
return r.type is not RegionType.Cave or (len(r.exits) > 0 and r.name not in ['Links House' if not world.is_bombshop_start(player) else 'Big Bomb Shop', 'Chris Houlihan Room'])
|
||||||
|
|
||||||
|
|
||||||
def add_inaccessible_doors(world, player):
|
def add_inaccessible_doors(world, player):
|
||||||
|
|||||||
+13
-13
@@ -54,7 +54,7 @@ def link_entrances(world, player):
|
|||||||
for exitname, regionname in mandatory_connections:
|
for exitname, regionname in mandatory_connections:
|
||||||
connect_simple(world, exitname, regionname, player)
|
connect_simple(world, exitname, regionname, player)
|
||||||
|
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
connect_simple(world, 'Links House S&Q', 'Links House', player)
|
connect_simple(world, 'Links House S&Q', 'Links House', player)
|
||||||
else:
|
else:
|
||||||
connect_simple(world, 'Links House S&Q', 'Big Bomb Shop', player)
|
connect_simple(world, 'Links House S&Q', 'Big Bomb Shop', player)
|
||||||
@@ -78,7 +78,7 @@ def link_entrances(world, player):
|
|||||||
connect_logical(world, entrancename, exitname, player, True)
|
connect_logical(world, entrancename, exitname, player, True)
|
||||||
if invFlag:
|
if invFlag:
|
||||||
world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance('Dark Sanctuary Hint', player).parent_region)
|
world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance('Dark Sanctuary Hint', player).parent_region)
|
||||||
if world.is_tile_swapped(0x2c, player):
|
if world.is_bombshop_start(player):
|
||||||
world.get_entrance('Big Bomb Shop Exit', player).connect(world.get_entrance('Big Bomb Shop', player).parent_region)
|
world.get_entrance('Big Bomb Shop Exit', player).connect(world.get_entrance('Big Bomb Shop', player).parent_region)
|
||||||
|
|
||||||
ignore_pool = False
|
ignore_pool = False
|
||||||
@@ -215,7 +215,7 @@ def link_entrances(world, player):
|
|||||||
junk_fill_inaccessible(world, player)
|
junk_fill_inaccessible(world, player)
|
||||||
|
|
||||||
# place bomb shop, has limited options
|
# place bomb shop, has limited options
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
bomb_shop_doors = list(entrance_pool)
|
bomb_shop_doors = list(entrance_pool)
|
||||||
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
||||||
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
||||||
@@ -261,7 +261,7 @@ def link_entrances(world, player):
|
|||||||
place_old_man(world, lw_entrances if not invFlag else dw_entrances, player)
|
place_old_man(world, lw_entrances if not invFlag else dw_entrances, player)
|
||||||
|
|
||||||
# place bomb shop, has limited options
|
# place bomb shop, has limited options
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
bomb_shop_doors = list(entrance_pool)
|
bomb_shop_doors = list(entrance_pool)
|
||||||
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
||||||
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
||||||
@@ -319,7 +319,7 @@ def link_entrances(world, player):
|
|||||||
place_old_man(world, lw_entrances if not invFlag else dw_entrances, player, list(zip(*drop_connections + dropexit_connections))[0])
|
place_old_man(world, lw_entrances if not invFlag else dw_entrances, player, list(zip(*drop_connections + dropexit_connections))[0])
|
||||||
|
|
||||||
# place bomb shop, has limited options
|
# place bomb shop, has limited options
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
bomb_shop_doors = [e for e in entrance_pool if e not in list(zip(*drop_connections + dropexit_connections))[0]]
|
bomb_shop_doors = [e for e in entrance_pool if e not in list(zip(*drop_connections + dropexit_connections))[0]]
|
||||||
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
||||||
bomb_shop_doors = [e for e in bomb_shop_doors if e not in ['Pyramid Fairy']]
|
bomb_shop_doors = [e for e in bomb_shop_doors if e not in ['Pyramid Fairy']]
|
||||||
@@ -422,7 +422,7 @@ def link_entrances(world, player):
|
|||||||
connect_caves(world, lw_entrances, dw_entrances, caves, player)
|
connect_caves(world, lw_entrances, dw_entrances, caves, player)
|
||||||
|
|
||||||
# place bomb shop, has limited options
|
# place bomb shop, has limited options
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
bomb_shop_doors = list(entrance_pool)
|
bomb_shop_doors = list(entrance_pool)
|
||||||
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
||||||
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
||||||
@@ -477,7 +477,7 @@ def link_entrances(world, player):
|
|||||||
connect_caves(world, connector_entrances, [], caves, player)
|
connect_caves(world, connector_entrances, [], caves, player)
|
||||||
|
|
||||||
# place bomb shop, has limited options
|
# place bomb shop, has limited options
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
bomb_shop_doors = list(entrance_pool)
|
bomb_shop_doors = list(entrance_pool)
|
||||||
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
||||||
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
||||||
@@ -527,7 +527,7 @@ def link_entrances(world, player):
|
|||||||
place_old_man(world, pool, player)
|
place_old_man(world, pool, player)
|
||||||
|
|
||||||
# place bomb shop, has limited options
|
# place bomb shop, has limited options
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
bomb_shop_doors = list(entrance_pool)
|
bomb_shop_doors = list(entrance_pool)
|
||||||
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
||||||
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
||||||
@@ -611,7 +611,7 @@ def link_entrances(world, player):
|
|||||||
caves.append('Old Man Cave Exit (West)')
|
caves.append('Old Man Cave Exit (West)')
|
||||||
|
|
||||||
# place bomb shop, has limited options
|
# place bomb shop, has limited options
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
bomb_shop_doors = list(entrance_pool)
|
bomb_shop_doors = list(entrance_pool)
|
||||||
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
if world.logic[player] in ['noglitches', 'minorglitches'] or world.is_tile_swapped(0x1b, player):
|
||||||
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
bomb_shop_doors = [e for e in entrance_pool if e not in ['Pyramid Fairy']]
|
||||||
@@ -642,8 +642,8 @@ def link_entrances(world, player):
|
|||||||
# ensure Houlihan exits where Links House does
|
# ensure Houlihan exits where Links House does
|
||||||
# TODO: Plando should overrule this
|
# TODO: Plando should overrule this
|
||||||
if not links_house:
|
if not links_house:
|
||||||
for links_house in world.get_entrance('Links House Exit' if not world.is_tile_swapped(0x2c, player) else 'Big Bomb Shop Exit', player).connected_region.exits:
|
for links_house in world.get_entrance('Links House Exit' if not world.is_bombshop_start(player) else 'Big Bomb Shop Exit', player).connected_region.exits:
|
||||||
if links_house.connected_region and links_house.connected_region.name == ('Links House' if not world.is_tile_swapped(0x2c, player) else 'Big Bomb Shop'):
|
if links_house.connected_region and links_house.connected_region.name == ('Links House' if not world.is_bombshop_start(player) else 'Big Bomb Shop'):
|
||||||
links_house = links_house.name
|
links_house = links_house.name
|
||||||
break
|
break
|
||||||
connect_exit(world, 'Chris Houlihan Room Exit', links_house, player)
|
connect_exit(world, 'Chris Houlihan Room Exit', links_house, player)
|
||||||
@@ -1342,7 +1342,7 @@ def full_shuffle_dungeons(world, Dungeon_Exits, player):
|
|||||||
def place_links_house(world, player, ignore_list=[]):
|
def place_links_house(world, player, ignore_list=[]):
|
||||||
invFlag = world.mode[player] == 'inverted'
|
invFlag = world.mode[player] == 'inverted'
|
||||||
if world.mode[player] == 'standard' or not world.shufflelinks[player]:
|
if world.mode[player] == 'standard' or not world.shufflelinks[player]:
|
||||||
links_house = 'Links House' if not world.is_tile_swapped(0x2c, player) else 'Big Bomb Shop'
|
links_house = 'Links House' if not world.is_bombshop_start(player) else 'Big Bomb Shop'
|
||||||
else:
|
else:
|
||||||
if invFlag:
|
if invFlag:
|
||||||
for dark_sanc in world.get_entrance('Dark Sanctuary Hint Exit', player).connected_region.exits:
|
for dark_sanc in world.get_entrance('Dark Sanctuary Hint Exit', player).connected_region.exits:
|
||||||
@@ -1361,7 +1361,7 @@ def place_links_house(world, player, ignore_list=[]):
|
|||||||
links_house_doors = [e for e in links_house_doors if e not in ignore_list]
|
links_house_doors = [e for e in links_house_doors if e not in ignore_list]
|
||||||
assert len(links_house_doors), 'No valid candidates to place Links House'
|
assert len(links_house_doors), 'No valid candidates to place Links House'
|
||||||
links_house = random.choice(links_house_doors)
|
links_house = random.choice(links_house_doors)
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
connect_two_way(world, links_house, 'Links House Exit', player)
|
connect_two_way(world, links_house, 'Links House Exit', player)
|
||||||
else:
|
else:
|
||||||
connect_entrance(world, links_house, 'Big Bomb Shop', player)
|
connect_entrance(world, links_house, 'Big Bomb Shop', player)
|
||||||
|
|||||||
+2
-2
@@ -841,7 +841,7 @@ def can_reach_smith(world, player):
|
|||||||
|
|
||||||
found = False
|
found = False
|
||||||
explored_regions = list()
|
explored_regions = list()
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
start_region = 'Links House'
|
start_region = 'Links House'
|
||||||
else:
|
else:
|
||||||
start_region = 'Big Bomb Shop'
|
start_region = 'Big Bomb Shop'
|
||||||
@@ -1031,7 +1031,7 @@ def validate_layout(world, player):
|
|||||||
explored_regions = list()
|
explored_regions = list()
|
||||||
|
|
||||||
if world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull'] or not world.shufflelinks[player]:
|
if world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull'] or not world.shufflelinks[player]:
|
||||||
if not world.is_tile_swapped(0x2c, player):
|
if not world.is_bombshop_start(player):
|
||||||
start_region = 'Links House Area'
|
start_region = 'Links House Area'
|
||||||
else:
|
else:
|
||||||
start_region = 'Big Bomb Shop Area'
|
start_region = 'Big Bomb Shop Area'
|
||||||
|
|||||||
Reference in New Issue
Block a user