Skip to content

Commit

Permalink
Merge pull request #2 from fenhl/ganon-er-bridge-goals
Browse files Browse the repository at this point in the history
Disable bridge goals if Ganon's Castle is shuffled
  • Loading branch information
Jaybone25 authored Jun 1, 2022
2 parents 1e17543 + 596fa6a commit 4433a6d
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions World.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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')))):
Expand All @@ -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')))):
Expand All @@ -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)
Expand Down Expand Up @@ -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}]))
Expand Down

0 comments on commit 4433a6d

Please sign in to comment.