diff --git a/worlds/stardew_valley/logic.py b/worlds/stardew_valley/logic.py index 79b2b63d..85a5bb08 100644 --- a/worlds/stardew_valley/logic.py +++ b/worlds/stardew_valley/logic.py @@ -946,11 +946,16 @@ class StardewLogic: return region_rule & season_rule & difficulty_rule def can_catch_every_fish(self) -> StardewRule: - rules = [self.has_skill_level("Fishing", 10), self.received("Progressive Fishing Rod", 4)] + rules = [self.has_skill_level("Fishing", 10), self.has_max_fishing_rod()] for fish in all_fish_items: rules.append(self.can_catch_fish(fish)) return _And(rules) + def has_max_fishing_rod(self) -> StardewRule: + if self.options[options.ToolProgression] == options.ToolProgression.option_progressive: + return self.received("Progressive Fishing Rod", 4) + return self.can_get_fishing_xp() + def can_cook(self) -> StardewRule: return self.has_house(1) or self.has_skill_level("Foraging", 9) diff --git a/worlds/stardew_valley/test/TestOptions.py b/worlds/stardew_valley/test/TestOptions.py new file mode 100644 index 00000000..063d9c2b --- /dev/null +++ b/worlds/stardew_valley/test/TestOptions.py @@ -0,0 +1,8 @@ +from worlds.stardew_valley.test import SVTestBase + + +class TestMasterAnglerVanillaTools(SVTestBase): + options = { + "goal": "master_angler", + "tool_progression": "vanilla", + } diff --git a/worlds/stardew_valley/test/__init__.py b/worlds/stardew_valley/test/__init__.py index 1ddf0376..c9a8c746 100644 --- a/worlds/stardew_valley/test/__init__.py +++ b/worlds/stardew_valley/test/__init__.py @@ -11,4 +11,10 @@ class SVTestBase(WorldTestBase): def world_setup(self, *args, **kwargs): super().world_setup(*args, **kwargs) - self.world = self.multiworld.worlds[self.player] + if self.constructed: + self.world = self.multiworld.worlds[self.player] + + @property + def run_default_tests(self) -> bool: + # world_setup is overridden, so it'd always run default tests when importing SVTestBase + return type(self) is not SVTestBase and super().run_default_tests