From b7e307f4c14fb12fea3f99cdb2df27b1adfe7e54 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 24 Feb 2022 14:06:34 -0700 Subject: [PATCH] BPS flag for Mystery Expanded logic options for mystery Fixed a shopsanity+district bug Fixed the keysanity menu not showing map marks --- Fill.py | 2 +- Mystery.py | 10 +++++++--- RELEASENOTES.md | 4 ++++ Rom.py | 2 +- data/base2current.bps | Bin 83384 -> 83384 bytes source/item/FillUtil.py | 8 +++++++- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Fill.py b/Fill.py index 4538bce5..3645e5d9 100644 --- a/Fill.py +++ b/Fill.py @@ -564,7 +564,7 @@ def sell_potions(world, player): loc_choices += [world.get_location(loc, player) for loc in shop_to_location_table[shop.region.name]] locations = [loc for loc in loc_choices if not loc.item] for potion in ['Green Potion', 'Blue Potion', 'Red Potion']: - location = random.choice(filter_locations(ItemFactory(potion, player), locations, world)) + location = random.choice(filter_locations(ItemFactory(potion, player), locations, world, potion=True)) locations.remove(location) p_item = next(item for item in world.itempool if item.name == potion and item.player == player) world.push_item(location, p_item, collect=False) diff --git a/Mystery.py b/Mystery.py index 9fb49394..5cdb4806 100644 --- a/Mystery.py +++ b/Mystery.py @@ -29,6 +29,7 @@ def main(): parser.add_argument('--teams', default=1, type=lambda value: max(int(value), 1)) parser.add_argument('--create_spoiler', action='store_true') parser.add_argument('--suppress_rom', action='store_true') + parser.add_argument('--bps', action='store_true') parser.add_argument('--rom') parser.add_argument('--enemizercli') parser.add_argument('--outputpath') @@ -63,6 +64,7 @@ def main(): erargs.names = args.names erargs.create_spoiler = args.create_spoiler erargs.suppress_rom = args.suppress_rom + erargs.bps = args.bps erargs.race = True erargs.outputname = seedname erargs.outputpath = args.outputpath @@ -138,12 +140,14 @@ def roll_settings(weights): ret.algorithm = get_choice('algorithm') + glitch_map = {'none': 'noglitches', 'no_logic': 'nologic', 'owglitches': 'owglitches', + 'minorglitches': 'minorglitches'} glitches_required = get_choice('glitches_required') if glitches_required is not None: - if glitches_required not in ['none', 'no_logic']: - print("Only NMG and No Logic supported") + if glitches_required not in glitch_map.keys(): + print(f'Logic did not match one of: {", ".join(glitch_map.keys())}') glitches_required = 'none' - ret.logic = {'none': 'noglitches', 'no_logic': 'nologic'}[glitches_required] + ret.logic = glitch_map[glitches_required] item_placement = get_choice('item_placement') # not supported in ER diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5a3d5a85..9ec8d333 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -148,8 +148,12 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o #### Volatile * 1.0.1.7 + * Expanded Mystery logic options (e.g. owglitches) + * Allowed Mystery.py to create BPS patches * Allow creation of BPS and SFC files (no longer mutually exclusive) + * Fixed a bug with shopsanity + district algorithm where pre-placed potions messed up the placeholder count * Fixed usestartinventory flag (can be use on a per player basis) + * Fix for map indicators on keysanity menu not showing up * 1.0.1.6 * A couple new options for lighter pottery modes (Cave Pots and Dungeon Pots) * New option for Boss Shuffle: Unique (Prize bosses will be one of each, but GT bosses can be anything) diff --git a/Rom.py b/Rom.py index 96a093f4..20e9fce5 100644 --- a/Rom.py +++ b/Rom.py @@ -35,7 +35,7 @@ from source.item.FillUtil import valid_pot_items JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '20444676b021133e7c8e50ecc152ebd4' +RANDOMIZERBASEHASH = '99f4c032651bb3c773f18280a182cd8f' class JsonRom(object): diff --git a/data/base2current.bps b/data/base2current.bps index b642cd455f524f0928ea78b842930f25999aeb25..d822605948d76d6c0da7f3bba3b62b56c8e2abba 100644 GIT binary patch delta 68 zcmV-K0K5OViv_rg1+YZ{13h@cvq%B+R{;vMJXuqL9Kk970MHJvEA)OE$qy&+1dl6| apovTw#+P+3kh81W1#1W-3`uayE*)g9I~yqg delta 68 zcmdnd&AOwTb%QG-vt`Ax%^r-O!x{ND+e8L8%1q`A=s&w&`%9hFNq+SYEd4;1Mn<-e Y 0 else locations + elif potion: + restricted = config.location_groups[0].locations + filtered = [l for l in locations if l.name not in restricted or l.player not in restricted[l.name]] + if len(filtered) == 0: + raise RuntimeError('Can\'t sell potion of a certain type due to district restriction') + return filtered return locations