From b93a287b36e5688e8bc28318598b0ba67dfdd057 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 10 Oct 2024 15:16:24 -0600 Subject: [PATCH 01/25] feat: spoiler/playthrough support in meta section of customizer --- source/classes/CustomSettings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/classes/CustomSettings.py b/source/classes/CustomSettings.py index 51fa4c2e..37bb0206 100644 --- a/source/classes/CustomSettings.py +++ b/source/classes/CustomSettings.py @@ -61,6 +61,8 @@ class CustomSettings(object): args.outputname = get_setting(meta['name'], args.outputname) args.bps = get_setting(meta['bps'], args.bps) args.suppress_rom = get_setting(meta['suppress_rom'], args.suppress_rom) + args.skip_playthrough = get_setting(meta['skip_playthrough'], args.skip_playthrough) + args.spoiler = get_setting(meta['spoiler'], args.spoiler) args.names = get_setting(meta['names'], args.names) args.race = get_setting(meta['race'], args.race) args.notes = get_setting(meta['user_notes'], args.notes) From 7de6671477cd1fba665aa19f009a9eb7bc836a31 Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 11 Nov 2024 08:19:31 -0700 Subject: [PATCH 02/25] fix: accessibility bug --- DoorShuffle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DoorShuffle.py b/DoorShuffle.py index 14433143..e22a6822 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -2321,7 +2321,7 @@ def validate_trap_layout(proposal, builder, start_regions, paths, world, player) if bk_special_loc: if not state.found_forced_bk(): return False - if world.accessibility[player] != 'beatable': + if world.accessibility[player] != 'none': all_locations = [l for r in builder.master_sector.region_set() for l in world.get_region(r, player).locations] if any(l not in state.found_locations for l in all_locations): return False From 82a04dabd736e64cf6f29d42ebe24f2e7aab2f07 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 12 Nov 2024 14:07:43 -0700 Subject: [PATCH 03/25] fix: standard+enemizer rules --- Rules.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Rules.py b/Rules.py index 87742ad1..fcd475fa 100644 --- a/Rules.py +++ b/Rules.py @@ -1533,16 +1533,28 @@ def standard_rules(world, player): add_rule(world.get_location('Secret Passage', player), lambda state: standard_escape_rule(state)) escape_builder = world.dungeon_layouts[player]['Hyrule Castle'] + room_map = world.data_tables[player].uw_enemy_table.room_map + stats = world.data_tables[player].enemy_stats for region in escape_builder.master_sector.regions: - for loc in region.locations: - add_rule(loc, lambda state: standard_escape_rule(state)) if region.name in std_kill_rooms: - for ent in std_kill_rooms[region.name][0]: - add_rule(world.get_entrance(ent, player), lambda state: standard_escape_rule(state)) - for ent in std_kill_rooms[region.name][1]: + entrances, trap_ables, room_id, enemy_list = std_kill_rooms[region.name] + rule = get_challenge_rule(world, player, room_map, stats, room_id, enemy_list, region) + for ent in entrances: entrance = world.get_entrance(ent, player) - if entrance.door.trapped: - add_rule(entrance, lambda state: standard_escape_rule(state)) + if not entrance.door or not entrance.door.entranceFlag: + add_rule_new(entrance, rule) + for ent in trap_ables: + entrance = world.get_entrance(ent, player) + if entrance.door.trapped and not entrance.door.entranceFlag: + add_rule_new(entrance, rule) + else: + for loc in region.locations: + if loc.name in kill_chests: + locations, room_id, enemy_list = kill_chests[loc.name] + rule = get_challenge_rule(world, player, room_map, stats, room_id, enemy_list, region) + add_rule_new(world.get_location(loc, player), rule) + else: + add_rule(loc, lambda state: standard_escape_rule(state)) set_rule(world.get_location('Zelda Pickup', player), lambda state: state.has('Big Key (Escape)', player)) set_rule(world.get_entrance('Hyrule Castle Tapestry Backwards', player), lambda state: state.has('Zelda Herself', player)) From a2075ec9925eacd23998a17cf5880286ff3897e9 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 12 Nov 2024 14:10:28 -0700 Subject: [PATCH 04/25] fix: inconsistent treatment of beemizer --- BaseClasses.py | 2 +- CLI.py | 2 +- ItemList.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 0d63917c..6846ac2d 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -129,7 +129,7 @@ class World(object): set_player_attr('enemy_health', 'default') set_player_attr('enemy_damage', 'default') set_player_attr('any_enemy_logic', 'allow_all') - set_player_attr('beemizer', 0) + set_player_attr('beemizer', '0') set_player_attr('escape_assist', []) set_player_attr('crystals_needed_for_ganon', 7) set_player_attr('crystals_needed_for_gt', 7) diff --git a/CLI.py b/CLI.py index cae0feb8..af94e810 100644 --- a/CLI.py +++ b/CLI.py @@ -270,7 +270,7 @@ def parse_settings(): "seed": "", "count": 1, "startinventory": "", - "beemizer": 0, + 'beemizer': '0', "remote_items": False, "race": False, "customitemarray": { diff --git a/ItemList.py b/ItemList.py index 1df02b2a..be1f744c 100644 --- a/ItemList.py +++ b/ItemList.py @@ -459,7 +459,7 @@ def generate_itempool(world, player): '3': {'trap': 50, 'bee': 50}, '4': {'trap': 100}} def beemizer(item): - if world.beemizer[item.player] and not item.advancement and not item.priority and not item.type: + if world.beemizer[item.player] != '0' and not item.advancement and not item.priority and not item.type: choice = random.choices(list(beeweights[world.beemizer[item.player]].keys()), weights=list(beeweights[world.beemizer[item.player]].values()))[0] return item if not choice else ItemFactory("Bee Trap", player) if choice == 'trap' else ItemFactory("Bee", player) return item From 718ef718f464aa201475f101c93ca4135973b2ef Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 2 Dec 2024 10:43:07 -0700 Subject: [PATCH 05/25] fix: broken compare --- BaseClasses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseClasses.py b/BaseClasses.py index 6846ac2d..928594f1 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -2406,7 +2406,7 @@ class Item(object): return self.world.get_name_string_for_object(self) if self.world else f'{self.name} (Player {self.player})' def __eq__(self, other): - return self.name == other.name and self.player == other.player + return other is not None and self.name == other.name and self.player == other.player # have 6 address that need to be filled From 514dfcc0c804c6d4552230e7a7238a98e3519ef9 Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Sat, 12 Oct 2024 16:37:22 +0200 Subject: [PATCH 06/25] Fix world copy in HMG/NL --- Main.py | 6 +++++- UnderworldGlitchRules.py | 41 +++++++++++++++++++++++++--------------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/Main.py b/Main.py index af8ba0ab..bd249668 100644 --- a/Main.py +++ b/Main.py @@ -27,7 +27,7 @@ from Fill import distribute_items_restrictive, promote_dungeon_items, fill_dunge from Fill import dungeon_tracking from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops, fill_specific_items -from UnderworldGlitchRules import create_hybridmajor_connections, create_hybridmajor_connectors +from UnderworldGlitchRules import create_hybridmajor_connections, create_hybridmajor_connectors, get_hybridmajor_connector_entrances from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config, verify_item_pool_config @@ -557,6 +557,8 @@ def copy_world(world): # connect copied world copied_locations = {(loc.name, loc.player): loc for loc in ret.get_locations()} # caches all locations + hmg_entrances = get_hybridmajor_connector_entrances() + for region in world.regions: copied_region = ret.get_region(region.name, region.player) copied_region.is_light_world = region.is_light_world @@ -566,6 +568,8 @@ def copy_world(world): for location in copied_region.locations: location.parent_region = copied_region for entrance in region.entrances: + if entrance.name in hmg_entrances: + continue ret.get_entrance(entrance.name, entrance.player).connect(copied_region) # fill locations diff --git a/UnderworldGlitchRules.py b/UnderworldGlitchRules.py index 67593631..4544b2ed 100644 --- a/UnderworldGlitchRules.py +++ b/UnderworldGlitchRules.py @@ -6,12 +6,11 @@ kikiskip_spots = [ ("Kiki Skip", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Portal") ] -mireheraswamp_spots = [ - ("Mire to Hera Clip", "Mire Torches Top", "Hera Portal"), - ("Hera to Swamp Clip", "Mire Torches Top", "Swamp Portal"), -] +mirehera_spots = [("Mire to Hera Clip", "Mire Torches Top", "Hera Portal")] -icepalace_spots = [("Ice Lobby Clip", "Ice Portal", "Ice Bomb Drop")] +heraswamp_spots = [("Hera to Swamp Clip", "Mire Torches Top", "Swamp Portal")] + +icepalace_spots = [("Ice Lobby Clip", "Ice Portal", "Ice Bomb Drop - Top")] thievesdesert_spots = [ ("Thieves to Desert West Clip", "Thieves Attic", "Desert West Portal"), @@ -32,14 +31,12 @@ paradox_spots = [ kikiskip_connectors = [ ("Kiki Skip Connector", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Exit") ] - - -mireheraswamp_connectors = [ - ("Mire to Hera Connector", "Mire Torches Top", "Tower of Hera Exit"), - ("Mire to Swamp Connector", "Mire Torches Top", "Swamp Palace Exit"), +mirehera_connectors = [ + ("Mire to Hera Connector", "Mire Torches Top", "Tower of Hera Exit") +] +heraswamp_connectors = [ + ("Mire to Swamp Connector", "Mire Torches Top", "Swamp Palace Exit") ] - - thievesdesert_connectors = [ ("Thieves to Desert West Connector", "Thieves Attic", "Desert Palace Exit (West)"), ( @@ -49,7 +46,6 @@ thievesdesert_connectors = [ ), ("Thieves to Desert East Connector", "Thieves Attic", "Desert Palace Exit (East)"), ] - specrock_connectors = [ ( "Spec Rock Top Connector", @@ -68,7 +64,8 @@ specrock_connectors = [ def create_hybridmajor_connections(world, player): for spots in [ kikiskip_spots, - mireheraswamp_spots, + mirehera_spots, + heraswamp_spots, icepalace_spots, thievesdesert_spots, specrock_spots, @@ -81,7 +78,8 @@ def create_hybridmajor_connections(world, player): def create_hybridmajor_connectors(world, player): for connectors in [ kikiskip_connectors, - mireheraswamp_connectors, + mirehera_connectors, + heraswamp_connectors, thievesdesert_connectors, specrock_connectors, ]: @@ -96,6 +94,19 @@ def create_hybridmajor_connectors(world, player): create_no_logic_connections(player, world, new_connectors) +def get_hybridmajor_connector_entrances(): + connectors = [] + for connector in ( + kikiskip_connectors + + mirehera_connectors + + heraswamp_connectors + + thievesdesert_connectors + + specrock_connectors + ): + connectors.append(connector[0]) + return set(connectors) + + # For some entrances, we need to fake having pearl, because we're in fake DW/LW. # This creates a copy of the input state that has Moon Pearl. def fake_pearl_state(state, player): From 5dc51d4a2cab0e03858c59077d9bfec3c62f8ad5 Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Sat, 12 Oct 2024 16:38:27 +0200 Subject: [PATCH 07/25] Actually check if we can leave IP bomb drop --- UnderworldGlitchRules.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/UnderworldGlitchRules.py b/UnderworldGlitchRules.py index 4544b2ed..a03797b0 100644 --- a/UnderworldGlitchRules.py +++ b/UnderworldGlitchRules.py @@ -1,6 +1,8 @@ -from BaseClasses import Entrance +from BaseClasses import Entrance, DoorType +from DoorShuffle import connect_simple_door import Rules from OverworldGlitchRules import create_no_logic_connections +from Doors import create_door kikiskip_spots = [ ("Kiki Skip", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Portal") @@ -73,6 +75,17 @@ def create_hybridmajor_connections(world, player): ]: create_no_logic_connections(player, world, spots) + # Add the new Ice path (back of bomb drop to front) to the world and model it properly + clip_door = create_door(player, "Ice Bomb Drop Clip", DoorType.Logical) + world.doors += [clip_door] + world.initialize_doors([clip_door]) + + ice_bomb_top_reg = world.get_region("Ice Bomb Drop - Top", player) + ice_bomb_top_reg.exits.append( + Entrance(player, "Ice Bomb Drop Clip", ice_bomb_top_reg) + ) + connect_simple_door(world, "Ice Bomb Drop Clip", "Ice Bomb Drop", player) + # Turn dungeons into connectors def create_hybridmajor_connectors(world, player): From 81a8b3a0f555ac890e0ab6c0c694f6f0b4de2fad Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Sat, 12 Oct 2024 16:42:14 +0200 Subject: [PATCH 08/25] HMG PoD Region fix + reformatting * Create a region in HMG when PoD entrance isn't pre-opened that limits access to the overworld unless already available * Change rule generations to loop * Check for bomb and dash clips properly --- OverworldShuffle.py | 3 + Regions.py | 15 +++- UnderworldGlitchRules.py | 164 +++++++++++++++++++++++++++------------ 3 files changed, 130 insertions(+), 52 deletions(-) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 303aeed2..768588d3 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -15,6 +15,9 @@ def link_overworld(world, player): for exitname, regionname in inverted_mandatory_connections: connect_simple(world, exitname, regionname, player) + if world.logic[player] in ['hybridglitches', 'nologic'] and not world.fix_palaceofdarkness_exit[player]: + connect_two_way(world, 'Palace of Darkness HMG Exit', 'Palace of Darkness HMG Entrance', player) + for forward_edge, back_edge in default_connections: connect_two_way(world, forward_edge, back_edge, player) diff --git a/Regions.py b/Regions.py index 6cb44847..e82dd74b 100644 --- a/Regions.py +++ b/Regions.py @@ -191,8 +191,19 @@ def create_regions(world, player): create_dw_region(player, 'Broken Bridge Area', None, ['Broken Bridge Hammer Rock (South)', 'Broken Bridge Water Drop', 'Broken Bridge SW']), create_dw_region(player, 'Broken Bridge Northeast', None, ['Broken Bridge Hammer Rock (North)', 'Broken Bridge Hookshot Gap', 'Broken Bridge Northeast Water Drop', 'Broken Bridge NE']), create_dw_region(player, 'Broken Bridge West', None, ['Broken Bridge West Water Drop', 'Broken Bridge NW']), - create_dw_region(player, 'Broken Bridge Water', None, ['Broken Bridge NC'], 'Dark World', Terrain.Water), - create_dw_region(player, 'Palace of Darkness Area', None, ['Palace of Darkness Hint', 'Palace of Darkness', 'Palace of Darkness SW', 'Palace of Darkness SE']), + create_dw_region(player, 'Broken Bridge Water', None, ['Broken Bridge NC'], 'Dark World', Terrain.Water) + ] + if world.logic[player] in ['hybridglitches', 'nologic'] and not world.fix_palaceofdarkness_exit[player]: + world.regions += [ + create_dw_region(player, 'Palace of Darkness HMG Area', None, ['Palace of Darkness', 'Palace of Darkness HMG Exit']), + create_dw_region(player, 'Palace of Darkness Area', None, ['Palace of Darkness Hint', 'Palace of Darkness SW', 'Palace of Darkness SE', 'Palace of Darkness HMG Entrance']) + ] + else: + world.regions += [ + create_dw_region(player, 'Palace of Darkness Area', None, ['Palace of Darkness Hint', 'Palace of Darkness', 'Palace of Darkness SW', 'Palace of Darkness SE']) + ] + + world.regions += [ create_dw_region(player, 'Hammer Pegs Area', ['Dark Blacksmith Ruins'], ['Hammer Peg Cave', 'Peg Area Rocks (East)']), create_dw_region(player, 'Hammer Pegs Entry', None, ['Peg Area Rocks (West)', 'Hammer Pegs WS']), create_dw_region(player, 'Dark Dunes Area', None, ['Dark Dunes NW', 'Dark Dunes WN', 'Dark Dunes SC']), diff --git a/UnderworldGlitchRules.py b/UnderworldGlitchRules.py index a03797b0..0f4389df 100644 --- a/UnderworldGlitchRules.py +++ b/UnderworldGlitchRules.py @@ -1,3 +1,4 @@ +import functools from BaseClasses import Entrance, DoorType from DoorShuffle import connect_simple_door import Rules @@ -133,19 +134,45 @@ def fake_pearl_state(state, player): # Sets the rules on where we can actually go using this clip. # Behavior differs based on what type of ER shuffle we're playing. def dungeon_reentry_rules( - world, player, clip: Entrance, dungeon_region: str, dungeon_exit: str + world, + player, + clip: Entrance, + dungeon_region: str, ): fix_dungeon_exits = world.fix_palaceofdarkness_exit[player] fix_fake_worlds = world.fix_fake_world[player] + all_clips = [ + x[0] + for x in kikiskip_spots + + mirehera_spots + + heraswamp_spots + + icepalace_spots + + thievesdesert_spots + + specrock_spots + + paradox_spots + + kikiskip_connectors + + mirehera_connectors + + heraswamp_connectors + + thievesdesert_connectors + + specrock_connectors + ] + dungeon_entrance = [ r for r in world.get_region(dungeon_region, player).entrances - if r.name != clip.name + if r.name not in all_clips ][0] - if ( - not fix_dungeon_exits - ): # vanilla, simple, restricted, dungeonssimple; should never have fake worlds fix + + dungeon_exit = [ + r + for r in world.get_region(dungeon_region, player).exits + if r.name not in all_clips + ][0] + + + if not fix_dungeon_exits: + # vanilla, simple, restricted, dungeonssimple; should never have fake worlds fix # Dungeons are only shuffled among themselves. We need to check SW, MM, and AT because they can't be reentered trivially. # entrance doesn't exist until you fire rod it from the other side @@ -196,32 +223,85 @@ def dungeon_reentry_rules( def underworld_glitches_rules(world, player): - # Ice Palace Entrance Clip, needs bombs or cane of somaria to exit bomb drop room - Rules.add_rule( - world.get_entrance("Ice Bomb Drop SE", player), - lambda state: state.can_dash_clip(world.get_region("Ice Lobby", player), player) - and (state.can_use_bombs(player) or state.has("Cane of Somaria", player)), - combine="or", - ) - - # Kiki Skip - kks = world.get_entrance("Kiki Skip", player) - Rules.set_rule(kks, lambda state: state.can_bomb_clip(kks.parent_region, player)) - dungeon_reentry_rules( - world, player, kks, "Palace of Darkness Portal", "Palace of Darkness Exit" - ) - - # Mire -> Hera -> Swamp def mire_clip(state): - return state.can_reach( - "Mire Torches Top", "Region", player - ) and state.can_dash_clip(world.get_region("Mire Torches Top", player), player) - - def hera_clip(state): - return state.can_reach("Hera 4F", "Region", player) and state.can_dash_clip( - world.get_region("Hera 4F", player), player + torches = world.get_region("Mire Torches Top", player) + return state.can_dash_clip(torches, player) or ( + state.can_bomb_clip(torches, player) and state.has_fire_source(player) ) + def hera_clip(state): + hera = world.get_region("Hera 4F", player) + return state.can_bomb_clip(hera, player) or state.can_dash_clip(hera, player) + + # We use these plus functool.partial because lambdas don't work in loops properly. + def bomb_clip(state, region, player): + return state.can_bomb_clip(region, player) + + def dash_clip(state, region, player): + return state.can_dash_clip(region, player) + + if not world.fix_palaceofdarkness_exit[player]: + Rules.set_rule( + world.get_entrance("Palace of Darkness HMG Exit", player), + lambda state: state.can_reach(world.get_entrance("Palace of Darkness", player), player), + ) + + + # Bomb clips + for clip in ( + kikiskip_spots + + icepalace_spots + + thievesdesert_spots + + specrock_spots + + kikiskip_connectors + + thievesdesert_connectors + + specrock_connectors + ): + region = world.get_region(clip[1], player) + Rules.set_rule( + world.get_entrance(clip[0], player), + functools.partial(bomb_clip, region=region, player=player), + ) + # Dash clips + for clip in icepalace_spots: + region = world.get_region(clip[1], player) + Rules.add_rule( + world.get_entrance(clip[0], player), + functools.partial(dash_clip, region=region, player=player), + combine="or", + ) + + for spot in kikiskip_spots + thievesdesert_spots: + dungeon_reentry_rules( + world, + player, + world.get_entrance(spot[0], player), + spot[2], + ) + + for connector in kikiskip_connectors + thievesdesert_connectors: + dungeon_reentry_rules( + world, + player, + world.get_entrance(connector[0], player), + world.get_entrance(connector[2], player).parent_region.name, + ) + + for clip in mirehera_spots + mirehera_connectors: + Rules.set_rule( + world.get_entrance(clip[0], player), + lambda state: mire_clip(state), + ) + + # Need to be able to escape by hitting the switch from the back + Rules.set_rule( + world.get_entrance("Ice Bomb Drop Clip", player), + lambda state: ( + state.can_use_bombs(player) or state.has("Cane of Somaria", player) + ), + ) + + # Allow mire big key to be used in Hera Rules.add_rule( world.get_entrance("Hera Startile Corner NW", player), lambda state: mire_clip(state) and state.has("Big Key (Misery Mire)", player), @@ -232,20 +312,10 @@ def underworld_glitches_rules(world, player): lambda state: mire_clip(state) and state.has("Big Key (Misery Mire)", player), combine="or", ) - - mire_to_hera = world.get_entrance("Mire to Hera Clip", player) - mire_to_swamp = world.get_entrance("Hera to Swamp Clip", player) - Rules.set_rule(mire_to_hera, mire_clip) + # This uses the mire clip because it's always expected to come from mire Rules.set_rule( - mire_to_swamp, lambda state: mire_clip(state) and state.has("Flippers", player) - ) - - # Using the entrances for various ER types. Hera -> Swamp never matters because you can only logically traverse with the mire keys - dungeon_reentry_rules( - world, player, mire_to_hera, "Hera Lobby", "Tower of Hera Exit" - ) - dungeon_reentry_rules( - world, player, mire_to_swamp, "Swamp Lobby", "Swamp Palace Exit" + world.get_entrance("Hera to Swamp Clip", player), + lambda state: mire_clip(state) and state.has("Flippers", player), ) # We need to set _all_ swamp doors to be openable with mire keys, otherwise the small key can't be behind them - 6 keys because of Pots # Flippers required for all of these doors to prevent locks when flooding @@ -269,7 +339,6 @@ def underworld_glitches_rules(world, player): and state.has("Flippers", player), combine="or", ) - # Rules.add_rule(world.get_entrance(door, player), lambda state: mire_clip(state) and state.has('Flippers', player), combine="or") Rules.add_rule( world.get_location("Trench 1 Switch", player), @@ -322,21 +391,16 @@ def underworld_glitches_rules(world, player): lambda state: mirrorless_moat_rule(state), combine="or", ) + desert_exits = ["West", "South", "East"] - for desert_exit in ["East", "South", "West"]: + for desert_exit in desert_exits: Rules.add_rule( world.get_entrance(f"Thieves to Desert {desert_exit} Connector", player), lambda state: state.can_dash_clip( world.get_region("Thieves Attic", player), player ), ) - dungeon_reentry_rules( - world, - player, - world.get_entrance(f"Thieves to Desert {desert_exit} Connector", player), - f"Desert {desert_exit} Portal", - f"Desert Palace Exit ({desert_exit})", - ) + # Collecting left chests in Paradox Cave using a dash clip -> dash citrus, 1f right, teleport up paradox_left_chests = [ From 8aba0f66fc74708edcea707534ab74a24dc32d37 Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Sat, 12 Oct 2024 16:43:09 +0200 Subject: [PATCH 09/25] Tests update --- test/suite/hmg/flippers_wraps.yaml | 2 - .../hmg/inverted_inaccessible_desert.yaml | 1 - test/suite/hmg/inverted_moon_pearl_locs.yaml | 3 ++ test/suite/hmg/moon_pearl_locs.yaml | 4 +- test/suite/hmg/no_east_dw_from_kikiskip.yaml | 49 +++++++++++++++++++ test/suite/hmg/pearlless_sw.yaml | 8 +++ 6 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 test/suite/hmg/no_east_dw_from_kikiskip.yaml diff --git a/test/suite/hmg/flippers_wraps.yaml b/test/suite/hmg/flippers_wraps.yaml index 3418b4ec..9971a38e 100644 --- a/test/suite/hmg/flippers_wraps.yaml +++ b/test/suite/hmg/flippers_wraps.yaml @@ -19,8 +19,6 @@ advanced_placements: locations: Link's House: True Magic Bat: False -advanced_placements: - 1: - type: Verification item: Progressive Glove locations: diff --git a/test/suite/hmg/inverted_inaccessible_desert.yaml b/test/suite/hmg/inverted_inaccessible_desert.yaml index bb8ad8aa..5e59ca63 100644 --- a/test/suite/hmg/inverted_inaccessible_desert.yaml +++ b/test/suite/hmg/inverted_inaccessible_desert.yaml @@ -5,7 +5,6 @@ settings: logic: hybridglitches mode: inverted shuffle: crossed - start_inventory: 1: - Pegasus Boots diff --git a/test/suite/hmg/inverted_moon_pearl_locs.yaml b/test/suite/hmg/inverted_moon_pearl_locs.yaml index 9ae1a9e1..23ec40fe 100644 --- a/test/suite/hmg/inverted_moon_pearl_locs.yaml +++ b/test/suite/hmg/inverted_moon_pearl_locs.yaml @@ -15,6 +15,9 @@ start_inventory: - Ether - Quake - Bombos + - Big Key (Tower of Hera) + - Big Key (Desert Palace) + - Big Key (Eastern Palace) advanced_placements: 1: - type: Verification diff --git a/test/suite/hmg/moon_pearl_locs.yaml b/test/suite/hmg/moon_pearl_locs.yaml index a18d53d1..13a37f92 100644 --- a/test/suite/hmg/moon_pearl_locs.yaml +++ b/test/suite/hmg/moon_pearl_locs.yaml @@ -3,6 +3,7 @@ meta: settings: 1: logic: hybridglitches + shuffle: vanilla start_inventory: 1: - Pegasus Boots @@ -10,9 +11,8 @@ start_inventory: - Fire Rod - Book of Mudora - Progressive Sword - - Progressive Sword - Lamp - - Magic Mirror + - Hammer - Ether - Quake - Bombos diff --git a/test/suite/hmg/no_east_dw_from_kikiskip.yaml b/test/suite/hmg/no_east_dw_from_kikiskip.yaml new file mode 100644 index 00000000..af5ac2ce --- /dev/null +++ b/test/suite/hmg/no_east_dw_from_kikiskip.yaml @@ -0,0 +1,49 @@ +meta: + players: 1 +settings: + 1: + logic: hybridglitches + shuffle: vanilla +start_inventory: + 1: + - Pegasus Boots + - Flippers + - Fire Rod + - Book of Mudora + - Progressive Sword + - Lamp + - Hammer + - Ether + - Quake + - Bombos + - Bombs (10) +placements: + 1: + # Put mirror in PF so we can't DMD + Pyramid Fairy - Right: Magic Mirror + # Lock all swords and cape behind pearl so we can't do aga 1 for pyramid access + Thieves' Town - Big Chest: Progressive Sword + Thieves' Town - Attic: Progressive Sword + Thieves' Town - Blind's Cell: Progressive Sword + Thieves' Town - Map Chest: Cape +advanced_placements: + 1: + - type: Verification + item: Moon Pearl + locations: + Palace of Darkness - Shooter Room: True + Palace of Darkness - The Arena - Bridge: True + Palace of Darkness - Stalfos Basement: True + Palace of Darkness - Big Key Chest: True + Palace of Darkness - The Arena - Ledge: True + Palace of Darkness - Map Chest: True + Palace of Darkness - Compass Chest: True + Palace of Darkness - Dark Basement - Left: True + Palace of Darkness - Dark Basement - Right: True + Palace of Darkness - Dark Maze - Top: True + Palace of Darkness - Dark Maze - Bottom: True + Palace of Darkness - Big Chest: True + Palace of Darkness - Harmless Hellway: True + Palace of Darkness - Boss: True + Pyramid Fairy - Left: False + Pyramid: False diff --git a/test/suite/hmg/pearlless_sw.yaml b/test/suite/hmg/pearlless_sw.yaml index c26ce1d9..3b097028 100644 --- a/test/suite/hmg/pearlless_sw.yaml +++ b/test/suite/hmg/pearlless_sw.yaml @@ -9,6 +9,7 @@ start_inventory: - Flippers - Pegasus Boots - Progressive Sword + - Progressive Sword - Hammer - Progressive Glove - Progressive Glove @@ -17,9 +18,16 @@ start_inventory: - Bottle - Magic Mirror - Lamp + - Beat Agahnim 1 + - Cane of Somaria + - Hookshot + - Quake + - Ether + - Bombos advanced_placements: 1: - type: Verification item: Moon Pearl locations: Skull Woods - Bridge Room: True + Skull Woods - Boss: True From 76834a477a25a3b73e76081e344f916199a63bd6 Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Thu, 12 Dec 2024 20:44:26 +0100 Subject: [PATCH 10/25] Don't ever check playthough when all seeds are no logic --- Main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Main.py b/Main.py index bd249668..4d806e96 100644 --- a/Main.py +++ b/Main.py @@ -426,6 +426,10 @@ def main(args, seed=None, fish=None): if 'debug' in world.spoiler.settings: world.spoiler.extras(output_path(f'{outfilebase}_Spoiler.txt')) + player_logics = set(world.logic.values()) + if len(player_logics) == 1 and 'nologic' in player_logics: + args.skip_playthrough = True + if not args.skip_playthrough: logger.info(world.fish.translate("cli","cli","calc.playthrough")) create_playthrough(world) From 1c33f793e0895149f8c6e9d7cac53fee8e9a999d Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Thu, 12 Dec 2024 20:56:59 +0100 Subject: [PATCH 11/25] SP Bosstest for MP --- test/suite/hmg/moon_pearl_locs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/test/suite/hmg/moon_pearl_locs.yaml b/test/suite/hmg/moon_pearl_locs.yaml index 13a37f92..b2d418b1 100644 --- a/test/suite/hmg/moon_pearl_locs.yaml +++ b/test/suite/hmg/moon_pearl_locs.yaml @@ -41,6 +41,7 @@ advanced_placements: C-Shaped House: True Pyramid Fairy - Left: True Swamp Palace - Entrance: False + Swamp Palace - Boss: False Thieves' Town - Map Chest: False From 252a99f0d2c6718e916b72854e1d8b3b30c1a8bd Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Mon, 16 Dec 2024 00:06:54 +0100 Subject: [PATCH 12/25] Revamp HMG logic --- Main.py | 32 +++-- OverworldGlitchRules.py | 14 ++- OverworldShuffle.py | 3 - Regions.py | 15 +-- UnderworldGlitchRules.py | 111 +++--------------- .../hmg/inverted_inaccessible_desert.yaml | 4 + test/suite/hmg/pod_mp.yaml | 13 ++ 7 files changed, 71 insertions(+), 121 deletions(-) create mode 100644 test/suite/hmg/pod_mp.yaml diff --git a/Main.py b/Main.py index 4d806e96..fcb50142 100644 --- a/Main.py +++ b/Main.py @@ -27,7 +27,7 @@ from Fill import distribute_items_restrictive, promote_dungeon_items, fill_dunge from Fill import dungeon_tracking from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops, fill_specific_items -from UnderworldGlitchRules import create_hybridmajor_connections, create_hybridmajor_connectors, get_hybridmajor_connector_entrances +from UnderworldGlitchRules import create_hybridmajor_connections, get_hybridmajor_connection_entrances from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config, verify_item_pool_config @@ -222,8 +222,6 @@ def main(args, seed=None, fish=None): world.data_tables[player] = init_data_tables(world, player) place_bosses(world, player) randomize_enemies(world, player) - if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connections(world, player) adjust_locations(world, player) if world.customizer and world.customizer.get_start_inventory(): @@ -264,8 +262,6 @@ def main(args, seed=None, fish=None): link_overworld(world, player) create_dynamic_exits(world, player) link_entrances_new(world, player) - if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connectors(world, player) logger.info(world.fish.translate("cli", "cli", "shuffling.prep")) for player in range(1, world.players + 1): @@ -285,6 +281,8 @@ def main(args, seed=None, fish=None): logger.info(world.fish.translate("cli", "cli", "generating.itempool")) for player in range(1, world.players + 1): + if world.logic[player] in ('nologic', 'hybridglitches'): + create_hybridmajor_connections(world, player) generate_itempool(world, player) verify_item_pool_config(world) @@ -533,8 +531,6 @@ def copy_world(world): create_dungeons(ret, player) if world.logic[player] in ('owglitches', 'hybridglitches', 'nologic'): create_owg_connections(ret, player) - if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connections(ret, player) # there are region references here they must be migrated to preserve integrity @@ -561,7 +557,10 @@ def copy_world(world): # connect copied world copied_locations = {(loc.name, loc.player): loc for loc in ret.get_locations()} # caches all locations - hmg_entrances = get_hybridmajor_connector_entrances() + + # We have to skip these for now. They require both the rest of the entrances _and_ the dungeon portals to be copied first + # We will connect them later + hmg_entrances = get_hybridmajor_connection_entrances() for region in world.regions: copied_region = ret.get_region(region.name, region.player) @@ -621,7 +620,22 @@ def copy_world(world): for player in range(1, world.players + 1): if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connectors(ret, player) + create_hybridmajor_connections(ret, player) + + for region in world.regions: + copied_region = ret.get_region(region.name, region.player) + copied_region.is_light_world = region.is_light_world + copied_region.is_dark_world = region.is_dark_world + copied_region.dungeon = region.dungeon + copied_region.locations = [copied_locations[(location.name, location.player)] for location in region.locations] + for location in copied_region.locations: + location.parent_region = copied_region + for entrance in region.entrances: + if entrance.name not in hmg_entrances: + continue + ret.get_entrance(entrance.name, entrance.player).connect(copied_region) + + for player in range(1, world.players + 1): set_rules(ret, player) return ret diff --git a/OverworldGlitchRules.py b/OverworldGlitchRules.py index 97883dc6..55e9d896 100644 --- a/OverworldGlitchRules.py +++ b/OverworldGlitchRules.py @@ -2,7 +2,7 @@ Helper functions to deliver entrance/exit/region sets to OWG rules. """ -from BaseClasses import Entrance +from BaseClasses import Entrance, Region # Cave regions that superbunny can get through - but only with a sword. sword_required_superbunny_mirror_regions = ["Spiral Cave (Top)"] @@ -283,10 +283,18 @@ def add_alternate_rule(entrance, rule): entrance.access_rule = lambda state: old_rule(state) or rule(state) -def create_no_logic_connections(player, world, connections): +def create_no_logic_connections(player, world, connections, connect_external=False): for entrance, parent_region, target_region, *rule_override in connections: parent = world.get_region(parent_region, player) - target = world.get_region(target_region, player) + + if isinstance(target_region, Region): + target_region = target_region.name + + if connect_external and target_region.endswith(" Portal"): + target = world.get_portal(target_region[:-7], player).find_portal_entrance().parent_region + else: + target = world.get_region(target_region, player) + connection = Entrance(player, entrance, parent) parent.exits.append(connection) connection.connect(target) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 768588d3..303aeed2 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -15,9 +15,6 @@ def link_overworld(world, player): for exitname, regionname in inverted_mandatory_connections: connect_simple(world, exitname, regionname, player) - if world.logic[player] in ['hybridglitches', 'nologic'] and not world.fix_palaceofdarkness_exit[player]: - connect_two_way(world, 'Palace of Darkness HMG Exit', 'Palace of Darkness HMG Entrance', player) - for forward_edge, back_edge in default_connections: connect_two_way(world, forward_edge, back_edge, player) diff --git a/Regions.py b/Regions.py index e82dd74b..6cb44847 100644 --- a/Regions.py +++ b/Regions.py @@ -191,19 +191,8 @@ def create_regions(world, player): create_dw_region(player, 'Broken Bridge Area', None, ['Broken Bridge Hammer Rock (South)', 'Broken Bridge Water Drop', 'Broken Bridge SW']), create_dw_region(player, 'Broken Bridge Northeast', None, ['Broken Bridge Hammer Rock (North)', 'Broken Bridge Hookshot Gap', 'Broken Bridge Northeast Water Drop', 'Broken Bridge NE']), create_dw_region(player, 'Broken Bridge West', None, ['Broken Bridge West Water Drop', 'Broken Bridge NW']), - create_dw_region(player, 'Broken Bridge Water', None, ['Broken Bridge NC'], 'Dark World', Terrain.Water) - ] - if world.logic[player] in ['hybridglitches', 'nologic'] and not world.fix_palaceofdarkness_exit[player]: - world.regions += [ - create_dw_region(player, 'Palace of Darkness HMG Area', None, ['Palace of Darkness', 'Palace of Darkness HMG Exit']), - create_dw_region(player, 'Palace of Darkness Area', None, ['Palace of Darkness Hint', 'Palace of Darkness SW', 'Palace of Darkness SE', 'Palace of Darkness HMG Entrance']) - ] - else: - world.regions += [ - create_dw_region(player, 'Palace of Darkness Area', None, ['Palace of Darkness Hint', 'Palace of Darkness', 'Palace of Darkness SW', 'Palace of Darkness SE']) - ] - - world.regions += [ + create_dw_region(player, 'Broken Bridge Water', None, ['Broken Bridge NC'], 'Dark World', Terrain.Water), + create_dw_region(player, 'Palace of Darkness Area', None, ['Palace of Darkness Hint', 'Palace of Darkness', 'Palace of Darkness SW', 'Palace of Darkness SE']), create_dw_region(player, 'Hammer Pegs Area', ['Dark Blacksmith Ruins'], ['Hammer Peg Cave', 'Peg Area Rocks (East)']), create_dw_region(player, 'Hammer Pegs Entry', None, ['Peg Area Rocks (West)', 'Hammer Pegs WS']), create_dw_region(player, 'Dark Dunes Area', None, ['Dark Dunes NW', 'Dark Dunes WN', 'Dark Dunes SC']), diff --git a/UnderworldGlitchRules.py b/UnderworldGlitchRules.py index 0f4389df..beb95ed9 100644 --- a/UnderworldGlitchRules.py +++ b/UnderworldGlitchRules.py @@ -29,42 +29,10 @@ paradox_spots = [ ("Paradox Front Teleport", "Paradox Cave Front", "Paradox Cave Chest Area") ] - -# We need to make connectors at a separate time from the connections, because of how dungeons are linked to regions -kikiskip_connectors = [ - ("Kiki Skip Connector", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Exit") -] -mirehera_connectors = [ - ("Mire to Hera Connector", "Mire Torches Top", "Tower of Hera Exit") -] -heraswamp_connectors = [ - ("Mire to Swamp Connector", "Mire Torches Top", "Swamp Palace Exit") -] -thievesdesert_connectors = [ - ("Thieves to Desert West Connector", "Thieves Attic", "Desert Palace Exit (West)"), - ( - "Thieves to Desert South Connector", - "Thieves Attic", - "Desert Palace Exit (South)", - ), - ("Thieves to Desert East Connector", "Thieves Attic", "Desert Palace Exit (East)"), -] -specrock_connectors = [ - ( - "Spec Rock Top Connector", - "Spectacle Rock Cave (Peak)", - "Spectacle Rock Cave Exit (Top)", - ), - ( - "Spec Rock Exit Connector", - "Spectacle Rock Cave (Peak)", - "Spectacle Rock Cave Exit", - ), -] - - # Create connections between dungeons/locations def create_hybridmajor_connections(world, player): + fix_fake_worlds = world.fix_fake_world[player] + for spots in [ kikiskip_spots, mirehera_spots, @@ -74,7 +42,7 @@ def create_hybridmajor_connections(world, player): specrock_spots, paradox_spots, ]: - create_no_logic_connections(player, world, spots) + create_no_logic_connections(player, world, spots, connect_external=fix_fake_worlds) # Add the new Ice path (back of bomb drop to front) to the world and model it properly clip_door = create_door(player, "Ice Bomb Drop Clip", DoorType.Logical) @@ -87,39 +55,20 @@ def create_hybridmajor_connections(world, player): ) connect_simple_door(world, "Ice Bomb Drop Clip", "Ice Bomb Drop", player) - -# Turn dungeons into connectors -def create_hybridmajor_connectors(world, player): - for connectors in [ - kikiskip_connectors, - mirehera_connectors, - heraswamp_connectors, - thievesdesert_connectors, - specrock_connectors, - ]: - new_connectors = [ - ( - connector[0], - connector[1], - world.get_entrance(connector[2], player).connected_region, - ) - for connector in connectors - ] - create_no_logic_connections(player, world, new_connectors) - - -def get_hybridmajor_connector_entrances(): - connectors = [] +def get_hybridmajor_connection_entrances(): + connections = [] for connector in ( - kikiskip_connectors - + mirehera_connectors - + heraswamp_connectors - + thievesdesert_connectors - + specrock_connectors - ): - connectors.append(connector[0]) - return set(connectors) - + kikiskip_spots + + mirehera_spots + + heraswamp_spots + + icepalace_spots + + thievesdesert_spots + + specrock_spots + + paradox_spots + ): + connections.append(connector[0]) + connections.append('Ice Bomb Drop Clip') + return set(connections) # For some entrances, we need to fake having pearl, because we're in fake DW/LW. # This creates a copy of the input state that has Moon Pearl. @@ -151,11 +100,6 @@ def dungeon_reentry_rules( + thievesdesert_spots + specrock_spots + paradox_spots - + kikiskip_connectors - + mirehera_connectors - + heraswamp_connectors - + thievesdesert_connectors - + specrock_connectors ] dungeon_entrance = [ @@ -239,23 +183,12 @@ def underworld_glitches_rules(world, player): def dash_clip(state, region, player): return state.can_dash_clip(region, player) - - if not world.fix_palaceofdarkness_exit[player]: - Rules.set_rule( - world.get_entrance("Palace of Darkness HMG Exit", player), - lambda state: state.can_reach(world.get_entrance("Palace of Darkness", player), player), - ) - - # Bomb clips for clip in ( kikiskip_spots + icepalace_spots + thievesdesert_spots + specrock_spots - + kikiskip_connectors - + thievesdesert_connectors - + specrock_connectors ): region = world.get_region(clip[1], player) Rules.set_rule( @@ -279,15 +212,7 @@ def underworld_glitches_rules(world, player): spot[2], ) - for connector in kikiskip_connectors + thievesdesert_connectors: - dungeon_reentry_rules( - world, - player, - world.get_entrance(connector[0], player), - world.get_entrance(connector[2], player).parent_region.name, - ) - - for clip in mirehera_spots + mirehera_connectors: + for clip in mirehera_spots: Rules.set_rule( world.get_entrance(clip[0], player), lambda state: mire_clip(state), @@ -395,7 +320,7 @@ def underworld_glitches_rules(world, player): for desert_exit in desert_exits: Rules.add_rule( - world.get_entrance(f"Thieves to Desert {desert_exit} Connector", player), + world.get_entrance(f"Thieves to Desert {desert_exit} Clip", player), lambda state: state.can_dash_clip( world.get_region("Thieves Attic", player), player ), diff --git a/test/suite/hmg/inverted_inaccessible_desert.yaml b/test/suite/hmg/inverted_inaccessible_desert.yaml index 5e59ca63..2a55777d 100644 --- a/test/suite/hmg/inverted_inaccessible_desert.yaml +++ b/test/suite/hmg/inverted_inaccessible_desert.yaml @@ -14,6 +14,8 @@ start_inventory: placements: 1: Desert Palace - Boss: Moon Pearl + Desert Palace - Prize: Green Pendant + Sahasrahla: Magic Mirror entrances: 1: two-way: @@ -22,4 +24,6 @@ entrances: Thieves Town: Thieves Town Exit Hyrule Castle Entrance (East): Desert Palace Exit (South) Hyrule Castle Entrance (West): Desert Palace Exit (North) + entrances: + Agahnims Tower: Pyramid Fairy diff --git a/test/suite/hmg/pod_mp.yaml b/test/suite/hmg/pod_mp.yaml new file mode 100644 index 00000000..19de4b63 --- /dev/null +++ b/test/suite/hmg/pod_mp.yaml @@ -0,0 +1,13 @@ +meta: + players: 1 +settings: + 1: + logic: hybridglitches + mode: open + shuffle: vanilla +start_inventory: + 1: + - Pegasus Boots +placements: + 1: + Palace of Darkness - Shooter Room: Moon Pearl \ No newline at end of file From 8ec25d8476b67fbf482e71e4ec8a0ea236fdc45a Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Mon, 16 Dec 2024 15:22:18 +0100 Subject: [PATCH 13/25] Trim down unnecessary parts of loop --- Main.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Main.py b/Main.py index fcb50142..ea73d590 100644 --- a/Main.py +++ b/Main.py @@ -624,12 +624,6 @@ def copy_world(world): for region in world.regions: copied_region = ret.get_region(region.name, region.player) - copied_region.is_light_world = region.is_light_world - copied_region.is_dark_world = region.is_dark_world - copied_region.dungeon = region.dungeon - copied_region.locations = [copied_locations[(location.name, location.player)] for location in region.locations] - for location in copied_region.locations: - location.parent_region = copied_region for entrance in region.entrances: if entrance.name not in hmg_entrances: continue From fb6727c5279f86605f242b637f1b156c779d052b Mon Sep 17 00:00:00 2001 From: Cody Date: Mon, 21 Oct 2024 13:47:14 -0400 Subject: [PATCH 14/25] Fix NoneType object error when BK in starting inventory ZenArcane has a mode that starts you with all the big keys, maps, compasses, and enough universal small keys to open all doors. The item pool is updated to remove them, but generation fails due to NoneType item variables. This changes how current_amount is determined to prevent a NoneType variable access and allows for generation to continue. I haven't noticed any adverse side-effects to this, so I decided to PR this upstream. --- ItemList.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ItemList.py b/ItemList.py index be1f744c..3a74d106 100644 --- a/ItemList.py +++ b/ItemList.py @@ -1280,7 +1280,7 @@ def make_customizer_pool(world, player): or (d_item.map and not world.mapshuffle[player])): d_name = d_item.dungeon dungeon = world.get_dungeon(d_name, player) - current_amount = 1 if d_item == dungeon.big_key or d_item in dungeon.dungeon_items else 0 + current_amount = 1 if dungeon.big_key and (d_item == dungeon.big_key or d_item in dungeon.dungeon_items) else 0 additional_amount = amount - current_amount possible_fit = min(additional_amount, len(dungeon_locations[d_name])-dungeon_count[d_name]) if possible_fit > 0: @@ -1291,7 +1291,7 @@ def make_customizer_pool(world, player): pool.extend([item_name] * amount) else: dungeon = world.get_dungeon(d_item.dungeon, player) - current_amount = 1 if d_item == dungeon.big_key or d_item in dungeon.dungeon_items else 0 + current_amount = 1 if dungeon.big_key and (d_item == dungeon.big_key or d_item in dungeon.dungeon_items) else 0 additional_amount = amount - current_amount dungeon.dungeon_items.extend([d_item] * additional_amount) else: From 338e949213daa89e9da9a5907aca65c01022b248 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 17 Dec 2024 15:38:59 -0700 Subject: [PATCH 15/25] feat: update docs and version --- CHANGELOG.md | 8 ++++++++ Main.py | 2 +- RELEASENOTES.md | 15 ++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b209701..e1bd83c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ Changelog archive +* 1.4.6 + - Restores original Sanc & Quit behavior, if Aga1 is not dead, then no quick pyramid warp + - Fixed problem with Lite/Lean shuffling some fairy caves unnecessarily + - The 300 Rupees item is now marked as priority, so it will not be used as GT junk fill (this matches a change in the VT randomizer) + - Murahdahla is now logically accessible in inverted mode as a bunny. May affect some beatable-only TFH seeds by allowing Moon Pearl to be inaccessible. + - Fixed an issue around PreferredLocationGroups in customizer which would not work with pre-activated Ocraina or priority items. + - Minor fix on triforce text + - Enemy bans for poor placements * 1.4.5 - Logic: Added appropriate enemy logic to GT Mimics 1 and 2 rooms - Logic: Added appropriate enemy logic to Mire 2 room. Note this does change the default logical strats, due to how enemy kill logic works. diff --git a/Main.py b/Main.py index ea73d590..b78eb325 100644 --- a/Main.py +++ b/Main.py @@ -38,7 +38,7 @@ from source.enemizer.DamageTables import DamageTable from source.enemizer.Enemizer import randomize_enemies from source.rom.DataTables import init_data_tables -version_number = '1.4.6' +version_number = '1.4.7' version_branch = '-u' __version__ = f'{version_number}{version_branch}' diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6dedb16d..7f3f17bb 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,11 +1,8 @@ # Patch Notes -1.4.6 - -- Restores original Sanc & Quit behavior, if Aga1 is not dead, then no quick pyramid warp -- Fixed problem with Lite/Lean shuffling some fairy caves unnecessarily -- The 300 Rupees item is now marked as priority, so it will not be used as GT junk fill (this matches a change in the VT randomizer) -- Murahdahla is now logically accessible in inverted mode as a bunny. May affect some beatable-only TFH seeds by allowing Moon Pearl to be inaccessible. -- Fixed an issue around PreferredLocationGroups in customizer which would not work with pre-activated Ocraina or priority items. -- Minor fix on triforce text -- Enemy bans for poor placements +* 1.4.7 + - Fixed generation error with Big Key in starting inventory (thanks Cody!) + - HMG/NL logic fixes by Muffins + - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons + - Logic error with enemizer and standard should use new enemy logic rules + - Fixed a bug with the inconsistent treatment of the beemizer setting From 4f1f61bc6889114959aa5d2a332ab08ddc321e01 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 17 Dec 2024 16:12:49 -0700 Subject: [PATCH 16/25] fix: simple shuffle blacksmith --- RELEASENOTES.md | 1 + Rom.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7f3f17bb..75092b3d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -6,3 +6,4 @@ - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons - Logic error with enemizer and standard should use new enemy logic rules - Fixed a bug with the inconsistent treatment of the beemizer setting + - Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House) diff --git a/Rom.py b/Rom.py index a3060fcf..1d2b8864 100644 --- a/Rom.py +++ b/Rom.py @@ -1361,7 +1361,7 @@ def patch_rom(world, rom, player, team, is_mystery=False): rom.write_bytes(0x02F539, [0xEA, 0xEA, 0xEA, 0xEA, 0xEA] if world.powder_patch_required[player] else [0xAD, 0xBF, 0x0A, 0xF0, 0x4F]) # allow smith into multi-entrance caves in appropriate shuffles - if world.shuffle[player] in ['restricted', 'full', 'lite', 'lean', 'swapped', 'crossed', 'insanity'] or (world.shuffle[player] == 'simple' and world.mode[player] == 'inverted'): + if world.shuffle[player] in ['restricted', 'simple', 'full', 'lite', 'lean', 'swapped', 'crossed', 'insanity']: rom.write_byte(0x18004C, 0x01) # set correct flag for hera basement item From 01f3f6ad50b73521ba07ce21a4de9331258047f4 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 17 Dec 2024 16:17:55 -0700 Subject: [PATCH 17/25] fix: dark sanc at tavern north fix: gt exit point for all players --- Plando.py | 2 +- RELEASENOTES.md | 1 + Rom.py | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Plando.py b/Plando.py index b2da5ba0..c65b6d02 100755 --- a/Plando.py +++ b/Plando.py @@ -132,7 +132,7 @@ def fill_world(world, plando, text_patches): world.fix_trock_exit = {1: trfstr.strip().lower() == 'true'} elif line.startswith('!fix_gtower_exit'): _, gtfstr = line.split(':', 1) - world.fix_gtower_exit = gtfstr.strip().lower() == 'true' + world.fix_gtower_exit = {1: gtfstr.strip().lower() == 'true'} elif line.startswith('!fix_pod_exit'): _, podestr = line.split(':', 1) world.fix_palaceofdarkness_exit = {1: podestr.strip().lower() == 'true'} diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 75092b3d..eb374b5b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -7,3 +7,4 @@ - Logic error with enemizer and standard should use new enemy logic rules - Fixed a bug with the inconsistent treatment of the beemizer setting - Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House) + - Fixed an issue with dark sanc spawn at tavern north door (thanks Codemann!) diff --git a/Rom.py b/Rom.py index 1d2b8864..a3654c8c 100644 --- a/Rom.py +++ b/Rom.py @@ -520,7 +520,7 @@ def patch_rom(world, rom, player, team, is_mystery=False): write_int16(rom, 0x15DB5 + 2 * offset, 0x0640) elif room_id == 0x00d6 and world.fix_trock_exit[player]: write_int16(rom, 0x15DB5 + 2 * offset, 0x0134) - elif room_id == 0x000c and world.fix_gtower_exit: # fix ganons tower exit point + elif room_id == 0x000c and world.fix_gtower_exit[player]: # fix ganons tower exit point write_int16(rom, 0x15DB5 + 2 * offset, 0x00A4) else: write_int16(rom, 0x15DB5 + 2 * offset, link_y) @@ -2512,6 +2512,8 @@ def patch_shuffled_dark_sanc(world, rom, player): dark_sanc = world.get_region('Dark Sanctuary Hint', player) dark_sanc_entrance = str([i for i in dark_sanc.entrances if i.parent_region.name != 'Menu'][0].name) room_id, ow_area, vram_loc, scroll_y, scroll_x, link_y, link_x, camera_y, camera_x, unknown_1, unknown_2, door_1, door_2 = door_addresses[dark_sanc_entrance][1] + if dark_sanc_entrance == 'Tavern North': + link_y -= 0x10 # rom code assumes south-facing doors and adds $10 to the y-coordinate door_index = door_addresses[str(dark_sanc_entrance)][0] rom.write_byte(0x180241, 0x01) From 96f646b1abfee44fcbaa0b33b9be115999fbfe54 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 19 Dec 2024 15:00:34 -0700 Subject: [PATCH 18/25] fix: prevent enemizer crash with walking zora fix: various enemy bans --- RELEASENOTES.md | 4 +++- source/enemizer/SpriteSheets.py | 2 +- source/enemizer/enemy_deny.yaml | 29 +++++++++++++++++++---------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index eb374b5b..ec16bd30 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -3,8 +3,10 @@ * 1.4.7 - Fixed generation error with Big Key in starting inventory (thanks Cody!) - HMG/NL logic fixes by Muffins + - Enemizer: Disabled Wlkaing Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway) - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons - Logic error with enemizer and standard should use new enemy logic rules - Fixed a bug with the inconsistent treatment of the beemizer setting - Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House) - - Fixed an issue with dark sanc spawn at tavern north door (thanks Codemann!) + - Fixed an issue with dark sanctuary spawn at tavern north door (thanks Codemann!) + - Various enemy bans for the last couple months diff --git a/source/enemizer/SpriteSheets.py b/source/enemizer/SpriteSheets.py index 4d89a29e..b1b24064 100644 --- a/source/enemizer/SpriteSheets.py +++ b/source/enemizer/SpriteSheets.py @@ -237,7 +237,7 @@ def init_sprite_requirements(): SpriteRequirement(EnemySprite.ArmosKnight).exalt().sub_group(3, 0x1d), SpriteRequirement(EnemySprite.Lanmolas).exalt().sub_group(3, 0x31), SpriteRequirement(EnemySprite.FireballZora).immerse().no_drop().sub_group(2, [0xc, 0x18]), # .uw_skip() test - SpriteRequirement(EnemySprite.Zora).sub_group(2, 0xc).sub_group(3, 0x44), # .uw_skip() test + SpriteRequirement(EnemySprite.Zora).sub_group(2, 0xc).sub_group(3, 0x44).uw_skip(), SpriteRequirement(EnemySprite.DesertStatue).affix().sub_group(2, 0x12), SpriteRequirement(EnemySprite.Crab).sub_group(2, 0xc), SpriteRequirement(EnemySprite.LostWoodsBird).affix().sub_group(2, 0x37).sub_group(3, 0x36), diff --git a/source/enemizer/enemy_deny.yaml b/source/enemizer/enemy_deny.yaml index 301abda2..069bb668 100644 --- a/source/enemizer/enemy_deny.yaml +++ b/source/enemizer/enemy_deny.yaml @@ -17,9 +17,9 @@ UwGeneralDeny: - [ 0x000e, 0, [ "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft" ] ] #"Ice Palace - Entrance - Freezor" - [ 0x000e, 1, [ "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft" ] ] #"Ice Palace - Bari Key - Top Bari" - [ 0x000e, 2, [ "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft" ] ] #"Ice Palace - Bari Key - Middle Bari" - - [ 0x0016, 0, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper", "GreenMimic", "RedMimic", "Pikit"] ] #"Swamp Palace - Pool - Zol 1" - - [ 0x0016, 1, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper", "GreenMimic", "RedMimic", "Pikit" ] ] #"Swamp Palace - Pool - Zol 2" - - [ 0x0016, 2, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper", "GreenMimic", "RedMimic", "Pikit" ] ] #"Swamp Palace - Pool - Blue Bari" + - [ 0x0016, 0, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper", "GreenMimic", "RedMimic", "Pikit", "Deadrock"] ] #"Swamp Palace - Pool - Zol 1" + - [ 0x0016, 1, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper", "GreenMimic", "RedMimic", "Pikit", "Deadrock" ] ] #"Swamp Palace - Pool - Zol 2" + - [ 0x0016, 2, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper", "GreenMimic", "RedMimic", "Pikit", "Deadrock" ] ] #"Swamp Palace - Pool - Blue Bari" - [ 0x0016, 3, [ "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Swamp Palace - Pool - Zol 3" - [ 0x0017, 5, [ "Beamos", "AntiFairyCircle", "SpikeBlock", "Bumper" ] ] #"Tower Of Hera - Bumper Room - Fire Bar (Clockwise)" - [ 0x0019, 0, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "Beamos", "AntiFairyCircle", "BigSpike", "Bumper" ] ] #"Palace of Darkness - Dark Maze - Kodongo 1" @@ -43,7 +43,7 @@ UwGeneralDeny: - [ 0x0024, 6, [ "Wizzrobe", "Statue" ] ] # Wizzrobes can't spawn on pots - [ 0x0026, 1, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalRight", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper", "Statue" ] ] #"Swamp Palace - Big Spoon - Red Bari 1" - [ 0x0026, 8, [ "AntiFairyCircle", "Bumper", "Statue" ] ] #"Swamp Palace - Big Spoon - Red Bari 3" - - [ 0x0026, 9, [ "RollerHorizontalRight", "Statue" ] ] #"Swamp Palace - Big Spoon - Kyameron" + - [0x0026, 9, ["RollerHorizontalRight", "Statue", "BigSpike"]] #"Swamp Palace - Big Spoon - Kyameron" - [ 0x0026, 10, [ "Statue" ] ] # multiple push statues in this room can cause issues - [ 0x0026, 11, [ "Statue" ] ] # multiple push statues in this room can cause issues - [ 0x0027, 0, [ "SparkCW", "SparkCCW", "RollerVerticalDown", "RollerVerticalUp", "RollerHorizontalLeft", "FirebarCW" ] ] #"Tower Of Hera - Petting Zoo - Mini Moldorm 1" @@ -84,6 +84,7 @@ UwGeneralDeny: - [ 0x0039, 4, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "FirebarCW", "FirebarCCW" ] ] #"Skull Woods - Play Pen - Spike Trap 1" - [0x0039, 5, ["RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "Bumper"]] #"Skull Woods - Play Pen - Hardhat Beetle" - [ 0x0039, 6, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "FirebarCW", "FirebarCCW" ] ] #"Skull Woods - Play Pen - Spike Trap 2" + - [0x003a, 1, ["RollerVerticalUp"]] - [ 0x003b, 1, [ "Bumper" ]] - [ 0x003b, 4, ["RollerVerticalUp", "RollerVerticalDown"]] - [ 0x003c, 0, ["BigSpike"]] @@ -92,7 +93,7 @@ UwGeneralDeny: - [ 0x003d, 9, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Ganon's Tower - Torches 2 - Spark (Counterclockwise)" - [ 0x003d, 10, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Ganon's Tower - Torches 2 - Spark (Clockwise) 1" - [ 0x003d, 12, [ "AntiFairyCircle", "Bumper" ] ] #"Ganon's Tower - Torches 2 - Bunny Beam" - - [ 0x003d, 13, [ "AntiFairyCircle", "Bumper" ] ] #"Ganon's Tower - Torches 2 - Antifairy" + - [0x003d, 13, ["AntiFairyCircle", "Bumper", "RollerHorizontalLeft", "RollerHorizontalRight"]] #"Ganon's Tower - Torches 2 - Antifairy" - [0x003e, 8, ["Wizzrobe"]] - [0x003e, 9, ["Wizzrobe", "GreenMimic", "RedMimic", "RedEyegoreMimic", "GreenEyegoreMimic"]] # drops a key by default - [0x003e, 10, ["Wizzrobe"]] @@ -171,7 +172,7 @@ UwGeneralDeny: - [0x0059, 5, ["RollerVerticalUp", "RollerVerticalDown", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper"]] - [ 0x0059, 9, [ "RollerVerticalUp", "RollerVerticalDown", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Skull Woods - Bridge Room - Gibdo 1" - [ 0x005e, 3, [ "RollerHorizontalLeft", "RollerHorizontalRight", "Beamos", "AntiFairyCircle", "SpikeBlock", "Bumper" ] ] #"Ice Palace - Pit Trap - Big Spike Trap" - - [ 0x005e, 4, [ "RollerVerticalUp", "RollerVerticalDown" ] ] #"Ice Palace - Pit Trap - Fire Bar (Clockwise)" + - [0x005e, 4, ["RollerVerticalUp", "RollerVerticalDown", "SpikeBlock"]] #"Ice Palace - Pit Trap - Fire Bar (Clockwise)" - [ 0x005f, 0, [ "RollerVerticalDown", "RollerHorizontalLeft" ] ] #"Ice Palace - Bari University - Blue Bari 1" - [ 0x005f, 1, [ "RollerVerticalDown", "RollerHorizontalRight" ] ] #"Ice Palace - Bari University - Blue Bari 2" - [ 0x0060, 0, [ "RollerVerticalUp", "RollerHorizontalLeft", "AntiFairyCircle", "BigSpike", "Bumper", "Beamos", "SpikeBlock" ] ] #"Hyrule Castle - West - Blue Guard" @@ -198,6 +199,7 @@ UwGeneralDeny: - [ 0x006a, 5, [ "RollerVerticalUp", "RollerVerticalDown", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Palace of Darkness - Dark Alley - Terrorpin 4" - [ 0x006b, 7, [ "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "Bumper" ] ] #"Ganon's Tower - Mimics 1 - Spike Trap 1" - [ 0x0071, 0, [ "RollerHorizontalLeft" ] ] #"Hyrule Castle - Basement Trap - Green Guard" + - [0x0072, 1, ["RollerHorizontalLeft", "RollerHorizontalRight"]] - [ 0x0074, 0, [ "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Desert Palace - North Hallway - Red Devalant 1" - [ 0x0074, 1, [ "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Desert Palace - North Hallway - Red Devalant 2" - [ 0x0074, 4, [ "AntiFairyCircle", "Bumper" ] ] #"Desert Palace - North Hallway - Leever 1" @@ -275,6 +277,7 @@ UwGeneralDeny: - [ 0x009c, 3, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Ganon's Tower - Invisible Floor Maze - Hardhat Beetle 3" - [ 0x009c, 4, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "AntiFairyCircle", "BigSpike", "Bumper" ] ] #"Ganon's Tower - Invisible Floor Maze - Hardhat Beetle 4" - [ 0x009c, 5, [ "RollerVerticalUp", "AntiFairyCircle", "BigSpike", "Bumper" ] ] #"Ganon's Tower - Invisible Floor Maze - Hardhat Beetle 5" + - [0x009c, 6, ["AntiFairyCircle", "Bumper"]] - [0x009d, 2, ["AntiFairyCircle"]] - [ 0x009d, 3, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Ganon's Tower - Compass Room - Gibdo 2" - [ 0x009d, 6, [ "RollerHorizontalLeft", "RollerHorizontalRight" ] ] #"Ganon's Tower - Compass Room - Blue Bari 1" @@ -414,13 +417,17 @@ UwGeneralDeny: - [ 0x00f1, 4, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight" ] ] #"Old Man Maze - Keese 5" - [ 0x00f1, 5, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight" ] ] #"Old Man Maze - Keese 6" - [0x00fd, 0, ["Bumper", "AntiFairyCircle"]] - - [ 0x0107, 1, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]] - - [ 0x0107, 2, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]] + - [0x0107, 1, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]] + - [0x0107, 2, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]] - [0x010b, 6, ["RollerHorizontalRight"]] - [0x010c, 4, ["AntiFairyCircle"]] - [0x010c, 5, ["AntiFairyCircle"]] - [0x010c, 6, ["StalfosKnight", "Geldman", "Blob", "Stal", "Wizzrobe"]] - [0x010c, 7, ["StalfosKnight", "Geldman", "Blob", "Stal", "Wizzrobe"]] + - [0x011e, 0, ["RollerVerticalDown"]] + - [0x011e, 1, ["RollerVerticalDown"]] + - [0x011e, 2, ["RollerVerticalDown"]] + - [0x011e, 3, ["RollerVerticalDown"]] OwGeneralDeny: - [0x03, 2, ["Gibo"]] # OldMan eating Gibo - [0x03, 4, ["Gibo"]] # OldMan eating Gibo @@ -428,12 +435,14 @@ OwGeneralDeny: - [0x03, 6, ["Gibo"]] # OldMan eating Gibo - [0x03, 8, ["Gibo"]] # OldMan eating Gibo - [0x03, 9, ["Gibo"]] # OldMan eating Gibo - - [0x03, 10, ["Gibo"]] # OldMan eating Gibo + - [0x03, 10, ["Gibo", "Beamos"]] # OldMan eating Gibo - [0x05, 10, ["Bumper", "AntiFairyCircle"]] # Blocks path - [0x05, 11, ["Bumper", "AntiFairyCircle"]] # Blocks path to portal - - [0x07, 3, ["Bumper", "AntiFairyCircle"]] # Blocks path to ladder + - [0x07, 3, ["Bumper", "AntiFairyCircle", "RollerHorizontalRight", "RollerHorizontalLeft"]] # Blocks path to ladder + - [0x07, 4, ["RollerHorizontalLeft"]] # Blocks path to ladder - [0x1e, 3, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]] # forbid a beamos here - [0x35, 8, ["RollerVerticalUp", "RollerVerticalDown"]] # blocks the dock + - [0x37, 5, ["RollerVerticalUp"]] # combines with a roller above to make the way impassable - [0x40, 0, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle", "Thief"]] - [0x40, 7, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle", "Thief"]] - [0x40, 13, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle", "Thief"]] From 17e48e4e189aa4cc6d3108bcac9680bd60d39110 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 19 Dec 2024 15:18:09 -0700 Subject: [PATCH 19/25] fix: prevent crash from bush spawning mimics hopefully --- RELEASENOTES.md | 7 ++++--- source/enemizer/Enemizer.py | 3 ++- source/enemizer/SpriteSheets.py | 9 +++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ec16bd30..4da7420d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -3,10 +3,11 @@ * 1.4.7 - Fixed generation error with Big Key in starting inventory (thanks Cody!) - HMG/NL logic fixes by Muffins - - Enemizer: Disabled Wlkaing Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway) - - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons + - Enemizer: Disabled Walking Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway) + - Enemizer: Banned new Mimics from being the randomized bush sprite due to crash + - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons (was intended, bug prevented the logic skip) - Logic error with enemizer and standard should use new enemy logic rules - Fixed a bug with the inconsistent treatment of the beemizer setting - Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House) - Fixed an issue with dark sanctuary spawn at tavern north door (thanks Codemann!) - - Various enemy bans for the last couple months + - Various enemy bans for the last few months diff --git a/source/enemizer/Enemizer.py b/source/enemizer/Enemizer.py index 021b7f03..4a7a61c8 100644 --- a/source/enemizer/Enemizer.py +++ b/source/enemizer/Enemizer.py @@ -408,8 +408,9 @@ def randomize_overworld_enemies(data_tables, custom_ow): chosen = random.choices(candidate_sprites, weight, k=1)[0] sprite.kind = chosen.sprite # randomize the bush sprite per area + bush_candidates = [x for x in candidate_sprites if x.bush_valid] weight = [data_tables.ow_weights[r.sprite] for r in candidate_sprites] - bush_sprite_choice = random.choices(candidate_sprites, weight, k=1)[0] + bush_sprite_choice = random.choices(bush_candidates, weight, k=1)[0] data_tables.bush_sprite_table[area_id] = bush_sprite_choice diff --git a/source/enemizer/SpriteSheets.py b/source/enemizer/SpriteSheets.py index b1b24064..bb021088 100644 --- a/source/enemizer/SpriteSheets.py +++ b/source/enemizer/SpriteSheets.py @@ -21,6 +21,7 @@ class SpriteRequirement: self.uw_valid = True self.can_randomize = True self.water_phobic = False + self.bush_valid = True self.groups = [] self.sub_groups = defaultdict(list) @@ -94,6 +95,10 @@ class SpriteRequirement: self.uw_valid = False return self + def no_bush(self): + self.bush_valid = False + return self + def good_for_uw_water(self): return self.water_only and not self.static and not self.dont_use and self.uw_valid @@ -366,8 +371,8 @@ def init_sprite_requirements(): SpriteRequirement(EnemySprite.MagicShopAssistant).affix().sub_group(0, 0x4b).sub_group(3, 0x5a), SpriteRequirement(EnemySprite.SomariaPlatform).affix().sub_group(2, 0x27), SpriteRequirement(EnemySprite.CastleMantle).affix().sub_group(0, 0x5d), - SpriteRequirement(EnemySprite.GreenMimic).sub_group(1, 0x2c), - SpriteRequirement(EnemySprite.RedMimic).sub_group(1, 0x2c), + SpriteRequirement(EnemySprite.GreenMimic).sub_group(1, 0x2c).no_bush(), + SpriteRequirement(EnemySprite.RedMimic).sub_group(1, 0x2c).no_bush(), SpriteRequirement(EnemySprite.MedallionTablet).affix().sub_group(2, 0x12), # overlord requirements - encapsulated mostly in the required sheets From 804e69380396b239f4190f7c5582dbe74be4ec14 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 19 Dec 2024 16:30:40 -0700 Subject: [PATCH 20/25] fix: problem with enemizer bush enemies --- RELEASENOTES.md | 1 + source/enemizer/Enemizer.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4da7420d..d72daa83 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -4,6 +4,7 @@ - Fixed generation error with Big Key in starting inventory (thanks Cody!) - HMG/NL logic fixes by Muffins - Enemizer: Disabled Walking Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway) + - Enemizer: Fixed an issue with enemizer bush sprites - Enemizer: Banned new Mimics from being the randomized bush sprite due to crash - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons (was intended, bug prevented the logic skip) - Logic error with enemizer and standard should use new enemy logic rules diff --git a/source/enemizer/Enemizer.py b/source/enemizer/Enemizer.py index 4a7a61c8..90c7ef34 100644 --- a/source/enemizer/Enemizer.py +++ b/source/enemizer/Enemizer.py @@ -409,7 +409,7 @@ def randomize_overworld_enemies(data_tables, custom_ow): sprite.kind = chosen.sprite # randomize the bush sprite per area bush_candidates = [x for x in candidate_sprites if x.bush_valid] - weight = [data_tables.ow_weights[r.sprite] for r in candidate_sprites] + weight = [data_tables.ow_weights[r.sprite] for r in bush_candidates] bush_sprite_choice = random.choices(bush_candidates, weight, k=1)[0] data_tables.bush_sprite_table[area_id] = bush_sprite_choice @@ -533,5 +533,5 @@ def write_enemy_shuffle_settings(world, player, rom): for idx, pair in enumerate(tile_pattern): rom.write_byte(snes_to_pc(0x09BA2A + idx), (pair[0] + 3) * 16) rom.write_byte(snes_to_pc(0x09BA40 + idx), (pair[1] + 4) * 16) - if world.enemy_shuffle[player] == 'random': + if world.enemy_shuffle[player] == 'shuffled': rom.write_byte(snes_to_pc(0x368100), 1) # randomize bushes From 46e52682e5a6e6a4eba380c89da5f5b1133dd372 Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 20 Dec 2024 09:49:41 -0700 Subject: [PATCH 21/25] fix: backwards compatibility with old beemizer settings --- Main.py | 2 +- docs/avianart/pots_n_bones.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 docs/avianart/pots_n_bones.yaml diff --git a/Main.py b/Main.py index b78eb325..d4e56327 100644 --- a/Main.py +++ b/Main.py @@ -117,7 +117,7 @@ def main(args, seed=None, fish=None): world.enemy_health = args.enemy_health.copy() world.enemy_damage = args.enemy_damage.copy() world.any_enemy_logic = args.any_enemy_logic.copy() - world.beemizer = args.beemizer.copy() + world.beemizer = {player: str(args.beemizer[player]) for player in range(1, world.players + 1)} world.intensity = {player: random.randint(1, 3) if args.intensity[player] == 'random' else int(args.intensity[player]) for player in range(1, world.players + 1)} world.door_type_mode = args.door_type_mode.copy() world.trap_door_mode = args.trap_door_mode.copy() diff --git a/docs/avianart/pots_n_bones.yaml b/docs/avianart/pots_n_bones.yaml new file mode 100644 index 00000000..e4e80a02 --- /dev/null +++ b/docs/avianart/pots_n_bones.yaml @@ -0,0 +1,24 @@ +meta: + bps: on + user_notes: An attempt to replicate the Avianart Pots and Bones settings +settings: + 1: + goal: triforcehunt + mode: standard + swords: assured + hints: on + shuffle: crossed + keysanity: on + + pottery: lottery + dropshuffle: underworld + + triforce_goal: 216 + triforce_pool: 469 + + beemizer: 0 +start_inventory: + 1: + - Pegasus Boots + - Lamp + - Red Boomerang From fe2a01b38419f51cba1d1ca3932cfa48ca017713 Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 20 Dec 2024 09:57:44 -0700 Subject: [PATCH 22/25] fix: bump version --- Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.py b/Main.py index d4e56327..695d1559 100644 --- a/Main.py +++ b/Main.py @@ -38,7 +38,7 @@ from source.enemizer.DamageTables import DamageTable from source.enemizer.Enemizer import randomize_enemies from source.rom.DataTables import init_data_tables -version_number = '1.4.7' +version_number = '1.4.7.1' version_branch = '-u' __version__ = f'{version_number}{version_branch}' From d2f4271a8749a43de802bfbb52c680e76d05d23c Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 23 Dec 2024 10:16:58 -0700 Subject: [PATCH 23/25] fix: make shuffleganon per player --- BaseClasses.py | 2 +- CLI.py | 4 ++-- Main.py | 2 +- RELEASENOTES.md | 4 ++++ Utils.py | 14 +++++++++----- source/overworld/EntranceShuffle2.py | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 928594f1..9ac4a9cb 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -61,7 +61,6 @@ class World(object): self.fix_palaceofdarkness_exit = {} self.fix_trock_exit = {} self.shuffle_ganon = shuffle_ganon - self.fix_gtower_exit = self.shuffle_ganon self.custom = custom self.customitemarray = customitemarray self.can_take_damage = True @@ -109,6 +108,7 @@ class World(object): set_player_attr('fix_skullwoods_exit', self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'] or self.doorShuffle[player] not in ['vanilla']) set_player_attr('fix_palaceofdarkness_exit', self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeonssimple']) set_player_attr('fix_trock_exit', self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeonssimple']) + set_player_attr('fix_gtower_exit', self.shuffle_ganon[player] > 0) set_player_attr('can_access_trock_eyebridge', None) set_player_attr('can_access_trock_front', None) set_player_attr('can_access_trock_big_chest', None) diff --git a/CLI.py b/CLI.py index af94e810..4efc85b6 100644 --- a/CLI.py +++ b/CLI.py @@ -132,8 +132,8 @@ def parse_cli(argv, no_defaults=False): 'flute_mode', 'bow_mode', 'take_any', 'boots_hint', 'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid', 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory', - 'usestartinventory', 'bombbag', 'overworld_map', 'restrict_boss_items', 'triforce_max_difference', - 'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max', + 'usestartinventory', 'bombbag', 'shuffleganon', 'overworld_map', 'restrict_boss_items', + 'triforce_max_difference', 'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max', 'triforce_min_difference', 'triforce_goal', 'triforce_pool', 'shufflelinks', 'shuffletavern', 'skullwoods', 'linked_drops', 'pseudoboots', 'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'dungeon_counters', diff --git a/Main.py b/Main.py index 695d1559..bc2efd8f 100644 --- a/Main.py +++ b/Main.py @@ -38,7 +38,7 @@ from source.enemizer.DamageTables import DamageTable from source.enemizer.Enemizer import randomize_enemies from source.rom.DataTables import init_data_tables -version_number = '1.4.7.1' +version_number = '1.4.7.2' version_branch = '-u' __version__ = f'{version_number}{version_branch}' diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d72daa83..75f76720 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,9 @@ # Patch Notes +* 1.4.7.2 + - Fixed an issue with shuffle_ganon/fix_gtower_exit causing a generation failure +* 1.4.7.1 + - Fixed an issue with the repaired "beemizer" setting not being backwards compatible * 1.4.7 - Fixed generation error with Big Key in starting inventory (thanks Cody!) - HMG/NL logic fixes by Muffins diff --git a/Utils.py b/Utils.py index 6d52d5f0..5b2d7f1b 100644 --- a/Utils.py +++ b/Utils.py @@ -325,6 +325,10 @@ def update_deprecated_args(args): if args: argVars = vars(args) truthy = [1, True, "True", "true"] + if "multi" in argVars: + players = int(args.multi) + else: + players = 1 # Hints default to FALSE # Don't do: Yes # Do: No @@ -362,11 +366,11 @@ def update_deprecated_args(args): # Don't do: Yes # Do: No if "no_shuffleganon" in argVars: - args.shuffleganon = not args.no_shuffleganon in truthy - # Don't do: No - # Do: Yes - if "shuffleganon" in argVars: - args.no_shuffleganon = not args.shuffleganon in truthy + if isinstance(args.shuffleganon, dict): + for player in range(1, players + 1): + args.shuffleganon[player] = not args.no_shuffleganon in truthy + else: + args.shuffleganon = not args.no_shuffleganon in truthy # Playthrough defaults to TRUE # Don't do: Yes diff --git a/source/overworld/EntranceShuffle2.py b/source/overworld/EntranceShuffle2.py index 40ead938..a033a112 100644 --- a/source/overworld/EntranceShuffle2.py +++ b/source/overworld/EntranceShuffle2.py @@ -181,7 +181,7 @@ def do_main_shuffle(entrances, exits, avail, mode_def): avail.decoupled_entrances.extend(entrances) avail.decoupled_exits.extend(exits) - if not avail.world.shuffle_ganon: + if not avail.world.shuffle_ganon[avail.player]: if avail.world.is_atgt_swapped(avail.player) and 'Agahnims Tower' in entrances: connect_two_way('Agahnims Tower', 'Ganons Tower Exit', avail) entrances.remove('Agahnims Tower') From e5f38b2d016abadb8fe23866ec75b7f4df36639e Mon Sep 17 00:00:00 2001 From: KrisDavie Date: Mon, 23 Dec 2024 15:55:44 +0100 Subject: [PATCH 24/25] Separate OWG and HMG connection code Split making HMG entrances and connecting them Correctly link IP lobby (not portal) --- Main.py | 22 +++++++------- OverworldGlitchRules.py | 14 ++------- UnderworldGlitchRules.py | 63 ++++++++++++++++++++++------------------ 3 files changed, 49 insertions(+), 50 deletions(-) diff --git a/Main.py b/Main.py index bc2efd8f..a36d34e7 100644 --- a/Main.py +++ b/Main.py @@ -27,7 +27,7 @@ from Fill import distribute_items_restrictive, promote_dungeon_items, fill_dunge from Fill import dungeon_tracking from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops, fill_specific_items -from UnderworldGlitchRules import create_hybridmajor_connections, get_hybridmajor_connection_entrances +from UnderworldGlitchRules import connect_hmg_entrances_regions, create_hmg_entrances_regions from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config, verify_item_pool_config @@ -282,7 +282,8 @@ def main(args, seed=None, fish=None): for player in range(1, world.players + 1): if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connections(world, player) + create_hmg_entrances_regions(world, player) + connect_hmg_entrances_regions(world, player) generate_itempool(world, player) verify_item_pool_config(world) @@ -544,6 +545,10 @@ def copy_world(world): connection = Entrance(player, 'Uncle S&Q', parent) parent.exits.append(connection) connection.connect(target) + # This makes the regions for HMG only + # we'll connect them later after all other connections are made (OW <=> UW, Portals) + if world.logic[player] in ('nologic', 'hybridglitches'): + create_hmg_entrances_regions(ret, player) # copy bosses for dungeon in world.dungeons: @@ -560,7 +565,6 @@ def copy_world(world): # We have to skip these for now. They require both the rest of the entrances _and_ the dungeon portals to be copied first # We will connect them later - hmg_entrances = get_hybridmajor_connection_entrances() for region in world.regions: copied_region = ret.get_region(region.name, region.player) @@ -571,8 +575,6 @@ def copy_world(world): for location in copied_region.locations: location.parent_region = copied_region for entrance in region.entrances: - if entrance.name in hmg_entrances: - continue ret.get_entrance(entrance.name, entrance.player).connect(copied_region) # fill locations @@ -620,15 +622,15 @@ def copy_world(world): for player in range(1, world.players + 1): if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connections(ret, player) + connect_hmg_entrances_regions(ret, player) for region in world.regions: copied_region = ret.get_region(region.name, region.player) for entrance in region.entrances: - if entrance.name not in hmg_entrances: - continue - ret.get_entrance(entrance.name, entrance.player).connect(copied_region) - + ent = ret.get_entrance(entrance.name, entrance.player) + if (ent.connected_region != copied_region): + ent.connect(copied_region) + for player in range(1, world.players + 1): set_rules(ret, player) diff --git a/OverworldGlitchRules.py b/OverworldGlitchRules.py index 55e9d896..b9abef8d 100644 --- a/OverworldGlitchRules.py +++ b/OverworldGlitchRules.py @@ -282,20 +282,12 @@ def add_alternate_rule(entrance, rule): old_rule = entrance.access_rule entrance.access_rule = lambda state: old_rule(state) or rule(state) - -def create_no_logic_connections(player, world, connections, connect_external=False): +def create_no_logic_connections(player, world, connections): for entrance, parent_region, target_region, *rule_override in connections: parent = world.get_region(parent_region, player) - - if isinstance(target_region, Region): - target_region = target_region.name - - if connect_external and target_region.endswith(" Portal"): - target = world.get_portal(target_region[:-7], player).find_portal_entrance().parent_region - else: - target = world.get_region(target_region, player) - + target = world.get_region(target_region, player) connection = Entrance(player, entrance, parent) + connection.spot_type = 'OWG' parent.exits.append(connection) connection.connect(target) diff --git a/UnderworldGlitchRules.py b/UnderworldGlitchRules.py index beb95ed9..623a1dcc 100644 --- a/UnderworldGlitchRules.py +++ b/UnderworldGlitchRules.py @@ -1,9 +1,7 @@ import functools -from BaseClasses import Entrance, DoorType +from BaseClasses import Entrance, DoorType, Door from DoorShuffle import connect_simple_door import Rules -from OverworldGlitchRules import create_no_logic_connections -from Doors import create_door kikiskip_spots = [ ("Kiki Skip", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Portal") @@ -13,7 +11,7 @@ mirehera_spots = [("Mire to Hera Clip", "Mire Torches Top", "Hera Portal")] heraswamp_spots = [("Hera to Swamp Clip", "Mire Torches Top", "Swamp Portal")] -icepalace_spots = [("Ice Lobby Clip", "Ice Portal", "Ice Bomb Drop - Top")] +icepalace_spots = [("Ice Lobby Clip", "Ice Lobby", "Ice Bomb Drop - Top")] thievesdesert_spots = [ ("Thieves to Desert West Clip", "Thieves Attic", "Desert West Portal"), @@ -29,10 +27,7 @@ paradox_spots = [ ("Paradox Front Teleport", "Paradox Cave Front", "Paradox Cave Chest Area") ] -# Create connections between dungeons/locations -def create_hybridmajor_connections(world, player): - fix_fake_worlds = world.fix_fake_world[player] - +def create_hmg_entrances_regions(world, player): for spots in [ kikiskip_spots, mirehera_spots, @@ -42,34 +37,44 @@ def create_hybridmajor_connections(world, player): specrock_spots, paradox_spots, ]: - create_no_logic_connections(player, world, spots, connect_external=fix_fake_worlds) + for entrance, parent_region, _, *_ in spots: + parent = world.get_region(parent_region, player) + connection = Entrance(player, entrance, parent) + connection.spot_type = 'HMG' + if connection not in parent.exits: + parent.exits.append(connection) + + ip_bomb_top_reg = world.get_region("Ice Bomb Drop - Top", player) + ip_clip_entrance = Entrance(player, "Ice Bomb Drop Clip", ip_bomb_top_reg) + ip_bomb_top_reg.exits.append(ip_clip_entrance) + + +def connect_hmg_entrances_regions(world, player): + for spots in [ + kikiskip_spots, + mirehera_spots, + heraswamp_spots, + icepalace_spots, + thievesdesert_spots, + specrock_spots, + paradox_spots, + ]: + for entrance, _, target_region, *_ in spots: + connection = world.get_entrance(entrance, player) + if world.fix_fake_world[player] and target_region.endswith(" Portal"): + target = world.get_portal(target_region[:-7], player).find_portal_entrance().parent_region + else: + target = world.get_region(target_region, player) + connection.connect(target) # Add the new Ice path (back of bomb drop to front) to the world and model it properly - clip_door = create_door(player, "Ice Bomb Drop Clip", DoorType.Logical) + ip_clip_entrance = world.get_entrance('Ice Bomb Drop Clip', 1) + clip_door = Door(player, "Ice Bomb Drop Clip", DoorType.Logical, ip_clip_entrance) world.doors += [clip_door] world.initialize_doors([clip_door]) - ice_bomb_top_reg = world.get_region("Ice Bomb Drop - Top", player) - ice_bomb_top_reg.exits.append( - Entrance(player, "Ice Bomb Drop Clip", ice_bomb_top_reg) - ) connect_simple_door(world, "Ice Bomb Drop Clip", "Ice Bomb Drop", player) -def get_hybridmajor_connection_entrances(): - connections = [] - for connector in ( - kikiskip_spots - + mirehera_spots - + heraswamp_spots - + icepalace_spots - + thievesdesert_spots - + specrock_spots - + paradox_spots - ): - connections.append(connector[0]) - connections.append('Ice Bomb Drop Clip') - return set(connections) - # For some entrances, we need to fake having pearl, because we're in fake DW/LW. # This creates a copy of the input state that has Moon Pearl. def fake_pearl_state(state, player): From 897f248c25e948ac8a25918b427528fb0b93b053 Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 23 Dec 2024 15:00:58 -0700 Subject: [PATCH 25/25] doc: update notes --- RELEASENOTES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 75f76720..602fb94d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,7 +1,8 @@ # Patch Notes * 1.4.7.2 - - Fixed an issue with shuffle_ganon/fix_gtower_exit causing a generation failure + - Fixed an issue with shuffle_ganon/fix_gtower_exit causing a generation failure + - More HMG fixes by Muffins * 1.4.7.1 - Fixed an issue with the repaired "beemizer" setting not being backwards compatible * 1.4.7