Fixed some inconsistencies with OWG starting boots considerations

This commit is contained in:
codemann8
2025-01-03 04:31:51 -06:00
parent 9eba1d4c40
commit 8ce8b93c8b
4 changed files with 13 additions and 9 deletions

View File

@@ -115,8 +115,7 @@ class InitialSram:
starting_magic = 0x80 starting_magic = 0x80
if world.mode[player] == 'standard' and world.logic[player] not in ['noglitches', 'minorglitches']: if world.mode[player] == 'standard' and world.logic[player] not in ['noglitches', 'minorglitches']:
if (startingstate.has('Ocarina', player) and world.flute_mode[player] == 'active') \ if startingstate.has('Ocarina (Activated)', player):
or startingstate.has('Ocarina (Activated)', player):
self.pre_set_overworld_flag(0x18, 0x20) self.pre_set_overworld_flag(0x18, 0x20)
if startingstate.has('Return Old Man', player): if startingstate.has('Return Old Man', player):

View File

@@ -619,6 +619,7 @@ def copy_world(world):
ret.inaccessible_regions = world.inaccessible_regions.copy() ret.inaccessible_regions = world.inaccessible_regions.copy()
ret.damage_table = world.damage_table ret.damage_table = world.damage_table
ret.data_tables = world.data_tables # can be changed... ret.data_tables = world.data_tables # can be changed...
ret.settings = world.settings
for player in range(1, world.players + 1): for player in range(1, world.players + 1):
create_regions(ret, player) create_regions(ret, player)
@@ -832,6 +833,7 @@ def copy_world_premature(world, player):
ret.damage_table = world.damage_table ret.damage_table = world.damage_table
ret.data_tables = world.data_tables # can be changed... ret.data_tables = world.data_tables # can be changed...
ret.key_logic = world.key_logic.copy() ret.key_logic = world.key_logic.copy()
ret.settings = world.settings
ret.is_copied_world = True ret.is_copied_world = True

View File

@@ -1384,11 +1384,10 @@ def can_reach_smith(world, player):
region = world.get_region(region_name, player) region = world.get_region(region_name, player)
for exit in region.exits: for exit in region.exits:
if not found and exit.connected_region is not None: if not found and exit.connected_region is not None:
if exit.spot_type == 'Flute': if starting_flute and exit.spot_type == 'Flute':
if any(map(lambda i: i.name == 'Ocarina (Activated)' and i.player == player, world.precollected_items)): for flutespot in exit.connected_region.exits:
for flutespot in exit.connected_region.exits: if flutespot.connected_region and flutespot.connected_region.name not in explored_regions:
if flutespot.connected_region and flutespot.connected_region.name not in explored_regions: explore_region(flutespot.connected_region.name, flutespot.connected_region)
explore_region(flutespot.connected_region.name, flutespot.connected_region)
elif exit.connected_region.name == 'Blacksmiths Hut' and exit.access_rule(blank_state): elif exit.connected_region.name == 'Blacksmiths Hut' and exit.access_rule(blank_state):
found = True found = True
return return
@@ -1410,6 +1409,7 @@ def can_reach_smith(world, player):
found = False found = False
explored_regions = list() explored_regions = list()
starting_flute = any(map(lambda i: i.name == 'Ocarina (Activated)' and i.player == player, world.precollected_items))
if not world.is_bombshop_start(player): if not world.is_bombshop_start(player):
start_region = 'Links House' start_region = 'Links House'
else: else:
@@ -1494,7 +1494,7 @@ def build_accessible_region_list(world, start_region, player, build_copy_world=F
region = base_world.get_region(region_name, player) region = base_world.get_region(region_name, player)
for exit in region.exits: for exit in region.exits:
if exit.connected_region is not None: if exit.connected_region is not None:
if any(map(lambda i: i.name == 'Ocarina (Activated)' and i.player == player, base_world.precollected_items)) and exit.spot_type == 'Flute': if starting_flute and exit.spot_type == 'Flute':
fluteregion = exit.connected_region fluteregion = exit.connected_region
for flutespot in fluteregion.exits: for flutespot in fluteregion.exits:
if flutespot.connected_region and flutespot.connected_region.name not in explored_regions: if flutespot.connected_region and flutespot.connected_region.name not in explored_regions:
@@ -1504,7 +1504,7 @@ def build_accessible_region_list(world, start_region, player, build_copy_world=F
or (cross_world and exit.name in (OWExitTypes['Portal'] + OWExitTypes['Mirror']))) \ or (cross_world and exit.name in (OWExitTypes['Portal'] + OWExitTypes['Mirror']))) \
and (not region_rules or exit.access_rule(blank_state)) \ and (not region_rules or exit.access_rule(blank_state)) \
and (not restrictive_follower or exit.spot_type != 'OWG') \ and (not restrictive_follower or exit.spot_type != 'OWG') \
and (not ignore_ledges or exit.name not in (OWExitTypes['Ledge'] + OWExitTypes['OWG'])): and (not ignore_ledges or not (exit.spot_type == 'OWG' or exit.name in OWExitTypes['Ledge'])):
explore_region(exit.connected_region.name, exit.connected_region) explore_region(exit.connected_region.name, exit.connected_region)
if build_copy_world: if build_copy_world:
@@ -1520,6 +1520,7 @@ def build_accessible_region_list(world, start_region, player, build_copy_world=F
if base_world.mode[player] == 'standard': if base_world.mode[player] == 'standard':
blank_state.collect(ItemFactory('Zelda Delivered', player), True) blank_state.collect(ItemFactory('Zelda Delivered', player), True)
explored_regions = list() explored_regions = list()
starting_flute = any(map(lambda i: i.name == 'Ocarina (Activated)' and i.player == player, base_world.precollected_items))
explore_region(start_region) explore_region(start_region)
return explored_regions return explored_regions

View File

@@ -878,6 +878,8 @@ def get_accessible_entrances(start_region, avail, assumed_inventory=[], cross_wo
blank_state = CollectionState(base_world) blank_state = CollectionState(base_world)
if base_world.mode[avail.player] == 'standard': if base_world.mode[avail.player] == 'standard':
blank_state.collect(ItemFactory('Zelda Delivered', avail.player), True) blank_state.collect(ItemFactory('Zelda Delivered', avail.player), True)
if base_world.logic[avail.player] in ['owglitches', 'hybridglitches', 'nologic']:
blank_state.collect(ItemFactory('Pegasus Boots', avail.player), True)
for item in assumed_inventory: for item in assumed_inventory:
blank_state.collect(ItemFactory(item, avail.player), True) blank_state.collect(ItemFactory(item, avail.player), True)