From 8839926a9734de8204c0c93ae4bf24c6de56c1d1 Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 6 Jan 2023 13:56:18 -0700 Subject: [PATCH] Race flag on GUI Async Doors League presets Take into account starting inventory with default item pool --- ItemList.py | 17 ++++++++++ Main.py | 14 ++------ RELEASENOTES.md | 11 +++++-- Rom.py | 4 +-- data/base2current.bps | Bin 93478 -> 93506 bytes .../async_doors_league/S3_BombBag.yaml | 23 ++++++++++++++ docs/presets/async_doors_league/S3_Main.yaml | 22 +++++++++++++ .../async_doors_league/S3_PotteryLottery.yaml | 22 +++++++++++++ .../async_doors_league/S3_Standard.yaml | 30 ++++++++++++++++++ resources/app/gui/lang/en.json | 1 + .../gui/randomize/generation/checkboxes.json | 3 +- source/classes/CustomSettings.py | 5 ++- source/classes/constants.py | 1 + 13 files changed, 134 insertions(+), 19 deletions(-) create mode 100644 docs/presets/async_doors_league/S3_BombBag.yaml create mode 100644 docs/presets/async_doors_league/S3_Main.yaml create mode 100644 docs/presets/async_doors_league/S3_PotteryLottery.yaml create mode 100644 docs/presets/async_doors_league/S3_Standard.yaml diff --git a/ItemList.py b/ItemList.py index 1b4b6087..7080b330 100644 --- a/ItemList.py +++ b/ItemList.py @@ -962,9 +962,26 @@ def get_pool_core(world, player, progressive, shuffle, difficulty, treasure_hunt pool.extend(['Small Key (Universal)']) else: pool.extend(['Small Key (Universal)']) + modify_pool_for_start_inventory(pool, world, player) return (pool, placed_items, precollected_items, clock_mode, lamps_needed_for_dark_rooms) +def modify_pool_for_start_inventory(pool, world, player): + for item in world.precollected_items: + if item.player == player: + pool.remove(item.name) + 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: + d.big_key.remove(match) + + def make_custom_item_pool(world, player, progressive, shuffle, difficulty, timer, goal, mode, swords, bombbag, customitemarray): if isinstance(customitemarray,dict) and 1 in customitemarray: customitemarray = customitemarray[1] diff --git a/Main.py b/Main.py index cfb7e5e5..820cf079 100644 --- a/Main.py +++ b/Main.py @@ -34,7 +34,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.2-u' +__version__ = '1.2.0.3-u' from source.classes.BabelFish import BabelFish @@ -150,7 +150,7 @@ def main(args, seed=None, fish=None): world.player_names[player].append(name) logger.info('') world.settings = CustomSettings() - world.settings.create_from_world(world) + world.settings.create_from_world(world, args.race) outfilebase = f'DR_{args.outputname if args.outputname else world.seed}' @@ -196,16 +196,6 @@ def main(args, seed=None, fish=None): item = ItemFactory(inv_item.strip(), p) if item: world.push_precollected(item) - 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: - d.big_key.remove(match) if args.print_custom_yaml: world.settings.record_info(world) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 794af2d6..21f4a884 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -109,6 +109,14 @@ These are now independent of retro mode and have three options: None, Random, an # Bug Fixes and Notes +* 1.2.0.3-u + * Starting inventory taken into account with default item pool. (Custom pools must do this themselves) + * Fast ROM update + * Fix for restricted boss item counting maps & compasses as vital + * Bug fix for vanilla ER + inverted + experimental +* 1.2.0.2-u + * Fixed a bug with certain trap doors missing + * Added a hint reference for district hints * 1.2.0.1-u * Added new ganonhunt and completionist goals * Fixed the issue when defeating Agahnim and standing in the doorway can cause door state to linger. @@ -116,9 +124,6 @@ These are now independent of retro mode and have three options: None, Random, an * Fix for vanilla Doors + Standard + ER * Added a limit per dungeon on small key doors to ensure reasonable generation * Fixed many small bugs -* 1.2.0.2-u - * Fixed a bug with certain trap doors missing - * Added a hint reference for district hints # Known Issues diff --git a/Rom.py b/Rom.py index 03ab0283..d210ae01 100644 --- a/Rom.py +++ b/Rom.py @@ -37,7 +37,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'f204143853a58e55a5fbc4c5bc87045e' +RANDOMIZERBASEHASH = '1e1094919d6a9dd151f8bc15c40b35f7' class JsonRom(object): @@ -2226,7 +2226,7 @@ def write_strings(rom, world, player, team): for loc_name in district.locations: location_item = world.get_location(loc_name, player).item if location_item.advancement: - if 'Heart Container' in location_item.name: + if 'Heart Container' in location_item.name or location_item.compass or location_item.map: continue itm_type = 'useful' if useful_item_for_hint(location_item, world) else 'vital' hint_type = 'path' diff --git a/data/base2current.bps b/data/base2current.bps index 41a996a35b4b37b1f6e70916a66e816e618ce471..271b2c2e5bd56abf7e11615aee052723186d40f8 100644 GIT binary patch delta 1286 zcmWlXe@s(X6vulXEk8LnngSbc!M@G2_P&m7$V}iV0?9buLaL{sQhR z1?+>@AH0<}$}Ck|E^R={*jAUh7CM+VnMq@GOSa66GUCcRIjSCjT+ zU`y(44!(h~sNDvK5veCGScA8Dtk7k^vEPiByYM-S6-N7_IRUn}b2K}^np3A*5gmLxAgta!*s&oX7?`~SdS;KH9}S)iu;D~} zZ?HMQdOt=?nO)4-N*1E5)XU#y)aC-jg+V;StU>Hy)GdTMyB|189L9y{LzBLLR_05p z%AdTY_0B{+A~RjvMz5KkvS`Q1Ee)7usPFVShbNL2915^;S=H2(`HDM|L`YL1i()G7jM z>yE|E)Ra^aXRu^MMo?8XsUVQ=d)7z*CW9#iQ`hg&fSqtYR47UQ*o(a+mhy6$6kq{T z;B$ce-%+52(qOc7RuqxCo#9;(v1bEHcRijI#lgeiqjoIRN z9xk5j_6@Wazg*A28Uq%T$zT&HSCI_#Ny~7Uil~R2LD3U@^P)5^=PpXUj-{Ro1_^U% zphj%=R3KrC6uhN8aCXF;FK`a^VIY)&em|0eU%~F1N_e-!1zoQY-1G~Y^Xc5H?F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