Ignore impossible key counters when checking key placement.
This commit is contained in:
@@ -1255,6 +1255,8 @@ def validate_key_placement(key_layout, world, player):
|
|||||||
if len(counter.child_doors) == 0:
|
if len(counter.child_doors) == 0:
|
||||||
continue
|
continue
|
||||||
big_found = any(i.item == dungeon.big_key for i in counter.free_locations if "- Big Chest" not in i.name) or big_key_outside
|
big_found = any(i.item == dungeon.big_key for i in counter.free_locations if "- Big Chest" not in i.name) or big_key_outside
|
||||||
|
if counter.big_key_opened and not big_found:
|
||||||
|
continue # Can't get to this state
|
||||||
found_locations = set(i for i in counter.free_locations if big_found or "- Big Chest" not in i.name)
|
found_locations = set(i for i in counter.free_locations if big_found or "- Big Chest" not in i.name)
|
||||||
found_keys = sum(1 for i in found_locations if i.item is not None and i.item.name == smallkey_name and i.item.player == player) + \
|
found_keys = sum(1 for i in found_locations if i.item is not None and i.item.name == smallkey_name and i.item.player == player) + \
|
||||||
len(counter.key_only_locations) + keys_outside
|
len(counter.key_only_locations) + keys_outside
|
||||||
|
|||||||
Reference in New Issue
Block a user