From fd8f3fcd8ba83f7fe881203de182161f92e9d435 Mon Sep 17 00:00:00 2001 From: Mysteryem Date: Wed, 29 Apr 2026 20:24:41 +0100 Subject: [PATCH] The Messenger: Add missing indirect conditions (#6101) --- worlds/messenger/rules.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/worlds/messenger/rules.py b/worlds/messenger/rules.py index 2f1299932f..23f2bf32c0 100644 --- a/worlds/messenger/rules.py +++ b/worlds/messenger/rules.py @@ -1,6 +1,6 @@ from typing import TYPE_CHECKING -from BaseClasses import CollectionState, CollectionRule +from BaseClasses import CollectionState, CollectionRule, Region from worlds.generic.Rules import add_rule, allow_self_locking_items from .constants import NOTES, PHOBEKINS from .options import MessengerAccessibility @@ -13,6 +13,7 @@ class MessengerRules: player: int world: "MessengerWorld" connection_rules: dict[str, CollectionRule] + indirect_conditions: dict[str, list[Region]] region_rules: dict[str, CollectionRule] location_rules: dict[str, CollectionRule] maximum_price: int @@ -220,6 +221,16 @@ class MessengerRules: lambda state: self.can_dboost(state) or self.has_dart(state), } + # dict of connection names and the regions checked in the requirements to traverse the exit + self.indirect_conditions = { + "Howling Grotto - Breezy Crushers Checkpoint -> Howling Grotto - Crushing Pits Shop": [ + self.world.get_region("Howling Grotto - Emerald Golem Shop") + ], + "Glacial Peak - Left -> Elemental Skylands - Air Shmup": [ + self.world.get_location("Quillshroom Marsh - Queen of Quills").parent_region + ], + } + self.location_rules = { # hq "Money Wrench": self.can_shop, @@ -365,6 +376,8 @@ class MessengerRules: for entrance_name, rule in self.connection_rules.items(): entrance = multiworld.get_entrance(entrance_name, self.player) entrance.access_rule = rule + for region in self.indirect_conditions.get(entrance_name, ()): + multiworld.register_indirect_condition(region, entrance) for loc in multiworld.get_locations(self.player): if loc.name in self.location_rules: loc.access_rule = self.location_rules[loc.name]