Files
Grinch-AP/worlds/ladx/LADXR/logic/dungeon2.py

63 lines
5.6 KiB
Python
Raw Normal View History

from .requirements import *
from .location import Location
from ..locations.all import *
class Dungeon2:
def __init__(self, options, world_setup, r):
entrance = Location(dungeon=2)
Location(dungeon=2).add(DungeonChest(0x136)).connect(entrance, POWER_BRACELET) # chest at entrance
dungeon2_l2 = Location(dungeon=2).connect(entrance, AND(KEY2, FOUND(KEY2, 5))) # towards map chest
dungeon2_map_chest = Location(dungeon=2).add(DungeonChest(0x12E)).connect(dungeon2_l2, AND(r.attack_hookshot_powder, OR(FEATHER, HOOKSHOT))) # map chest
dungeon2_r2 = Location(dungeon=2).connect(entrance, r.fire)
Location(dungeon=2).add(DroppedKey(0x132)).connect(dungeon2_r2, r.attack_skeleton)
Location(dungeon=2).add(DungeonChest(0x137)).connect(dungeon2_r2, AND(KEY2, FOUND(KEY2, 5), OR(r.rear_attack, r.rear_attack_range))) # compass chest
if options.owlstatues == "both" or options.owlstatues == "dungeon":
Location(dungeon=2).add(OwlStatue(0x133)).connect(dungeon2_r2, STONE_BEAK2)
LADX: upstream logic updates (#3963) * Fully updates requirements.py to live LADXR (#19) * Updates dungeon2.py to LADXR-Live (#20) No logic changes or bugfix are in this file. It is only code cleanup. * Update dungeon1.py (#21) - The Three of a Kind with Bomb is moved from Normal to Hard Logic The rest is code cleanup. lines 22-25 | 22-26 & 33 | 34 remain different in AP | Upstream with no effective difference * Fully updates dungeon3.py to LADXR-live (#22) Logic Changes: - Hard mode now considers killing the enemies in the top room with pot Everything else is cleanup. * Fully update dungeon4.py to LADXR-live logic (#23) Logic Changes: - Hard Logic: Removes Feather requirement from grabbing the Pit Key - Hell logic: new hookshot clip (line 64) - Hell logic: hookshot spam over the first pit of crossroads, then buffer down (line 69) - Hell logic: push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock. - Hell logic: split zol for more entities, and clip through the block left of keyblock by hookshot spam The rest is code cleanup * Updates dungeon5.py mostly to LADXR-Live Logic (#24) Logic Changes: - Hell logic: use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block (line 69) The rest is cleanup. The upstream splits the post_gohma region into pre_gohma, gohma and post_gohma. I did not implement this yet as I do not know the implications. To port this the following lines need to be changed (AP | LADXR): 18 | 18-20; 55 | 58; 65 | 68-69 * Fully update dungeon6.py logic (#25) Logic Changes: - Hard logic: allow damage boosting past the mini thwomps - Glitched logic: bomb triggering elephants in two cases Everything else is cleanup * Fully update dungeon7.py to LADXR-live logic (#26) Logic Changes: - Hard logic: Three of a Kind is now possible with bombs only Everything else is code cleanup * Fully updates dungeon8.py to LADXR-live (#27) Logic change: - Hard logic: allows to drop the Gibdos into holes as a way to kill them - Glitched logic: underground section with fire balls jumping up out of lava. Use boots superjump off left wall to jump over the pot blocking the way The rest is code cleanup * Fully update dungeonColor.py to LADXR-live (#28) Logic changes: - Normal logic: Karakoros now need power bracelet to put them into their holes - Hard logic: Karakoros without power bracelet but with weapon - Hell logic: Karakoros with only bombs Everything else is code cleanup * Updating overworld.py (#29) * Updating overworld.py This tries to update all logic of the Overworld. Logic changes include: - Normal logic: requires hookshot or shield to traverse Armos Cave - Hard logic: Traverse Armos Cave with nothing (formerly normal logic) - Hard logic: get the animal village bomb cave check with jump and boomerang - Hard logic: use rooster to go to D7 - Lots of Jesus Rooster Jumps I stopped counting and need to go over this again. Also, please investigate line 474 AP because it's removed in LADXR-Upstream and I don't know why. * remove featherless fisher under bridge from hard it was moved to hell upstream and its already present in our code --------- Co-authored-by: Alex Nordstrom <a.l.nordstrom@gmail.com> * fixes * add test messages * Adds Pegasus Boots to the test (#31) * Fix d6 boss_key logic (#30) * restore hardmode logic * higher logic fixes * add bush requirement to the raft in case the player needs to farm rupees to play again --------- Co-authored-by: palex00 <32203971+palex00@users.noreply.github.com>
2024-12-05 10:32:45 -05:00
dungeon2_r3 = Location(dungeon=2).add(DungeonChest(0x138)).connect(dungeon2_r2, r.hit_switch) # first chest with key, can hookshot the switch in previous room
dungeon2_r4 = Location(dungeon=2).add(DungeonChest(0x139)).connect(dungeon2_r3, FEATHER) # button spawn chest
if options.logic == "casual":
shyguy_key_drop = Location(dungeon=2).add(DroppedKey(0x134)).connect(dungeon2_r3, AND(FEATHER, OR(r.rear_attack, r.rear_attack_range))) # shyguy drop key
else:
shyguy_key_drop = Location(dungeon=2).add(DroppedKey(0x134)).connect(dungeon2_r3, OR(r.rear_attack, AND(FEATHER, r.rear_attack_range))) # shyguy drop key
dungeon2_r5 = Location(dungeon=2).connect(dungeon2_r4, AND(KEY2, FOUND(KEY2, 3))) # push two blocks together room with owl statue
if options.owlstatues == "both" or options.owlstatues == "dungeon":
Location(dungeon=2).add(OwlStatue(0x12F)).connect(dungeon2_r5, STONE_BEAK2) # owl statue is before miniboss
miniboss = Location(dungeon=2).add(DungeonChest(0x126)).add(DungeonChest(0x121)).connect(dungeon2_r5, AND(FEATHER, r.miniboss_requirements[world_setup.miniboss_mapping[1]])) # post hinox
if options.owlstatues == "both" or options.owlstatues == "dungeon":
Location(dungeon=2).add(OwlStatue(0x129)).connect(miniboss, STONE_BEAK2) # owl statue after the miniboss
dungeon2_ghosts_room = Location(dungeon=2).connect(miniboss, AND(KEY2, FOUND(KEY2, 5)))
dungeon2_ghosts_chest = Location(dungeon=2).add(DungeonChest(0x120)).connect(dungeon2_ghosts_room, OR(r.fire, BOW)) # bracelet chest
dungeon2_r6 = Location(dungeon=2).add(DungeonChest(0x122)).connect(miniboss, POWER_BRACELET)
dungeon2_boss_key = Location(dungeon=2).add(DungeonChest(0x127)).connect(dungeon2_r6, AND(r.attack_hookshot_powder, OR(BOW, BOMB, MAGIC_ROD, AND(OCARINA, SONG1), POWER_BRACELET)))
dungeon2_pre_stairs_boss = Location(dungeon=2).connect(dungeon2_r6, AND(POWER_BRACELET, KEY2, FOUND(KEY2, 5)))
dungeon2_post_stairs_boss = Location(dungeon=2).connect(dungeon2_pre_stairs_boss, POWER_BRACELET)
dungeon2_pre_boss = Location(dungeon=2).connect(dungeon2_post_stairs_boss, FEATHER)
# If we can get here, we have everything for the boss. So this is also the goal room.
dungeon2_boss = Location(dungeon=2).add(HeartContainer(0x12B), Instrument(0x12a)).connect(dungeon2_pre_boss, AND(NIGHTMARE_KEY2, r.boss_requirements[world_setup.boss_mapping[1]]))
if options.logic == 'glitched' or options.logic == 'hell':
dungeon2_ghosts_chest.connect(dungeon2_ghosts_room, SWORD) # use sword to spawn ghosts on other side of the room so they run away (logically irrelevant because of torches at start)
LADX: upstream logic updates (#3963) * Fully updates requirements.py to live LADXR (#19) * Updates dungeon2.py to LADXR-Live (#20) No logic changes or bugfix are in this file. It is only code cleanup. * Update dungeon1.py (#21) - The Three of a Kind with Bomb is moved from Normal to Hard Logic The rest is code cleanup. lines 22-25 | 22-26 & 33 | 34 remain different in AP | Upstream with no effective difference * Fully updates dungeon3.py to LADXR-live (#22) Logic Changes: - Hard mode now considers killing the enemies in the top room with pot Everything else is cleanup. * Fully update dungeon4.py to LADXR-live logic (#23) Logic Changes: - Hard Logic: Removes Feather requirement from grabbing the Pit Key - Hell logic: new hookshot clip (line 64) - Hell logic: hookshot spam over the first pit of crossroads, then buffer down (line 69) - Hell logic: push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock. - Hell logic: split zol for more entities, and clip through the block left of keyblock by hookshot spam The rest is code cleanup * Updates dungeon5.py mostly to LADXR-Live Logic (#24) Logic Changes: - Hell logic: use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block (line 69) The rest is cleanup. The upstream splits the post_gohma region into pre_gohma, gohma and post_gohma. I did not implement this yet as I do not know the implications. To port this the following lines need to be changed (AP | LADXR): 18 | 18-20; 55 | 58; 65 | 68-69 * Fully update dungeon6.py logic (#25) Logic Changes: - Hard logic: allow damage boosting past the mini thwomps - Glitched logic: bomb triggering elephants in two cases Everything else is cleanup * Fully update dungeon7.py to LADXR-live logic (#26) Logic Changes: - Hard logic: Three of a Kind is now possible with bombs only Everything else is code cleanup * Fully updates dungeon8.py to LADXR-live (#27) Logic change: - Hard logic: allows to drop the Gibdos into holes as a way to kill them - Glitched logic: underground section with fire balls jumping up out of lava. Use boots superjump off left wall to jump over the pot blocking the way The rest is code cleanup * Fully update dungeonColor.py to LADXR-live (#28) Logic changes: - Normal logic: Karakoros now need power bracelet to put them into their holes - Hard logic: Karakoros without power bracelet but with weapon - Hell logic: Karakoros with only bombs Everything else is code cleanup * Updating overworld.py (#29) * Updating overworld.py This tries to update all logic of the Overworld. Logic changes include: - Normal logic: requires hookshot or shield to traverse Armos Cave - Hard logic: Traverse Armos Cave with nothing (formerly normal logic) - Hard logic: get the animal village bomb cave check with jump and boomerang - Hard logic: use rooster to go to D7 - Lots of Jesus Rooster Jumps I stopped counting and need to go over this again. Also, please investigate line 474 AP because it's removed in LADXR-Upstream and I don't know why. * remove featherless fisher under bridge from hard it was moved to hell upstream and its already present in our code --------- Co-authored-by: Alex Nordstrom <a.l.nordstrom@gmail.com> * fixes * add test messages * Adds Pegasus Boots to the test (#31) * Fix d6 boss_key logic (#30) * restore hardmode logic * higher logic fixes * add bush requirement to the raft in case the player needs to farm rupees to play again --------- Co-authored-by: palex00 <32203971+palex00@users.noreply.github.com>
2024-12-05 10:32:45 -05:00
dungeon2_r6.connect(miniboss, r.super_jump_feather) # superjump to staircase next to hinox.
if options.logic == 'hell':
LADX: upstream logic updates (#3963) * Fully updates requirements.py to live LADXR (#19) * Updates dungeon2.py to LADXR-Live (#20) No logic changes or bugfix are in this file. It is only code cleanup. * Update dungeon1.py (#21) - The Three of a Kind with Bomb is moved from Normal to Hard Logic The rest is code cleanup. lines 22-25 | 22-26 & 33 | 34 remain different in AP | Upstream with no effective difference * Fully updates dungeon3.py to LADXR-live (#22) Logic Changes: - Hard mode now considers killing the enemies in the top room with pot Everything else is cleanup. * Fully update dungeon4.py to LADXR-live logic (#23) Logic Changes: - Hard Logic: Removes Feather requirement from grabbing the Pit Key - Hell logic: new hookshot clip (line 64) - Hell logic: hookshot spam over the first pit of crossroads, then buffer down (line 69) - Hell logic: push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock. - Hell logic: split zol for more entities, and clip through the block left of keyblock by hookshot spam The rest is code cleanup * Updates dungeon5.py mostly to LADXR-Live Logic (#24) Logic Changes: - Hell logic: use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block (line 69) The rest is cleanup. The upstream splits the post_gohma region into pre_gohma, gohma and post_gohma. I did not implement this yet as I do not know the implications. To port this the following lines need to be changed (AP | LADXR): 18 | 18-20; 55 | 58; 65 | 68-69 * Fully update dungeon6.py logic (#25) Logic Changes: - Hard logic: allow damage boosting past the mini thwomps - Glitched logic: bomb triggering elephants in two cases Everything else is cleanup * Fully update dungeon7.py to LADXR-live logic (#26) Logic Changes: - Hard logic: Three of a Kind is now possible with bombs only Everything else is code cleanup * Fully updates dungeon8.py to LADXR-live (#27) Logic change: - Hard logic: allows to drop the Gibdos into holes as a way to kill them - Glitched logic: underground section with fire balls jumping up out of lava. Use boots superjump off left wall to jump over the pot blocking the way The rest is code cleanup * Fully update dungeonColor.py to LADXR-live (#28) Logic changes: - Normal logic: Karakoros now need power bracelet to put them into their holes - Hard logic: Karakoros without power bracelet but with weapon - Hell logic: Karakoros with only bombs Everything else is code cleanup * Updating overworld.py (#29) * Updating overworld.py This tries to update all logic of the Overworld. Logic changes include: - Normal logic: requires hookshot or shield to traverse Armos Cave - Hard logic: Traverse Armos Cave with nothing (formerly normal logic) - Hard logic: get the animal village bomb cave check with jump and boomerang - Hard logic: use rooster to go to D7 - Lots of Jesus Rooster Jumps I stopped counting and need to go over this again. Also, please investigate line 474 AP because it's removed in LADXR-Upstream and I don't know why. * remove featherless fisher under bridge from hard it was moved to hell upstream and its already present in our code --------- Co-authored-by: Alex Nordstrom <a.l.nordstrom@gmail.com> * fixes * add test messages * Adds Pegasus Boots to the test (#31) * Fix d6 boss_key logic (#30) * restore hardmode logic * higher logic fixes * add bush requirement to the raft in case the player needs to farm rupees to play again --------- Co-authored-by: palex00 <32203971+palex00@users.noreply.github.com>
2024-12-05 10:32:45 -05:00
dungeon2_map_chest.connect(dungeon2_l2, AND(r.attack_hookshot_powder, r.boots_bonk_pit)) # use boots to jump over the pits
dungeon2_r4.connect(dungeon2_r3, OR(r.boots_bonk_pit, r.hookshot_spam_pit)) # can use both pegasus boots bonks or hookshot spam to cross the pit room
dungeon2_r4.connect(shyguy_key_drop, r.rear_attack_range, one_way=True) # adjust for alternate requirements for dungeon2_r4
LADX: upstream logic updates (#3963) * Fully updates requirements.py to live LADXR (#19) * Updates dungeon2.py to LADXR-Live (#20) No logic changes or bugfix are in this file. It is only code cleanup. * Update dungeon1.py (#21) - The Three of a Kind with Bomb is moved from Normal to Hard Logic The rest is code cleanup. lines 22-25 | 22-26 & 33 | 34 remain different in AP | Upstream with no effective difference * Fully updates dungeon3.py to LADXR-live (#22) Logic Changes: - Hard mode now considers killing the enemies in the top room with pot Everything else is cleanup. * Fully update dungeon4.py to LADXR-live logic (#23) Logic Changes: - Hard Logic: Removes Feather requirement from grabbing the Pit Key - Hell logic: new hookshot clip (line 64) - Hell logic: hookshot spam over the first pit of crossroads, then buffer down (line 69) - Hell logic: push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock. - Hell logic: split zol for more entities, and clip through the block left of keyblock by hookshot spam The rest is code cleanup * Updates dungeon5.py mostly to LADXR-Live Logic (#24) Logic Changes: - Hell logic: use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block (line 69) The rest is cleanup. The upstream splits the post_gohma region into pre_gohma, gohma and post_gohma. I did not implement this yet as I do not know the implications. To port this the following lines need to be changed (AP | LADXR): 18 | 18-20; 55 | 58; 65 | 68-69 * Fully update dungeon6.py logic (#25) Logic Changes: - Hard logic: allow damage boosting past the mini thwomps - Glitched logic: bomb triggering elephants in two cases Everything else is cleanup * Fully update dungeon7.py to LADXR-live logic (#26) Logic Changes: - Hard logic: Three of a Kind is now possible with bombs only Everything else is code cleanup * Fully updates dungeon8.py to LADXR-live (#27) Logic change: - Hard logic: allows to drop the Gibdos into holes as a way to kill them - Glitched logic: underground section with fire balls jumping up out of lava. Use boots superjump off left wall to jump over the pot blocking the way The rest is code cleanup * Fully update dungeonColor.py to LADXR-live (#28) Logic changes: - Normal logic: Karakoros now need power bracelet to put them into their holes - Hard logic: Karakoros without power bracelet but with weapon - Hell logic: Karakoros with only bombs Everything else is code cleanup * Updating overworld.py (#29) * Updating overworld.py This tries to update all logic of the Overworld. Logic changes include: - Normal logic: requires hookshot or shield to traverse Armos Cave - Hard logic: Traverse Armos Cave with nothing (formerly normal logic) - Hard logic: get the animal village bomb cave check with jump and boomerang - Hard logic: use rooster to go to D7 - Lots of Jesus Rooster Jumps I stopped counting and need to go over this again. Also, please investigate line 474 AP because it's removed in LADXR-Upstream and I don't know why. * remove featherless fisher under bridge from hard it was moved to hell upstream and its already present in our code --------- Co-authored-by: Alex Nordstrom <a.l.nordstrom@gmail.com> * fixes * add test messages * Adds Pegasus Boots to the test (#31) * Fix d6 boss_key logic (#30) * restore hardmode logic * higher logic fixes * add bush requirement to the raft in case the player needs to farm rupees to play again --------- Co-authored-by: palex00 <32203971+palex00@users.noreply.github.com>
2024-12-05 10:32:45 -05:00
miniboss.connect(dungeon2_r5, AND(r.boots_dash_2d, r.miniboss_requirements[world_setup.miniboss_mapping[1]])) # use boots to dash over the spikes in the 2d section
dungeon2_pre_stairs_boss.connect(dungeon2_r6, AND(HOOKSHOT, OR(BOW, BOMB, MAGIC_ROD, AND(OCARINA, SONG1)), FOUND(KEY2, 5))) # hookshot clip through the pot using both pol's voice
LADX: upstream logic updates (#3963) * Fully updates requirements.py to live LADXR (#19) * Updates dungeon2.py to LADXR-Live (#20) No logic changes or bugfix are in this file. It is only code cleanup. * Update dungeon1.py (#21) - The Three of a Kind with Bomb is moved from Normal to Hard Logic The rest is code cleanup. lines 22-25 | 22-26 & 33 | 34 remain different in AP | Upstream with no effective difference * Fully updates dungeon3.py to LADXR-live (#22) Logic Changes: - Hard mode now considers killing the enemies in the top room with pot Everything else is cleanup. * Fully update dungeon4.py to LADXR-live logic (#23) Logic Changes: - Hard Logic: Removes Feather requirement from grabbing the Pit Key - Hell logic: new hookshot clip (line 64) - Hell logic: hookshot spam over the first pit of crossroads, then buffer down (line 69) - Hell logic: push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock. - Hell logic: split zol for more entities, and clip through the block left of keyblock by hookshot spam The rest is code cleanup * Updates dungeon5.py mostly to LADXR-Live Logic (#24) Logic Changes: - Hell logic: use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block (line 69) The rest is cleanup. The upstream splits the post_gohma region into pre_gohma, gohma and post_gohma. I did not implement this yet as I do not know the implications. To port this the following lines need to be changed (AP | LADXR): 18 | 18-20; 55 | 58; 65 | 68-69 * Fully update dungeon6.py logic (#25) Logic Changes: - Hard logic: allow damage boosting past the mini thwomps - Glitched logic: bomb triggering elephants in two cases Everything else is cleanup * Fully update dungeon7.py to LADXR-live logic (#26) Logic Changes: - Hard logic: Three of a Kind is now possible with bombs only Everything else is code cleanup * Fully updates dungeon8.py to LADXR-live (#27) Logic change: - Hard logic: allows to drop the Gibdos into holes as a way to kill them - Glitched logic: underground section with fire balls jumping up out of lava. Use boots superjump off left wall to jump over the pot blocking the way The rest is code cleanup * Fully update dungeonColor.py to LADXR-live (#28) Logic changes: - Normal logic: Karakoros now need power bracelet to put them into their holes - Hard logic: Karakoros without power bracelet but with weapon - Hell logic: Karakoros with only bombs Everything else is code cleanup * Updating overworld.py (#29) * Updating overworld.py This tries to update all logic of the Overworld. Logic changes include: - Normal logic: requires hookshot or shield to traverse Armos Cave - Hard logic: Traverse Armos Cave with nothing (formerly normal logic) - Hard logic: get the animal village bomb cave check with jump and boomerang - Hard logic: use rooster to go to D7 - Lots of Jesus Rooster Jumps I stopped counting and need to go over this again. Also, please investigate line 474 AP because it's removed in LADXR-Upstream and I don't know why. * remove featherless fisher under bridge from hard it was moved to hell upstream and its already present in our code --------- Co-authored-by: Alex Nordstrom <a.l.nordstrom@gmail.com> * fixes * add test messages * Adds Pegasus Boots to the test (#31) * Fix d6 boss_key logic (#30) * restore hardmode logic * higher logic fixes * add bush requirement to the raft in case the player needs to farm rupees to play again --------- Co-authored-by: palex00 <32203971+palex00@users.noreply.github.com>
2024-12-05 10:32:45 -05:00
dungeon2_post_stairs_boss.connect(dungeon2_pre_stairs_boss, OR(BOMB, r.boots_jump)) # use a bomb to lower the last platform, or boots + feather to cross over top (only relevant in hell logic)
dungeon2_pre_boss.connect(dungeon2_post_stairs_boss, AND(r.boots_bonk_pit, r.hookshot_spam_pit)) # boots bonk off bottom wall + hookshot spam across the two 1 tile pits vertically
self.entrance = entrance
class NoDungeon2:
def __init__(self, options, world_setup, r):
entrance = Location(dungeon=2)
Location(dungeon=2).add(DungeonChest(0x136)).connect(entrance, POWER_BRACELET) # chest at entrance
Location(dungeon=2).add(HeartContainer(0x12B), Instrument(0x12a)).connect(entrance, r.boss_requirements[
world_setup.boss_mapping[1]])
self.entrance = entrance