Parcourir la source

feat(task): Add duel config.py

runhey il y a 3 ans
Parent
commit
e889ef21c6

+ 1 - 1
module/config/config_manual.py

@@ -18,7 +18,7 @@ class ConfigManual:
         > TrueOrochi > RichMan
         > CollectiveMissions
         > Pets > TalismanPass > SoulsTidy > Delegation
-        > Secret > WeeklyTrifles > MysteryShop
+        > Secret > WeeklyTrifles > MysteryShop > Duel
         """
 
     DEVICE_OVER_HTTP = False

+ 1 - 1
module/config/config_menu.py

@@ -28,7 +28,7 @@ class ConfigMenu:
         self.menu["Guild"] = ['KekkaiUtilize', 'KekkaiActivation', 'RealmRaid', 'RyouToppa', 'CollectiveMissions',
                               'Hunt']
         # 每周任务
-        self.menu["Weekly Task"] = ['TrueOrochi', 'RichMan', 'Secret', 'WeeklyTrifles', 'MysteryShop']
+        self.menu["Weekly Task"] = ['TrueOrochi', 'RichMan', 'Secret', 'WeeklyTrifles', 'MysteryShop', 'Duel']
         # 活动的任务
         self.menu["Activity Task"] = ['ActivityShikigami']
         # 开发工具

+ 2 - 0
module/config/config_model.py

@@ -54,6 +54,7 @@ from tasks.RichMan.config import RichMan
 from tasks.Secret.config import Secret
 from tasks.WeeklyTrifles.config import WeeklyTrifles
 from tasks.MysteryShop.config import MysteryShop
+from tasks.Duel.config import Duel
 # ----------------------------------------------------------------------------------------------------------------------
 
 class ConfigModel(ConfigBase):
@@ -100,6 +101,7 @@ class ConfigModel(ConfigBase):
     secret: Secret = Field(default_factory=Secret)
     weekly_trifles: WeeklyTrifles = Field(default_factory=WeeklyTrifles)
     mystery_shop: MysteryShop = Field(default_factory=MysteryShop)
+    duel: Duel = Field(default_factory=Duel)
 
     # 阴阳寮
     collective_missions: CollectiveMissions = Field(default_factory=CollectiveMissions)

BIN
module/config/i18n/zh_CN.qm


+ 10 - 0
module/config/i18n/zh_CN.ts

@@ -674,4 +674,14 @@ Refresh:直接刷新,如果刷新操作进入CD,将标记为失败并退
 	<message><source>GoryouClass</source><translation>御灵类型</translation></message>
 	<message><source>goryou_class_help</source><translation>闭着眼睛选,自动支持到当天的类型。不支持选择层数是因为正常人都会打第三层</translation></message>
 </context>
+<context>
+    <name>Args</name>
+	<message><source>DuelConfig</source><translation>自动斗技</translation></message>	
+	<message><source>Switch All Soul</source><translation>一键切换斗技御魂</translation></message>	
+	<message><source>Target Score</source><translation>达到 X 分数后会结束任务</translation></message>
+	<message><source>switch_all_soul_help</source><translation>你应当先进行式神御魂的导入</translation></message>
+	<message><source>Honor Full Exit</source><translation>刷满荣誉就退出</translation></message>
+	<message><source>target_score_help</source><translation>3000以上表示为名士(也是自动斗技的最高)</translation></message>
+	<message><source>honor_full_exit_help</source><translation>这无需关心本周荣誉的上限是什么</translation></message>
+</context>
 </TS>

+ 1 - 1
tasks/CollectiveMissions/script_task.py

@@ -242,5 +242,5 @@ if __name__ == '__main__':
     t = ScriptTask(c, d)
     t.screenshot()
 
-    t._donate(0)
+    t.run()
 

+ 29 - 0
tasks/Duel/config.py

@@ -0,0 +1,29 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+from pydantic import BaseModel, Field
+from datetime import time
+
+from tasks.Component.config_scheduler import Scheduler
+from tasks.Component.config_base import ConfigBase
+from tasks.Component.GeneralBattle.config_general_battle import GreenMarkType
+
+class DuelConfig(ConfigBase):
+    # 一键切换斗技御魂
+    switch_all_soul: bool = Field(default=False, description='switch_all_soul_help')
+    # 限制时间
+    limit_time: time = Field(default=time(minute=30), description='limit_time_help')
+    # 目标分数
+    target_score: int = Field(default=2000, description='target_score_help')
+    # 刷满荣誉就退出
+    honor_full_exit: bool = Field(default=False, description='honor_full_exit_help')
+    # 是否开启绿标
+    green_enable: bool = Field(default=False, description='green_enable_help')
+    # 选哪一个绿标
+    green_mark: GreenMarkType = Field(default=GreenMarkType.GREEN_LEFT1, description='green_mark_help')
+
+
+class Duel(ConfigBase):
+    scheduler: Scheduler = Field(default_factory=Scheduler)
+    duel_soul: DuelConfig = Field(default_factory=DuelConfig)
+