Stardew Valley: Fix extended family legendary fishes being locations with fishsanity set to exclude legendary (#2967)

This commit is contained in:
Jérémie Bolduc 2024-03-20 16:57:45 -04:00 committed by GitHub
parent e9620bea77
commit 32315776ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@ from typing import Optional, Dict, Protocol, List, FrozenSet, Iterable
from . import data
from .bundles.bundle_room import BundleRoom
from .data.fish_data import legendary_fish, special_fish, get_fish_for_mods
from .data.fish_data import special_fish, get_fish_for_mods
from .data.museum_data import all_museum_items
from .data.villagers_data import get_villagers_for_mods
from .mods.mod_data import ModNames
@ -206,7 +206,8 @@ def extend_fishsanity_locations(randomized_locations: List[LocationData], option
if fishsanity == Fishsanity.option_none:
return
elif fishsanity == Fishsanity.option_legendaries:
randomized_locations.extend(location_table[f"{prefix}{legendary.name}"] for legendary in legendary_fish)
fish_locations = [location_table[f"{prefix}{fish.name}"] for fish in active_fish if fish.legendary]
randomized_locations.extend(filter_disabled_locations(options, fish_locations))
elif fishsanity == Fishsanity.option_special:
randomized_locations.extend(location_table[f"{prefix}{special.name}"] for special in special_fish)
elif fishsanity == Fishsanity.option_randomized:
@ -216,7 +217,7 @@ def extend_fishsanity_locations(randomized_locations: List[LocationData], option
fish_locations = [location_table[f"{prefix}{fish.name}"] for fish in active_fish]
randomized_locations.extend(filter_disabled_locations(options, fish_locations))
elif fishsanity == Fishsanity.option_exclude_legendaries:
fish_locations = [location_table[f"{prefix}{fish.name}"] for fish in active_fish if fish not in legendary_fish]
fish_locations = [location_table[f"{prefix}{fish.name}"] for fish in active_fish if not fish.legendary]
randomized_locations.extend(filter_disabled_locations(options, fish_locations))
elif fishsanity == Fishsanity.option_exclude_hard_fish:
fish_locations = [location_table[f"{prefix}{fish.name}"] for fish in active_fish if fish.difficulty < 80]

View File

@ -356,7 +356,7 @@ class QuestLocations(NamedRange):
class Fishsanity(Choice):
"""Locations for catching a fish the first time?
None: There are no locations for catching fish
Legendaries: Each of the 5 legendary fish are checks
Legendaries: Each of the 5 legendary fish are checks, plus the extended family if qi board is turned on
Special: A curated selection of strong fish are checks
Randomized: A random selection of fish are checks
All: Every single fish in the game is a location that contains an item. Pairs well with the Master Angler Goal