Fix for small key fill
This commit is contained in:
3
Fill.py
3
Fill.py
@@ -61,7 +61,7 @@ def fill_dungeons_restrictive(world, shuffled_locations):
|
|||||||
small_state_base = all_state_base.copy()
|
small_state_base = all_state_base.copy()
|
||||||
for x in others:
|
for x in others:
|
||||||
small_state_base.collect(x, True)
|
small_state_base.collect(x, True)
|
||||||
fill(small_state_base, smalls, smalls)
|
fill(small_state_base, smalls, list(smalls))
|
||||||
random.shuffle(shuffled_locations)
|
random.shuffle(shuffled_locations)
|
||||||
fill(all_state_base, others, None)
|
fill(all_state_base, others, None)
|
||||||
|
|
||||||
@@ -123,7 +123,6 @@ def fill_restrictive(world, base_state, locations, itempool, key_pool=None, sing
|
|||||||
raise FillError('No more spots to place %s' % item_to_place)
|
raise FillError('No more spots to place %s' % item_to_place)
|
||||||
|
|
||||||
world.push_item(spot_to_fill, item_to_place, False)
|
world.push_item(spot_to_fill, item_to_place, False)
|
||||||
# todo: remove key item from key_pool
|
|
||||||
if item_to_place.smallkey:
|
if item_to_place.smallkey:
|
||||||
with suppress(ValueError):
|
with suppress(ValueError):
|
||||||
key_pool.remove(item_to_place)
|
key_pool.remove(item_to_place)
|
||||||
|
|||||||
24
ItemList.py
24
ItemList.py
@@ -1099,27 +1099,3 @@ def test():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
test()
|
test()
|
||||||
|
|
||||||
|
|
||||||
def fill_specific_items(world):
|
|
||||||
keypool = [item for item in world.itempool if item.smallkey]
|
|
||||||
cage = world.get_location('Tower of Hera - Basement Cage', 1)
|
|
||||||
c_dungeon = cage.parent_region.dungeon
|
|
||||||
key_item = next(x for x in keypool if c_dungeon.name in x.name or (c_dungeon.name == 'Hyrule Castle' and 'Escape' in x.name))
|
|
||||||
world.itempool.remove(key_item)
|
|
||||||
all_state = world.get_all_state(True)
|
|
||||||
fill_restrictive(world, all_state, [cage], [key_item])
|
|
||||||
|
|
||||||
location = world.get_location('Tower of Hera - Map Chest', 1)
|
|
||||||
key_item = next(x for x in world.itempool if 'Byrna' in x.name)
|
|
||||||
world.itempool.remove(key_item)
|
|
||||||
fast_fill(world, [key_item], [location])
|
|
||||||
|
|
||||||
|
|
||||||
# somaria = next(item for item in world.itempool if item.name == 'Cane of Somaria')
|
|
||||||
# shooter = world.get_location('Palace of Darkness - Shooter Room', 1)
|
|
||||||
# world.itempool.remove(somaria)
|
|
||||||
# all_state = world.get_all_state(True)
|
|
||||||
# fill_restrictive(world, all_state, [shooter], [somaria])
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user