Skip to content

Commit

Permalink
fishing rod 0 isn't real, but it definitely can hurt you.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouramie committed Mar 22, 2024
1 parent a38db38 commit 1fc0ea5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion worlds/stardew_valley/logic/ability_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def can_farm_perfectly(self) -> StardewRule:

def can_fish_perfectly(self) -> StardewRule:
skill_rule = self.logic.skill.has_level(Skill.fishing, 10)
return skill_rule & self.logic.tool.has_fishing_rod(3)
return skill_rule & self.logic.tool.has_fishing_rod(4)

def can_chop_trees(self) -> StardewRule:
return self.logic.tool.has_tool(Tool.axe) & self.logic.region.can_reach(Region.forest)
Expand Down
6 changes: 3 additions & 3 deletions worlds/stardew_valley/logic/fishing_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def can_fish_in_freshwater(self) -> StardewRule:

def has_max_fishing(self) -> StardewRule:
skill_rule = self.logic.skill.has_level(Skill.fishing, 10)
return self.logic.tool.has_fishing_rod(3) & skill_rule
return self.logic.tool.has_fishing_rod(4) & skill_rule

def can_fish_chests(self) -> StardewRule:
skill_rule = self.logic.skill.has_level(Skill.fishing, 6)
return self.logic.tool.has_fishing_rod(3) & skill_rule
return self.logic.tool.has_fishing_rod(4) & skill_rule

def can_fish_at(self, region: str) -> StardewRule:
return self.logic.skill.can_fish() & self.logic.region.can_reach(region)
Expand Down Expand Up @@ -66,7 +66,7 @@ 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(1)
rod_rule = self.logic.tool.has_fishing_rod(2)
if fish_quality == FishQuality.silver:
return rod_rule
if fish_quality == FishQuality.gold:
Expand Down
4 changes: 2 additions & 2 deletions worlds/stardew_valley/logic/skill_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def can_earn_level(self, skill: str, level: int) -> StardewRule:
previous_level_rule = True_()

if skill == Skill.fishing:
xp_rule = self.logic.tool.has_fishing_rod(min(tool_level, 3))
xp_rule = self.logic.tool.has_fishing_rod(max(tool_level, 1))
elif skill == Skill.farming:
xp_rule = self.logic.tool.has_tool(Tool.hoe, tool_material) & self.logic.tool.can_water(tool_level)
elif skill == Skill.foraging:
Expand Down Expand Up @@ -152,7 +152,7 @@ def can_fish(self, regions: Union[str, Tuple[str, ...]] = None, difficulty: int
skill_rule = self.logic.skill.has_level(Skill.fishing, skill_required)
region_rule = self.logic.region.can_reach_any(regions)
# Training rod only works with fish < 50. Fiberglass does not help you to catch higher difficulty fish, so it's skipped in logic.
number_fishing_rod_required = 0 if difficulty < 50 else (1 if difficulty < 80 else 3)
number_fishing_rod_required = 1 if difficulty < 50 else (2 if difficulty < 80 else 4)
return self.logic.tool.has_fishing_rod(number_fishing_rod_required) & skill_rule & region_rule

@cache_self1
Expand Down
8 changes: 4 additions & 4 deletions worlds/stardew_valley/logic/tool_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from ..strings.tool_names import ToolMaterial, Tool

fishing_rod_prices = {
2: 1800, # Fibreglass
3: 7500, # Iridium
3: 1800,
4: 7500,
}

tool_materials = {
Expand Down Expand Up @@ -59,12 +59,12 @@ def can_use_tool_at(self, tool: str, material: str, region: str) -> StardewRule:

@cache_self1
def has_fishing_rod(self, level: int) -> StardewRule:
assert 0 <= level <= 3, "Fishing rod 0 is Training, 1 is Bamboo, 2 is Fiberglass and 3 is Iridium."
assert 1 <= level <= 4, "Fishing rod 0 isn't real, it can't hurt you. Training is 1, Bamboo is 2, Fiberglass is 3 and Iridium is 4."

if self.options.tool_progression & ToolProgression.option_progressive:
return self.logic.received(f"Progressive {Tool.fishing_rod}", level)

if level <= 1:
if level <= 2:
# We assume you always have access to the Bamboo pole, because mod side there is a builtin way to get it back.
return self.logic.region.can_reach(Region.beach)

Expand Down

0 comments on commit 1fc0ea5

Please sign in to comment.