Fixed Multiworld support for Bonk Drop shuffle

This commit is contained in:
codemann8
2022-07-29 12:39:00 -05:00
parent e218b8dc97
commit fcd871ae43
2 changed files with 9 additions and 9 deletions

16
Fill.py
View File

@@ -360,18 +360,18 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
for player in range(1, world.players + 1): for player in range(1, world.players + 1):
if world.shuffle_bonk_drops[player]: if world.shuffle_bonk_drops[player]:
for item in world.itempool: for item in world.itempool:
if item.name in ['Big Magic']: if item.name in ['Big Magic'] and item.player == player:
pot_item_pool[player].append(item) pot_item_pool[player].append(item)
break break
from Regions import bonk_prize_table from Regions import bonk_prize_table
for player, magic_pool in pot_item_pool.items(): for player, magic_pool in pot_item_pool.items():
world.itempool.remove(magic_pool[0]) if len(magic_pool) > 0:
pot_locations = [location for location in fill_locations if location.player == player world.itempool.remove(magic_pool[0])
and location.name in [n for n, (_, _, aga, _, _, _) in bonk_prize_table.items() if not aga]] pot_locations = [location for location in fill_locations if location.player == player
pot_locations = filter_pot_locations(pot_locations, world) and location.name in [n for n, (_, _, aga, _, _, _) in bonk_prize_table.items() if not aga]]
fast_fill_helper(world, magic_pool, pot_locations) pot_locations = filter_pot_locations(pot_locations, world)
pots_used = True fast_fill_helper(world, magic_pool, pot_locations)
pots_used = True
if pots_used: if pots_used:
fill_locations = world.get_unfilled_locations() fill_locations = world.get_unfilled_locations()

View File

@@ -1312,7 +1312,7 @@ bonk_prize_table = {
'Hype Cave Statue': (0x29, 0x10, False, '', 'Hype Cave Area', 'encased in stone') 'Hype Cave Statue': (0x29, 0x10, False, '', 'Hype Cave Area', 'encased in stone')
} }
bonk_table_by_location_id = {0x153B00+(data[0]*6)+3: name for name, data in bonk_prize_table.items()} bonk_table_by_location_id = {0x2ABB00+(data[0]*6)+3: name for name, data in bonk_prize_table.items()}
bonk_table_by_location = {y: x for x, y in bonk_table_by_location_id.items()} bonk_table_by_location = {y: x for x, y in bonk_table_by_location_id.items()}