From 0c5cb17d96af6091a5c35f13cc2fc62551679b09 Mon Sep 17 00:00:00 2001 From: Mysteryem Date: Mon, 2 Jun 2025 16:56:11 +0100 Subject: [PATCH] DLCQuest: Add missing indirect conditions (#5074) The `Behind Rocks` and `Pickaxe Hard Cave` Entrances require being able to reach the `Cut Content` region, but no indirect conditions were being registered for this region. The `set_lfod_self_obtained_items_rules` function was also using a `world` parameter that was actually expecting a `MultiWorld` instance, so I have renamed it for clarity and updated the function to use `world.get_entrance()` rather than `multiworld.get_entrance()`. Much of the rest of the file passes `MultiWorld` instances to `world` parameters, but fixing all of these is out of the scope of the changes in this patch, so has not been included. --- worlds/dlcquest/Rules.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/worlds/dlcquest/Rules.py b/worlds/dlcquest/Rules.py index 3461d063..5dfd8016 100644 --- a/worlds/dlcquest/Rules.py +++ b/worlds/dlcquest/Rules.py @@ -280,16 +280,19 @@ def set_boss_door_requirements_rules(player, world): set_rule(world.get_entrance("Boss Door", player), has_3_swords) -def set_lfod_self_obtained_items_rules(world_options, player, world): +def set_lfod_self_obtained_items_rules(world_options, player, multiworld): if world_options.item_shuffle != Options.ItemShuffle.option_disabled: return - set_rule(world.get_entrance("Vines", player), + world = multiworld.worlds[player] + set_rule(world.get_entrance("Vines"), lambda state: state.has("Incredibly Important Pack", player)) - set_rule(world.get_entrance("Behind Rocks", player), + set_rule(world.get_entrance("Behind Rocks"), lambda state: state.can_reach("Cut Content", 'region', player)) - set_rule(world.get_entrance("Pickaxe Hard Cave", player), + multiworld.register_indirect_condition(world.get_region("Cut Content"), world.get_entrance("Behind Rocks")) + set_rule(world.get_entrance("Pickaxe Hard Cave"), lambda state: state.can_reach("Cut Content", 'region', player) and state.has("Name Change Pack", player)) + multiworld.register_indirect_condition(world.get_region("Cut Content"), world.get_entrance("Pickaxe Hard Cave")) def set_lfod_shuffled_items_rules(world_options, player, world):