diff --git a/module/config/stored/classes.py b/module/config/stored/classes.py index de1c7cdf7..8f62ee857 100644 --- a/module/config/stored/classes.py +++ b/module/config/stored/classes.py @@ -205,16 +205,21 @@ class StoredImmersifier(StoredCounter): class StoredSimulatedUniverse(StoredCounter, StoredExpiredAtMonday0400): + # These variables are used in Rogue Farming feature. + + # Times of boss drop chance per week. In current version of StarRail, this value is 100. FIXED_DEFAULT = 100 + + # Times left to farm. Resets to 100 every Monday 04:00, and decreases each time the elite boss is cleared. FarmingCounter = FIXED_DEFAULT - def farm_dec(self, value=1): + def farm_dec(self, value = 1): self.FarmingCounter -= value def farm_reset(self,): self.FarmingCounter = self.FIXED_DEFAULT - def farm_not_full(self) -> bool: + def farm_not_complete(self) -> bool: return self.FarmingCounter > 0 def farm_get_remain(self) -> int: diff --git a/tasks/rogue/entry/entry.py b/tasks/rogue/entry/entry.py index 723a668d9..f81764df6 100644 --- a/tasks/rogue/entry/entry.py +++ b/tasks/rogue/entry/entry.py @@ -355,7 +355,7 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI): if self.config.RogueWorld_UseImmersifier and self.config.stored.Immersifier.value > 0: logger.info( 'Reached weekly point limit but still have immersifiers left, continue to use them') - elif self.config.RogueWorld_WeeklyFarming and self.config.stored.SimulatedUniverse.farm_not_full(): + elif self.config.RogueWorld_WeeklyFarming and self.config.stored.SimulatedUniverse.farm_not_complete(): logger.attr( "Farming Counter", self.config.stored.SimulatedUniverse.farm_get_remain()) logger.info( diff --git a/tasks/rogue/route/base.py b/tasks/rogue/route/base.py index fc8a34c77..54d1f766b 100644 --- a/tasks/rogue/route/base.py +++ b/tasks/rogue/route/base.py @@ -171,8 +171,8 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent, RogueReward): result = super().clear_enemy(*waypoints) - # runs when one elite battle finishes (do not handle whether battle succeeded or failed), and decreases rogue farming count by 1 - if self.config.RogueWorld_WeeklyFarming and self.config.stored.SimulatedUniverse.farm_not_full(): + # runs when one elite battle finishes (do not handle whether the battle succeeded or failed), and decreases rogue farming count by 1 + if self.config.RogueWorld_WeeklyFarming and self.config.stored.SimulatedUniverse.farm_not_complete(): self.config.stored.SimulatedUniverse.farm_dec() logger.info( f"Cleared elite boss, decrease farming count by 1, now {self.config.stored.SimulatedUniverse.FarmingCounter}")