From 0370e669e57e767f8af23cc08b05468da8a72895 Mon Sep 17 00:00:00 2001 From: Mysteryem Date: Sun, 15 Dec 2024 21:28:51 +0000 Subject: [PATCH] Pokemon Emerald: Add Mr Briney's House indirect conditions (#4154) The `REGION_DEWFORD_TOWN/MAIN -> REGION_ROUTE109/BEACH` and `REGION_ROUTE109/BEACH -> REGION_DEWFORD_TOWN/MAIN` entrances require access to the `REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN -> REGION_DEWFORD_TOWN/MAIN` entrance in their access rules, so require indirect conditions for the parent_region of the entrance: `REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN`. --- worlds/pokemon_emerald/rules.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/worlds/pokemon_emerald/rules.py b/worlds/pokemon_emerald/rules.py index b8d1efb1..828eb20f 100644 --- a/worlds/pokemon_emerald/rules.py +++ b/worlds/pokemon_emerald/rules.py @@ -416,13 +416,16 @@ def set_rules(world: "PokemonEmeraldWorld") -> None: ) # Dewford Town + entrance = get_entrance("REGION_DEWFORD_TOWN/MAIN -> REGION_ROUTE109/BEACH") set_rule( - get_entrance("REGION_DEWFORD_TOWN/MAIN -> REGION_ROUTE109/BEACH"), + entrance, lambda state: state.can_reach("REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN -> REGION_DEWFORD_TOWN/MAIN", "Entrance", world.player) and state.has("EVENT_TALK_TO_MR_STONE", world.player) and state.has("EVENT_DELIVER_LETTER", world.player) ) + world.multiworld.register_indirect_condition( + get_entrance("REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN -> REGION_DEWFORD_TOWN/MAIN").parent_region, entrance) set_rule( get_entrance("REGION_DEWFORD_TOWN/MAIN -> REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN"), lambda state: @@ -451,14 +454,17 @@ def set_rules(world: "PokemonEmeraldWorld") -> None: ) # Route 109 + entrance = get_entrance("REGION_ROUTE109/BEACH -> REGION_DEWFORD_TOWN/MAIN") set_rule( - get_entrance("REGION_ROUTE109/BEACH -> REGION_DEWFORD_TOWN/MAIN"), + entrance, lambda state: state.can_reach("REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN -> REGION_DEWFORD_TOWN/MAIN", "Entrance", world.player) and state.can_reach("REGION_DEWFORD_TOWN/MAIN -> REGION_ROUTE109/BEACH", "Entrance", world.player) and state.has("EVENT_TALK_TO_MR_STONE", world.player) and state.has("EVENT_DELIVER_LETTER", world.player) ) + world.multiworld.register_indirect_condition( + get_entrance("REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN -> REGION_DEWFORD_TOWN/MAIN").parent_region, entrance) set_rule( get_entrance("REGION_ROUTE109/BEACH -> REGION_ROUTE109/SEA"), hm_rules["HM03 Surf"]