config.py 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from enum import Enum
  5. from datetime import time, timedelta
  6. from pydantic import BaseModel, Field
  7. from tasks.Component.GeneralBattle.config_general_battle import GreenMarkType
  8. from tasks.Component.config_scheduler import Scheduler
  9. from tasks.Component.config_base import ConfigBase, TimeDelta
  10. from tasks.Component.BaseActivity.config_activity import GeneralClimb
  11. class ShikigamiType(str, Enum):
  12. FOOD_TYPE_1 = 'shikigami_type_1'
  13. FOOD_TYPE_2 = 'shikigami_type_2'
  14. FOOD_TYPE_3 = 'shikigami_type_3'
  15. FOOD_TYPE_4 = 'shikigami_type_4'
  16. class SwitchSoulConfig(BaseModel):
  17. # 切换门票爬塔御魂
  18. enable_switch_pass: bool = Field(default=False, description='是否切换门票爬塔御魂')
  19. pass_group_team: str = Field(default='-1,-1', description='组1-7,队伍1-4 中间用英文,分隔。战斗内切换队伍预设也使用该值')
  20. enable_switch_pass_by_name: bool = Field(default=False, description='是否通过ocr切换御魂')
  21. pass_group_team_name: str = Field(default='', description='组名,队伍名 中间用英文,分隔')
  22. # 切换体力爬塔御魂
  23. enable_switch_ap: bool = Field(default=False, description='是否切换体力爬塔御魂')
  24. ap_group_team: str = Field(default='-1,-1', description='组1-7,队伍1-4 中间用英文,分隔。战斗内切换队伍预设也使用该值')
  25. enable_switch_ap_by_name: bool = Field(default=False, description='是否通过ocr切换御魂')
  26. ap_group_team_name: str = Field(default='', description='组名,队伍名 中间用英文,分隔')
  27. # 切换boss爬塔御魂
  28. enable_switch_boss: bool = Field(default=False, description='是否切换boss爬塔御魂')
  29. boss_group_team: str = Field(default='-1,-1', description='组1-7,队伍1-4 中间用英文,分隔。战斗内切换队伍预设也使用该值')
  30. enable_switch_boss_by_name: bool = Field(default=False, description='是否通过ocr切换御魂')
  31. boss_group_team_name: str = Field(default='', description='组名,队伍名 中间用英文,分隔')
  32. class GeneralBattleConfig(BaseModel):
  33. # 是否切换门票爬塔预设
  34. enable_pass_preset: bool = Field(default=False, description='是否切换门票爬塔预设')
  35. # 是否开启门票爬塔绿标
  36. enable_pass_green: bool = Field(default=False, description='是否开启门票爬塔绿标')
  37. # 门票爬塔绿标位置
  38. pass_green_mark: GreenMarkType = Field(default=GreenMarkType.GREEN_LEFT1, description='门票爬塔绿标位置')
  39. # 门票爬塔战斗过程是否随机点击或滑动
  40. enable_pass_anti_detect: bool = Field(default=False, description='门票爬塔战斗过程是否随机点击或滑动')
  41. # 是否切换体力爬塔预设
  42. enable_ap_preset: bool = Field(default=False, description='是否切换体力爬塔预设')
  43. # 是否开启体力爬塔绿标
  44. enable_ap_green: bool = Field(default=False, description='是否开启体力爬塔绿标')
  45. # 体力爬塔绿标位置
  46. ap_green_mark: GreenMarkType = Field(default=GreenMarkType.GREEN_LEFT1, description='体力爬塔绿标位置')
  47. # 体力爬塔战斗过程是否随机点击或滑动
  48. enable_ap_anti_detect: bool = Field(default=False, description='体力爬塔战斗过程是否随机点击或滑动')
  49. # 是否切换boss爬塔预设
  50. enable_boss_preset: bool = Field(default=False, description='是否切换boss爬塔预设')
  51. # 是否开启boss爬塔绿标
  52. enable_boss_green: bool = Field(default=False, description='是否开启boss爬塔绿标')
  53. # boss爬塔绿标位置
  54. boss_green_mark: GreenMarkType = Field(default=GreenMarkType.GREEN_LEFT1, description='boss爬塔绿标位置')
  55. # boss爬塔战斗过程是否随机点击或滑动
  56. enable_boss_anti_detect: bool = Field(default=False, description='boss爬塔战斗过程是否随机点击或滑动')
  57. class ActivityShikigami(ConfigBase):
  58. scheduler: Scheduler = Field(default_factory=Scheduler)
  59. general_climb: GeneralClimb = Field(default_factory=GeneralClimb)
  60. switch_soul_config: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
  61. general_battle: GeneralBattleConfig = Field(default_factory=GeneralBattleConfig)