From 233d12be3027da01baf13769854b6e265728d40b Mon Sep 17 00:00:00 2001 From: caitsith2 Date: Thu, 11 Jun 2020 11:53:10 -0700 Subject: [PATCH] Change max triforce_pieces_required from 30 to 112. --- EntranceRandomizer.py | 2 +- ItemList.py | 10 +++++++++- Mystery.py | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/EntranceRandomizer.py b/EntranceRandomizer.py index a33ce702..42ac66ad 100755 --- a/EntranceRandomizer.py +++ b/EntranceRandomizer.py @@ -82,7 +82,7 @@ def parse_arguments(argv, no_defaults=False): 20 of them to beat the game. ''') parser.add_argument('--triforce_pieces_required', default=defval(20), - type=lambda value: min(max(int(value), 1), 30), + type=lambda value: min(max(int(value), 1), 112), help='''Set Triforce Pieces required to win a Triforce Hunt''') parser.add_argument('--difficulty', default=defval('normal'), const='normal', nargs='?', choices=['normal', 'hard', 'expert'], diff --git a/ItemList.py b/ItemList.py index 33c65782..d44363de 100644 --- a/ItemList.py +++ b/ItemList.py @@ -256,7 +256,15 @@ def generate_itempool(world, player): return item if not choice else ItemFactory("Bee Trap", player) if choice == 'trap' else ItemFactory("Bee", player) return item - world.itempool += [beemizer(item) for item in items] + progressionitems = [item for item in items if item.advancement or item.priority or item.type] + nonprogressionitems = [beemizer(item) for item in items if not item.advancement and not item.priority and not item.type] + random.shuffle(nonprogressionitems) + + if treasure_hunt_count and treasure_hunt_count > 30: + progressionitems += [ItemFactory("Triforce Piece", player)] * (treasure_hunt_count - 30) + nonprogressionitems = nonprogressionitems[(treasure_hunt_count-30):] + + world.itempool += progressionitems + nonprogressionitems # shuffle medallions mm_medallion = ['Ether', 'Quake', 'Bombos'][random.randint(0, 2)] diff --git a/Mystery.py b/Mystery.py index 85643537..d367eac0 100644 --- a/Mystery.py +++ b/Mystery.py @@ -297,7 +297,7 @@ def roll_settings(weights): ret.triforce_pieces_required = get_choice('triforce_pieces_required', weights) if "triforce_pieces_required" in weights else 20 - ret.triforce_pieces_required = min(max(1, int(ret.triforce_pieces_required)), 30) + ret.triforce_pieces_required = min(max(1, int(ret.triforce_pieces_required)), 112) ret.mode = get_choice('world_state', weights) if ret.mode == 'retro':