Skip to content

Commit ca4d001

Browse files
authored
Fully updates requirements.py to live LADXR (#19)
1 parent ed948e3 commit ca4d001

File tree

1 file changed

+53
-11
lines changed

1 file changed

+53
-11
lines changed

worlds/ladx/LADXR/logic/requirements.py

+53-11
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,59 @@ class RequirementsSettings:
255255
def __init__(self, options):
256256
self.bush = OR(SWORD, MAGIC_POWDER, MAGIC_ROD, POWER_BRACELET, BOOMERANG)
257257
self.attack = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG)
258-
self.attack_hookshot = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # switches, hinox, shrouded stalfos
258+
self.attack_hookshot = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # hinox, shrouded stalfos
259+
self.hit_switch = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # hit switches in dungeons
259260
self.attack_hookshot_powder = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT, MAGIC_POWDER) # zols, keese, moldorm
260261
self.attack_no_bomb = OR(SWORD, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # ?
261262
self.attack_hookshot_no_bomb = OR(SWORD, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # vire
262263
self.attack_no_boomerang = OR(SWORD, BOMB, BOW, MAGIC_ROD, HOOKSHOT) # teleporting owls
263264
self.attack_skeleton = OR(SWORD, BOMB, BOW, BOOMERANG, HOOKSHOT) # cannot kill skeletons with the fire rod
265+
self.attack_gibdos = OR(SWORD, BOMB, BOW, BOOMERANG, AND(MAGIC_ROD, HOOKSHOT)) # gibdos are only stunned with hookshot, but can be burnt to jumping stalfos first with magic rod
266+
self.attack_pols_voice = OR(BOMB, MAGIC_ROD, AND(OCARINA, SONG1)) # BOW works, but isn't as reliable as it needs 4 arrows.
267+
self.attack_wizrobe = OR(BOMB, MAGIC_ROD) # BOW works, but isn't as reliable as it needs 4 arrows.
268+
self.stun_wizrobe = OR(BOOMERANG, MAGIC_POWDER, HOOKSHOT)
264269
self.rear_attack = OR(SWORD, BOMB) # mimic
265270
self.rear_attack_range = OR(MAGIC_ROD, BOW) # mimic
266271
self.fire = OR(MAGIC_POWDER, MAGIC_ROD) # torches
267272
self.push_hardhat = OR(SHIELD, SWORD, HOOKSHOT, BOOMERANG)
268-
273+
self.throw_pot = POWER_BRACELET # grab pots to kill enemies
274+
self.throw_enemy = POWER_BRACELET # grab stunned enemies to kill enemies
275+
self.tight_jump = FEATHER # jumps that are possible but are tight to make it across
276+
self.super_jump = AND(FEATHER, OR(SWORD, BOW, MAGIC_ROD)) # standard superjump for glitch logic
277+
self.super_jump_boots = AND(PEGASUS_BOOTS, FEATHER, OR(SWORD, BOW, MAGIC_ROD)) # boots dash into wall for unclipped superjump
278+
self.super_jump_feather = FEATHER # using only feather to align and jump off walls
279+
self.super_jump_sword = AND(FEATHER, SWORD) # unclipped superjumps
280+
self.super_jump_rooster = AND(ROOSTER, OR(SWORD, BOW, MAGIC_ROD)) # use rooster instead of feather to superjump off walls (only where rooster is allowed to be used)
281+
self.shaq_jump = FEATHER # use interactable objects (keyblocks / pushable blocks)
282+
self.boots_superhop = AND(PEGASUS_BOOTS, OR(MAGIC_ROD, BOW)) # dash into walls, pause, unpause and use weapon + hold direction away from wall. Only works in peg rooms
283+
self.boots_roosterhop = AND(PEGASUS_BOOTS, ROOSTER) # dash towards a wall, pick up the rooster and throw it away from the wall before hitting the wall to get a superjump
284+
self.jesus_jump = FEATHER # pause on the frame of hitting liquid (water / lava) to be able to jump again on unpause
285+
self.jesus_buffer = PEGASUS_BOOTS # use a boots bonk to get on top of liquid (water / lava), then use buffers to get into positions
286+
self.damage_boost_special = options.hardmode == "none" # use damage to cross pits / get through forced barriers without needing an enemy that can be eaten by bowwow
287+
self.damage_boost = (options.bowwow == "normal") & (options.hardmode == "none") # Use damage to cross pits / get through forced barriers
288+
self.sideways_block_push = True # wall clip pushable block, get against the edge and push block to move it sideways
289+
self.wall_clip = True # push into corners to get further into walls, to avoid collision with enemies along path (see swamp flowers for example) or just getting a better position for jumps
290+
self.pit_buffer_itemless = True # walk on top of pits and buffer down
291+
self.pit_buffer = FEATHER # jump on top of pits and buffer to cross vertical gaps
292+
self.pit_buffer_boots = OR(PEGASUS_BOOTS, FEATHER) # use boots or feather to cross gaps
293+
self.boots_jump = AND(PEGASUS_BOOTS, FEATHER) # use boots jumps to cross 4 gap spots or other hard to reach spots
294+
self.boots_bonk = PEGASUS_BOOTS # bonk against walls in 2d sections to get to higher places (no pits involved usually)
295+
self.boots_bonk_pit = PEGASUS_BOOTS # use boots bonks to cross 1 tile gaps
296+
self.boots_bonk_2d_spikepit = AND(PEGASUS_BOOTS, "MEDICINE2") # use iframes from medicine to get a boots dash going in 2d spike pits (kanalet secret passage, d3 2d section to boss)
297+
self.boots_bonk_2d_hell = PEGASUS_BOOTS # seperate boots bonks from hell logic which are harder?
298+
self.boots_dash_2d = PEGASUS_BOOTS # use boots to dash over 1 tile gaps in 2d sections
299+
self.hookshot_spam_pit = HOOKSHOT # use hookshot with spam to cross 1 tile gaps
300+
self.hookshot_clip = AND(HOOKSHOT, options.superweapons == False) # use hookshot at specific angles to hookshot past blocks (see forest north log cave, dream shrine entrance for example)
301+
self.hookshot_clip_block = HOOKSHOT # use hookshot spam with enemies to clip through entire blocks (d5 room before gohma, d2 pots room before boss)
302+
self.hookshot_over_pit = HOOKSHOT # use hookshot while over a pit to reach certain areas (see d3 vacuum room, d5 north of crossroads for example)
303+
self.hookshot_jump = AND(HOOKSHOT, FEATHER) # while over pits, on the first frame after the hookshot is retracted you can input a jump to cross big pit gaps
304+
self.bookshot = AND(FEATHER, HOOKSHOT) # use feather on A, hookshot on B on the same frame to get a speedy hookshot that can be used to clip past blocks
305+
self.bomb_trigger = BOMB # drop two bombs at the same time to trigger cutscenes or pickup items (can use pits, or screen transitions
306+
self.shield_bump = SHIELD # use shield to knock back enemies or knock off enemies when used in combination with superjumps
307+
self.text_clip = False & options.nagmessages # trigger a text box on keyblock or rock or obstacle while holding diagonal to clip into the side. Removed from logic for now
308+
self.jesus_rooster = AND(ROOSTER, options.hardmode != "oracle") # when transitioning on top of water, buffer the rooster out of sq menu to spawn it. Then do an unbuffered pickup of the rooster as soon as you spawn again to pick it up
309+
self.zoomerang = AND(PEGASUS_BOOTS, FEATHER, BOOMERANG) # after starting a boots dash, buffer boomerang (on b), feather and the direction you're dashing in to get boosted in certain directions
310+
269311
self.boss_requirements = [
270312
SWORD, # D1 boss
271313
AND(OR(SWORD, MAGIC_ROD), POWER_BRACELET), # D2 boss
@@ -282,7 +324,7 @@ def __init__(self, options):
282324
"HINOX": self.attack_hookshot,
283325
"DODONGO": BOMB,
284326
"CUE_BALL": SWORD,
285-
"GHOMA": OR(BOW, HOOKSHOT),
327+
"GHOMA": OR(BOW, HOOKSHOT, MAGIC_ROD, BOOMERANG),
286328
"SMASHER": POWER_BRACELET,
287329
"GRIM_CREEPER": self.attack_hookshot_no_bomb,
288330
"BLAINO": SWORD,
@@ -293,9 +335,6 @@ def __init__(self, options):
293335
}
294336

295337
# Adjust for options
296-
if options.bowwow != 'normal':
297-
# We cheat in bowwow mode, we pretend we have the sword, as bowwow can pretty much do all what the sword ca$ # Except for taking out bushes (and crystal pillars are removed)
298-
self.bush.remove(SWORD)
299338
if options.logic == "casual":
300339
# In casual mode, remove the more complex kill methods
301340
self.bush.remove(MAGIC_POWDER)
@@ -305,14 +344,17 @@ def __init__(self, options):
305344
self.attack_hookshot_powder.remove(BOMB)
306345
self.attack_no_boomerang.remove(BOMB)
307346
self.attack_skeleton.remove(BOMB)
308-
if options.logic == "hard":
347+
if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell':
348+
self.boss_requirements[1] = AND(OR(SWORD, MAGIC_ROD, BOMB), POWER_BRACELET) # bombs + bracelet genie
309349
self.boss_requirements[3] = AND(FLIPPERS, OR(SWORD, MAGIC_ROD, BOW, BOMB)) # bomb angler fish
310350
self.boss_requirements[6] = OR(MAGIC_ROD, AND(BOMB, BOW), COUNT(SWORD, 2), AND(OR(SWORD, HOOKSHOT, BOW), SHIELD)) # evil eagle 3 cycle magic rod / bomb arrows / l2 sword, and bow kill
311-
if options.logic == "glitched":
312-
self.boss_requirements[3] = AND(FLIPPERS, OR(SWORD, MAGIC_ROD, BOW, BOMB)) # bomb angler fish
351+
self.attack_pols_voice = OR(BOMB, MAGIC_ROD, AND(OCARINA, SONG1), AND(self.stun_wizrobe, self.throw_enemy, BOW)) # wizrobe stun has same req as pols voice stun
352+
self.attack_wizrobe = OR(BOMB, MAGIC_ROD, AND(self.stun_wizrobe, self.throw_enemy, BOW))
353+
354+
if options.logic == 'glitched' or options.logic == 'hell':
313355
self.boss_requirements[6] = OR(MAGIC_ROD, BOMB, BOW, HOOKSHOT, COUNT(SWORD, 2), AND(SWORD, SHIELD)) # evil eagle off screen kill or 3 cycle with bombs
356+
314357
if options.logic == "hell":
315-
self.boss_requirements[3] = AND(FLIPPERS, OR(SWORD, MAGIC_ROD, BOW, BOMB)) # bomb angler fish
316-
self.boss_requirements[6] = OR(MAGIC_ROD, BOMB, BOW, HOOKSHOT, COUNT(SWORD, 2), AND(SWORD, SHIELD)) # evil eagle off screen kill or 3 cycle with bombs
317358
self.boss_requirements[7] = OR(MAGIC_ROD, COUNT(SWORD, 2)) # hot head sword beams
359+
self.miniboss_requirements["GHOMA"] = OR(BOW, HOOKSHOT, MAGIC_ROD, BOOMERANG, AND(OCARINA, BOMB, OR(SONG1, SONG3))) # use bombs to kill gohma, with ocarina to get good timings
318360
self.miniboss_requirements["GIANT_BUZZ_BLOB"] = OR(MAGIC_POWDER, COUNT(SWORD,2)) # use sword beams to damage buzz blob

0 commit comments

Comments
 (0)