Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stardew Valley: Add Quality Bobber in the logic rules for fish quality gold and above #3792

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading