Fixed bomb rules to require pearl when applicable

This commit is contained in:
codemann8
2021-11-03 23:15:05 -05:00
parent e6805f26c0
commit 34cea05444

View File

@@ -606,8 +606,10 @@ def bomb_rules(world, player):
'Dark Lake Hylia Ledge Fairy', 'Hype Cave', 'Brewery'] 'Dark Lake Hylia Ledge Fairy', 'Hype Cave', 'Brewery']
for entrance in bonkable_doors: for entrance in bonkable_doors:
add_rule(world.get_entrance(entrance, player), lambda state: state.can_use_bombs(player) or state.has_Boots(player)) add_rule(world.get_entrance(entrance, player), lambda state: state.can_use_bombs(player) or state.has_Boots(player))
add_bunny_rule(world.get_entrance(entrance, player), player)
for entrance in bombable_doors: for entrance in bombable_doors:
add_rule(world.get_entrance(entrance, player), lambda state: state.can_use_bombs(player)) add_rule(world.get_entrance(entrance, player), lambda state: state.can_use_bombs(player))
add_bunny_rule(world.get_entrance(entrance, player), player)
bonkable_items = ['Sahasrahla\'s Hut - Left', 'Sahasrahla\'s Hut - Middle', 'Sahasrahla\'s Hut - Right'] bonkable_items = ['Sahasrahla\'s Hut - Left', 'Sahasrahla\'s Hut - Middle', 'Sahasrahla\'s Hut - Right']
bombable_items = ['Blind\'s Hideout - Top', 'Kakariko Well - Top', 'Chicken House', 'Aginah\'s Cave', 'Graveyard Cave', bombable_items = ['Blind\'s Hideout - Top', 'Kakariko Well - Top', 'Chicken House', 'Aginah\'s Cave', 'Graveyard Cave',
@@ -615,17 +617,22 @@ def bomb_rules(world, player):
'Hype Cave - Top', 'Hype Cave - Middle Right', 'Hype Cave - Middle Left', 'Hype Cave - Bottom'] 'Hype Cave - Top', 'Hype Cave - Middle Right', 'Hype Cave - Middle Left', 'Hype Cave - Bottom']
for location in bonkable_items: for location in bonkable_items:
add_rule(world.get_location(location, player), lambda state: state.can_use_bombs(player) or state.has_Boots(player)) add_rule(world.get_location(location, player), lambda state: state.can_use_bombs(player) or state.has_Boots(player))
add_bunny_rule(world.get_location(location, player), player)
for location in bombable_items: for location in bombable_items:
add_rule(world.get_location(location, player), lambda state: state.can_use_bombs(player)) add_rule(world.get_location(location, player), lambda state: state.can_use_bombs(player))
add_bunny_rule(world.get_location(location, player), player)
cave_kill_locations = ['Mini Moldorm Cave - Far Left', 'Mini Moldorm Cave - Far Right', 'Mini Moldorm Cave - Left', 'Mini Moldorm Cave - Right', 'Mini Moldorm Cave - Generous Guy', 'Spiral Cave'] cave_kill_locations = ['Mini Moldorm Cave - Far Left', 'Mini Moldorm Cave - Far Right', 'Mini Moldorm Cave - Left', 'Mini Moldorm Cave - Right', 'Mini Moldorm Cave - Generous Guy', 'Spiral Cave']
for location in cave_kill_locations: for location in cave_kill_locations:
add_rule(world.get_location(location, player), lambda state: state.can_kill_most_things(player) or state.can_use_bombs(player)) add_rule(world.get_location(location, player), lambda state: state.can_kill_most_things(player) or state.can_use_bombs(player))
add_bunny_rule(world.get_location(location, player), player)
add_rule(world.get_entrance('Spiral Cave (top to bottom)', player), lambda state: state.can_kill_most_things(player) or state.can_use_bombs(player)) add_rule(world.get_entrance('Spiral Cave (top to bottom)', player), lambda state: state.can_kill_most_things(player) or state.can_use_bombs(player))
add_bunny_rule(world.get_entrance('Spiral Cave (top to bottom)', player), player)
paradox_switch_chests = ['Paradox Cave Lower - Far Left', 'Paradox Cave Lower - Left', 'Paradox Cave Lower - Right', 'Paradox Cave Lower - Far Right', 'Paradox Cave Lower - Middle'] paradox_switch_chests = ['Paradox Cave Lower - Far Left', 'Paradox Cave Lower - Left', 'Paradox Cave Lower - Right', 'Paradox Cave Lower - Far Right', 'Paradox Cave Lower - Middle']
for location in paradox_switch_chests: for location in paradox_switch_chests:
add_rule(world.get_location(location, player), lambda state: state.can_hit_crystal_through_barrier(player)) add_rule(world.get_location(location, player), lambda state: state.can_hit_crystal_through_barrier(player))
add_bunny_rule(world.get_location(location, player), player)
# Dungeon bomb logic # Dungeon bomb logic
easy_kill_rooms = [ # Door, bool-bombable easy_kill_rooms = [ # Door, bool-bombable