Stardew Valley: Fix generation issue with Master Angler goal and vanilla tools (#1498)
* - Can Catch every fish doesn't need fishing rods if they are not shuffled * add has_max_fishing_rod * add test for master angler + vanilla tools --------- Co-authored-by: Alex Gilbert <alexgilbert@yahoo.com>
This commit is contained in:
parent
30b70b2055
commit
96d7a3a64c
|
@ -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)
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
from worlds.stardew_valley.test import SVTestBase
|
||||
|
||||
|
||||
class TestMasterAnglerVanillaTools(SVTestBase):
|
||||
options = {
|
||||
"goal": "master_angler",
|
||||
"tool_progression": "vanilla",
|
||||
}
|
|
@ -11,4 +11,10 @@ class SVTestBase(WorldTestBase):
|
|||
|
||||
def world_setup(self, *args, **kwargs):
|
||||
super().world_setup(*args, **kwargs)
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue