diff --git a/BaseClasses.py b/BaseClasses.py index be3b7ac8..40b48ec9 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -160,7 +160,7 @@ class World(object): set_player_attr('pot_contents', None) set_player_attr('pseudoboots', False) set_player_attr('collection_rate', False) - set_player_attr('colorizepots', False) + set_player_attr('colorizepots', True) set_player_attr('pot_pool', {}) set_player_attr('decoupledoors', False) set_player_attr('door_type_mode', 'original') diff --git a/CLI.py b/CLI.py index ad1b157c..d9ff24f3 100644 --- a/CLI.py +++ b/CLI.py @@ -214,7 +214,7 @@ def parse_settings(): "keydropshuffle": False, "dropshuffle": False, "pottery": "none", - "colorizepots": False, + "colorizepots": True, "shufflepots": False, "mapshuffle": False, "compassshuffle": False, diff --git a/ItemList.py b/ItemList.py index 9a0eec7b..81826c70 100644 --- a/ItemList.py +++ b/ItemList.py @@ -1175,8 +1175,19 @@ item_alternates = { def modify_pool_for_start_inventory(start_inventory, world, player): - # skips custom item pools - these shouldn't be adjusted if (world.customizer and world.customizer.get_item_pool()) or world.custom: + # custom item pools only adjust in dungeon items + for item in start_inventory: + if item.dungeon: + d = world.get_dungeon(item.dungeon, item.player) + match = next((i for i in d.all_items if i.name == item.name), None) + if match: + if match.map or match.compass: + d.dungeon_items.remove(match) + elif match.smallkey: + d.small_keys.remove(match) + elif match.bigkey and d.big_key == match: + d.big_key = None return for item in start_inventory: if item.player == player: @@ -1202,8 +1213,8 @@ def modify_pool_for_start_inventory(start_inventory, world, player): d.dungeon_items.remove(match) elif match.smallkey: d.small_keys.remove(match) - elif match.bigkey: - d.big_key.remove(match) + elif match.bigkey and d.big_key == match: + d.big_key = None def make_custom_item_pool(world, player, progressive, shuffle, difficulty, timer, goal, mode, swords, bombbag, customitemarray): diff --git a/KeyDoorShuffle.py b/KeyDoorShuffle.py index 2cbda4be..3549f39f 100644 --- a/KeyDoorShuffle.py +++ b/KeyDoorShuffle.py @@ -2094,6 +2094,12 @@ def validate_key_placement(key_layout, world, player): if world.bigkeyshuffle[player]: max_counter = find_max_counter(key_layout) big_key_outside = bigkey_name not in (l.item.name for l in max_counter.free_locations if l.item) + for i in world.precollected_items: + if i.player == player and i.name == bigkey_name: + big_key_outside = True + break + if i.player == player and i.name == smallkey_name: + keys_outside += 1 for code, counter in key_layout.key_counters.items(): if len(counter.child_doors) == 0: diff --git a/Main.py b/Main.py index 468462b5..00762aa2 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.9-u' +__version__ = '1.2.0.10u' from source.classes.BabelFish import BabelFish diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d5a492b1..6cb841e6 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -108,6 +108,14 @@ These are now independent of retro mode and have three options: None, Random, an * Bonk Fairy (Dark) # Bug Fixes and Notes +* 1.2.0.10u + * Fixed overrun issues with edge transitions + * Better support for customized start_inventory with dungeon items + * Colorized pots now available with lottery. Default is on. + * Dungeon_only support pottery + * Fix AllowAccidentalGlitches flag in OWG + * Potential fix for mirror portal and entering cave on same frame + * A few other minor issues, generation and graphical * 1.2.0.9-u * Disallowed standard exits (due to ER) are now graphically half blocked instead of missing * Graphical issues with Sanctuary and Swamp Hub lobbies are fixed diff --git a/Rom.py b/Rom.py index e53fdb06..639363f7 100644 --- a/Rom.py +++ b/Rom.py @@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '695fe1ac7794b8fc2383454eb15cbdd5' +RANDOMIZERBASEHASH = '7043e64e74b2452367de7cc146873524' class JsonRom(object): @@ -1586,7 +1586,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): rom.write_byte(0x1800A3, 0x01) # enable correct world setting behaviour after agahnim kills rom.write_byte(0x1800A4, 0x01 if world.logic[player] != 'nologic' else 0x00) # enable POD EG fix rom.write_byte(0x180042, 0x01 if world.save_and_quit_from_boss else 0x00) # Allow Save and Quit after boss kill - rom.write_byte(0x180358, 0x01 if world.logic[player] in ['owglitches', 'nologic'] else 0x00) + rom.write_byte(0x180358, 0x01 if (world.logic[player] in ['owglitches', 'nologic']) else 0x00) # remove shield from uncle rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) @@ -1689,9 +1689,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): Room0127.write_to_rom(snes_to_pc(0x2B8000), rom) if world.pot_contents[player]: - colorize_pots = is_mystery or (world.pottery[player] not in ['vanilla', 'lottery'] - and (world.colorizepots[player] - or world.pottery[player] in ['reduced', 'clustered'])) + colorize_pots = (world.pottery[player] != 'vanilla' + and (world.colorizepots[player] or world.pottery[player] in ['reduced', 'clustered'])) if world.pot_contents[player].size() > 0x2800: raise Exception('Pot table is too big for current area') world.pot_contents[player].write_pot_data_to_rom(rom, colorize_pots) diff --git a/Rules.py b/Rules.py index 11c8df16..8676cb96 100644 --- a/Rules.py +++ b/Rules.py @@ -1851,6 +1851,8 @@ def eval_small_key_door_main(state, door_name, dungeon, player): if state.is_door_open(door_name, player): return True key_logic = state.world.key_logic[player][dungeon] + if door_name not in key_logic.door_rules: + return False door_rule = key_logic.door_rules[door_name] door_openable = False for ruleType, number in door_rule.new_rules.items(): diff --git a/data/base2current.bps b/data/base2current.bps index 6621ea5b..ba53c4d4 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 3e00d38a..8364ad58 100644 --- a/source/item/FillUtil.py +++ b/source/item/FillUtil.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from source.item.District import resolve_districts -from BaseClasses import PotItem, PotFlags +from BaseClasses import PotItem, PotFlags, LocationType from DoorShuffle import validate_vanilla_reservation from Dungeons import dungeon_table from Items import item_table, ItemFactory @@ -82,8 +82,8 @@ def create_item_pool_config(world): if pot.item not in [PotItem.Key, PotItem.Hole, PotItem.Switch]: item = pot_items[pot.item] descriptor = 'Large Block' if pot.flags & PotFlags.Block else f'Pot #{pot_index+1}' - location = f'{pot.room} {descriptor}' - config.static_placement[player][item].append(location) + loc = f'{pot.room} {descriptor}' + config.static_placement[player][item].append(loc) if world.shopsanity[player]: for item, locs in shop_vanilla_mapping.items(): config.static_placement[player][item].extend(locs) @@ -164,6 +164,10 @@ def create_item_pool_config(world): mode_grouping['Heart Containers'] + mode_grouping['GT Trash'] + mode_grouping['Small Keys'] + mode_grouping['Compasses'] + mode_grouping['Maps'] + mode_grouping['Key Drops'] + mode_grouping['Pot Keys'] + mode_grouping['Big Key Drops']) + dungeon_set = set(dungeon_set) + for loc in world.get_locations(): + if loc.parent_region.dungeon and loc.type in [LocationType.Pot, LocationType.Drop]: + dungeon_set.add(loc.name) for player in range(1, world.players + 1): config.item_pool[player] = determine_major_items(world, player) config.location_groups[0].locations = set(dungeon_set) diff --git a/source/tools/MysteryUtils.py b/source/tools/MysteryUtils.py index e5c215c6..a5681a11 100644 --- a/source/tools/MysteryUtils.py +++ b/source/tools/MysteryUtils.py @@ -111,7 +111,7 @@ def roll_settings(weights): ret.dropshuffle = get_choice('dropshuffle') == 'on' or keydropshuffle ret.pottery = get_choice('pottery') if 'pottery' in weights else 'none' ret.pottery = 'keys' if ret.pottery == 'none' and keydropshuffle else ret.pottery - ret.colorizepots = get_choice('colorizepots') == 'on' + ret.colorizepots = get_choice_default('colorizepots', default='on') == 'on' ret.shufflepots = get_choice('pot_shuffle') == 'on' ret.mixed_travel = get_choice('mixed_travel') if 'mixed_travel' in weights else 'prevent' ret.standardize_palettes = (get_choice('standardize_palettes') if 'standardize_palettes' in weights