sidescroller_key=Location(dungeon=4).add(DroppedKey(0x169)).connect(before_miniboss,AND(r.attack_hookshot_powder,FLIPPERS))# key that drops in the hole and needs swim to get
center_puddle_chest=Location(dungeon=4).add(DungeonChest(0x16E)).connect(before_miniboss,FLIPPERS)# chest with 50 rupees
left_water_area=Location(dungeon=4).connect(before_miniboss,OR(FEATHER,FLIPPERS))# area left with zol chest and 5 symbol puzzle (water area)
left_water_area.add(DungeonChest(0x16D))# gel chest
left_water_area.add(DungeonChest(0x168))# key chest near the puzzle
terrace_zols_chest.connect(left_water_area,r.attack_hookshot_powder,one_way=True)# can move from flippers chest south to push the block to left area
to_the_nightmare_key=Location(dungeon=4).connect(left_water_area,AND(FEATHER,OR(FLIPPERS,PEGASUS_BOOTS)))# 5 symbol puzzle (does not need flippers with boots + feather)
to_the_nightmare_key.connect(left_water_area,r.tight_jump)# With a tight jump feather is enough to reach the top left switch without flippers, or use flippers for puzzle and boots to get through 2d section
before_boss.connect(left_water_area,r.tight_jump)# jump to the bottom right corner of boss door room
pushable_block_chest.connect(rightside_crossroads,AND(r.sideways_block_push,FLIPPERS))# sideways block push to skip bombs
sidescroller_key.connect(before_miniboss,AND(r.super_jump_feather,OR(r.attack_hookshot_powder,r.throw_pot)))# superjump into the hole to grab the key while falling into the water
miniboss.connect(before_miniboss,r.jesus_jump)# use jesus jump to transition over the water left of miniboss
rightside_crossroads.connect(entrance,AND(r.pit_buffer_boots,r.hookshot_spam_pit))# pit buffer into the wall of the first pit, then boots bonk across the center, hookshot to get to the rightmost pit to a second villa buffer on the rightmost pit
rightside_crossroads.connect(after_double_lock,AND(OR(BOMB,BOW),r.hookshot_clip_block))# split zols for more entities, and clip through the block against the right wall
pushable_block_chest.connect(rightside_crossroads,AND(r.sideways_block_push,OR(r.jesus_buffer,r.jesus_jump)))# use feather to water clip into the top right corner of the bombable block, and sideways block push to gain access. Can boots bonk of top right wall, then water buffer to top of chest and boots bonk to water buffer next to chest
after_double_lock.connect(double_locked_room,AND(FOUND(KEY4,4),r.pit_buffer_boots),one_way=True)# use boots bonks to cross the water gaps
after_double_lock.connect(entrance,r.pit_buffer_boots)# boots bonk + pit buffer to the bottom
after_double_lock.connect(entrance,AND(r.pit_buffer,r.hookshot_spam_pit))# hookshot spam over the first pit of crossroads, then buffer down
dungeon4_puddle_before_crossroads.connect(after_double_lock,AND(r.pit_buffer_boots,HOOKSHOT))# boots bonk across the water bottom wall to the bottom left corner, then hookshot up
north_crossroads.connect(entrance,AND(PEGASUS_BOOTS,HOOKSHOT))# pit buffer into wall of the first pit, then boots bonk towards the top and hookshot spam to get across (easier with Piece of Power)
before_miniboss.connect(north_crossroads,AND(r.shaq_jump,r.hookshot_clip_block))# push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock.
before_miniboss.connect(north_crossroads,AND(OR(BOMB,BOW),r.hookshot_clip_block))# split zol for more entities, and clip through the block left of keyblock by hookshot spam
to_the_nightmare_key.connect(left_water_area,AND(FLIPPERS,r.boots_bonk))# use flippers for puzzle and boots bonk to get through 2d section
before_boss.connect(left_water_area,r.pit_buffer_boots)# boots bonk across bottom wall then boots bonk to the platform before boss door