getting there ... somethings up, needs testing

This commit is contained in:
qadan 2020-01-03 03:49:56 -04:00
parent 9ff8d08aca
commit 4d631adf7b
3 changed files with 27 additions and 8 deletions

View File

@ -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:

View File

@ -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

View File

@ -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)