From 596fa6ae4377d1ed5d4e658e6233fcb7058c49ba Mon Sep 17 00:00:00 2001 From: Fenhl Date: Fri, 27 May 2022 08:44:21 +0000 Subject: [PATCH] Disable bridge goals if Ganon's Castle is shuffled --- World.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/World.py b/World.py index a13a81964..c73c35a3d 100644 --- a/World.py +++ b/World.py @@ -647,7 +647,7 @@ def set_goals(self): # set is identical to WOTH. if not self.settings.triforce_hunt: # Bridge goals will always be defined as they have the most immediate priority - if self.settings.bridge != 'open': + if self.settings.bridge != 'open' and not self.shuffle_special_dungeon_entrances: # "Replace" hint text dictionaries are used to reference the # dungeon boss holding the specified reward. Only boss names/paths # are defined for this feature, and it is not extendable via plando. @@ -709,19 +709,21 @@ def set_goals(self): # the GBK category is redundant and not used for hint selection. if ((self.settings.ganon_bosskey_stones > 0 and self.settings.shuffle_ganon_bosskey == 'stones' - and (self.settings.ganon_bosskey_stones > self.settings.bridge_stones or self.settings.bridge != 'stones')) + and (self.shuffle_special_dungeon_entrances or self.settings.ganon_bosskey_stones > self.settings.bridge_stones or self.settings.bridge != 'stones')) or (self.settings.lacs_stones > 0 and self.settings.shuffle_ganon_bosskey == 'on_lacs' and self.settings.lacs_condition == 'stones' - and (self.settings.lacs_stones > self.settings.bridge_stones or self.settings.bridge != 'stones')) + and (self.shuffle_special_dungeon_entrances or self.settings.lacs_stones > self.settings.bridge_stones or self.settings.bridge != 'stones')) or (self.settings.ganon_bosskey_rewards > 0 and self.settings.shuffle_ganon_bosskey == 'dungeons' - and ((self.settings.ganon_bosskey_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') + and (self.shuffle_special_dungeon_entrances + or (self.settings.ganon_bosskey_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') or (self.settings.ganon_bosskey_rewards > self.settings.bridge_stones and self.settings.bridge == 'stones') or (self.settings.ganon_bosskey_rewards > self.settings.bridge_rewards and self.settings.bridge == 'dungeons') or (self.settings.ganon_bosskey_rewards > 2 and self.settings.bridge == 'vanilla'))) or (self.settings.lacs_rewards > 0 and self.settings.shuffle_ganon_bosskey == 'on_lacs' and self.settings.lacs_condition == 'dungeons' - and ((self.settings.lacs_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') + and (self.shuffle_special_dungeon_entrances + or (self.settings.lacs_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') or (self.settings.lacs_rewards > self.settings.bridge_stones and self.settings.bridge == 'stones') or (self.settings.lacs_rewards > self.settings.bridge_rewards and self.settings.bridge == 'dungeons') or (self.settings.lacs_rewards > 2 and self.settings.bridge == 'vanilla')))): @@ -734,21 +736,23 @@ def set_goals(self): else self.settings.lacs_rewards) if ((self.settings.ganon_bosskey_medallions > 0 and self.settings.shuffle_ganon_bosskey == 'medallions' - and (self.settings.ganon_bosskey_medallions > self.settings.bridge_medallions or self.settings.bridge != 'medallions') - and (self.settings.ganon_bosskey_medallions > 2 or self.settings.bridge != 'vanilla')) + and (self.shuffle_special_dungeon_entrances or self.settings.ganon_bosskey_medallions > self.settings.bridge_medallions or self.settings.bridge != 'medallions') + and (self.shuffle_special_dungeon_entrances or self.settings.ganon_bosskey_medallions > 2 or self.settings.bridge != 'vanilla')) or (self.settings.lacs_medallions > 0 and self.settings.shuffle_ganon_bosskey == 'on_lacs' and self.settings.lacs_condition == 'medallions' - and (self.settings.lacs_medallions > self.settings.bridge_medallions or self.settings.bridge != 'medallions') - and (self.settings.lacs_medallions > 2 or self.settings.bridge != 'vanilla')) + and (self.shuffle_special_dungeon_entrances or self.settings.lacs_medallions > self.settings.bridge_medallions or self.settings.bridge != 'medallions') + and (self.shuffle_special_dungeon_entrances or self.settings.lacs_medallions > 2 or self.settings.bridge != 'vanilla')) or (self.settings.ganon_bosskey_rewards > 0 and self.settings.shuffle_ganon_bosskey == 'dungeons' - and ((self.settings.ganon_bosskey_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') + and (self.shuffle_special_dungeon_entrances + or (self.settings.ganon_bosskey_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') or (self.settings.ganon_bosskey_rewards > self.settings.bridge_stones and self.settings.bridge == 'stones') or (self.settings.ganon_bosskey_rewards > self.settings.bridge_rewards and self.settings.bridge == 'dungeons') or (self.settings.ganon_bosskey_rewards > 2 and self.settings.bridge == 'vanilla'))) or (self.settings.lacs_rewards > 0 and self.settings.shuffle_ganon_bosskey == 'on_lacs' and self.settings.lacs_condition == 'dungeons' - and ((self.settings.lacs_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') + and (self.shuffle_special_dungeon_entrances + or (self.settings.lacs_rewards > self.settings.bridge_medallions and self.settings.bridge == 'medallions') or (self.settings.lacs_rewards > self.settings.bridge_stones and self.settings.bridge == 'stones') or (self.settings.lacs_rewards > self.settings.bridge_rewards and self.settings.bridge == 'dungeons') or (self.settings.lacs_rewards > 2 and self.settings.bridge == 'vanilla')))): @@ -769,14 +773,16 @@ def set_goals(self): gbk.goal_count = len(gbk.goals) if (self.settings.ganon_bosskey_tokens > 0 and self.settings.shuffle_ganon_bosskey == 'tokens' - and (self.settings.bridge != 'tokens' + and (self.shuffle_special_dungeon_entrances + or self.settings.bridge != 'tokens' or self.settings.bridge_tokens < self.settings.ganon_bosskey_tokens)): gbk.add_goal(Goal(self, 'Skulls', 'path of Skulls', 'Light Blue', items=[{'name': 'Gold Skulltula Token', 'quantity': 100, 'minimum': self.settings.ganon_bosskey_tokens, 'hintable': False}])) gbk.goal_count = round(self.settings.ganon_bosskey_tokens / 10) gbk.minimum_goals = 1 if (self.settings.lacs_tokens > 0 and self.settings.shuffle_ganon_bosskey == 'on_lacs' and self.settings.lacs_condition == 'tokens' - and (self.settings.bridge != 'tokens' + and (self.shuffle_special_dungeon_entrances + or self.settings.bridge != 'tokens' or self.settings.bridge_tokens < self.settings.lacs_tokens)): gbk.add_goal(Goal(self, 'Skulls', 'path of Skulls', 'Light Blue', items=[{'name': 'Gold Skulltula Token', 'quantity': 100, 'minimum': self.settings.lacs_tokens, 'hintable': False}])) gbk.goal_count = round(self.settings.lacs_tokens / 10) @@ -828,7 +834,7 @@ def set_goals(self): trials.add_goal(trial_goal) self.goal_categories[trials.name] = trials - if self.settings.bridge == 'open' and (self.settings.shuffle_ganon_bosskey == 'remove' or self.settings.shuffle_ganon_bosskey == 'vanilla') and self.settings.trials == 0: + if (self.shuffle_special_dungeon_entrances or self.settings.bridge == 'open') and (self.settings.shuffle_ganon_bosskey == 'remove' or self.settings.shuffle_ganon_bosskey == 'vanilla') and self.settings.trials == 0: g = GoalCategory('ganon', 30, goal_count=1) # Equivalent to WOTH, but added in case WOTH hints are disabled in favor of goal hints g.add_goal(Goal(self, 'the hero', 'path of the hero', 'White', items=[{'name': 'Triforce', 'quantity': 1, 'minimum': 1, 'hintable': True}]))