Several bug fixes for yesterday's debacle

This commit is contained in:
aerinon
2020-01-24 08:51:34 -07:00
parent f6179cda03
commit 59e9fb82f5
5 changed files with 18 additions and 14 deletions

View File

@@ -864,7 +864,7 @@ def validate_key_layout_sub_loop(key_layout, state, checked_states, flat_proposa
def cnt_avail_small_locations(free_locations, key_only, state, world, player):
if not world.keyshuffle[player] and not world.retro[player]:
avail_chest_keys = min(free_locations - state.used_locations, state.key_locations - key_only)
avail_chest_keys = min(free_locations - state.used_locations + state.used_smalls, state.key_locations - key_only)
return max(0, avail_chest_keys + key_only - state.used_smalls)
return state.key_locations - state.used_smalls