config.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. from pydantic import BaseModel, Field
  2. from enum import Enum
  3. from tasks.Component.GeneralBattle.config_general_battle import GeneralBattleConfig
  4. from tasks.Component.SwitchSoul.switch_soul_config import SwitchSoulConfig
  5. from tasks.Component.config_base import ConfigBase, TimeDelta
  6. from tasks.Component.config_scheduler import Scheduler
  7. class ExplorationLevel(str, Enum):
  8. EXPLORATION_1 = '第一章'
  9. EXPLORATION_2 = '第二章'
  10. EXPLORATION_3 = '第三章'
  11. EXPLORATION_4 = '第四章'
  12. EXPLORATION_5 = '第五章'
  13. EXPLORATION_6 = '第六章'
  14. EXPLORATION_7 = '第七章'
  15. EXPLORATION_8 = '第八章'
  16. EXPLORATION_9 = '第九章'
  17. EXPLORATION_10 = '第十章'
  18. EXPLORATION_11 = '第十一章'
  19. EXPLORATION_12 = '第十二章'
  20. EXPLORATION_13 = '第十三章'
  21. EXPLORATION_14 = '第十四章'
  22. EXPLORATION_15 = '第十五章'
  23. EXPLORATION_16 = '第十六章'
  24. EXPLORATION_17 = '第十七章'
  25. EXPLORATION_18 = '第十八章'
  26. EXPLORATION_19 = '第十九章'
  27. EXPLORATION_20 = '第二十章'
  28. EXPLORATION_21 = '第二十一章'
  29. EXPLORATION_22 = '第二十二章'
  30. EXPLORATION_23 = '第二十三章'
  31. EXPLORATION_24 = '第二十四章'
  32. EXPLORATION_25 = '第二十五章'
  33. EXPLORATION_26 = '第二十六章'
  34. EXPLORATION_27 = '第二十七章'
  35. EXPLORATION_28 = '第二十八章'
  36. class AttackNumber(str, Enum):
  37. SEVEN = '7'
  38. ALL = 'all'
  39. # class AttackRole(str, Enum):
  40. # exp = '经验'
  41. # gold = '金币'
  42. # box = '奖励'
  43. # ALL = '无所谓'
  44. # 是否自动添加候补式神
  45. class AutoRotate(str, Enum):
  46. no = '不'
  47. yes = '是'
  48. class ChooseRarity(str, Enum):
  49. N = 'N卡'
  50. S = '素材'
  51. class Scrolls(BaseModel):
  52. # 绘卷模式
  53. scrolls_enable: bool = Field(title='绘卷模式', default=False, description='绘卷模式')
  54. scrolls_cd: TimeDelta = Field(title='间隔时间', default=TimeDelta(hours=0, minutes=30, seconds=0), description='间隔时间')
  55. scrolls_threshold: int = Field(title='突破票数量', default='25', description='突破票数量,超过打突破')
  56. class ExplorationConfig(BaseModel):
  57. buff_gold_50_click: bool = Field(default=False)
  58. buff_gold_100_click: bool = Field(default=False)
  59. buff_exp_50_click: bool = Field(default=False)
  60. buff_exp_100_click: bool = Field(default=False)
  61. # attack_number: AttackNumber = Field(title='探索次数', default=AttackNumber.SEVEN,
  62. # description='默认探索7次')
  63. current_exploration_count: int = Field(title='探索次数', default='7', description='默认探索7次')
  64. exploration_level: ExplorationLevel = Field(title='探索等级', default=ExplorationLevel.EXPLORATION_28,
  65. description='探索等级 默认二十八')
  66. auto_rotate: AutoRotate = Field(title='自动添加候补式神', default=AutoRotate.no,
  67. description='自动添加候补式神 默认 否')
  68. # attack_role: AttackRole = Field(title='进攻的类型',
  69. # default=AttackRole.ALL, description='攻击的类型')
  70. choose_rarity: ChooseRarity = Field(title='选择狗粮稀有度', default=ChooseRarity.N, description='N')
  71. class Exploration(ConfigBase):
  72. scheduler: Scheduler = Field(default_factory=Scheduler)
  73. exploration_config: ExplorationConfig = Field(default_factory=ExplorationConfig)
  74. scrolls: Scrolls = Field(default_factory=Scrolls)
  75. general_battle_config: GeneralBattleConfig = Field(default_factory=GeneralBattleConfig)
  76. switch_soul_config: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
  77. # auto_rotate_after_times: str = Field(default='30', description='探索30次后, 检测是否需要添加候补式神')
  78. # go_to_realm_after_times: str = Field(default='5', description='探索5次后, 检测是否需要进行结界突破')