blade_trap_chest=Location(dungeon=5).add(DungeonChest(0x197)).connect(area2,HOOKSHOT)# key chest on the left
post_gohma=Location(dungeon=5).connect(area2,AND(HOOKSHOT,r.miniboss_requirements[world_setup.miniboss_mapping[4]],KEY5,FOUND(KEY5,2)))# staircase after gohma
staircase_before_boss=Location(dungeon=5).connect(post_gohma,AND(HOOKSHOT,FEATHER))# bottom right section pits room before boss door. Path via gohma
after_keyblock_boss=Location(dungeon=5).connect(staircase_before_boss,AND(KEY5,FOUND(KEY5,3)))# top right section pits room before boss door
after_stalfos=Location(dungeon=5).add(DungeonChest(0x196)).connect(area2,AND(SWORD,BOMB))# Need to defeat master stalfos once for this empty chest; l2 sword beams kill but obscure
after_stalfos.connect(staircase_before_boss,AND(FEATHER,r.attack_hookshot_powder),one_way=True)# pathway from stalfos to staircase: past butterfly room and push the block
# When we can reach the stone tablet chest, we can also reach the final location of master stalfos
m_stalfos_drop=Location(dungeon=5).add(HookshotDrop()).connect(third_arena,AND(FEATHER,SWORD,BOMB))# can reach fourth arena from entrance with feather and sword
butterfly_owl.connect(after_stalfos,AND(r.boots_bonk,STONE_BEAK5))# boots charge + bonk to cross 2d bridge
after_stalfos.connect(staircase_before_boss,AND(r.boots_bonk,r.attack_hookshot_powder),one_way=True)# pathway from stalfos to staircase: boots charge + bonk to cross bridge, past butterfly room and push the block
staircase_before_boss.connect(post_gohma,AND(r.boots_bonk,HOOKSHOT))# boots bonk in 2d section to skip feather
north_of_crossroads.connect(after_stalfos,r.hookshot_over_pit)# hookshot to the right block to cross pits
first_bridge_chest.connect(north_of_crossroads,AND(r.wall_clip,r.tight_jump))# tight jump from bottom wall clipped to make it over the pits
post_gohma.connect(area2,HOOKSHOT)# glitch through the blocks/pots with hookshot. Zoomerang can be used but has no logical implications because of 2d section requiring hookshot
north_bridge_chest.connect(north_of_crossroads,r.pit_buffer)# 1 pit buffer to clip bottom wall and jump across the pits
east_bridge_chest.connect(first_bridge_chest,r.pit_buffer)# 1 pit buffer to clip bottom wall and jump across the pits
#after_stalfos.connect(staircase_before_boss, AND(r.text_clip, r.super_jump)) # use the keyblock to get a wall clip in right wall to perform a superjump over the pushable block
after_stalfos.connect(staircase_before_boss,r.super_jump_boots)# charge a boots dash in bottom right corner to the right, jump before hitting the wall and use weapon to the left side before hitting the wall
start_hookshot_chest.connect(entrance,r.pit_buffer_boots)# use pit buffer to clip into the bottom wall and boots bonk off the wall again
fourth_stalfos_area.connect(compass,AND(r.boots_bonk_2d_hell,SWORD))# do an incredibly hard boots bonk setup to get across the hanging platforms in the 2d section
blade_trap_chest.connect(area2,AND(r.pit_buffer_boots,r.attack_hookshot_powder))# boots bonk + pit buffer past the blade traps
post_gohma.connect(area2,AND(PEGASUS_BOOTS,FEATHER,POWER_BRACELET,r.attack_hookshot_powder))# use boots jump in room with 2 zols + flying arrows to pit buffer above pot, then jump across. Sideways block push + pick up pots to reach post_gohma
staircase_before_boss.connect(post_gohma,r.boots_jump)# to pass 2d section, tight jump on left screen: hug left wall on little platform, then dash right off platform and jump while in midair to bonk against right wall
after_stalfos.connect(staircase_before_boss,r.super_jump_sword)# unclipped superjump in bottom right corner of staircase before boss room, jumping left over the pushable block. reverse is push block
after_stalfos.connect(staircase_before_boss,r.zoomerang)# use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block
north_bridge_chest.connect(north_of_crossroads,r.boots_bonk_pit)# boots bonk across the pits with pit buffering
first_bridge_chest.connect(north_of_crossroads,r.boots_bonk_pit)# get to first chest via the north chest with pit buffering
east_bridge_chest.connect(first_bridge_chest,r.boots_bonk_pit)# boots bonk across the pits with pit buffering
after_keyblock_boss.connect(butterfly_owl,AND(r.pit_buffer_itemless,STONE_BEAK5),one_way=True)# pit buffer from top right to bottom in right pits room
before_boss.connect(after_stalfos,r.super_jump_sword)# cross pits room from bottom left to top left by unclipped superjump on bottom wall on top of side wall, then jump across