mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
Add comments in stored counter class definition
This commit is contained in:
parent
f5bc0d0ce1
commit
2bc797f3e2
@ -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:
|
||||
|
@ -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(
|
||||
|
@ -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}")
|
||||
|
Loading…
Reference in New Issue
Block a user