Add: Add rogue task to scheduler and prefer occurrence

This commit is contained in:
LmeSzinc 2023-10-19 00:21:00 +08:00
parent 24e6f9f871
commit cfd8c1d4f1
8 changed files with 17 additions and 7 deletions

View File

@ -177,7 +177,7 @@
"World": "Simulated_Universe_World_7", "World": "Simulated_Universe_World_7",
"Path": "The_Hunt", "Path": "The_Hunt",
"Bonus": "Blessing Cosmos", "Bonus": "Blessing Cosmos",
"DomainStrategy": "combat", "DomainStrategy": "occurrence",
"ImmersionReward": "immersifier", "ImmersionReward": "immersifier",
"StopCondition": "weekly_point_reward" "StopCondition": "weekly_point_reward"
}, },

View File

@ -1205,7 +1205,7 @@
}, },
"DomainStrategy": { "DomainStrategy": {
"type": "select", "type": "select",
"value": "combat", "value": "occurrence",
"option": [ "option": [
"combat", "combat",
"occurrence" "occurrence"

View File

@ -214,7 +214,7 @@ RogueWorld:
value: Blessing Cosmos value: Blessing Cosmos
option: [ Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos ] option: [ Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos ]
DomainStrategy: DomainStrategy:
value: combat value: occurrence
option: [ combat, occurrence ] option: [ combat, occurrence ]
ImmersionReward: ImmersionReward:
value: immersifier value: immersifier

View File

@ -120,7 +120,7 @@ class GeneratedConfig:
RogueWorld_World = 'Simulated_Universe_World_7' # Simulated_Universe_World_3, Simulated_Universe_World_4, Simulated_Universe_World_5, Simulated_Universe_World_6, Simulated_Universe_World_7 RogueWorld_World = 'Simulated_Universe_World_7' # Simulated_Universe_World_3, Simulated_Universe_World_4, Simulated_Universe_World_5, Simulated_Universe_World_6, Simulated_Universe_World_7
RogueWorld_Path = 'The_Hunt' # Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation RogueWorld_Path = 'The_Hunt' # Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation
RogueWorld_Bonus = 'Blessing Cosmos' # Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos RogueWorld_Bonus = 'Blessing Cosmos' # Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos
RogueWorld_DomainStrategy = 'combat' # combat, occurrence RogueWorld_DomainStrategy = 'occurrence' # combat, occurrence
RogueWorld_ImmersionReward = 'immersifier' # do_not_claim, immersifier, immersifier_trailblaze_power RogueWorld_ImmersionReward = 'immersifier' # do_not_claim, immersifier, immersifier_trailblaze_power
RogueWorld_StopCondition = 'weekly_point_reward' # weekly_point_reward, 100_elite_boss, non_stop RogueWorld_StopCondition = 'weekly_point_reward' # weekly_point_reward, 100_elite_boss, non_stop

View File

@ -13,6 +13,7 @@ class ManualConfig:
> BattlePass > DailyQuest > Assignment > BattlePass > DailyQuest > Assignment
> Freebies > DataUpdate > Freebies > DataUpdate
> Weekly > Dungeon > Weekly > Dungeon
> Rogue
""" """
""" """

5
src.py
View File

@ -50,6 +50,11 @@ class StarRailCopilot(AzurLaneAutoScript):
from tasks.freebies.freebies import Freebies from tasks.freebies.freebies import Freebies
Freebies(config=self.config, device=self.device).run() Freebies(config=self.config, device=self.device).run()
def rogue(self):
from tasks.rogue.rogue import Rogue
Rogue(config=self.config, device=self.device).run()
if __name__ == '__main__': if __name__ == '__main__':
src = StarRailCopilot('src') src = StarRailCopilot('src')
src.loop() src.loop()

View File

@ -4,7 +4,7 @@ from tasks.rogue.exception import RogueTeamNotPrepared
from tasks.rogue.route.loader import RouteLoader from tasks.rogue.route.loader import RouteLoader
class RogueHandler(RouteLoader, RogueEntry): class Rogue(RouteLoader, RogueEntry):
def rogue_once(self): def rogue_once(self):
""" """
Do a complete rogue run. Do a complete rogue run.
@ -24,8 +24,12 @@ class RogueHandler(RouteLoader, RogueEntry):
self.rogue_reward_claim() self.rogue_reward_claim()
return True return True
def run(self):
self.rogue_once()
self.config.task_delay(server_update=True)
if __name__ == '__main__': if __name__ == '__main__':
self = RogueHandler('src', task='Rogue') self = Rogue('src', task='Rogue')
self.device.screenshot() self.device.screenshot()
self.rogue_once() self.rogue_once()

View File

@ -273,7 +273,7 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent):
self.rotation_set(end_rotation, threshold=10) self.rotation_set(end_rotation, threshold=10)
logger.hr('Find domain exit', level=2) logger.hr('Find domain exit', level=2)
direction = self.predict_door(self.device.image) direction = self.predict_door()
direction_limit = 55 direction_limit = 55
if direction is not None: if direction is not None:
if abs(direction) > direction_limit: if abs(direction) > direction_limit: