Make sure we can actually reach clips

This commit is contained in:
Kris Davie
2025-01-05 09:30:32 +01:00
committed by GitHub
parent 8ce8b93c8b
commit 5fbcedbb24

View File

@@ -173,20 +173,23 @@ def dungeon_reentry_rules(
def underworld_glitches_rules(world, player): def underworld_glitches_rules(world, player):
def mire_clip(state): def mire_clip(state):
torches = world.get_region("Mire Torches Top", player) torches = world.get_region("Mire Torches Top", player)
return state.can_dash_clip(torches, player) or ( return state.can_reach(torches, player) and (
state.can_bomb_clip(torches, player) and state.has_fire_source(player) state.can_dash_clip(torches, player)
or (state.can_bomb_clip(torches, player) and state.has_fire_source(player))
) )
def hera_clip(state): def hera_clip(state):
hera = world.get_region("Hera 4F", player) hera = world.get_region("Hera 4F", player)
return state.can_bomb_clip(hera, player) or state.can_dash_clip(hera, player) return state.can_reach(hera) and (
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. # We use these plus functool.partial because lambdas don't work in loops properly.
def bomb_clip(state, region, player): def bomb_clip(state, region, player):
return state.can_bomb_clip(region, player) return state.can_reach(region, player) and state.can_bomb_clip(region, player)
def dash_clip(state, region, player): def dash_clip(state, region, player):
return state.can_dash_clip(region, player) return state.can_reach(region, player) and state.can_dash_clip(region, player)
# Bomb clips # Bomb clips
for clip in ( for clip in (
kikiskip_spots kikiskip_spots