Add: Do rogue dailies

This commit is contained in:
LmeSzinc 2023-12-06 17:47:39 +08:00
parent 5efb2a8cb4
commit 5ebfdf1976
7 changed files with 24 additions and 12 deletions

View File

@ -99,7 +99,7 @@
"Destroy_3_destructible_objects": "achievable", "Destroy_3_destructible_objects": "achievable",
"Complete_Forgotten_Hall_1_time": "achievable", "Complete_Forgotten_Hall_1_time": "achievable",
"Complete_Echo_of_War_1_times": "achievable", "Complete_Echo_of_War_1_times": "achievable",
"Complete_1_stage_in_Simulated_Universe_Any_world": "not_supported", "Complete_1_stage_in_Simulated_Universe_Any_world": "not_set",
"Obtain_victory_in_combat_with_support_characters_1_time": "achievable", "Obtain_victory_in_combat_with_support_characters_1_time": "achievable",
"Use_an_Ultimate_to_deal_the_final_blow_1_time": "achievable", "Use_an_Ultimate_to_deal_the_final_blow_1_time": "achievable",
"Level_up_any_character_1_time": "not_supported", "Level_up_any_character_1_time": "not_supported",

View File

@ -701,7 +701,8 @@ class ConfigUpdater:
set_daily('Destroy_3_destructible_objects', 'achievable') set_daily('Destroy_3_destructible_objects', 'achievable')
set_daily('Complete_Forgotten_Hall_1_time', 'achievable') set_daily('Complete_Forgotten_Hall_1_time', 'achievable')
set_daily('Complete_Echo_of_War_1_times', deep_get(data, 'Weekly.Scheduler.Enable')) set_daily('Complete_Echo_of_War_1_times', deep_get(data, 'Weekly.Scheduler.Enable'))
set_daily('Complete_1_stage_in_Simulated_Universe_Any_world', 'not_supported') set_daily('Complete_1_stage_in_Simulated_Universe_Any_world',
deep_get(data, 'Rogue.Scheduler.Enable'))
set_daily('Obtain_victory_in_combat_with_support_characters_1_time', set_daily('Obtain_victory_in_combat_with_support_characters_1_time',
dungeon and deep_get(data, 'Dungeon.DungeonSupport.Use') in ['when_daily', 'always_use']) dungeon and deep_get(data, 'Dungeon.DungeonSupport.Use') in ['when_daily', 'always_use'])
set_daily('Use_an_Ultimate_to_deal_the_final_blow_1_time', 'achievable') set_daily('Use_an_Ultimate_to_deal_the_final_blow_1_time', 'achievable')

View File

@ -571,7 +571,7 @@
}, },
"Complete_1_stage_in_Simulated_Universe_Any_world": { "Complete_1_stage_in_Simulated_Universe_Any_world": {
"name": "Complete 1 stage in Simulated Universe (Any world)", "name": "Complete 1 stage in Simulated Universe (Any world)",
"help": "", "help": "Need to configure and enable the \"Simulated Universe\" task",
"achievable": "Achievable", "achievable": "Achievable",
"not_set": "Not Set", "not_set": "Not Set",
"not_supported": "Not Supported Yet" "not_supported": "Not Supported Yet"

View File

@ -571,7 +571,7 @@
}, },
"Complete_1_stage_in_Simulated_Universe_Any_world": { "Complete_1_stage_in_Simulated_Universe_Any_world": {
"name": "Supera 1 zona del Universo Simulado (cualquier mundo)", "name": "Supera 1 zona del Universo Simulado (cualquier mundo)",
"help": "", "help": "Necesitas configurar y activar la tarea \"Universo Simulado\"",
"achievable": "Completable", "achievable": "Completable",
"not_set": "No configurado", "not_set": "No configurado",
"not_supported": "No soportado aún" "not_supported": "No soportado aún"

View File

@ -571,7 +571,7 @@
}, },
"Complete_1_stage_in_Simulated_Universe_Any_world": { "Complete_1_stage_in_Simulated_Universe_Any_world": {
"name": "通关「模拟宇宙」任意世界的1个区域", "name": "通关「模拟宇宙」任意世界的1个区域",
"help": "", "help": "需要设置并启用\"模拟宇宙\"任务",
"achievable": "可完成", "achievable": "可完成",
"not_set": "未设置", "not_set": "未设置",
"not_supported": "暂未支持" "not_supported": "暂未支持"

View File

@ -571,7 +571,7 @@
}, },
"Complete_1_stage_in_Simulated_Universe_Any_world": { "Complete_1_stage_in_Simulated_Universe_Any_world": {
"name": "完成「模擬宇宙」任意世界的1個區域", "name": "完成「模擬宇宙」任意世界的1個區域",
"help": "", "help": "需要設定並啟用\"模擬宇宙\"任務",
"achievable": "可完成", "achievable": "可完成",
"not_set": "未設定", "not_set": "未設定",
"not_supported": "暫未支援" "not_supported": "暫未支援"

View File

@ -1,4 +1,5 @@
from module.logger import logger from module.logger import logger
from tasks.daily.keywords.daily_quest import Complete_1_stage_in_Simulated_Universe_Any_world
from tasks.rogue.entry.entry import RogueEntry from tasks.rogue.entry.entry import RogueEntry
from tasks.rogue.exception import RogueReachedWeeklyPointLimit, RogueTeamNotPrepared from tasks.rogue.exception import RogueReachedWeeklyPointLimit, RogueTeamNotPrepared
from tasks.rogue.route.loader import RouteLoader from tasks.rogue.route.loader import RouteLoader
@ -29,17 +30,27 @@ class Rogue(RouteLoader, RogueEntry):
return True return True
def run(self): def run(self):
self.config.update_daily_quests()
while 1: while 1:
# Run # Run
success = self.rogue_once() success = self.rogue_once()
if not success:
break
# Scheduler # Scheduler
if self.config.task_switched(): with self.config.multi_set():
self.config.task_stop() # Task switched
if self.config.task_switched():
self.config.task_delay(server_update=True) self.config.task_stop()
# Archived daily quest
if success:
quests = self.config.stored.DailyQuest.load_quests()
if Complete_1_stage_in_Simulated_Universe_Any_world in quests:
logger.info('Achieve daily quest Complete_1_stage_in_Simulated_Universe_Any_world')
self.config.task_call('DailyQuest')
self.config.task_stop()
# End
if not success:
self.config.task_delay(server_update=True)
break
if __name__ == '__main__': if __name__ == '__main__':