Refinement - Missing blocked_connections added - appropriate checklists
Optimization - Exp Cache - which is somewhat problematic with the playthrough logic
This commit is contained in:
10
Fill.py
10
Fill.py
@@ -199,7 +199,6 @@ def fill_restrictive(world, base_state, locations, itempool, keys_in_itempool =
|
||||
|
||||
spot_to_fill = None
|
||||
|
||||
valid_locations = []
|
||||
for location in locations:
|
||||
if item_to_place.smallkey or item_to_place.bigkey: # a better test to see if a key can go there
|
||||
location.item = item_to_place
|
||||
@@ -210,16 +209,11 @@ def fill_restrictive(world, base_state, locations, itempool, keys_in_itempool =
|
||||
if (not single_player_placement or location.player == item_to_place.player)\
|
||||
and location.can_fill(test_state, item_to_place, perform_access_check)\
|
||||
and valid_key_placement(item_to_place, location, itempool if (keys_in_itempool and keys_in_itempool[item_to_place.player]) else world.itempool, world):
|
||||
# todo: optimization: break instead of cataloging all valid locations
|
||||
if not spot_to_fill:
|
||||
spot_to_fill = location
|
||||
valid_locations.append(location)
|
||||
|
||||
break
|
||||
if item_to_place.smallkey or item_to_place.bigkey:
|
||||
location.item = None
|
||||
|
||||
logging.getLogger('').debug(f'{item_to_place} valid placement at {len(valid_locations)} locations')
|
||||
|
||||
if spot_to_fill is None:
|
||||
# we filled all reachable spots. Maybe the game can be beaten anyway?
|
||||
unplaced_items.insert(0, item_to_place)
|
||||
@@ -691,7 +685,7 @@ def balance_money_progression(world):
|
||||
for player in solvent:
|
||||
wallet[player] -= sphere_costs[player]
|
||||
for location in locked_by_money[player]:
|
||||
if location == 'Kiki':
|
||||
if isinstance(location, str) and location == 'Kiki':
|
||||
kiki_paid[player] = True
|
||||
else:
|
||||
state.collect(location.item, True, location)
|
||||
|
||||
Reference in New Issue
Block a user