config.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from pydantic import BaseModel, Field
  5. from datetime import time
  6. from tasks.Component.config_scheduler import Scheduler
  7. from tasks.Component.config_base import ConfigBase, Time
  8. from tasks.Component.GeneralBattle.config_general_battle import GreenMarkType
  9. from enum import Enum
  10. from tasks.Component.SwitchSoul.switch_soul_config import SwitchSoulConfig
  11. class Onmyoji(str, Enum):
  12. Ylg = '源赖光'
  13. Qm = '晴明'
  14. Sl = '神乐'
  15. Yby = '源博雅'
  16. Bbbqn = '八百比丘尼'
  17. class DuelConfig(ConfigBase):
  18. # 是否切换阴阳师
  19. switch_enabled: bool = Field(default=True, description='是否切换阴阳师')
  20. # 切换阴阳师
  21. switch_onmyoji: Onmyoji = Field(default=Onmyoji.Ylg, description='切换阴阳师')
  22. # 一键切换斗技御魂
  23. switch_all_soul: bool = Field(default=False, description='switch_all_soul_help')
  24. # 限制时间
  25. limit_time: Time = Field(default=Time(minute=30), description='limit_time_help')
  26. # 目标分数
  27. target_score: int = Field(default=2000, description='target_score_help')
  28. # 刷满荣誉就退出
  29. honor_full_exit: bool = Field(default=False, description='honor_full_exit_help')
  30. # 是否开启绿标
  31. green_enable: bool = Field(default=False, description='green_enable_help')
  32. # 选哪一个绿标
  33. green_mark: GreenMarkType = Field(default=GreenMarkType.GREEN_LEFT1, description='green_mark_help')
  34. class DuelCelebConfig(ConfigBase):
  35. # 是否开启名仕战斗
  36. celeb_battle: bool = Field(default=False, description='是否开启名仕战斗')
  37. # 填写第五手式神名称,如果阵容式神被办,第五手就会换式神,退出斗技
  38. ban_name: str = Field(default='', description='填写第五手式神名称')
  39. initial_score: int = Field(default=3800, description='设置初始斗技分值默认为8颗星之后每赢一场加100输一场减100')
  40. class Duel(ConfigBase):
  41. scheduler: Scheduler = Field(default_factory=Scheduler)
  42. duel_config: DuelConfig = Field(default_factory=DuelConfig)
  43. duel_celeb_config: DuelCelebConfig = Field(default_factory=DuelCelebConfig)
  44. switch_soul: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)