Add VT26 style shuffling of dungeon items

Also adds new VT26 algorithm type that uses this, and makes it the default.
the new type also includes the GT junk items randomization.
This commit is contained in:
Kevin Cathcart
2017-10-15 13:52:42 -04:00
parent a244b92665
commit d78a3ce7a5
7 changed files with 45 additions and 9 deletions

View File

@@ -102,6 +102,27 @@ def fill_dungeons(world):
world.state._clear_cache()
def fill_dungeons_restrictive(world):
from Main import fill_restrictive
all_state_base = world.get_all_state()
world.push_item(world.get_location('[dungeon-D3-B1] Skull Woods - South of Big Chest'), ItemFactory('Small Key (Skull Woods)'), False)
world.get_location('[dungeon-D3-B1] Skull Woods - South of Big Chest').event = True
shuffled_locations=world.get_unfilled_locations()
random.shuffle(shuffled_locations)
dungeon_items = [item for dungeon in world.dungeons for item in dungeon.all_items]
#sort in the order Big Key, Small Key, Other before placing dungeon items
sort_order={"BigKey":3,"SmallKey":2};
dungeon_items.sort(key=lambda item:sort_order.get(item.type, 1) )
fill_restrictive(world, all_state_base, shuffled_locations, dungeon_items)
world.state._clear_cache()
dungeon_music_addresses = {'Armos - Pendant': [0x1559A],
'Lanmolas - Pendant': [0x1559B, 0x1559C, 0x1559D, 0x1559E],
'Moldorm - Pendant': [0x155C5, 0x1107A, 0x10B8C],