From 0d5ea19ecda2a98809b53b44f8378db70424f608 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 23 Aug 2022 15:52:59 -0600 Subject: [PATCH 1/4] Fix for small key fill --- Fill.py | 3 +-- ItemList.py | 24 ------------------------ 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/Fill.py b/Fill.py index bb6e70cf..b2dc3400 100644 --- a/Fill.py +++ b/Fill.py @@ -61,7 +61,7 @@ def fill_dungeons_restrictive(world, shuffled_locations): small_state_base = all_state_base.copy() for x in others: small_state_base.collect(x, True) - fill(small_state_base, smalls, smalls) + fill(small_state_base, smalls, list(smalls)) random.shuffle(shuffled_locations) fill(all_state_base, others, None) @@ -123,7 +123,6 @@ def fill_restrictive(world, base_state, locations, itempool, key_pool=None, sing raise FillError('No more spots to place %s' % item_to_place) world.push_item(spot_to_fill, item_to_place, False) - # todo: remove key item from key_pool if item_to_place.smallkey: with suppress(ValueError): key_pool.remove(item_to_place) diff --git a/ItemList.py b/ItemList.py index dacbdf14..9dd69157 100644 --- a/ItemList.py +++ b/ItemList.py @@ -1099,27 +1099,3 @@ def test(): if __name__ == '__main__': test() - - -def fill_specific_items(world): - keypool = [item for item in world.itempool if item.smallkey] - cage = world.get_location('Tower of Hera - Basement Cage', 1) - c_dungeon = cage.parent_region.dungeon - key_item = next(x for x in keypool if c_dungeon.name in x.name or (c_dungeon.name == 'Hyrule Castle' and 'Escape' in x.name)) - world.itempool.remove(key_item) - all_state = world.get_all_state(True) - fill_restrictive(world, all_state, [cage], [key_item]) - - location = world.get_location('Tower of Hera - Map Chest', 1) - key_item = next(x for x in world.itempool if 'Byrna' in x.name) - world.itempool.remove(key_item) - fast_fill(world, [key_item], [location]) - - - # somaria = next(item for item in world.itempool if item.name == 'Cane of Somaria') - # shooter = world.get_location('Palace of Darkness - Shooter Room', 1) - # world.itempool.remove(somaria) - # all_state = world.get_all_state(True) - # fill_restrictive(world, all_state, [shooter], [somaria]) - - From 9c612b6c00511226374c1a9be4532892c4177ddd Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 23 Aug 2022 16:43:27 -0600 Subject: [PATCH 2/4] Minor edit to when pyramid hole auto pre-opens --- Rom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index c3312b9a..58a144ad 100644 --- a/Rom.py +++ b/Rom.py @@ -1263,7 +1263,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): rom.write_bytes(0x50563, [0x3F, 0x14]) # disable below ganon chest rom.write_byte(0x50599, 0x00) # disable below ganon chest rom.write_bytes(0xE9A5, [0x7E, 0x00, 0x24]) # disable below ganon chest - if world.open_pyramid[player] or world.goal[player] == 'trinity': + if world.open_pyramid[player] or (world.goal[player] in ['trinity', 'crystals'] and world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull']): rom.initial_sram.pre_open_pyramid_hole() if world.crystals_needed_for_gt[player] == 0: rom.initial_sram.pre_open_ganons_tower() From 0d9d6f2ceba7bfe2aaccbf2f8768d798902daaab Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 24 Aug 2022 12:53:04 -0600 Subject: [PATCH 3/4] Copy world needs to copy location type --- Main.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Main.py b/Main.py index 3787e81b..bb2593be 100644 --- a/Main.py +++ b/Main.py @@ -549,11 +549,7 @@ def copy_dynamic_regions_and_locations(world, ret): for location in world.dynamic_locations: new_reg = ret.get_region(location.parent_region.name, location.parent_region.player) new_loc = Location(location.player, location.name, location.address, location.crystal, location.hint_text, new_reg) - # todo: this is potentially dangerous. later refactor so we - # can apply dynamic region rules on top of copied world like other rules - new_loc.access_rule = location.access_rule - new_loc.always_allow = location.always_allow - new_loc.item_rule = location.item_rule + new_loc.type = location.type new_reg.locations.append(new_loc) ret.clear_location_cache() From 5d419210afeb1ef9bb5e24743b24ff1be9e32c74 Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 24 Aug 2022 13:18:01 -0600 Subject: [PATCH 4/4] Fix a bank conflict with OWR Release notes and version bump --- Main.py | 2 +- RELEASENOTES.md | 5 +++++ Rom.py | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Main.py b/Main.py index bb2593be..d47fbc46 100644 --- a/Main.py +++ b/Main.py @@ -31,7 +31,7 @@ from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config from source.tools.BPS import create_bps_from_data -__version__ = '1.0.1.1-u' +__version__ = '1.0.1.2-u' from source.classes.BabelFish import BabelFish diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 56ecca32..0603d95e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -183,6 +183,11 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o #### Unstable +* 1.0.1.2 + * Fixed an issue with small key bias rework + * Fixed an issue where trinity goal would open pyramid unexpectedly. (No longer does so if ER mdoe is shuffling holes). Crystals goal updated to match that behavior. + * Fixed a playthrough issue that was not respecting pot rules + * Fixed an issue that was conflicting with downstream OWR project * 1.0.1.1 * Fixed the pots in Mire Storyteller/ Dark Desert Hint to be colorized when they should be * Certain pot items no longer reload when reloading the supertile (matches original pot behavior better) diff --git a/Rom.py b/Rom.py index 58a144ad..4af847ad 100644 --- a/Rom.py +++ b/Rom.py @@ -1534,9 +1534,9 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): rom.write_bytes(room.address(), room.rom_data()) if world.pottery[player] not in ['none']: - rom.write_bytes(snes_to_pc(0x1F8375), int32_as_bytes(0x2A8000)) + rom.write_bytes(snes_to_pc(0x1F8375), int32_as_bytes(0x2B8000)) # make hammer pegs use different tiles - Room0127.write_to_rom(snes_to_pc(0x2A8000), rom) + Room0127.write_to_rom(snes_to_pc(0x2B8000), rom) if world.pot_contents[player]: colorize_pots = is_mystery or (world.pottery[player] not in ['vanilla', 'lottery']