Skip to content

Commit

Permalink
Stardew Valley: Add Quality Bobber in the logic rules for fish qualit…
Browse files Browse the repository at this point in the history
…y gold and above ArchipelagoMW#3792
  • Loading branch information
agilbert1412 committed Aug 24, 2024
1 parent a2de9d1 commit a0c1be3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions worlds/stardew_valley/logic/fishing_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ..options import SpecialOrderLocations
from ..stardew_rule import StardewRule, True_, False_
from ..strings.ap_names.mods.mod_items import SVEQuestItem
from ..strings.craftable_names import Fishing
from ..strings.fish_names import SVEFish
from ..strings.machine_names import Machine
from ..strings.quality_names import FishQuality
Expand Down Expand Up @@ -74,16 +75,18 @@ def can_start_extended_family_quest(self) -> StardewRule:
def can_catch_quality_fish(self, fish_quality: str) -> StardewRule:
if fish_quality == FishQuality.basic:
return True_()
rod_rule = self.logic.tool.has_fishing_rod(2)
if fish_quality == FishQuality.silver:
return rod_rule
return self.logic.tool.has_fishing_rod(2)
if fish_quality == FishQuality.gold:
return rod_rule & self.logic.skill.has_level(Skill.fishing, 4)
return self.logic.skill.has_level(Skill.fishing, 4) & self.can_use_tackle(Fishing.quality_bobber)
if fish_quality == FishQuality.iridium:
return rod_rule & self.logic.skill.has_level(Skill.fishing, 10)
return self.logic.skill.has_level(Skill.fishing, 10) & self.can_use_tackle(Fishing.quality_bobber)

raise ValueError(f"Quality {fish_quality} is unknown.")

def can_use_tackle(self, tackle: str) -> StardewRule:
return self.logic.tool.has_fishing_rod(4) & self.logic.has(tackle)

def can_catch_every_fish(self) -> StardewRule:
rules = [self.has_max_fishing()]

Expand Down

0 comments on commit a0c1be3

Please sign in to comment.