From 4d631adf7b5364792dc7aa4cd95c6250b9ec22f1 Mon Sep 17 00:00:00 2001 From: qadan Date: Fri, 3 Jan 2020 03:49:56 -0400 Subject: [PATCH] getting there ... somethings up, needs testing --- ItemList.py | 1 - Mystery.py | 6 +++--- Rules.py | 28 ++++++++++++++++++++++++---- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ItemList.py b/ItemList.py index a9d57039..3db3f130 100644 --- a/ItemList.py +++ b/ItemList.py @@ -408,7 +408,6 @@ def get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, r precollected_items.append('Pegasus Boots') pool.remove('Pegasus Boots') - if want_progressives(): pool.extend(progressivegloves) else: diff --git a/Mystery.py b/Mystery.py index 06f57aca..2a79c990 100644 --- a/Mystery.py +++ b/Mystery.py @@ -114,10 +114,10 @@ def roll_settings(weights): ret = argparse.Namespace() glitches_required = get_choice('glitches_required') - if glitches_required not in ['none', 'no_logic']: - print("Only NMG and No Logic supported") + if glitches_required not in ['none', 'no_logic', 'overworld_glitches']: + print("Only NMG, OWG and No Logic supported") glitches_required = 'none' - ret.logic = {'none': 'noglitches', 'no_logic': 'nologic'}[glitches_required] + ret.logic = {'none': 'noglitches', 'no_logic': 'nologic', 'overworld_glitches': 'owglitches'}[glitches_required] item_placement = get_choice('item_placement') # not supported in ER diff --git a/Rules.py b/Rules.py index 1907c0b0..41015113 100644 --- a/Rules.py +++ b/Rules.py @@ -731,6 +731,7 @@ def overworld_glitches_rules(world, player): 'Death Mountain Floating Island (Dark World)', 'Turtle Rock (Top)', ] + # set up boots-accessible regions if world.mode[player] != 'inverted': lw_boots_accessible_regions.append('Cave 45 Ledge') lw_boots_accessible_regions.append('Graveyard Ledge') @@ -739,16 +740,35 @@ def overworld_glitches_rules(world, player): set_rule(world.get_entrance('Dark Desert Teleporter', player), lambda state: (state.has('Ocarina', player) or state.has_Boots(player)) and state.can_lift_heavy_rocks(player)) set_rule(world.get_entrance('South Hyrule Teleporter', player), lambda state: (state.has('Hammer', player) or state.has_Boots(player)) and state.can_lift_rocks(player)) set_rule(world.get_location('Zora\'s Ledge', player), lambda state: state.has_Boots(player)) + add_rule(world.get_entrance('Ganons Tower', player), lambda state: state.has_Boots(player) and state.has_Pearl(player), 'or') needs_boots = lambda state: state.has_Boots(player) needs_boots_and_pearl = lambda state: state.has_Boots(player) and state.has_Pearl(player) for spot in lw_boots_accessible_regions: - region = world.get_region(spot, player) - for location in region.locations: + for location in world.get_region(spot, player).locations: add_rule(world.get_location(location, player), needs_boots_and_pearl if world.mode[player] == 'inverted' else needs_boots, 'or') for spot in dw_boots_accessible_regions: - region = world.get_region(spot, player) - for location in region.locations: + for location in world.get_region(spot, player).locations: add_rule(world.get_location(location, player), needs_boots if world.mode[player] == 'inverted' else needs_boots_and_pearl, 'or') + # bunny DMD rules + if world.mode[player] != 'inverted': + # set up some mirror-accessible dw entrances. + boots_and_mirror = lambda state: state.has_Boots(player) and state.has_Mirror(player) + add_rule(world.get_entrance('Dark Sanctuary Hint', player), boots_and_mirror, 'or') # should suffice to give us west dark world access + for spot in world.get_region('Dark Death Mountain (East Bottom)', player).locations: + add_rule(world.get_location(spot, player), boots_and_mirror, 'or') + # dw entrances accessible with mirror and hookshot + mirror_hookshot_accessible_dw_locations = [ + 'Pyramid Fairy', + 'Pyramid Entrance', + 'Pyramid Drop', + ] + mirror_hookshot_accessible_dw_locations.extend(world.get_region('Dark Death Mountain Ledge', player).locations) + for spot in mirror_hookshot_accessible_dw_locations: + add_rule(world.get_entrance(spot, player), lambda state: state.has_Boots(player) and state.has_Mirror(player) and state.has('Hookshot', player), 'or') + # dw entrances accessible with mirror and titans + boots_mirror_titans = lambda state: state.has_Boots(player) and state.has_Mirror(player) and state.can_lift_heavy_rocks(player) + add_rule(world.get_entrance('Mire Shed', player), boots_mirror_titans, 'or') + add_rule(world.get_location('Frog', player), boots_mirror_titans, 'or') add_conditional_lamps(world, player)