self._addEntranceRequirementExit("prairie_madbatter_connector_entrance",AND(OR(FEATHER,ROOSTER),r.bush))# if exiting, you can pick up the bushes by normal means
Location().add(GoldLeaf(0x05A)).connect(castle_courtyard,OR(SWORD,BOW,MAGIC_ROD))# mad bomber, enemy hiding in the 6 holes
crow_gold_leaf=Location().add(GoldLeaf(0x058)).connect(castle_courtyard,AND(POWER_BRACELET,r.attack_hookshot_no_bomb))# bird on tree, can't kill with bomb cause it flies off. immune to magic_powder
Location().add(GoldLeaf(0x2D2)).connect(castle_inside,r.attack_hookshot_powder)# in the castle, kill enemies
Location().add(GoldLeaf(0x2C5)).connect(castle_inside,AND(BOMB,r.attack_hookshot_powder))# in the castle, bomb wall to show enemy
kanalet_chain_trooper=Location().add(GoldLeaf(0x2C6))# in the castle, spinning spikeball enemy
self._addEntranceRequirementExit("animal_cave",None)# if exiting, you do not need bombs
animal_village_bombcave_heartpiece=Location().add(HeartPiece(0x2E6)).connect(animal_village_bombcave,OR(AND(BOMB,FEATHER,HOOKSHOT),ROOSTER))# cave in the upper right of animal town
obstacle_cave_inside.connect(obstacle_cave_entrance,FEATHER,one_way=True)# can get past the rock room from right to left pushing blocks and jumping over the pit
obstacle_cave_inside_chest=Location().add(Chest(0x2BB)).connect(obstacle_cave_inside,OR(HOOKSHOT,ROOSTER))# chest at obstacles
Location().add(KeyLocation("RAFT")).connect(raft_house,AND(r.bush,COUNT("RUPEES",100)))# add bush requirement for farming in case player has to try again
bridge_seashell=Location().add(Seashell(0x00C)).connect(outside_rooster_house,AND(OR(FEATHER,ROOSTER),POWER_BRACELET))# seashell right of rooster house, there is a hole in the bridge
left_right_connector_cave_entrance.connect(left_right_connector_cave_exit,OR(HOOKSHOT,ROOSTER),one_way=True)# pass through the underground passage to left side
mountain_heartpiece=Location().add(HeartPiece(0x2BA))# heartpiece in connecting cave
left_right_connector_cave_entrance.connect(mountain_heartpiece,BOMB,one_way=True)# in the connecting cave from right to left. one_way to prevent access to left_side_mountain via glitched logic
taltal_boulder_zone.add(Chest(0x004))# top of falling rocks hill
self._addEntranceRequirement("mamu",AND(r.wall_clip,FEATHER,POWER_BRACELET))# can clear the gaps at the start with just feather, can reach bottom left sign with a well timed jump while wall clipped
self._addEntranceRequirement("prairie_madbatter_connector_entrance",AND(OR(FEATHER,ROOSTER),OR(MAGIC_POWDER,BOMB)))# use bombs or powder to get rid of a bush on the other side by jumping across and placing the bomb/powder before you fall into the pit
crow_gold_leaf.connect(castle_courtyard,POWER_BRACELET)# bird on tree at left side kanalet, can use both rocks to kill the crow removing the kill requirement
castle_inside.connect(kanalet_chain_trooper,BOOMERANG,one_way=True)# kill the ball and chain trooper from the left side, then use boomerang to grab the dropped item
animal_village_bombcave_heartpiece.connect(animal_village_bombcave,r.boots_jump)# jump across horizontal 4 gap to heart piece
animal_village_bombcave_heartpiece.connect(animal_village_bombcave,AND(BOMB,FEATHER,BOOMERANG))# use jump + boomerang to grab the item from below the ledge
d6_connector_left.connect(d6_connector_right,AND(OR(FLIPPERS,PEGASUS_BOOTS),FEATHER))# jump the gap in underground passage to d6 left side to skip hookshot
obstacle_cave_exit.connect(obstacle_cave_inside,AND(FEATHER,r.hookshot_over_pit),one_way=True)# one way from right exit to middle, jump past the obstacle, and use hookshot to pull past the double obstacle
self._addEntranceRequirementEnter("hookshot_cave",r.hookshot_clip)# clip past the rocks in front of hookshot cave
swamp.connect(forest_toadstool,r.pit_buffer_itemless,one_way=True)# villa buffer from top (swamp phonebooth area) to bottom (toadstool area)
writes_hut_outside.connect(swamp,r.pit_buffer_itemless,one_way=True)# villa buffer from top (writes hut) to bottom (swamp phonebooth area) or damage boost
graveyard_cave_left.connect(graveyard_heartpiece,r.bomb_trigger,one_way=True)# bomb trigger the heartpiece from the left side
graveyard_heartpiece.connect(graveyard_cave_right,r.sideways_block_push)# sideways block push from the right staircase.
prairie_island_seashell.connect(ukuku_prairie,AND(r.jesus_jump,r.bush))# jesus jump from right side, screen transition on top of the water to reach the island
self._addEntranceRequirement("castle_jump_cave",r.pit_buffer)# 1 pit buffer to clip bottom wall and jump across.
left_bay_area.connect(ghost_hut_outside,r.pit_buffer)# 1 pit buffer to get across
tiny_island.connect(left_bay_area,AND(r.jesus_jump,r.bush))# jesus jump around
bay_madbatter_connector_exit.connect(bay_madbatter_connector_entrance,r.jesus_jump,one_way=True)# jesus jump (3 screen) through the underground passage leading to martha's bay mad batter
left_bay_area.connect(outside_bay_madbatter_entrance,AND(r.pit_buffer,POWER_BRACELET))# villa buffer into the top side of the bush, then pick it up
ukuku_prairie.connect(richard_maze,AND(r.pit_buffer_itemless,OR(AND(MAGIC_POWDER,MAX_POWDER_UPGRADE),BOMB,BOOMERANG,MAGIC_ROD,SWORD)),one_way=True)# break bushes on north side of the maze, and 1 pit buffer into the maze
richard_maze.connect(ukuku_prairie,AND(r.pit_buffer_itemless,OR(MAGIC_POWDER,BOMB,BOOMERANG,MAGIC_ROD,SWORD)),one_way=True)# same as above (without powder upgrade) in one of the two northern screens of the maze to escape
fisher_under_bridge.connect(bay_water,AND(r.bomb_trigger,AND(FEATHER,FLIPPERS)))# up-most left wall is a pit: bomb trigger with it. If photographer is there, clear that first which is why feather is required logically
animal_village.connect(ukuku_prairie,r.jesus_jump)# jesus jump
below_right_taltal.connect(next_to_castle,r.jesus_jump)# jesus jump (north of kanalet castle phonebooth)
#animal_village_connector_right.connect(animal_village_connector_left, AND(r.text_clip, FEATHER)) # text clip past the obstacles (can go both ways), feather to wall clip the obstacle without triggering text
animal_village_bombcave_heartpiece.connect(animal_village_bombcave,AND(r.bomb_trigger,OR(HOOKSHOT,FEATHER,r.boots_bonk_pit)))# bomb trigger from right side, corner walking top right pit is stupid so hookshot or boots added
animal_village_bombcave_heartpiece.connect(animal_village_bombcave,r.pit_buffer)# villa buffer across the pits
d6_entrance.connect(ukuku_prairie,r.jesus_jump,one_way=True)# jesus jump (2 screen) from d6 entrance bottom ledge to ukuku prairie
d6_entrance.connect(armos_fairy_entrance,r.jesus_jump,one_way=True)# jesus jump (2 screen) from d6 entrance top ledge to armos fairy entrance
d6_connector_left.connect(d6_connector_right,r.jesus_jump)# jesus jump over water; left side is jumpable, or villa buffer if it's easier for you
armos_fairy_entrance.connect(d6_armos_island,r.jesus_jump,one_way=True)# jesus jump from top (fairy bomb cave) to armos island
armos_fairy_entrance.connect(raft_exit,r.jesus_jump)# jesus jump (2-ish screen) from fairy cave to lower raft connector
self._addEntranceRequirementEnter("obstacle_cave_entrance",r.hookshot_clip)# clip past the rocks in front of obstacle cave entrance
obstacle_cave_inside_chest.connect(obstacle_cave_inside,r.pit_buffer)# jump to the rightmost pits + 1 pit buffer to jump across
obstacle_cave_exit.connect(obstacle_cave_inside,r.pit_buffer)# 1 pit buffer above boots crystals to get past
lower_right_taltal.connect(hibiscus_item,AND(TRADING_ITEM_PINEAPPLE,r.bomb_trigger),one_way=True)# bomb trigger papahl from below ledge, requires pineapple
self._addEntranceRequirement("heartpiece_swim_cave",r.jesus_jump)# jesus jump into the cave entrance after jumping down the ledge, can jesus jump back to the ladder 1 screen below
self._addEntranceRequirement("mambo",r.jesus_jump)# jesus jump from (unlocked) d4 entrance to mambo's cave entrance
outside_raft_house.connect(below_right_taltal,r.jesus_jump,one_way=True)# jesus jump from the ledge at raft to the staircase 1 screen south
self._addEntranceRequirement("multichest_left",r.jesus_jump)# jesus jump past staircase leading up the mountain
outside_rooster_house.connect(lower_right_taltal,r.jesus_jump)# jesus jump (1 or 2 screen depending if angler key is used) to staircase leading up the mountain
mountain_bridge_staircase.connect(outside_rooster_house,AND(r.boots_jump,r.pit_buffer))# cross bridge to staircase with pit buffer to clip bottom wall and jump across. added boots_jump to not require going through this section with just feather
bird_key.connect(bird_cave,r.hookshot_jump)# hookshot jump across the big pits room
right_taltal_connector2.connect(right_taltal_connector3,OR(r.pit_buffer,ROOSTER),one_way=True)# trigger a quick fall on the screen above the exit by transitioning down on the leftmost/rightmost pit and then buffering sq menu for control while in the air. or pick up the rooster while dropping off the ledge at exit
left_right_connector_cave_exit.connect(left_right_connector_cave_entrance,AND(HOOKSHOT,r.super_jump_feather),one_way=True)# pass through the passage in reverse using a superjump to get out of the dead end
obstacle_cave_inside.connect(mountain_heartpiece,r.bomb_trigger,one_way=True)# bomb trigger from boots crystal cave
self._addEntranceRequirement("d8",OR(r.bomb_trigger,AND(OCARINA,SONG3)))# bomb trigger the head and walk through, or play the ocarina song 3 and walk through
dream_hut_right.connect(dream_hut,None)# alternate diagonal movement with orthogonal movement to control the mimics. Get them clipped into the walls to walk past
forest_cave_crystal_chest.connect(forest_cave,AND(r.super_jump_feather,r.hookshot_clip_block,r.sideways_block_push))# superjump off the bottom wall to get between block and crystal, than use 3 keese to hookshot clip while facing right to get a sideways blockpush off
log_cave_heartpiece.connect(forest_cave,OR(r.super_jump_rooster,r.boots_roosterhop))# boots rooster hop in bottom left corner to "superjump" into the area. use buffers after picking up rooster to gain height / time to throw rooster again facing up
writes_hut_outside.connect(swamp,r.damage_boost)# damage boost with moblin arrow next to telephone booth
writes_cave_left_chest.connect(writes_cave,r.damage_boost)# damage boost off the zol to get across the pit.
graveyard.connect(crazy_tracy_hut,r.hookshot_spam_pit,one_way=True)# use hookshot spam to clip the rock on the right with the crow
graveyard.connect(forest,OR(r.boots_bonk_pit,r.hookshot_spam_pit))# boots bonk over pits by witches hut, or hookshot spam across the pit
graveyard_cave_left.connect(graveyard_cave_right,r.hookshot_spam_pit)# hookshot spam over the pit
graveyard_cave_right.connect(graveyard_cave_left,OR(r.damage_boost,r.boots_bonk_pit),one_way=True)# boots bonk off the cracked block, or set up a damage boost with the keese
self._addEntranceRequirementEnter("mamu",AND(r.pit_buffer_itemless,r.pit_buffer_boots,POWER_BRACELET))# can clear the gaps at the start with multiple pit buffers, can reach bottom left sign with bonking along the bottom wall
self._addEntranceRequirement("castle_jump_cave",r.pit_buffer_boots)# pit buffer to clip bottom wall and boots bonk across
prairie_cave_secret_exit.connect(prairie_cave,AND(BOMB,OR(r.boots_bonk_pit,r.hookshot_spam_pit)))# hookshot spam or boots bonk across pits can go from left to right by pit buffering on top of the bottom wall then boots bonk across
richard_cave_chest.connect(richard_cave,r.damage_boost)# use the zol on the other side of the pit to damage boost across (requires damage from pit + zol)
castle_secret_entrance_right.connect(castle_secret_entrance_left,r.boots_bonk_2d_spikepit)# medicine iframe abuse to get across spikes with a boots bonk
left_bay_area.connect(ghost_hut_outside,r.pit_buffer_boots)# multiple pit buffers to bonk across the bottom wall
left_bay_area.connect(ukuku_prairie,r.hookshot_clip_block,one_way=True)# clip through the donuts blocking the path next to prairie plateau cave by hookshotting up and killing the two moblins that way which clips you further up two times. This is enough to move right
tiny_island.connect(left_bay_area,AND(r.jesus_buffer,r.boots_bonk_pit,r.bush))# jesus jump around with boots bonks, then one final bonk off the bottom wall to get on the staircase (needs to be centered correctly)
left_bay_area.connect(outside_bay_madbatter_entrance,AND(r.pit_buffer_boots,OR(MAGIC_POWDER,SWORD,MAGIC_ROD,BOOMERANG)))# Boots bonk across the bottom wall, then remove one of the bushes to get on land
left_bay_area.connect(outside_bay_madbatter_entrance,AND(r.pit_buffer,r.hookshot_spam_pit,r.bush))# hookshot spam to cross one pit at the top, then buffer until on top of the bush to be able to break it
outside_bay_madbatter_entrance.connect(left_bay_area,AND(r.pit_buffer_boots,r.bush),one_way=True)# if exiting, you can pick up the bushes by normal means and boots bonk across the bottom wall
# bay_water connectors, only left_bay_area, ukuku_prairie and animal_village have to be connected with jesus jumps. below_right_taltal, d6_armos_island and armos_fairy_entrance are accounted for via ukuku prairie in glitch logic
left_bay_area.connect(bay_water,OR(r.jesus_jump,r.jesus_rooster))# jesus jump/rooster (can always reach bay_water with jesus jumping from every way to enter bay_water, so no one_way)
animal_village.connect(bay_water,OR(r.jesus_jump,r.jesus_rooster))# jesus jump/rooster (can always reach bay_water with jesus jumping from every way to enter bay_water, so no one_way)
ukuku_prairie.connect(bay_water,OR(r.jesus_jump,r.jesus_rooster),one_way=True)# jesus jump/rooster
bay_water.connect(d5_entrance,OR(r.jesus_jump,r.jesus_rooster))# jesus jump/rooster into d5 entrance (wall clip), wall clip + jesus jump to get out
prairie_island_seashell.connect(ukuku_prairie,AND(r.jesus_rooster,r.bush))# jesus rooster from right side, screen transition on top of the water to reach the island
bay_madbatter_connector_exit.connect(bay_madbatter_connector_entrance,r.jesus_rooster,one_way=True)# jesus rooster (3 screen) through the underground passage leading to martha's bay mad batter
# fisher_under_bridge.connect(bay_water, AND(TRADING_ITEM_FISHING_HOOK, OR(FEATHER, SWORD, BOW), FLIPPERS)) # just swing/shoot at fisher, if photographer is on screen it is dumb
fisher_under_bridge.connect(bay_water,AND(TRADING_ITEM_FISHING_HOOK,FLIPPERS))# face the fisherman from the left, get within 4 pixels (a range, not exact) of his left side, hold up, and mash a until you get the textbox.
below_right_taltal.connect(next_to_castle,r.jesus_buffer,one_way=True)# face right, boots bonk and get far enough left to jesus buffer / boots bonk across the bottom wall to the stairs
crow_gold_leaf.connect(castle_courtyard,BOMB)# bird on tree at left side kanalet, place a bomb against the tree and the crow flies off. With well placed second bomb the crow can be killed
mermaid_statue.connect(animal_village,AND(TRADING_ITEM_SCALE,r.super_jump_feather))# early mermaid statue by buffering on top of the right ledge, then superjumping to the left (horizontal pixel perfect)
animal_village_connector_right.connect(animal_village_connector_left,r.shaq_jump)# shaq jump off the obstacle to get through
animal_village_connector_left.connect(animal_village_connector_right,r.hookshot_clip_block,one_way=True)# use hookshot with an enemy to clip through the obstacle
animal_village_bombcave_heartpiece.connect(animal_village_bombcave,r.pit_buffer_boots)# boots bonk across bottom wall (both at entrance and in item room)
d6_armos_island.connect(ukuku_prairie,OR(r.jesus_jump,r.jesus_rooster))# jesus jump / rooster (3 screen) from seashell mansion to armos island
armos_fairy_entrance.connect(d6_armos_island,r.jesus_buffer,one_way=True)# jesus jump from top (fairy bomb cave) to armos island with fast falling
d6_connector_right.connect(d6_connector_left,r.pit_buffer_boots)# boots bonk across bottom wall at water and pits (can do both ways)
d6_entrance.connect(ukuku_prairie,r.jesus_rooster,one_way=True)# jesus rooster (2 screen) from d6 entrance bottom ledge to ukuku prairie
d6_entrance.connect(armos_fairy_entrance,r.jesus_rooster,one_way=True)# jesus rooster (2 screen) from d6 entrance top ledge to armos fairy entrance
armos_fairy_entrance.connect(d6_armos_island,r.jesus_rooster,one_way=True)# jesus rooster from top (fairy bomb cave) to armos island
armos_fairy_entrance.connect(raft_exit,r.jesus_rooster)# jesus rooster (2-ish screen) from fairy cave to lower raft connector
obstacle_cave_entrance.connect(obstacle_cave_inside,OR(r.hookshot_clip_block,r.shaq_jump))# get past crystal rocks by hookshotting into top pushable block, or boots dashing into top wall where the pushable block is to superjump down
obstacle_cave_entrance.connect(obstacle_cave_inside,r.boots_roosterhop)# get past crystal rocks pushing the top pushable block, then boots dashing up picking up the rooster before bonking. Pause buffer until rooster is fully picked up then throw it down before bonking into wall
d4_entrance.connect(below_right_taltal,OR(r.jesus_jump,r.jesus_rooster),one_way=True)# jesus jump/rooster 5 screens to staircase below damp cave
lower_right_taltal.connect(below_right_taltal,OR(r.jesus_jump,r.jesus_rooster),one_way=True)# jesus jump/rooster to upper ledges, jump off, enter and exit s+q menu to regain pauses, then jesus jump 4 screens to staircase below damp cave
below_right_taltal.connect(outside_swim_cave,r.jesus_rooster)# jesus rooster into the cave entrance after jumping down the ledge, can jesus jump back to the ladder 1 screen below
outside_mambo.connect(below_right_taltal,OR(r.jesus_rooster,r.jesus_jump))# jesus jump/rooster to mambo's cave entrance
ifoptions.hardmode!="oracle":# don't take damage from drowning in water. Could get it with more health probably but standard 3 hearts is not enough
mambo.connect(inside_mambo,AND(OCARINA,r.bomb_trigger))# while drowning, buffer a bomb and after it explodes, buffer another bomb out of the save and quit menu.
outside_raft_house.connect(below_right_taltal,r.jesus_rooster,one_way=True)# jesus rooster from the ledge at raft to the staircase 1 screen south
lower_right_taltal.connect(outside_multichest_left,r.jesus_rooster)# jesus rooster past staircase leading up the mountain
outside_rooster_house.connect(lower_right_taltal,r.jesus_rooster,one_way=True)# jesus rooster down to staircase below damp cave
ifoptions.entranceshufflein("default","simple"):# connector cave from armos d6 area to raft shop may not be randomized to add a flippers path since flippers stop you from jesus jumping
below_right_taltal.connect(raft_game,AND(OR(r.jesus_jump,r.jesus_rooster),r.attack_hookshot_powder),one_way=True)# jesus jump from heartpiece water cave, around the island and clip past the diagonal gap in the rock, then jesus jump all the way down the waterfall to the chests (attack req for hardlock flippers+feather scenario)
outside_raft_house.connect(below_right_taltal,AND(r.super_jump,PEGASUS_BOOTS))#superjump from ledge left to right, can buffer to land on ledge instead of water, then superjump right which is pixel perfect. Boots to get out of wall after landing
bridge_seashell.connect(outside_rooster_house,AND(OR(r.hookshot_spam_pit,r.boots_bonk_pit),POWER_BRACELET))# boots bonk or hookshot spam over the pit to get to the rock
bird_key.connect(bird_cave,AND(r.boots_jump,r.pit_buffer))# boots jump above wall, use multiple pit buffers to get across
right_taltal_connector2.connect(right_taltal_connector3,r.pit_buffer_itemless,one_way=True)# 2 separate pit buffers so not obnoxious to get past the two pit rooms before d7 area. 2nd pits can pit buffer on top right screen, bottom wall to scroll on top of the wall on bottom screen
mountain_bridge_staircase.connect(outside_rooster_house,r.pit_buffer_boots)# cross bridge to staircase with pit buffer to clip bottom wall and jump or boots bonk across
left_right_connector_cave_entrance.connect(left_right_connector_cave_exit,AND(r.boots_jump,r.pit_buffer),one_way=True)# boots jump to bottom left corner of pits, pit buffer and jump to left
left_right_connector_cave_exit.connect(left_right_connector_cave_entrance,AND(ROOSTER,OR(r.boots_roosterhop,r.super_jump_rooster)),one_way=True)# pass through the passage in reverse using a boots rooster hop or rooster superjump in the one way passage area
windfish.connect(nightmare,AND(SWORD,OR(BOOMERANG,BOW,BOMB,COUNT(SWORD,2),AND(OCARINA,OR(SONG1,SONG3)))))# sword quick kill blob, can kill dethl with bombs or sword beams, and can use ocarina to freeze one of ganon's bats to skip dethl eye phase