diff --git a/BaseClasses.py b/BaseClasses.py index f2305238..f41301eb 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -3394,10 +3394,22 @@ class Spoiler(object): outfile.write(f'{dungeon}:'.ljust(line_width) + '%s Medallion\n' % medallion) for player in range(1, self.world.players + 1): player_name = '' if self.world.players == 1 else str(' (Player ' + str(player) + ')') - if self.world.crystals_gt_orig[player] == 'random': + goal = self.world.custom_goals[player]['gtentry'] + if goal and 'requirements' in goal and goal['requirements'][0]['condition'] != 0x00: + outfile.write(str('GT Entry Sign Text' + player_name + ':').ljust(line_width) + '%s\n' % goal['goaltext']) + elif self.world.crystals_gt_orig[player] == 'random': outfile.write(str('Crystals Required for GT' + player_name + ':').ljust(line_width) + '%s\n' % (str(self.metadata['gt_crystals'][player]))) - if self.world.crystals_ganon_orig[player] == 'random': - outfile.write(str('Crystals Required for Ganon' + player_name + ':').ljust(line_width) + '%s\n' % (str(self.metadata['ganon_crystals'][player]))) + goal = self.world.custom_goals[player]['ganongoal'] + if goal and 'requirements' in goal and goal['requirements'][0]['condition'] != 0x00: + outfile.write(str('Ganon Sign Text' + player_name + ':').ljust(line_width) + '%s\n' % goal['goaltext']) + elif self.world.crystals_ganon_orig[player] == 'random': + outfile.write(str('Crystals Required for Ganon' + player_name + ':').ljust(line_width) + '%s\n' % (str(self.metadata['ganon_crystals'][player]))) + goal = self.world.custom_goals[player]['pedgoal'] + if goal and 'requirements' in goal and goal['requirements'][0]['condition'] != 0x00: + outfile.write(str('Pedestal Sign Text' + player_name + ':').ljust(line_width) + '%s\n' % goal['goaltext']) + goal = self.world.custom_goals[player]['murahgoal'] + if goal and 'requirements' in goal and goal['requirements'][0]['condition'] != 0x00: + outfile.write(str('Murahdahla Sign Text' + player_name + ':').ljust(line_width) + '%s\n' % goal['goaltext']) outfile.write('\n\nPrizes:\n\n') for dungeon, prize in self.prizes.items(): outfile.write(str(dungeon + ':').ljust(line_width) + '%s\n' % prize) diff --git a/ItemList.py b/ItemList.py index b7dd5e18..5fd7cfaf 100644 --- a/ItemList.py +++ b/ItemList.py @@ -236,6 +236,7 @@ def generate_itempool(world, player): else: set_event_item(world, player, 'Ganon', 'Triforce') + goal_req = None if world.custom_goals[player]['murahgoal'] and 'requirements' in world.custom_goals[player]['murahgoal']: goal_req = world.custom_goals[player]['murahgoal']['requirements'][0] if world.goal[player] in ['triforcehunt', 'trinity'] or (goal_req and goal_req['condition'] != 0x00): diff --git a/Main.py b/Main.py index 6324f3bc..ee5a2d63 100644 --- a/Main.py +++ b/Main.py @@ -552,10 +552,12 @@ def resolve_random_settings(world, args): req_table = { 'Invulnerable': 0x00, + 'Disabled': 0x00, 'Pendants': 0x01, 'Crystals': 0x02, 'PendantBosses': 0x03, 'CrystalBosses': 0x04, + 'PrizeBosses': 0x05, 'Bosses': 0x05, 'Agahnim1Defeated': 0x06, 'Agahnim1': 0x06, @@ -577,7 +579,10 @@ def resolve_random_settings(world, args): for r in list(goal_input['requirements']): req = {} try: - req['condition'] = req_table[list(r.keys())[0]] + if isinstance(r, str): + req['condition'] = req_table[r] + else: + req['condition'] = req_table[list(r.keys())[0]] if req['condition'] == req_table['Invulnerable']: goal['requirements']= [req] goal['logic'] = False @@ -647,7 +652,7 @@ def resolve_random_settings(world, args): goal['logic']['pendant_bosses'] = req['target'] or 3 elif req['condition'] & 0x7F == req_table['CrystalBosses']: goal['logic']['crystal_bosses'] = req['target'] or 7 - elif req['condition'] & 0x7F == req_table['Bosses']: + elif req['condition'] & 0x7F == req_table['PrizeBosses']: goal['logic']['bosses'] = req['target'] or 10 elif req['condition'] & 0x7F == req_table['Aga1']: goal['logic']['aga1'] = True @@ -662,7 +667,7 @@ def resolve_random_settings(world, args): raise KeyError(f'Invalid {goal_type} requirement: {r}') else: raise KeyError(f'Invalid {goal_type} requirement definition') - if 'logic' in goal_input and goal['logic'] is not None: + if 'logic' in goal_input and goal['logic'] and goal['logic'] is not None: goal['logic'].update(goal_input['logic']) return diff --git a/Rom.py b/Rom.py index 6579220b..43c3006e 100644 --- a/Rom.py +++ b/Rom.py @@ -43,7 +43,7 @@ from source.enemizer.Enemizer import write_enemy_shuffle_settings JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'ec0ac9063daaeb39faf1282faa3fdba8' +RANDOMIZERBASEHASH = '72c4b2d00057d1faced32871d8081f3a' class JsonRom(object): diff --git a/data/base2current.bps b/data/base2current.bps index 2f281057..224e1fb6 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ diff --git a/docs/Customizer.md b/docs/Customizer.md index c2f92c4d..6c7063e0 100644 --- a/docs/Customizer.md +++ b/docs/Customizer.md @@ -117,7 +117,7 @@ For the various events, you may define many conditions for the player to meet. A * `Crystals` (Default: 7) * `PendantBosses` (Default: 3) * `CrystalBosses` (Default: 7) -* `Bosses` (Default: 10) +* `PrizeBosses` (Default: 10) * `Agahnim1Defeated` * `Agahnim2Defeated` * `TriforcePieces` (Default: set elsewhere)