From 0b64b15e9e029f6463bd2323ccb127081b685f75 Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 25 Feb 2022 13:18:37 -0700 Subject: [PATCH] Fix for old pot shuffle Fix for mystery startinventory Update mystery example --- Main.py | 2 +- Mystery.py | 2 ++ PotShuffle.py | 2 +- RELEASENOTES.md | 4 ++++ mystery_example.yml | 19 ++++++++++++------- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Main.py b/Main.py index d73d2247..f9f4ca53 100644 --- a/Main.py +++ b/Main.py @@ -31,7 +31,7 @@ from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config from source.tools.BPS import create_bps_from_data -__version__ = '1.0.1.7-v' +__version__ = '1.0.1.8-v' from source.classes.BabelFish import BabelFish diff --git a/Mystery.py b/Mystery.py index 5cdb4806..e047aa1e 100644 --- a/Mystery.py +++ b/Mystery.py @@ -257,6 +257,8 @@ def roll_settings(weights): if get_choice(item, inventoryweights) == 'on': startitems.append(item) ret.startinventory = ','.join(startitems) + if len(startitems) > 0: + ret.usestartinventory = True if 'rom' in weights: romweights = weights['rom'] diff --git a/PotShuffle.py b/PotShuffle.py index 845a2a01..35219bf4 100644 --- a/PotShuffle.py +++ b/PotShuffle.py @@ -382,7 +382,7 @@ def shuffle_pots(world, player): elif old_pot.item == PotItem.Switch: available_pots = (pot for pot in new_pots if (pot.room == old_pot.room or pot.room in movable_switch_rooms[old_pot.room]) and not (pot.flags & PotFlags.NoSwitch)) elif old_pot.item == PotItem.Key: - if world.doorShuffle[player] == 'vanilla' and not world.retro[player] and world.keydropshuffle[player] == 'none' and world.logic[player] != 'nologic': + if world.doorShuffle[player] == 'vanilla' and not world.retro[player] and world.pottery[player] == 'none' and world.logic[player] != 'nologic': available_pots = (pot for pot in new_pots if pot.room not in invalid_key_rooms) else: available_pots = new_pots diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4a471dcc..2a20722f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -147,6 +147,10 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o #### Volatile +* 1.0.1.8 + * Updated mystery_example.yml + * Fixed usestartinventory with mystery + * Fixed a bug with the old pot shuffle (crashed when used) * 1.0.1.7 * Expanded Mystery logic options (e.g. owglitches) * Allowed Mystery.py to create BPS patches diff --git a/mystery_example.yml b/mystery_example.yml index 15c36a74..abd46ee5 100644 --- a/mystery_example.yml +++ b/mystery_example.yml @@ -7,10 +7,15 @@ 1: 2 2: 2 3: 4 - keydropshuffle: - none: 1 - keydrops: 1 - potsanity: 1 + dropshuffle: + on: 1 + off: 1 + pottery: + none: 4 + keys: 1 + cave: 1 + dungeon: 1 + lottery: 1 shopsanity: on: 1 off: 1 @@ -125,10 +130,10 @@ easy: 1 hard: 1 expert: 0 + startinventory: + Pegasus Boots: on rom: - quickswap: - on: 1 - off: 0 + quickswap: on heartcolor: red: 1 blue: 1