Allow Mystery setting Misery Mire and Turtle Rock medallions

This commit is contained in:
Fabian Dill 2021-01-02 23:00:14 +01:00
parent be162f5b8d
commit e7beb80219
4 changed files with 18 additions and 4 deletions

View File

@ -349,13 +349,15 @@ def parse_arguments(argv, no_defaults=False):
create a binary patch file from which the randomized rom can be recreated using MultiClient.''')
parser.add_argument('--disable_glitch_boots', default=defval(False), action='store_true', help='''\
turns off starting with Pegasus Boots in glitched modes.''')
if multiargs.multi:
for player in range(1, multiargs.multi + 1):
parser.add_argument(f'--p{player}', default=defval(''), help=argparse.SUPPRESS)
ret = parser.parse_args(argv)
# shuffle medallions
ret.required_medallions = ("random", "random")
# cannot be set through CLI currently
ret.plando_items = []
ret.plando_texts = {}
@ -388,7 +390,7 @@ def parse_arguments(argv, no_defaults=False):
'shufflebosses', 'enemy_shuffle', 'enemy_health', 'enemy_damage', 'shufflepots',
'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor',
'heartbeep', "skip_progression_balancing", "triforce_pieces_available",
"triforce_pieces_required", "shop_shuffle",
"triforce_pieces_required", "shop_shuffle", "required_medallions",
"plando_items", "plando_texts", "plando_connections",
'remote_items', 'progressive', 'dungeon_counters', 'glitch_boots', 'killable_thieves',
'tile_shuffle', 'bush_shuffle', 'shuffle_prizes', 'sprite_pool', 'dark_room_logic',

View File

@ -320,8 +320,14 @@ def generate_itempool(world, player: int):
world.random.shuffle(nonprogressionitems)
# shuffle medallions
mm_medallion = world.random.choice(['Ether', 'Quake', 'Bombos'])
tr_medallion = world.random.choice(['Ether', 'Quake', 'Bombos'])
if world.required_medallions[player][0] == "random":
mm_medallion = world.random.choice(['Ether', 'Quake', 'Bombos'])
else:
mm_medallion = world.required_medallions[player][0]
if world.required_medallions[player][0] == "random":
tr_medallion = world.random.choice(['Ether', 'Quake', 'Bombos'])
else:
tr_medallion = world.required_medallions[player][0]
world.required_medallions[player] = (mm_medallion, tr_medallion)
place_bosses(world, player)

View File

@ -91,6 +91,7 @@ def main(args, seed=None):
world.plando_texts = args.plando_texts.copy()
world.plando_connections = args.plando_connections.copy()
world.restrict_dungeon_item_on_boss = args.restrict_dungeon_item_on_boss.copy()
world.required_medallions = args.required_medallions.copy()
world.rom_seeds = {player: random.Random(world.random.randint(0, 999999999)) for player in range(1, world.players + 1)}

View File

@ -504,6 +504,11 @@ def roll_settings(weights, plando_options: typing.Set[str] = frozenset(("bosses"
ret.shuffle_prizes = get_choice('shuffle_prizes', weights, "g")
ret.required_medallions = (get_choice("misery_mire_medallion", weights, "random"),
get_choice("turtle_rock_medallion", weights, "random"))
for medallion in ret.required_medallions:
if medallion not in {"random", "Ether", "Bombos", "Quake"}:
raise Exception(f"unknown Medallion {medallion}")
inventoryweights = weights.get('startinventory', {})
startitems = []
for item in inventoryweights.keys():