From e4d5f952b99f319b5a3e899c5781a478061efc9d Mon Sep 17 00:00:00 2001 From: Fenhl Date: Fri, 25 Apr 2025 11:32:11 +0000 Subject: [PATCH 1/3] Fix path to the tower in tower ER --- World.py | 49 ++++++++++++++---------------- data/Glitched World/Overworld.json | 4 +++ data/World/Bosses.json | 4 +++ 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/World.py b/World.py index fb32dfb642..f34cf48245 100644 --- a/World.py +++ b/World.py @@ -796,7 +796,7 @@ def set_goals(self) -> None: trials = GoalCategory('trials', 30, minimum_goals=1) th = GoalCategory('triforce_hunt', 30, goal_count=round(self.settings.triforce_goal_per_world / 10), minimum_goals=1) ganon = GoalCategory('ganon', 40, goal_count=1) - trial_goal = Goal(self, 'the Tower', 'path to #the Tower#', 'White', items=[], create_empty=True) + trial_goal = Goal(self, 'the Tower', 'path to #the Tower#', 'White', items=[{'name': 'Ganons Tower Access', 'quantity': 1, 'minimum': 1, 'hintable': True}]) if self.settings.triforce_hunt and self.settings.triforce_goal_per_world > 0: # "Hintable" value of False means the goal items themselves cannot @@ -1023,32 +1023,27 @@ 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}) - 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 + if not self.settings.shuffle_ganon_tower: + 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.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" }, From d3b015fb5277aafa66ecada8a713e7d882879a58 Mon Sep 17 00:00:00 2001 From: Fenhl Date: Wed, 30 Apr 2025 17:26:40 +0000 Subject: [PATCH 2/3] Only change tower goal behavior in tower ER --- World.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/World.py b/World.py index f34cf48245..dad27e2e40 100644 --- a/World.py +++ b/World.py @@ -796,7 +796,7 @@ def set_goals(self) -> None: trials = GoalCategory('trials', 30, minimum_goals=1) th = GoalCategory('triforce_hunt', 30, goal_count=round(self.settings.triforce_goal_per_world / 10), minimum_goals=1) ganon = GoalCategory('ganon', 40, goal_count=1) - trial_goal = Goal(self, 'the Tower', 'path to #the Tower#', 'White', items=[{'name': 'Ganons Tower Access', 'quantity': 1, 'minimum': 1, 'hintable': True}]) + trial_goal = Goal(self, 'the Tower', 'path to #the Tower#', 'White', items=[], create_empty=True) if self.settings.triforce_hunt and self.settings.triforce_goal_per_world > 0: # "Hintable" value of False means the goal items themselves cannot @@ -1023,7 +1023,13 @@ 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.settings.shuffle_ganon_tower: + if self.settings.shuffle_ganon_tower: + trial_goal.items.append({'name': 'Ganons Tower Access', 'quantity': 1, 'minimum': 1, 'hintable': True}) + trial_goal.goal_count += 1 + + 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 @@ -1042,8 +1048,14 @@ def set_goals(self) -> None: 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.add_goal(trial_goal) - self.goal_categories[trials.name] = trials + + # 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) From cbf04b07c64bbcab34c56ab8da274c8a77abd62f Mon Sep 17 00:00:00 2001 From: Fenhl Date: Wed, 30 Apr 2025 17:58:26 +0000 Subject: [PATCH 3/3] Typo --- World.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/World.py b/World.py index dad27e2e40..29c87db9a2 100644 --- a/World.py +++ b/World.py @@ -1025,7 +1025,7 @@ def set_goals(self) -> None: # trials are reduced to one goal with six items to obtain. if self.settings.shuffle_ganon_tower: trial_goal.items.append({'name': 'Ganons Tower Access', 'quantity': 1, 'minimum': 1, 'hintable': True}) - trial_goal.goal_count += 1 + trials.goal_count += 1 trials.add_goal(trial_goal) self.goal_categories[trials.name] = trials