runhey 3 лет назад
Родитель
Сommit
bffc7b8de3

+ 1 - 0
module/config/config_manual.py

@@ -9,6 +9,7 @@ class ConfigManual:
 
     SCHEDULER_PRIORITY = """
         Restart
+        >KekkaiUtilize > KekkaiActivation > DemonEncounter
         > AreaBoss > GoldYoukai > ExperienceYoukai > Nian > RealmRaid
         > Orochi > OrochiMoans > OrochiJudgement > Sougenbi > FallenSun > EternitySea
         > ActivityShikigami

+ 2 - 1
module/config/config_menu.py

@@ -19,7 +19,8 @@ class ConfigMenu:
         # 刷御魂
         self.menu["Soul Zones"] = ['Orochi', 'Sougenbi', 'FallenSun', 'EternitySea']
         # 日常的任务
-        self.menu["Daily Task"] = ['AreaBoss', 'GoldYoukai', 'ExperienceYoukai', 'Nian', 'RealmRaid']
+        self.menu["Daily Task"] = ['AreaBoss', 'GoldYoukai', 'ExperienceYoukai', 'Nian', 'RealmRaid',
+                                   'KekkaiUtilize', 'KekkaiActivation', 'DemonEncounter']
         # 活动的任务
         self.menu["Activity Task"] = ['ActivityShikigami']
         # 很肝的任务

+ 8 - 0
module/config/config_model.py

@@ -14,10 +14,15 @@ from tasks.Component.config_base import ConfigBase
 from tasks.Script.config import Script
 from tasks.Restart.config import Restart
 from tasks.GlobalGame.config import GlobalGame
+# 每日任务-----------------------------------------------------------------------------------------------------
 from tasks.AreaBoss.config import AreaBoss
 from tasks.ExperienceYoukai.config import ExperienceYoukai
 from tasks.GoldYoukai.config import GoldYoukai
 from tasks.Nian.config import Nian
+from tasks.KekkaiUtilize.config import KekkaiUtilize
+from tasks.KekkaiActivation.config import KekkaiActivation
+from tasks.DemonEncounter.config import DemonEncounter
+# ----------------------------------------------------------------------------------------------------------------------
 from tasks.Orochi.config import Orochi
 from tasks.OrochiMoans.config import OrochiMoans
 from tasks.Sougenbi.config import Sougenbi
@@ -45,6 +50,9 @@ class ConfigModel(ConfigBase):
     gold_youkai: GoldYoukai = Field(default_factory=GoldYoukai)
     nian: Nian = Field(default_factory=Nian)
     realm_raid: RealmRaid = Field(default_factory=RealmRaid)
+    kekkai_utilize: KekkaiUtilize = Field(default_factory=KekkaiUtilize)
+    kekkai_activation: KekkaiActivation = Field(default_factory=KekkaiActivation)
+    demon_encounter: DemonEncounter = Field(default_factory=DemonEncounter)
 
     # 这些是刷御魂的
     orochi: Orochi = Field(default_factory=Orochi)

BIN
module/config/i18n/zh_CN.qm


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

@@ -453,4 +453,37 @@ mode_3策略是刷到五个契灵后开始结契,选择高级、中级盘来
 	<message><source>Enable Mail</source><translation>邮件</translation></message>
 	<message><source>Enable Soul</source><translation>御魂或者觉醒加成</translation></message>
 </context>	
+<context>
+    <name>Args</name>
+	<message><source>UtilizeScheduler</source><translation>调度</translation></message>
+	<message><source>UtilizeConfig</source><translation>寄养</translation></message>
+	<message><source>Utilize Rule</source><translation>寄养规则</translation></message>
+	<message><source>Auto Switch Sort</source><translation>切换好友列表以游戏刷新高星排序</translation></message>
+	<message><source>Shikigami Class</source><translation>寄养式神类型</translation></message>
+	<message><source>Shikigami Order</source><translation>选中第几个式神寄养</translation></message>
+	<message><source>Guild Ap Enable</source><translation>顺路收取寮补给</translation></message>
+	<message><source>Guild Assets Enable</source><translation>顺路收取寮资金</translation></message>
+	<message><source>Box Ap Enable</source><translation>顺路收取体力盒子</translation></message>
+	<message><source>Box Exp Enable</source><translation>顺路收取经验盒子</translation></message>
+	<message><source>utilize_rule_help</source><translation>挑选结界卡的规则,使用默认auto即可,当然你也可以使用过滤器自定义:
+以auto为例 "太鼓6>太鼓5>斗鱼6>斗鱼5>太鼓4>太鼓3>斗鱼4>斗鱼3"</translation></message>
+	<message><source>auto_switch_sort_help</source><translation>会自动寻找最优的坑位</translation></message>
+	<message><source>shikigami_class_help</source><translation>选择的式神类别(寄养默认选择N卡,且不建议选别的)</translation></message>
+	<message><source>shikigami_order_help</source><translation>从左开始选第几个式神</translation></message>
+	<message><source>guild_ap_enable_help</source><translation>必选项</translation></message>
+	<message><source>guild_assets_enable_help</source><translation>必选项</translation></message>
+	<message><source>box_ap_enable_help</source><translation>必选项</translation></message>
+	<message><source>box_exp_enable_help</source><translation>必选项</translation></message>
+</context>	
+<context>
+    <name>Args</name>
+	<message><source>ActivationScheduler</source><translation>调度</translation></message>
+	<message><source>ActivationConfig</source><translation>寄养</translation></message>
+	<message><source>Card Rule</source><translation>放卡规则</translation></message>
+	<message><source>Exchange Max</source><translation>收取经验后更换下来满级的式神</translation></message>
+	<message><source>Exchange Before</source><translation>收取经验前更换下来满级的式神</translation></message>
+	<message><source>card_rule_help</source><translation>规则还没想好</translation></message>
+	<message><source>exchange_before_help</source><translation>必选项</translation></message>
+	<message><source>exchange_max_help</source><translation>必选项</translation></message>
+</context>		
 </TS>

+ 15 - 1
tasks/DemonEncounter/config.py

@@ -2,5 +2,19 @@
 # @author runhey
 # github https://github.com/runhey
 from pydantic import BaseModel, Field
-from tasks.Component.config_base import ConfigBase
+from enum import Enum
+from datetime import datetime, time
+
+from tasks.Component.config_scheduler import Scheduler
+from tasks.Component.config_base import ConfigBase, TimeDelta
+from tasks.Component.GeneralBattle.config_general_battle import GeneralBattleConfig
+from tasks.Utils.config_enum import ShikigamiClass
+
+class UtilizeScheduler(Scheduler):
+    priority = Field(default=2, description='priority_help')
+
+class DemonEncounter(ConfigBase):
+    scheduler: UtilizeScheduler = Field(default_factory=UtilizeScheduler)
+    general_battle_config: GeneralBattleConfig = Field(default_factory=GeneralBattleConfig)
+
 

+ 17 - 0
tasks/DemonEncounter/script_task.py

@@ -0,0 +1,17 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+
+
+from module.logger import logger
+from module.exception import TaskEnd
+
+from tasks.GameUi.game_ui import GameUi
+
+
+class ScriptTask(GameUi):
+
+    def run(self):
+        pass
+
+

+ 28 - 0
tasks/KekkaiActivation/config.py

@@ -0,0 +1,28 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+from pydantic import BaseModel, Field
+from enum import Enum
+from datetime import datetime, time
+
+from tasks.Component.config_scheduler import Scheduler
+from tasks.Component.config_base import ConfigBase, TimeDelta
+from tasks.Utils.config_enum import ShikigamiClass
+
+class ActivationScheduler(Scheduler):
+    priority = Field(default=2, description='priority_help')
+    success_interval: TimeDelta = Field(default=TimeDelta(hours=10), description='success_interval_help')
+    failure_interval: TimeDelta = Field(default=TimeDelta(hours=10), description='failure_interval_help')
+
+class ActivationConfig(BaseModel):
+    card_rule: str = Field(default='auto', description='card_rule_help')
+    exchange_before: bool = Field(default=True, description='exchange_before_help')
+    exchange_max: bool = Field(default=True, description='exchange_max_help')
+    shikigami_class: ShikigamiClass = Field(default=ShikigamiClass.N, description='shikigami_class_help')
+
+
+
+class KekkaiActivation(ConfigBase):
+    scheduler: ActivationScheduler = Field(default_factory=ActivationScheduler)
+    activation_config: ActivationConfig = Field(default_factory=ActivationConfig)
+

+ 17 - 0
tasks/KekkaiActivation/script_task.py

@@ -0,0 +1,17 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+
+
+from module.logger import logger
+from module.exception import TaskEnd
+
+from tasks.GameUi.game_ui import GameUi
+
+
+class ScriptTask(GameUi):
+
+    def run(self):
+        pass
+
+

+ 33 - 0
tasks/KekkaiUtilize/config.py

@@ -0,0 +1,33 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+from pydantic import BaseModel, Field
+from enum import Enum
+from datetime import datetime, time
+
+from tasks.Component.config_scheduler import Scheduler
+from tasks.Component.config_base import ConfigBase, TimeDelta
+from tasks.Utils.config_enum import ShikigamiClass
+
+class UtilizeScheduler(Scheduler):
+    priority = Field(default=2, description='priority_help')
+    success_interval: TimeDelta = Field(default=TimeDelta(hours=6), description='success_interval_help')
+    failure_interval: TimeDelta = Field(default=TimeDelta(hours=6), description='failure_interval_help')
+
+class UtilizeConfig(BaseModel):
+    utilize_rule: str = Field(default='auto', description='utilize_rule_help')
+    auto_switch_sort: bool = Field(default=True, description='auto_switch_sort_help')
+    shikigami_class: ShikigamiClass = Field(default=ShikigamiClass.N, description='shikigami_class_help')
+    shikigami_order: int = Field(default=4, description='shikigami_order_help')
+    guild_ap_enable: bool = Field(default=True, description='guild_ap_enable_help')
+    guild_assets_enable: bool = Field(default=True, description='guild_assets_enable_help')
+    box_ap_enable: bool = Field(default=True, description='box_ap_enable_help')
+    box_exp_enable: bool = Field(default=True, description='box_exp_enable_help')
+
+
+class KekkaiUtilize(ConfigBase):
+    scheduler: UtilizeScheduler = Field(default_factory=UtilizeScheduler)
+    utilize_config: UtilizeConfig = Field(default_factory=UtilizeConfig)
+
+
+

+ 17 - 0
tasks/KekkaiUtilize/script_task.py

@@ -0,0 +1,17 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+
+
+from module.logger import logger
+from module.exception import TaskEnd
+
+from tasks.GameUi.game_ui import GameUi
+
+
+class ScriptTask(GameUi):
+
+    def run(self):
+        pass
+
+

+ 13 - 0
tasks/Utils/config_enum.py

@@ -0,0 +1,13 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+from enum import Enum
+
+class ShikigamiClass(str, Enum):
+    SP = 'SP'
+    SSR = 'SSR'
+    SR = 'SR'
+    R = 'R'
+    N = 'N'
+    # 材料
+    MATERIAL = 'MATERIAL'