Skip to content

Commit

Permalink
Add: Add rogue task to scheduler and prefer occurrence
Browse files Browse the repository at this point in the history
  • Loading branch information
LmeSzinc committed Oct 18, 2023
1 parent 24e6f9f commit cfd8c1d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"World": "Simulated_Universe_World_7",
"Path": "The_Hunt",
"Bonus": "Blessing Cosmos",
"DomainStrategy": "combat",
"DomainStrategy": "occurrence",
"ImmersionReward": "immersifier",
"StopCondition": "weekly_point_reward"
},
Expand Down
2 changes: 1 addition & 1 deletion module/config/argument/args.json
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@
},
"DomainStrategy": {
"type": "select",
"value": "combat",
"value": "occurrence",
"option": [
"combat",
"occurrence"
Expand Down
2 changes: 1 addition & 1 deletion module/config/argument/argument.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ RogueWorld:
value: Blessing Cosmos
option: [ Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos ]
DomainStrategy:
value: combat
value: occurrence
option: [ combat, occurrence ]
ImmersionReward:
value: immersifier
Expand Down
2 changes: 1 addition & 1 deletion module/config/config_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_Path = 'The_Hunt' # Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation
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_StopCondition = 'weekly_point_reward' # weekly_point_reward, 100_elite_boss, non_stop

Expand Down
1 change: 1 addition & 0 deletions module/config/config_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def LANG(self):
> BattlePass > DailyQuest > Assignment
> Freebies > DataUpdate
> Weekly > Dungeon
> Rogue
"""

"""
Expand Down
5 changes: 5 additions & 0 deletions src.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def freebies(self):
from tasks.freebies.freebies import Freebies
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__':
src = StarRailCopilot('src')
src.loop()
8 changes: 6 additions & 2 deletions tasks/rogue/rogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from tasks.rogue.route.loader import RouteLoader


class RogueHandler(RouteLoader, RogueEntry):
class Rogue(RouteLoader, RogueEntry):
def rogue_once(self):
"""
Do a complete rogue run.
Expand All @@ -24,8 +24,12 @@ def rogue_once(self):
self.rogue_reward_claim()
return True

def run(self):
self.rogue_once()
self.config.task_delay(server_update=True)


if __name__ == '__main__':
self = RogueHandler('src', task='Rogue')
self = Rogue('src', task='Rogue')
self.device.screenshot()
self.rogue_once()
2 changes: 1 addition & 1 deletion tasks/rogue/route/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def domain_exit(self, *waypoints, end_rotation=None):
self.rotation_set(end_rotation, threshold=10)

logger.hr('Find domain exit', level=2)
direction = self.predict_door(self.device.image)
direction = self.predict_door()
direction_limit = 55
if direction is not None:
if abs(direction) > direction_limit:
Expand Down

0 comments on commit cfd8c1d

Please sign in to comment.