config.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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
  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 ExplorationConfig(BaseModel):
  52. buff_gold_50_click: bool = Field(default=False)
  53. buff_gold_100_click: bool = Field(default=False)
  54. attack_number: AttackNumber = Field(title='探索次数', default=AttackNumber.SEVEN,
  55. description='默认探索7次')
  56. current_exploration_times: str = Field(default='0', description='探索次数')
  57. exploration_level: ExplorationLevel = Field(title='探索等级', default=ExplorationLevel.EXPLORATION_28,
  58. description='探索等级 默认二十八')
  59. auto_rotate: AutoRotate = Field(title='自动添加候补式神', default=AutoRotate.no,
  60. description='自动添加候补式神 默认 否')
  61. # attack_role: AttackRole = Field(title='进攻的类型',
  62. # default=AttackRole.ALL, description='攻击的类型')
  63. choose_rarity: ChooseRarity = Field(title='选择狗粮稀有度', default=ChooseRarity.N, description='N')
  64. class Exploration(ConfigBase):
  65. scheduler: Scheduler = Field(default_factory=Scheduler)
  66. exploration_config: ExplorationConfig = Field(default_factory=ExplorationConfig)
  67. general_battle_config: GeneralBattleConfig = Field(default_factory=GeneralBattleConfig)
  68. switch_soul_config: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
  69. # auto_rotate_after_times: str = Field(default='30', description='探索30次后, 检测是否需要添加候补式神')
  70. # go_to_realm_after_times: str = Field(default='5', description='探索5次后, 检测是否需要进行结界突破')