diff --git a/EntranceShuffle.py b/EntranceShuffle.py index c551b760..27e6df66 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -73,6 +73,8 @@ def link_entrances(world, player): connect_logical(world, entrancename, exitname, player, False) for entrancename, exitname in default_connector_connections + dropexit_connections: connect_logical(world, entrancename, exitname, player, True) + if invFlag: + world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance('Dark Sanctuary Hint', player).parent_region) if not invFlag: for entrancename, exitname in open_default_connections: diff --git a/OverworldShuffle.py b/OverworldShuffle.py index c9970ea9..25ff9d8c 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -674,6 +674,52 @@ def update_world_regions(world, player): for name in world.owswaps[player][2]: world.get_region(name, player).type = RegionType.LightWorld +def can_reach_smith(world, player): + from Items import ItemFactory + from BaseClasses import CollectionState + + invFlag = world.mode[player] == 'inverted' + + def explore_region(region_name, region=None): + nonlocal found + explored_regions.add(region_name) + if not found: + if not region: + region = world.get_region(region_name, player) + for exit in region.exits: + if not found and exit.connected_region is not None: + if any(map(lambda i: i.name == 'Ocarina', world.precollected_items)) and exit.spot_type == 'Flute': + fluteregion = exit.connected_region + for flutespot in fluteregion.exits: + if flutespot.connected_region and flutespot.connected_region.name not in explored_regions: + explore_region(flutespot.connected_region.name, flutespot.connected_region) + elif exit.connected_region.name not in explored_regions \ + and exit.connected_region.type in [RegionType.LightWorld, RegionType.DarkWorld] \ + and exit.access_rule(blank_state): + explore_region(exit.connected_region.name, exit.connected_region) + elif exit.name == 'Sanctuary S': + sanc_region = exit.connected_region + if len(sanc_region.exits) and sanc_region.exits[0].name == 'Sanctuary Exit': + explore_region(sanc_region.exits[0].connected_region.name, sanc_region.exits[0].connected_region) + elif exit.connected_region.name == 'Blacksmiths Hut' and exit.access_rule(blank_state): + found = True + + blank_state = CollectionState(world) + if world.mode[player] == 'standard': + blank_state.collect(ItemFactory('Zelda Delivered', player), True) + if world.logic[player] in ['noglitches', 'minorglitches'] and world.get_region('Frog Prison', player).type == (RegionType.DarkWorld if not invFlag else RegionType.LightWorld): + blank_state.collect(ItemFactory('Titans Mitts', player), True) + + found = False + explored_regions = set() + explore_region('Links House') + if not found: + if not invFlag: + explore_region('Sanctuary') + else: + explore_region('Dark Sanctuary Hint') + return found + test_connections = [ #('Links House ES', 'Octoballoon WS'), #('Links House NE', 'Lost Woods Pass SW') diff --git a/Rom.py b/Rom.py index e43d7c4f..c7937e24 100644 --- a/Rom.py +++ b/Rom.py @@ -33,7 +33,7 @@ from source.classes.SFX import randomize_sfx JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'beae526152a17a203c6a17b227826679' +RANDOMIZERBASEHASH = 'c6c2a2d5d89a3c84871f58806bbb3acf' class JsonRom(object): @@ -661,8 +661,6 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): if world.owMixed[player]: owMode |= 0x400 - rom.write_byte(0x18004C, 0x01) # patch for allowing Frogsmith to enter multi-entrance caves - # patches map data specific for OW Shuffle #inverted_buffer[0x03] = inverted_buffer[0x03] | 0x2 # convenient portal on WDM inverted_buffer[0x1A] = inverted_buffer[0x1A] | 0x2 # rocks added to prevent OWG hardlock @@ -2514,7 +2512,6 @@ def set_inverted_mode(world, player, rom, inverted_buffer): if (world.mode[player] == 'inverted') != (0x10 in world.owswaps[player][0] and world.owMixed[player]): rom.write_bytes(snes_to_pc(0x1BC67A), [0x2E, 0x0B, 0x82]) # add warp under rock rom.write_byte(snes_to_pc(0x1BC43A), 0x00) # remove secret portal - if (world.mode[player] == 'inverted') != (0x1B in world.owswaps[player][0] and world.owMixed[player]): write_int16(rom, 0x15AEE + 2 * 0x06, 0x0020) # post aga hyrule castle spawn rom.write_byte(0x15B8C + 0x06, 0x1B) diff --git a/data/base2current.bps b/data/base2current.bps index 5ad54ace..daf77e69 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ