From f4072833f3c7eca393ddff30634ebcb152d7fe90 Mon Sep 17 00:00:00 2001 From: Mysteryem Date: Fri, 8 Nov 2024 17:57:11 +0000 Subject: [PATCH] TUNIC: Add Shop indirect condition (#4160) * TUNIC: Add Shop indirect condition The `Overworld -> Cube Cave Entrance Region` Entrance checks `can_shop()` which checks for being able to reach the "Shop" Region, so the Entrance requires an indirect condition of reaching the "Shop" Region. * Rename entrance variable to cube_entrance Co-authored-by: Scipio Wright --------- Co-authored-by: Scipio Wright --- worlds/tunic/er_rules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index bd2498a5..6f5eec02 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -344,9 +344,10 @@ def set_er_region_rules(world: "TunicWorld", regions: Dict[str, Region], portal_ connecting_region=regions["Overworld"], rule=lambda state: state.has_any({grapple, laurels}, player)) - regions["Overworld"].connect( + cube_entrance = regions["Overworld"].connect( connecting_region=regions["Cube Cave Entrance Region"], rule=lambda state: state.has(gun, player) or can_shop(state, world)) + world.multiworld.register_indirect_condition(regions["Shop"], cube_entrance) regions["Cube Cave Entrance Region"].connect( connecting_region=regions["Overworld"])