From a0c1be30538312f3319cb9ecb3ba9b02a633a98d Mon Sep 17 00:00:00 2001 From: agilbert1412 Date: Wed, 14 Aug 2024 18:07:06 +0300 Subject: [PATCH] Stardew Valley: Add Quality Bobber in the logic rules for fish quality gold and above #3792 --- worlds/stardew_valley/logic/fishing_logic.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/worlds/stardew_valley/logic/fishing_logic.py b/worlds/stardew_valley/logic/fishing_logic.py index 539385232fd2..63798a92fe9e 100644 --- a/worlds/stardew_valley/logic/fishing_logic.py +++ b/worlds/stardew_valley/logic/fishing_logic.py @@ -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 @@ -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()]