Vanilla fixes for 100% locations

This commit is contained in:
aerinon
2020-02-24 08:53:03 -07:00
parent e6b37af515
commit 72a94e1e4f
3 changed files with 7 additions and 7 deletions

View File

@@ -160,7 +160,7 @@ def vanilla_key_logic(world, player):
world.key_logic[player][builder.name] = key_layout.key_logic world.key_logic[player][builder.name] = key_layout.key_logic
log_key_logic(builder.name, key_layout.key_logic) log_key_logic(builder.name, key_layout.key_logic)
last_key = None last_key = None
if world.shuffle[player] == 'vanilla': if world.shuffle[player] == 'vanilla' and world.accessibility[player] == 'items':
validate_vanilla_key_logic(world, player) validate_vanilla_key_logic(world, player)

View File

@@ -147,7 +147,7 @@ def analyze_dungeon(key_layout, world, player):
key_layout.key_counters = create_key_counters(key_layout, world, player) key_layout.key_counters = create_key_counters(key_layout, world, player)
key_logic = key_layout.key_logic key_logic = key_layout.key_logic
find_bk_locked_sections(key_layout, world) find_bk_locked_sections(key_layout, world, player)
key_logic.bk_chests.update(find_big_chest_locations(key_layout.all_chest_locations)) key_logic.bk_chests.update(find_big_chest_locations(key_layout.all_chest_locations))
if world.retro[player] and world.mode[player] != 'standard': if world.retro[player] and world.mode[player] != 'standard':
return return
@@ -304,14 +304,14 @@ def queue_sorter_2(queue_item):
return 1 if door.bigKey else 0 return 1 if door.bigKey else 0
def find_bk_locked_sections(key_layout, world): def find_bk_locked_sections(key_layout, world, player):
if key_layout.big_key_special: if key_layout.big_key_special:
return return
key_counters = key_layout.key_counters key_counters = key_layout.key_counters
key_logic = key_layout.key_logic key_logic = key_layout.key_logic
bk_key_not_required = set() bk_key_not_required = set()
big_chest_allowed_big_key = world.accessibility != 'locations' big_chest_allowed_big_key = world.accessibility[player] != 'locations'
for counter in key_counters.values(): for counter in key_counters.values():
key_layout.all_chest_locations.update(counter.free_locations) key_layout.all_chest_locations.update(counter.free_locations)
key_layout.all_locations.update(counter.free_locations) key_layout.all_locations.update(counter.free_locations)
@@ -1450,8 +1450,8 @@ def validate_key_placement(key_layout, world, player):
if not can_progress: if not can_progress:
missing_locations = set(max_counter.free_locations.keys()).difference(found_locations) missing_locations = set(max_counter.free_locations.keys()).difference(found_locations)
missing_items = [l for l in missing_locations if l.item is None or (l.item.name != smallkey_name and l.item != dungeon.big_key) or "- Boss" in l.name] missing_items = [l for l in missing_locations if l.item is None or (l.item.name != smallkey_name and l.item != dungeon.big_key) or "- Boss" in l.name]
#missing_key_only = set(max_counter.key_only_locations.keys()).difference(counter.key_only_locations.keys()) # do freestanding keys matter for locations? # missing_key_only = set(max_counter.key_only_locations.keys()).difference(counter.key_only_locations.keys()) # do freestanding keys matter for locations?
if len(missing_items) > 0: #world.accessibility[player]=='locations' and (len(missing_locations)>0 or len(missing_key_only) > 0): if len(missing_items) > 0: # world.accessibility[player]=='locations' and (len(missing_locations)>0 or len(missing_key_only) > 0):
logging.getLogger('').error("Keylock - can't open locations: ") logging.getLogger('').error("Keylock - can't open locations: ")
for i in missing_locations: for i in missing_locations:
logging.getLogger('').error(i) logging.getLogger('').error(i)

View File

@@ -24,7 +24,7 @@ from Fill import distribute_items_cutoff, distribute_items_staleness, distribute
from ItemList import generate_itempool, difficulties, fill_prizes from ItemList import generate_itempool, difficulties, fill_prizes
from Utils import output_path, parse_player_names from Utils import output_path, parse_player_names
__version__ = '0.0.17pre' __version__ = '0.0.17.1p'
def main(args, seed=None): def main(args, seed=None):