From 0d5ea19ecda2a98809b53b44f8378db70424f608 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 23 Aug 2022 15:52:59 -0600 Subject: [PATCH 1/7] 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/7] 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 32305a2202c28ca80d9bb3b0d28fc0bbf7c2d4e7 Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 24 Aug 2022 12:53:04 -0600 Subject: [PATCH 3/7] 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 1f9d7066..7c93eaf8 100644 --- a/Main.py +++ b/Main.py @@ -584,11 +584,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 262b36cac66d3d47f4f098ace26d1663ad0b60fc Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 24 Aug 2022 13:10:32 -0600 Subject: [PATCH 4/7] Custom yaml properly record interior doors that are key doors --- source/classes/CustomSettings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/classes/CustomSettings.py b/source/classes/CustomSettings.py index 03a203f9..dd99853e 100644 --- a/source/classes/CustomSettings.py +++ b/source/classes/CustomSettings.py @@ -306,7 +306,7 @@ class CustomSettings(object): for door in world.doors: if door.player == p and not door.entranceFlag and door.type in door_types and door not in skip: if door.type == DoorType.Interior: - if door.name in door_types: + if door.name in door_kinds: door_value = {'type': door_kinds[door.name]} door_map[door.name] = door_value # intra-tile note skip.add(door.dest) From 0d9d6f2ceba7bfe2aaccbf2f8768d798902daaab Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 24 Aug 2022 12:53:04 -0600 Subject: [PATCH 5/7] 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 6/7] 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'] From 6b369b68b7885471b73b4eea04f9488d250b70ff Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 24 Aug 2022 13:29:14 -0600 Subject: [PATCH 7/7] Update lite/lean with pottery options. Houses and caves with pots are shuffled in the ER pool if the pottery setting turns that on. --- source/overworld/EntranceShuffle2.py | 63 +++++++++++++++++++--------- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/source/overworld/EntranceShuffle2.py b/source/overworld/EntranceShuffle2.py index cb176aba..da454795 100644 --- a/source/overworld/EntranceShuffle2.py +++ b/source/overworld/EntranceShuffle2.py @@ -770,6 +770,9 @@ def do_vanilla_connect(pool_def, avail): if pool_def['condition'] == 'shopsanity': if avail.world.shopsanity[avail.player]: return + elif pool_def['condition'] == 'pottery': # this condition involves whether caves with pots are shuffled or not + if avail.world.pottery[avail.player] not in ['none', 'keys', 'dungeon']: + return defaults = inverted_default_connections if avail.inverted else default_connections for entrance in pool_def['entrances']: if entrance in avail.entrances: @@ -1188,16 +1191,13 @@ modes = { 'fixed_non_items': { 'special': 'vanilla', 'condition': '', - 'entrances': ['Dark Death Mountain Fairy', 'Dark Desert Fairy', 'Dark Desert Hint', 'Archery Game', + 'entrances': ['Dark Death Mountain Fairy', 'Dark Desert Fairy', 'Archery Game', 'Fortune Teller (Dark)', 'Dark Sanctuary Hint', 'Bonk Fairy (Dark)', - 'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Spike Cave', - 'Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Fairy', 'Dark Lake Hylia Shop', - 'Palace of Darkness Hint', 'East Dark World Hint', 'Hookshot Fairy', '50 Rupee Cave', - 'Kakariko Gamble Game', '20 Rupee Cave', 'Good Bee Cave', 'Long Fairy Cave', - 'Light World Bomb Hut', 'Tavern (Front)', 'Bush Covered House', 'Snitch Lady (West)', - 'Snitch Lady (East)', 'Fortune Teller (Light)', 'Lost Woods Gamble', 'Desert Fairy', - 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', 'Bonk Fairy (Light)', - 'Lumberjack House', 'Inverted Dark Sanctuary'], + 'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Fairy', + 'Dark Lake Hylia Shop', 'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave', + 'Long Fairy Cave', 'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble', + 'Desert Fairy', 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', + 'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'], }, 'fixed_shops': { 'special': 'vanilla', @@ -1206,7 +1206,16 @@ modes = { 'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade', 'Cave Shop (Lake Hylia)'], }, - 'item_caves': { # shuffles shops if they weren't fixed in the last one + 'fixed_pottery': { + 'special': 'vanilla', + 'condition': 'pottery', + 'entrances': ['Lumberjack House', 'Snitch Lady (West)', 'Snitch Lady (East)', 'Tavern (Front)', + 'Light World Bomb Hut', '20 Rupee Cave', '50 Rupee Cave', 'Hookshot Fairy', + 'Palace of Darkness Hint', 'Dark Lake Hylia Ledge Spike Cave', + 'Dark Desert Hint'] + + }, + 'item_caves': { # shuffles shops/pottery if they weren't fixed in the last steps 'entrances': ['Mimic Cave', 'Spike Cave', 'Mire Shed', 'Dark World Hammer Peg Cave', 'Chest Game', 'C-Shaped House', 'Brewery', 'Hype Cave', 'Big Bomb Shop', 'Pyramid Fairy', 'Ice Rod Cave', 'Dam', 'Bonk Rock Cave', 'Library', 'Potion Shop', 'Mini Moldorm Cave', @@ -1215,6 +1224,10 @@ modes = { 'Waterfall of Wishing', 'Inverted Bomb Shop', 'Cave Shop (Dark Death Mountain)', 'Dark World Potion Shop', 'Dark World Lumberjack Shop', 'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade', 'Cave Shop (Lake Hylia)', + 'Lumberjack House', 'Snitch Lady (West)', 'Snitch Lady (East)', 'Tavern (Front)', + 'Light World Bomb Hut', '20 Rupee Cave', '50 Rupee Cave', 'Hookshot Fairy', + 'Palace of Darkness Hint', 'Dark Lake Hylia Ledge Spike Cave', + 'Dark Desert Hint', 'Links House', 'Inverted Links House', 'Tavern North'] }, 'old_man_cave': { # have to do old man cave first so lw dungeon don't use up everything @@ -1254,16 +1267,13 @@ modes = { 'fixed_non_items': { 'special': 'vanilla', 'condition': '', - 'entrances': ['Dark Death Mountain Fairy', 'Dark Desert Fairy', 'Dark Desert Hint', 'Archery Game', + 'entrances': ['Dark Death Mountain Fairy', 'Dark Desert Fairy', 'Archery Game', 'Fortune Teller (Dark)', 'Dark Sanctuary Hint', 'Bonk Fairy (Dark)', - 'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Spike Cave', - 'Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Fairy', 'Dark Lake Hylia Shop', - 'Palace of Darkness Hint', 'East Dark World Hint', 'Hookshot Fairy', '50 Rupee Cave', - 'Kakariko Gamble Game', '20 Rupee Cave', 'Good Bee Cave', 'Long Fairy Cave', - 'Light World Bomb Hut', 'Tavern (Front)', 'Bush Covered House', 'Snitch Lady (West)', - 'Snitch Lady (East)', 'Fortune Teller (Light)', 'Lost Woods Gamble', 'Desert Fairy', - 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', 'Bonk Fairy (Light)', - 'Lumberjack House', 'Inverted Dark Sanctuary'], + 'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Fairy', + 'Dark Lake Hylia Shop', 'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave', + 'Long Fairy Cave', 'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble', + 'Desert Fairy', 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', + 'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'], }, 'fixed_shops': { 'special': 'vanilla', @@ -1272,7 +1282,16 @@ modes = { 'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade', 'Cave Shop (Lake Hylia)'], }, - 'item_caves': { # shuffles shops if they weren't fixed in the last one + 'fixed_pottery': { + 'special': 'vanilla', + 'condition': 'pottery', + 'entrances': ['Lumberjack House', 'Snitch Lady (West)', 'Snitch Lady (East)', 'Tavern (Front)', + 'Light World Bomb Hut', '20 Rupee Cave', '50 Rupee Cave', 'Hookshot Fairy', + 'Palace of Darkness Hint', 'Dark Lake Hylia Ledge Spike Cave', + 'Dark Desert Hint'] + + }, + 'item_caves': { # shuffles shops/pottery if they weren't fixed in the last steps 'entrances': ['Mimic Cave', 'Spike Cave', 'Mire Shed', 'Dark World Hammer Peg Cave', 'Chest Game', 'C-Shaped House', 'Brewery', 'Hype Cave', 'Big Bomb Shop', 'Pyramid Fairy', 'Ice Rod Cave', 'Dam', 'Bonk Rock Cave', 'Library', 'Potion Shop', 'Mini Moldorm Cave', @@ -1281,6 +1300,10 @@ modes = { 'Waterfall of Wishing', 'Inverted Bomb Shop', 'Cave Shop (Dark Death Mountain)', 'Dark World Potion Shop', 'Dark World Lumberjack Shop', 'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade', 'Cave Shop (Lake Hylia)', + 'Lumberjack House', 'Snitch Lady (West)', 'Snitch Lady (East)', 'Tavern (Front)', + 'Light World Bomb Hut', '20 Rupee Cave', '50 Rupee Cave', 'Hookshot Fairy', + 'Palace of Darkness Hint', 'Dark Lake Hylia Ledge Spike Cave', + 'Dark Desert Hint', 'Links House', 'Inverted Links House', 'Tavern North'] } }