diff --git a/World.py b/World.py index fb32dfb642..29c87db9a2 100644 --- a/World.py +++ b/World.py @@ -1023,32 +1023,39 @@ def set_goals(self) -> None: # To avoid too many goals in the hint selection phase, # trials are reduced to one goal with six items to obtain. - if not self.skipped_trials['Forest']: - trial_goal.items.append({'name': 'Forest Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) - trials.goal_count += 1 - if not self.skipped_trials['Fire']: - trial_goal.items.append({'name': 'Fire Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) - trials.goal_count += 1 - if not self.skipped_trials['Water']: - trial_goal.items.append({'name': 'Water Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) - trials.goal_count += 1 - if not self.skipped_trials['Shadow']: - trial_goal.items.append({'name': 'Shadow Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) - trials.goal_count += 1 - if not self.skipped_trials['Spirit']: - trial_goal.items.append({'name': 'Spirit Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) - trials.goal_count += 1 - if not self.skipped_trials['Light']: - trial_goal.items.append({'name': 'Light Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) + if self.settings.shuffle_ganon_tower: + trial_goal.items.append({'name': 'Ganons Tower Access', 'quantity': 1, 'minimum': 1, 'hintable': True}) trials.goal_count += 1 - # Trials category is finalized and saved only if at least one trial is on - # If random trials are on and one world in multiworld gets 0 trials, still - # add the goal to prevent key errors. Since no items fulfill the goal, it - # will always be invalid for that world and not generate hints. - if self.settings.trials > 0 or self.settings.trials_random: trials.add_goal(trial_goal) self.goal_categories[trials.name] = trials + else: + if not self.skipped_trials['Forest']: + trial_goal.items.append({'name': 'Forest Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) + trials.goal_count += 1 + if not self.skipped_trials['Fire']: + trial_goal.items.append({'name': 'Fire Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) + trials.goal_count += 1 + if not self.skipped_trials['Water']: + trial_goal.items.append({'name': 'Water Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) + trials.goal_count += 1 + if not self.skipped_trials['Shadow']: + trial_goal.items.append({'name': 'Shadow Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) + trials.goal_count += 1 + if not self.skipped_trials['Spirit']: + trial_goal.items.append({'name': 'Spirit Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) + trials.goal_count += 1 + if not self.skipped_trials['Light']: + trial_goal.items.append({'name': 'Light Trial Clear', 'quantity': 1, 'minimum': 1, 'hintable': True}) + trials.goal_count += 1 + + # Trials category is finalized and saved only if at least one trial is on + # If random trials are on and one world in multiworld gets 0 trials, still + # add the goal to prevent key errors. Since no items fulfill the goal, it + # will always be invalid for that world and not generate hints. + if self.settings.trials > 0 or self.settings.trials_random: + trials.add_goal(trial_goal) + self.goal_categories[trials.name] = trials # In glitched logic or if trials are off, it's possible that some items required to beat the game # (such as bow, magic, light arrows, or anything required to reach Ganon's Castle) diff --git a/data/Glitched World/Overworld.json b/data/Glitched World/Overworld.json index 2eb841b403..5717de9c40 100644 --- a/data/Glitched World/Overworld.json +++ b/data/Glitched World/Overworld.json @@ -1234,6 +1234,10 @@ { "region_name": "Ganons Castle Tower", "dungeon": "Ganons Castle", + "events": { + # Used for the "path to the tower" goal + "Ganons Tower Access": "is_adult" + }, "locations": { "Ganons Tower Boss Key Chest": "True", "Ganondorf Hint": "Boss_Key_Ganons_Castle", diff --git a/data/World/Bosses.json b/data/World/Bosses.json index f21134d43f..b5d620a5f9 100644 --- a/data/World/Bosses.json +++ b/data/World/Bosses.json @@ -150,6 +150,10 @@ "region_name": "Ganons Castle Tower", "scene": "Ganons Castle Tower", "is_boss_room": true, + "events": { + # Used for the "path to the tower" goal + "Ganons Tower Access": "is_adult" + }, "locations": { "Ganons Tower Boss Key Chest": "is_adult or Kokiri_Sword" },