Key math fix

Turn off vanilla validation if ER is on
This commit is contained in:
aerinon
2020-01-27 09:17:29 -07:00
parent ba6c73861a
commit c619e3018b
3 changed files with 6 additions and 3 deletions

View File

@@ -149,7 +149,8 @@ def vanilla_key_logic(world, player):
analyze_dungeon(key_layout, world, player) analyze_dungeon(key_layout, world, player)
world.key_logic[player][builder.name] = key_layout.key_logic world.key_logic[player][builder.name] = key_layout.key_logic
last_key = None last_key = None
validate_vanilla_key_logic(world, player) if world.shuffle[player] == 'vanilla':
validate_vanilla_key_logic(world, player)
# some useful functions # some useful functions

View File

@@ -864,7 +864,8 @@ 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): def cnt_avail_small_locations(free_locations, key_only, state, world, player):
if not world.keyshuffle[player] and not world.retro[player]: if not world.keyshuffle[player] and not world.retro[player]:
avail_chest_keys = min(free_locations - state.used_locations + state.used_smalls, state.key_locations - key_only) bk_adj = 1 if state.big_key_opened and not state.big_key_special else 0
avail_chest_keys = min(free_locations - bk_adj, state.key_locations - key_only)
return max(0, avail_chest_keys + key_only - state.used_smalls) return max(0, avail_chest_keys + key_only - state.used_smalls)
return state.key_locations - state.used_smalls return state.key_locations - state.used_smalls

View File

@@ -23,7 +23,8 @@ 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.7-pre' __version__ = '0.0.8-pre'
def main(args, seed=None): def main(args, seed=None):
if args.outputpath: if args.outputpath: