diff --git a/ItemList.py b/ItemList.py index 81826c70..aebb6489 100644 --- a/ItemList.py +++ b/ItemList.py @@ -392,21 +392,7 @@ def generate_itempool(world, player): for i in range(4): next(adv_heart_pieces).advancement = True - beeweights = {'0': {None: 100}, - '1': {None: 75, 'trap': 25}, - '2': {None: 40, 'trap': 40, 'bee': 20}, - '3': {'trap': 50, 'bee': 50}, - '4': {'trap': 100}} - def beemizer(item): - if world.beemizer[item.player] and not item.advancement and not item.priority and not item.type: - choice = random.choices(list(beeweights[world.beemizer[item.player]].keys()), weights=list(beeweights[world.beemizer[item.player]].values()))[0] - return item if not choice else ItemFactory("Bee Trap", player) if choice == 'trap' else ItemFactory("Bee", player) - return item - - if not skip_pool_adjustments: - world.itempool += [beemizer(item) for item in items] - else: - world.itempool += items + world.itempool += items # shuffle medallions mm_medallion, tr_medallion = None, None @@ -463,6 +449,20 @@ def generate_itempool(world, player): # modfiy based on start inventory, if any modify_pool_for_start_inventory(start_inventory, world, player) + beeweights = {'0': {None: 100}, + '1': {None: 75, 'trap': 25}, + '2': {None: 40, 'trap': 40, 'bee': 20}, + '3': {'trap': 50, 'bee': 50}, + '4': {'trap': 100}} + def beemizer(item): + if world.beemizer[item.player] and not item.advancement and not item.priority and not item.type: + choice = random.choices(list(beeweights[world.beemizer[item.player]].keys()), weights=list(beeweights[world.beemizer[item.player]].values()))[0] + return item if not choice else ItemFactory("Bee Trap", player) if choice == 'trap' else ItemFactory("Bee", player) + return item + + if not skip_pool_adjustments: + world.itempool = [beemizer(item) for item in world.itempool] + # increase pool if not enough items ttl_locations = sum(1 for x in world.get_unfilled_locations(player) if '- Prize' not in x.name) pool_size = count_player_dungeon_item_pool(world, player) diff --git a/Main.py b/Main.py index 00762aa2..1e208c32 100644 --- a/Main.py +++ b/Main.py @@ -36,7 +36,7 @@ from source.overworld.EntranceShuffle2 import link_entrances_new from source.tools.BPS import create_bps_from_data from source.classes.CustomSettings import CustomSettings -__version__ = '1.2.0.10u' +__version__ = '1.2.0.11u' from source.classes.BabelFish import BabelFish diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6cb841e6..ac51ccda 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -108,6 +108,12 @@ These are now independent of retro mode and have three options: None, Random, an * Bonk Fairy (Dark) # Bug Fixes and Notes +* 1.2.0.11u + * Fixed an issue with lower layer doors in Standard + * Fix for doors in cave state (will no longer be vanilla) + * Added a logic rule for th murderdactyl near bumper ledge for OHKO purposes + * Fix for beemizer including modes with an increased item pool + * Fix for district algoritm * 1.2.0.10u * Fixed overrun issues with edge transitions * Better support for customized start_inventory with dungeon items diff --git a/Rom.py b/Rom.py index 639363f7..6bf105b1 100644 --- a/Rom.py +++ b/Rom.py @@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '7043e64e74b2452367de7cc146873524' +RANDOMIZERBASEHASH = '9ea9fca9e2c9a2cc37287368a860105b' class JsonRom(object): @@ -1695,6 +1695,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): raise Exception('Pot table is too big for current area') world.pot_contents[player].write_pot_data_to_rom(rom, colorize_pots) + write_enemizer_tweaks(rom, world, player) write_strings(rom, world, player, team) # write initial sram @@ -1785,6 +1786,11 @@ def write_custom_shops(rom, world, player): rom.write_bytes(0x184900, items_data) +def write_enemizer_tweaks(rom, world, player): + if world.enemy_shuffle[player] != 'none': + rom.write_byte(snes_to_pc(0x1DF6D8, 0)) # lets enemies walk on water instead of clipping into infinity? + rom.write_byte(snes_to_pc(0x0DB6B3, 0x82)) # hovers don't need water necessarily? + def hud_format_text(text): output = bytes() for char in text.lower(): diff --git a/Rules.py b/Rules.py index 8676cb96..5bf4f76e 100644 --- a/Rules.py +++ b/Rules.py @@ -921,6 +921,8 @@ def default_rules(world, player): set_rule(world.get_entrance('Desert Pass Rocks (South)', player), lambda state: state.can_lift_rocks(player)) set_rule(world.get_entrance('Skull Woods Bush Rock (West)', player), lambda state: state.can_lift_rocks(player)) set_rule(world.get_entrance('Skull Woods Bush Rock (East)', player), lambda state: state.can_lift_rocks(player)) + # this more like an ohko rule - dependent on bird being present too - so enemizer could turn this off? + set_rule(world.get_entrance('Bumper Cave Ledge Drop', player), lambda state: (state.has('Cape', player) or state.has('Cane of Byrna', player) or state.has_sword(player))) set_rule(world.get_entrance('Bumper Cave Entrance Rock', player), lambda state: state.can_lift_rocks(player)) set_rule(world.get_entrance('Skull Woods Pass Rock (North)', player), lambda state: state.can_lift_heavy_rocks(player)) set_rule(world.get_entrance('Skull Woods Pass Rock (South)', player), lambda state: state.can_lift_heavy_rocks(player)) @@ -1157,6 +1159,7 @@ def ow_bunny_rules(world, player): add_bunny_rule(world.get_entrance('Skull Woods Forgotten Bush (East)', player), player) add_bunny_rule(world.get_entrance('Skull Woods Second Section Hole', player), player) add_bunny_rule(world.get_entrance('East Dark Death Mountain Bushes', player), player) + add_bunny_rule(world.get_entrance('Bumper Cave Ledge Drop', player), player) add_bunny_rule(world.get_entrance('Bumper Cave Entrance Rock', player), player) add_bunny_rule(world.get_entrance('Skull Woods Pass Bush Row (West)', player), player) add_bunny_rule(world.get_entrance('Skull Woods Pass Bush Row (East)', player), player) diff --git a/data/base2current.bps b/data/base2current.bps index ba53c4d4..20a9b9dc 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ diff --git a/source/item/FillUtil.py b/source/item/FillUtil.py index 8364ad58..3f82db2a 100644 --- a/source/item/FillUtil.py +++ b/source/item/FillUtil.py @@ -426,7 +426,8 @@ def filter_locations(item_to_place, locations, world, vanilla_skip=False, potion return filtered if len(filtered) > 0 else locations if world.algorithm == 'district': config = world.item_pool_config - if item_to_place == 'Placeholder' or item_to_place.name in config.item_pool[item_to_place.player]: + if ((isinstance(item_to_place,str) and item_to_place == 'Placeholder') + or item_to_place.name in config.item_pool[item_to_place.player]): restricted = config.location_groups[0].locations filtered = [l for l in locations if l.name in restricted and l.player in restricted[l.name]] return filtered if len(filtered) > 0 else locations