Moved the add_rule for mirrorless swamp to speed it up on invalid entrance shuffle type

This commit is contained in:
espeon65536 2021-06-08 19:19:11 -05:00
parent eaf19643a9
commit 671fd50cfb
1 changed files with 2 additions and 4 deletions

View File

@ -102,11 +102,9 @@ def underworld_glitches_rules(world, player):
rule_map.get(world.get_entrance('Tower of Hera', player).connected_region.name, lambda state: False)(state)
gt_rule = lambda state: (state.has('Moon Pearl', player) or inverted) and \
rule_map.get(world.get_entrance(('Ganons Tower' if not inverted else 'Inverted Ganons Tower'), player).connected_region.name, lambda state: False)(state)
mirrorless_moat_rules.append(lambda state: hera_rule(state) or gt_rule(state))
add_rule(world.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Magic Mirror', player) or all([rule(state) for rule in mirrorless_moat_rules]))
else:
mirrorless_moat_rules.append(lambda state: False) # all function returns True on empty list
add_rule(world.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Magic Mirror', player) or all([rule(state) for rule in mirrorless_moat_rules]))
add_rule(world.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Magic Mirror', player))
# Using the entrances for various ER types. Hera -> Swamp never matters because you can only logically traverse with the mire keys
mire_to_hera = world.get_entrance('Mire to Hera Clip', player)