From 01a83b31316516371def47865b338f8416451213 Mon Sep 17 00:00:00 2001 From: Jouramie Date: Wed, 12 Jun 2024 20:12:36 -0400 Subject: [PATCH] check specificly if pet is randomized --- worlds/stardew_valley/content/feature/friendsanity.py | 4 ++++ worlds/stardew_valley/logic/pet_logic.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/worlds/stardew_valley/content/feature/friendsanity.py b/worlds/stardew_valley/content/feature/friendsanity.py index 5d1f4fd0162a..3e1581b4e2f1 100644 --- a/worlds/stardew_valley/content/feature/friendsanity.py +++ b/worlds/stardew_valley/content/feature/friendsanity.py @@ -58,6 +58,10 @@ class FriendsanityFeature(ABC): def get_randomized_hearts(self, villager: Villager) -> Tuple[int, ...]: ... + @property + def is_pet_randomized(self): + return bool(self.get_pet_randomized_hearts()) + @abstractmethod def get_pet_randomized_hearts(self) -> Tuple[int, ...]: ... diff --git a/worlds/stardew_valley/logic/pet_logic.py b/worlds/stardew_valley/logic/pet_logic.py index b87ef046b73e..0438940a6633 100644 --- a/worlds/stardew_valley/logic/pet_logic.py +++ b/worlds/stardew_valley/logic/pet_logic.py @@ -23,7 +23,7 @@ def has_pet_hearts(self, hearts: int = 1) -> StardewRule: if hearts == 0: return True_() - if self.content.features.friendsanity.is_enabled: + if self.content.features.friendsanity.is_pet_randomized: return self.received_pet_hearts(hearts) return self.can_befriend_pet(hearts)